summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx45
1 files changed, 9 insertions, 36 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ad1c83e..f0957d0 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2191,7 +2191,7 @@ cmTarget::GetIncludeDirectories(const std::string& config) const
it = impl->Libraries.begin();
it != impl->Libraries.end(); ++it)
{
- std::string libDir = cmSystemTools::CollapseFullPath(it->c_str());
+ std::string libDir = cmSystemTools::CollapseFullPath(*it);
static cmsys::RegularExpression
frameworkCheck("(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
@@ -4575,7 +4575,7 @@ bool cmTarget::ComputeOutputDir(const std::string& config,
// specified as a relative path. Treat a relative path as
// relative to the current output directory for this makefile.
out = (cmSystemTools::CollapseFullPath
- (out.c_str(), this->Makefile->GetStartOutputDirectory()));
+ (out, this->Makefile->GetStartOutputDirectory()));
// The generator may add the configuration's subdirectory.
if(!conf.empty())
@@ -4641,7 +4641,7 @@ bool cmTarget::ComputePDBOutputDir(const std::string& kind,
// specified as a relative path. Treat a relative path as
// relative to the current output directory for this makefile.
out = (cmSystemTools::CollapseFullPath
- (out.c_str(), this->Makefile->GetStartOutputDirectory()));
+ (out, this->Makefile->GetStartOutputDirectory()));
// The generator may add the configuration's subdirectory.
if(!conf.empty())
@@ -4733,7 +4733,7 @@ const char* cmTarget::GetExportMacro() const
{
std::string in = this->GetName();
in += "_EXPORTS";
- this->ExportMacro = cmSystemTools::MakeCindentifier(in.c_str());
+ this->ExportMacro = cmSystemTools::MakeCindentifier(in);
}
return this->ExportMacro.c_str();
}
@@ -4801,16 +4801,6 @@ std::pair<bool, const char*> consistentStringProperty(const char *lhs,
return std::make_pair(b, b ? lhs : 0);
}
-#if defined(_MSC_VER) && _MSC_VER <= 1200
-template<typename T> const T&
-cmMaximum(const T& l, const T& r) {return l > r ? l : r;}
-template<typename T> const T&
-cmMinimum(const T& l, const T& r) {return l < r ? l : r;}
-#else
-#define cmMinimum std::min
-#define cmMaximum std::max
-#endif
-
//----------------------------------------------------------------------------
std::pair<bool, const char*> consistentNumberProperty(const char *lhs,
const char *rhs,
@@ -4818,11 +4808,7 @@ std::pair<bool, const char*> consistentNumberProperty(const char *lhs,
{
char *pEnd;
-#if defined(_MSC_VER)
- static const char* const null_ptr = 0;
-#else
-# define null_ptr 0
-#endif
+ const char* const null_ptr = 0;
long lnum = strtol(lhs, &pEnd, 0);
if (pEnd == lhs || *pEnd != '\0' || errno == ERANGE)
@@ -4836,17 +4822,13 @@ std::pair<bool, const char*> consistentNumberProperty(const char *lhs,
return std::pair<bool, const char*>(false, null_ptr);
}
-#if !defined(_MSC_VER)
-#undef null_ptr
-#endif
-
if (t == NumberMaxType)
{
- return std::make_pair(true, cmMaximum(lnum, rnum) == lnum ? lhs : rhs);
+ return std::make_pair(true, std::max(lnum, rnum) == lnum ? lhs : rhs);
}
else
{
- return std::make_pair(true, cmMinimum(lnum, rnum) == lnum ? lhs : rhs);
+ return std::make_pair(true, std::min(lnum, rnum) == lnum ? lhs : rhs);
}
}
@@ -4869,11 +4851,7 @@ std::pair<bool, const char*> consistentProperty(const char *lhs,
return std::make_pair(true, lhs);
}
-#if defined(_MSC_VER)
- static const char* const null_ptr = 0;
-#else
-# define null_ptr 0
-#endif
+ const char* const null_ptr = 0;
switch(t)
{
@@ -4888,11 +4866,6 @@ std::pair<bool, const char*> consistentProperty(const char *lhs,
}
assert(!"Unreachable!");
return std::pair<bool, const char*>(false, null_ptr);
-
-#if !defined(_MSC_VER)
-#undef null_ptr
-#endif
-
}
template<typename PropertyType>
@@ -5306,7 +5279,7 @@ cmTarget::GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const
{
continue;
}
- cmTarget *objLib = this->Makefile->FindTargetToUse(objLibName.c_str());
+ cmTarget *objLib = this->Makefile->FindTargetToUse(objLibName);
if(objLib)
{
objlibs.push_back(objLib);