summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-05-13 18:05:20 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-05-13 18:05:20 +0000
commit362a0cf9aff37610628d15037bf794a2e54de78d (patch)
treed207f717b28321d8001850af98aa3d886c855897 /cmake
parent20580b49fd11f0211aed7e638ac1ee657d29ee9e (diff)
downloadgoogletest-362a0cf9aff37610628d15037bf794a2e54de78d.tar.gz
Renames test script flags.
git-svn-id: http://googletest.googlecode.com/svn/trunk@431 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'cmake')
-rw-r--r--cmake/internal_utils.cmake12
1 files changed, 8 insertions, 4 deletions
diff --git a/cmake/internal_utils.cmake b/cmake/internal_utils.cmake
index dea8e16..c611025 100644
--- a/cmake/internal_utils.cmake
+++ b/cmake/internal_utils.cmake
@@ -1,3 +1,7 @@
+# NOTE: This file can be included both into Google Test's and Google Mock's
+# build scripts, so actions and functions defined here need to be
+# idempotent.
+
# Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
find_package(Threads)
@@ -174,13 +178,13 @@ endfunction()
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 AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- # ${gtest_BINARY_DIR} is known at configuration time, so we can
+ 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.
add_test(${name}
- ${PYTHON_EXECUTABLE} ${gtest_SOURCE_DIR}/test/${name}.py
- --gtest_build_dir=${gtest_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
+ ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/${name}.py
+ --build_dir=${CMAKE_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
endif()
endfunction()