Просмотр исходного кода

ENH: In superbuild.cmake, CTK-build step can be excluded if SUPERBUILD_EXCLUDE_CTKBUILD_TARGET is set to ON.

The variable should be set to ON in case a ctest driver script is
using subproject and want to configure/build/test each one of them
separately. In that specific case, we want to make sure the configure and
build error are not reported when the project is configure/build from the top
level.
Jean-Christophe Fillion-Robin лет назад: 15
Родитель
Сommit
6f42f58ab6
1 измененных файлов с 13 добавлено и 11 удалено
  1. 13 11
      SuperBuild.cmake

+ 13 - 11
SuperBuild.cmake

@@ -323,17 +323,19 @@ ExternalProject_Add(${proj}
 #-----------------------------------------------------------------------------
 # CTK
 #
-SET(proj CTK-build)
-ExternalProject_Add(${proj}
-  DOWNLOAD_COMMAND ""
-  CMAKE_GENERATOR ${gen}
-  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
-  BINARY_DIR CTK-build
-  #BUILD_COMMAND ""
-  INSTALL_COMMAND ""
-  DEPENDS
-    "CTK-Configure"
-  )
+#MESSAGE(STATUS SUPERBUILD_EXCLUDE_CTKBUILD_TARGET:${SUPERBUILD_EXCLUDE_CTKBUILD_TARGET})
+IF(NOT DEFINED SUPERBUILD_EXCLUDE_CTKBUILD_TARGET OR NOT SUPERBUILD_EXCLUDE_CTKBUILD_TARGET)
+  SET(proj CTK-build)
+  ExternalProject_Add(${proj}
+    DOWNLOAD_COMMAND ""
+    CMAKE_GENERATOR ${gen}
+    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
+    BINARY_DIR CTK-build
+    INSTALL_COMMAND ""
+    DEPENDS
+      "CTK-Configure"
+    )
+ENDIF()
 
 #-----------------------------------------------------------------------------
 # Custom target allowing to drive the build of CTK project itself