Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
0ae233ab
Commit
0ae233ab
authored
Feb 19, 2019
by
Jilin Zhou
Committed by
Dominic Hamon
Feb 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#766] add x-compile support for QNX SDP7 (#770)
Since googletest already supports x-compilation for QNX, it is nice to have google benchmark support it too. Fixes #766
parent
7c571338
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
CMakeLists.txt
CMakeLists.txt
+4
-0
internal_macros.h
src/internal_macros.h
+2
-0
sysinfo.cc
src/sysinfo.cc
+2
-0
No files found.
CMakeLists.txt
View file @
0ae233ab
...
@@ -183,6 +183,10 @@ else()
...
@@ -183,6 +183,10 @@ else()
add_definitions
(
-D_GNU_SOURCE=1
)
add_definitions
(
-D_GNU_SOURCE=1
)
endif
()
endif
()
if
(
QNXNTO
)
add_definitions
(
-D_QNX_SOURCE
)
endif
()
# Link time optimisation
# Link time optimisation
if
(
BENCHMARK_ENABLE_LTO
)
if
(
BENCHMARK_ENABLE_LTO
)
add_cxx_compiler_flag
(
-flto
)
add_cxx_compiler_flag
(
-flto
)
...
...
src/internal_macros.h
View file @
0ae233ab
...
@@ -70,6 +70,8 @@
...
@@ -70,6 +70,8 @@
#define BENCHMARK_OS_FUCHSIA 1
#define BENCHMARK_OS_FUCHSIA 1
#elif defined (__SVR4) && defined (__sun)
#elif defined (__SVR4) && defined (__sun)
#define BENCHMARK_OS_SOLARIS 1
#define BENCHMARK_OS_SOLARIS 1
#elif defined(__QNX__)
#define BENCHMARK_OS_QNX 1
#endif
#endif
#if defined(__ANDROID__) && defined(__GLIBCXX__)
#if defined(__ANDROID__) && defined(__GLIBCXX__)
...
...
src/sysinfo.cc
View file @
0ae233ab
...
@@ -389,6 +389,8 @@ std::string GetSystemName() {
...
@@ -389,6 +389,8 @@ std::string GetSystemName() {
#else // defined(BENCHMARK_OS_WINDOWS)
#else // defined(BENCHMARK_OS_WINDOWS)
#ifdef BENCHMARK_OS_MACOSX //Mac Doesnt have HOST_NAME_MAX defined
#ifdef BENCHMARK_OS_MACOSX //Mac Doesnt have HOST_NAME_MAX defined
#define HOST_NAME_MAX 64
#define HOST_NAME_MAX 64
#elif defined(BENCHMARK_OS_QNX)
#define HOST_NAME_MAX 154
#endif
#endif
char
hostname
[
HOST_NAME_MAX
];
char
hostname
[
HOST_NAME_MAX
];
int
retVal
=
gethostname
(
hostname
,
HOST_NAME_MAX
);
int
retVal
=
gethostname
(
hostname
,
HOST_NAME_MAX
);
...
...
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