summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-04-27 18:29:45 +0100
committerSadie Powell <sadie@witchery.services>2021-04-27 19:20:36 +0100
commitc21f6eb5a3e27bf9a661e3fd97f49c85f00f6615 (patch)
tree8f5c6cd9e5a6786c2b2cc33d3a008c091e32926d /src
parente2aeab970bcbd94ea3531b345d2ec4df111f0d60 (diff)
Rip out compatibility code for now-unsupported CMake versions.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt30
-rw-r--r--src/tools/CMakeLists.txt2
2 files changed, 16 insertions, 16 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b3d5e8705..46ca4f2fd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,30 +2,30 @@
file(GLOB SRC_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
if(WIN32)
- append_to_list(SRC_SRCS win32/dir/dir.cpp)
- append_to_list(SRC_SRCS win32/socket.cpp)
- append_to_list(SRC_SRCS win32/windows.cpp)
- append_to_list(SRC_SRCS win32/dl/dl.cpp)
- append_to_list(SRC_SRCS win32/pipe/pipe.cpp)
- append_to_list(SRC_SRCS win32/pthread/pthread.cpp)
- append_to_list(SRC_SRCS win32/sigaction/sigaction.cpp)
+ list(APPEND SRC_SRCS win32/dir/dir.cpp)
+ list(APPEND SRC_SRCS win32/socket.cpp)
+ list(APPEND SRC_SRCS win32/windows.cpp)
+ list(APPEND SRC_SRCS win32/dl/dl.cpp)
+ list(APPEND SRC_SRCS win32/pipe/pipe.cpp)
+ list(APPEND SRC_SRCS win32/pthread/pthread.cpp)
+ list(APPEND SRC_SRCS win32/sigaction/sigaction.cpp)
endif()
if(HAVE_EPOLL)
- append_to_list(SRC_SRCS socketengines/socketengine_epoll.cpp)
+ list(APPEND SRC_SRCS socketengines/socketengine_epoll.cpp)
else()
if(HAVE_KQUEUE)
- append_to_list(SRC_SRCS socketengines/socketengine_kqueue.cpp)
+ list(APPEND SRC_SRCS socketengines/socketengine_kqueue.cpp)
else()
if(HAVE_POLL)
- append_to_list(SRC_SRCS socketengines/socketengine_poll.cpp)
+ list(APPEND SRC_SRCS socketengines/socketengine_poll.cpp)
else()
- append_to_list(SRC_SRCS socketengines/socketengine_select.cpp)
+ list(APPEND SRC_SRCS socketengines/socketengine_select.cpp)
endif()
endif()
endif()
-sort_list(SRC_SRCS)
+list(SORT SRC_SRCS)
# 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(${SRC_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
@@ -40,12 +40,12 @@ foreach(SRC ${SRC_SRCS})
calculate_depends(${SRC} TEMP_INCLUDES)
# If there were some extra include directories, add them to the list
if(TEMP_INCLUDES)
- append_to_list(EXTRA_INCLUDES ${TEMP_INCLUDES})
+ list(APPEND EXTRA_INCLUDES ${TEMP_INCLUDES})
endif()
endforeach()
# If there were extra include directories, remove the duplicates and add the directories to the include path
if(EXTRA_INCLUDES)
- remove_list_duplicates(EXTRA_INCLUDES)
+ list(REMOVE_DUPLICATES EXTRA_INCLUDES)
include_directories(${EXTRA_INCLUDES})
endif()
@@ -54,7 +54,7 @@ if(WIN32)
# Make sure that the resource file is seen as an RC file to be compiled with a resource compiler, not a C++ compiler
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc LANGUAGE RC)
# Add the resource file to the list of sources
- append_to_list(SRC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc)
+ list(APPEND SRC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc)
# For MinGW, we have to change the compile flags
if(MINGW)
set(RC_CFLAGS "-DMINGW -Ocoff -I${Anope_SOURCE_DIR}/include")
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index b1c5916ca..2e22b575a 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -1,6 +1,6 @@
# Find all the *.cpp files within the current source directory, and sort the list
file(GLOB TOOLS_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
-sort_list(TOOLS_SRCS)
+list(SORT TOOLS_SRCS)
# Set all the files to use C++ as well as set their compile flags
set_source_files_properties(${TOOLS_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")