| 1 |
enable_language(CXX) |
| 2 |
include(GoogleTest) |
| 3 |
|
| 4 |
enable_testing() |
| 5 |
|
| 6 |
include(xcode_sign_adhoc.cmake) |
| 7 |
|
| 8 |
# This creates the folder structure for the parameterized tests |
| 9 |
# to avoid handling missing folders in C++ |
| 10 |
# |
| 11 |
# This must match the match the name defined in xml_output.cpp |
| 12 |
# for every instance of tests with GetParam. |
| 13 |
# |
| 14 |
# The folder name is created from the test name (output of the line |
| 15 |
# without leading spaces: "GoogleTestXMLSpecial/cases.") and |
| 16 |
# the parts until the last slash ("case/"). These parts are concatenated. |
| 17 |
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/GoogleTestXMLSpecial/cases.case") |
| 18 |
|
| 19 |
add_executable(xml_output xml_output.cpp) |
| 20 |
xcode_sign_adhoc(xml_output) |
| 21 |
gtest_discover_tests( |
| 22 |
xml_output |
| 23 |
XML_OUTPUT_DIR ${CMAKE_BINARY_DIR} |
| 24 |
) |