summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentVariables.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-08-21 13:54:36 (GMT)
committerBrad King <brad.king@kitware.com>2008-08-21 13:54:36 (GMT)
commit990c6b0b908a3ecad3c5038953752dd2256b957d (patch)
tree386158a87531d8868307b41411ff0739ac1f9fcb /Source/cmDocumentVariables.cxx
parent5fda12b73f367844ba1a664584afd7cc268dc667 (diff)
downloadCMake-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 'Source/cmDocumentVariables.cxx')
-rw-r--r--Source/cmDocumentVariables.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index cf228f1..25ef0b2 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -736,6 +736,24 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Set to true when the host system is Windows and on cygwin.",false,
"Variables That Describe the System");
+ cm->DefineProperty
+ ("CMAKE_OBJECT_PATH_MAX", cmProperty::VARIABLE,
+ "Maximum object file full-path length allowed by native build tools.",
+ "CMake computes for every source file an object file name that is "
+ "unique to the source file and deterministic with respect to the "
+ "full path to the source file. "
+ "This allows multiple source files in a target to share the same name "
+ "if they lie in different directories without rebuilding when one is "
+ "added or removed. "
+ "However, it can produce long full paths in a few cases, so CMake "
+ "shortens the path using a hashing scheme when the full path to an "
+ "object file exceeds a limit. "
+ "CMake has a built-in limit for each platform that is sufficient for "
+ "common tools, but some native tools may have a lower limit. "
+ "This variable may be set to specify the limit explicitly. "
+ "The value must be an integer no less than 128.",false,
+ "Variables That Describe the System");
+
// Variables that affect the building of object files and
// targets.
//