Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CMake Recipes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpcdf
training
CMake Recipes
Commits
3ee85a68
Commit
3ee85a68
authored
2 years ago
by
Sebastian Eibl
Browse files
Options
Downloads
Patches
Plain Diff
add never running test
parent
3a4c6c74
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
add ctest example
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
08_ctest/CMakeLists.txt
+4
-0
4 additions, 0 deletions
08_ctest/CMakeLists.txt
08_ctest/tests/CMakeLists.txt
+6
-0
6 additions, 0 deletions
08_ctest/tests/CMakeLists.txt
08_ctest/tests/never_run.cpp
+6
-0
6 additions, 0 deletions
08_ctest/tests/never_run.cpp
with
16 additions
and
0 deletions
08_ctest/CMakeLists.txt
+
4
−
0
View file @
3ee85a68
...
@@ -8,6 +8,10 @@ add_executable(success success.cpp)
...
@@ -8,6 +8,10 @@ add_executable(success success.cpp)
# create an executable that returns failure
# create an executable that returns failure
add_executable
(
failure failure.cpp
)
add_executable
(
failure failure.cpp
)
# Tests in this subdirectory will never be called since CTest is not yet
# included!
add_subdirectory
(
tests
)
# Make sure to include CTest before adding any test with add_test
# Make sure to include CTest before adding any test with add_test
# otherwise the tests will not be registered.
# otherwise the tests will not be registered.
include
(
CTest
)
include
(
CTest
)
...
...
This diff is collapsed.
Click to expand it.
08_ctest/tests/CMakeLists.txt
0 → 100644
+
6
−
0
View file @
3ee85a68
add_executable
(
never_run never_run.cpp
)
add_test
(
NAME never_run
COMMAND never_run
)
This diff is collapsed.
Click to expand it.
08_ctest/tests/never_run.cpp
0 → 100644
+
6
−
0
View file @
3ee85a68
#include
<cstdlib>
int
main
()
{
return
EXIT_SUCCESS
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment