mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 11:50:11 -05:00
30 lines
564 B
CMake
30 lines
564 B
CMake
enable_language(CXX)
|
|
include(GoogleTest)
|
|
|
|
enable_testing()
|
|
|
|
include(xcode_sign_adhoc.cmake)
|
|
|
|
add_executable(test_workdir test_workdir.cpp)
|
|
xcode_sign_adhoc(test_workdir)
|
|
|
|
set(workdir "${CMAKE_CURRENT_BINARY_DIR}/with spaces")
|
|
file(WRITE ${workdir}/test_list_output.txt [=[
|
|
WorkDirWithSpaces.
|
|
test1
|
|
test2
|
|
]=])
|
|
file(WRITE ${workdir}/test_output.txt [=[
|
|
Some output text for the test.
|
|
]=])
|
|
|
|
gtest_add_tests(
|
|
TARGET test_workdir
|
|
WORKING_DIRECTORY "${workdir}"
|
|
)
|
|
gtest_discover_tests(
|
|
test_workdir
|
|
TEST_SUFFIX _discovered
|
|
WORKING_DIRECTORY "${workdir}"
|
|
)
|