summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-05-13 18:05:20 (GMT)
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-05-13 18:05:20 (GMT)
commit3678a248d35723d5e18c7c2a78d7da5b4f5a3e57 (patch)
treed207f717b28321d8001850af98aa3d886c855897 /cmake
parent2c697f5919691d24e39c057090cabdc5ab145484 (diff)
downloadgoogletest-3678a248d35723d5e18c7c2a78d7da5b4f5a3e57.zip
googletest-3678a248d35723d5e18c7c2a78d7da5b4f5a3e57.tar.gz
googletest-3678a248d35723d5e18c7c2a78d7da5b4f5a3e57.tar.bz2
Renames test script flags.
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()