From 05039a1cf9e218a003ca82359771e8c7de852d1f Mon Sep 17 00:00:00 2001 From: Pasukhin Dmitry Date: Sun, 13 Apr 2025 14:37:36 +0100 Subject: [PATCH] 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. --- adm/cmake/tbb.cmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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)