Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gflags
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
gflags
Commits
6348ea9d
Commit
6348ea9d
authored
Jul 11, 2017
by
Andreas Schuh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Check HAVE_STDINT_H or HAVE_INTTYPES_H for older MSVC versions
parent
3d5bc48d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
CMakeLists.txt
CMakeLists.txt
+15
-5
No files found.
CMakeLists.txt
View file @
6348ea9d
...
...
@@ -224,12 +224,22 @@ endif ()
if
(
MSVC
)
set
(
HAVE_SYS_TYPES_H 1
)
set
(
HAVE_STDINT_H 1
)
set
(
HAVE_STDDEF_H 1
)
# used by CheckTypeSize module
set
(
HAVE_INTTYPES_H 0
)
set
(
HAVE_UNISTD_H 0
)
set
(
HAVE_SYS_STAT_H 1
)
set
(
HAVE_SHLWAPI_H 1
)
if
(
MSVC_VERSION VERSION_LESS 1600
)
check_include_file_cxx
(
"stdint.h"
HAVE_STDINT_H
)
bool_to_int
(
HAVE_STDINT_H
)
# used in #if directive
else
()
set
(
HAVE_STDINT_H 1
)
endif
()
if
(
MSVC_VERSION VERSION_LESS 1800
)
check_include_file_cxx
(
"inttypes.h"
HAVE_INTTYPES_H
)
bool_to_int
(
HAVE_INTTYPES_H
)
# used in #if directive
else
()
set
(
HAVE_INTTYPES_H 1
)
endif
()
else
()
foreach
(
fname IN ITEMS unistd stdint inttypes sys/types sys/stat fnmatch
)
string
(
TOUPPER
"
${
fname
}
"
FNAME
)
...
...
@@ -238,13 +248,13 @@ else ()
check_include_file_cxx
(
"
${
fname
}
.h"
HAVE_
${
FNAME
}
_H
)
endif
()
endforeach
()
if
(
NOT HAVE_FNMATCH_H AND OS_WINDOWS
)
check_include_file_cxx
(
"shlwapi.h"
HAVE_SHLWAPI_H
)
endif
()
# the following are used in #if directives not #ifdef
bool_to_int
(
HAVE_STDINT_H
)
bool_to_int
(
HAVE_SYS_TYPES_H
)
bool_to_int
(
HAVE_INTTYPES_H
)
if
(
NOT HAVE_FNMATCH_H AND OS_WINDOWS
)
check_include_file_cxx
(
"shlwapi.h"
HAVE_SHLWAPI_H
)
endif
()
endif
()
gflags_define
(
STRING INTTYPES_FORMAT
"Format of integer types:
\"
C99
\"
(uint32_t),
\"
BSD
\"
(u_int32_t),
\"
VC7
\"
(__int32)"
""
)
...
...
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