In CMake 4.0 and beyond, policy CMP0184 is now the default behavior. This adds the /RTC1 by default when using MSVC and is not disabled by msvc.cmake.
|
STRING(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) # disable native runtime checks |
Note, this only happens when CMake's minimum version is set to 4.0 or higher and Embree sets the minimum version to 3.10. Therefore this issue only happens when Embree is not the top level project, such as when it is built with CMake's FetchContent tool. To help other's diagnose this issue for their projects, this error can manifest with
cl : Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible
In CMake 4.0 and beyond, policy CMP0184 is now the default behavior. This adds the
/RTC1by default when using MSVC and is not disabled bymsvc.cmake.embree/common/cmake/msvc.cmake
Line 31 in 93040c7
cl : Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible