summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-11-15 20:01:27 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-11-16 21:33:43 +0100
commitaf0c1731596a35c271a49987c8e477f80c252971 (patch)
tree669843b90d3b4f6b8536d814134c90cd7be14298
parent8c34fdc1b2d67ba440f5ad6cc5f81df4a3bcd937 (diff)
Compile as C++ under MSVC
-rw-r--r--src/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4378ba6..4b13dd7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -112,6 +112,11 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99 -pedantic")
endif()
+# Compile as C++ under MSVC
+if(MSVC)
+ set(CMAKE_C_FLAGS "/TP")
+endif()
+
if(CMAKE_COMPILER_IS_MINGW)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fgnu89-inline")
endif(CMAKE_COMPILER_IS_MINGW)