Skip to content

Commit

Permalink
Minor CMake fixes.
Browse files Browse the repository at this point in the history
 - Only enable pedantic flags with MAINTAINER_MODE enabled
 - Hide APP_* vars.
  • Loading branch information
brndnmtthws committed Jan 1, 2010
1 parent 4d7d2b2 commit d92c2e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions cmake/ConkyBuildOptions.cmake
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion cmake/ConkyPlatformChecks.cmake
Expand Up @@ -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)

0 comments on commit d92c2e6

Please sign in to comment.