From 0a89a904b32978288f250d2d2eb11273d14270cc Mon Sep 17 00:00:00 2001 From: Brad King Date: Sun, 18 Jun 2006 11:50:40 -0400 Subject: [PATCH] BUG: Do not write link script lines that use the ':' command which is supposed to be a no-op anyway. --- Source/cmMakefileLibraryTargetGenerator.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 537f13894..0009429d9 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -567,7 +567,12 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules for(std::vector::iterator cmd = link_script_commands.begin(); cmd != link_script_commands.end(); ++cmd) { - (*linkScriptStream) << *cmd << "\n"; + // Do not write out empty commands or commands beginning in the + // shell no-op ":". + if(!cmd->empty() && (*cmd)[0] != ':') + { + (*linkScriptStream) << *cmd << "\n"; + } } }