mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 18:29:48 +02:00
cmake:add c++11 flag (#262)
* cmake:add c++11 flag to prevent errors such as this: https://travis-ci.org/ZetaGlest/zetaglest-source/builds/436849785
This commit is contained in:
@@ -5,6 +5,10 @@ OPTION(FORCE_EMBEDDED_LIBS "Force use of embedded libraries' code." OFF)
|
|||||||
|
|
||||||
add_definitions("-DDATADIR=${INSTALL_DIR_DATA}")
|
add_definitions("-DDATADIR=${INSTALL_DIR_DATA}")
|
||||||
|
|
||||||
|
# On Travis, the build fails on osx and Ubuntu trusty using
|
||||||
|
# clang 5.0 unless the -std=c++11 if used
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
|
||||||
if(WANT_USE_STREFLOP)
|
if(WANT_USE_STREFLOP)
|
||||||
# IMPORTANT: should come BEFORE finding packages
|
# IMPORTANT: should come BEFORE finding packages
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
@@ -7,10 +7,9 @@ SET(TARGET_NAME "zetaglest_tests")
|
|||||||
IF(BUILD_ZETAGLEST_TESTS)
|
IF(BUILD_ZETAGLEST_TESTS)
|
||||||
MESSAGE(STATUS "Build ${TARGET_NAME} = YES")
|
MESSAGE(STATUS "Build ${TARGET_NAME} = YES")
|
||||||
|
|
||||||
# The tests fail on Travis with clang on osx because of the use of "bind"
|
# On Travis, the build fails on osx and Ubuntu trusty using
|
||||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
# clang 5.0 unless the -std=c++11 if used
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
endif()
|
|
||||||
|
|
||||||
INCLUDE (CheckIncludeFiles)
|
INCLUDE (CheckIncludeFiles)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user