aboutsummaryrefslogtreecommitdiff
path: root/cmake/compiler/gcc
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-07-15 15:24:35 +0200
committerShauren <shauren.trinity@gmail.com>2025-04-13 19:05:21 +0200
commit8cbb263c14443e5b264679abe824f8b835043bb7 (patch)
tree166ac590a44079692297d7ada8364c5084f49708 /cmake/compiler/gcc
parent5269de59191f1adde28aaefbac2c8a81cdf27991 (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/gcc')
-rw-r--r--cmake/compiler/gcc/settings.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake
index e830d28b655..3806ffee984 100644
--- a/cmake/compiler/gcc/settings.cmake
+++ b/cmake/compiler/gcc/settings.cmake
@@ -6,6 +6,10 @@ else()
message(STATUS "GCC: Minimum version required is ${GCC_EXPECTED_VERSION}, found ${CMAKE_CXX_COMPILER_VERSION} - ok!")
endif()
+target_compile_options(trinity-compile-option-interface
+ INTERFACE
+ -fno-delete-null-pointer-checks)
+
if(PLATFORM EQUAL 32)
# Required on 32-bit systems to enable SSE2 (standard on x64)
target_compile_options(trinity-compile-option-interface
@@ -16,8 +20,8 @@ endif()
if(TRINITY_SYSTEM_PROCESSOR MATCHES "x86|amd64")
target_compile_definitions(trinity-compile-option-interface
INTERFACE
- -DHAVE_SSE2
- -D__SSE2__)
+ HAVE_SSE2
+ __SSE2__)
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
endif()