Skip to content

Commit

Permalink
Focus on detecting multi-config generators using GENERATOR_IS_MULTI_C…
Browse files Browse the repository at this point in the history
…ONFIG property
  • Loading branch information
devin-ai-integration[bot] committed Sep 17, 2024
1 parent d3e196a commit 9a32bd4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ endif()
set(OPENMIND_PRIME_TABLE Boost CACHE STRING "Table of predefined prime numbers")

get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT ${is_multi_config})
# Only set CMAKE_BUILD_TYPE for single-configuration generators
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type for single-configuration generators" FORCE)
if(is_multi_config)
message(STATUS "Multi-configuration generator detected.")
else()
# For multi-configuration generators, set the available configuration types
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING "Configuration types" FORCE)
message(STATUS "Single-configuration generator detected.")
endif()

if(CMAKE_BUILD_TYPE MATCHES [Dd][Ee][Bb][Uu][Gg])
Expand Down

0 comments on commit 9a32bd4

Please sign in to comment.