ENDFOREACH(GGO_FILE)
SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}} PROPERTIES GENERATED TRUE)
IF(CMAKE_COMPILER_IS_GNUCXX)
- SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
+ FIND_PROGRAM(DEFAULT_GCC gcc)
+ EXEC_PROGRAM(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
+ IF("${GCCVER}" VERSION_GREATER "4.5.2")
+ SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
+ ENDIF("${GCCVER}" VERSION_GREATER "4.5.2")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ENDMACRO (WRAP_GGO)