added c++ warning flags
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@885 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
d665afe0b1
commit
55f37239b6
1 changed files with 9 additions and 6 deletions
|
|
@ -120,7 +120,7 @@ ENDFOREACH (path ${REQUIRED_PATHS})
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
||||||
# the user should choose the build type on windows environments,excepted under cygwin (default=none)
|
# the user should choose the build type on windows environments,excepted under cygwin (default=none)
|
||||||
SET(CMAKE_DEFAULT_BUILD_TYPE Debug CACHE STRING "Variable that stores the default CMake build type" FORCE)
|
SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE)
|
||||||
|
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
IF(WIN32 AND NOT CYGWIN)
|
||||||
IF(NOT CMAKE_BUILD_TYPE)
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
@ -129,13 +129,16 @@ IF(WIN32 AND NOT CYGWIN)
|
||||||
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
||||||
FORCE)
|
FORCE)
|
||||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||||
MESSAGE(STATUS "")
|
ELSE(WIN32 AND NOT CYGWIN)
|
||||||
MESSAGE(STATUS "Warning: The type of build is: ${CMAKE_BUILD_TYPE}.")
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
MESSAGE(STATUS "The available types are: None Debug Release RelWithDebInfo MinSizeRel.")
|
SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -Wno-import -Winit-self -Wmissing-include-dirs -Wunused-parameter -Wundef -Wshadow -Wunsafe-loop-optimizations -Wcast-align -Wconversion -Wsign-compare -Winline -Wdisabled-optimization")
|
||||||
MESSAGE(STATUS "You can choose it with: cmake <path-to-source> -D<build-type>")
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
MESSAGE(STATUS "")
|
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
ENDIF(WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
|
IF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
|
ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON)
|
||||||
|
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue