the diff tests won't work on non-APPLE systems
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 65e95ad..3181a8d 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -18,16 +18,20 @@
create_test ( cbor )
include ( CTest )
-add_executable (cn-test test.c )
-target_include_directories ( cn-test PRIVATE ../include )
-target_link_libraries ( cn-test PRIVATE cn-cbor )
+if (APPLE)
+ # difftest uses Apple-specific memory tests
+ add_executable (cn-test test.c )
+ target_include_directories ( cn-test PRIVATE ../include )
+ target_link_libraries ( cn-test PRIVATE cn-cbor )
-configure_file(cases.cbor cases.cbor COPYONLY)
-configure_file(expected.out expected.out COPYONLY)
+ configure_file(cases.cbor cases.cbor COPYONLY)
+ configure_file(expected.out expected.out COPYONLY)
-add_custom_target(difftest
- COMMAND env MallocStackLogging=true ./cn-test >new.out
- COMMAND diff new.out expected.out
- DEPENDS cn-test
- WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- COMMENT "generate differences between actual and expected output")
+ add_custom_target(difftest
+ COMMAND env MallocStackLogging=true ./cn-test >new.out
+ COMMAND diff new.out expected.out
+ DEPENDS cn-test
+ WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+ COMMENT "generate differences between actual and expected output")
+
+endif()