From af0c1731596a35c271a49987c8e477f80c252971 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sat, 15 Nov 2014 20:01:27 +0100 Subject: Compile as C++ under MSVC --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/CMakeLists.txt') 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) -- cgit v1.2.3