Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jan Koniarik
emlabcpp
Commits
9a6c3979
Commit
9a6c3979
authored
Jan 14, 2022
by
Jan Koniarik
Browse files
added config level option to enable tests
parent
d489a6b3
Pipeline
#106415
passed with stage
in 49 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
9a6c3979
cmake_minimum_required
(
VERSION 3.16
)
if
(
NOT DEFINED PROJECT_NAME
)
# detection for disabling test inspired by Catch2
set
(
NOT_SUBPROJECT ON
)
else
()
set
(
NOT_SUBPROJECT OFF
)
endif
()
option
(
EMLABCPP_TESTS_ENABLED
"Decides whenever tests should be enabled"
OFF
)
project
(
emlabcpp
)
add_library
(
emlabcpp INTERFACE
)
target_include_directories
(
emlabcpp INTERFACE include/
)
if
(
NOT_SUBPROJECT
)
if
(
EMLABCPP_TESTS_ENABLED
)
include
(
CTest
)
if
(
BUILD_TESTING
)
add_subdirectory
(
tests
)
...
...
Makefile
View file @
9a6c3979
...
...
@@ -8,7 +8,7 @@ clean:
rm
-rf
./build
build_test
:
cmake
-Bbuild
$(EXTRAARGS)
-DCMAKE_EXPORT_COMPILE_COMMANDS
=
1
cmake
-Bbuild
$(EXTRAARGS)
-DEMLABCPP_TESTS_ENABLED
=
ON
-DCMAKE_EXPORT_COMPILE_COMMANDS
=
1
make
-Cbuild
-j
exec_test
:
build_test
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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