summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GoogleTest/Launcher.cmake
blob: 11ba87e36d473080e565ad6338498515a751e01f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
enable_language(C)
include(GoogleTest)

enable_testing()

include(xcode_sign_adhoc.cmake)

add_executable(test_launcher test_launcher.c)

add_executable(launcher_test launcher_test.c)
xcode_sign_adhoc(launcher_test)
set(launcher
  "$<TARGET_FILE:test_launcher>"
  ""   # Verify CMP0178's handling of an empty list item
  "launcherparam"
  "--"
)
set_property(TARGET launcher_test PROPERTY TEST_LAUNCHER "${launcher}")
set(emulator
  "$<TARGET_FILE:test_launcher>"
  ""   # Verify CMP0178's handling of an empty list item
  "emulatorparam"
  "--"
)
set_property(TARGET launcher_test PROPERTY CROSSCOMPILING_EMULATOR "${emulator}")

gtest_discover_tests(
  launcher_test
  EXTRA_ARGS a "" b
)

gtest_add_tests(
  TARGET launcher_test
  EXTRA_ARGS a "" b
)