aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-09-13 20:49:25 +0000
committerZachary Turner <zturner@google.com>2017-09-13 20:49:25 +0000
commita768fcb2648b65efb3f3afc0581ac04cc4ce8d2d (patch)
tree0b14cf13299f6854062b95a0af721d9b74f4010e /cmake/modules
parent7f44c36d0722680aaaf12d6c9ebd714f4b6a4312 (diff)
downloadllvm-a768fcb2648b65efb3f3afc0581ac04cc4ce8d2d.tar.gz
Revert "Determine up front which projects are enabled."
This was intended to be a generic CMake solution to a problem shared across several projects. It turns out it doesn't interact very well certain CMake configurations, and furthermore the "problem" is actually not a problem, as the problematic code is never executed to begin with. So this really isn't solving anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/AddLLVM.cmake35
1 files changed, 2 insertions, 33 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index a23bb263038..66abb2486d9 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -687,7 +687,7 @@ macro(add_llvm_executable name)
# it forces Xcode to properly link the static library.
list(APPEND ALL_FILES "${LLVM_MAIN_SRC_DIR}/cmake/dummy.cpp")
endif()
-
+
if( EXCLUDE_FROM_ALL )
add_executable(${name} EXCLUDE_FROM_ALL ${ALL_FILES})
else()
@@ -920,37 +920,6 @@ function(canonicalize_tool_name name output)
set(${output} "${nameUPPER}" PARENT_SCOPE)
endfunction(canonicalize_tool_name)
-macro(find_llvm_enabled_projects base_dir)
- set(specific_project_list "${ARGN}")
- if("${specific_project_list}" STREQUAL "")
- file(GLOB entries "${base_dir}/*")
- set(list_of_project_dirs "")
- foreach(entry ${entries})
- if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt)
- get_filename_component(filename "${entry}" NAME)
- list(APPEND specific_project_list "${filename}")
- endif()
- endforeach(entry)
- endif()
-
- foreach(proj ${specific_project_list})
- canonicalize_tool_name(${proj} projUPPER)
-
- if (${LLVM_PROJECT_${projUPPER}_ENABLED})
- if (EXISTS "${base_dir}/${proj}")
- message(WARNING "Project ${projUPPER} in ${base_dir}/${proj} previously found in ${LLVM_PROJECT_${projUPPER}_SOURCE_DIR}")
- endif()
- continue()
- elseif(EXISTS "${LLVM_EXTERNAL_${projUPPER}_SOURCE_DIR}")
- set(LLVM_PROJECT_${projUPPER}_ENABLED ON)
- set(LLVM_PROJECT_${projUPPER}_SOURCE_DIR "${LLVM_EXTERNAL_${projUPPER}_SOURCE_DIR}")
- elseif(EXISTS "${base_dir}/${proj}")
- set(LLVM_PROJECT_${projUPPER}_ENABLED ON)
- set(LLVM_PROJECT_${projUPPER}_SOURCE_DIR "${base_dir}/${proj}")
- endif()
- endforeach()
-endmacro()
-
# Custom add_subdirectory wrapper
# Takes in a project name (i.e. LLVM), the subdirectory name, and an optional
# path if it differs from the name.
@@ -1381,7 +1350,7 @@ function(add_llvm_tool_symlink link_name target)
# magic. First we grab one of the types, and a type-specific path. Then from
# the type-specific path we find the last occurrence of the type in the path,
# and replace it with CMAKE_CFG_INTDIR. This allows the build step to be type
- # agnostic again.
+ # agnostic again.
if(NOT ARG_OUTPUT_DIR)
# If you're not overriding the OUTPUT_DIR, we can make the link relative in
# the same directory.