mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
This allows for setting EXCLUDE_FROM_ALL, conditional on the build configuration. However, only the Ninja Multi-Config generator supports different property values per config. All other multi-config generators will yield an error in that situation. Fixes: #20923
7 lines
217 B
CMake
7 lines
217 B
CMake
enable_language(C)
|
|
|
|
set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "")
|
|
|
|
add_executable(release_only_tool main.c)
|
|
set_property(TARGET release_only_tool PROPERTY EXCLUDE_FROM_ALL "$<NOT:$<CONFIG:Release>>")
|