From 44620319b716ac3927eaae9cd2854d5b36eb0217 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 10 Dec 2014 15:19:13 -0500 Subject: [svn-r25879] Test if binary folder exists --- config/cmake/HDF518_Examples.cmake.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 5ebb9cd..2b3c2fd 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -12,7 +12,7 @@ set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) set(CTEST_BUILD_CONFIGURATION "Release") #set(NO_MAC_FORTRAN "true") -#set(BUILD_OPTIONS ""${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON) set(CTEST_USE_TAR_SOURCE "true") @@ -87,8 +87,11 @@ endif(CTEST_USE_TAR_SOURCE) ## Clear the build directory ## -------------------------- set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) -file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") -ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) +if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) +else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") # Use multiple CPU cores to build include(ProcessorCount) -- cgit v0.12