Pass proper C++11 build flags to native optimizer CMake script.
This commit is contained in:
Родитель
768db6652e
Коммит
38c15f09fe
|
@ -5,6 +5,16 @@ project(asmjs_optimizer)
|
|||
file(GLOB sourceFiles *.cpp)
|
||||
file(GLOB headerFiles *.h)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_C_COMPILER MATCHES ".*(gcc|clang|emcc).*" OR CMAKE_C_COMPILER_ID MATCHES ".*(GCC|Clang|emcc).*")
|
||||
set(IS_GCC_LIKE TRUE)
|
||||
else()
|
||||
set(IS_GCC_LIKE FALSE)
|
||||
endif()
|
||||
|
||||
if (IS_GCC_LIKE)
|
||||
set(cFlags "-std=c++11 -fno-exceptions -fno-rtti")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${cFlags}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${cFlags}")
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче