File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ if (LLVM_TREE_AVAILABLE)
4343 # flang-new uses the same resource dir as clang.
4444 include (GetClangResourceDir)
4545 get_clang_resource_dir(FLANGRT_BUILD_LIB_DIR PREFIX "${LLVM_LIBRARY_OUTPUT_INTDIR} /.." SUBDIR "lib${LLVM_LIBDIR_SUFFIX} " )
46- get_clang_resource_dir(FLANGRT_INSTALL_LIB_DIR SUBDIR "lib${LLVM_LIBDIR_SUFFIX} " ) # No prefix, CMake's install command find the install prefix itself
46+ get_clang_resource_dir(FLANGRT_INSTALL_LIB_DIR SUBDIR "lib${LLVM_LIBDIR_SUFFIX} " ) # No prefix, CMake's install command finds the install prefix itself
4747else ()
4848 set (FLANGRT_BUILD_LIB_DIR "${LLVM_LIBRARY_OUTPUT_INTDIR} " )
4949 set (FLANGRT_INSTALL_LIB_DIR "lib${LLVM_LIBDIR_SUFFIX} " )
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ function (add_flangrt_library name)
102102 else ()
103103 llvm_map_components_to_libnames(llvm_libs Support)
104104 endif ()
105- target_link_libraries (${name} PUBLIC ${llvm_libs} )
106- target_include_directories (${name} PRIVATE ${LLVM_INCLUDE_DIRS} )
105+ target_link_libraries (${name} PUBLIC ${llvm_libs} )
106+ target_include_directories (${name} PUBLIC ${LLVM_INCLUDE_DIRS} )
107107 endif ()
108108
109109 # If this is part of the toolchain, put it into the compiler's resource
Original file line number Diff line number Diff line change 77#===------------------------------------------------------------------------===#
88
99# Add GTest if not already present.
10- # Using a function so include_directories/ LLVM_SUBPROJECT_TITLE does not propagate
10+ # Using a function so LLVM_SUBPROJECT_TITLE does not propagate.
1111function (build_gtest)
12- include_directories ("${LLVM_INCLUDE_DIR} " "${LLVM_MAIN_INCLUDE_DIR} " )
1312 set (LLVM_SUBPROJECT_TITLE "Third-Party/Google Test" )
1413 add_subdirectory ("${LLVM_THIRD_PARTY_DIR} /unittest" "${CMAKE_CURRENT_BINARY_DIR} /third-party/unittest" )
1514endfunction ()
1615if (NOT TARGET llvm_gtest)
1716 build_gtest()
1817endif ()
1918
19+ # LLVM's modified GTest depends on LLVM, but not all runtime projects using
20+ # GTest also add the include search path.
21+ target_include_directories (llvm_gtest PUBLIC "${LLVM_INCLUDE_DIR} " "${LLVM_MAIN_INCLUDE_DIR} " )
22+
2023# Required because LLVMSupport is compiled with this option (by default).
2124set (CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
2225
You can’t perform that action at this time.
0 commit comments