-
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.
Add TribitsExampleProjectAddons with test as POST extra repo (TriBITS #…
…73) This is a nice example and test of an add-on extra repo. This will also be used to demonstrate and test PRE extra repos.
- Loading branch information
Roscoe A. Bartlett
committed
Jun 10, 2015
1 parent
0b312fb
commit 7c4cb4e
Showing
11 changed files
with
130 additions
and
6 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/TribitsExampleProject/cmake/ExtraRepositoriesList.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_PROJECT_DEFINE_EXTRA_REPOSITORIES( | ||
TribitsExampleProjectAddons "" GIT dummy-git-url "" Continuous | ||
) |
3 changes: 3 additions & 0 deletions
3
tribits/examples/TribitsExampleProjectAddons/PackagesList.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_REPOSITORY_DEFINE_PACKAGES( | ||
Addon1 packages/addon1 PT | ||
) |
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 @@ | ||
TRIBITS_REPOSITORY_DEFINE_TPLS() |
4 changes: 4 additions & 0 deletions
4
tribits/examples/TribitsExampleProjectAddons/packages/addon1/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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
TRIBITS_PACKAGE(Addon1) | ||
ADD_SUBDIRECTORY(src) | ||
TRIBITS_ADD_TEST_DIRECTORIES(tests) | ||
TRIBITS_PACKAGE_POSTPROCESS() |
3 changes: 3 additions & 0 deletions
3
tribits/examples/TribitsExampleProjectAddons/packages/addon1/cmake/Dependencies.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_PACKAGE_DEFINE_DEPENDENCIES( | ||
LIB_REQUIRED_PACKAGES SimpleCxx | ||
) |
11 changes: 11 additions & 0 deletions
11
tribits/examples/TribitsExampleProjectAddons/packages/addon1/src/Addon1.cpp
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,11 @@ | ||
#include "Addon1.hpp" | ||
|
||
#include "SimpleCxx_HelloWorld.hpp" | ||
|
||
std::string Addon1::getAddon1() { | ||
return std::string("Addon1"); | ||
} | ||
|
||
std::string Addon1::depsAddon1() { | ||
return SimpleCxx::deps(); | ||
} |
16 changes: 16 additions & 0 deletions
16
tribits/examples/TribitsExampleProjectAddons/packages/addon1/src/Addon1.hpp
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,16 @@ | ||
#ifndef ADDON1_HPP_ | ||
#define ADDON1_HPP_ | ||
|
||
#include <string> | ||
|
||
namespace Addon1 { | ||
|
||
// return a string containing "Addon1" | ||
std::string getAddon1(); | ||
|
||
// return a string describing the dependencies of "Addon1", recursively | ||
std::string depsAddon1(); | ||
|
||
} | ||
|
||
#endif /* ADDON1_HPP_ */ |
6 changes: 6 additions & 0 deletions
6
tribits/examples/TribitsExampleProjectAddons/packages/addon1/src/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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) | ||
TRIBITS_ADD_LIBRARY(addon1 | ||
SOURCES Addon1.cpp | ||
HEADERS Addon1.hpp | ||
NOINSTALLHEADERS | ||
) |
12 changes: 12 additions & 0 deletions
12
tribits/examples/TribitsExampleProjectAddons/packages/addon1/tests/Addon1_test.cpp
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,12 @@ | ||
#include <iostream> | ||
#include <string> | ||
|
||
#include "Addon1.hpp" | ||
|
||
int main() { | ||
std::string label_Addon1 = Addon1::getAddon1(); | ||
std::string deps_Addon1 = Addon1::depsAddon1(); | ||
std::cout << "Addon1 label is: " << label_Addon1 << "\n"; | ||
std::cout << "Addon1 deps are: " << deps_Addon1 << "\n"; | ||
return 0; | ||
} |
9 changes: 9 additions & 0 deletions
9
tribits/examples/TribitsExampleProjectAddons/packages/addon1/tests/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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
TRIBITS_ADD_EXECUTABLE(test SOURCES Addon1_test.cpp) | ||
|
||
TRIBITS_ADD_ADVANCED_TEST( test | ||
OVERALL_NUM_MPI_PROCS 1 | ||
TEST_0 EXEC test | ||
PASS_REGULAR_EXPRESSION_ALL | ||
"Addon1 label is: Addon1" | ||
"Addon1 deps are: no_deps" | ||
) |