Browse Source

Merge branch 'fix-ctk-build-step'

* fix-ctk-build-step:
  Add --config flag to CMAKE_COMMAND associated with CTK convenient target
  Superbuild - Explicitly set BUILD_COMMAND associated with CTK-Build step.
Jean-Christophe Fillion-Robin 14 years ago
parent
commit
ef4aa6a696
1 changed files with 6 additions and 3 deletions
  1. 6 3
      SuperBuild.cmake

+ 6 - 3
SuperBuild.cmake

@@ -258,12 +258,15 @@ 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.
+  # Note: Setting CONFIGURE_COMMAND to an empty command is not enough to skip configuration step, 
+  #       the BUILD_COMMAND should also be specified explicitly otherwise it will in-conditionally
+  #       default to 'make' on all platform.
   #       See _ep_get_configure_command_id and _ep_get_build_command in ExternalProject.cmake
   ExternalProject_Add(${proj}
     DOWNLOAD_COMMAND ""
-    CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo_append
+    CONFIGURE_COMMAND ""
     CMAKE_GENERATOR ${gen}
+    BUILD_COMMAND ${CMAKE_COMMAND} --build ${CTK_BINARY_DIR}/CTK-build --config ${CMAKE_CFG_INTDIR}
     SOURCE_DIR ${CTK_SOURCE_DIR}
     BINARY_DIR CTK-build
     INSTALL_COMMAND ""
@@ -276,6 +279,6 @@ ENDIF()
 # Custom target allowing to drive the build of CTK project itself
 #
 ADD_CUSTOM_TARGET(CTK
-  COMMAND ${CMAKE_COMMAND} --build ${CTK_BINARY_DIR}/CTK-build
+  COMMAND ${CMAKE_COMMAND} --build ${CTK_BINARY_DIR}/CTK-build --config ${CMAKE_CFG_INTDIR}
   WORKING_DIRECTORY ${CTK_BINARY_DIR}/CTK-build
   )