From e0e5753e7d78307ca7d5fff6c1b350064c7ab555 Mon Sep 17 00:00:00 2001 From: andy5995 Date: Tue, 15 May 2018 10:30:04 -0500 Subject: [PATCH] CMakeLists.txt:add gnu option Just wondering what would happen if I manually enabled gnu+11 extensions (related: https://github.com/ZetaGlest/zetaglest-source/commit/069f36ee1f38ddcbc9c294952c6f56a77ede30a9) --- .travis.yml | 8 ++++++++ CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dbe6589d0..17ecef37f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,14 @@ matrix: env: Tr_Compiler_Version="7" # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test dist: trusty # broken compiler on 12.04 + - os: linux + compiler: gcc + addons: + apt: + packages: + - libsdl2-dev + env: Tr_Compiler_Version="default" + dist: trusty - os: linux compiler: clang addons: diff --git a/CMakeLists.txt b/CMakeLists.txt index b5eb12535..f22bba1fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW) # GCC specific Compiler Options ELSE() - ADD_DEFINITIONS("-frounding-math -fsignaling-nans") + ADD_DEFINITIONS("-std=gnu++11 -frounding-math -fsignaling-nans") # IF(NOT MINGW) # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic")