summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.manual26
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGlobalGenerator.cxx109
-rw-r--r--Source/cmGlobalGenerator.h7
-rw-r--r--Source/cmQtAutoGenerators.cxx171
-rw-r--r--Source/cmQtAutoGenerators.h2
-rw-r--r--Utilities/Sphinx/CMakeLists.txt3
-rw-r--r--Utilities/Sphinx/conf.py.in10
-rw-r--r--Utilities/Sphinx/static/cmake-favicon.icobin0 -> 1150 bytes
-rw-r--r--Utilities/Sphinx/static/cmake-logo-16.pngbin0 -> 761 bytes
-rw-r--r--Utilities/Sphinx/templates/layout.html13
11 files changed, 201 insertions, 142 deletions
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 0e84fb6..5d2dc8b 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,29 @@
+Changes in CMake 2.8.12.1 (since 2.8.12)
+----------------------------------------
+Brad King (9):
+ MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492)
+ Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
+ Check for OBJECT_LIBRARY source files at start of generation
+ CMP0022: Plain target_link_libraries must populate link interface
+ Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
+ CMP0022: Warn about a given target at most once
+ Fix summary documentation of INTERFACE_LINK_LIBRARIES
+ file(GENERATE): Clear internal records between configures
+ cmake: Validate -E cmake_automoc argument count (#14545)
+
+Modestas Vainius (1):
+ Fix spelling in INTERFACE_LINK_LIBRARIES documentation (#14542)
+
+Stephen Kelly (5):
+ CMP0022: Output link interface mismatch for static library warning
+ Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
+ CMP0022: Add unit test for null pointer check and message.
+ CMP0022: Add test for target_link_libraries plain signature
+ Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535)
+
+Vladislav Vinogradov (1):
+ FindCUDA: Fix NPP library search for CUDA 5.5
+
Changes in CMake 2.8.12 (since 2.8.12-rc4)
------------------------------------------
Brad King (4):
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 4196c9b..98a90f7 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 20131106)
+set(CMake_VERSION_TWEAK 20131107)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ea17afa..71dd897 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -66,32 +66,12 @@ cmGlobalGenerator::cmGlobalGenerator()
cmGlobalGenerator::~cmGlobalGenerator()
{
- // Delete any existing cmLocalGenerators
- for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
- {
- delete this->LocalGenerators[i];
- }
- for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
- li = this->EvaluationFiles.begin();
- li != this->EvaluationFiles.end();
- ++li)
- {
- delete *li;
- }
- for(std::map<std::string, cmExportBuildFileGenerator*>::iterator
- i = this->BuildExportSets.begin();
- i != this->BuildExportSets.end(); ++i)
- {
- delete i->second;
- }
- this->LocalGenerators.clear();
+ this->ClearGeneratorMembers();
if (this->ExtraGenerator)
{
delete this->ExtraGenerator;
}
-
- this->ClearGeneratorTargets();
}
bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts)
@@ -970,31 +950,7 @@ bool cmGlobalGenerator::IsDependedOn(const char* project,
void cmGlobalGenerator::Configure()
{
this->FirstTimeProgress = 0.0f;
- this->ClearGeneratorTargets();
- this->ExportSets.clear();
- // Delete any existing cmLocalGenerators
- unsigned int i;
- for (i = 0; i < this->LocalGenerators.size(); ++i)
- {
- delete this->LocalGenerators[i];
- }
- this->LocalGenerators.clear();
- for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
- li = this->EvaluationFiles.begin();
- li != this->EvaluationFiles.end();
- ++li)
- {
- delete *li;
- }
- this->EvaluationFiles.clear();
- this->TargetDependencies.clear();
- this->TotalTargets.clear();
- this->ImportedTargets.clear();
- this->LocalGeneratorToTargetMap.clear();
- this->ProjectMap.clear();
- this->RuleHashes.clear();
- this->DirectoryContentMap.clear();
- this->BinaryDirectories.clear();
+ this->ClearGeneratorMembers();
// start with this directory
cmLocalGenerator *lg = this->CreateLocalGenerator();
@@ -1105,9 +1061,12 @@ void cmGlobalGenerator::Generate()
this->FinalizeTargetCompileDefinitions();
+#ifdef CMAKE_BUILD_WITH_CMAKE
// Iterate through all targets and set up automoc for those which have
// the AUTOMOC, AUTOUIC or AUTORCC property set
- this->CreateQtAutoGeneratorsTargets();
+ AutogensType autogens;
+ this->CreateQtAutoGeneratorsTargets(autogens);
+#endif
// For each existing cmLocalGenerator
unsigned int i;
@@ -1141,6 +1100,14 @@ void cmGlobalGenerator::Generate()
// Create per-target generator information.
this->CreateGeneratorTargets();
+#ifdef CMAKE_BUILD_WITH_CMAKE
+ for (AutogensType::iterator it = autogens.begin(); it != autogens.end();
+ ++it)
+ {
+ it->first.SetupAutoGenerateTarget(it->second);
+ }
+#endif
+
// Trace the dependencies, after that no custom commands should be added
// because their dependencies might not be handled correctly
for (i = 0; i < this->LocalGenerators.size(); ++i)
@@ -1266,11 +1233,9 @@ bool cmGlobalGenerator::CheckTargets()
}
//----------------------------------------------------------------------------
-void cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
+void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
{
#ifdef CMAKE_BUILD_WITH_CMAKE
- typedef std::vector<std::pair<cmQtAutoGenerators, cmTarget*> > Autogens;
- Autogens autogens;
for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
{
cmTargets& targets =
@@ -1291,7 +1256,7 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
&& !target.IsImported())
{
cmQtAutoGenerators autogen;
- if(autogen.InitializeMocSourceFile(&target))
+ if(autogen.InitializeAutogenTarget(&target))
{
autogens.push_back(std::make_pair(autogen, &target));
}
@@ -1299,11 +1264,8 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
}
}
}
- for (Autogens::iterator it = autogens.begin(); it != autogens.end();
- ++it)
- {
- it->first.SetupAutoGenerateTarget(it->second);
- }
+#else
+ (void)autogens;
#endif
}
@@ -1399,7 +1361,7 @@ void cmGlobalGenerator::ComputeGeneratorTargetObjects()
}
//----------------------------------------------------------------------------
-void cmGlobalGenerator::ClearGeneratorTargets()
+void cmGlobalGenerator::ClearGeneratorMembers()
{
for(cmGeneratorTargetsType::iterator i = this->GeneratorTargets.begin();
i != this->GeneratorTargets.end(); ++i)
@@ -1407,6 +1369,39 @@ void cmGlobalGenerator::ClearGeneratorTargets()
delete i->second;
}
this->GeneratorTargets.clear();
+
+ for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
+ li = this->EvaluationFiles.begin();
+ li != this->EvaluationFiles.end();
+ ++li)
+ {
+ delete *li;
+ }
+ this->EvaluationFiles.clear();
+
+ for(std::map<std::string, cmExportBuildFileGenerator*>::iterator
+ i = this->BuildExportSets.begin();
+ i != this->BuildExportSets.end(); ++i)
+ {
+ delete i->second;
+ }
+ this->BuildExportSets.clear();
+
+ for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
+ {
+ delete this->LocalGenerators[i];
+ }
+ this->LocalGenerators.clear();
+
+ this->ExportSets.clear();
+ this->TargetDependencies.clear();
+ this->TotalTargets.clear();
+ this->ImportedTargets.clear();
+ this->LocalGeneratorToTargetMap.clear();
+ this->ProjectMap.clear();
+ this->RuleHashes.clear();
+ this->DirectoryContentMap.clear();
+ this->BinaryDirectories.clear();
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 92c3096..1b8daa9 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -32,6 +32,7 @@ class cmTarget;
class cmInstallTargetGenerator;
class cmInstallFilesGenerator;
class cmExportBuildFileGenerator;
+class cmQtAutoGenerators;
/** \class cmGlobalGenerator
* \brief Responable for overseeing the generation process for the entire tree
@@ -323,7 +324,8 @@ protected:
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS();
bool CheckTargets();
- void CreateQtAutoGeneratorsTargets();
+ typedef std::vector<std::pair<cmQtAutoGenerators, cmTarget*> > AutogensType;
+ void CreateQtAutoGeneratorsTargets(AutogensType& autogens);
// Fill the ProjectMap, this must be called after LocalGenerators
@@ -414,9 +416,10 @@ private:
cmGeneratorTargetsType GeneratorTargets;
void CreateGeneratorTargets();
void ComputeGeneratorTargetObjects();
- void ClearGeneratorTargets();
virtual void ComputeTargetObjects(cmGeneratorTarget* gt) const;
+ void ClearGeneratorMembers();
+
// Cache directory content and target files to be built.
struct DirectoryContent: public std::set<cmStdString>
{
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 5f7a26f..36cb368 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -138,7 +138,25 @@ cmQtAutoGenerators::cmQtAutoGenerators()
}
}
-bool cmQtAutoGenerators::InitializeMocSourceFile(cmTarget* target)
+static std::string getAutogenTargetName(cmTarget *target)
+{
+ std::string autogenTargetName = target->GetName();
+ autogenTargetName += "_automoc";
+ return autogenTargetName;
+}
+
+static std::string getAutogenTargetDir(cmTarget *target)
+{
+ cmMakefile* makefile = target->GetMakefile();
+ std::string targetDir = makefile->GetCurrentOutputDirectory();
+ targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory();
+ targetDir += "/";
+ targetDir += getAutogenTargetName(target);
+ targetDir += ".dir/";
+ return targetDir;
+}
+
+bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
{
cmMakefile* makefile = target->GetMakefile();
// don't do anything if there is no Qt4 or Qt5Core (which contains moc):
@@ -154,8 +172,7 @@ bool cmQtAutoGenerators::InitializeMocSourceFile(cmTarget* target)
if (target->GetPropertyAsBool("AUTOMOC"))
{
- std::string automocTargetName = target->GetName();
- automocTargetName += "_automoc";
+ std::string automocTargetName = getAutogenTargetName(target);
std::string mocCppFile = makefile->GetCurrentOutputDirectory();
mocCppFile += "/";
mocCppFile += automocTargetName;
@@ -168,81 +185,10 @@ bool cmQtAutoGenerators::InitializeMocSourceFile(cmTarget* target)
target->AddSourceFile(mocCppSource);
}
- return true;
-}
-
-static void GetCompileDefinitionsAndDirectories(cmTarget *target,
- const char * config,
- std::string &incs,
- std::string &defs)
-{
- cmMakefile* makefile = target->GetMakefile();
- cmLocalGenerator* localGen = makefile->GetLocalGenerator();
- std::vector<std::string> includeDirs;
- cmGeneratorTarget gtgt(target);
- // Get the include dirs for this target, without stripping the implicit
- // include dirs off, see http://public.kitware.com/Bug/view.php?id=13667
- localGen->GetIncludeDirectories(includeDirs, &gtgt, "CXX", config, false);
- const char* sep = "";
- incs = "";
- for(std::vector<std::string>::const_iterator incDirIt = includeDirs.begin();
- incDirIt != includeDirs.end();
- ++incDirIt)
- {
- incs += sep;
- sep = ";";
- incs += *incDirIt;
- }
-
- std::set<std::string> defines;
- localGen->AddCompileDefinitions(defines, target, config);
-
- sep = "";
- for(std::set<std::string>::const_iterator defIt = defines.begin();
- defIt != defines.end();
- ++defIt)
- {
- defs += sep;
- sep = ";";
- defs += *defIt;
- }
-}
-
-void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
-{
- cmMakefile* makefile = target->GetMakefile();
- const char* targetName = target->GetName();
-
- // forget the variables added here afterwards again:
- cmMakefile::ScopePushPop varScope(makefile);
- static_cast<void>(varScope);
-
- const char *qtVersion = makefile->GetDefinition("Qt5Core_VERSION_MAJOR");
- if (!qtVersion)
- {
- qtVersion = makefile->GetDefinition("QT_VERSION_MAJOR");
- }
- if (const char *targetQtVersion =
- target->GetLinkInterfaceDependentStringProperty("QT_MAJOR_VERSION", 0))
- {
- qtVersion = targetQtVersion;
- }
- if (qtVersion)
- {
- makefile->AddDefinition("_target_qt_version", qtVersion);
- }
// create a custom target for running generators at buildtime:
- std::string autogenTargetName = targetName;
- autogenTargetName += "_automoc";
+ std::string autogenTargetName = getAutogenTargetName(target);
- makefile->AddDefinition("_moc_target_name",
- cmLocalGenerator::EscapeForCMake(autogenTargetName.c_str()).c_str());
-
- std::string targetDir = makefile->GetCurrentOutputDirectory();
- targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory();
- targetDir += "/";
- targetDir += autogenTargetName;
- targetDir += ".dir/";
+ std::string targetDir = getAutogenTargetDir(target);
cmCustomCommandLine currentLine;
currentLine.push_back(makefile->GetSafeDefinition("CMAKE_COMMAND"));
@@ -284,7 +230,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
tools += " and " + toolNames[0];
}
std::string autogenComment = "Automatic " + tools + " for target ";
- autogenComment += targetName;
+ autogenComment += target->GetName();
#if defined(_WIN32) && !defined(__CYGWIN__)
bool usePRE_BUILD = false;
@@ -341,6 +287,77 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
target->AddUtility(autogenTargetName.c_str());
}
+ return true;
+}
+
+static void GetCompileDefinitionsAndDirectories(cmTarget *target,
+ const char * config,
+ std::string &incs,
+ std::string &defs)
+{
+ cmMakefile* makefile = target->GetMakefile();
+ cmLocalGenerator* localGen = makefile->GetLocalGenerator();
+ std::vector<std::string> includeDirs;
+ cmGeneratorTarget gtgt(target);
+ // Get the include dirs for this target, without stripping the implicit
+ // include dirs off, see http://public.kitware.com/Bug/view.php?id=13667
+ localGen->GetIncludeDirectories(includeDirs, &gtgt, "CXX", config, false);
+ const char* sep = "";
+ incs = "";
+ for(std::vector<std::string>::const_iterator incDirIt = includeDirs.begin();
+ incDirIt != includeDirs.end();
+ ++incDirIt)
+ {
+ incs += sep;
+ sep = ";";
+ incs += *incDirIt;
+ }
+
+ std::set<std::string> defines;
+ localGen->AddCompileDefinitions(defines, target, config);
+
+ sep = "";
+ for(std::set<std::string>::const_iterator defIt = defines.begin();
+ defIt != defines.end();
+ ++defIt)
+ {
+ defs += sep;
+ sep = ";";
+ defs += *defIt;
+ }
+}
+
+void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
+{
+ cmMakefile* makefile = target->GetMakefile();
+
+ // forget the variables added here afterwards again:
+ cmMakefile::ScopePushPop varScope(makefile);
+ static_cast<void>(varScope);
+
+ // create a custom target for running generators at buildtime:
+ std::string autogenTargetName = getAutogenTargetName(target);
+
+ makefile->AddDefinition("_moc_target_name",
+ cmLocalGenerator::EscapeForCMake(autogenTargetName.c_str()).c_str());
+
+ std::string targetDir = getAutogenTargetDir(target);
+
+ const char *qtVersion = makefile->GetDefinition("Qt5Core_VERSION_MAJOR");
+ if (!qtVersion)
+ {
+ qtVersion = makefile->GetDefinition("QT_VERSION_MAJOR");
+ }
+ if (const char *targetQtVersion =
+ target->GetLinkInterfaceDependentStringProperty("QT_MAJOR_VERSION", 0))
+ {
+ qtVersion = targetQtVersion;
+ }
+ if (qtVersion)
+ {
+ makefile->AddDefinition("_target_qt_version", qtVersion);
+ }
+
std::map<std::string, std::string> configIncludes;
std::map<std::string, std::string> configDefines;
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 696abc8..116f174 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -23,7 +23,7 @@ public:
cmQtAutoGenerators();
bool Run(const char* targetDirectory, const char *config);
- bool InitializeMocSourceFile(cmTarget* target);
+ bool InitializeAutogenTarget(cmTarget* target);
void SetupAutoGenerateTarget(cmTarget* target);
private:
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index 35c62fb..3b0b335 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -38,8 +38,7 @@ endif()
set(conf_docs "${CMake_SOURCE_DIR}/Help")
set(conf_path "${CMAKE_CURRENT_SOURCE_DIR}")
-set(conf_copyright "2000-2013 Kitware, Inc.")
-set(conf_version "${CMake_MAJOR_VERSION}.${CMake_MINOR_VERSION}.${CMake_PATCH_VERSION}")
+set(conf_version "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
set(conf_release "${CMake_VERSION}")
configure_file(conf.py.in conf.py @ONLY)
diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in
index ea00b78..52f4a31 100644
--- a/Utilities/Sphinx/conf.py.in
+++ b/Utilities/Sphinx/conf.py.in
@@ -13,14 +13,15 @@ import sys
import os
import re
import glob
+import time
sys.path.insert(0, r'@conf_path@')
source_suffix = '.rst'
master_doc = 'index'
-project = 'CMake'
-copyright = '@conf_copyright@'
+project = 'CMake'
+copyright = '2000-%s Kitware, Inc.' % time.strftime('%Y')
version = '@conf_version@' # feature version
release = '@conf_release@' # full version string
@@ -29,6 +30,7 @@ primary_domain = 'cmake'
exclude_patterns = []
extensions = ['cmake']
+templates_path = ['@conf_path@/templates']
cmake_manuals = sorted(glob.glob(r'@conf_docs@/manual/*.rst'))
cmake_manual_description = re.compile('^\.\. cmake-manual-description:(.*)$')
@@ -56,3 +58,7 @@ man_show_urls = False
html_show_sourcelink = True
html_static_path = ['@conf_path@/static']
html_style = 'cmake.css'
+html_theme = 'default'
+html_title = 'CMake %s Documentation' % release
+html_short_title = '%s Documentation' % release
+html_favicon = 'cmake-favicon.ico'
diff --git a/Utilities/Sphinx/static/cmake-favicon.ico b/Utilities/Sphinx/static/cmake-favicon.ico
new file mode 100644
index 0000000..fce8f92
--- /dev/null
+++ b/Utilities/Sphinx/static/cmake-favicon.ico
Binary files differ
diff --git a/Utilities/Sphinx/static/cmake-logo-16.png b/Utilities/Sphinx/static/cmake-logo-16.png
new file mode 100644
index 0000000..2039c25
--- /dev/null
+++ b/Utilities/Sphinx/static/cmake-logo-16.png
Binary files differ
diff --git a/Utilities/Sphinx/templates/layout.html b/Utilities/Sphinx/templates/layout.html
new file mode 100644
index 0000000..635ace3
--- /dev/null
+++ b/Utilities/Sphinx/templates/layout.html
@@ -0,0 +1,13 @@
+{% extends "!layout.html" %}
+{% block rootrellink %}
+ <li>
+ <img src="{{ pathto('_static/cmake-logo-16.png', 1) }}" alt=""
+ style="vertical-align: middle; margin-top: -2px" />
+ </li>
+ <li>
+ <a href="http://www.cmake.org/">CMake</a>{{ reldelim1 }}
+ </li>
+ <li>
+ <a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}
+ </li>
+{% endblock %}