[libcxx-commits] [libcxx] dcbfb6f - [libcxx] Use joined format for include flag on Windows

Petr Hosek via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 30 11:40:41 PDT 2021


Author: Petr Hosek
Date: 2021-04-30T11:40:30-07:00
New Revision: dcbfb6f8735a517f7142779ac7c804607f65d7a9

URL: https://github.com/llvm/llvm-project/commit/dcbfb6f8735a517f7142779ac7c804607f65d7a9
DIFF: https://github.com/llvm/llvm-project/commit/dcbfb6f8735a517f7142779ac7c804607f65d7a9.diff

LOG: [libcxx] Use joined format for include flag on Windows

Without this, CMake deduplicates the /I flag breaking the build. See
https://cmake.org/cmake/help/v3.13/command/target_compile_options.html
for more details on why this is needed.

Differential Revision: https://reviews.llvm.org/D101550

Added: 
    

Modified: 
    libcxx/include/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 18fec97e5185..79981c59b870 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -231,8 +231,8 @@ add_library(cxx-headers INTERFACE)
 add_dependencies(cxx-headers generate-cxx-headers ${LIBCXX_CXX_ABI_HEADER_TARGET})
 # TODO: Use target_include_directories once we figure out why that breaks the runtimes build
 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
-  target_compile_options(cxx-headers INTERFACE /I "${LIBCXX_GENERATED_INCLUDE_DIR}"
-                                     INTERFACE /I "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}")
+  target_compile_options(cxx-headers INTERFACE /I${LIBCXX_GENERATED_INCLUDE_DIR}
+                                     INTERFACE /I${LIBCXX_GENERATED_INCLUDE_TARGET_DIR})
 else()
   target_compile_options(cxx-headers INTERFACE -I${LIBCXX_GENERATED_INCLUDE_DIR}
                                      INTERFACE -I${LIBCXX_GENERATED_INCLUDE_TARGET_DIR})


        


More information about the libcxx-commits mailing list