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
code
PMem-based Data Structures
Commits
d07cbad6
Commit
d07cbad6
authored
Aug 24, 2019
by
Philipp Götze
Browse files
🔨
Using header only mode for fmt
parent
a90b7380
Pipeline
#162
passed with stages
in 20 minutes and 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cmake/Fetch3rdParty.cmake
View file @
d07cbad6
...
...
@@ -14,18 +14,23 @@ if(NOT PMDK_INCLUDE_DIRS OR "${PMDK_INCLUDE_DIRS}" STREQUAL "")
endif
()
message
(
STATUS
" libpmem.h found in
${
PMDK_INCLUDE_DIRS
}
"
)
mark_as_advanced
(
PMDK_LIBRARIES PMDK_INCLUDE_DIRS
)
# Format ==================================================================== #
FetchContent_Declare
(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 5.3.0
)
)
FetchContent_GetProperties
(
fmt
)
if
(
NOT fmt_POPULATED
)
message
(
STATUS
"Populating fmt (Format)"
)
FetchContent_Populate
(
fmt
)
add_subdirectory
(
${
fmt_SOURCE_DIR
}
${
fmt_BINARY_DIR
}
EXCLUDE_FROM_ALL
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DFMT_HEADER_ONLY=1"
)
file
(
COPY
${
fmt_SOURCE_DIR
}
/include/fmt/core.h
${
fmt_SOURCE_DIR
}
/include/fmt/format-inl.h
${
fmt_SOURCE_DIR
}
/include/fmt/format.h
DESTINATION
${
THIRD_PARTY_DIR
}
/fmt
)
endif
()
...
...
@@ -77,7 +82,7 @@ if(BUILD_BENCHMARKS)
set
(
BENCHMARK_ENABLE_TESTING OFF CACHE BOOL
""
FORCE
)
set
(
BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL
""
FORCE
)
message
(
STATUS
"Populating benchmark (google)"
)
FetchContent_Populate
(
benchmark
)
FetchContent_Populate
(
benchmark
)
add_subdirectory
(
${
benchmark_SOURCE_DIR
}
${
benchmark_BINARY_DIR
}
EXCLUDE_FROM_ALL
)
endif
()
endif
()
...
...
src/CMakeLists.txt
View file @
d07cbad6
...
...
@@ -70,6 +70,7 @@ endif()
configure_file
(
config.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/generated/config.h
)
include_directories
(
${
PROJECT_SOURCE_DIR
}
${
THIRD_PARTY_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
/generated
)
add_library
(
nvmDS_deps STATIC
${
PMDK_INCLUDE_DIRS
}
)
...
...
@@ -77,7 +78,6 @@ target_link_libraries(nvmDS_deps
Threads::Threads
stdc++fs
${
PMDK_LIBRARIES
}
ndctl daxctl
fmt
)
set_target_properties
(
nvmDS_deps PROPERTIES LINKER_LANGUAGE CXX
)
...
...
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