summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 623f36f3e..904220c06 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -2,7 +2,9 @@
file(GLOB CORE_SRCS_C RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
file(GLOB CORE_SRCS_CPP RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
set(CORE_SRCS ${CORE_SRCS_C} ${CORE_SRCS_CPP})
-list(SORT CORE_SRCS)
+if(CMAKE244_OR_BETTER)
+ list(SORT CORE_SRCS)
+endif(CMAKE244_OR_BETTER)
# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
set_source_files_properties(${CORE_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}")
@@ -15,7 +17,8 @@ foreach(SRC ${CORE_SRCS})
calculate_depends(${SRC})
# For Visual Studio only, include win32_memory.cpp to the list of sources, required to override Visual Studio's overrides of the new/delete operators
if(MSVC)
- list(APPEND SRC ${Anope_SOURCE_DIR}/src/win32_memory.cpp)
+ append_to_list(SRC ${Anope_SOURCE_DIR}/src/win32_memory.cpp)
+ set_source_files_properties(${Anope_SOURCE_DIR}/src/win32_memory.cpp LANGUAGE CXX COMPILE_FLAGS "${MODULE_CXXFLAGS}")
endif(MSVC)
# Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand
add_library(${SO} MODULE ${SRC})