[CMake] CMAKE_OBJECT_PATH_MAX not effectively creating MD5 hashed folder names (path length issue)

Mike.Pagel at bmw.de Mike.Pagel at bmw.de
Fri Jul 27 11:31:34 EDT 2012


I know this topic has come up a number of times and we should be done and over with, but I don't seem to find the missing link to get past a non-working build.

Used environment:

* CMake 2.8.5 (<--- !!!)
* Unix Makefiles
* Cygwin (with replaced make from CMake website)
* Windows 7, 64 Bit

I read that CMake compares the length of object filenames to CMAKE_OBJECT_PATH_MAX. In case it is exceeded, it tries to create a unique MD5 hash and replace the directory used in the path. I looked at the code in cmLocalGeneratorCheckObjectName() and cmLocalGeneratorShortenObjectName(), which suggests just that.

However in my build I get warnings like shown below during CMake configure/generate and the build subsequently fails in some of these situations.

Any help is greatly appreciated.

Thanks,
Mike




c:\_dev\CMake\BdcConti_Body_CI>C:\_dev\jenkins-slave\workspace\BdcConti_Tools\CMake\2.8.5\bin\cmake.exe -G "Unix Makefiles" C:\_dev\jenkins-slave\workspace\BdcConti_Body_CI\Config\Jenkins\.\..\.. -DCMAKE_TOOLCHAIN_FILE=C:/_dev/jenkins-slave/workspace/BdcConti_Body_CI/Config/Jenkins/./../CMake/WindRiverToolchain.cmake -DZSG_BUILD_TYPE="ContinuousIntegration" -DZSG_BUILD_SCOPE="AllFeatures" -DCMAKE_OBJECT_PATH_MAX=200 -DCMAKE_COLOR_MAKEFILE=OFF 

-- Configuring done
CMake Warning in _externals/Compositions/ZsgBodyApp/Components/swc_ac_airconditioning/CMakeLists.txt:
  The object file directory

    C:/_dev/CMake/BdcConti_Body_CI/_externals/Compositions/ZsgBodyApp/Components/swc_ac_airconditioning/CMakeFiles/swc_ac_airconditioning.dir/

  has 138 characters.  The maximum full path to an object file is 200
  characters (see CMAKE_OBJECT_PATH_MAX).  Object file

    src/SwcAcClimateLevelSensorFond/SwcAcClimateLevelSensorFond.c.obj

  cannot be safely placed under this directory.  The build may not work
  correctly.



More information about the CMake mailing list