diff options
-rw-r--r-- | Help/manual/cmake-developer.7.rst | 10 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmFindCommon.cxx | 15 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmRST.cxx | 12 | ||||
-rw-r--r-- | Source/cmRST.h | 2 | ||||
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 9 | ||||
-rw-r--r-- | Tests/CMakeLib/testRST.expect | 7 | ||||
-rw-r--r-- | Tests/CMakeLib/testRST.rst | 7 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt | 26 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/empty.c | 0 | ||||
-rw-r--r-- | Tests/RunCMake/ObjectLibrary/MissingSource-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt | 9 | ||||
-rw-r--r-- | Tests/RunCMake/ObjectLibrary/MissingSource.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake | 1 |
19 files changed, 92 insertions, 22 deletions
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index ee2016f..5d20c54 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -68,11 +68,21 @@ literal block after ``::`` space. We prefer the ``::`` to appear at the end of a paragraph line instead of as its own line. +``note`` directive + Call out a side note. The command-line help processor prints the + block content as if the lines were normal paragraph text with + interpretation. + ``parsed-literal`` directive Add a literal block with markup interpretation. The command-line help processor prints the block content without the leading directive line and with common indentation replaced by one space. +``productionlist`` directive + Render context-free grammar productions. The command-line help + processor prints the block content as if the lines were normal + paragraph text with interpretation. + ``replace`` directive Define a ``|substitution|`` replacement. The command-line help processor requires a substitution replacement diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index f2dd3bd..a9c3b98 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 12) -set(CMake_VERSION_TWEAK 20131101) +set(CMake_VERSION_TWEAK 20131102) #set(CMake_VERSION_RC 1) diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index 97a20ce..7beeda0 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -140,25 +140,14 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths) } const char* rootPath = this->Makefile->GetDefinition("CMAKE_FIND_ROOT_PATH"); - const char* osxRootPath = - this->Makefile->GetDefinition("_CMAKE_OSX_SYSROOT_PATH"); - const bool noRootPath = !rootPath || !*rootPath; - const bool noOSXRootPath = !osxRootPath || !*osxRootPath; - if(noRootPath && noOSXRootPath) + if((rootPath == 0) || (strlen(rootPath) == 0)) { return; } // Construct the list of path roots with no trailing slashes. std::vector<std::string> roots; - if(rootPath) - { - cmSystemTools::ExpandListArgument(rootPath, roots); - } - if(osxRootPath) - { - roots.push_back(osxRootPath); - } + cmSystemTools::ExpandListArgument(rootPath, roots); for(std::vector<std::string>::iterator ri = roots.begin(); ri != roots.end(); ++ri) { diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 5374451..107ef73 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1341,7 +1341,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode "No target \"" + name + "\""); return std::string(); } - if(target->GetType() >= cmTarget::UTILITY && + if(target->GetType() >= cmTarget::OBJECT_LIBRARY && target->GetType() != cmTarget::UNKNOWN_LIBRARY) { ::reportError(context, content->GetOriginalExpression(), diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 8a8d61a..4fe5033 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1242,6 +1242,7 @@ bool cmGlobalGenerator::CheckTargets() target.GetType() == cmTarget::STATIC_LIBRARY || target.GetType() == cmTarget::SHARED_LIBRARY || target.GetType() == cmTarget::MODULE_LIBRARY || + target.GetType() == cmTarget::OBJECT_LIBRARY || target.GetType() == cmTarget::UTILITY) { if(!target.FindSourceFiles()) diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 6d4e281..3aa8e1b 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -34,6 +34,8 @@ cmRST::cmRST(std::ostream& os, std::string const& docroot): ReplaceDirective("^.. (\\|[^|]+\\|) replace::[ \t]*(.*)$"), IncludeDirective("^.. include::[ \t]+([^ \t\n]+)$"), TocTreeDirective("^.. toctree::[ \t]*(.*)$"), + ProductionListDirective("^.. productionlist::[ \t]*(.*)$"), + NoteDirective("^.. note::[ \t]*(.*)$"), ModuleRST("^#\\[(=*)\\[\\.rst:$"), CMakeRole("(:cmake)?:(" "command|generator|variable|module|policy|" @@ -227,6 +229,16 @@ void cmRST::ProcessLine(std::string const& line) this->Directive = DirectiveTocTree; this->MarkupLines.push_back(this->TocTreeDirective.match(1)); } + else if(this->ProductionListDirective.find(line)) + { + // Output productionlist directives and their content normally. + this->NormalLine(line); + } + else if(this->NoteDirective.find(line)) + { + // Output note directives and their content normally. + this->NormalLine(line); + } } // An explicit markup start followed nothing but whitespace and a // blank line does not consume any indented text following. diff --git a/Source/cmRST.h b/Source/cmRST.h index fa987cd..3356008 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -84,6 +84,8 @@ private: cmsys::RegularExpression ReplaceDirective; cmsys::RegularExpression IncludeDirective; cmsys::RegularExpression TocTreeDirective; + cmsys::RegularExpression ProductionListDirective; + cmsys::RegularExpression NoteDirective; cmsys::RegularExpression ModuleRST; cmsys::RegularExpression CMakeRole; cmsys::RegularExpression Substitution; diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 6b6fe4c..9add198 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -384,13 +384,8 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib, } } - if(this->CurrentProcessingState == ProcessingLinkLibraries - && !this->Target->GetProperty("LINK_INTERFACE_LIBRARIES")) - { - this->Makefile - ->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt); - } - else if(this->CurrentProcessingState != ProcessingKeywordLinkInterface + // Handle normal case first. + if(this->CurrentProcessingState != ProcessingKeywordLinkInterface && this->CurrentProcessingState != ProcessingPlainLinkInterface) { this->Makefile diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect index 744cb88..fa436cb 100644 --- a/Tests/CMakeLib/testRST.expect +++ b/Tests/CMakeLib/testRST.expect @@ -76,6 +76,13 @@ or after a paragraph ending in two colons:: but not after a line ending in two colons:: in the middle of a paragraph. +.. productionlist:: + grammar: `production` + production: "content rendered" + +.. note:: + Notes are called out. + substituted text with multiple lines becomes one line End of first include. diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst index 5cb6d91..54952dd 100644 --- a/Tests/CMakeLib/testRST.rst +++ b/Tests/CMakeLib/testRST.rst @@ -83,6 +83,13 @@ or after a paragraph ending in two colons:: but not after a line ending in two colons:: in the middle of a paragraph. +.. productionlist:: + grammar: `production` + production: "content rendered" + +.. note:: + Notes are called out. + .. |substitution| replace:: |nested substitution| with multiple lines becomes one line diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt new file mode 100644 index 0000000..533d38c --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt @@ -0,0 +1,26 @@ +CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\): + Error evaluating generator expression: + + \$<TARGET_FILE:objlib> + + Target "objlib" is not an executable or library. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\): + Error evaluating generator expression: + + \$<TARGET_SONAME_FILE:objlib> + + Target "objlib" is not an executable or library. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\): + Error evaluating generator expression: + + \$<TARGET_LINKER_FILE:objlib> + + Target "objlib" is not an executable or library. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake new file mode 100644 index 0000000..c47ee2b --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake @@ -0,0 +1,7 @@ +enable_language(C) +add_library(objlib OBJECT empty.c) +add_custom_target(check ALL COMMAND echo + $<TARGET_FILE:objlib> + $<TARGET_SONAME_FILE:objlib> + $<TARGET_LINKER_FILE:objlib> + ) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 62bf29b..54d5064 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -7,4 +7,5 @@ run_cmake(BadNOT) run_cmake(BadStrEqual) run_cmake(BadZero) run_cmake(BadTargetName) +run_cmake(BadTargetTypeObject) run_cmake(BadInstallPrefix) diff --git a/Tests/RunCMake/GeneratorExpression/empty.c b/Tests/RunCMake/GeneratorExpression/empty.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/empty.c diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt new file mode 100644 index 0000000..411cd7c --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at MissingSource.cmake:1 \(add_library\): + Cannot find source file: + + missing.c + + Tried extensions( \.[A-Za-z+]+| + )* +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource.cmake b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake new file mode 100644 index 0000000..258eaed --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake @@ -0,0 +1 @@ +add_library(A OBJECT missing.c) diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake index a74eaa8..42973f8 100644 --- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake +++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake @@ -11,6 +11,7 @@ run_cmake(Install) run_cmake(LinkObjLHS) run_cmake(LinkObjRHS1) run_cmake(LinkObjRHS2) +run_cmake(MissingSource) run_cmake(ObjWithObj) run_cmake(PostBuild) run_cmake(PreBuild) |