Skip to content
Snippets Groups Projects
Commit c1cd13d3 authored by Bertrand Bellenot's avatar Bertrand Bellenot
Browse files

Attempt to fix potential conflicts with system headers on Windows

Don't copy the clang headers, which can conflict with the system headers, like for example "future" which can now be put back in the pch headers list
parent 2c46c861
No related branches found
No related tags found
No related merge requests found
......@@ -138,6 +138,7 @@ def getSTLIncludes():
"atomic",
"thread",
"mutex",
"future",
"condition_variable",
"ciso646",
"ccomplex",
......@@ -145,9 +146,6 @@ def getSTLIncludes():
"cstdalign",
"cstdbool")
if sys.platform != 'win32':
stlHeadersList += ("future",)
allHeadersPartContent = "// STL headers\n"
for header in stlHeadersList:
......
......@@ -119,7 +119,14 @@ foreach(file wchar.h bits/stat.h bits/time.h)
endforeach()
set(stamp_file ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LLVMRES.stamp)
add_custom_command(OUTPUT ${stamp_file}
if(MSVC)
add_custom_command(OUTPUT ${stamp_file}
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/etc/cling/lib/clang/${LLVM_VERSION}/include
COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file}
${copy_commands}
DEPENDS ${files_to_copy})
else()
add_custom_command(OUTPUT ${stamp_file}
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/etc/cling/lib/clang/${CLANG_RESOURCE_DIR_VERSION}/include
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CLANG_RESOURCE_DIR}
......@@ -137,5 +144,6 @@ add_custom_command(OUTPUT ${stamp_file}
COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file}
DEPENDS ${files_to_copy}
COMMENT "Copying LLVM resource and header files")
endif()
add_custom_target(LLVMRES DEPENDS ${stamp_file} CLING)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment