-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'user-error-checking-200' (#200)
Build/Test Cases Summary Enabled Packages: Enabled all Packages 0) MPI_DEBUG => passed: passed=251,notpassed=0 (0.74 min) 1) SERIAL_RELEASE => passed: passed=251,notpassed=0 (0.70 min) 2) MPI_DEBUG_CMAKE-3.6.2 => passed: passed=272,notpassed=0 (0.83 min) 3) SERIAL_RELEASE_CMAKE-3.6.2 => passed: passed=272,notpassed=0 (0.74 min) Other local commits for this build/test group: 8d7fb25, 4d988ab, cfb441b
- Loading branch information
Showing
16 changed files
with
367 additions
and
4 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
51 changes: 51 additions & 0 deletions
51
test/core/ExamplesUnitTests/PkgWithUserErrors/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,51 @@ | ||
# TRIBITS_PACKAGE() will be called by default | ||
IF(NOT ${PACKAGE_NAME}_SKIP_TRIBITS_PACKAGE_INIT) | ||
TRIBITS_PACKAGE(PkgWithUserErrors) | ||
ENDIF() | ||
|
||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
# Not added by defult | ||
IF(${PACKAGE_NAME}_ADD_LIBRARY_BEFORE_POST_PROCESS) | ||
MESSAGE("building library") | ||
TRIBITS_ADD_LIBRARY( | ||
pkgwithusererrors | ||
HEADERS PkgWithUserErrorsLib.hpp | ||
SOURCES PkgWithUserErrorsLib.cpp | ||
) | ||
ENDIF() | ||
|
||
# Not added by defult | ||
IF(${PACKAGE_NAME}_ADD_EXECUTABLE_BEFORE_POST_PROCESS) | ||
MESSAGE("building exectuable") | ||
TRIBITS_ADD_EXECUTABLE( | ||
usererrorexec | ||
SOURCES PkgWithUserErrorsEX.cpp | ||
) | ||
ENDIF() | ||
|
||
IF(NOT ${PACKAGE_NAME}_SKIP_PACKAGE_TESTS) | ||
TRIBITS_ADD_TEST_DIRECTORIES(test) | ||
ENDIF() | ||
|
||
# TRIBITS_PACKAGE_POSTPROCESS() will be called by default | ||
IF (NOT ${PACKAGE_NAME}_SKIP_PACKAGE_POST_PROCESS) | ||
TRIBITS_PACKAGE_POSTPROCESS() | ||
ENDIF() | ||
|
||
# Not added by defult | ||
IF (${PACKAGE_NAME}_ADD_LIBRARY_AFTER_POST_PROCESS) | ||
TRIBITS_ADD_LIBRARY( | ||
pkgwithusererrors2 | ||
HEADERS PkgWithUserErrorsLib.hpp | ||
SOURCES PkgWithUserErrorsLib.cpp | ||
) | ||
ENDIF() | ||
|
||
# Not added by defult | ||
IF(${PACKAGE_NAME}_ADD_EXECUTABLE_AFTER_POST_PROCESS) | ||
TRIBITS_ADD_EXECUTABLE( | ||
usererrorexec | ||
SOURCES PkgWithUserErrorsEX.cpp | ||
) | ||
ENDIF() |
3 changes: 3 additions & 0 deletions
3
test/core/ExamplesUnitTests/PkgWithUserErrors/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( | ||
PkgWithUserErrors . PT | ||
) |
6 changes: 6 additions & 0 deletions
6
test/core/ExamplesUnitTests/PkgWithUserErrors/PkgWithUserErrorsEX.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,6 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
std::cout << "Package With User Errors\n"; | ||
return 0; | ||
} |
6 changes: 6 additions & 0 deletions
6
test/core/ExamplesUnitTests/PkgWithUserErrors/PkgWithUserErrorsLib.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,6 @@ | ||
#include "PkgWithUserErrorsLib.hpp" | ||
|
||
std::string PkgWithUserErrors::theThing() | ||
{ | ||
return "PkgWithUserErrorsThing"; | ||
} |
12 changes: 12 additions & 0 deletions
12
test/core/ExamplesUnitTests/PkgWithUserErrors/PkgWithUserErrorsLib.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,12 @@ | ||
#ifndef PKGWITHUSSERERRORSLIB_HPP_ | ||
#define PKGWITHUSSERERRORSLIB_HPP_ | ||
|
||
#include <string> | ||
|
||
namespace PkgWithUserErrors { | ||
|
||
std::string theThing(); | ||
|
||
} | ||
|
||
#endif /* PKGWITHUSSERERRORSLIB_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,9 @@ | ||
================ | ||
TargetDefinesPkg | ||
================ | ||
|
||
The purpose of this package is to demonstrate and test the usage of the | ||
TRIBITS_ADD_EXECUTABLE() TARGET_DEFINES argument and to show the bad behavior | ||
of the old DEFINES argument. | ||
|
||
See GitHub TriBITS Issue #90 for more details. |
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() |
1 change: 1 addition & 0 deletions
1
test/core/ExamplesUnitTests/PkgWithUserErrors/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 @@ | ||
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES() |
6 changes: 6 additions & 0 deletions
6
test/core/ExamplesUnitTests/PkgWithUserErrors/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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
TRIBITS_ADD_EXECUTABLE_AND_TEST( PkgWithUserErrorsTest | ||
SOURCES PkgWithUserErrorsTest.cpp | ||
NUM_MPI_PROCS 1 | ||
PASS_REGULAR_EXPRESSION | ||
"PkgWithUserErrorsLib returns PkgWithUserErrorsThing" | ||
) |
9 changes: 9 additions & 0 deletions
9
test/core/ExamplesUnitTests/PkgWithUserErrors/test/PkgWithUserErrorsTest.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,9 @@ | ||
#include <iostream> | ||
|
||
#include "PkgWithUserErrorsLib.hpp" | ||
|
||
int main() { | ||
std::cout << "PkgWithUserErrorsLib returns " | ||
<< PkgWithUserErrors::theThing() << "\n"; | ||
return 0; | ||
} |
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
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
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
Oops, something went wrong.