forked from OSchip/llvm-project
[CMake] Fix subtle CMake bug
CMake specifies that the DEPENDS field of add_custom_target is for files and output of add_custom_command. In order to add a target dependency, add_dependencies should be used. llvm-svn: 359490
This commit is contained in:
parent
fd76383d76
commit
babcbaf971
|
@ -133,7 +133,8 @@ if(LLDB_INCLUDE_TESTS)
|
||||||
list(APPEND LLDB_TEST_DEPS dsymutil)
|
list(APPEND LLDB_TEST_DEPS dsymutil)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_target(lldb-test-deps DEPENDS ${LLDB_TEST_DEPS})
|
add_custom_target(lldb-test-deps)
|
||||||
|
add_dependencies(lldb-test-deps ${LLDB_TEST_DEPS})
|
||||||
|
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
add_subdirectory(unittests)
|
add_subdirectory(unittests)
|
||||||
|
|
|
@ -83,7 +83,7 @@ function(add_lldb_library name)
|
||||||
endif()
|
endif()
|
||||||
if (NOT CMAKE_CONFIGURATION_TYPES)
|
if (NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
add_llvm_install_targets(install-${name}
|
add_llvm_install_targets(install-${name}
|
||||||
DEPENDS $<TARGET_FILE:${name}>
|
DEPENDS ${name}
|
||||||
COMPONENT ${name})
|
COMPONENT ${name})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -32,8 +32,8 @@ if(EPYDOC_EXECUTABLE)
|
||||||
get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR)
|
get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR)
|
||||||
add_custom_target(lldb-python-doc-package
|
add_custom_target(lldb-python-doc-package
|
||||||
COMMAND "${CMAKE_COMMAND}" -E copy "${lldb_scripts_dir}/lldb.py" "${CMAKE_CURRENT_BINARY_DIR}/lldb/__init__.py"
|
COMMAND "${CMAKE_COMMAND}" -E copy "${lldb_scripts_dir}/lldb.py" "${CMAKE_CURRENT_BINARY_DIR}/lldb/__init__.py"
|
||||||
DEPENDS swig_wrapper
|
|
||||||
COMMENT "Copying lldb.py to pretend package.")
|
COMMENT "Copying lldb.py to pretend package.")
|
||||||
|
add_dependencies(lldb-python-doc-package swig_wrapper)
|
||||||
|
|
||||||
set(DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc")
|
set(DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc")
|
||||||
file(MAKE_DIRECTORY "${DOC_DIR}")
|
file(MAKE_DIRECTORY "${DOC_DIR}")
|
||||||
|
@ -45,11 +45,10 @@ if(EPYDOC_EXECUTABLE)
|
||||||
--name "LLDB python API"
|
--name "LLDB python API"
|
||||||
--url "http://lldb.llvm.org"
|
--url "http://lldb.llvm.org"
|
||||||
${EPYDOC_OPTIONS}
|
${EPYDOC_OPTIONS}
|
||||||
DEPENDS swig_wrapper
|
|
||||||
DEPENDS lldb-python-doc-package
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Generating LLDB Python API reference with epydoc" VERBATIM
|
COMMENT "Generating LLDB Python API reference with epydoc" VERBATIM
|
||||||
)
|
)
|
||||||
|
add_dependencies(lldb-python-doc swig_wrapper lldb-python-doc-package)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Could NOT find epydoc")
|
message(STATUS "Could NOT find epydoc")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -8,9 +8,9 @@ function(add_python_test_target name test_script args comment)
|
||||||
add_custom_target(${name}
|
add_custom_target(${name}
|
||||||
COMMAND ${PYTHON_TEST_COMMAND} ${ARG_DEFAULT_ARGS}
|
COMMAND ${PYTHON_TEST_COMMAND} ${ARG_DEFAULT_ARGS}
|
||||||
COMMENT "${comment}"
|
COMMENT "${comment}"
|
||||||
DEPENDS ${LLDB_TEST_DEPS}
|
|
||||||
USES_TERMINAL
|
USES_TERMINAL
|
||||||
)
|
)
|
||||||
|
add_dependencies(${name} ${LLDB_TEST_DEPS})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# The default architecture with which to compile test executables is the default LLVM target
|
# The default architecture with which to compile test executables is the default LLVM target
|
||||||
|
|
Loading…
Reference in New Issue