aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmake/compiler/msvc/settings.cmake15
2 files changed, 7 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45bb3bd58aa..21fa378fad0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@
project(TrinityCore)
# CMake policies (can not be handled elsewhere)
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.9)
cmake_policy(SET CMP0005 OLD)
# add this options before PROJECT keyword
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index e7fe89a750b..3194967c346 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -1,10 +1,10 @@
# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-set(MSVS_EXPECTED_VERSION 18.0)
+set(MSVC_EXPECTED_VERSION 18.0)
-if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS MSVS_EXPECTED_VERSION)
- message(FATAL_ERROR "MSVC: TrinityCore requires version ${MSVS_EXPECTED_VERSION} (MSVC 2013) to build but found ${CMAKE_CXX_COMPILER_VERSION}")
+if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS MSVC_EXPECTED_VERSION)
+ message(FATAL_ERROR "MSVC: TrinityCore requires version ${MSVC_EXPECTED_VERSION} (MSVC 2013) to build but found ${CMAKE_CXX_COMPILER_VERSION}")
endif()
# set up output paths ofr static libraries etc (commented out - shown here as an example only)
@@ -48,13 +48,10 @@ message(STATUS "MSVC: Disabled NON-SECURE warnings")
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
message(STATUS "MSVC: Disabled POSIX warnings")
-# disable warnings in Visual Studio 8 and above if not wanted
if(NOT WITH_WARNINGS)
- if(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
- message(STATUS "MSVC: Disabled generic compiletime warnings")
- endif()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
+ message(STATUS "MSVC: Disabled generic compiletime warnings")
endif()
# Specify the maximum PreCompiled Header memory allocation limit