fix(Core/Cmake): Rename VER_* macros to AC_* and centralize build dir… (#24717)
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -16,11 +16,6 @@ if ((USE_COREPCH OR USE_SCRIPTPCH) AND (CMAKE_C_COMPILER_LAUNCHER STREQUAL "ccac
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fno-pch-timestamp")
|
||||
endif()
|
||||
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
|
||||
set(CLANG_EXPECTED_VERSION 10.0.0)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_EXPECTED_VERSION)
|
||||
|
||||
@@ -10,11 +10,6 @@
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
|
||||
set(GCC_EXPECTED_VERSION 8.0.0)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
|
||||
|
||||
@@ -10,11 +10,6 @@
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
|
||||
if(PLATFORM EQUAL 32)
|
||||
target_compile_options(acore-compile-option-interface
|
||||
INTERFACE
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
# 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 build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
|
||||
if(PLATFORM EQUAL 32)
|
||||
# Required on 32-bit systems to enable SSE2 (standard on x64)
|
||||
target_compile_options(acore-compile-option-interface
|
||||
|
||||
@@ -59,19 +59,6 @@ else()
|
||||
message(STATUS "MSVC: Enabled SSE2 support")
|
||||
endif()
|
||||
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
# msbuild/devenv don't set CMAKE_MAKE_PROGRAM, you can choose build type from a dropdown after generating projects
|
||||
if("${CMAKE_MAKE_PROGRAM}" MATCHES "MSBuild")
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="$(ConfigurationName)")
|
||||
else()
|
||||
# while all make-like generators do (nmake, ninja)
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
# multithreaded compiling on VS
|
||||
target_compile_options(acore-compile-option-interface
|
||||
INTERFACE
|
||||
|
||||
@@ -20,6 +20,12 @@ set(CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
message(STATUS "Enabled С++20 standard")
|
||||
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
AC_BUILD_TYPE="$<CONFIG>"
|
||||
AC_BUILD_HAS_DEBUG_INFO=$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>)
|
||||
|
||||
# An interface library to make the warnings level available to other targets
|
||||
# This interface taget is set-up through the platform specific script
|
||||
add_library(acore-warning-interface INTERFACE)
|
||||
|
||||
@@ -51,8 +51,4 @@ elseif(CMAKE_C_COMPILER MATCHES "icc")
|
||||
include(${CMAKE_SOURCE_DIR}/src/cmake/compiler/icc/settings.cmake)
|
||||
elseif(CMAKE_C_COMPILER MATCHES "clang" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
include(${CMAKE_SOURCE_DIR}/src/cmake/compiler/clang/settings.cmake)
|
||||
else()
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#define _SOURCE_DIRECTORY R"(@CMAKE_SOURCE_DIR@)"
|
||||
#define _BUILD_DIRECTORY R"(@BUILDDIR@)"
|
||||
#define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)"
|
||||
#define VER_COMPANYNAME_STR "AzerothCore"
|
||||
#define VER_LEGALCOPYRIGHT_STR "(c)2016-@rev_year@ AzerothCore"
|
||||
#define VER_FILEVERSION 0,0,0
|
||||
#define VER_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)"
|
||||
#define VER_PRODUCTVERSION VER_FILEVERSION
|
||||
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR
|
||||
#define AC_COMPANYNAME_STR "AzerothCore"
|
||||
#define AC_LEGALCOPYRIGHT_STR "(c)2016-@rev_year@ AzerothCore"
|
||||
#define AC_FILEVERSION 0,0,0
|
||||
#define AC_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)"
|
||||
#define AC_PRODUCTVERSION AC_FILEVERSION
|
||||
#define AC_PRODUCTVERSION_STR AC_FILEVERSION_STR
|
||||
#endif // __REVISION_H__
|
||||
|
||||
Reference in New Issue
Block a user