From 50711e36861ec21b4a702ad4762bc4c01d7c019d Mon Sep 17 00:00:00 2001 From: Samuel Browne Date: Tue, 10 Oct 2023 10:19:13 -0600 Subject: [PATCH 1/5] 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!"); +} From 9886b09c788f6059e0edccbfe1043a0aa279f8c2 Mon Sep 17 00:00:00 2001 From: Samuel Browne Date: Tue, 10 Oct 2023 12:21:01 -0600 Subject: [PATCH 2/5] Change dummy project executable to C++ User Support Ticket(s) or Story Referenced: TRILFRAME-601 --- .../find_package_Trilinos/CMakeLists.txt | 2 +- packages/TrilinosInstallTests/find_package_Trilinos/hello.c | 5 ----- .../TrilinosInstallTests/find_package_Trilinos/hello.cpp | 6 ++++++ 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 packages/TrilinosInstallTests/find_package_Trilinos/hello.c create mode 100644 packages/TrilinosInstallTests/find_package_Trilinos/hello.cpp diff --git a/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt b/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt index 10cbf77ccb8b..80a46e6c44f4 100644 --- a/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt +++ b/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt @@ -10,5 +10,5 @@ message("Trilinos_FOUND = '${Trilinos_FOUND}'") message("Trilinos_SELECTED_PACAKGES_LIST = '${Trilinos_SELECTED_PACAKGES_LIST}'") message("Trilinos_LIBRARIES = '${Trilinos_LIBRARIES}'") -add_executable(hello hello.c) +add_executable(hello hello.cpp) 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 deleted file mode 100644 index 2b3a7f937f92..000000000000 --- a/packages/TrilinosInstallTests/find_package_Trilinos/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int main(int argc, char** argv) { - printf("Hello, world!"); -} diff --git a/packages/TrilinosInstallTests/find_package_Trilinos/hello.cpp b/packages/TrilinosInstallTests/find_package_Trilinos/hello.cpp new file mode 100644 index 000000000000..7867d625af45 --- /dev/null +++ b/packages/TrilinosInstallTests/find_package_Trilinos/hello.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + std::cout << "Hello World!"; + return 0; +} From 21c1416f7a6d33bb805480fd020a0fe43f4d1b17 Mon Sep 17 00:00:00 2001 From: Samuel Browne Date: Tue, 10 Oct 2023 13:16:27 -0600 Subject: [PATCH 3/5] Add a test that builds the configured test project User Support Ticket(s) or Story Referenced: TRILFRAME-601 --- packages/TrilinosInstallTests/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/TrilinosInstallTests/CMakeLists.txt b/packages/TrilinosInstallTests/CMakeLists.txt index 6ea4927123de..a3e338efadaa 100644 --- a/packages/TrilinosInstallTests/CMakeLists.txt +++ b/packages/TrilinosInstallTests/CMakeLists.txt @@ -253,6 +253,12 @@ tribits_add_advanced_test(find_package_Trilinos "-- Configuring done" "-- Generating done" ALWAYS_FAIL_ON_NONZERO_RETURN + + TEST_1 + MESSAGE "Build a dummy project that calls find_package(Trilinos)" + CMND "${CMAKE_COMMAND}" + ARGS --build . + ADDED_TEST_NAME_OUT find_package_Trilinos_name ) # NOTE: The above test will run find_package(Trilinos) for **all** of the From 6207c3e258f5cfe7c28fb5bfe1e83472ce4301c4 Mon Sep 17 00:00:00 2001 From: Samuel Browne Date: Mon, 16 Oct 2023 16:57:09 -0600 Subject: [PATCH 4/5] Trivial change to trigger all packages build/test Safest to run the install test that I added against a build with all packages enabled, so make trivial change to top-level CMakeLists.txt User Support Ticket(s) or Story Referenced: TRILFRAME-601 --- CMake | 1 + CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) create mode 160000 CMake diff --git a/CMake b/CMake new file mode 160000 index 000000000000..2c59598b9117 --- /dev/null +++ b/CMake @@ -0,0 +1 @@ +Subproject commit 2c59598b9117f546e35f2cdb291c3052f75dfd3e diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ecf1c58b0aa..9fdf6e7e824f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,7 @@ SET(${PROJECT_NAME}_ENABLE_CPACK_PACKAGING_DEFAULT ON) # Don't allow disabled subpackages to be excluded from tarball SET(${PROJECT_NAME}_EXCLUDE_DISABLED_SUBPACKAGES_FROM_DISTRIBUTION_DEFAULT FALSE) + SET(Trilinos_USE_GNUINSTALLDIRS_DEFAULT ON) # Set up C++ language standard selection From 5b35834e02cf221589c97d310eac53b17b076144 Mon Sep 17 00:00:00 2001 From: Samuel Browne Date: Tue, 17 Oct 2023 15:48:52 -0600 Subject: [PATCH 5/5] Remove accidental addition User Support Ticket(s) or Story Referenced: TRILFRAME-601 --- CMake | 1 - 1 file changed, 1 deletion(-) delete mode 160000 CMake diff --git a/CMake b/CMake deleted file mode 160000 index 2c59598b9117..000000000000 --- a/CMake +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2c59598b9117f546e35f2cdb291c3052f75dfd3e