summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAndreas Schuh <andreas.schuh.84@gmail.com>2014-03-17 21:15:52 +0000
committerAndreas Schuh <andreas.schuh.84@gmail.com>2014-03-17 21:15:52 +0000
commit0d9486f9a3a4f0cb87666ad4c5a0a211ff948d63 (patch)
treecb977adc1bfb06876cfeaa800a6184f4b9e5d2ab /cmake
parent505686bd7aa0a5d6c2dc13b690a17f342bcf1c62 (diff)
downloadgflags-0d9486f9a3a4f0cb87666ad4c5a0a211ff948d63.tar.gz
gflags-0d9486f9a3a4f0cb87666ad4c5a0a211ff948d63.tar.bz2
gflags-0d9486f9a3a4f0cb87666ad4c5a0a211ff948d63.zip
Pass --test_tmpdir and --srcdir to unittests.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/utils.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/utils.cmake b/cmake/utils.cmake
index 0ec17ca..111cd3d 100644
--- a/cmake/utils.cmake
+++ b/cmake/utils.cmake
@@ -70,13 +70,15 @@ endfunction ()
# expected exit status. Moreover, the execute_test.cmake script
# sets environment variables needed by the --fromenv/--tryfromenv tests.
macro (add_gflags_test name expected_rc expected_output unexpected_output cmd)
+ set (args "--test_tmpdir=${PROJECT_BINARY_DIR}/Testing/Temporary"
+ "--srcdir=${PROJECT_SOURCE_DIR}/test")
add_test (
NAME ${name}
- COMMAND "${CMAKE_COMMAND}" "-DCOMMAND:STRING=$<TARGET_FILE:${cmd}>;${ARGN}"
+ COMMAND "${CMAKE_COMMAND}" "-DCOMMAND:STRING=$<TARGET_FILE:${cmd}>;${args};${ARGN}"
"-DEXPECTED_RC:STRING=${expected_rc}"
"-DEXPECTED_OUTPUT:STRING=${expected_output}"
"-DUNEXPECTED_OUTPUT:STRING=${unexpected_output}"
-P "${PROJECT_SOURCE_DIR}/cmake/execute_test.cmake"
- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/test"
+ WORKING_DIRECTORY "${GFLAGS_FLAGFILES_DIR}"
)
endmacro ()