summaryrefslogtreecommitdiff
path: root/src/test/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2020-11-22 10:43:25 -0500
committerAllen Winter <allen.winter@kdab.com>2020-11-22 10:43:25 -0500
commit47f9a47ab0f3cad8d7d8de3960319de46a7a446c (patch)
tree931af839e0fda73e8feae6bcd418c2d9eb484d7c /src/test/CMakeLists.txt
parent6f9155642a6ec738d918152d4b677d9d150e0380 (diff)
downloadlibical-git-47f9a47ab0f3cad8d7d8de3960319de46a7a446c.tar.gz
buildsystem - allow icalrecurtests on Windows
if cmake is v3.14+ we can use compare_files --ignore-eol option which makes the comparison with the reference files work on Windows.
Diffstat (limited to 'src/test/CMakeLists.txt')
-rw-r--r--src/test/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
index a5685cd5..7f327281 100644
--- a/src/test/CMakeLists.txt
+++ b/src/test/CMakeLists.txt
@@ -172,7 +172,12 @@ testme(builtin_timezones "${builtin_timezones_SRCS}")
########### next target ###############
-if(NOT WIN32) #since we currently do not have a Windows reference file
+#cmake v3.14 compare_files can ignore line endings => needed on Windows
+set(CMAKE_COMPARE_FILES_IGNORE_EOL FALSE)
+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 USE_32BIT_TIME_T) #tests for years greater than 2037 will fail
set(icalrecurtest_SRCS icalrecur_test.c)
add_executable(icalrecurtest ${icalrecurtest_SRCS})