grame-cncm / libmusicxml

A C/C++ library to support the MusicXML format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add -std=c++11 on generating MinGW Makefiles

school510587 opened this issue · comments

The current dev branch fails to compile using MinGW g++ 4.9 series. Specifically, I compiled it using MinGW g++ 4.9.4.
After adding the following lines into CMakeLists.txt, it will work:

@@ -54,6 +54,8 @@ elseif(WIN32)
         add_definitions(-DVC6)
     elseif(${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005")
         add_definitions(-DVC2005)
+    elseif(${CMAKE_GENERATOR} STREQUAL "MinGW Makefiles")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
     endif(${CMAKE_GENERATOR} STREQUAL "Visual Studio 6")

Could you help add them? Thanks.

covered by cmake config