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
170f5c67
Commit
170f5c67
authored
Oct 21, 2017
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move headers to include/fmt
parent
3d11eac7
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
16 additions
and
11 deletions
+16
-11
CMakeLists.txt
CMakeLists.txt
+1
-1
include/fmt/CMakeLists.txt
include/fmt/CMakeLists.txt
+4
-3
include/fmt/format.cc
include/fmt/format.cc
+0
-0
include/fmt/format.h
include/fmt/format.h
+0
-0
include/fmt/ostream.cc
include/fmt/ostream.cc
+0
-0
include/fmt/ostream.h
include/fmt/ostream.h
+0
-0
include/fmt/posix.cc
include/fmt/posix.cc
+0
-0
include/fmt/posix.h
include/fmt/posix.h
+0
-0
include/fmt/printf.cc
include/fmt/printf.cc
+0
-0
include/fmt/printf.h
include/fmt/printf.h
+0
-0
include/fmt/string.h
include/fmt/string.h
+0
-0
include/fmt/time.h
include/fmt/time.h
+0
-0
include/fmt/write.h
include/fmt/write.h
+0
-0
test/CMakeLists.txt
test/CMakeLists.txt
+11
-7
No files found.
CMakeLists.txt
View file @
170f5c67
...
...
@@ -72,7 +72,7 @@ else ()
check_symbol_exists
(
open fcntl.h HAVE_OPEN
)
endif
()
add_subdirectory
(
fmt
)
add_subdirectory
(
include/
fmt
)
if
(
FMT_DOC
)
add_subdirectory
(
doc
)
...
...
fmt/CMakeLists.txt
→
include/
fmt/CMakeLists.txt
View file @
170f5c67
...
...
@@ -7,7 +7,8 @@ if (HAVE_OPEN)
set
(
FMT_SOURCES
${
FMT_SOURCES
}
posix.cc
)
endif
()
add_library
(
fmt
${
FMT_SOURCES
}
${
FMT_HEADERS
}
../README.rst ../ChangeLog.rst
)
add_library
(
fmt
${
FMT_SOURCES
}
${
FMT_HEADERS
}
../../README.rst ../../ChangeLog.rst
)
option
(
FMT_CPPFORMAT
"Build cppformat library for backward compatibility."
OFF
)
if
(
FMT_CPPFORMAT
)
...
...
@@ -22,7 +23,7 @@ if (FMT_PEDANTIC)
endif
()
target_include_directories
(
fmt PUBLIC
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
>
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include
>
$<INSTALL_INTERFACE:include>
)
set_target_properties
(
fmt PROPERTIES
...
...
@@ -45,7 +46,7 @@ if (CMAKE_VERSION VERSION_GREATER 3.1.0 OR CMAKE_VERSION VERSION_EQUAL 3.1.0)
target_compile_definitions
(
fmt-header-only INTERFACE FMT_HEADER_ONLY=1
)
target_include_directories
(
fmt-header-only INTERFACE
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
>
$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include
>
$<INSTALL_INTERFACE:include>
)
endif
()
...
...
fmt/format.cc
→
include/
fmt/format.cc
View file @
170f5c67
File moved
fmt/format.h
→
include/
fmt/format.h
View file @
170f5c67
File moved
fmt/ostream.cc
→
include/
fmt/ostream.cc
View file @
170f5c67
File moved
fmt/ostream.h
→
include/
fmt/ostream.h
View file @
170f5c67
File moved
fmt/posix.cc
→
include/
fmt/posix.cc
View file @
170f5c67
File moved
fmt/posix.h
→
include/
fmt/posix.h
View file @
170f5c67
File moved
fmt/printf.cc
→
include/
fmt/printf.cc
View file @
170f5c67
File moved
fmt/printf.h
→
include/
fmt/printf.h
View file @
170f5c67
File moved
fmt/string.h
→
include/
fmt/string.h
View file @
170f5c67
File moved
fmt/time.h
→
include/
fmt/time.h
View file @
170f5c67
File moved
fmt/write.h
→
include/
fmt/write.h
View file @
170f5c67
File moved
test/CMakeLists.txt
View file @
170f5c67
...
...
@@ -98,8 +98,9 @@ endif ()
if
(
HAVE_OPEN
)
add_fmt_executable
(
posix-mock-test
posix-mock-test.cc ../fmt/format.cc
${
TEST_MAIN_SRC
}
)
target_include_directories
(
posix-mock-test PRIVATE
${
PROJECT_SOURCE_DIR
}
)
posix-mock-test.cc ../include/fmt/format.cc
${
TEST_MAIN_SRC
}
)
target_include_directories
(
posix-mock-test PRIVATE
${
PROJECT_SOURCE_DIR
}
/include
)
target_compile_definitions
(
posix-mock-test PRIVATE FMT_USE_FILE_DESCRIPTORS=1
)
target_link_libraries
(
posix-mock-test gmock
)
add_test
(
NAME posix-mock-test COMMAND posix-mock-test
)
...
...
@@ -112,25 +113,28 @@ target_link_libraries(header-only-test gmock)
if
(
TARGET fmt-header-only
)
target_link_libraries
(
header-only-test fmt-header-only
)
else
()
target_include_directories
(
header-only-test PRIVATE
${
PROJECT_SOURCE_DIR
}
)
target_include_directories
(
header-only-test PRIVATE
${
PROJECT_SOURCE_DIR
}
/include
)
target_compile_definitions
(
header-only-test PRIVATE FMT_HEADER_ONLY=1
)
endif
()
# Test that the library can be compiled with exceptions disabled.
check_cxx_compiler_flag
(
-fno-exceptions HAVE_FNO_EXCEPTIONS_FLAG
)
if
(
HAVE_FNO_EXCEPTIONS_FLAG
)
add_library
(
noexception-test ../fmt/format.cc
)
add_library
(
noexception-test ../
include/
fmt/format.cc
)
target_compile_options
(
noexception-test PUBLIC
${
CPP14_FLAG
}
)
target_include_directories
(
noexception-test PRIVATE
${
PROJECT_SOURCE_DIR
}
)
target_include_directories
(
noexception-test PRIVATE
${
PROJECT_SOURCE_DIR
}
/include
)
target_compile_options
(
noexception-test PRIVATE -fno-exceptions
)
endif
()
if
(
FMT_PEDANTIC
)
# Test that the library compiles without windows.h.
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Windows"
)
add_library
(
no-windows-h-test ../fmt/format.cc
)
add_library
(
no-windows-h-test ../
include/
fmt/format.cc
)
target_compile_options
(
no-windows-h-test PUBLIC
${
CPP14_FLAG
}
)
target_include_directories
(
no-windows-h-test PRIVATE
${
PROJECT_SOURCE_DIR
}
)
target_include_directories
(
no-windows-h-test PRIVATE
${
PROJECT_SOURCE_DIR
}
/include
)
target_compile_definitions
(
no-windows-h-test PRIVATE FMT_USE_WINDOWS_H=0
)
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