summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-02 18:21:11 +0100
committerMattes D <github@xoft.cz>2014-01-02 18:21:11 +0100
commit968274051969f1628bd9cb79d3e3210fbe3037ed (patch)
tree8cb6a940396ef5ed58e5aac4b5819843b1c1b500
parentMerge pull request #479 from mc-server/cmake-win (diff)
parentfixed compiler warnings not being enabled in clang (diff)
downloadcuberite-968274051969f1628bd9cb79d3e3210fbe3037ed.tar
cuberite-968274051969f1628bd9cb79d3e3210fbe3037ed.tar.gz
cuberite-968274051969f1628bd9cb79d3e3210fbe3037ed.tar.bz2
cuberite-968274051969f1628bd9cb79d3e3210fbe3037ed.tar.lz
cuberite-968274051969f1628bd9cb79d3e3210fbe3037ed.tar.xz
cuberite-968274051969f1628bd9cb79d3e3210fbe3037ed.tar.zst
cuberite-968274051969f1628bd9cb79d3e3210fbe3037ed.zip
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67f70142b..451854074 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,11 +112,15 @@ add_subdirectory(lib/expat/)
add_subdirectory(lib/luaexpat/)
add_subdirectory(lib/md5/)
-# Re-add the maximum warning level:
+# Remove disabling the maximum warning level:
+# clang does not like a command line that reads -Wall -Wextra -w -Wall -Wextra and does not output any warnings
# We do not do that for MSVC since MSVC produces an awful lot of warnings for its own STL headers;
# the important warnings will be turned on using #pragma in Globals.h
if (NOT MSVC)
- add_flags("-Wall -Wextra")
+ string(REPLACE "-w" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+ string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
+ string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
+ string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
endif()
add_subdirectory (src)