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
d5d58656
Commit
d5d58656
authored
Jun 23, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move strtod_l check to CMake since it's very system-specific
parent
29ef7d31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
CMakeLists.txt
CMakeLists.txt
+11
-0
include/fmt/posix.h
include/fmt/posix.h
+0
-6
test/CMakeLists.txt
test/CMakeLists.txt
+3
-0
No files found.
CMakeLists.txt
View file @
d5d58656
...
...
@@ -127,11 +127,18 @@ if (MASTER_PROJECT AND CMAKE_GENERATOR MATCHES "Visual Studio")
${
CMAKE_MAKE_PROGRAM
}
-p:FrameworkPathOverride=
\"
${
netfxpath
}
\"
%*"
)
endif
()
set
(
strtod_l_headers stdlib.h
)
if
(
APPLE
)
set
(
strtod_l_headers
${
strtod_l_headers
}
xlocale.h
)
endif
()
include
(
CheckSymbolExists
)
if
(
WIN32
)
check_symbol_exists
(
open io.h HAVE_OPEN
)
check_symbol_exists
(
_strtod_l
"
${
strtod_l_headers
}
"
HAVE_STRTOD_L
)
else
()
check_symbol_exists
(
open fcntl.h HAVE_OPEN
)
check_symbol_exists
(
strtod_l
"
${
strtod_l_headers
}
"
HAVE_STRTOD_L
)
endif
()
function
(
add_headers VAR
)
...
...
@@ -154,6 +161,10 @@ endif ()
add_library
(
fmt
${
FMT_SOURCES
}
${
FMT_HEADERS
}
README.rst ChangeLog.rst
)
add_library
(
fmt::fmt ALIAS fmt
)
if
(
HAVE_STRTOD_L
)
target_compile_definitions
(
fmt PUBLIC FMT_LOCALE
)
endif
()
if
(
FMT_WERROR
)
target_compile_options
(
fmt PRIVATE
${
WERROR_FLAG
}
)
endif
()
...
...
include/fmt/posix.h
View file @
d5d58656
...
...
@@ -261,12 +261,6 @@ class file {
// Returns the memory page size.
long
getpagesize
();
#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \
!defined(__ANDROID__) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && \
!defined(__NEWLIB_H__)
# define FMT_LOCALE
#endif
#ifdef FMT_LOCALE
// A "C" numeric locale.
class
Locale
{
...
...
test/CMakeLists.txt
View file @
d5d58656
...
...
@@ -118,6 +118,9 @@ if (HAVE_OPEN)
if
(
FMT_PEDANTIC
)
target_compile_options
(
posix-mock-test PRIVATE
${
PEDANTIC_COMPILE_FLAGS
}
)
endif
()
if
(
HAVE_STRTOD_L
)
target_compile_definitions
(
posix-mock-test PRIVATE FMT_LOCALE
)
endif
()
add_test
(
NAME posix-mock-test COMMAND posix-mock-test
)
add_fmt_test
(
posix-test
)
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