Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/onqtam/doctest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2019-09-10 16:40:53 +0300
committeronqtam <vik.kirilov@gmail.com>2019-09-22 21:14:40 +0300
commit3c6834b59d3ea53dacf1f7c1816a5d7c2239540f (patch)
tree857e200d93fcc06162b653e042807bbec3be0d2f /scripts
parent6adc79f864138ddf25daa8ffd01fcb3f622cec6f (diff)
Add support for compiling with clang-cl. (#286)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/common.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/cmake/common.cmake b/scripts/cmake/common.cmake
index 3578be16..c62b9a0c 100644
--- a/scripts/cmake/common.cmake
+++ b/scripts/cmake/common.cmake
@@ -72,10 +72,14 @@ endmacro()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compiler_flags(-Werror)
- add_compiler_flags(-pedantic)
- add_compiler_flags(-pedantic-errors)
- add_compiler_flags(-fvisibility=hidden)
add_compiler_flags(-fstrict-aliasing)
+
+ # The following options are not valid when clang-cl is used.
+ if(NOT MSVC)
+ add_compiler_flags(-pedantic)
+ add_compiler_flags(-pedantic-errors)
+ add_compiler_flags(-fvisibility=hidden)
+ endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")