Android Studio, NDK, CMake, Windows, CMAKE_OBJECT_PATH_MAX

109 views
Skip to first unread message

Rene Thrane

unread,
Sep 26, 2016, 8:35:18 PM9/26/16
to android-ndk
With a relative simple project I quickly ran into a CMAKE_OBJECT_PATH_MAX warning like this:

The object file directory

E:/Work/ProjectName10/Relevant/Name1/SomethingElse/Android/app/.externalNativeBuild/cmake/debug/armeabi/ProjectName10/SelfDocumentingNameHere/CMakeFiles/HeyNativeWindowPlatform.dir/

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

    source/SelfDocumentingNameHere/Android/PlatformNativeWindowAndroid.cpp.o

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


While I agree that is a very long name, a lot of the characters comes from the way cmake is handled.
For example a lot of characters are wasted on "/.externalNativeBuild/cmake" (19)


Basically I am responsible for using roughly 136 chars which is reasonable for a semi complex project the 49 others is overhead in the way its been chosen to handle cmake.

This is really something that needs to be investigated and improved upon.

Realistically for this project I could maybe shave 26 chars of the directory structure by placing the app project at a different location (and still keep it self documenting)
But that does not leave a lot of wiggle room and it really is a something that needs to be improved upon!




Reply all
Reply to author
Forward
0 new messages