-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Add failing test for using TriBITS functions in a raw CMake pack…
…age in TriBITS project (#582) This test sets up to use the TriBITS test management functions from inside of a raw CMake package under a TriBITS project.
- Loading branch information
1 parent
954eed2
commit ca289b1
Showing
3 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tribits/examples/TribitsExampleProject2/packages/package1/test/CMakeLists.tribits.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tribits_add_test(package1-prg NOEXEPREFIX NOEXESUFFIX | ||
NAME Prg DIRECTORY ${PACKAGE_BINARY_DIR}/src NUM_MPI_PROCS 1 | ||
PASS_REGULAR_EXPRESSION "Package1 Deps: tpl1" ) |
16 changes: 11 additions & 5 deletions
16
tribits/examples/TribitsExampleProject2/packages/package1/test/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
include_raw_cmake_build() | ||
|
||
tribits_add_test(package1-prg NOEXEPREFIX NOEXESUFFIX | ||
NAME Prg DIRECTORY ${PACKAGE_BINARY_DIR}/src NUM_MPI_PROCS 1 | ||
PASS_REGULAR_EXPRESSION "Package1 Deps: tpl1" ) | ||
if ((NOT COMMAND tribits_project) OR Package1_USE_RAW_CMAKE) | ||
if (Package1_USE_TRIBITS_TEST_FUNCTIONS) | ||
message("-- Using TriBITS Test Functions in a raw CMake Package1 build!") | ||
include("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.tribits.cmake") | ||
else() | ||
message("-- Using Raw CMake add_test() in a raw CMake Package1 build!") | ||
include("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.raw.cmake") | ||
endif() | ||
else() | ||
include("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.tribits.cmake") | ||
endif() |