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
bc60b5a8
Commit
bc60b5a8
authored
Sep 07, 2017
by
Herbert Thielen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into hethi/travis-release-build
parents
55fd999a
a33b6b09
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
4 deletions
+37
-4
.travis.yml
.travis.yml
+9
-1
CMakeLists.txt
googlemock/CMakeLists.txt
+1
-1
internal_utils.cmake
googletest/cmake/internal_utils.cmake
+7
-2
travis.sh
travis.sh
+20
-0
No files found.
.travis.yml
View file @
bc60b5a8
...
...
@@ -7,7 +7,11 @@ install:
# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
-
if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
# /usr/bin/clang is 3.4, lets override with modern one.
-
if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi
-
if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="clang++-3.7" CC="clang-3.7"; ln -sf /usr/bin/ccache /$HOME/bin/$CXX; ln -sf /usr/bin/ccache /$HOME/bin/$CC; fi
# ccache on OS X needs installation first
-
if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install ccache; export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
# reset ccache statistics
-
ccache --zero-stats
-
echo ${PATH}
-
echo ${CXX}
-
${CXX} --version
...
...
@@ -30,6 +34,10 @@ os:
-
linux
-
osx
language
:
cpp
cache
:
ccache
before_cache
:
# print statistics before uploading new cache
-
ccache --show-stats
compiler
:
-
gcc
-
clang
...
...
googlemock/CMakeLists.txt
View file @
bc60b5a8
...
...
@@ -164,7 +164,7 @@ if (gmock_build_tests)
cxx_test
(
gmock_link_test gmock_main test/gmock_link2_test.cc
)
cxx_test
(
gmock_test gmock_main
)
if
(
CMAKE_USE_PTHREADS_INIT
)
if
(
DEFINED GTEST_HAS_PTHREAD
)
cxx_test
(
gmock_stress_test gmock
)
endif
()
...
...
googletest/cmake/internal_utils.cmake
View file @
bc60b5a8
...
...
@@ -48,10 +48,14 @@ endmacro()
macro
(
config_compiler_and_linker
)
# Note: pthreads on MinGW is not supported, even if available
# instead, we use windows threading primitives
unset
(
GTEST_HAS_PTHREAD
)
if
(
NOT gtest_disable_pthreads AND NOT MINGW
)
# Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
set
(
THREADS_PREFER_PTHREAD_FLAG ON
)
find_package
(
Threads
)
if
(
CMAKE_USE_PTHREADS_INIT
)
set
(
GTEST_HAS_PTHREAD ON
)
endif
()
endif
()
fix_default_compiler_settings_
()
...
...
@@ -126,7 +130,8 @@ macro(config_compiler_and_linker)
set
(
cxx_no_rtti_flags
""
)
endif
()
if
(
CMAKE_USE_PTHREADS_INIT
)
# The pthreads library is available and allowed.
# The pthreads library is available and allowed?
if
(
DEFINED GTEST_HAS_PTHREAD
)
set
(
GTEST_HAS_PTHREAD_MACRO
"-DGTEST_HAS_PTHREAD=1"
)
else
()
set
(
GTEST_HAS_PTHREAD_MACRO
"-DGTEST_HAS_PTHREAD=0"
)
...
...
@@ -159,7 +164,7 @@ function(cxx_library_with_type name type cxx_flags)
PROPERTIES
COMPILE_DEFINITIONS
"GTEST_CREATE_SHARED_LIBRARY=1"
)
endif
()
if
(
CMAKE_USE_PTHREADS_INIT
)
if
(
DEFINED GTEST_HAS_PTHREAD
)
target_link_libraries
(
${
name
}
${
CMAKE_THREAD_LIBS_INIT
}
)
endif
()
endfunction
()
...
...
travis.sh
View file @
bc60b5a8
#!/usr/bin/env sh
set
-evx
# if possible, ask for the precise number of processors,
# otherwise take 2 processors as reasonable default; see
# https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization
if
[
-x
/usr/bin/getconf
]
;
then
NPROCESSORS
=
$(
/usr/bin/getconf _NPROCESSORS_ONLN
)
else
NPROCESSORS
=
2
fi
# as of 2017-09-04 Travis CI reports 32 processors, but GCC build
# crashes if parallelized too much (maybe memory consumption problem),
# so limit to 4 processors for the time being.
if
[
$NPROCESSORS
-gt
4
]
;
then
echo
"
$0
:Note: Limiting processors to use by make from
$NPROCESSORS
to 4."
NPROCESSORS
=
4
fi
# Tell make to use the processors. No preceding '-' required.
MAKEFLAGS
=
"j
${
NPROCESSORS
}
"
export
MAKEFLAGS
env
|
sort
mkdir
build
||
true
...
...
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