Blob Blame History Raw
From 31ba0efdc107d5f20734c4663ee29789ab051e15 Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
Date: Sun, 17 Feb 2019 20:41:05 +0000
Subject: [PATCH 4/7] Relocate cmake file inclusions

---
 CMakeLists.txt                 | 9 ---------
 Wrapping/Java/CMakeLists.txt   | 5 +++++
 Wrapping/Python/CMakeLists.txt | 4 ++++
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86a4f6751..c49fe738b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -620,21 +620,12 @@ if(GDCM_STANDALONE)
 endif()
 
 #-----------------------------------------------------------------------------
-# Special CMake Module required when doing Python Testing
 if(GDCM_STANDALONE)
-  if(BUILD_TESTING AND GDCM_WRAP_PYTHON)
-    include(${GDCM_SOURCE_DIR}/CMake/UsePythonTest.cmake)
-  endif()
-
 # Special CMake Module required when doing C# Testing
   if(BUILD_TESTING AND GDCM_WRAP_CSHARP)
     include(${GDCM_SOURCE_DIR}/CMake/UseCSharpTest.cmake)
   endif()
 
-# Special CMake Module required when doing Java Testing
-  if(BUILD_TESTING AND GDCM_WRAP_JAVA)
-    include(${GDCM_SOURCE_DIR}/CMake/UseJavaTest.cmake)
-  endif()
 endif()
 #-----------------------------------------------------------------------------
 # Need pthread for the following class:
diff --git a/Wrapping/Java/CMakeLists.txt b/Wrapping/Java/CMakeLists.txt
index b6301128b..e3bccc79e 100644
--- a/Wrapping/Java/CMakeLists.txt
+++ b/Wrapping/Java/CMakeLists.txt
@@ -1,3 +1,8 @@
+# Special CMake Module required when doing Java Testing
+if(BUILD_TESTING AND GDCM_WRAP_JAVA)
+    include(${GDCM_SOURCE_DIR}/CMake/UseJavaTest.cmake)
+endif()
+
 find_package(SWIG REQUIRED)
 include(${SWIG_USE_FILE})
 option(GDCM_AUTOLOAD_GDCMJNI "Automatically load gdcmjni" ON)
diff --git a/Wrapping/Python/CMakeLists.txt b/Wrapping/Python/CMakeLists.txt
index 3bf724764..f9f706c51 100644
--- a/Wrapping/Python/CMakeLists.txt
+++ b/Wrapping/Python/CMakeLists.txt
@@ -1,3 +1,7 @@
+# Special CMake Module required when doing Python Testing
+if(BUILD_TESTING AND GDCM_WRAP_PYTHON)
+    include(${GDCM_SOURCE_DIR}/CMake/UsePythonTest.cmake)
+endif()
 # Try to rebuild wrapping a little more often:
 include_regular_expression("^(gdcm).*$")
 # TODO:
-- 
2.20.1