mirror of https://github.com/leethomason/tinyxml2
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
511 B
CMake
21 lines
511 B
CMake
cmake_minimum_required(VERSION 3.15)
|
|
project(tinyxml2-test)
|
|
|
|
enable_testing()
|
|
|
|
find_package(tinyxml2 REQUIRED)
|
|
|
|
add_executable(xmltest ../xmltest.cpp)
|
|
target_link_libraries(xmltest PRIVATE tinyxml2::tinyxml2)
|
|
|
|
add_test(
|
|
NAME xmltest
|
|
COMMAND xmltest
|
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.."
|
|
)
|
|
|
|
set_tests_properties(xmltest
|
|
PROPERTIES
|
|
PASS_REGULAR_EXPRESSION ", Fail 0"
|
|
ENVIRONMENT "PATH=$<TARGET_FILE_DIR:tinyxml2::tinyxml2>")
|