Buildsystem: Changed required CMake version to 2.8.9 and removed a check for version we no longer support in msvc settings

This commit is contained in:
Shauren
2014-03-25 16:40:22 +01:00
parent ce93838153
commit f357597ec1
2 changed files with 7 additions and 10 deletions

View File

@@ -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

View File

@@ -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