[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / flang / tools / flang-driver / CMakeLists.txt
blob3ce8b407450d245759c453b717f73382f1c77060
1 # Infrastructure to build flang driver entry point. Flang driver depends on
2 # LLVM libraries.
4 # Set your project compile flags.
5 link_directories(${LLVM_LIBRARY_DIR})
7 set( LLVM_LINK_COMPONENTS
8   ${LLVM_TARGETS_TO_BUILD}
9   Option
10   Support
11   TargetParser
14 add_flang_tool(flang-new
15   driver.cpp
16   fc1_main.cpp
18   DEPENDS
19   # These libraries are used in the linker invocation generated by the driver
20   # (i.e. when constructing the linker job). Without them the driver would be
21   # unable to generate executables.
22   FortranRuntime
23   FortranDecimal
24   Fortran_main
27 target_link_libraries(flang-new
28   PRIVATE
29   flangFrontend
30   flangFrontendTool
33 clang_target_link_libraries(flang-new
34   PRIVATE
35   clangDriver
36   clangBasic
39 option(FLANG_PLUGIN_SUPPORT "Build Flang with plugin support." ON)
41 # Enable support for plugins, which need access to symbols from flang-new
42 if(FLANG_PLUGIN_SUPPORT)
43   export_executable_symbols_for_plugins(flang-new)
44 endif()
46 install(TARGETS flang-new DESTINATION "${CMAKE_INSTALL_BINDIR}")