Commit 49c3a3379a88922364dafaad9062960a9ef4caee

Ralf Habacker 2020-11-03T14:43:41

cmake: Keep warning in sync with Makefile based build system

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec52939..2202c93 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,12 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 
+if (MSVC)
+    add_compile_options(/W4)
+else()
+    add_compile_options(-Wall)
+endif()
+
 add_subdirectory(src)
 
 if (BUILD_TESTS)