mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:11:44 +00:00
[0.4.14][CMAKE] MSVC RUNTIME_CHECKS is a 'Debug'-only feature
"cl : Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible" in MSVC builds with Release Configuration Addendum to 0.4.14-dev-1373-g92dfec219d
fix picked from commit 0.4.15-dev-1186-ga2a6038e56
This commit is contained in:
parent
263c5f0a2e
commit
8ab328b53a
4 changed files with 11 additions and 4 deletions
|
@ -16,6 +16,8 @@ if(POLICY CMP0065)
|
|||
cmake_policy(SET CMP0065 NEW)
|
||||
endif()
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
project(REACTOS)
|
||||
|
||||
# Versioning
|
||||
|
|
|
@ -44,5 +44,7 @@ set(USERMODE TRUE CACHE BOOL
|
|||
if(MSVC)
|
||||
set(_PREFAST_ FALSE CACHE BOOL
|
||||
"Whether to enable PREFAST while compiling.")
|
||||
option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON)
|
||||
# RTC are incompatible with compiler optimizations.
|
||||
cmake_dependent_option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON
|
||||
"CMAKE_BUILD_TYPE STREQUAL \"Debug\"" OFF)
|
||||
endif()
|
||||
|
|
|
@ -45,5 +45,7 @@ set(NEWSPRINTF FALSE CACHE BOOL
|
|||
"Whether to compile the new sprintf.")
|
||||
|
||||
if(MSVC)
|
||||
option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON)
|
||||
# RTC are incompatible with compiler optimizations.
|
||||
cmake_dependent_option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON
|
||||
"CMAKE_BUILD_TYPE STREQUAL \"Debug\"" OFF)
|
||||
endif()
|
||||
|
|
|
@ -83,8 +83,9 @@ set(_PREFAST_ FALSE CACHE BOOL
|
|||
"Whether to enable PREFAST while compiling.")
|
||||
set(_VS_ANALYZE_ FALSE CACHE BOOL
|
||||
"Whether to enable static analysis while compiling.")
|
||||
|
||||
option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON)
|
||||
# RTC are incompatible with compiler optimizations.
|
||||
cmake_dependent_option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON
|
||||
"CMAKE_BUILD_TYPE STREQUAL \"Debug\"" OFF)
|
||||
endif()
|
||||
|
||||
if(GCC)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue