From 045fa05b0dab68767eab607ac1d7d3e6e3dabebc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 2 Jun 2016 11:06:50 +0100 Subject: [PATCH] Restructed the control of OSG_AGGRESSIVE_WARNINGS_FLAGS to make it possible to edit them in ccmake/CMakeSetup. Changed the name of OSG_USE_AGGRESSIVE_WARNINGS to OSG_AGGRESSIVE_WARNINGS to make sure it sits alongside the OSG_AGGRESSIVE_WARNINGS_FLAGS within ccmake so that it's easier to see how the two variables are coupled. --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cfa9d2ba..d5246ea3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -939,6 +939,7 @@ SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} CACHE STRING "You may add additiona # This is unofficial so this may be removed or changed at anytime. SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE STRING "(EXPERIMENTAL) You may add additional search paths here. Use ; to separate multiple paths.") + # This is for an advanced option to give aggressive warnings # under different compilers. If yours is not implemented, this option # will not be made available. @@ -1006,16 +1007,17 @@ ENDIF() # This will only be made available if we set values for OSG_AGGRESSIVE_WARNING_FLAGS. IF(OSG_AGGRESSIVE_WARNING_FLAGS) + SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} CACHE STRING "Compiler flags to use when OSG_AGGRESSIVE_WARNINGS is enabled." FORCE) + IF (APPLE) SET(DEFAULT_USE_AGGRESSIVE_WARNINGS OFF) ELSE() SET(DEFAULT_USE_AGGRESSIVE_WARNINGS ON) ENDIF() - OPTION(OSG_USE_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ${DEFAULT_USE_AGGRESSIVE_WARNINGS}) - MARK_AS_ADVANCED(OSG_USE_AGGRESSIVE_WARNINGS) + OPTION(OSG_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ${DEFAULT_USE_AGGRESSIVE_WARNINGS}) - IF(OSG_USE_AGGRESSIVE_WARNINGS) + IF(OSG_AGGRESSIVE_WARNINGS) # Add flags defined by OSG_AGGRESSIVE_WARNING_FLAGS if they aren't already there FOREACH(flag ${OSG_AGGRESSIVE_WARNING_FLAGS}) IF(NOT CMAKE_CXX_FLAGS MATCHES "${flag}")