added -Wno-unused-but-set-variable to debug build
authorPerttu Ahola <celeron55@gmail.com>
Wed, 1 Jun 2011 23:59:30 +0000 (02:59 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Wed, 1 Jun 2011 23:59:30 +0000 (02:59 +0300)
src/CMakeLists.txt

index f912f68cd2862c0569ab927bade352a36f14ead3..367b38818004f9d893258a76b636c58d8e37a9e5 100644 (file)
@@ -170,15 +170,13 @@ else()
        # Probably GCC
        
        if(WARN_ALL)
-               set(WARNING_FLAGS "-Wall")
+               set(RELEASE_WARNING_FLAGS "-Wall")
        else()
-               set(WARNING_FLAGS "")
+               set(RELEASE_WARNING_FLAGS "")
        endif()
 
-       set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-unused-but-set-variable")
-
-       set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${WARNING_FLAGS} -O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops")
-       set(CMAKE_CXX_FLAGS_DEBUG "-g -O1 -Wall")
+       set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} -Wno-unused-but-set-variable -O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops")
+       set(CMAKE_CXX_FLAGS_DEBUG "-g -O1 -Wall -Wno-unused-but-set-variable")
 
        if(USE_GPROF)
                set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg")