From 7fdb78c2dba603b51d777e5bf6411f8abffdb9e1 Mon Sep 17 00:00:00 2001 From: Samuel Browne Date: Tue, 10 Oct 2023 10:19:13 -0600 Subject: [PATCH] Enhance find_package(Trilinos) test Add a dummy executable that depends on all of the built Trilinos libraries to attempt to exercise some more failure cases. Specifically, this is to try and make visible the failure where imported toolchain libraries (e.g. libm) will not work in downstream builds due to incomplete install logic. User Support Ticket(s) or Story Referenced: TRILFRAME-601 #10081 --- .../find_package_Trilinos/CMakeLists.txt | 3 +++ packages/TrilinosInstallTests/find_package_Trilinos/hello.c | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 packages/TrilinosInstallTests/find_package_Trilinos/hello.c diff --git a/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt b/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt index d748f0ecb8ff..10cbf77ccb8b 100644 --- a/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt +++ b/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt @@ -9,3 +9,6 @@ find_package(Trilinos REQUIRED) message("Trilinos_FOUND = '${Trilinos_FOUND}'") message("Trilinos_SELECTED_PACAKGES_LIST = '${Trilinos_SELECTED_PACAKGES_LIST}'") message("Trilinos_LIBRARIES = '${Trilinos_LIBRARIES}'") + +add_executable(hello hello.c) +target_link_libraries(hello PUBLIC ${Trilinos_LIBRARIES}) diff --git a/packages/TrilinosInstallTests/find_package_Trilinos/hello.c b/packages/TrilinosInstallTests/find_package_Trilinos/hello.c new file mode 100644 index 000000000000..2b3a7f937f92 --- /dev/null +++ b/packages/TrilinosInstallTests/find_package_Trilinos/hello.c @@ -0,0 +1,5 @@ +#include + +int main(int argc, char** argv) { + printf("Hello, world!"); +}