diff options
author | Brad King <brad.king@kitware.com> | 2008-08-21 13:54:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-08-21 13:54:36 (GMT) |
commit | 990c6b0b908a3ecad3c5038953752dd2256b957d (patch) | |
tree | 386158a87531d8868307b41411ff0739ac1f9fcb /Tests | |
parent | 5fda12b73f367844ba1a664584afd7cc268dc667 (diff) | |
download | CMake-990c6b0b908a3ecad3c5038953752dd2256b957d.zip CMake-990c6b0b908a3ecad3c5038953752dd2256b957d.tar.gz CMake-990c6b0b908a3ecad3c5038953752dd2256b957d.tar.bz2 |
ENH: Allow custom limit on object file path length
Some native build tools, particularly those for cross compiling, may
have a limit on the length of the full path to an object file name that
is lower than the platform otherwise supports. This change allows the
limit to be set by the project toolchain file through the variable
CMAKE_OBJECT_PATH_MAX.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt index 57c429e..9f7b868 100644 --- a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt +++ b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt @@ -10,8 +10,11 @@ IF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") GET_FILENAME_COMPONENT(DEEPDIR ${OutOfSource_BINARY_DIR}/../OutOfSourceDeep/deeper ABSOLUTE) - # The maximum allowed path length on Windows is near this value. - SET(MAXPATH "250") + # Test giving the generator a custom limit. + SET(CMAKE_OBJECT_PATH_MAX 220) + + # Use a separate variable for computation. + SET(MAXPATH "${CMAKE_OBJECT_PATH_MAX}") # VS8 adds "OutOfSource/SubDir/OutOfSourceSubdir/../../../" to the # path of the source file for no good reason. Reduce the length |