mirror of
https://github.com/Z3Prover/z3
synced 2025-10-30 11:12:28 +00:00
Fix configuration error for non-MSVC compilers.
This commit is contained in:
parent
87efe216d4
commit
2dd4221451
1 changed files with 8 additions and 2 deletions
|
|
@ -393,12 +393,18 @@ endif()
|
|||
################################################################################
|
||||
# Control Flow Guard (MSVC only)
|
||||
################################################################################
|
||||
option(Z3_ENABLE_CFG "Enable Control Flow Guard security checks" ON)
|
||||
# Default CFG to ON for MSVC, OFF for other compilers.
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
option(Z3_ENABLE_CFG "Enable Control Flow Guard security checks" ON)
|
||||
else()
|
||||
option(Z3_ENABLE_CFG "Enable Control Flow Guard security checks" OFF)
|
||||
endif()
|
||||
|
||||
if (Z3_ENABLE_CFG)
|
||||
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
message(FATAL_ERROR "Z3_ENABLE_CFG is only supported with MSVC compiler. "
|
||||
"Current compiler: ${CMAKE_CXX_COMPILER_ID}. "
|
||||
"You should set Z3_ENABLE_CFG to OFF or use MSVC to compile.")
|
||||
"You should remove Z3_ENABLE_CFG or set it to OFF or use MSVC to compile.")
|
||||
endif()
|
||||
|
||||
# Check for incompatible options (handle both / and - forms for robustness)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue