summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt1
-rw-r--r--Source/cmDocumentVariables.cxx2
-rw-r--r--Source/cmLocalGenerator.cxx4
-rw-r--r--Source/cmLocalGenerator.h2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx15
-rw-r--r--Source/cmSetPropertyCommand.h4
-rw-r--r--Source/cmSetSourceFilesPropertiesCommand.h36
-rw-r--r--Source/cmStandardIncludes.cxx16
-rw-r--r--Source/cmStandardIncludes.h3
-rw-r--r--Source/kwsys/ProcessUNIX.c11
-rw-r--r--Source/kwsys/ProcessWin32.c8
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
12 files changed, 70 insertions, 34 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index dc73cec..dbbb558 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -111,6 +111,7 @@ ENDIF(CMAKE_USE_ELF_PARSER)
# Sources for CMakeLib
#
SET(SRCS
+ cmStandardIncludes.cxx
cmBootstrapCommands.cxx
cmCacheManager.cxx
cmCacheManager.h
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 2eab50c..2ed959f 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1324,6 +1324,8 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_<LANG>_LINK_FLAGS",
cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG",
+ cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_<LANG>_STANDARD_LIBRARIES",
cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_<LANG>_STANDARD_LIBRARIES_INIT",
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index fd3508e..13d875f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2249,6 +2249,10 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const char* source,
}
result = this->EscapeForShell(result.c_str(), true, false);
}
+ else if(output == RESPONSE)
+ {
+ result = this->EscapeForShell(result.c_str(), false, false);
+ }
return result;
}
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 4c2fc22..43bf1e7 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -102,7 +102,7 @@ public:
* path setting
*/
enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
- enum OutputFormat { UNCHANGED, MAKEFILE, SHELL };
+ enum OutputFormat { UNCHANGED, MAKEFILE, SHELL, RESPONSE };
std::string ConvertToOutputFormat(const char* source, OutputFormat output);
std::string Convert(const char* remote, RelativeRoot local,
OutputFormat output = UNCHANGED,
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index e1f2f8b..d5d6585 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1330,7 +1330,7 @@ public:
this->NextObject =
this->LocalGenerator->Convert(obj.c_str(),
cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::SHELL);
+ cmLocalGenerator::RESPONSE);
// Roll over to next string if the limit will be exceeded.
if(this->LengthLimit != std::string::npos &&
@@ -1624,6 +1624,17 @@ cmMakefileTargetGenerator
std::vector<std::string> object_strings;
this->WriteObjectsStrings(object_strings, responseFileLimit);
+ // Lookup the response file reference flag.
+ std::string responseFlagVar = "CMAKE_";
+ responseFlagVar += this->Target->GetLinkerLanguage(this->ConfigName);
+ responseFlagVar += "_RESPONSE_FILE_LINK_FLAG";
+ const char* responseFlag =
+ this->Makefile->GetDefinition(responseFlagVar.c_str());
+ if(!responseFlag)
+ {
+ responseFlag = "@";
+ }
+
// Write a response file for each string.
const char* sep = "";
for(unsigned int i = 0; i < object_strings.size(); ++i)
@@ -1641,7 +1652,7 @@ cmMakefileTargetGenerator
sep = " ";
// Reference the response file.
- buildObjs += "@";
+ buildObjs += responseFlag;
buildObjs += this->Convert(objects_rsp.c_str(),
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL);
diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h
index 853e7ba..c477bb7 100644
--- a/Source/cmSetPropertyCommand.h
+++ b/Source/cmSetPropertyCommand.h
@@ -66,7 +66,9 @@ public:
"directory (already processed by CMake) may be named by full or "
"relative path.\n"
"TARGET scope may name zero or more existing targets.\n"
- "SOURCE scope may name zero or more source files.\n"
+ "SOURCE scope may name zero or more source files. "
+ "Note that source file properties are visible only to targets "
+ "added in the same directory (CMakeLists.txt).\n"
"TEST scope may name zero or more existing tests.\n"
"CACHE scope must name zero or more cache existing entries.\n"
"The required PROPERTY option is immediately followed by the name "
diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h
index 7182152..392f168 100644
--- a/Source/cmSetSourceFilesPropertiesCommand.h
+++ b/Source/cmSetSourceFilesPropertiesCommand.h
@@ -48,35 +48,15 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " set_source_files_properties(file1 file2 ...\n"
+ " set_source_files_properties([file1 [file2 [...]]]\n"
" PROPERTIES prop1 value1\n"
- " prop2 value2 ...)\n"
- "Set properties on a file. The syntax for the command is to list all "
- "the files you want "
- "to change, and then provide the values you want to set next. You "
- "can make up your own properties as well. "
- "The following are used by CMake. "
- "The ABSTRACT flag (boolean) is used by some class wrapping "
- "commands. "
- "If WRAP_EXCLUDE (boolean) is true then many wrapping commands "
- "will ignore this file. If GENERATED (boolean) is true then it "
- "is not an error if this source file does not exist when it is "
- "added to a target. Obviously, "
- "it must be created (presumably by a custom command) before the "
- "target is built. "
- "If the HEADER_FILE_ONLY (boolean) property is true then the "
- "file is not compiled. This is useful if you want to add extra "
- "non build files to an IDE. "
- "OBJECT_DEPENDS (string) adds dependencies to the object file. "
- "COMPILE_FLAGS (string) is passed to the compiler as additional "
- "command line arguments when the source file is compiled. "
- "LANGUAGE (string) CXX|C will change the default compiler used "
- "to compile the source file. The languages used need to be enabled "
- "in the PROJECT command. "
- "If SYMBOLIC (boolean) is set to true the build system will be "
- "informed that the source file is not actually created on disk but "
- "instead used as a symbolic name for a build rule.";
-
+ " [prop2 value2 [...]])\n"
+ "Set properties associated with source files using a key/value "
+ "paired list. "
+ "See properties documentation for those known to CMake. "
+ "Unrecognized properties are ignored. "
+ "Source file properties are visible only to targets "
+ "added in the same directory (CMakeLists.txt).";
}
cmTypeMacro(cmSetSourceFilesPropertiesCommand, cmCommand);
diff --git a/Source/cmStandardIncludes.cxx b/Source/cmStandardIncludes.cxx
new file mode 100644
index 0000000..a4bdb2e
--- /dev/null
+++ b/Source/cmStandardIncludes.cxx
@@ -0,0 +1,16 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2010 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include "cmStandardIncludes.h"
+#if !defined(CMAKE_NO_ANSI_STRING_STREAM)
+cmOStringStream::cmOStringStream() {}
+cmOStringStream::~cmOStringStream() {}
+#endif
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index 9b9cb3b..e8decbb 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -241,7 +241,8 @@ typedef cmsys::String cmStdString;
class cmOStringStream: public std::ostringstream
{
public:
- cmOStringStream() {}
+ cmOStringStream();
+ ~cmOStringStream();
private:
cmOStringStream(const cmOStringStream&);
void operator=(const cmOStringStream&);
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index 9cb787a..9c66a44 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -720,6 +720,14 @@ void kwsysProcess_Execute(kwsysProcess* cp)
return;
}
+ /* Make sure we have something to run. */
+ if(cp->NumberOfCommands < 1)
+ {
+ strcpy(cp->ErrorMessage, "No command");
+ cp->State = kwsysProcess_State_Error;
+ return;
+ }
+
/* Initialize the control structure for a new process. */
if(!kwsysProcessInitialize(cp))
{
@@ -2377,6 +2385,9 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
|| defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__)
# define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
# define KWSYSPE_PS_FORMAT "%d %d\n"
+#elif defined(__sun) && (defined(__SVR4) || defined(__svr4__)) /* Solaris */
+# define KWSYSPE_PS_COMMAND "ps -e -o pid,ppid"
+# define KWSYSPE_PS_FORMAT "%d %d\n"
#elif defined(__hpux) || defined(__sun__) || defined(__sgi) || defined(_AIX) \
|| defined(__sparc)
# define KWSYSPE_PS_COMMAND "ps -ef"
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index c5ea6db..5aa4d8b 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -987,6 +987,14 @@ void kwsysProcess_Execute(kwsysProcess* cp)
return;
}
+ /* Make sure we have something to run. */
+ if(cp->NumberOfCommands < 1)
+ {
+ strcpy(cp->ErrorMessage, "No command");
+ cp->State = kwsysProcess_State_Error;
+ return;
+ }
+
/* Initialize the control structure for a new process. */
if(!kwsysProcessInitialize(cp))
{
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 627d15a..2ce7080 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010)
SET(KWSYS_DATE_STAMP_MONTH 06)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 10)
+SET(KWSYS_DATE_STAMP_DAY 15)