diff options
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 09cb023..a1f582a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,14 @@ set(CMAKE_CXX_STANDARD 14) OPTION(LIBNITROKEY_STATIC "Build libnitrokey statically" TRUE) +OPTION(ERROR_ON_WARNING "Stop compilation on warning found (not supported for MSVC)" ON) +if (NOT MSVC) + add_compile_options(-Wall -Wno-unused-function -Wcast-qual -Woverloaded-virtual) + if (ERROR_ON_WARNING) + add_compile_options(-Werror) + endif() +endif() + OPTION(COMPILE_TESTS "Compile tests" FALSE) IF (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo) @@ -122,6 +130,8 @@ IF (COMPILE_TESTS) ENDIF() + + #SET(CPACK_GENERATOR # "DEB;RPM") # build a CPack driven installer package |