[Modules] llvm-config: Exclude CMAKE_CFG_INTDIR. It isn't used in headers.

This is part of https://reviews.llvm.org/D35559

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309552 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2017-07-31 10:07:13 +00:00
parent a29bdba93e
commit 2b45a081c3

View File

@ -59,6 +59,12 @@ configure_file(${BUILDVARIABLES_SRCPATH} ${BUILDVARIABLES_OBJPATH} @ONLY)
# Set build-time environment(s).
add_definitions(-DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}")
if(LLVM_ENABLE_MODULES)
target_compile_options(llvm-config PUBLIC
"-fmodules-ignore-macro=CMAKE_CFG_INTDIR"
)
endif()
# Add the dependency on the generation step.
add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH})