[libcxx] r334477 - [CMake] Use common variable for all header targets NFC

Ahmed Bougacha via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 12 14:33:04 PDT 2018


Hey Petr,

FYI: clang has cmake caches that listed cxx-headers as a dependency;
I fixed that in:
r334550 [CMake][Darwin] Match cxx-headers -> cxx_headers libcxx target rename.

-Ahmed


On Mon, Jun 11, 2018 at 11:58 PM, Petr Hosek via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: phosek
> Date: Mon Jun 11 23:58:06 2018
> New Revision: 334477
>
> URL: http://llvm.org/viewvc/llvm-project?rev=334477&view=rev
> Log:
> [CMake] Use common variable for all header targets NFC
>
> This simplifies the handling of header targets.
>
> Modified:
>     libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
>     libcxx/trunk/include/CMakeLists.txt
>     libcxx/trunk/lib/CMakeLists.txt
>
> Modified: libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake?rev=334477&r1=334476&r2=334477&view=diff
> ==============================================================================
> --- libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake (original)
> +++ libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake Mon Jun 11 23:58:06 2018
> @@ -78,8 +78,8 @@ macro(setup_abi_lib abidefines abilib ab
>    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()
>
>
>
> Modified: libcxx/trunk/include/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/CMakeLists.txt?rev=334477&r1=334476&r2=334477&view=diff
> ==============================================================================
> --- libcxx/trunk/include/CMakeLists.txt (original)
> +++ libcxx/trunk/include/CMakeLists.txt Mon Jun 11 23:58:06 2018
> @@ -228,11 +228,11 @@ if(NOT LIBCXX_USING_INSTALLED_LLVM AND L
>      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})
>
> Modified: libcxx/trunk/lib/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=334477&r1=334476&r2=334477&view=diff
> ==============================================================================
> --- libcxx/trunk/lib/CMakeLists.txt (original)
> +++ libcxx/trunk/lib/CMakeLists.txt Mon Jun 11 23:58:06 2018
> @@ -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)
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list