Skip to content

Commit

Permalink
Fix detection of TBB with MSVC
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Sep 18, 2024
1 parent 606b2a5 commit ec913c0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 9 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"VCPKG_APPLOCAL_DEPS": {
"type": "BOOL",
"value": "OFF"
"value": "ON"
},
"VCPKG_MANIFEST_FEATURES": {
"type": "STRING",
Expand All @@ -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"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions Source/Test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions Testing/Temporary/CTestCostData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
3 changes: 3 additions & 0 deletions Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Start testing: Sep 18 15:34 Eastern Daylight Time
----------------------------------------------------------
End testing: Sep 18 15:34 Eastern Daylight Time

0 comments on commit ec913c0

Please sign in to comment.