Skip to content

Commit 8ae756a

Browse files
authored
Merge pull request #2472 from Roomle/fix/CppEmscripten
fix cpp cmake for emscripten
2 parents 8be6080 + 1565143 commit 8ae756a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contributors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ YYYY/MM/DD, github id, Full name, email
214214
2018/11/29, hannemann-tamas, Ralf Hannemann-Tamas, [email protected]
215215
2018/12/20, WalterCouto, Walter Couto, [email protected]
216216
2018/12/23, youkaichao, Kaichao You, [email protected]
217+
2019/01/16, kuegi, Markus Zancolo, [email protected]
217218
2019/02/06, ralucado, Cristina Raluca Vijulie, ralucris.v[at]gmail[dot]com
218219
2019/02/23, gedimitr, Gerasimos Dimitriadis, [email protected]
219220
2019/03/13, base698, Justin Thomas, [email protected]

runtime/Cpp/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND ( CMAKE_SYSTEM_NAME MATCH
122122
endif()
123123
elseif(MSVC_VERSION GREATER 1800 OR MSVC_VERSION EQUAL 1800)
124124
# Visual Studio 2012+ supports c++11 features
125-
else ()
125+
elseif(CMAKE_SYSTEM_NAME MATCHES "Emscripten")
126+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
127+
else()
126128
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
127129
endif()
128130

0 commit comments

Comments
 (0)