diff options
author | Brad King <brad.king@kitware.com> | 2013-01-11 15:57:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-11 15:57:39 (GMT) |
commit | 8ff1d4714fb7cd42eb3cd8db041b529e433eb7c8 (patch) | |
tree | 0df377a2dee34cdd9ad864274627bfd6ce00f84f /Source/cmake.cxx | |
parent | 5929086634e362d03d02124eea5ee14919ae5a0f (diff) | |
download | CMake-8ff1d4714fb7cd42eb3cd8db041b529e433eb7c8.zip CMake-8ff1d4714fb7cd42eb3cd8db041b529e433eb7c8.tar.gz CMake-8ff1d4714fb7cd42eb3cd8db041b529e433eb7c8.tar.bz2 |
CMake: Skip empty link.txt lines (#13845)
In the implementation of "cmake -E cmake_link_script", skip lines from
the input file that are empty or contain only whitespace. Do not try to
run a child with no command line.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index a44c825..0acd2fc 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -3299,6 +3299,12 @@ int cmake::ExecuteLinkScript(std::vector<std::string>& args) int result = 0; while(result == 0 && cmSystemTools::GetLineFromStream(fin, command)) { + // Skip empty command lines. + if(command.find_first_not_of(" \t") == command.npos) + { + continue; + } + // Setup this command line. const char* cmd[2] = {command.c_str(), 0}; cmsysProcess_SetCommand(cp, cmd); |