[llvm-commits] [llvm] r73979 - in /llvm/trunk: CMakeLists.txt cmake/modules/AddLLVM.cmake cmake/modules/LLVMConfig.cmake tools/CMakeLists.txt
Douglas Gregor
dgregor at apple.com
Tue Jun 23 11:30:17 PDT 2009
Author: dgregor
Date: Tue Jun 23 13:30:17 2009
New Revision: 73979
URL: http://llvm.org/viewvc/llvm-project?rev=73979&view=rev
Log:
CMake: remove support for llvm-config-generated dependencies in the build
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/modules/AddLLVM.cmake
llvm/trunk/cmake/modules/LLVMConfig.cmake
llvm/trunk/tools/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=73979&r1=73978&r2=73979&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Tue Jun 23 13:30:17 2009
@@ -100,24 +100,6 @@
set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm)
-# The USE_EXPLICIT_DEPENDENCIES variable will be TRUE to indicate that
-# we should use the library dependencies explicitly specified in the
-# CMakeLists.txt files rather than those determined by
-# llvm-config. This value must be true for non-make and IDE
-# generators.
-if (MSVC_IDE)
- set(DEFAULT_USE_EXPLICIT_DEPENDENCIES ON)
-elseif (XCODE)
- set(DEFAULT_USE_EXPLICIT_DEPENDENCIES ON)
-else ()
- set(DEFAULT_USE_EXPLICIT_DEPENDENCIES OFF)
-endif ()
-
-option(USE_EXPLICIT_DEPENDENCIES
- "Use explicit dependencies instead of llvm-config"
- ${DEFAULT_USE_EXPLICIT_DEPENDENCIES})
-mark_as_advanced(USE_EXPLICIT_DEPENDENCIES)
-
# Add path for custom modules
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=73979&r1=73978&r2=73979&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Tue Jun 23 13:30:17 2009
@@ -26,11 +26,7 @@
if( LLVM_LINK_COMPONENTS )
llvm_config(${name} ${LLVM_LINK_COMPONENTS})
endif( LLVM_LINK_COMPONENTS )
- if( USE_EXPLICIT_DEPENDENCIES )
- target_link_libraries(${name} ${llvm_libs})
- else( )
- add_dependencies(${name} llvm-config.target)
- endif( )
+ target_link_libraries(${name} ${llvm_libs})
get_system_libs(llvm_system_libs)
if( llvm_system_libs )
target_link_libraries(${name} ${llvm_system_libs})
Modified: llvm/trunk/cmake/modules/LLVMConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake?rev=73979&r1=73978&r2=73979&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMConfig.cmake (original)
+++ llvm/trunk/cmake/modules/LLVMConfig.cmake Tue Jun 23 13:30:17 2009
@@ -20,12 +20,7 @@
macro(llvm_config executable)
- # extra args is the list of link components.
- if( USE_EXPLICIT_DEPENDENCIES )
- explicit_llvm_config(${executable} ${ARGN})
- else( )
- nix_llvm_config(${executable} ${ARGN})
- endif( )
+ explicit_llvm_config(${executable} ${ARGN})
endmacro(llvm_config)
@@ -127,44 +122,7 @@
set(${out_libs} ${result} PARENT_SCOPE)
endfunction(explicit_map_components_to_libraries)
-
-macro(nix_llvm_config executable)
- set(lc "")
- foreach(c ${ARGN})
- set(lc "${lc} ${c}")
- endforeach(c)
- if( NOT HAVE_LLVM_CONFIG )
- target_link_libraries(${executable}
- "`${LLVM_TOOLS_BINARY_DIR}/llvm-config --libs ${lc}`")
- else( NOT HAVE_LLVM_CONFIG )
- # tbi: Error handling.
- if( NOT PERL_EXECUTABLE )
- message(FATAL_ERROR "Perl required but not found!")
- endif( NOT PERL_EXECUTABLE )
- execute_process(
- COMMAND sh -c "${PERL_EXECUTABLE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/llvm-config --libs ${lc}"
- RESULT_VARIABLE rv
- OUTPUT_VARIABLE libs
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(NOT rv EQUAL 0)
- message(FATAL_ERROR "llvm-config failed for executable ${executable}")
- endif(NOT rv EQUAL 0)
- string(REPLACE " " ";" libs ${libs})
- foreach(c ${libs})
- if(c MATCHES ".*\\.o")
- get_filename_component(fn ${c} NAME)
- target_link_libraries(${executable}
- ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${fn})
- else(c MATCHES ".*\\.o")
- string(REPLACE "-l" "" fn ${c})
- target_link_libraries(${executable} ${fn})
- endif(c MATCHES ".*\\.o")
- endforeach(c)
- endif( NOT HAVE_LLVM_CONFIG )
-endmacro(nix_llvm_config)
-
-
-# This data is used on MSVC for stablishing executable/library
+# This data is used to establish executable/library
# dependencies. Comes from the llvm-config script, which is built and
# installed on the bin directory for MinGW or Linux. At the end of the
# script, you'll see lines like this:
Modified: llvm/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=73979&r1=73978&r2=73979&view=diff
==============================================================================
--- llvm/trunk/tools/CMakeLists.txt (original)
+++ llvm/trunk/tools/CMakeLists.txt Tue Jun 23 13:30:17 2009
@@ -2,7 +2,9 @@
# large and three small executables. This is done to minimize memory load
# in parallel builds. Please retain this ordering.
-if (NOT USE_EXPLICIT_DEPENDENCIES)
+# FIXME: We don't yet have the ability to build llvm-config with CMake
+# based on explicit dependencies.
+if (FALSE)
add_subdirectory(llvm-config)
endif()
More information about the llvm-commits
mailing list