diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a32606ab969..62d72a30e989 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(Trilinos_MUST_FIND_ALL_TPL_LIBS_DEFAULT TRUE) 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 diff --git a/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt b/packages/TrilinosInstallTests/find_package_Trilinos/CMakeLists.txt index d748f0ecb8ff..80a46e6c44f4 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.cpp) +target_link_libraries(hello PUBLIC ${Trilinos_LIBRARIES}) 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; +}