[cmake-developers] ITK NIfTI broken Oct 6

Brad King brad.king at kitware.com
Tue Oct 13 11:34:39 EDT 2015


On 10/12/2015 01:48 PM, Stephen Kelly wrote:
>  Subdirs: Initialize from parent before configuring.
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dac31b2

It seems that problem was covering another one:

 CMake Error: File /.../Modules/ThirdParty/GDCM/src/gdcm/Source/gdcmByteValue.cxx does not exist.
 CMake Error at Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/CMakeLists.txt:27 (configure_file):
   configure_file Problem configuring file

The actual source file that exists is:

 Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmByteValue.cxx

The configure_file call is:

 configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/${src}
    ${CMAKE_CURRENT_BINARY_DIR}/strict_${src}
    COPYONLY
    )

Therefore we see that CMAKE_CURRENT_SOURCE_DIR is incorrectly set.
This CMakeLists.txt file is again entered by the subdirs() command
in the parent directory.

Bisecting this required cherry-picking the above fix onto every
version tested.  However, the result points to:

 Set the current dirs on the snapshot before creating the cmMakefile.
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=360e4e1d

as the culprit.

-Brad


More information about the cmake-developers mailing list