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
b3a1f87f
Commit
b3a1f87f
authored
Sep 01, 2017
by
Gennadiy Civil
Committed by
GitHub
Sep 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1235 from aninf-wo/hethi/issue-1175-cmake-build-type
use cmake build type defined in .travis.yml for travis builds
parents
69e794ca
2a720ac1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
.travis.yml
.travis.yml
+2
-2
internal_utils.cmake
googletest/cmake/internal_utils.cmake
+21
-11
travis.sh
travis.sh
+1
-0
No files found.
.travis.yml
View file @
b3a1f87f
...
@@ -36,8 +36,8 @@ compiler:
...
@@ -36,8 +36,8 @@ compiler:
script
:
./travis.sh
script
:
./travis.sh
env
:
env
:
matrix
:
matrix
:
-
SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=
d
ebug VERBOSE=1
-
SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=
D
ebug VERBOSE=1
-
SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=
d
ebug VERBOSE=1 CXX_FLAGS=-std=c++11
-
SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=
D
ebug VERBOSE=1 CXX_FLAGS=-std=c++11
notifications
:
notifications
:
email
:
false
email
:
false
sudo
:
false
sudo
:
false
googletest/cmake/internal_utils.cmake
View file @
b3a1f87f
...
@@ -236,23 +236,33 @@ endfunction()
...
@@ -236,23 +236,33 @@ endfunction()
# creates a Python test with the given name whose main module is in
# creates a Python test with the given name whose main module is in
# test/name.py. It does nothing if Python is not installed.
# test/name.py. It does nothing if Python is not installed.
function
(
py_test name
)
function
(
py_test name
)
# We are not supporting Python tests on Linux yet as they consider
# all Linux environments to be google3 and try to use google3 features.
if
(
PYTHONINTERP_FOUND
)
if
(
PYTHONINTERP_FOUND
)
# ${CMAKE_BINARY_DIR} is known at configuration time, so we can
# directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
# only at ctest runtime (by calling ctest -c <Configuration>), so
# we have to escape $ to delay variable substitution here.
if
(
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
GREATER 3.1
)
if
(
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
GREATER 3.1
)
add_test
(
if
(
CMAKE_CONFIGURATION_TYPES
)
NAME
${
name
}
# Multi-configuration build generators as for Visual Studio save
COMMAND
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/test/
${
name
}
.py
# output in a subdirectory of CMAKE_CURRENT_BINARY_DIR (Debug,
--build_dir=
${
CMAKE_CURRENT_BINARY_DIR
}
/$<CONFIGURATION>
)
# Release etc.), so we have to provide it here.
add_test
(
NAME
${
name
}
COMMAND
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/test/
${
name
}
.py
--build_dir=
${
CMAKE_CURRENT_BINARY_DIR
}
/$<CONFIG>
)
else
(
CMAKE_CONFIGURATION_TYPES
)
# Single-configuration build generators like Makefile generators
# don't have subdirs below CMAKE_CURRENT_BINARY_DIR.
add_test
(
NAME
${
name
}
COMMAND
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/test/
${
name
}
.py
--build_dir=
${
CMAKE_CURRENT_BINARY_DIR
}
)
endif
(
CMAKE_CONFIGURATION_TYPES
)
else
(
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
GREATER 3.1
)
else
(
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
GREATER 3.1
)
# ${CMAKE_CURRENT_BINARY_DIR} is known at configuration time, so we can
# directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
# only at ctest runtime (by calling ctest -c <Configuration>), so
# we have to escape $ to delay variable substitution here.
add_test
(
add_test
(
${
name
}
${
name
}
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/test/
${
name
}
.py
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/test/
${
name
}
.py
--build_dir=
${
CMAKE_CURRENT_BINARY_DIR
}
/\
${
CTEST_CONFIGURATION_TYPE
}
)
--build_dir=
${
CMAKE_CURRENT_BINARY_DIR
}
/\
${
CTEST_CONFIGURATION_TYPE
}
)
endif
(
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
GREATER 3.1
)
endif
(
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
GREATER 3.1
)
endif
()
endif
(
PYTHONINTERP_FOUND
)
endfunction
()
endfunction
()
travis.sh
View file @
b3a1f87f
...
@@ -8,6 +8,7 @@ cmake -Dgtest_build_samples=ON \
...
@@ -8,6 +8,7 @@ cmake -Dgtest_build_samples=ON \
-Dgtest_build_tests
=
ON
\
-Dgtest_build_tests
=
ON
\
-Dgmock_build_tests
=
ON
\
-Dgmock_build_tests
=
ON
\
-DCMAKE_CXX_FLAGS
=
$CXX_FLAGS
\
-DCMAKE_CXX_FLAGS
=
$CXX_FLAGS
\
-DCMAKE_BUILD_TYPE
=
$BUILD_TYPE
\
..
..
make
make
CTEST_OUTPUT_ON_FAILURE
=
1 make
test
CTEST_OUTPUT_ON_FAILURE
=
1 make
test
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