From 151c92d08d96f1f6ca417223c7414ddbed522349 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Fri, 31 Oct 2014 00:02:38 +0900 Subject: [PATCH] Fixed https://github.com/msgpack/msgpack-c/issues/147 On VC9 (Visual Studio 2008) and VC10 (Visual Studio 2010), .c files are compiled as C++. Otherwise the files are compiled as C. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a13939d9..1f2f91d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,6 +217,10 @@ IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") ENDIF () ENDIF () +IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC90" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC10") + SET_SOURCE_FILES_PROPERTIES(${msgpack_SOURCES} PROPERTIES LANGUAGE CXX) +ENDIF() + IF (NOT DEFINED CMAKE_INSTALL_LIBDIR) SET(CMAKE_INSTALL_LIBDIR lib) ENDIF ()