Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Handle Flang examples consistently with LLVM.
Without this change the problem is that flangOmpReport and flangPrintFunctionNames libraries are not built under 'all', but they are imported targets via LLVMExports.cmake so that any out-of-tree build that configures upon LLVM+Flang package will get this CMake error: ``` The imported target "flangPrintFunctionNames" references the file ".../lib/flangPrintFunctionNames.so" but this file does not exist. ``` flang-aarch64-out-of-tree buildbot (https://lab.llvm.org/buildbot/#/builders/175) does not catch this issue, because it does not enable Flang on the first stage. This change gets rid of FLANG_BUILD_EXAMPLES in favor of LLVM_BUILD_EXAMPLES and uses available LLVM CMake macros to add example executables/libraries. Differential Revision: https://reviews.llvm.org/D145992
- Loading branch information
Showing
12 changed files
with
16 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
if(NOT FLANG_BUILD_EXAMPLES) | ||
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON) | ||
endif() | ||
|
||
add_subdirectory(ExternalHelloWorld) | ||
add_subdirectory(PrintFlangFunctionNames) | ||
add_subdirectory(FlangOmpReport) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
set(LLVM_LINK_COMPONENTS | ||
FortranRuntime | ||
) | ||
|
||
# This test is not run by default as it requires input. | ||
add_executable(external-hello-world | ||
add_llvm_example(external-hello-world | ||
external-hello.cpp | ||
) | ||
|
||
target_link_libraries(external-hello-world | ||
FortranRuntime | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters