summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestSleepCommand.h9
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx19
-rw-r--r--Source/cmExtraEclipseCDT4Generator.h1
-rw-r--r--Source/cmGlobalGenerator.cxx22
-rw-r--r--Source/cmGlobalGenerator.h3
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx14
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h10
-rw-r--r--Source/cmGlobalVisualStudio10Win64Generator.cxx49
-rw-r--r--Source/cmGlobalVisualStudio10Win64Generator.h3
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx7
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h1
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx12
-rw-r--r--Source/cmLocalGenerator.cxx32
-rw-r--r--Source/cmLocalGenerator.h6
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx9
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx10
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx9
-rw-r--r--Source/cmMakefile.cxx6
-rw-r--r--Source/cmTarget.cxx56
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx19
-rw-r--r--Source/cmake.cxx4
-rw-r--r--Source/kwsys/CMakeLists.txt6
-rw-r--r--Source/kwsys/SystemTools.cxx4
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
26 files changed, 211 insertions, 106 deletions
diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h
index 411eb01..468cd85 100644
--- a/Source/CTest/cmCTestSleepCommand.h
+++ b/Source/CTest/cmCTestSleepCommand.h
@@ -63,11 +63,10 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " ctest_sleep( seconds )\n"
- " ctest_sleep( time1 duration time2 )\n"
- "With one argument it will sleep for a given number of seconds. "
- "With three arguments it will wait for time2 - time1 - duration "
- "seconds.";
+ " ctest_sleep(<seconds>)\n"
+ "Sleep for given number of seconds.\n"
+ " ctest_sleep(<time1> <duration> <time2>)\n"
+ "Sleep for t=(time1 + duration - time2) seconds if t > 0.";
}
cmTypeMacro(cmCTestSleepCommand, cmCTestCommand);
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 8f89b5e..502fefa 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -734,6 +734,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
;
emmited.clear();
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
+ const std::string makeArgs = mf->GetSafeDefinition(
+ "CMAKE_ECLIPSE_MAKE_ARGUMENTS");
cmGlobalGenerator* generator
= const_cast<cmGlobalGenerator*>(this->GlobalGenerator);
@@ -794,7 +796,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
}
if (insertTarget)
{
- this->AppendTarget(fout, ti->first, make, subdir, ": ");
+ this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
}
}
break;
@@ -809,7 +811,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
break;
}
- this->AppendTarget(fout, ti->first, make, subdir, ": ");
+ this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
break;
case cmTarget::EXECUTABLE:
case cmTarget::STATIC_LIBRARY:
@@ -818,10 +820,10 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
{
const char* prefix = (ti->second.GetType()==cmTarget::EXECUTABLE ?
"[exe] " : "[lib] ");
- this->AppendTarget(fout, ti->first, make, subdir, prefix);
+ this->AppendTarget(fout, ti->first, make, makeArgs, subdir, prefix);
std::string fastTarget = ti->first;
fastTarget += "/fast";
- this->AppendTarget(fout, fastTarget, make, subdir, prefix);
+ this->AppendTarget(fout, fastTarget, make, makeArgs, subdir, prefix);
}
break;
// ignore these:
@@ -836,11 +838,11 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
// insert the all and clean targets in every subdir
if (!allTarget.empty())
{
- this->AppendTarget(fout, allTarget, make, subdir, ": ");
+ this->AppendTarget(fout, allTarget, make, makeArgs, subdir, ": ");
}
if (!cleanTarget.empty())
{
- this->AppendTarget(fout, cleanTarget, make, subdir, ": ");
+ this->AppendTarget(fout, cleanTarget, make, makeArgs, subdir, ": ");
}
//insert rules for compiling, preprocessing and assembling individual files
@@ -860,7 +862,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
{
prefix = "[pre] ";
}
- this->AppendTarget(fout, *fit, make, subdir, prefix);
+ this->AppendTarget(fout, *fit, make, makeArgs, subdir, prefix);
}
}
@@ -993,6 +995,7 @@ void cmExtraEclipseCDT4Generator
void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
const std::string& target,
const std::string& make,
+ const std::string& makeArgs,
const std::string& path,
const char* prefix)
{
@@ -1003,7 +1006,7 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
"<buildCommand>"
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)
<< "</buildCommand>\n"
- "<buildArguments/>\n"
+ "<buildArguments>" << makeArgs << "</buildArguments>\n"
"<buildTarget>" << target << "</buildTarget>\n"
"<stopOnError>true</stopOnError>\n"
"<useDefaultCommand>false</useDefaultCommand>\n"
diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h
index 2ad599d..99e69c4 100644
--- a/Source/cmExtraEclipseCDT4Generator.h
+++ b/Source/cmExtraEclipseCDT4Generator.h
@@ -71,6 +71,7 @@ private:
static void AppendTarget (cmGeneratedFileStream& fout,
const std::string& target,
const std::string& make,
+ const std::string& makeArguments,
const std::string& path,
const char* prefix = "");
static void AppendScannerProfile (cmGeneratedFileStream& fout,
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 15abd02..ea091f9 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -814,24 +814,11 @@ void cmGlobalGenerator::Generate()
// For each existing cmLocalGenerator
unsigned int i;
- // Consolidate global targets
+ // Put a copy of each global target in every directory.
cmTargets globalTargets;
this->CreateDefaultGlobalTargets(&globalTargets);
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
- cmTargets* targets =
- &(this->LocalGenerators[i]->GetMakefile()->GetTargets());
- cmTargets::iterator tarIt;
- for ( tarIt = targets->begin(); tarIt != targets->end(); ++ tarIt )
- {
- if ( tarIt->second.GetType() == cmTarget::GLOBAL_TARGET )
- {
- globalTargets[tarIt->first] = tarIt->second;
- }
- }
- }
- for (i = 0; i < this->LocalGenerators.size(); ++i)
- {
cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
cmTargets* targets = &(mf->GetTargets());
cmTargets::iterator tit;
@@ -1881,8 +1868,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
const char* name, const char* message,
const cmCustomCommandLines* commandLines,
std::vector<std::string> depends,
- const char* workingDirectory,
- bool depends_on_all /* = false */)
+ const char* workingDirectory)
{
// Package
cmTarget target;
@@ -1897,10 +1883,6 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
workingDirectory);
target.GetPostBuildCommands().push_back(cc);
target.SetProperty("EchoString", message);
- if ( depends_on_all )
- {
- target.AddUtility("all");
- }
std::vector<std::string>::iterator dit;
for ( dit = depends.begin(); dit != depends.end(); ++ dit )
{
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 7e43124..6a1aa53 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -291,8 +291,7 @@ protected:
void CreateDefaultGlobalTargets(cmTargets* targets);
cmTarget CreateGlobalTarget(const char* name, const char* message,
const cmCustomCommandLines* commandLines,
- std::vector<std::string> depends, const char* workingDir,
- bool depends_on_all = false);
+ std::vector<std::string> depends, const char* workingDir);
bool NeedSymbolicMark;
bool UseLinkScript;
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 403507f..0b939af 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -19,6 +19,10 @@
cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator()
{
this->FindMakeProgramFile = "CMakeVS10FindMake.cmake";
+ std::string vc10Express;
+ this->ExpressEdition = cmSystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0\\Setup\\VC;"
+ "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32);
}
//----------------------------------------------------------------------------
@@ -63,6 +67,16 @@ void cmGlobalVisualStudio10Generator
}
//----------------------------------------------------------------------------
+const char* cmGlobalVisualStudio10Generator::GetPlatformToolset()
+{
+ if(!this->PlatformToolset.empty())
+ {
+ return this->PlatformToolset.c_str();
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------------------
std::string cmGlobalVisualStudio10Generator::GetUserMacrosDirectory()
{
std::string base;
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 219c36e..bef5642 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -54,6 +54,12 @@ public:
cmMakefile *, bool optional);
virtual void WriteSLNHeader(std::ostream& fout);
+ /** Is the installed VS an Express edition? */
+ bool IsExpressEdition() const { return this->ExpressEdition; }
+
+ /** The toolset name for the target platform. */
+ const char* GetPlatformToolset();
+
/**
* Where does this version of Visual Studio look for macros for the
* current user? Returns the empty string if this version of Visual
@@ -70,5 +76,9 @@ public:
{ return "$(Configuration)";}
protected:
virtual const char* GetIDEVersion() { return "10.0"; }
+
+ std::string PlatformToolset;
+private:
+ bool ExpressEdition;
};
#endif
diff --git a/Source/cmGlobalVisualStudio10Win64Generator.cxx b/Source/cmGlobalVisualStudio10Win64Generator.cxx
index 109b60d..8600777 100644
--- a/Source/cmGlobalVisualStudio10Win64Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Win64Generator.cxx
@@ -36,3 +36,52 @@ void cmGlobalVisualStudio10Win64Generator
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
}
+
+//----------------------------------------------------------------------------
+bool cmGlobalVisualStudio10Win64Generator::Find64BitTools(cmMakefile* mf)
+{
+ if(!this->PlatformToolset.empty())
+ {
+ return true;
+ }
+ // This edition does not come with 64-bit tools. Look for them.
+ //
+ // TODO: Detect available tools? x64\v100 exists but does not work?
+ // KHLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\4.0;VCTargetsPath
+ // c:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/Platforms/
+ // {Itanium,Win32,x64}/PlatformToolsets/{v100,v90,Windows7.1SDK}
+ std::string winSDK_7_1;
+ if(cmSystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\"
+ "Windows\\v7.1;InstallationFolder", winSDK_7_1))
+ {
+ cmOStringStream m;
+ m << "Found Windows SDK v7.1: " << winSDK_7_1;
+ mf->DisplayStatus(m.str().c_str(), -1);
+ this->PlatformToolset = "Windows7.1SDK";
+ return true;
+ }
+ else
+ {
+ cmOStringStream e;
+ e << "Cannot enable 64-bit tools with Visual Studio 2010 Express.\n"
+ << "Install the Microsoft Windows SDK v7.1 to get 64-bit tools:\n"
+ << " http://msdn.microsoft.com/en-us/windows/bb980924.aspx";
+ mf->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ cmSystemTools::SetFatalErrorOccured();
+ return false;
+ }
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio10Win64Generator
+::EnableLanguage(std::vector<std::string> const& languages,
+ cmMakefile* mf, bool optional)
+{
+ if(this->IsExpressEdition() && !this->Find64BitTools(mf))
+ {
+ return;
+ }
+ this->cmGlobalVisualStudio10Generator
+ ::EnableLanguage(languages, mf, optional);
+}
diff --git a/Source/cmGlobalVisualStudio10Win64Generator.h b/Source/cmGlobalVisualStudio10Win64Generator.h
index 39c9d08..e6d3dc5 100644
--- a/Source/cmGlobalVisualStudio10Win64Generator.h
+++ b/Source/cmGlobalVisualStudio10Win64Generator.h
@@ -34,5 +34,8 @@ public:
virtual void AddPlatformDefinitions(cmMakefile* mf);
+ bool Find64BitTools(cmMakefile* mf);
+ virtual void EnableLanguage(std::vector<std::string>const& languages,
+ cmMakefile *, bool optional);
};
#endif
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 203ca77..fe44e20 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -197,8 +197,6 @@ void cmGlobalVisualStudio6Generator
this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
- std::string rootdir = root->GetMakefile()->GetStartOutputDirectory();
- rootdir += "/";
for(OrderedTargetDependSet::const_iterator
tt = orderedProjectTargets.begin();
tt != orderedProjectTargets.end(); ++tt)
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index ba18687..2874952 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -110,7 +110,7 @@ void cmGlobalVisualStudio71Generator
this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
- this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
+ this->WriteTargetsToSolution(fout, orderedProjectTargets);
bool useFolderProperty = this->UseFolderProperty();
if (useFolderProperty)
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 45d6a74..eb84a2c 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -270,11 +270,8 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
std::ostream& fout,
- cmLocalGenerator* root,
OrderedTargetDependSet const& projectTargets)
{
- std::string rootdir = root->GetMakefile()->GetStartOutputDirectory();
- rootdir += "/";
for(OrderedTargetDependSet::const_iterator tt =
projectTargets.begin(); tt != projectTargets.end(); ++tt)
{
@@ -299,8 +296,6 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
{
cmMakefile* tmf = target->GetMakefile();
std::string dir = tmf->GetStartOutputDirectory();
- dir = root->Convert(dir.c_str(),
- cmLocalGenerator::START_OUTPUT);
this->WriteProject(fout, vcprojName, dir.c_str(),
*target);
written = true;
@@ -390,7 +385,7 @@ void cmGlobalVisualStudio7Generator
this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
- this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
+ this->WriteTargetsToSolution(fout, orderedProjectTargets);
bool useFolderProperty = this->UseFolderProperty();
if (useFolderProperty)
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index b6c84e8..57c079d 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -118,7 +118,6 @@ protected:
virtual void WriteTargetsToSolution(
std::ostream& fout,
- cmLocalGenerator* root,
OrderedTargetDependSet const& projectTargets);
virtual void WriteTargetDepends(
std::ostream& fout,
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 2f7bc44..29c2d06 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1334,11 +1334,13 @@ void cmGlobalXCodeGenerator
cc.GetDepends().begin();
d != cc.GetDepends().end(); ++d)
{
- std::string dep =
- this->CurrentLocalGenerator->GetRealDependency(d->c_str(),
- configName);
- makefileStream << "\\\n" << this
- ->ConvertToRelativeForMake(dep.c_str());
+ std::string dep;
+ if(this->CurrentLocalGenerator
+ ->GetRealDependency(d->c_str(), configName, dep))
+ {
+ makefileStream << "\\\n" <<
+ this->ConvertToRelativeForMake(dep.c_str());
+ }
}
makefileStream << "\n";
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 5bffd52..b7d694c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1818,8 +1818,9 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
}
//----------------------------------------------------------------------------
-std::string cmLocalGenerator::GetRealDependency(const char* inName,
- const char* config)
+bool cmLocalGenerator::GetRealDependency(const char* inName,
+ const char* config,
+ std::string& dep)
{
// Older CMake code may specify the dependency using the target
// output file rather than the target name. Such code would have
@@ -1855,7 +1856,8 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName,
// it is a full path to a depend that has the same name
// as a target but is in a different location so do not use
// the target as the depend
- return inName;
+ dep = inName;
+ return true;
}
}
switch (target->GetType())
@@ -1869,15 +1871,16 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName,
// Get the location of the target's output file and depend on it.
if(const char* location = target->GetLocation(config))
{
- return location;
+ dep = location;
+ return true;
}
}
break;
case cmTarget::UTILITY:
case cmTarget::GLOBAL_TARGET:
- // Depending on a utility target may not work but just trust
- // the user to have given a valid name.
- return inName;
+ // A utility target has no file on which to depend. This was listed
+ // only to get the target-level dependency.
+ return false;
case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS:
case cmTarget::INSTALL_DIRECTORY:
@@ -1889,23 +1892,24 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName,
if(cmSystemTools::FileIsFullPath(inName))
{
// This is a full path. Return it as given.
- return inName;
+ dep = inName;
+ return true;
}
// Check for a source file in this directory that matches the
// dependency.
if(cmSourceFile* sf = this->Makefile->GetSource(inName))
{
- name = sf->GetFullPath();
- return name;
+ dep = sf->GetFullPath();
+ return true;
}
// Treat the name as relative to the source directory in which it
// was given.
- name = this->Makefile->GetCurrentDirectory();
- name += "/";
- name += inName;
- return name;
+ dep = this->Makefile->GetCurrentDirectory();
+ dep += "/";
+ dep += inName;
+ return true;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 43bf1e7..870ce36 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -158,14 +158,16 @@ public:
/** Translate a dependency as given in CMake code to the name to
appear in a generated build file. If the given name is that of
+ a utility target, returns false. If the given name is that of
a CMake target it will be transformed to the real output
location of that target for the given configuration. If the
given name is the full path to a file it will be returned.
Otherwise the name is treated as a relative path with respect to
the source directory of this generator. This should only be
used for dependencies of custom commands. */
- std::string GetRealDependency(const char* name, const char* config);
-
+ bool GetRealDependency(const char* name, const char* config,
+ std::string& dep);
+
/** Translate a command as given in CMake code to the location of the
executable if the command is the name of a CMake executable target.
If that's not the case, just return the original name. */
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index c5d8c0d..15ae139 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -902,9 +902,12 @@ cmLocalUnixMakefileGenerator3
d != cc.GetDepends().end(); ++d)
{
// Lookup the real name of the dependency in case it is a CMake target.
- std::string dep = this->GetRealDependency
- (d->c_str(), this->ConfigurationName.c_str());
- depends.push_back(dep);
+ std::string dep;
+ if(this->GetRealDependency(d->c_str(), this->ConfigurationName.c_str(),
+ dep))
+ {
+ depends.push_back(dep);
+ }
}
}
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index eb4e4a4..b50c133 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -686,10 +686,12 @@ cmLocalVisualStudio6Generator
++d)
{
// Lookup the real name of the dependency in case it is a CMake target.
- std::string dep = this->GetRealDependency(d->c_str(),
- config.c_str());
- fout << "\\\n\t" <<
- this->ConvertToOptionallyRelativeOutputPath(dep.c_str());
+ std::string dep;
+ if(this->GetRealDependency(d->c_str(), config.c_str(), dep))
+ {
+ fout << "\\\n\t" <<
+ this->ConvertToOptionallyRelativeOutputPath(dep.c_str());
+ }
}
fout << "\n";
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 7fd7fd2..9a87cc4 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1624,9 +1624,12 @@ WriteCustomRule(std::ostream& fout,
++d)
{
// Get the real name of the dependency in case it is a CMake target.
- std::string dep = this->GetRealDependency(d->c_str(), i->c_str());
- fout << this->ConvertToXMLOutputPath(dep.c_str())
- << ";";
+ std::string dep;
+ if(this->GetRealDependency(d->c_str(), i->c_str(), dep))
+ {
+ fout << this->ConvertToXMLOutputPath(dep.c_str())
+ << ";";
+ }
}
}
fout << "\"\n";
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 56e0ed9..9983e5d 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3590,6 +3590,12 @@ cmTarget* cmMakefile::FindTargetToUse(const char* name)
return imported->second;
}
+ // Look for a target built in this directory.
+ if(cmTarget* t = this->FindTarget(name))
+ {
+ return t;
+ }
+
// Look for a target built in this project.
return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name);
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ca61b1f..ef274b4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1357,8 +1357,8 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
util = cmSystemTools::GetFilenameWithoutLastExtension(util);
}
- // Check for a non-imported target with this name.
- if(cmTarget* t = this->GlobalGenerator->FindTarget(0, util.c_str()))
+ // Check for a target with this name.
+ if(cmTarget* t = this->Makefile->FindTargetToUse(util.c_str()))
{
// If we find the target and the dep was given as a full path,
// then make sure it was not a full path to something else, and
@@ -1406,8 +1406,8 @@ cmTargetTraceDependencies
cit != cc.GetCommandLines().end(); ++cit)
{
std::string const& command = *cit->begin();
- // Look for a non-imported target with this name.
- if(cmTarget* t = this->GlobalGenerator->FindTarget(0, command.c_str()))
+ // Check for a target with this name.
+ if(cmTarget* t = this->Makefile->FindTargetToUse(command.c_str()))
{
if(t->GetType() == cmTarget::EXECUTABLE)
{
@@ -1450,6 +1450,15 @@ cmTargetTraceDependencies
//----------------------------------------------------------------------------
void cmTarget::TraceDependencies(const char* vsProjectFile)
{
+ // CMake-generated targets have no dependencies to trace. Normally tracing
+ // would find nothing anyway, but when building CMake itself the "install"
+ // target command ends up referencing the "cmake" target but we do not
+ // really want the dependency because "install" depend on "all" anyway.
+ if(this->GetType() == cmTarget::GLOBAL_TARGET)
+ {
+ return;
+ }
+
// Use a helper object to trace the dependencies.
cmTargetTraceDependencies tracer(this, this->Internal.Get(), vsProjectFile);
tracer.Trace();
@@ -3196,6 +3205,7 @@ void cmTarget::GetLibraryNames(std::string& name,
// the library version as the soversion.
soversion = version;
}
+ bool isApple = this->Makefile->IsOn("APPLE");
// Get the components of the library name.
std::string prefix;
@@ -3207,26 +3217,33 @@ void cmTarget::GetLibraryNames(std::string& name,
name = prefix+base+suffix;
// The library's soname.
-#if defined(__APPLE__)
- soName = prefix+base;
-#else
- soName = name;
-#endif
+ if(isApple)
+ {
+ soName = prefix+base;
+ }
+ else
+ {
+ soName = name;
+ }
if(soversion)
{
soName += ".";
soName += soversion;
}
-#if defined(__APPLE__)
- soName += suffix;
-#endif
+ if(isApple)
+ {
+ soName += suffix;
+ }
// The library's real name on disk.
-#if defined(__APPLE__)
- realName = prefix+base;
-#else
+ if(isApple)
+ {
+ realName = prefix+base;
+ }
+ else
+ {
realName = name;
-#endif
+ }
if(version)
{
realName += ".";
@@ -3237,9 +3254,10 @@ void cmTarget::GetLibraryNames(std::string& name,
realName += ".";
realName += soversion;
}
-#if defined(__APPLE__)
- realName += suffix;
-#endif
+ if(isApple)
+ {
+ realName += suffix;
+ }
// The import library name.
if(this->GetType() == cmTarget::SHARED_LIBRARY ||
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 524be8b..f78aeec 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -244,6 +244,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurations()
void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
{
+ cmGlobalVisualStudio10Generator* gg =
+ static_cast<cmGlobalVisualStudio10Generator*>(this->GlobalGenerator);
std::vector<std::string> *configs =
static_cast<cmGlobalVisualStudio7Generator *>
(this->GlobalGenerator)->GetConfigurations();
@@ -291,6 +293,13 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
{
this->WriteString("<CharacterSet>MultiByte</CharacterSet>\n", 2);
}
+ if(const char* toolset = gg->GetPlatformToolset())
+ {
+ std::string pts = "<PlatformToolset>";
+ pts += toolset;
+ pts += "</PlatformToolset>\n";
+ this->WriteString(pts.c_str(), 2);
+ }
this->WriteString("</PropertyGroup>\n", 1);
}
}
@@ -386,10 +395,12 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
d != command.GetDepends().end();
++d)
{
- std::string dep = this->LocalGenerator->
- GetRealDependency(d->c_str(), i->c_str());
- this->ConvertToWindowsSlash(dep);
- (*this->BuildFileStream ) << ";" << dep;
+ std::string dep;
+ if(this->LocalGenerator->GetRealDependency(d->c_str(), i->c_str(), dep))
+ {
+ this->ConvertToWindowsSlash(dep);
+ (*this->BuildFileStream ) << ";" << dep;
+ }
}
(*this->BuildFileStream ) << ";%(AdditionalInputs)</AdditionalInputs>\n";
this->WritePlatformConfigTag("Outputs", i->c_str(), 3);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ddfdc24..1b49837 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3815,6 +3815,10 @@ int cmake::VisualStudioLink(std::vector<std::string>& args, int type)
{
hasIncremental = true;
}
+ if(cmSystemTools::Strucmp(i->c_str(), "/INCREMENTAL") == 0)
+ {
+ hasIncremental = true;
+ }
if(cmSystemTools::Strucmp(i->c_str(), "/MANIFEST:NO") == 0)
{
hasManifest = false;
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 18cae43..a35a01f 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -237,10 +237,10 @@ IF(COMMAND INSTALL)
# Setup library install rules.
SET(KWSYS_INSTALL_LIBRARY_RULE)
- IF(KWSYS_INSTALL_EXPORT_NAME)
- LIST(APPEND KWSYS_INSTALL_LIBRARY_RULE EXPORT ${KWSYS_INSTALL_EXPORT_NAME})
- ENDIF()
IF(KWSYS_INSTALL_LIB_DIR)
+ IF(KWSYS_INSTALL_EXPORT_NAME)
+ LIST(APPEND KWSYS_INSTALL_LIBRARY_RULE EXPORT ${KWSYS_INSTALL_EXPORT_NAME})
+ ENDIF()
# Install the shared library to the lib directory.
SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
LIBRARY DESTINATION ${KWSYS_INSTALL_LIB_DIR}
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 8aa99eb..7638e4a 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -378,9 +378,7 @@ void SystemTools::GetPath(kwsys_stl::vector<kwsys_stl::string>& path, const char
kwsys_stl::string::size_type endpos = pathEnv.find(pathSep, start);
if(endpos != kwsys_stl::string::npos)
{
- kwsys_stl::string convertedPath;
- Realpath(pathEnv.substr(start, endpos-start).c_str(), convertedPath);
- path.push_back(convertedPath);
+ path.push_back(pathEnv.substr(start, endpos-start));
start = endpos+1;
}
else
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index b27f07b..7a9d2ca 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 12)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 08)
+SET(KWSYS_DATE_STAMP_DAY 14)