diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-07-15 15:24:35 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-04-13 19:05:21 +0200 |
commit | 8cbb263c14443e5b264679abe824f8b835043bb7 (patch) | |
tree | 166ac590a44079692297d7ada8364c5084f49708 /cmake/compiler/msvc/settings.cmake | |
parent | 5269de59191f1adde28aaefbac2c8a81cdf27991 (diff) |
Build: CMake cleanup
* Migrate all add_definitions to target_compile_definitions
* Remove -D from preprocessor definitions added by target_compile_definitions (unneccessary, cmake strips it anyway)
* Fixed NO_BUFFERPOOL not being set on g3d if jemalloc is used
* Moved library/compiler specific compile flag settings spread all over various CMakeLists to their related library/compiler file
* Remove ancient manual link flag settings for worldserver
(cherry picked from commit 77fe2745febab9e4362b09750093d831325e6091)
Diffstat (limited to 'cmake/compiler/msvc/settings.cmake')
-rw-r--r-- | cmake/compiler/msvc/settings.cmake | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake index 03ab0ab9514..0dfab0255ea 100644 --- a/cmake/compiler/msvc/settings.cmake +++ b/cmake/compiler/msvc/settings.cmake @@ -34,7 +34,7 @@ if(PLATFORM EQUAL 64) # debugger functionality. target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_WIN64) + _WIN64) message(STATUS "MSVC: 64-bit platform, enforced -D_WIN64 parameter") @@ -88,24 +88,24 @@ endif() # Define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES - eliminates the warning by changing the strcpy call to strcpy_s, which prevents buffer overruns target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES) + _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES) message(STATUS "MSVC: Overloaded standard names") # Ignore warnings about older, less secure functions target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_CRT_SECURE_NO_WARNINGS) + _CRT_SECURE_NO_WARNINGS) message(STATUS "MSVC: Disabled NON-SECURE warnings") # Ignore warnings about POSIX deprecation target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_CRT_NONSTDC_NO_WARNINGS) + _CRT_NONSTDC_NO_WARNINGS) # Force math constants like M_PI to be available target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_USE_MATH_DEFINES) + _USE_MATH_DEFINES) message(STATUS "MSVC: Disabled POSIX warnings") @@ -157,8 +157,8 @@ target_compile_options(trinity-compile-option-interface if(ASAN) target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_DISABLE_STRING_ANNOTATION - -D_DISABLE_VECTOR_ANNOTATION) + _DISABLE_STRING_ANNOTATION + _DISABLE_VECTOR_ANNOTATION) target_compile_options(trinity-compile-option-interface INTERFACE |