summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-03-13 21:25:25 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-03-13 21:25:25 -0700
commitc4eb6bc33d9639ce0840a5fa3cea173c2c816fd1 (patch)
tree6724e3dbf909f022095cb5a7ad669c15477dfb78 /src/CMakeLists.txt
parentc187089e8725b45144ec668c4bd95b99b28633d5 (diff)
parentaf98c75f1ad3338c813aa475aa1b543dd80c138a (diff)
Merge pull request #109 from nwellnhof/msvc-c99
Compile in plain C mode with MSVC 12.0 or newer
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 386bfe8..2de501a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -169,8 +169,8 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic")
endif()
-# Compile as C++ under MSVC
-if(MSVC)
+# Compile as C++ under MSVC older than 12.0
+if(MSVC AND MSVC_VERSION LESS 1800)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TP")
endif()