Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
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
fmt
Commits
c5aafd8f
Commit
c5aafd8f
authored
Dec 13, 2021
by
Alexey Ochapov
Committed by
Victor Zverovich
Dec 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expose headers as SYSTEM depending on special configuration option
parent
eaddd1e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
CMakeLists.txt
CMakeLists.txt
+7
-2
No files found.
CMakeLists.txt
View file @
c5aafd8f
...
@@ -81,6 +81,7 @@ option(FMT_FUZZ "Generate the fuzz target." OFF)
...
@@ -81,6 +81,7 @@ option(FMT_FUZZ "Generate the fuzz target." OFF)
option
(
FMT_CUDA_TEST
"Generate the cuda-test target."
OFF
)
option
(
FMT_CUDA_TEST
"Generate the cuda-test target."
OFF
)
option
(
FMT_OS
"Include core requiring OS (Windows/Posix) "
ON
)
option
(
FMT_OS
"Include core requiring OS (Windows/Posix) "
ON
)
option
(
FMT_MODULE
"Build a module instead of a traditional library."
OFF
)
option
(
FMT_MODULE
"Build a module instead of a traditional library."
OFF
)
option
(
FMT_SYSTEM_HEADERS
"Expose headers with marking them as system."
OFF
)
set
(
FMT_CAN_MODULE OFF
)
set
(
FMT_CAN_MODULE OFF
)
if
(
CMAKE_CXX_STANDARD GREATER 17 AND
if
(
CMAKE_CXX_STANDARD GREATER 17 AND
...
@@ -96,6 +97,10 @@ if (FMT_TEST AND FMT_MODULE)
...
@@ -96,6 +97,10 @@ if (FMT_TEST AND FMT_MODULE)
# The tests require {fmt} to be compiled as traditional library
# The tests require {fmt} to be compiled as traditional library
message
(
STATUS
"Testing is incompatible with build mode 'module'."
)
message
(
STATUS
"Testing is incompatible with build mode 'module'."
)
endif
()
endif
()
set
(
FMT_SYSTEM_HEADERS_ATTRIBUTE
""
)
if
(
FMT_SYSTEM_HEADERS
)
set
(
FMT_SYSTEM_HEADERS_ATTRIBUTE SYSTEM
)
endif
()
# Get version from core.h
# Get version from core.h
file
(
READ include/fmt/core.h core_h
)
file
(
READ include/fmt/core.h core_h
)
...
@@ -262,7 +267,7 @@ endif ()
...
@@ -262,7 +267,7 @@ endif ()
target_compile_features
(
fmt INTERFACE
${
FMT_REQUIRED_FEATURES
}
)
target_compile_features
(
fmt INTERFACE
${
FMT_REQUIRED_FEATURES
}
)
target_include_directories
(
fmt PUBLIC
target_include_directories
(
fmt
${
FMT_SYSTEM_HEADERS_ATTRIBUTE
}
PUBLIC
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>
$<INSTALL_INTERFACE:
${
FMT_INC_DIR
}
>
)
$<INSTALL_INTERFACE:
${
FMT_INC_DIR
}
>
)
...
@@ -298,7 +303,7 @@ add_library(fmt::fmt-header-only ALIAS fmt-header-only)
...
@@ -298,7 +303,7 @@ add_library(fmt::fmt-header-only ALIAS fmt-header-only)
target_compile_definitions
(
fmt-header-only INTERFACE FMT_HEADER_ONLY=1
)
target_compile_definitions
(
fmt-header-only INTERFACE FMT_HEADER_ONLY=1
)
target_compile_features
(
fmt-header-only INTERFACE
${
FMT_REQUIRED_FEATURES
}
)
target_compile_features
(
fmt-header-only INTERFACE
${
FMT_REQUIRED_FEATURES
}
)
target_include_directories
(
fmt-header-only INTERFACE
target_include_directories
(
fmt-header-only
${
FMT_SYSTEM_HEADERS_ATTRIBUTE
}
INTERFACE
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>
$<INSTALL_INTERFACE:
${
FMT_INC_DIR
}
>
)
$<INSTALL_INTERFACE:
${
FMT_INC_DIR
}
>
)
...
...
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