cmake/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake

25 lines
734 B
CMake
Raw Normal View History

2021-09-14 00:13:48 +02:00
enable_language(CXX)
2020-08-30 11:54:41 +02:00
include(GoogleTest)
enable_testing()
2021-09-14 00:13:48 +02:00
include(xcode_sign_adhoc.cmake)
# This creates the folder structure for the paramterized tests
# to avoid handling missing folders in C++
#
# This must match the match the name defined in xml_output.cpp
# for every instance of tests with GetParam.
#
# The folder name is created fom the test name (output of the line
# without leading spaces: "GoogleTestXMLSpecial/cases.") and
# the parts until the last slash ("case/"). These parts are concatenated.
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/GoogleTestXMLSpecial/cases.case")
2020-08-30 11:54:41 +02:00
add_executable(xml_output xml_output.cpp)
2021-09-14 00:13:48 +02:00
xcode_sign_adhoc(xml_output)
2020-08-30 11:54:41 +02:00
gtest_discover_tests(
xml_output
XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}
)