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
a532a072
Unverified
Commit
a532a072
authored
May 19, 2019
by
Gabi Melman
Committed by
GitHub
May 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CMakeLists.txt
parent
2cd53c6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
CMakeLists.txt
CMakeLists.txt
+2
-10
No files found.
CMakeLists.txt
View file @
a532a072
...
...
@@ -12,8 +12,6 @@ if(NOT CMAKE_BUILD_TYPE)
set
(
CMAKE_BUILD_TYPE
"Release"
CACHE STRING
"Choose Release or Debug"
FORCE
)
endif
()
#---------------------------------------------------------------------------------------
# compiler config
#---------------------------------------------------------------------------------------
...
...
@@ -29,13 +27,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH
add_compile_options
(
"-Wfatal-errors"
)
endif
()
#---------------------------------------------------------------------------------------
# spdlog target
#---------------------------------------------------------------------------------------
# Check if spdlog is being used directly or via add_subdirectory, but allow overriding
if
(
NOT DEFINED SPDLOG_MASTER_PROJECT
)
if
(
CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR
)
...
...
@@ -55,7 +50,7 @@ message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
find_package
(
Threads REQUIRED
)
#
Build library
#
Static library version
add_library
(
spdlog src/spdlog.cpp
)
target_compile_definitions
(
spdlog PUBLIC SPDLOG_COMPILED_LIB
)
target_include_directories
(
spdlog PUBLIC
...
...
@@ -65,12 +60,11 @@ target_include_directories(spdlog PUBLIC
target_link_libraries
(
spdlog PUBLIC Threads::Threads
)
# Header only
# Header only
version
add_library
(
spdlog_header_only INTERFACE
)
target_include_directories
(
spdlog_header_only INTERFACE
"
${
CMAKE_CURRENT_LIST_DIR
}
/include"
)
target_link_libraries
(
spdlog_header_only INTERFACE Threads::Threads
)
#---------------------------------------------------------------------------------------
# address sanitizers check
#---------------------------------------------------------------------------------------
...
...
@@ -151,7 +145,5 @@ if (SPDLOG_INSTALL)
#---------------------------------------------------------------------------------------
option
(
CMAKE_EXPORT_NO_PACKAGE_REGISTRY
"Disable registration of CMake's build directory."
ON
)
export
(
PACKAGE
${
PROJECT_NAME
}
)
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