Minor CMake fixes.
- Only enable pedantic flags with MAINTAINER_MODE enabled - Hide APP_* vars.
This commit is contained in:
@@ -16,9 +16,11 @@ endif(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_C_FLAGS "-std=c99" CACHE STRING "Flags used by the C compiler during all build types." FORCE)
|
||||
set(CMAKE_CXX_FLAGS "-std=c++0x" CACHE STRING "Flags used by the C++ compiler during all build types." FORCE)
|
||||
|
||||
# some extra debug flags
|
||||
set(CMAKE_C_FLAGS_DEBUG "-ggdb -Wall -W -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -pedantic -Werror" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -Wall -W -Wextra -Wunused -pedantic -Werror" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
|
||||
if(MAINTAINER_MODE)
|
||||
# some extra debug flags when in 'maintainer mode'
|
||||
set(CMAKE_C_FLAGS_DEBUG "-ggdb -Wall -W -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -pedantic -Werror" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -Wall -W -Wextra -Wunused -pedantic -Werror" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
|
||||
endif(MAINTAINER_MODE)
|
||||
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
|
@@ -301,6 +301,6 @@ if(MAINTAINER_MODE)
|
||||
if(NOT APP_SED)
|
||||
message(FATAL_ERROR "Unable to find program 'sed'")
|
||||
endif(NOT APP_SED)
|
||||
mark_as_advanced(APP_DB2X_XSLTPROC APP_DB2X_MANXML APP_XSLTPROC APP_MAN)
|
||||
mark_as_advanced(APP_DB2X_XSLTPROC APP_DB2X_MANXML APP_XSLTPROC APP_MAN APP_SED APP_LESS)
|
||||
endif(MAINTAINER_MODE)
|
||||
|
||||
|
Reference in New Issue
Block a user