From: Pasukhin Dmitry Date: Sun, 13 Apr 2025 13:37:36 +0000 (+0100) Subject: Configuration - TBB configuration prioritization to release #496 X-Git-Tag: V7_9_1~22 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=4c9aaf2300d1bf7c334f269364004b6f883acc23;p=occt.git Configuration - TBB configuration prioritization to release #496 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. --- diff --git a/adm/cmake/tbb.cmake b/adm/cmake/tbb.cmake index 9e74558c92..088189017f 100644 --- a/adm/cmake/tbb.cmake +++ b/adm/cmake/tbb.cmake @@ -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)