From 9744efda705d0ec202021fa556c0f38aeb84aee1 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 17 Nov 2017 23:36:36 +0100 Subject: [PATCH] Ensure default testfiles directory for working copy exists --- cmake/modules/TestTarget.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/modules/TestTarget.cmake b/cmake/modules/TestTarget.cmake index ba1a3d0..c308b5f 100644 --- a/cmake/modules/TestTarget.cmake +++ b/cmake/modules/TestTarget.cmake @@ -310,6 +310,9 @@ if(CPP_UNIT_LIB OR META_NO_CPP_UNIT) # add a file called "srcdirref" to the build directory; this file contains the path of the sources so tests can easily find test files contained in the source directory file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/srcdirref" "${CMAKE_CURRENT_SOURCE_DIR}") + # ensure the directory "testfiles" exists in the build directory; tests will create the directory for working copies of testfiles there by default + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/testfiles") + set(META_HAVE_TESTS YES) else()