diff options
Diffstat (limited to 'src/test/CMakeLists.txt')
-rw-r--r-- | src/test/CMakeLists.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 8bba8747..77b85a9a 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -20,6 +20,7 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) set(TEST_DATADIR "\"${CMAKE_SOURCE_DIR}/test-data\"") add_definitions(-DTEST_DATADIR=${TEST_DATADIR} -DTEST_ZONEDIR="${CMAKE_SOURCE_DIR}/zoneinfo") +# Set properties for the test macro(setprops _name) if(UNIX) set_tests_properties(${_name} PROPERTIES @@ -72,6 +73,7 @@ macro(buildme _name _srcs) endif() endmacro() +# Build the test and add the test, making sure the test properties are set macro(testme _name _srcs) buildme(${_name} "${_srcs}") add_test(NAME ${_name} COMMAND ${_name}) @@ -112,10 +114,10 @@ set(parser_SRCS icaltestparser.c) buildme(parser "${parser_SRCS}") file(GLOB TEST_FILES ${CMAKE_SOURCE_DIR}/test-data/*.ics) -foreach(TEST_FILE ${TEST_FILES}) - get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE) - add_test(NAME parser-${TEST_NAME} COMMAND parser ${TEST_FILE}) - setprops(parser-${TEST_NAME}) +foreach(test_file ${TEST_FILES}) + get_filename_component(test_name ${test_file} NAME_WE) + add_test(NAME parser-${test_name} COMMAND parser ${test_file}) + setprops(parser-${test_name}) endforeach() ########### next target ############### @@ -181,7 +183,8 @@ if(NOT ${CMAKE_VERSION} VERSION_LESS 3.14) set(CMAKE_COMPARE_FILES_IGNORE_EOL TRUE) endif() if(NOT WIN32 OR CMAKE_COMPARE_FILES_IGNORE_EOL) - if(NOT CYGWIN AND NOT USE_32BIT_TIME_T) #ignore_eol doesn't work on Cygwin. tests for years greater than 2037 will fail + #ignore_eol doesn't work on Cygwin. testing years greater than 2037 will fail + if(NOT CYGWIN AND NOT USE_32BIT_TIME_T) set(icalrecurtest_SRCS icalrecur_test.c) add_executable(icalrecurtest ${icalrecurtest_SRCS}) target_link_libraries(icalrecurtest ical icalss icalvcal) |