From 13cb5df52ca6f9365c16d711d7b412c30f4acff9 Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Mon, 14 Sep 2020 09:58:19 -0400 Subject: [PATCH 1/2] Only add the path from the source external data if it exists --- CMake/sitkExternalData.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMake/sitkExternalData.cmake b/CMake/sitkExternalData.cmake index 0a5b8822d0..00b344b128 100644 --- a/CMake/sitkExternalData.cmake +++ b/CMake/sitkExternalData.cmake @@ -17,10 +17,12 @@ if(NOT ExternalData_OBJECT_STORES) set(ExternalData_OBJECT_STORES "${CMAKE_BINARY_DIR}/ExternalData/Objects") file(MAKE_DIRECTORY "${ExternalData_OBJECT_STORES}") endif() -list(APPEND ExternalData_OBJECT_STORES - # Local data store populated by the ITK pre-commit hook - "${SimpleITK_SOURCE_DIR}/.ExternalData" - ) +if (DEFINED SimpleITK_SOURCE_DIR AND EXISTS "${SimpleITK_SOURCE_DIR}/.ExternalData") + # Add source directory path + list(APPEND ExternalData_OBJECT_STORES + "${SimpleITK_SOURCE_DIR}/.ExternalData" + ) +endif() set(ExternalData_BINARY_ROOT ${CMAKE_BINARY_DIR}/ExternalData) From 28354815c3af0ace729c2dda1c83689e7bf3a4c0 Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Mon, 14 Sep 2020 09:59:16 -0400 Subject: [PATCH 2/2] Fix typo in CMake file --- CMake/sitkLanguageOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake/sitkLanguageOptions.cmake b/CMake/sitkLanguageOptions.cmake index 256c3cc56f..ebfb450cf3 100644 --- a/CMake/sitkLanguageOptions.cmake +++ b/CMake/sitkLanguageOptions.cmake @@ -26,7 +26,7 @@ mark_as_advanced(WRAP_DEFAULT) # Modified Variables: # - _do_find_package - always defined, true if find_pacakge for # languages should be run. -# - _find_package_extra_args - may be set to `REQUIRED` of `QUIET` as +# - _find_package_extra_args - may be set to `REQUIRED` or `QUIET` as # needed. # - WRAP__DEFAULT - may be set to `ON` or `OFF` if it # can be determined with out a find_package call