msvc: Use debug versions of tbb malloc for debug builds
authorRay Molenkamp <github@lazydodo.com>
Sun, 17 Nov 2019 21:26:29 +0000 (14:26 -0700)
committerRay Molenkamp <github@lazydodo.com>
Sun, 17 Nov 2019 21:26:29 +0000 (14:26 -0700)
Using the release versions gave unpredictable results when
the msvc debugger was attached for some developers.

build_files/build_environment/cmake/tbb.cmake
source/creator/CMakeLists.txt

index 597c1bfe00c6922c9f2842fa1a6eac24b4f21974..8bd2f3160d097222c215eddbb93e1f6eca92ff03 100644 (file)
@@ -59,6 +59,8 @@ if(WIN32)
     ExternalProject_Add_Step(external_tbb after_install
       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll
       DEPENDEES install
     )
   endif()
index 0f8cfee795fabd3fbd61c4b54327dfc5f1dad535..6e2d9acec32eada8b9bcb1ba5c55f3edb20ae69d 100644 (file)
@@ -818,6 +818,14 @@ elseif(WIN32)
         ${LIBDIR}/tbb/lib/tbbmalloc.dll
         ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll
       DESTINATION "."
+      CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
+    )
+    install(
+      FILES
+        ${LIBDIR}/tbb/lib/debug/tbbmalloc.dll
+        ${LIBDIR}/tbb/lib/debug/tbbmalloc_proxy.dll
+      DESTINATION "."
+      CONFIGURATIONS Debug
     )
   endif()