[CMake] Use common variable for all header targets NFC
This simplifies the handling of header targets. llvm-svn: 334477
This commit is contained in:
parent
d9be2c7e64
commit
a9e7908e30
|
@ -78,8 +78,8 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
|
|||
endforeach()
|
||||
|
||||
include_directories("${LIBCXX_BINARY_INCLUDE_DIR}")
|
||||
add_custom_target(cxx-abi-headers ALL DEPENDS ${abilib_headers})
|
||||
set(LIBCXX_ABI_HEADERS_TARGET cxx-abi-headers)
|
||||
add_custom_target(cxx_abi_headers ALL DEPENDS ${abilib_headers})
|
||||
set(LIBCXX_CXX_ABI_HEADER_TARGET "cxx_abi_headers")
|
||||
endmacro()
|
||||
|
||||
|
||||
|
|
|
@ -228,11 +228,11 @@ if(NOT LIBCXX_USING_INSTALLED_LLVM AND LLVM_BINARY_DIR)
|
|||
list(APPEND out_files ${dst})
|
||||
endif()
|
||||
|
||||
add_custom_target(cxx-headers ALL DEPENDS ${out_files} ${LIBCXX_CXX_ABI_LIBRARY_HEADERS})
|
||||
add_custom_target(cxx_headers ALL DEPENDS ${out_files} ${LIBCXX_CXX_ABI_HEADER_TARGET})
|
||||
else()
|
||||
add_custom_target(cxx-headers)
|
||||
add_custom_target(cxx_headers)
|
||||
endif()
|
||||
set_target_properties(cxx-headers PROPERTIES FOLDER "Misc")
|
||||
set_target_properties(cxx_headers PROPERTIES FOLDER "Misc")
|
||||
|
||||
if (LIBCXX_INSTALL_HEADERS)
|
||||
foreach(file ${files})
|
||||
|
|
|
@ -189,8 +189,8 @@ split_list(LIBCXX_LINK_FLAGS)
|
|||
|
||||
# Add an object library that contains the compiled source files.
|
||||
add_library(cxx_objects OBJECT ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
|
||||
if(LIBCXX_CXX_ABI_LIBRARY_HEADERS)
|
||||
add_dependencies(cxx_objects ${LIBCXX_CXX_ABI_LIBRARY_HEADERS})
|
||||
if(LIBCXX_CXX_ABI_HEADER_TARGET)
|
||||
add_dependencies(cxx_objects ${LIBCXX_CXX_ABI_HEADER_TARGET})
|
||||
endif()
|
||||
if(WIN32 AND NOT MINGW)
|
||||
target_compile_definitions(cxx_objects
|
||||
|
@ -286,8 +286,7 @@ if (LIBCXX_ENABLE_STATIC)
|
|||
endif()
|
||||
|
||||
# Add a meta-target for both libraries.
|
||||
add_custom_target(cxx DEPENDS ${LIBCXX_TARGETS})
|
||||
add_dependencies(cxx cxx-headers ${LIBCXX_ABI_HEADERS_TARGET})
|
||||
add_custom_target(cxx DEPENDS cxx_headers ${LIBCXX_TARGETS})
|
||||
|
||||
if (LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY)
|
||||
file(GLOB LIBCXX_EXPERIMENTAL_SOURCES ../src/experimental/*.cpp)
|
||||
|
|
Loading…
Reference in New Issue