diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-06-15 13:34:44 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-06-20 01:20:31 +0200 |
commit | b7c0028bf5672aec2dad6146c986e4efb48fddb3 (patch) | |
tree | 5fe8d17888d262da94d81ee5b409600a56116463 /cmake/compiler | |
parent | 6d0a9fc0a6b23a14505a9ee832ae4c590bd076f9 (diff) |
Build: Unify setting _BUILD_DIRECTIVE preprocessor macro for all compilers
(cherry picked from commit 078bc6fe3fc764eaa2d528a19fe6d40972ee3537)
Diffstat (limited to 'cmake/compiler')
-rw-r--r-- | cmake/compiler/clang/settings.cmake | 5 | ||||
-rw-r--r-- | cmake/compiler/gcc/settings.cmake | 5 | ||||
-rw-r--r-- | cmake/compiler/msvc/settings.cmake | 10 |
3 files changed, 0 insertions, 20 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake index 0fa27e6493c..1ff7fcb2422 100644 --- a/cmake/compiler/clang/settings.cmake +++ b/cmake/compiler/clang/settings.cmake @@ -1,10 +1,5 @@ include(CheckCXXSourceCompiles) -# Set build-directive (used in core to tell which buildtype we used) -target_compile_definitions(trinity-compile-option-interface - INTERFACE - -D_BUILD_DIRECTIVE="$<CONFIG>") - set(CLANG_EXPECTED_VERSION 11.0.0) if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") # apple doesnt like to do the sane thing which would be to use the same version numbering as regular clang diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index 99417c1fbf9..e830d28b655 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -1,8 +1,3 @@ -# Set build-directive (used in core to tell which buildtype we used) -target_compile_definitions(trinity-compile-option-interface - INTERFACE - -D_BUILD_DIRECTIVE="$<CONFIG>") - set(GCC_EXPECTED_VERSION 11.1.0) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION) diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake index 2611cdc65e1..4858aa242e6 100644 --- a/cmake/compiler/msvc/settings.cmake +++ b/cmake/compiler/msvc/settings.cmake @@ -59,23 +59,13 @@ else() message(STATUS "MSVC: Disabled Safe Exception Handlers for debug builds") 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(trinity-compile-option-interface - INTERFACE - -D_BUILD_DIRECTIVE="$(ConfigurationName)") - # multithreaded compiling on VS target_compile_options(trinity-compile-option-interface INTERFACE /MP) else() - # while all make-like generators do (nmake, ninja) - target_compile_definitions(trinity-compile-option-interface - INTERFACE - -D_BUILD_DIRECTIVE="$<CONFIG>") - # Forces writes to the PDB file to be serialized through mspdbsrv.exe (/FS) # Enable faster PDB generation in parallel builds by minimizing RPC calls to mspdbsrv.exe (/Zf) target_compile_options(trinity-compile-option-interface |