[Insight-developers] problem building ITK using CMake 2.8 ExternalProject_add

kent williams norman-k-williams at uiowa.edu
Tue Apr 13 14:56:46 EDT 2010


I think that something is haywire with ITK builds in this context.   The
problem comes after checkout, where it tries to run itkmkg3states program.

cvs diff Utilities/itktiff/CMakeLists.txt
Index: Utilities/itktiff/CMakeLists.txt
===================================================================
RCS file: /cvsroot/Insight/Insight/Utilities/itktiff/CMakeLists.txt,v
retrieving revision 1.6
diff -r1.6 CMakeLists.txt
75c75
<     COMMAND 
${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/itkmkg3states${EXE_EXTENSION}
---
>    COMMAND  ${CMAKE_CURRENT_BINARY_DIR}/itkmkg3states${EXE_EXTENSION}

--------------------------------------ERROR MESSAGE----------------------

Scanning dependencies of target itkpng
[ 17%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngget.o
[ 17%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngrio.o
[ 17%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngwrite.o
[ 17%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/png.o
[ 17%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngmem.o
[ 17%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngrtran.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngtrans.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngwtran.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngerror.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngpread.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngrutil.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngwutil.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngread.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngset.o
[ 18%] Building C object Utilities/itkpng/CMakeFiles/itkpng.dir/pngwio.o
Linking C static library libitkpng.a
[ 18%] Built target itkpng
Scanning dependencies of target itkmkg3states
[ 18%] Building C object
Utilities/itktiff/CMakeFiles/itkmkg3states.dir/mkg3states.o
Linking C executable itkmkg3states
[ 18%] Built target itkmkg3states
[ 18%] Generating tif_fax3sm.c
/bin/sh: ../../bin/itkmkg3states: No such file or directory
make[5]: *** [Utilities/itktiff/tif_fax3sm.c] Error 127
make[4]: *** [Utilities/itktiff/CMakeFiles/itktiff.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [ITK-prefix/src/ITK-stamp/ITK-build] Error 2
make[1]: *** [CMakeFiles/ITK.dir/all] Error 2
make: *** [all] Error 2


----------------CMakeLists.txt---------------------------------

project(build_itk_external)
cmake_policy(VERSION 2.8)
include(ExternalProject)

SET(LOCAL_CMAKE_BUILD_OPTIONS
  -DMAKECOMMAND:STRING=${MAKECOMMAND}
  -DCMAKE_SKIP_RPATH:BOOL=ON
  -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
  -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}
  -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}
  -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
  -DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}
  -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}
  -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
  -DBUILD_EXAMPLES:BOOL=OFF
  -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
  -DBUILD_TESTING:BOOL=OFF
  -DCMAKE_GENERATOR:STRING=${CMAKE_GENERATOR}
  -DCMAKE_EXTRA_GENERATOR:STRING=${CMAKE_EXTRA_GENERATOR}
  -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
  -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
  -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
  -DCMAKE_BUNDLE_OUTPUT_DIRECTORY:PATH=${CMAKE_BUNDLE_OUTPUT_DIRECTORY}
  -DDART_TESTING_TIMEOUT:STRING=${DART_TESTING_TIMEOUT}
  -DMEMORYCHECK_COMMAND_OPTIONS:STRING=${MEMORYCHECK_COMMAND_OPTIONS}
  -DMEMORYCHECK_COMMAND:PATH=${MEMORYCHECK_COMMAND}
  -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
  -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
  -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
  -DSITE:STRING=${SITE}
  -DBUILDNAME:STRING=${BUILDNAME}
  ${QT_CMAKE_FLAGS}
)
#
# build ITK
set(ITK_DEPEND ITK)
set(proj ITK)
ExternalProject_add(${proj}
CVS_REPOSITORY ":pserver:anoncvs at www.vtk.org:/cvsroot/Insight"
CVS_TAG -r ITK-3-16
CVS_MODULE "Insight"
CMAKE_ARGS ${LOCAL_CMAKE_BUILD_OPTIONS}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
UPDATE_COMMAND ""
)





More information about the Insight-developers mailing list