Browse Source

Superbuild - Fix CTK-Build step

In ExternalProject.cmake, when using ExternalProject_Add, if the
command associated with the build step is not specified. One is generated
based on the configure command. In our case, since the configure
command had been explicitly disabled (set to an empty string), the build
command was then defaulting to 'make'.

Let's add a dummy configure step so that BUILD_COMMAND is properly setup.

For more details, see _ep_get_configure_command_id
and _ep_get_build_command in ExternalProject.cmake
Jean-Christophe Fillion-Robin 14 years ago
parent
commit
5a9164e754
1 changed files with 3 additions and 1 deletions
  1. 3 1
      SuperBuild.cmake

+ 3 - 1
SuperBuild.cmake

@@ -258,9 +258,11 @@ ExternalProject_Add(${proj}
 #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)
+  # Note: Let's add a dummy configure step so that BUILD_COMMAND is properly setup.
+  #       See _ep_get_configure_command_id and _ep_get_build_command in ExternalProject.cmake
   ExternalProject_Add(${proj}
     DOWNLOAD_COMMAND ""
-    CONFIGURE_COMMAND ""
+    CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo_append
     CMAKE_GENERATOR ${gen}
     SOURCE_DIR ${CTK_SOURCE_DIR}
     BINARY_DIR CTK-build