summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSimon Rettberg2018-07-26 17:15:55 +0200
committerSimon Rettberg2018-07-26 17:15:55 +0200
commitba0cd9ba655c6543d2f9c2a46a3ecf0b6da98f1d (patch)
tree292e84f0719b123c129a569acbaae995a9027654 /CMakeLists.txt
parentOnly apply LDAP filter logic if lecture has any filters... (diff)
downloadvmchooser2-ba0cd9ba655c6543d2f9c2a46a3ecf0b6da98f1d.tar.gz
vmchooser2-ba0cd9ba655c6543d2f9c2a46a3ecf0b6da98f1d.tar.xz
vmchooser2-ba0cd9ba655c6543d2f9c2a46a3ecf0b6da98f1d.zip
Cleanup code style (C++11, casts, etc)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 885ca52..c58fa4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,13 +3,15 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
# project name
project(vmchooser)
+SET(EXTRA_CXX_FLAGS "" CACHE STRING "Additional options to pass to C++ compiler")
+
set(CMAKE_BUILD_TYPE Debug)
-set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wextra -pedantic -Werror -Wno-multichar")
+SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wextra -Wpedantic -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wdisabled-optimization -Wfloat-equal -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winline -Winvalid-pch -Wlong-long -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wsign-compare -Wstack-protector -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wswitch-enum -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wno-multichar")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wno-multichar")
set(CMAKE_CXX_STANDARD 11)
# Some cmake versions can't understand the CMAKE_CXX_STANDARD option above?
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${EXTRA_CXX_FLAGS}" )
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)