diff options
author | Sadie Powell <sadie@witchery.services> | 2022-01-13 01:36:45 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2022-01-13 01:42:38 +0000 |
commit | eaaabd8de0815d9782af43497e3f1bb912c99dec (patch) | |
tree | c785b9e70c59f17eb189290f40cb075514be33cc /src | |
parent | 40ce51a1a914210e094f5512482f6b6b668809cc (diff) |
Rip out calculate_depends().
This code is incredibly error prone and it just duplicates behaviour
that CMake already implements with depend.make files.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 19 | ||||
-rw-r--r-- | src/tools/CMakeLists.txt | 2 |
2 files changed, 0 insertions, 21 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c15c62dc..d722dd86c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,25 +26,6 @@ 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}") -# Create an empty list to store extra include directories -set(EXTRA_INCLUDES) -# Iterate through all the source files -foreach(SRC ${SRC_SRCS}) - # Temporary variable for the current source's include directories - set(TEMP_INCLUDES) - # Calculate the header file dependencies for the given source file - calculate_depends(${SRC} TEMP_INCLUDES) - # If there were some extra include directories, add them to the list - if(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) - list(REMOVE_DUPLICATES EXTRA_INCLUDES) - include_directories(${EXTRA_INCLUDES}) -endif() - # Under Windows, we also include a resource file to the build 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 diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 343778377..0ef39cafd 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -9,8 +9,6 @@ set_source_files_properties(${TOOLS_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS foreach(SRC ${TOOLS_SRCS}) # Convert the source file extension to have no extension string(REGEX REPLACE "\\.cpp$" "" EXE ${SRC}) - # Calculate the header file dependencies for the given source file - calculate_depends(${SRC}) # Only continue if this file isn't skipped if(NOT SKIP) # Generate the executable and set its linker flags, also set it to depend on the main Anope executable to be built beforehand |