X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FCMakeLists.txt;h=ff805396eb0c85af96dde63c972bd56b957c904f;hb=c51f300513a39ccc3719c795141d376b346cf61e;hp=ab5f5b7de7599b35c3081644e1e6684a6597ecab;hpb=50925fbed4ea28296517b92e186d49ddb8535515;p=oota-llvm.git diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt index ab5f5b7de75..ff805396eb0 100644 --- a/include/llvm/CMakeLists.txt +++ b/include/llvm/CMakeLists.txt @@ -1,19 +1,7 @@ -set(LLVM_TARGET_DEFINITIONS Intrinsics.td) +add_subdirectory(IR) -tablegen(Intrinsics.gen -gen-intrinsic) - -add_custom_target(intrinsics_gen ALL - DEPENDS ${llvm_builded_incs_dir}/Intrinsics.gen) - -set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} intrinsics_gen PARENT_SCOPE) - -if( MSVC_IDE ) - # Creates a dummy target containing all headers for the benefit of - # Visual Studio users. - file(GLOB_RECURSE headers *.h) - add_td_sources(headers) - add_library(llvm_headers_do_not_build EXCLUDE_FROM_ALL - # We need at least one source file: - ${LLVM_MAIN_SRC_DIR}/lib/Transforms/Hello/Hello.cpp - ${headers}) -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}")