fix cpp cmake for emscripten

Emscripten can do C++11. added it to the compilercheck in CMakeLists
This commit is contained in:
Markus Zancolò 2019-01-16 13:29:57 +01:00
parent 07735085bd
commit 4fec5f9f7c
2 changed files with 4 additions and 1 deletions

View File

@ -212,3 +212,4 @@ YYYY/MM/DD, github id, Full name, email
2018/11/29, hannemann-tamas, Ralf Hannemann-Tamas, ralf.ht@gmail.com
2018/12/20, WalterCouto, Walter Couto, WalterCouto@users.noreply.github.com
2018/12/23, youkaichao, Kaichao You, youkaichao@gmail.com
2019/01/16, kuegi, Markus Zancolo, markus.zancolo@roomle.com

View File

@ -122,7 +122,9 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND ( CMAKE_SYSTEM_NAME MATCH
endif()
elseif(MSVC_VERSION GREATER 1800 OR MSVC_VERSION EQUAL 1800)
# Visual Studio 2012+ supports c++11 features
else ()
elseif(CMAKE_SYSTEM_NAME MATCHES "Emscripten")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
else()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif()