From 6904a5eda6c053d26e2b0d6687384c4ac7154010 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 9 Jan 2009 19:53:28 +0000 Subject: [PATCH] From Mattias Helsing, "Following reports by Alberto and Simon this submission reenables usage of cmake-2.6.0. As a side note I just installed cmake from the ubuntu repositories and got cmake-2.6.0-4ubuntu2 and this one produced the currect CMAKE_CXX_FLAGS_RELEASE (-O3 -DNDEBUG). This CMakeLists is tested on linux with cmake versions 2.4.8, 2.6.0, 2.6.2 and 2.6.0-4ubuntu2 * Added quotes around CMAKE_CXX_FLAGS var to help cmake-2.6.0 pick up that it really is a string value * Removed quotes around values that we set in OSG_AGGRESIVE_WARNING_FLAGS. This makes OSG_AGGRESIVE_WARING_FLAGS be of LIST type so the foreach constructs can behave as I planned." --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8eb7e5e7..941eda3eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -529,13 +529,13 @@ IF(CMAKE_COMPILER_IS_GNUCXX) # errors instead of warnings for certain issues, including superfluous # semicolons and commas, and the use of long long. -fpermissive seems # to be the workaround. - SET(OSG_AGGRESSIVE_WARNING_FLAGS "-Wall -Wparentheses -Wformat=2 -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive") + SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wformat=2 -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive) ELSE(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC) # FIXME: What are good aggressive warning flags for Visual Studio? # And do we need to further subcase this for different versions of VS? # CMake variables: MSVC60, MSVC70, MSVC71, MSVC80, CMAKE_COMPILER_2005 - SET(OSG_AGGRESSIVE_WARNING_FLAGS "/W4 /wd4706 /wd4127") + SET(OSG_AGGRESSIVE_WARNING_FLAGS /W4 /wd4706 /wd4127) ELSE(MSVC) @@ -561,7 +561,7 @@ IF(OSG_AGGRESSIVE_WARNING_FLAGS) ELSE(OSG_USE_AGGRESSIVE_WARNINGS) # Remove all flags considered aggresive FOREACH(flag ${OSG_AGGRESSIVE_WARNING_FLAGS}) - STRING(REGEX REPLACE "${flag}" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + STRING(REGEX REPLACE "${flag}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ENDFOREACH(flag) ENDIF(OSG_USE_AGGRESSIVE_WARNINGS) ENDIF(OSG_AGGRESSIVE_WARNING_FLAGS)