diff options
Diffstat (limited to 'include/llvm/CMakeLists.txt')
-rw-r--r-- | include/llvm/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt index 0f5c63ded6..ca4fd1338e 100644 --- a/include/llvm/CMakeLists.txt +++ b/include/llvm/CMakeLists.txt @@ -12,3 +12,9 @@ if( MSVC_IDE OR XCODE ) set_target_properties(llvm_headers_do_not_build PROPERTIES FOLDER "Misc" EXCLUDE_FROM_DEFAULT_BUILD ON) endif() + +# If we're doing an out-of-tree build, copy a module map for generated +# header files into the build area. +if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") + configure_file(module.modulemap.build module.modulemap COPYONLY) +endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") |