Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete initial implementation for treating internal packages as external found with find_package() (#63) #560

Merged
merged 49 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ccb222a
Add printing of <Package>_PACAKGE_BUILD_STATUS (#63)
bartlettroscoe Dec 22, 2022
afcea28
Add documentation for <Package>_SUBPACKAGES varaible (#63)
bartlettroscoe Jan 12, 2023
ee5f2ce
Small doc update (#63)
bartlettroscoe Jan 13, 2023
0fc3973
Change tribits_print_prefix_string_and_list() to pass in list name (#63)
bartlettroscoe Jan 17, 2023
f3f9356
WIP: Add basic logic for setting <Package>_PACKAGE_BUILD_STATUS=EXTER…
bartlettroscoe Jan 24, 2023
09e61e5
WIP: rename some local vars away from UPPPER-CASE (#63)
bartlettroscoe Jan 18, 2023
5648cf7
WIP: Replace bool arg includeEmpty with enum arg enableEmptyStatus (#63)
bartlettroscoe Jan 18, 2023
abd846a
WIP: Small doc and format changes (#63)
bartlettroscoe Jan 18, 2023
cc8d5b7
WIP: Add internalOrExternal arg to tribits_print_packages_list_enable…
bartlettroscoe Jan 19, 2023
f85cc17
WIP: Change name from TribitsGetEnabledSublists.cmake to TribitsPacka…
bartlettroscoe Jan 19, 2023
e30b5bf
WIP: Change printing of package set lists based in INTERNAL/EXTERNAL …
bartlettroscoe Jan 20, 2023
e14b0d2
WIP: Add printing of Final set of [non-]enabled top-level external pa…
bartlettroscoe Jan 20, 2023
864ad9f
Factor out tribits_filter_package_list_from_var() (#63)
bartlettroscoe Jan 20, 2023
7ab3809
MockTrilinos: Set <Project>_TRACE_DEPENDENCY_HANDLING_ONLY=ON (#63)
bartlettroscoe Jan 21, 2023
aaec210
WIP: Adjust processing of internal and external packages (#63)
bartlettroscoe Jan 21, 2023
b9b4567
Finish basic implentation for building against external packages (#63)
bartlettroscoe Jan 24, 2023
33902f7
Process TPLs at base project level, pass info through <Package>Config…
bartlettroscoe Jan 27, 2023
a2790c8
Make WrapExernal work with external TribitsExProj packages (#63)
bartlettroscoe Jan 25, 2023
3065298
Add option <Project>_SKIP_INSTALL_PROJECT_CMAKE_CONFIG_FILES (#63)
bartlettroscoe Jan 25, 2023
aa843a4
WIP: Rename TribitsProcessEnabledTpl.cmake to TribitsProcessEnabledTp…
bartlettroscoe Jan 27, 2023
8e112e0
Add basic special handling for fully TriBITS-compliant external packa…
bartlettroscoe Jan 26, 2023
56b0845
WIP: Add initial failing test case for stagged package installs (#63)
bartlettroscoe Jan 27, 2023
cddd9f1
Initial implementation of pre-building/pre-installing stages of packa…
bartlettroscoe Jan 27, 2023
0c959bb
Revise how internal and external <Package>Config.cmake files are link…
bartlettroscoe Jan 28, 2023
2075dd6
WIP: Improve names of functions and variables (#63)
bartlettroscoe Feb 6, 2023
3b63fbd
WIP: Improve documentation (#63)
bartlettroscoe Feb 6, 2023
3389ceb
WIP: Move functions writing <tplName>Config.cmake files to TribitsExt…
bartlettroscoe Feb 6, 2023
28d1beb
WIP: Rename TribitsExternalPackageFindTplHelpers to TribitsExternalPa…
bartlettroscoe Feb 6, 2023
9a1eba1
WIP: Rename TribitsWriteClientExportFiles.cmake to TribitsInternalPac…
bartlettroscoe Feb 7, 2023
d8d60ae
WIP: Factor out TribitsProjectWriteConfigFile.cmake, reorder funcs (#63)
bartlettroscoe Feb 7, 2023
f14bba2
WIP: Rename func, remove unused funcs (#63)
bartlettroscoe Feb 7, 2023
bdd12c9
WIP: Remove 'Fully' from 'Fully TriBITS-Compliant' (and variations) (…
bartlettroscoe Feb 7, 2023
a2a5b99
Move 'CMake Language Overview and Gotchas' to appendix
bartlettroscoe Feb 9, 2023
61eaf6a
Remove debug print statement that got commited by accident
bartlettroscoe Feb 9, 2023
ba9de28
Adjust logic and printing for setting INTTERNAL packages as EXTERNAL …
bartlettroscoe Feb 18, 2023
80bd994
Update some outputing for TriBITS-compliant external packages (#63)
bartlettroscoe Feb 19, 2023
31de1fe
Add definitions of TriBITS-compliant packages (#63)
bartlettroscoe Feb 20, 2023
652d189
Add links to TriBITS-compliant external package in requirements for F…
bartlettroscoe Feb 20, 2023
8fc1e25
Add build ref item for treating internal packages as external (#634)
bartlettroscoe Feb 21, 2023
2bcc17f
Add CHANGLOG.md entry for -D<Project>_ENABLE_<TplName>=ON (#63, #546)
bartlettroscoe Feb 21, 2023
68c83ef
Add documentation for TriBITS-compliant external packages TRIBITS_PKG…
bartlettroscoe Feb 21, 2023
f8c1ea5
Add CHANGLOG.md entry for supporting pre-installed packages (#63)
bartlettroscoe Feb 21, 2023
f75343e
Merge remote-tracking branch 'github/master' into 63-combined-package…
bartlettroscoe Feb 25, 2023
2de8ca1
Merge branch 'master' into 63-combined-package-data-structures-6
bartlettroscoe Feb 25, 2023
f58975f
Merge remote-tracking branch 'github/master' into 63-combined-package…
bartlettroscoe Feb 28, 2023
90b96ee
Fix some documentation and add new functions to generated docs (#63, …
bartlettroscoe Mar 29, 2023
16b1817
Fix spelling of TribitsCMakeLanguageOverviewAndGotchas.rst (#63, #560)
bartlettroscoe Mar 29, 2023
014a153
Remove unused legacy RELATIVE_PATH code (#63, #560)
bartlettroscoe Mar 29, 2023
ee67e05
Merge remote-tracking branch 'github/master' into 63-combined-package…
bartlettroscoe Mar 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ tribits_add_advanced_test( TribitsAdjustPackageEnables_UnitTests
)


tribits_add_advanced_test( TribitsWriteClientExportFiles_UnitTests
tribits_add_advanced_test( TribitsInternalPackageWriteConfigFile_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
TEST_0 CMND ${CMAKE_COMMAND}
ARGS
-DPROJECT_NAME=${PROJECT_NAME}
-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-DCURRENT_TEST_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}
-DCMAKE_CURRENT_LIST_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-P "${CMAKE_CURRENT_SOURCE_DIR}/TribitsWriteClientExportFiles_UnitTests.cmake"
-P "${CMAKE_CURRENT_SOURCE_DIR}/TribitsInternalPackageWriteConfigFile_UnitTests.cmake"
PASS_REGULAR_EXPRESSION_ALL
"Final UnitTests Result: num_run = 12"
"Final UnitTests Result: PASSED"
Expand Down
401 changes: 400 additions & 1 deletion test/core/DependencyUnitTests/CMakeLists.txt

Large diffs are not rendered by default.

297 changes: 297 additions & 0 deletions test/core/ExamplesUnitTests/TribitsExampleProject2_Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -771,3 +771,300 @@ if (${testNameBase}_NAME)
set_tests_properties(${${testNameBase}_NAME}
PROPERTIES DEPENDS ${TribitsExampleProject2_Tpls_install_STATIC_NAME} )
endif()


################################################################################


function(TribitsExampleProject2_External_Package_by_Package
sharedOrStatic findingTplsMethod
)

TribitsExampleProject2_test_setup_header()

set(tplInstallBaseDir
"${TribitsExampleProject2_Tpls_install_${sharedOrStatic}_DIR}")

set(allTplsNoPrefindArgs
"-DTpl1_ALLOW_PACKAGE_PREFIND=OFF"
"-DTpl2_ALLOW_PACKAGE_PREFIND=OFF"
"-DTpl3_ALLOW_PACKAGE_PREFIND=OFF"
"-DTpl4_ALLOW_PACKAGE_PREFIND=OFF"
)

if (sharedOrStatic STREQUAL "STATIC")
set(libExt "a")
elseif (sharedOrStatic STREQUAL "SHARED")
set(libExt "so")
else()
message(FATAL_ERROR "Error: Invalid value of"
" sharedOrStatic='${sharedOrStatic}'!")
endif()

if (findingTplsMethod STREQUAL "TPL_LIBRARY_AND_INCLUDE_DIRS")
set(tpl1LibAndIncDirsArgs
"-DTpl1_INCLUDE_DIRS=${tplInstallBaseDir}/install_tpl1/include"
"-DTpl1_LIBRARY_DIRS=${tplInstallBaseDir}/install_tpl1/lib"
"-DTpl1_ALLOW_PACKAGE_PREFIND=OFF")
set(tpl2LibAndIncDirsArgs
"-DTpl2_INCLUDE_DIRS=${tplInstallBaseDir}/install_tpl2/include"
"-DTpl2_LIBRARY_DIRS=${tplInstallBaseDir}/install_tpl2/lib"
"-DTpl2_ALLOW_PACKAGE_PREFIND=OFF")
set(tpl3LibAndIncDirsArgs
"-DTpl3_INCLUDE_DIRS=${tplInstallBaseDir}/install_tpl3/include"
"-DTpl3_LIBRARY_DIRS=${tplInstallBaseDir}/install_tpl3/lib"
"-DTpl3_ALLOW_PACKAGE_PREFIND=OFF")
set(tpl4LibAndIncDirsArgs
"-DTpl4_INCLUDE_DIRS=${tplInstallBaseDir}/install_tpl4/include"
"-DTpl4_ALLOW_PACKAGE_PREFIND=OFF")
set(tpl1CMakePrefixPath "")
set(tpl2CMakePrefixPath "")
set(tpl3CMakePrefixPath "")
set(tpl4CMakePrefixPath "")
set(tpl1FoundRegexes
"TPL_Tpl1_LIBRARIES='.*/install_tpl1/lib/libtpl1[.]${libExt}'"
"TPL_Tpl1_INCLUDE_DIRS='.*/install_tpl1/include'")
set(tpl2FoundRegexes
"TPL_Tpl2_LIBRARIES='.*/install_tpl2/lib/libtpl2b[.]${libExt}[;].*/install_tpl2/lib/libtpl2a[.]${libExt}'"
"TPL_Tpl2_INCLUDE_DIRS='.*/install_tpl2/include'")
set(tpl3FoundRegexes
"TPL_Tpl3_LIBRARIES='.*/install_tpl3/lib/libtpl3[.]${libExt}'"
"TPL_Tpl3_INCLUDE_DIRS='.*/install_tpl3/include'")
set(tpl4FoundRegexes
"-- TPL_Tpl4_INCLUDE_DIRS='.*/install_tpl4/include'")
elseif (findingTplsMethod STREQUAL "CMAKE_PREFIX_PATH_CACHE")
set(testNameSuffix "_CMAKE_PREFIX_PATH_CACHE")
set(tpl1LibAndIncDirsArgs "-DTpl1_ALLOW_PACKAGE_PREFIND=ON")
set(tpl2LibAndIncDirsArgs "-DTpl2_ALLOW_PACKAGE_PREFIND=ON")
set(tpl3LibAndIncDirsArgs "-DTpl3_ALLOW_PACKAGE_PREFIND=ON")
set(tpl4LibAndIncDirsArgs "-DTpl4_ALLOW_PACKAGE_PREFIND=ON")
set(tpl1CMakePrefixPath "${tplInstallBaseDir}/install_tpl1")
set(tpl2CMakePrefixPath "${tplInstallBaseDir}/install_tpl2")
set(tpl3CMakePrefixPath "${tplInstallBaseDir}/install_tpl3")
set(tpl4CMakePrefixPath "${tplInstallBaseDir}/install_tpl4")
set(tpl1FoundRegexes
"-- Using find_package[(]Tpl1 ...[)] ..."
"-- Found Tpl1_DIR='.*/install_tpl1/lib/cmake/Tpl1'"
"-- Generating Tpl1::all_libs and Tpl1Config.cmake")
set(tpl2FoundRegexes
"-- Using find_package[(]Tpl2 ...[)] ..."
"-- Found Tpl2_DIR='.*/install_tpl2/lib/cmake/Tpl2'"
"-- Generating Tpl2::all_libs and Tpl2Config.cmake")
set(tpl3FoundRegexes
"-- Using find_package[(]Tpl3 ...[)] ..."
"-- Found Tpl3_DIR='.*/install_tpl3/lib/cmake/Tpl3'"
"-- Generating Tpl3::all_libs and Tpl3Config.cmake")
set(tpl4FoundRegexes
"-- Using find_package[(]Tpl4 ...[)] ..."
"-- Found Tpl4_DIR='.*/install_tpl4/lib/cmake/Tpl4'"
"-- Generating Tpl4::all_libs and Tpl4Config.cmake")
else()
message(FATAL_ERROR
"Error, findingTplsMethod='${findingTplsMethod}' is invalid!")
endif()

set(testNameBase ${CMAKE_CURRENT_FUNCTION}_${sharedOrStatic}${testNameSuffix})
set(testName ${PACKAGE_NAME}_${testNameBase})
set(testDir "${CMAKE_CURRENT_BINARY_DIR}/${testName}")

tribits_add_advanced_test( ${testNameBase}
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran IS_REAL_LINUX_SYSTEM
LIST_SEPARATOR <semicolon>

TEST_0
MESSAGE "Link TribitsExampleProject2 so it is easy to access"
CMND ln
ARGS -s ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject2 .

TEST_1
MESSAGE "Configure to build and install just Package1"
WORKING_DIRECTORY Build_Package1
CMND ${CMAKE_COMMAND}
ARGS
${TribitsExampleProject2_COMMON_CONFIG_ARGS}
-DTribitsExProj2_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-DTribitsExProj2_ENABLE_SECONDARY_TESTED_CODE=ON
-DTribitsExProj2_ENABLE_Package1=ON
-DCMAKE_INSTALL_PREFIX=../install_package1
-DTribitsExProj2_SKIP_INSTALL_PROJECT_CMAKE_CONFIG_FILES=TRUE
-DTPL_ENABLE_Tpl1=ON
${tpl1LibAndIncDirsArgs}
-DCMAKE_PREFIX_PATH=${tpl1CMakePrefixPath}
../TribitsExampleProject2
PASS_REGULAR_EXPRESSION_ALL
"Final set of enabled top-level packages: Package1 1"
"Final set of non-enabled top-level packages: Package2 Package3 2"
"Final set of enabled top-level external packages/TPLs: Tpl1 1"
"Final set of non-enabled top-level external packages/TPLs: Tpl2 Tpl3 Tpl4 3"

"Getting information for all enabled external packages/TPLs ..."
"Processing enabled external package/TPL: Tpl1 [(]enabled explicitly, disable with -DTPL_ENABLE_Tpl1=OFF[)]"
${tpl1FoundRegexes}
"Configuring done"
ALWAYS_FAIL_ON_NONZERO_RETURN
# NOTE: Above Tpl1 is found and the wrapper file Tpl1Config.cmake is
# created and installed. This Tpl1Config.cmake file gets used in
# downstream CMake project configures.

TEST_2
MESSAGE "Build and install just Package1"
WORKING_DIRECTORY Build_Package1
SKIP_CLEAN_WORKING_DIRECTORY
CMND ${CMAKE_COMMAND} ARGS --build . --target install

TEST_3
MESSAGE "Configure to build and install just Package2"
WORKING_DIRECTORY Build_Package2
CMND ${CMAKE_COMMAND}
ARGS
${TribitsExampleProject2_COMMON_CONFIG_ARGS}
-DTribitsExProj2_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-DTribitsExProj2_ENABLE_SECONDARY_TESTED_CODE=ON
-DTribitsExProj2_ENABLE_Package2=ON
-DCMAKE_INSTALL_PREFIX=../install_package2
-DTribitsExProj2_SKIP_INSTALL_PROJECT_CMAKE_CONFIG_FILES=TRUE
-DTPL_ENABLE_Package1=ON # Pull in already installed Package!
-DTPL_ENABLE_Tpl2=ON
${tpl2LibAndIncDirsArgs}
-DTPL_ENABLE_Tpl3=ON
${tpl3LibAndIncDirsArgs}
-DCMAKE_PREFIX_PATH=../install_package1<semicolon>${tpl2CMakePrefixPath}<semicolon>${tpl3CMakePrefixPath}
../TribitsExampleProject2
PASS_REGULAR_EXPRESSION_ALL
"Adjust the set of internal and external packages:"
"-- Treating internal package Package1 as EXTERNAL because TPL_ENABLE_Package1=ON"
"-- NOTE: Tpl1 is directly downstream from a TriBITS-compliant external package Package1"

"Final set of enabled top-level packages: Package2 1"
"Final set of non-enabled top-level packages: Package3 1"
"Final set of enabled top-level external packages/TPLs: Tpl1 Tpl2 Tpl3 Package1 4"
"Final set of non-enabled top-level external packages/TPLs: Tpl4 1"

"Getting information for all enabled TriBITS-compliant or upstream external packages/TPLs ..."
"Processing enabled external package/TPL: Tpl1 [(]enabled by Package1, disable with -DTPL_ENABLE_Tpl1=OFF[)]"
"-- The external package/TPL Tpl1 will be read in by a downstream TriBITS-compliant external package"
"Processing enabled external package/TPL: Package1 [(]enabled explicitly, disable with -DTPL_ENABLE_Package1=OFF[)]"
"-- Calling find_package[(]Package1[)] for TriBITS-compliant external package"

"Getting information for all remaining enabled external packages/TPLs ..."
"Processing enabled external package/TPL: Tpl2 [(]enabled explicitly, disable with -DTPL_ENABLE_Tpl2=OFF[)]"
${tpl2FoundRegexes}
"Processing enabled external package/TPL: Tpl3 [(]enabled explicitly, disable with -DTPL_ENABLE_Tpl3=OFF[)]"
${tpl3FoundRegexes}

"Configuring individual enabled TribitsExProj2 packages ..."
"Processing enabled top-level package: Package2 [(]Libs[)]"

"Configuring done"
ALWAYS_FAIL_ON_NONZERO_RETURN
# NOTE: Above shows how a TriBITS TPL can depend on an upstream TriBITS
# TPL found by earlier TriBITS package build and install. In this case,
# Tpl1 is found and the Tpl1Config.cmake wrapper file is created as part
# of the upstream configure and build of Package1 and the definition of
# Tpl1 is pulled in when find_package(Package1) is called on the
# TriBITS-compliant external package Package1. Then Tpl2 and Tpl2 are
# found and Tpl2Config.cmake and Tpl3Config.cmake are created that point
# to pre-installed Tpl1Config.cmake.

TEST_4
MESSAGE "Build and install just Package2"
WORKING_DIRECTORY Build_Package2
SKIP_CLEAN_WORKING_DIRECTORY
CMND ${CMAKE_COMMAND} ARGS --build . --target install

TEST_5
MESSAGE "Configure to build, test, and install the rest of TribitsExampleProject2 (Package2)"
WORKING_DIRECTORY Build
CMND ${CMAKE_COMMAND}
ARGS
${TribitsExampleProject2_COMMON_CONFIG_ARGS}
-DTribitsExProj2_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-DTribitsExProj2_ENABLE_SECONDARY_TESTED_CODE=ON
-DTribitsExProj2_ENABLE_ALL_PACKAGES=ON
-DTribitsExProj2_ENABLE_TESTS=ON
-DCMAKE_INSTALL_PREFIX=../install
-DTribitsExProj2_SKIP_INSTALL_PROJECT_CMAKE_CONFIG_FILES=TRUE
-DTPL_ENABLE_Package2=ON # Pull in already installed Package!
-DTPL_ENABLE_Tpl1=ON
-DTPL_ENABLE_Tpl2=ON
-DTPL_ENABLE_Tpl3=ON
-DTPL_ENABLE_Tpl4=ON
${tpl4LibAndIncDirsArgs}
-DCMAKE_PREFIX_PATH=../install_package2<semicolon>${tpl4CMakePrefixPath}
../TribitsExampleProject2
PASS_REGULAR_EXPRESSION_ALL
"Adjust the set of internal and external packages:"
"-- Treating internal package Package2 as EXTERNAL because TPL_ENABLE_Package2=ON"
"-- Treating internal package Package1 as EXTERNAL because downstream package Package2 being treated as EXTERNAL"
"-- NOTE: Tpl3 is directly downstream from a TriBITS-compliant external package Package2"
"-- NOTE: Tpl2 is indirectly downstream from a TriBITS-compliant external package"
"-- NOTE: Tpl1 is indirectly downstream from a TriBITS-compliant external package"

"Final set of enabled top-level packages: Package3 1"
"Final set of non-enabled top-level packages: 0"
"Final set of enabled top-level external packages/TPLs: Tpl1 Tpl2 Tpl3 Tpl4 Package1 Package2 6"
"Final set of non-enabled top-level external packages/TPLs: 0"

"Getting information for all enabled TriBITS-compliant or upstream external packages/TPLs ..."
"Processing enabled external package/TPL: Tpl1 [(]enabled explicitly, disable with -DTPL_ENABLE_Tpl1=OFF[)]"
"-- The external package/TPL Tpl1 will be read in by a downstream TriBITS-compliant external package"
"Processing enabled external package/TPL: Tpl2 [(]enabled explicitly, disable with -DTPL_ENABLE_Tpl2=OFF[)]"
"-- The external package/TPL Tpl2 will be read in by a downstream TriBITS-compliant external package"
"Processing enabled external package/TPL: Tpl3 [(]enabled explicitly, disable with -DTPL_ENABLE_Tpl3=OFF[)]"
"-- The external package/TPL Tpl3 will be read in by a downstream TriBITS-compliant external package"
"Processing enabled external package/TPL: Package1 [(]enabled explicitly, disable with -DTPL_ENABLE_Package1=OFF[)]"
"-- The external package/TPL Package1 will be read in by a downstream TriBITS-compliant external package"
"Processing enabled external package/TPL: Package2 [(]enabled explicitly, disable with -DTPL_ENABLE_Package2=OFF[)]"
"-- Calling find_package[(]Package2[)] for TriBITS-compliant external package"

"Getting information for all remaining enabled external packages/TPLs ..."

"Processing enabled external package/TPL: Tpl4 [(]enabled explicitly, disable with -DTPL_ENABLE_Tpl4=OFF[)]"
${tpl4FoundRegexes}

"Configuring done"
ALWAYS_FAIL_ON_NONZERO_RETURN
# NOTE: Above, only the newly enabled TPL Tpl4 is found and its
# Tpl4Config.cmake file is linked to the pre-installed
# Tpl1Config.comake, Tpl2Config.cmake and Tpl3Config.cmake files. And
# the needed info from Tpl1, Tpl2, and Tpl3 is pulled in from
# find_package(Package2).

TEST_6
MESSAGE "Build and install the rest of TribitsExampleProject2 (Package3)"
WORKING_DIRECTORY Build
SKIP_CLEAN_WORKING_DIRECTORY
CMND ${CMAKE_COMMAND} ARGS --build . --target install

TEST_7
MESSAGE "Run remaining tests for TribitsExampleProject2 (Package3)"
WORKING_DIRECTORY Build
SKIP_CLEAN_WORKING_DIRECTORY
CMND ${CMAKE_CTEST_COMMAND}
PASS_REGULAR_EXPRESSION_ALL
"Package3_Prg [.]+ *Passed"
"100% tests passed, 0 tests failed out of 1"
ALWAYS_FAIL_ON_NONZERO_RETURN

ADDED_TEST_NAME_OUT ${testNameBase}_NAME
)

if (${testNameBase}_NAME)
set(${testNameBase}_NAME ${${testNameBase}_NAME} PARENT_SCOPE)
set(${testNameBase}_INSTALL_DIR "${testDir}/install" PARENT_SCOPE)
set_tests_properties(${${testNameBase}_NAME}
PROPERTIES DEPENDS ${TribitsExampleProject2_Tpls_install_${sharedOrStatic}_NAME} )
endif()

endfunction()


TribitsExampleProject2_External_Package_by_Package(STATIC TPL_LIBRARY_AND_INCLUDE_DIRS)
TribitsExampleProject2_External_Package_by_Package(SHARED TPL_LIBRARY_AND_INCLUDE_DIRS)
TribitsExampleProject2_External_Package_by_Package(STATIC CMAKE_PREFIX_PATH_CACHE)
TribitsExampleProject2_External_Package_by_Package(SHARED CMAKE_PREFIX_PATH_CACHE)

# NOTE: The above tests check a few different use cases for building and
# installing TriBITS packages from a single TriBITS project incrementally.
Loading