From ec913c01f6dc17d9300a23af5e655e086036cf6a Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Wed, 18 Sep 2024 16:23:38 -0400 Subject: [PATCH] Fix detection of TBB with MSVC Signed-off-by: Michael Jackson --- CMakeLists.txt | 8 +++++--- CMakePresets.json | 10 +++++++++- Source/Test/CMakeLists.txt | 1 + Testing/Temporary/CTestCostData.txt | 1 + Testing/Temporary/LastTest.log | 3 +++ 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 Testing/Temporary/CTestCostData.txt create mode 100644 Testing/Temporary/LastTest.log diff --git a/CMakeLists.txt b/CMakeLists.txt index 7af3ed1..fac92d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,9 +124,11 @@ endif() #------------------------------------------------------------------------------- option(EbsdLib_USE_PARALLEL_ALGORITHMS "Enable EBSDLib to use parallel algorithms" ON) if(EbsdLib_USE_PARALLEL_ALGORITHMS) # If TBB already exists no need to look for it (e.g. EbsdLib is added as a subdirectory in DREAM3D) - if(NOT TARGET TBB::tbb) - include(${EbsdLibProj_SOURCE_DIR}/cmake/TBBSupport.cmake) - endif() + find_package(TBB CONFIG REQUIRED) + get_target_property(tbb_dll_path TBB::tbb IMPORTED_LOCATION_RELEASE) + get_filename_component(tbb_dll_path "${tbb_dll_path}" DIRECTORY) + get_property(EbsdLib_EXTRA_LIBRARY_DIRS GLOBAL PROPERTY EbsdLib_EXTRA_LIBRARY_DIRS) + set_property(GLOBAL PROPERTY EbsdLib_EXTRA_LIBRARY_DIRS ${EbsdLib_EXTRA_LIBRARY_DIRS} ${tbb_dll_path}) endif() include(${EbsdLibProj_SOURCE_DIR}/Source/EbsdLib/SourceList.cmake) diff --git a/CMakePresets.json b/CMakePresets.json index 6ebbc1e..a4d9085 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -39,7 +39,7 @@ }, "VCPKG_APPLOCAL_DEPS": { "type": "BOOL", - "value": "OFF" + "value": "ON" }, "VCPKG_MANIFEST_FEATURES": { "type": "STRING", @@ -52,6 +52,14 @@ "EbsdLib_BUILD_H5SUPPORT": { "type": "BOOL", "value": "OFF" + }, + "BUILDNAME": { + "type": "STRING", + "value": "$env{PRESET_NAME}-$env{BUILD_BUILDNUMBER}-PR$env{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}" + }, + "SITE": { + "type": "STRING", + "value": "$env{AGENT_NAME}.bluequartz.net" } } }, diff --git a/Source/Test/CMakeLists.txt b/Source/Test/CMakeLists.txt index 23ac6d4..58d8161 100644 --- a/Source/Test/CMakeLists.txt +++ b/Source/Test/CMakeLists.txt @@ -152,3 +152,4 @@ if(MSVC) set_source_files_properties(${EbsdLibProj_BINARY_DIR}/EbsdLibUnitTest.cpp PROPERTIES COMPILE_FLAGS /bigobj) endif() +get_property(EbsdLib_EXTRA_LIBRARY_DIRS GLOBAL PROPERTY EbsdLib_EXTRA_LIBRARY_DIRS) diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/Testing/Temporary/CTestCostData.txt @@ -0,0 +1 @@ +--- diff --git a/Testing/Temporary/LastTest.log b/Testing/Temporary/LastTest.log new file mode 100644 index 0000000..98d67c3 --- /dev/null +++ b/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Sep 18 15:34 Eastern Daylight Time +---------------------------------------------------------- +End testing: Sep 18 15:34 Eastern Daylight Time