diff options
author | Nao Pross <naopross@thearcway.org> | 2018-02-17 21:54:04 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-02-17 21:54:04 +0100 |
commit | cc89487125e23bccebd63e4077e63b57b6a70bbc (patch) | |
tree | 69638021daca72d8baf386f9a9a756d3e896c00c | |
parent | Merge makefile (diff) | |
download | Subconscious-old-cc89487125e23bccebd63e4077e63b57b6a70bbc.tar.gz Subconscious-old-cc89487125e23bccebd63e4077e63b57b6a70bbc.zip |
Add all warning and thread them as errors
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 91774af..98b9ba1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,15 @@ file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "src/main/cpp/*.cpp") set(EXECUTABLE_NAME "subconscious") add_executable(${EXECUTABLE_NAME} ${SOURCES}) +# compiler settings +if (CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror") +endif () + +if (MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") +endif () + # SFML library set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH}) find_package(SFML 2 REQUIRED network audio graphics window system) |