Skip to content

Commit

Permalink
[FIXUP] cmake: Set build configuration for CMake's tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jul 25, 2024
1 parent f81fe08 commit 4b32d8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/module/ProcessConfigurations.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function(set_default_config config)
if(is_multi_config)
get_property(help_string CACHE CMAKE_CONFIGURATION_TYPES PROPERTY HELPSTRING)
set(CMAKE_CONFIGURATION_TYPES "${all_configs}" CACHE STRING "${help_string}" FORCE)
set(CMAKE_TRY_COMPILE_CONFIGURATION "${config}" PARENT_SCOPE)
else()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
STRINGS "${all_configs}"
Expand All @@ -83,6 +84,7 @@ function(set_default_config config)
get_property(help_string CACHE CMAKE_BUILD_TYPE PROPERTY HELPSTRING)
set(CMAKE_BUILD_TYPE "${config}" CACHE STRING "${help_string}" FORCE)
endif()
set(CMAKE_TRY_COMPILE_CONFIGURATION "${CMAKE_BUILD_TYPE}" PARENT_SCOPE)
endif()
endfunction()

Expand Down

0 comments on commit 4b32d8a

Please sign in to comment.