Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPI-Dortmund
sphire
eman2mirror
Commits
09bd19d2
Commit
09bd19d2
authored
Jun 21, 2022
by
shadow_walker
Browse files
cmake: Catch 2 for testing
parent
fa6830ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
09bd19d2
...
...
@@ -86,6 +86,8 @@ else()
set
(
CMAKE_INSTALL_RPATH
"
${
SP_DIR
}
;
${
EMAN_PREFIX_LIB
}
"
)
endif
()
option
(
ENABLE_CATCH2
"Enable Catch 2 framework for unit testing (internal development only)"
OFF
)
OPTION
(
ENABLE_AUTODOC
"enable latex/doxygen document generation and etc. "
OFF
)
OPTION
(
ENABLE_FFTW3
"enable fftw 3 support (USE THIS)"
ON
)
...
...
rt/imageio/CMakeLists.txt
View file @
09bd19d2
...
...
@@ -7,11 +7,24 @@ add_custom_target(test-eer
DEPENDS test_eer
)
add_executable
(
test_renderer test_renderer.cpp
)
target_link_libraries
(
test_renderer PRIVATE EM2
)
add_test
(
test-renderer test_renderer
)
if
(
ENABLE_CATCH2
)
Include
(
FetchContent
)
add_custom_target
(
test-renderer
COMMAND
${
CMAKE_CTEST_COMMAND
}
-V -C Release -R test-renderer
DEPENDS test_renderer
)
FetchContent_Declare
(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1
# or a later release
)
FetchContent_MakeAvailable
(
Catch2
)
add_executable
(
test_renderer test_renderer.cpp
)
target_link_libraries
(
test_renderer PRIVATE EM2 Catch2::Catch2WithMain
)
add_test
(
test-renderer test_renderer
)
add_custom_target
(
test-renderer
COMMAND
${
CMAKE_CTEST_COMMAND
}
-V --output-on-failure -C Release -R test-renderer
DEPENDS test_renderer
)
endif
()
rt/imageio/test_renderer.cpp
View file @
09bd19d2
...
...
@@ -2,12 +2,7 @@
using
namespace
EMAN
;
#include
<catch2/catch_test_macros.hpp>
#undef NDEBUG
#include
<cassert>
int
main
()
{
return
0
;
TEST_CASE
(
"test class Renderer"
)
{
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment