diff --git a/flang/examples/CMakeLists.txt b/flang/examples/CMakeLists.txt --- a/flang/examples/CMakeLists.txt +++ b/flang/examples/CMakeLists.txt @@ -1,15 +1,7 @@ if(NOT FLANG_BUILD_EXAMPLES) - set(EXCLUDE_FROM_ALL ON) + set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON) endif() -# This test is not run by default as it requires input. -add_executable(external-hello-world - external-hello.cpp -) - -target_link_libraries(external-hello-world - FortranRuntime -) - +add_subdirectory(ExternalHelloWorld) add_subdirectory(PrintFlangFunctionNames) add_subdirectory(FlangOmpReport) diff --git a/flang/examples/CMakeLists.txt b/flang/examples/ExternalHelloWorld/CMakeLists.txt copy from flang/examples/CMakeLists.txt copy to flang/examples/ExternalHelloWorld/CMakeLists.txt --- a/flang/examples/CMakeLists.txt +++ b/flang/examples/ExternalHelloWorld/CMakeLists.txt @@ -1,7 +1,3 @@ -if(NOT FLANG_BUILD_EXAMPLES) - set(EXCLUDE_FROM_ALL ON) -endif() - # This test is not run by default as it requires input. add_executable(external-hello-world external-hello.cpp @@ -10,6 +6,3 @@ target_link_libraries(external-hello-world FortranRuntime ) - -add_subdirectory(PrintFlangFunctionNames) -add_subdirectory(FlangOmpReport) diff --git a/flang/examples/external-hello.cpp b/flang/examples/ExternalHelloWorld/external-hello.cpp rename from flang/examples/external-hello.cpp rename to flang/examples/ExternalHelloWorld/external-hello.cpp