Skip to content

Commit

Permalink
[cmake] Drop AddFileDependencies and CMakeParseArguments (#120002)
Browse files Browse the repository at this point in the history
Theses modules are deprecated and have trivial implementations in modern
cmake.
  • Loading branch information
paperchalice authored Dec 17, 2024
1 parent 37e48e4 commit b07e7b7
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion clang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*")
message(STATUS "Host linker version: ${HOST_LINK_VERSION}")
endif()

include(CMakeParseArguments)
include(AddClang)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down
1 change: 0 additions & 1 deletion compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include(CMakeParseArguments)
include(CompilerRTUtils)

function(get_aix_libatomic_default_link_flags link_flags export_list)
Expand Down
1 change: 0 additions & 1 deletion compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include(CMakeParseArguments)
include(CompilerRTUtils)
include(BuiltinTests)

Expand Down
2 changes: 0 additions & 2 deletions flang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ if (FLANG_STANDALONE_BUILD)
set(USE_NO_MAYBE_UNINITIALIZED 1)
endif()

include(CMakeParseArguments)
include(AddLLVM)
include(HandleLLVMOptions)
include(VersionFromVCS)
Expand Down Expand Up @@ -445,7 +444,6 @@ if (APPLE)
endif()
endif()

include(CMakeParseArguments)
include(AddFlang)

if (FLANG_INCLUDE_TESTS)
Expand Down
1 change: 0 additions & 1 deletion libc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ endif()

option(LIBC_INCLUDE_DOCS "Build the libc documentation." ${LLVM_INCLUDE_DOCS})

include(CMakeParseArguments)
include(LLVMLibCCheckCpuFeatures)
include(CheckCompilerFeatures)
include(LLVMLibCRules)
Expand Down
3 changes: 0 additions & 3 deletions llvm/cmake/modules/LLVMProcessSources.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
include(AddFileDependencies)
include(CMakeParseArguments)

function(llvm_replace_compiler_option var old new)
# Replaces a compiler option or switch `old' in `var' by `new'.
# If `old' is not in `var', appends `new' to `var'.
Expand Down
4 changes: 3 additions & 1 deletion llvm/tools/llvm-config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ if(LLVM_ENABLE_MODULES)
endif()

# Add the dependency on the generation step.
add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH})
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp
APPEND PROPERTY OBJECT_DEPENDS ${BUILDVARIABLES_OBJPATH}
)

if(CMAKE_CROSSCOMPILING)
if (LLVM_NATIVE_TOOL_DIR AND NOT LLVM_CONFIG_PATH)
Expand Down
3 changes: 0 additions & 3 deletions polly/cmake/polly_macros.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

include(CMakeParseArguments)

macro(add_polly_library name)
cmake_parse_arguments(ARG "" "" "" ${ARGN})
set(srcs ${ARG_UNPARSED_ARGUMENTS})
Expand Down

0 comments on commit b07e7b7

Please sign in to comment.