diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Source/cmDocumentVariables.cxx | 4 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 24 | ||||
-rw-r--r-- | Source/cmSetPropertyCommand.h | 4 | ||||
-rw-r--r-- | Source/cmSetSourceFilesPropertiesCommand.h | 36 | ||||
-rw-r--r-- | Source/cmStandardIncludes.cxx | 16 | ||||
-rw-r--r-- | Source/cmStandardIncludes.h | 3 | ||||
-rw-r--r-- | Source/kwsys/kwsysDateStamp.cmake | 2 |
10 files changed, 59 insertions, 37 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 e77119f..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", @@ -1398,4 +1400,6 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cmProperty::VARIABLE,0,0); cm->DefineProperty("CMAKE_LINK_DEPENDENT_LIBRARY_DIRS", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MAKE_INCLUDE_FROM_ROOT", + cmProperty::VARIABLE,0,0); } 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 ac727ac..d5d6585 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -189,12 +189,15 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() //---------------------------------------------------------------------------- void cmMakefileTargetGenerator::WriteCommonCodeRules() { + const char* root = (this->Makefile->IsOn("CMAKE_MAKE_INCLUDE_FROM_ROOT")? + "$(CMAKE_BINARY_DIR)/" : ""); + // Include the dependencies for the target. std::string dependFileNameFull = this->TargetBuildDirectoryFull; dependFileNameFull += "/depend.make"; *this->BuildFileStream << "# Include any dependencies generated for this target.\n" - << this->LocalGenerator->IncludeDirective << " " + << this->LocalGenerator->IncludeDirective << " " << root << this->Convert(dependFileNameFull.c_str(), cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKEFILE) @@ -205,7 +208,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() // Include the progress variables for the target. *this->BuildFileStream << "# Include the progress variables for this target.\n" - << this->LocalGenerator->IncludeDirective << " " + << this->LocalGenerator->IncludeDirective << " " << root << this->Convert(this->ProgressFileNameFull.c_str(), cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKEFILE) @@ -238,7 +241,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() // Include the flags for the target. *this->BuildFileStream << "# Include the compile flags for this target's objects.\n" - << this->LocalGenerator->IncludeDirective << " " + << this->LocalGenerator->IncludeDirective << " " << root << this->Convert(this->FlagFileNameFull.c_str(), cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKEFILE) @@ -1327,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 && @@ -1621,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) @@ -1638,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/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 62103d4..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 11) +SET(KWSYS_DATE_STAMP_DAY 15) |