diff options
author | Brad King <brad.king@kitware.com> | 2017-04-21 12:51:42 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-04-21 12:51:49 (GMT) |
commit | 718daeb4e6b93527ea8fa0b87091008737b0a897 (patch) | |
tree | 954f79f4e7808943a0954add77a80ea1eec1a316 /Source/cmMakefileTargetGenerator.cxx | |
parent | b5a5b227f9a3d88e1c493427e3983aee28c284eb (diff) | |
parent | bbb5c3efe2a17d046506b7c27008c77ea244f0bc (diff) | |
download | CMake-718daeb4e6b93527ea8fa0b87091008737b0a897.zip CMake-718daeb4e6b93527ea8fa0b87091008737b0a897.tar.gz CMake-718daeb4e6b93527ea8fa0b87091008737b0a897.tar.bz2 |
Merge topic 'unified-commandline-length'
bbb5c3ef Ninja,Makefile: Unify command line limit logic
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !705
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index ed38024..dd5cd7d 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -30,10 +30,6 @@ #include "cm_auto_ptr.hxx" #include "cmake.h" -#ifndef _WIN32 -#include <unistd.h> -#endif - cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target) : cmCommonTargetGenerator(target) , OSXBundleGenerator(CM_NULLPTR) @@ -1492,15 +1488,6 @@ void cmMakefileTargetGenerator::CreateLinkScript( makefile_depends.push_back(linkScriptName); } -static size_t calculateCommandLineLengthLimit() -{ -#if defined(_SC_ARG_MAX) - return ((size_t)sysconf(_SC_ARG_MAX)) - 1000; -#else - return 0; -#endif -} - bool cmMakefileTargetGenerator::CheckUseResponseFileForObjects( std::string const& l) const { @@ -1514,7 +1501,7 @@ bool cmMakefileTargetGenerator::CheckUseResponseFileForObjects( } // Check for a system limit. - if (size_t const limit = calculateCommandLineLengthLimit()) { + if (size_t const limit = cmSystemTools::CalculateCommandLineLengthLimit()) { // Compute the total length of our list of object files with room // for argument separation and quoting. This does not convert paths // relative to CMAKE_CURRENT_BINARY_DIR like the final list will be, so the |