Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
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
googletest
Commits
cf40604c
Commit
cf40604c
authored
Feb 27, 2013
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds -pthread and switches -I to -isystem in build instructions;
also pulls in the latest gtest revision (r638).
parent
40fa8ffc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
README
README
+16
-8
Makefile
make/Makefile
+5
-2
No files found.
README
View file @
cf40604c
...
...
@@ -170,23 +170,31 @@ called by Visual Studio and Xcode) to compile
with
${
GTEST_DIR
}/
include
,
${
GTEST_DIR
},
${
GMOCK_DIR
}/
include
,
and
${
GMOCK_DIR
}
${
GTEST_DIR
}/
include
and
${
GMOCK_DIR
}/
include
in
the
header
search
path
.
Assuming
a
Linux
-
like
system
and
gcc
,
in
the
system
header
search
path
,
and
${
GTEST_DIR
}
and
${
GMOCK_DIR
}
in
the
normal
header
search
path
.
Assuming
a
Linux
-
like
system
and
gcc
,
something
like
the
following
will
do
:
g
++
-
I
${
GTEST_DIR
}/
include
-
I
${
GTEST_DIR
}
-
I
${
GMOCK_DIR
}/
include
\
-
I
${
GMOCK_DIR
}
-
c
${
GTEST_DIR
}/
src
/
gtest
-
all
.
cc
g
++
-
I
${
GTEST_DIR
}/
include
-
I
${
GTEST_DIR
}
-
I
${
GMOCK_DIR
}/
include
\
-
I
${
GMOCK_DIR
}
-
c
${
GMOCK_DIR
}/
src
/
gmock
-
all
.
cc
g
++
-
isystem
${
GTEST_DIR
}/
include
-
I
${
GTEST_DIR
}
\
-
isystem
${
GMOCK_DIR
}/
include
-
I
${
GMOCK_DIR
}
\
-
pthread
-
c
${
GTEST_DIR
}/
src
/
gtest
-
all
.
cc
g
++
-
isystem
${
GTEST_DIR
}/
include
-
I
${
GTEST_DIR
}
\
-
isystem
${
GMOCK_DIR
}/
include
-
I
${
GMOCK_DIR
}
\
-
pthread
-
c
${
GMOCK_DIR
}/
src
/
gmock
-
all
.
cc
ar
-
rv
libgmock
.
a
gtest
-
all
.
o
gmock
-
all
.
o
(
We
need
-
pthread
as
Google
Test
and
Google
Mock
use
threads
.)
Next
,
you
should
compile
your
test
source
file
with
${
GTEST_DIR
}/
include
and
${
GMOCK_DIR
}/
include
in
the
header
search
path
,
and
link
it
with
gmock
and
any
other
necessary
libraries
:
g
++
-
I
${
GTEST_DIR
}/
include
-
I
${
GMOCK_DIR
}/
include
\
path
/
to
/
your_test
.
cc
libgmock
.
a
-
o
your_test
g
++
-
isystem
${
GTEST_DIR
}/
include
-
isystem
${
GMOCK_DIR
}/
include
\
-
pthread
path
/
to
/
your_test
.
cc
libgmock
.
a
-
o
your_test
As
an
example
,
the
make
/
directory
contains
a
Makefile
that
you
can
use
to
build
Google
Mock
on
systems
where
GNU
make
is
available
...
...
make/Makefile
View file @
cf40604c
...
...
@@ -27,10 +27,13 @@ GMOCK_DIR = ..
USER_DIR
=
../test
# Flags passed to the preprocessor.
CPPFLAGS
+=
-I
$(GTEST_DIR)
/include
-I
$(GMOCK_DIR)
/include
# Set Google Test and Google Mock's header directories as system
# directories, such that the compiler doesn't generate warnings in
# these headers.
CPPFLAGS
+=
-isystem
$(GTEST_DIR)
/include
-isystem
$(GMOCK_DIR)
/include
# Flags passed to the C++ compiler.
CXXFLAGS
+=
-g
-Wall
-Wextra
CXXFLAGS
+=
-g
-Wall
-Wextra
-pthread
# All tests produced by this Makefile. Remember to add new tests you
# created to the list.
...
...
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