From 39a12ab9cf0dcfdfd75a6899409e38f26affef4c Mon Sep 17 00:00:00 2001 From: k1ll Date: Thu, 27 Jun 2013 19:20:14 +0200 Subject: [PATCH] CXX Flags aren't definitions --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6948a3420..f2b1fcd4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -321,15 +321,15 @@ endif() # Compiler settings if (CMAKE_COMPILER_IS_GNUCC) - add_definitions (-Wall -Wextra -Wno-unused-parameter -Wno-reorder -std=c++98 -pedantic -Wno-long-long) + SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-reorder -std=c++98 -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}") # Silence warnings in OGRE headers. Remove once OGRE got fixed! - add_definitions (-Wno-ignored-qualifiers) + SET(CMAKE_CXX_FLAGS "-Wno-ignored-qualifiers ${CMAKE_CXX_FLAGS}") execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) if ("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6) - add_definitions (-Wno-unused-but-set-parameter) + SET(CMAKE_CXX_FLAGS "-Wno-unused-but-set-parameter ${CMAKE_CXX_FLAGS}") endif("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6) endif (CMAKE_COMPILER_IS_GNUCC)