Skip to content
This repository has been archived by the owner on Jun 7, 2018. It is now read-only.

Commit

Permalink
Enable -Werror only is release build (which is now the default build)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopho committed Apr 6, 2012
1 parent 20dc1e8 commit a02f03f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,14 @@ target_link_libraries(solarus
${MODPLUG_LIBRARY}
)

# compilation flags
set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")
# default compilation flags
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-Werror ${CMAKE_CXX_FLAGS_DEBUG}")

# compilation flags for Mac OS X (Intel) deployment
if(CMAKE_BUILD_TYPE MATCHES "Release")
Expand Down

0 comments on commit a02f03f

Please sign in to comment.