diff options
author | Niklas Halle <niklas@niklashalle.net> | 2020-05-24 13:05:34 +0200 |
---|---|---|
committer | Niklas Halle <niklas@niklashalle.net> | 2020-05-24 13:05:34 +0200 |
commit | 8f33ab3bf8b7d5a256c1d996e572fa67a5578b4f (patch) | |
tree | 44c55b4679f8546f940df7191f191ed290c57f6f /CMakeLists.txt | |
parent | bed31a7634701b2c19ef8eef3ccb3039c03b1cda (diff) | |
parent | 7a9c301d10e001b92846b6b1e64136c10c4bb247 (diff) | |
download | betriebssysteme-8f33ab3bf8b7d5a256c1d996e572fa67a5578b4f.tar.gz betriebssysteme-8f33ab3bf8b7d5a256c1d996e572fa67a5578b4f.zip |
Merge remote-tracking branch 'origin/MOAR_CMAKE' into dev/niklas
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..41de2c8 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.0.0) +project(Betriebsysteme VERSION 0.1.0) + +include(CTest) +enable_testing() + +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/externals/sanitizers-cmake/cmake" ${CMAKE_MODULE_PATH}) + +set(CPACK_PROJECT_NAME ${PROJECT_NAME}) +set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) +include(CPack) + +add_subdirectory(02_exercise) + +set(CLANG_WARNINGS + -Wall + -Wextra # reasonable and standard + -Wshadow # warn the user if a variable declaration shadows one from a + # parent context + -Wcast-align # warn for potential performance problem casts + -Wunused # warn on anything being unused + -Wpedantic # warn if non-standard C++ is used + -Wconversion # warn on type conversions that may lose data + -Wsign-conversion # warn on sign conversions + -Wnull-dereference # warn if a null dereference is detected + -Wdouble-promotion # warn if float is implicit promoted to double + -Wformat=2 # warn on security issues around functions that format output + # (ie printf) + -Werror + ) +set(GCC_WARNINGS + ${CLANG_WARNINGS} + -Wmisleading-indentation # warn if indentation implies blocks where blocks + # do not exist + -Wduplicated-cond # warn if if / else chain has duplicated conditions + -Wduplicated-branches # warn if if / else branches have duplicated code + -Wlogical-op # warn about logical operations being used where bitwise were + # probably wanted + ) +set(PROJECT_WARNINGS ${GCC_WARNINGS}) |