cmark

My personal build of CMark ✏️

Commit
af0c1731596a35c271a49987c8e477f80c252971
Parent
8c34fdc1b2d67ba440f5ad6cc5f81df4a3bcd937
Author
Nick Wellnhofer <wellnhofer@aevum.de>
Date

Compile as C++ under MSVC

Diffstat

1 file changed, 5 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified src/CMakeLists.txt 5 5 0
diff --git 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)