mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 01:24:08 +00:00
[CMake] For single configuration generators only allow
`CMAKE_BUILD_TYPE` to be one of the pre-defined build configurations that we support.
This commit is contained in:
parent
075a56ef02
commit
cac0283e7d
|
@ -112,6 +112,13 @@ else()
|
|||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${available_build_types})
|
||||
endif()
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
# Check the selected build type is valid
|
||||
list(FIND available_build_types "${CMAKE_BUILD_TYPE}" _build_type_index)
|
||||
if ("${_build_type_index}" EQUAL "-1")
|
||||
message(FATAL_ERROR "\"${CMAKE_BUILD_TYPE}\" is an invalid build type.\n"
|
||||
"Use one of the following build types ${available_build_types}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# CMAKE_BUILD_TYPE has no meaning for multi-configuration generators
|
||||
|
|
Loading…
Reference in a new issue