Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
7275fb6f
Commit
7275fb6f
authored
Dec 02, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify SPDLOG_BUILD_TESTS Cmake option
parent
2d50202b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
18 deletions
+4
-18
.travis.yml
.travis.yml
+1
-1
CMakeLists.txt
CMakeLists.txt
+3
-17
No files found.
.travis.yml
View file @
7275fb6f
...
...
@@ -104,7 +104,7 @@ script:
-DCMAKE_CXX_STANDARD=$CPP \
-DSPDLOG_BUILD_EXAMPLES=ON \
-DSPDLOG_BUILD_BENCH=OFF \
-DBUILD_
TESTING
=ON \
-DBUILD_
BUILD_TESTS
=ON \
-DSPDLOG_SANITIZE_ADDRESS=$ASAN \
-DSPDLOG_SANITIZE_THREAD=$TSAN
-
make VERBOSE=1 -j2
...
...
CMakeLists.txt
View file @
7275fb6f
...
...
@@ -52,23 +52,8 @@ endif()
option
(
SPDLOG_BUILD_EXAMPLES
"Build examples"
${
SPDLOG_MASTER_PROJECT
}
)
option
(
SPDLOG_BUILD_BENCH
"Build benchmarks"
${
SPDLOG_MASTER_PROJECT
}
)
option
(
SPDLOG_BUILD_TESTS
"Build tests"
${
SPDLOG_MASTER_PROJECT
}
)
# Logic for enabling tests: If the user does not explicitly
# specify the value of the SPDLOG_BUILD_TESTING variable then the
# logic is simpler to reason about: that is, testing will be
# built if and only if BUILD_TESTING is ON and we are a Master
# Project. On the other hand, if the user overrides the value of
# SPDLOG_BUILD_TESTING then it can get a bit more tricky due to
# caching.
cmake_dependent_option
(
SPDLOG_BUILD_TESTING
"Build spdlog tests"
${
SPDLOG_MASTER_PROJECT
}
"BUILD_TESTING"
OFF
)
if
(
SPDLOG_BUILD_TESTING
)
# Include CTest conditionally since it will enable BUILD_TESTING.
include
(
CTest
)
endif
()
target_include_directories
(
spdlog
...
...
@@ -83,7 +68,8 @@ if(SPDLOG_BUILD_EXAMPLES)
add_subdirectory
(
example
)
endif
()
if
(
SPDLOG_BUILD_TESTING
)
if
(
SPDLOG_BUILD_TESTS
)
include
(
CTest
)
add_subdirectory
(
tests
)
endif
()
...
...
Write
Preview
Markdown
is supported
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