Commit 61c5ef81 authored by Julien Michel's avatar Julien Michel

COMP: Ensure that temporary directory always exists before testing gdal (tests...

COMP: Ensure that temporary directory always exists before testing gdal (tests will attempt to write files in this directory)
parent 67877fc0
......@@ -16,6 +16,11 @@ set(MIN_MINOR_VERSION 10)
set(GDAL_QUALIFIES TRUE)
# Ensure that the temporary dir always exists before starting tests
if(NOT EXISTS ${TEMP})
FILE(MAKE_DIRECTORY ${TEMP})
endif()
#------------------- TESTS ---------------------
# Version of GDAL
try_run(RUN_RESULT_VERSION COMPILE_RESULT_VERSION ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalVersionTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/gdalVersion.txt ${MIN_MAJOR_VERSION} ${MIN_MINOR_VERSION})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment