diff options
author | tycho <tycho@hanoverdesktop> | 2013-12-19 16:29:23 +0100 |
---|---|---|
committer | tycho <tycho@hanoverdesktop> | 2013-12-19 16:29:23 +0100 |
commit | 0c027927c4131717a5fd144d96846511dea73e9e (patch) | |
tree | 6679b8f04f63d41ebb5adc4395e7c6ec2ed40f1f | |
parent | fixed a number of windows issues (diff) | |
download | cuberite-0c027927c4131717a5fd144d96846511dea73e9e.tar cuberite-0c027927c4131717a5fd144d96846511dea73e9e.tar.gz cuberite-0c027927c4131717a5fd144d96846511dea73e9e.tar.bz2 cuberite-0c027927c4131717a5fd144d96846511dea73e9e.tar.lz cuberite-0c027927c4131717a5fd144d96846511dea73e9e.tar.xz cuberite-0c027927c4131717a5fd144d96846511dea73e9e.tar.zst cuberite-0c027927c4131717a5fd144d96846511dea73e9e.zip |
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f8c40b973..77ee23cc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,14 @@ cmake_minimum_required (VERSION 2.6) project (MCServer) set(CMAKE_CXX_FLAGS_BAK ${CMAKE_CXX_FLAGS}) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") set(CMAKE_C_FLAGS_BAK ${CMAKE_C_FLAGS}) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w") +if (UNIX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w") +else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w") +endif() set(CMAKE_BUILD_TYPE_BAK ${CMAKE_BUILD_TYPE}) set(CMAKE_BUILD_TYPE "Release") @@ -21,8 +26,13 @@ add_subdirectory(lib/luaexpat/) add_subdirectory(lib/md5/) #TODo: set -Wall -Werror -Wextra -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK}") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BAK}") +if(UNIX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK} -Wall -Wextra") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BAK} -Wall -Wextra") +else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK} /Wall") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BAK} /Wall") +endif() set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE_BAK}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic") |