CMAKE_OBJECT_PATH_MAX does it also apply to dependency files ('.d') ?

I’m getting an error that I believe is due to a very long pathname:

[1711/2435 12.4/sec] Building CXX object eSW/Qt/AEPPApps/ManufacturingCalibration/CMakeFiles/ManufacturingCalibration.dir/.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp.o
FAILED: eSW/Qt/AEPPApps/ManufacturingCalibration/CMakeFiles/ManufacturingCalibration.dir/.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp.o 
C:\qnx700\host\win64\x86_64\usr\bin\q++.exe -Vgcc_ntoarmv7le -Wc,-isysroot,C:/qnx700/target/qnx7 -lang-c++ -DCMAKE_BUILD -DMANUFACTURINGCALIBRATIONPLUGIN_LIBRARY -DManufacturingCalibration_EXPORTS -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NOSTANDARDSHELL_UI_MODEL -DQT_NO_ACCESSIBILITY -DQT_NO_CLIPBOARD -DQT_NO_DEBUG -DQT_NO_NATIVE_GESTURES -DQT_NO_WINCE_NUIOUSER -DQT_NO_WINCE_SHELLSDK -DQT_QML_LIB -DUNICODE -D_UNICODE -IC:/Projects/build-AEPP-Qt5_6_3_QNX_Arm-Release/eSW/Qt/AEPPApps/ManufacturingCalibration/ManufacturingCalibration_autogen/include -IC:/qnx700/target/qnx7/usr/include/io -IC:/qnx700/target/qnx7/usr/include/c++/v1 -IC:/Projects/AEPP/./BSPs/QNX7/BSP/src/hardware/startup/lib/public/arm -IC:/Qt/5.6.3/qnx7_armv7/include/QtQml/5.6.3 -IC:/Qt/5.6.3/qnx7_armv7/include/QtQml/5.6.3/QtQml -IC:/Qt/5.6.3/qnx7_armv7/include/QtCore/5.6.3 -IC:/Qt/5.6.3/qnx7_armv7/include/QtCore/5.6.3/QtCore -IC:/Projects/AEPP/eSW/Qt/AEPPApps/ManufacturingCalibration/. -IC:/Projects/AEPP/eSW/Qt/CPPLibs/BQIF/. -IC:/Projects/AEPP/eSW/Qt/CPPLibs/Preferences/. -IC:/Projects/AEPP/CoreCode/System/Common/BradyUtils/. -IC:/Projects/AEPP/eSW/Qt/CPPLibs/AppData/. -IC:/Projects/AEPP/CoreCode/PropertyInterCommunicationLibrary/. -IC:/Projects/AEPP/CoreCode/System/Common/. -IC:/Projects/AEPP/CoreCode/System/Properties/. -IC:/Projects/AEPP/CoreCode/System/Networking/PICL -IC:/Projects/AEPP/CoreCode/System/OS/. -IC:/Projects/AEPP/CoreCode/System/OS/POSIX/. -IC:/Projects/AEPP/CoreCode/System/OS/QNX7/. -IC:/Projects/AEPP/CoreCode/System/SoC/Am335x/Qnx/. -IC:/Projects/AEPP/CoreCode/System/SoC/Am335x/. -IC:/Projects/AEPP/CoreCode/System/SoC/. -IC:/Projects/AEPP/CoreCode/System/SoC/Am335x -IC:/Projects/AEPP/CoreCode/System/Peripherals/. -IC:/Projects/AEPP/CoreCode/System/Upgrade/. -IC:/Projects/AEPP/CoreCode/System/ImageUtils/. -IC:/Projects/AEPP/CoreCode/System/ThirdParty/. -IC:/Projects/AEPP/Projects/rapidjson/include/rapidjson/. -IC:/Projects/AEPP/eSW/Qt/CPPLibs/PrinterIF/. -Wp,-isystem,C:/Qt/5.6.3/qnx7_armv7/include -Wp,-isystem,C:/Qt/5.6.3/qnx7_armv7/include/QtCore -Wp,-isystem,C:/Qt/5.6.3/qnx7_armv7/./mkspecs/qnx-armle-v7-qcc -Wp,-isystem,C:/Qt/5.6.3/qnx7_armv7/include/QtQml -Wp,-isystem,C:/Qt/5.6.3/qnx7_armv7/include/QtNetwork -O3 -DNDEBUG -O3 -DNDEBUG -fPIC -fno-operator-names -Wall -Werror -Wno-error=format= -Wno-error=sequence-point -Wno-error=unknown-pragmas -fPIC -std=gnu++14 -Wp,-MD,eSW\Qt\AEPPApps\ManufacturingCalibration\CMakeFiles\ManufacturingCalibration.dir\.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp.o.d -Wp,-MT,eSW/Qt/AEPPApps/ManufacturingCalibration/CMakeFiles/ManufacturingCalibration.dir/.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp.o -Wp,-MF,eSW\Qt\AEPPApps\ManufacturingCalibration\CMakeFiles\ManufacturingCalibration.dir\.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp.o.d -o eSW/Qt/AEPPApps/ManufacturingCalibration/CMakeFiles/ManufacturingCalibration.dir/.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp.o -c C:/Projects/build-AEPP-Qt5_6_3_QNX_Arm-Release/eSW/Qt/AEPPApps/ManufacturingCalibration/.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp
C:/Projects/build-AEPP-Qt5_6_3_QNX_Arm-Release/eSW/Qt/AEPPApps/ManufacturingCalibration/.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp:412:1: fatal error: opening dependency file eSW\Qt\AEPPApps\ManufacturingCalibration\CMakeFiles\ManufacturingCalibration.dir\.._.._.._.._.._build-AEPP-Qt5_6_3_QNX_Arm-Release_eSW_Qt_AEPPApps_ManufacturingCalibration_ManufacturingCalibrationButton_qml.cpp.o.d: No such file or directory
 } // namespace QtQuickCompilerGeneratedModule
 ^

I read about CMAKE_OBJECT_PATH_MAX but it seems like in addition to object files that dependency files would have the same issue. Is that what I’m seeing here? I increased the CMAKE_OBJECT_PATH_MAX and also enabled Windows long paths but that didn’t seem to have any effect on .d files. Can anyone confirm this?

The extra long path arises because of a workaround I implemented that auto-generates a qrc file in the binary folder. This is done to satisfy the Qt5 build and its use of qtquick_compiler_add_resources. The same code also is fed to a Qt6 build which uses qml_add_module that does not use a qrc file for the same list of QML and image files.

FWIW I seem to have worked around this by being slightly smarter about avoiding long paths that create long mangled filenames.