Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
dd2f293f
Commit
dd2f293f
authored
May 18, 2019
by
David Zemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up CMake a bit more
parent
24e4f0aa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
CMakeLists.txt
CMakeLists.txt
+4
-5
CMakeLists.txt
tests/CMakeLists.txt
+3
-7
No files found.
CMakeLists.txt
View file @
dd2f293f
...
...
@@ -54,8 +54,6 @@ option(SPDLOG_BUILD_TESTS "Build tests" ON)
option
(
SPDLOG_FMT_EXTERNAL
"Use external fmt library instead of bundled"
OFF
)
option
(
SPDLOG_INSTALL
"Generate the install target."
${
SPDLOG_MASTER_PROJECT
}
)
set
(
HEADER_BASE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/spdlog"
)
message
(
STATUS
"Build type: "
${
CMAKE_BUILD_TYPE
}
)
find_package
(
Threads REQUIRED
)
...
...
@@ -63,9 +61,10 @@ find_package(Threads REQUIRED)
# Build library
add_library
(
spdlog src/spdlog.cpp
)
target_compile_definitions
(
spdlog PUBLIC SPDLOG_COMPILED_LIB
)
target_include_directories
(
spdlog PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_LIST_DIR
}
/include>"
)
set_target_properties
(
spdlog PROPERTIES OUTPUT_NAME
"spdlog"
)
set_target_properties
(
spdlog PROPERTIES DEBUG_POSTFIX
"-debug"
)
target_include_directories
(
spdlog PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_LIST_DIR
}
/include>"
"$<INSTALL_INTERFACE:include>"
)
target_link_libraries
(
spdlog PUBLIC Threads::Threads
)
# Header only
...
...
tests/CMakeLists.txt
View file @
dd2f293f
project
(
spdlog-utests CXX
)
find_package
(
Threads REQUIRED
)
set
(
SPDLOG_UTESTS_SOURCES
test_errors.cpp
test_file_helper.cpp
...
...
@@ -19,10 +15,10 @@ set(SPDLOG_UTESTS_SOURCES
test_sink.h
test_fmt_helper.cpp
)
add_executable
(
${
PROJECT_NAME
}
${
SPDLOG_UTESTS_SOURCES
}
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE
spdlog
)
add_executable
(
spdlog-utests
${
SPDLOG_UTESTS_SOURCES
}
)
target_link_libraries
(
spdlog-utests
spdlog
)
file
(
MAKE_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/logs"
)
enable_testing
()
add_test
(
NAME
${
PROJECT_NAME
}
COMMAND
${
PROJECT_NAME
}
)
add_test
(
NAME
spdlog-utests COMMAND spdlog-utests
)
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