-
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.
Add clear error msg when funcs not called correctly (#200)
- Loading branch information
1 parent
4d988ab
commit 8d7fb25
Showing
7 changed files
with
211 additions
and
8 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
50 changes: 43 additions & 7 deletions
50
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 |
---|---|---|
@@ -1,15 +1,51 @@ | ||
TRIBITS_PACKAGE(PkgWithUserErrors) | ||
# 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}) | ||
|
||
TRIBITS_ADD_LIBRARY( | ||
pkgwithusererrors | ||
HEADERS PkgWithUserErrorsLib.hpp | ||
SOURCES PkgWithUserErrorsLib.cpp | ||
) | ||
# 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() | ||
|
||
TRIBITS_ADD_TEST_DIRECTORIES(test) | ||
# 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() |
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; | ||
} |
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
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