diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-04-11 15:49:52 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-04-11 15:49:52 +0000 |
commit | 2a529adba0707d9b5977d47e884aef6b0be8c94f (patch) | |
tree | 6602015fff752396299ed105515b3c516bd28a3f /CMakeLists.txt | |
parent | 71c9e9ebd85afdea5d0b56cdf9138fc5afc609cb (diff) | |
download | compiler-rt-2a529adba0707d9b5977d47e884aef6b0be8c94f.tar.gz compiler-rt-2a529adba0707d9b5977d47e884aef6b0be8c94f.tar.bz2 compiler-rt-2a529adba0707d9b5977d47e884aef6b0be8c94f.tar.xz |
Explicitly list all sanitizer headers in CMake build rules. Make sure sanitizer lit_tests depend on fresh headers.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fe895cf1..9deb608a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,49 +170,13 @@ endif() filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH x86_64 i386 powerpc64 powerpc) -file(GLOB_RECURSE COMPILER_RT_HEADERS - RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/include" - "include/*.h") - -set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include) - -if(MSVC_IDE OR XCODE) - set(other_output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include) -endif() - -# Copy compiler-rt headers to the build tree. -set(out_files) -foreach( f ${COMPILER_RT_HEADERS} ) - set( src ${CMAKE_CURRENT_SOURCE_DIR}/include/${f} ) - set( dst ${output_dir}/${f} ) - add_custom_command(OUTPUT ${dst} - DEPENDS ${src} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} - COMMENT "Copying compiler-rt's ${f}...") - list(APPEND out_files ${dst}) - - if(other_output_dir) - set(other_dst ${other_output_dir}/${f}) - add_custom_command(OUTPUT ${other_dst} - DEPENDS ${src} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${other_dst} - COMMENT "Copying compiler-rt's ${f}...") - list(APPEND out_files ${other_dst}) - endif() -endforeach( f ) - -add_custom_target(compiler-rt-headers ALL DEPENDS ${out_files}) - -# Install compiler-rt headers. -install(DIRECTORY include/ - DESTINATION ${LIBCLANG_INSTALL_PATH}/include - FILES_MATCHING - PATTERN "*.h" - PATTERN ".svn" EXCLUDE - ) - # Add the public header's directory to the includes for all of compiler-rt. include_directories(include) +add_subdirectory(include) + +set(SANITIZER_COMMON_LIT_TEST_DEPS + clang clang-headers FileCheck count not llvm-nm llvm-symbolizer + compiler-rt-headers) add_subdirectory(lib) |