CMakeLists.txt:narrow scope of -std=gnu++11

Make sure this passes Travis CI test before merging.

This is to get rid of warnings such as the following:

[ 31%] Building C object
source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpServer.c.o
[ 31%] Building C object
source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpSession.c.o
cc1: warning: command line option '-std=gnu++11' is valid for C++/ObjC++
but not for C
cc1: warning: command line option '-std=gnu++11' is valid for C++/ObjC++
but not for C
[ 31%] Building C object
source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpTargetPosix.c.o
cc1: warning: command line option '-std=gnu++11' is valid for C++/ObjC++
but not for C
This commit is contained in:
andy5995
2018-06-16 23:54:26 -05:00
committed by Andy Alt
parent b4b13ec918
commit af333f8839
2 changed files with 2 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
# GCC specific Compiler Options
ELSE()
ADD_DEFINITIONS("-std=gnu++11 -frounding-math -fsignaling-nans")
ADD_DEFINITIONS("-frounding-math -fsignaling-nans")
# IF(NOT MINGW)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic")

View File

@@ -8,7 +8,7 @@ SET(TARGET_NAME_MANPAGE "${TARGET_NAME}.6")
IF(BUILD_ZETAGLEST)
MESSAGE(STATUS "Will try to build ZetaGlest game")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++11")
IF(WIN32)
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH}