Commit e6694e8d authored by Thomas Debesse's avatar Thomas Debesse

Merge branch 'werror' into 'master'

make -Werror and -pedantic-errors a cmake option named USE_WERROR

See merge request !106
parents 4cf52cd2 8640f932
......@@ -4,6 +4,7 @@ project(NetRadiant C CXX)
option(BUILD_RADIANT "Build the GUI" ON)
option(BUILD_CRUNCH "Build Crunch image support" OFF)
option(USE_WERROR "Build with -Werror -pedantic-errors" OFF)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install" CACHE PATH "..." FORCE)
......@@ -80,7 +81,7 @@ if (NOT WIN32)
addflags("-fvisibility=hidden")
endif ()
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if (USE_WERROR)
addflags("-Werror")
addflags("-pedantic-errors")
endif ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment