]> OCCT Git - occt.git/commitdiff
Configuration - TBB configuration prioritization to release #496
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Sun, 13 Apr 2025 13:37:36 +0000 (14:37 +0100)
committerGitHub <noreply@github.com>
Sun, 13 Apr 2025 13:37:36 +0000 (14:37 +0100)
Refactor TBB CMake configuration for checking configuration type.
The solution will be reorganized to math release/debug version.
Prepared only for the hot-fix reason.

adm/cmake/tbb.cmake

index 9e74558c927010ff7c99e23fda7dfa9388b35675..088189017f8ec3c3f68ced153f2f8b6372fb4902 100644 (file)
@@ -71,7 +71,12 @@ if (WIN32)
 
     # Get installed configuration of tbb
     get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS)
-    list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
+    # Prioritize RELEASE configuration if available
+    if (";${TARGET_TBB_IMPORT_CONFS};" MATCHES ";RELEASE;")
+      set (CHOSEN_IMPORT_CONF "RELEASE")
+    else()
+      list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
+    endif()
 
     separate_arguments (CSF_TBB)
     foreach (LIB IN LISTS CSF_TBB)
@@ -204,7 +209,12 @@ else ()
 
   # Get installed configuration of tbb
   get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS)
-  list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
+  # Prioritize RELEASE configuration if available
+  if (";${TARGET_TBB_IMPORT_CONFS};" MATCHES ";RELEASE;")
+    set (CHOSEN_IMPORT_CONF "RELEASE")
+  else()
+    list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
+  endif()
 
   separate_arguments (CSF_TBB)
   foreach (LIB IN LISTS CSF_TBB)