diff options
author | jacobly0 <jacobly0@users.noreply.github.com> | 2022-05-01 21:23:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-01 21:23:32 +0200 |
commit | 62f024f351ce55b46bbe7d7a5eb89b5d93772747 (patch) | |
tree | cdfe7ca87c9cd8fb06042bf626612131018f09e1 | |
parent | dab7db87865555fd481b8bdc6cdcee93bbba7db3 (diff) | |
download | ccache-62f024f351ce55b46bbe7d7a5eb89b5d93772747.tar.gz |
build: Fix build arguments to clang-cl (#1054)
-rw-r--r-- | cmake/StandardSettings.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/StandardSettings.cmake b/cmake/StandardSettings.cmake index 4dfc7e1d..83871af8 100644 --- a/cmake/StandardSettings.cmake +++ b/cmake/StandardSettings.cmake @@ -3,12 +3,16 @@ add_library(standard_settings INTERFACE) -if(CMAKE_CXX_COMPILER_ID MATCHES "^GNU|(Apple)?Clang$") +if(MSVC) + target_compile_options(standard_settings INTERFACE "/FI${CMAKE_BINARY_DIR}/config.h") +else() target_compile_options( standard_settings INTERFACE -include ${CMAKE_BINARY_DIR}/config.h ) +endif() +if(CMAKE_CXX_COMPILER_ID MATCHES "^GNU|(Apple)?Clang$") option(ENABLE_COVERAGE "Enable coverage reporting for GCC/Clang" FALSE) if(ENABLE_COVERAGE) target_compile_options(standard_settings INTERFACE --coverage -O0 -g) @@ -52,8 +56,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^GNU|(Apple)?Clang$") include(StdAtomic) elseif(MSVC) - target_compile_options(standard_settings INTERFACE "/FI${CMAKE_BINARY_DIR}/config.h") - target_compile_options( standard_settings INTERFACE /Zc:preprocessor /Zc:__cplusplus /D_CRT_SECURE_NO_WARNINGS |