File tree Expand file tree Collapse file tree 13 files changed +38
-98
lines changed Expand file tree Collapse file tree 13 files changed +38
-98
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ macro(add_flang_tool name)
109109 endif ()
110110
111111 add_flang_executable(${name} ${ARGN} )
112- add_dependencies (${name} flang-resource -headers)
113112
114113 if (FLANG_BUILD_TOOLS)
115114 set (export_to_flangtargets)
Original file line number Diff line number Diff line change 11
2- add_library (FortranCommon
2+ add_flang_library (FortranCommon
33 Fortran.cpp
44 Fortran-features.cpp
55 default-kinds.cpp
66 idioms.cpp
7- )
8-
9- target_compile_features (FortranCommon PUBLIC cxx_std_17)
107
11- install (TARGETS FortranCommon
12- ARCHIVE DESTINATION lib
13- LIBRARY DESTINATION lib
14- RUNTIME DESTINATION bin
8+ LINK_COMPONENTS
9+ Support
1510)
Original file line number Diff line number Diff line change 11
2- add_library (FortranDecimal
2+ add_flang_library (FortranDecimal
33 binary-to-decimal.cpp
44 decimal-to-binary.cpp
55)
6-
7- target_compile_features (FortranDecimal PUBLIC cxx_std_17)
8-
9- install (TARGETS FortranDecimal
10- ARCHIVE DESTINATION lib
11- LIBRARY DESTINATION lib
12- RUNTIME DESTINATION bin
13- )
Original file line number Diff line number Diff line change 11
2- add_library (FortranEvaluate
2+ add_flang_library (FortranEvaluate
33 call.cpp
44 characteristics.cpp
55 check-expression.cpp
@@ -25,23 +25,13 @@ add_library(FortranEvaluate
2525 tools.cpp
2626 type .cpp
2727 variable .cpp
28- )
29-
30- target_compile_features (FortranEvaluate PUBLIC cxx_std_17)
3128
32- target_link_libraries (FortranEvaluate
29+ LINK_LIBS
3330 FortranCommon
3431 FortranDecimal
35- FortranSemantics
3632 FortranParser
3733)
3834
39- install (TARGETS FortranEvaluate
40- ARCHIVE DESTINATION lib
41- LIBRARY DESTINATION lib
42- RUNTIME DESTINATION bin
43- )
44-
4535if (LIBPGMATH_DIR)
4636 # If pgmath library is found, it can be used for constant folding.
4737 find_library (LIBPGMATH pgmath PATHS ${LIBPGMATH_DIR} )
Original file line number Diff line number Diff line change 1- add_library (FortranLower
2- PFTBuilder.cpp
3- )
41
5- target_link_libraries (FortranLower
6- LLVMSupport
7- )
2+ add_flang_library(FortranLower
3+ PFTBuilder.cpp
84
9- install (TARGETS FortranLower
10- ARCHIVE DESTINATION lib
11- LIBRARY DESTINATION lib
12- RUNTIME DESTINATION bin
5+ LINK_COMPONENTS
6+ Support
137)
Original file line number Diff line number Diff line change 1- add_llvm_library (FIRDialect
1+ add_flang_library (FIRDialect
22 FIRAttr.cpp
33 FIRDialect.cpp
44 FIROps.cpp
55 FIRType.cpp
6- )
76
8- add_dependencies (FIRDialect FIROpsIncGen)
7+ DEPENDS
8+ FIROpsIncGen
99
10- target_link_libraries (FIRDialect
10+ LINK_LIBS
11+ FIRSupport
1112 MLIRTargetLLVMIR
1213 MLIRTargetLLVMIRModuleTranslation
1314 MLIREDSC
@@ -16,12 +17,9 @@ target_link_libraries(FIRDialect
1617 MLIRSupport
1718 MLIRStandardToLLVM
1819 MLIRTransforms
19- LLVMAsmParser
20- LLVMAsmPrinter
21- LLVMRemarks
22- )
2320
24- install (TARGETS FIRDialect
25- ARCHIVE DESTINATION lib
26- LIBRARY DESTINATION lib
21+ LINK_COMPONENTS
22+ AsmParser
23+ AsmPrinter
24+ Remarks
2725)
Original file line number Diff line number Diff line change 1- add_llvm_library(FIRSupport
2- KindMapping.cpp
3- )
1+ get_property (dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
42
5- target_link_libraries (FIRSupport FIRDialect)
3+ add_flang_library(FIRSupport
4+ KindMapping.cpp
65
7- install (TARGETS FIRSupport
8- ARCHIVE DESTINATION lib
9- LIBRARY DESTINATION lib
6+ LINK_LIBS
7+ ${dialect_libs}
108)
Original file line number Diff line number Diff line change 11
2- add_library (FortranParser
2+ add_flang_library (FortranParser
33 Fortran-parsers.cpp
44 char-buffer.cpp
55 char-block.cpp
@@ -23,17 +23,10 @@ add_library(FortranParser
2323 tools.cpp
2424 unparse.cpp
2525 user-state.cpp
26- )
27-
28- target_compile_features (FortranParser PRIVATE cxx_std_17)
2926
30- target_link_libraries (FortranParser
27+ LINK_LIBS
3128 FortranCommon
32- LLVMSupport
33- )
3429
35- install (TARGETS FortranParser
36- ARCHIVE DESTINATION lib
37- LIBRARY DESTINATION lib
38- RUNTIME DESTINATION bin
30+ LINK_COMPONENTS
31+ Support
3932)
Original file line number Diff line number Diff line change 11
2- add_library (FortranSemantics
2+ add_flang_library (FortranSemantics
33 assignment.cpp
44 attr.cpp
55 canonicalize-do.cpp
@@ -35,18 +35,11 @@ add_library(FortranSemantics
3535 tools.cpp
3636 type .cpp
3737 unparse-with-symbols.cpp
38- )
39-
40- target_compile_features (FortranSemantics PUBLIC cxx_std_17)
4138
42- target_link_libraries (FortranSemantics
39+ LINK_LIBS
4340 FortranCommon
4441 FortranEvaluate
45- LLVMSupport
46- )
4742
48- install (TARGETS FortranSemantics
49- ARCHIVE DESTINATION lib
50- LIBRARY DESTINATION lib
51- RUNTIME DESTINATION bin
43+ LINK_COMPONENTS
44+ Support
5245)
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ endif()
2626
2727configure_file (config.h.cmake config.h)
2828
29- add_library (FortranRuntime
29+ add_flang_library (FortranRuntime
3030 ISO_Fortran_binding.cpp
3131 allocatable.cpp
3232 buffer.cpp
@@ -53,12 +53,7 @@ add_library(FortranRuntime
5353 type -code.cpp
5454 unit.cpp
5555 unit-map.cpp
56- )
57-
58- target_include_directories (FortranRuntime
59- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
60- )
6156
62- target_link_libraries (FortranRuntime
57+ LINK_LIBS
6358 FortranDecimal
6459)
You can’t perform that action at this time.
0 commit comments