summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/cmake-commands.7.rst2
-rw-r--r--Modules/FindJNI.cmake4
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/OSXScriptLauncher.cxx11
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx3
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx2
-rw-r--r--Source/CTest/cmCTestGIT.cxx1
-rw-r--r--Source/CTest/cmCTestP4.cxx1
-rw-r--r--Source/cmArchiveWrite.cxx7
-rw-r--r--Source/cmCMakeHostSystemInformationCommand.cxx4
-rw-r--r--Source/cmComputeLinkDepends.cxx2
-rw-r--r--Source/cmCryptoHash.cxx2
-rw-r--r--Source/cmFindLibraryCommand.cxx1
-rw-r--r--Source/cmFindPackageCommand.cxx2
-rw-r--r--Source/cmMakefile.cxx143
-rw-r--r--Source/cmMakefile.h3
-rw-r--r--Source/cmQtAutoGenerators.cxx5
-rw-r--r--Source/cmStandardIncludes.h8
-rw-r--r--Source/cmState.cxx163
-rw-r--r--Source/cmState.h9
-rw-r--r--Source/cmSystemTools.cxx3
-rw-r--r--Source/cmXMLSafe.cxx8
-rw-r--r--Source/cmXMLSafe.h8
-rw-r--r--Tests/CMakeLib/testVisualStudioSlnParser.cxx60
-rw-r--r--Tests/CMakeLib/testXMLParser.cxx4
26 files changed, 243 insertions, 217 deletions
diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst
index c916f77..5b92b51 100644
--- a/Help/manual/cmake-commands.7.rst
+++ b/Help/manual/cmake-commands.7.rst
@@ -71,7 +71,6 @@ These commands may be used freely in CMake projects.
/command/link_libraries
/command/list
/command/load_cache
- /command/load_command
/command/macro
/command/mark_as_advanced
/command/math
@@ -119,6 +118,7 @@ versions of CMake. Do not use them in new code.
/command/install_files
/command/install_programs
/command/install_targets
+ /command/load_command
/command/make_directory
/command/output_required_files
/command/remove
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index d248fe1..d31fea3 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -42,7 +42,11 @@ macro(java_append_library_directories _var)
# 1.6.0_18 + icedtea patches. However, it would be much better to base the
# guess on the first part of the GNU config.guess platform triplet.
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
+ set(_java_libarch "x32" "amd64" "i386")
+ else()
set(_java_libarch "amd64" "i386")
+ endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
set(_java_libarch "i386")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 1be38af..fe2dbea 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -42,7 +42,7 @@ valid filepaths.
(recommended). Not valid in the full signature.
``FOUND_VAR <result-var>``
- Obselete. Specifies either ``<PackageName>_FOUND`` or
+ Obsolete. Specifies either ``<PackageName>_FOUND`` or
``<PACKAGENAME>_FOUND`` as the result variable. This exists only
for compatibility with older versions of CMake and is now ignored.
Result variables of both names are always set for compatibility.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index cfbeab3..4e0b28c 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 3)
-set(CMake_VERSION_PATCH 20150824)
+set(CMake_VERSION_PATCH 20150825)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx
index 1d7afbd..c271517 100644
--- a/Source/CPack/OSXScriptLauncher.cxx
+++ b/Source/CPack/OSXScriptLauncher.cxx
@@ -11,17 +11,18 @@
============================================================================*/
#include <cmsys/SystemTools.hxx>
#include <cmsys/Process.h>
-#include <cmsys/ios/iostream>
#include <cmsys/FStream.hxx>
+#include <iostream>
+
#include <CoreFoundation/CoreFoundation.h>
// For the PATH_MAX constant
#include <sys/syslimits.h>
#define DebugError(x) \
- ofs << x << cmsys_ios::endl; \
- cmsys_ios::cout << x << cmsys_ios::endl
+ ofs << x << std::endl; \
+ std::cout << x << std::endl
int main(int argc, char* argv[])
{
@@ -77,7 +78,7 @@ int main(int argc, char* argv[])
std::string scriptDirectory = cmsys::SystemTools::GetFilenamePath(
fullScriptPath);
- ofs << fullScriptPath.c_str() << cmsys_ios::endl;
+ ofs << fullScriptPath.c_str() << std::endl;
std::vector<const char*> args;
args.push_back(fullScriptPath.c_str());
int cc;
@@ -109,7 +110,7 @@ int main(int argc, char* argv[])
data[i] = ' ';
}
}
- cmsys_ios::cout.write(data, length);
+ std::cout.write(data, length);
}
cmsysProcess_WaitForExit(cp, 0);
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index e5da5cf..109dcb7 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -19,7 +19,6 @@
#include "cmMakefile.h"
#include "cmCPackLog.h"
-#include <cmsys/ios/sstream>
#include <cmsys/FStream.hxx>
#include <sys/types.h>
#include <sys/stat.h>
@@ -85,7 +84,7 @@ int cmCPackSTGZGenerator::PackageFiles()
int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
{
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Writing header" << std::endl);
- cmsys_ios::ostringstream str;
+ std::ostringstream str;
int counter = 0;
std::string inLicFile = this->GetOption("CPACK_RESOURCE_FILE_LICENSE");
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 65599e0..20807c8 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -27,8 +27,6 @@
#include <cmsys/Process.h>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/Glob.hxx>
-#include <cmsys/stl/iterator>
-#include <cmsys/stl/algorithm>
#include <cmsys/FStream.hxx>
#include <stdlib.h>
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 6b84bab..5b9208a 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -17,7 +17,6 @@
#include "cmXMLSafe.h"
#include <cmsys/RegularExpression.hxx>
-#include <cmsys/ios/sstream>
#include <cmsys/Process.h>
#include <cmsys/FStream.hxx>
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index 31002a6..5ce431a 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -16,7 +16,6 @@
#include "cmXMLSafe.h"
#include <cmsys/RegularExpression.hxx>
-#include <cmsys/ios/sstream>
#include <cmsys/Process.h>
#include <sys/types.h>
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index 9335680..9f56324 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -13,7 +13,6 @@
#include "cmSystemTools.h"
#include "cmLocale.h"
-#include <cmsys/ios/iostream>
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
#include <cm_libarchive.h>
@@ -67,7 +66,7 @@ struct cmArchiveWrite::Callback
{
cmArchiveWrite* self = static_cast<cmArchiveWrite*>(cd);
if(self->Stream.write(static_cast<const char*>(b),
- static_cast<cmsys_ios::streamsize>(n)))
+ static_cast<std::streamsize>(n)))
{
return static_cast<__LA_SSIZE_T>(n);
}
@@ -313,7 +312,7 @@ bool cmArchiveWrite::AddFile(const char* file,
//----------------------------------------------------------------------------
bool cmArchiveWrite::AddData(const char* file, size_t size)
{
- cmsys::ifstream fin(file, std::ios::in | cmsys_ios_binary);
+ cmsys::ifstream fin(file, std::ios::in | std::ios::binary);
if(!fin)
{
this->Error = "Error opening \"";
@@ -327,7 +326,7 @@ bool cmArchiveWrite::AddData(const char* file, size_t size)
size_t nleft = size;
while(nleft > 0)
{
- typedef cmsys_ios::streamsize ssize_type;
+ typedef std::streamsize ssize_type;
size_t const nnext = nleft > sizeof(buffer)? sizeof(buffer) : nleft;
ssize_type const nnext_s = static_cast<ssize_type>(nnext);
fin.read(buffer, nnext_s);
diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx
index 5234538..6ff7c0d 100644
--- a/Source/cmCMakeHostSystemInformationCommand.cxx
+++ b/Source/cmCMakeHostSystemInformationCommand.cxx
@@ -11,8 +11,6 @@
============================================================================*/
#include "cmCMakeHostSystemInformationCommand.h"
-#include <cmsys/ios/sstream>
-
// cmCMakeHostSystemInformation
bool cmCMakeHostSystemInformationCommand
::InitialPass(std::vector<std::string> const &args, cmExecutionStatus &)
@@ -107,7 +105,7 @@ bool cmCMakeHostSystemInformationCommand
std::string cmCMakeHostSystemInformationCommand
::ValueToString(size_t value) const
{
- cmsys_ios::stringstream tmp;
+ std::stringstream tmp;
tmp << value;
return tmp.str();
}
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 8ba8847..59590fd 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -18,8 +18,6 @@
#include "cmake.h"
#include "cmAlgorithms.h"
-#include <cmsys/stl/algorithm>
-
#include <assert.h>
/*
diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx
index 74e17b6..6616218 100644
--- a/Source/cmCryptoHash.cxx
+++ b/Source/cmCryptoHash.cxx
@@ -46,7 +46,7 @@ std::string cmCryptoHash::HashString(const std::string& input)
//----------------------------------------------------------------------------
std::string cmCryptoHash::HashFile(const std::string& file)
{
- cmsys::ifstream fin(file.c_str(), std::ios::in | cmsys_ios_binary);
+ cmsys::ifstream fin(file.c_str(), std::ios::in | std::ios::binary);
if(!fin)
{
return "";
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 0a66732..e8d158e 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -11,7 +11,6 @@
============================================================================*/
#include "cmFindLibraryCommand.h"
#include <cmsys/Directory.hxx>
-#include <cmsys/stl/algorithm>
cmFindLibraryCommand::cmFindLibraryCommand()
{
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 68a6558..9b9071d 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1378,7 +1378,7 @@ void cmFindPackageCommand::LoadPackageRegistryDir(std::string const& dir,
cmFindPackageCommandHoldFile holdFile(fname.c_str());
// Load the file.
- cmsys::ifstream fin(fname.c_str(), std::ios::in | cmsys_ios_binary);
+ cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
std::string fentry;
if(fin && cmSystemTools::GetLineFromStream(fin, fentry) &&
this->CheckPackageRegistryEntry(fentry, outPaths))
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7ad37e6..2296d5a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4075,148 +4075,28 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
void cmMakefile::SetProperty(const std::string& prop, const char* value)
{
- if (prop == "INCLUDE_DIRECTORIES")
- {
- if (!value)
- {
- this->StateSnapshot.GetDirectory().ClearIncludeDirectories();
- return;
- }
- cmListFileBacktrace lfbt = this->GetBacktrace();
- this->StateSnapshot.GetDirectory().SetIncludeDirectories(value, lfbt);
- return;
- }
- if (prop == "COMPILE_OPTIONS")
- {
- if (!value)
- {
- this->StateSnapshot.GetDirectory().ClearCompileOptions();
- return;
- }
- cmListFileBacktrace lfbt = this->GetBacktrace();
- this->StateSnapshot.GetDirectory().SetCompileOptions(value, lfbt);
- return;
- }
- if (prop == "COMPILE_DEFINITIONS")
- {
- if (!value)
- {
- this->StateSnapshot.GetDirectory().ClearCompileDefinitions();
- return;
- }
- cmListFileBacktrace lfbt = this->GetBacktrace();
- this->StateSnapshot.GetDirectory().SetCompileDefinitions(value, lfbt);
- return;
- }
-
- this->Properties.SetProperty(prop, value);
+ cmListFileBacktrace lfbt = this->GetBacktrace();
+ this->StateSnapshot.GetDirectory().SetProperty(prop, value, lfbt);
}
void cmMakefile::AppendProperty(const std::string& prop,
const char* value,
bool asString)
{
- if (prop == "INCLUDE_DIRECTORIES")
- {
- cmListFileBacktrace lfbt = this->GetBacktrace();
- this->StateSnapshot.GetDirectory().AppendIncludeDirectoriesEntry(value,
- lfbt);
- return;
- }
- if (prop == "COMPILE_OPTIONS")
- {
- cmListFileBacktrace lfbt = this->GetBacktrace();
- this->StateSnapshot.GetDirectory().AppendCompileOptionsEntry(value, lfbt);
- return;
- }
- if (prop == "COMPILE_DEFINITIONS")
- {
- cmListFileBacktrace lfbt = this->GetBacktrace();
- this->StateSnapshot.GetDirectory().AppendCompileDefinitionsEntry(value,
- lfbt);
- return;
- }
-
- this->Properties.AppendProperty(prop, value, asString);
+ cmListFileBacktrace lfbt = this->GetBacktrace();
+ this->StateSnapshot.GetDirectory().AppendProperty(prop, value,
+ asString, lfbt);
}
const char *cmMakefile::GetProperty(const std::string& prop) const
{
- const bool chain = this->GetState()->
- IsPropertyChained(prop, cmProperty::DIRECTORY);
- return this->GetProperty(prop, chain);
+ return this->StateSnapshot.GetDirectory().GetProperty(prop);
}
const char *cmMakefile::GetProperty(const std::string& prop,
bool chain) const
{
- // watch for specific properties
- static std::string output;
- output = "";
- if (prop == "PARENT_DIRECTORY")
- {
- cmState::Snapshot parent =
- this->StateSnapshot.GetBuildsystemDirectoryParent();
- if(parent.IsValid())
- {
- return parent.GetDirectory().GetCurrentSource();
- }
- return "";
- }
- else if (prop == "LISTFILE_STACK")
- {
- std::vector<std::string> listFiles;
- cmState::Snapshot snp = this->StateSnapshot;
- while (snp.IsValid())
- {
- listFiles.push_back(snp.GetExecutionListFile());
- snp = snp.GetCallStackParent();
- }
- std::reverse(listFiles.begin(), listFiles.end());
- output = cmJoin(listFiles, ";");
- return output.c_str();
- }
- else if ( prop == "CACHE_VARIABLES" )
- {
- output = cmJoin(this->GetState()->GetCacheEntryKeys(), ";");
- return output.c_str();
- }
- else if (prop == "VARIABLES")
- {
- output = cmJoin(this->GetDefinitions(), ";");
- return output.c_str();
- }
- else if (prop == "INCLUDE_DIRECTORIES")
- {
- output = cmJoin(this->StateSnapshot.GetDirectory()
- .GetIncludeDirectoriesEntries(), ";");
- return output.c_str();
- }
- else if (prop == "COMPILE_OPTIONS")
- {
- output = cmJoin(this->StateSnapshot.GetDirectory()
- .GetCompileOptionsEntries(), ";");
- return output.c_str();
- }
- else if (prop == "COMPILE_DEFINITIONS")
- {
- output = cmJoin(this->StateSnapshot.GetDirectory()
- .GetCompileDefinitionsEntries(), ";");
- return output.c_str();
- }
-
- const char *retVal = this->Properties.GetPropertyValue(prop);
- if (!retVal && chain)
- {
- if(this->LocalGenerator->GetParent())
- {
- return this->LocalGenerator->GetParent()->GetMakefile()->
- GetProperty(prop, chain);
- }
- return this->GetState()->GetGlobalProperty(prop);
- }
-
- return retVal;
+ return this->StateSnapshot.GetDirectory().GetProperty(prop, chain);
}
bool cmMakefile::GetPropertyAsBool(const std::string& prop) const
@@ -4226,14 +4106,7 @@ bool cmMakefile::GetPropertyAsBool(const std::string& prop) const
std::vector<std::string> cmMakefile::GetPropertyKeys() const
{
- std::vector<std::string> keys;
- keys.reserve(this->Properties.size());
- for(cmPropertyMap::const_iterator it = this->Properties.begin();
- it != this->Properties.end(); ++it)
- {
- keys.push_back(it->first);
- }
- return keys;
+ return this->StateSnapshot.GetDirectory().GetPropertyKeys();
}
cmTarget* cmMakefile::FindTarget(const std::string& name,
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 9f455cc..055170a 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -14,7 +14,6 @@
#include "cmExecutionStatus.h"
#include "cmListFileCache.h"
-#include "cmPropertyMap.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmNewLineStyle.h"
@@ -903,8 +902,6 @@ private:
std::vector<cmGeneratorExpressionEvaluationFile*> EvaluationFiles;
- cmPropertyMap Properties;
-
std::vector<cmCommandContext const*> ContextStack;
std::vector<cmExecutionStatus*> ExecutionStatusStack;
friend class cmMakefileCall;
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 4eb9b13..f85e70e 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -26,7 +26,6 @@
#include <sys/stat.h>
#include <cmsys/Terminal.h>
-#include <cmsys/ios/sstream>
#include <cmsys/FStream.hxx>
#include <assert.h>
@@ -122,7 +121,7 @@ static void copyTargetProperty(cmTarget* destinationTarget,
static std::string ReadAll(const std::string& filename)
{
cmsys::ifstream file(filename.c_str());
- cmsys_ios::stringstream stream;
+ std::stringstream stream;
stream << file.rdbuf();
file.close();
return stream.str();
@@ -1640,7 +1639,7 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
this->GenerateQrc();
}
- cmsys_ios::stringstream outStream;
+ std::stringstream outStream;
outStream << "/* This file is autogenerated, do not edit*/\n";
bool automocCppChanged = false;
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index a9796b9..468a589 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -33,14 +33,6 @@
// Provide fixed-size integer types.
#include <cmIML/INT.h>
-// Include stream compatibility layer from KWSys.
-// This is needed to work with large file support
-// on some platforms whose stream operators do not
-// support the large integer types.
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-# include <cmsys/IOStream.hxx>
-#endif
-
#include <fstream>
#include <iostream>
#include <iomanip>
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 336ff78..53fdae0 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -74,6 +74,8 @@ struct cmState::BuildsystemDirectoryStateType
std::vector<std::string> CompileOptions;
std::vector<cmListFileBacktrace> CompileOptionsBacktraces;
+
+ cmPropertyMap Properties;
};
cmState::cmState(cmake* cm)
@@ -271,6 +273,7 @@ cmState::Snapshot cmState::Reset()
it->CompileOptions.clear();
it->CompileOptionsBacktraces.clear();
it->DirectoryEnd = pos;
+ it->Properties.clear();
}
this->PolicyStack.Clear();
@@ -1538,3 +1541,163 @@ bool cmState::Snapshot::StrictWeakOrder::operator()(
{
return lhs.Position.StrictWeakOrdered(rhs.Position);
}
+
+void cmState::Directory::SetProperty(const std::string& prop,
+ const char* value,
+ cmListFileBacktrace lfbt)
+{
+ if (prop == "INCLUDE_DIRECTORIES")
+ {
+ if (!value)
+ {
+ this->ClearIncludeDirectories();
+ return;
+ }
+ this->SetIncludeDirectories(value, lfbt);
+ return;
+ }
+ if (prop == "COMPILE_OPTIONS")
+ {
+ if (!value)
+ {
+ this->ClearCompileOptions();
+ return;
+ }
+ this->SetCompileOptions(value, lfbt);
+ return;
+ }
+ if (prop == "COMPILE_DEFINITIONS")
+ {
+ if (!value)
+ {
+ this->ClearCompileDefinitions();
+ return;
+ }
+ this->SetCompileDefinitions(value, lfbt);
+ return;
+ }
+
+ this->DirectoryState->Properties.SetProperty(prop, value);
+}
+
+void cmState::Directory::AppendProperty(const std::string& prop,
+ const char* value,
+ bool asString,
+ cmListFileBacktrace lfbt)
+{
+ if (prop == "INCLUDE_DIRECTORIES")
+ {
+ this->AppendIncludeDirectoriesEntry(value, lfbt);
+ return;
+ }
+ if (prop == "COMPILE_OPTIONS")
+ {
+ this->AppendCompileOptionsEntry(value, lfbt);
+ return;
+ }
+ if (prop == "COMPILE_DEFINITIONS")
+ {
+ this->AppendCompileDefinitionsEntry(value, lfbt);
+ return;
+ }
+
+ this->DirectoryState->Properties.AppendProperty(prop, value, asString);
+}
+
+const char*cmState::Directory::GetProperty(const std::string& prop) const
+{
+ const bool chain = this->Snapshot_.State->
+ IsPropertyChained(prop, cmProperty::DIRECTORY);
+ return this->GetProperty(prop, chain);
+}
+
+const char*
+cmState::Directory::GetProperty(const std::string& prop, bool chain) const
+{
+ static std::string output;
+ output = "";
+ if (prop == "PARENT_DIRECTORY")
+ {
+ cmState::Snapshot parent =
+ this->Snapshot_.GetBuildsystemDirectoryParent();
+ if(parent.IsValid())
+ {
+ return parent.GetDirectory().GetCurrentSource();
+ }
+ return "";
+ }
+ else if (prop == "LISTFILE_STACK")
+ {
+ std::vector<std::string> listFiles;
+ cmState::Snapshot snp = this->Snapshot_;
+ while (snp.IsValid())
+ {
+ listFiles.push_back(snp.GetExecutionListFile());
+ snp = snp.GetCallStackParent();
+ }
+ std::reverse(listFiles.begin(), listFiles.end());
+ output = cmJoin(listFiles, ";");
+ return output.c_str();
+ }
+ else if ( prop == "CACHE_VARIABLES" )
+ {
+ output = cmJoin(this->Snapshot_.State->GetCacheEntryKeys(), ";");
+ return output.c_str();
+ }
+ else if (prop == "VARIABLES")
+ {
+ std::vector<std::string> res = this->Snapshot_.ClosureKeys();
+ std::vector<std::string> cacheKeys =
+ this->Snapshot_.State->GetCacheEntryKeys();
+ res.insert(res.end(), cacheKeys.begin(), cacheKeys.end());
+ std::sort(res.begin(), res.end());
+ output = cmJoin(res, ";");
+ return output.c_str();
+ }
+ else if (prop == "INCLUDE_DIRECTORIES")
+ {
+ output = cmJoin(this->GetIncludeDirectoriesEntries(), ";");
+ return output.c_str();
+ }
+ else if (prop == "COMPILE_OPTIONS")
+ {
+ output = cmJoin(this->GetCompileOptionsEntries(), ";");
+ return output.c_str();
+ }
+ else if (prop == "COMPILE_DEFINITIONS")
+ {
+ output = cmJoin(this->GetCompileDefinitionsEntries(), ";");
+ return output.c_str();
+ }
+
+ const char *retVal = this->DirectoryState->Properties.GetPropertyValue(prop);
+ if (!retVal && chain)
+ {
+ Snapshot parentSnapshot = this->Snapshot_.GetBuildsystemDirectoryParent();
+ if (parentSnapshot.IsValid())
+ {
+ return parentSnapshot.GetDirectory().GetProperty(prop, chain);
+ }
+ return this->Snapshot_.State->GetGlobalProperty(prop);
+ }
+
+ return retVal;
+}
+
+bool cmState::Directory::GetPropertyAsBool(const std::string& prop) const
+{
+ return cmSystemTools::IsOn(this->GetProperty(prop));
+}
+
+std::vector<std::string> cmState::Directory::GetPropertyKeys() const
+{
+ std::vector<std::string> keys;
+ keys.reserve(this->DirectoryState->Properties.size());
+ for(cmPropertyMap::const_iterator it =
+ this->DirectoryState->Properties.begin();
+ it != this->DirectoryState->Properties.end(); ++it)
+ {
+ keys.push_back(it->first);
+ }
+ return keys;
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index 86945f6..e503cd2 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -146,6 +146,15 @@ public:
cmListFileBacktrace const& lfbt);
void ClearCompileOptions();
+ void SetProperty(const std::string& prop, const char *value,
+ cmListFileBacktrace lfbt);
+ void AppendProperty(const std::string& prop, const char *value,
+ bool asString, cmListFileBacktrace lfbt);
+ const char *GetProperty(const std::string& prop) const;
+ const char *GetProperty(const std::string& prop, bool chain) const;
+ bool GetPropertyAsBool(const std::string& prop) const;
+ std::vector<std::string> GetPropertyKeys() const;
+
private:
void ComputeRelativePathTopSource();
void ComputeRelativePathTopBinary();
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index eba8d07..3f03b51 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -30,7 +30,6 @@
# include "cmLocale.h"
# include <cm_libarchive.h>
#endif
-#include <cmsys/stl/algorithm>
#include <cmsys/FStream.hxx>
#include <cmsys/Terminal.h>
@@ -1482,7 +1481,7 @@ bool cmSystemTools::CreateTar(const char* outFileName,
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
- cmsys::ofstream fout(outFileName, std::ios::out | cmsys_ios_binary);
+ cmsys::ofstream fout(outFileName, std::ios::out | std::ios::binary);
if(!fout)
{
std::string e = "Cannot open output file \"";
diff --git a/Source/cmXMLSafe.cxx b/Source/cmXMLSafe.cxx
index 99f5625..4ad05ca 100644
--- a/Source/cmXMLSafe.cxx
+++ b/Source/cmXMLSafe.cxx
@@ -13,8 +13,8 @@
#include "cm_utf8.h"
-#include <cmsys/ios/iostream>
-#include <cmsys/ios/sstream>
+#include <iostream>
+#include <sstream>
#include <string.h>
#include <stdio.h>
@@ -45,13 +45,13 @@ cmXMLSafe& cmXMLSafe::Quotes(bool b)
//----------------------------------------------------------------------------
std::string cmXMLSafe::str()
{
- cmsys_ios::ostringstream ss;
+ std::ostringstream ss;
ss << *this;
return ss.str();
}
//----------------------------------------------------------------------------
-cmsys_ios::ostream& operator<<(cmsys_ios::ostream& os, cmXMLSafe const& self)
+std::ostream& operator<<(std::ostream& os, cmXMLSafe const& self)
{
char const* first = self.Data;
char const* last = self.Data + self.Size;
diff --git a/Source/cmXMLSafe.h b/Source/cmXMLSafe.h
index c23a90c..ead2e01 100644
--- a/Source/cmXMLSafe.h
+++ b/Source/cmXMLSafe.h
@@ -12,8 +12,9 @@
#ifndef cmXMLSafe_h
#define cmXMLSafe_h
-#include <cmsys/stl/string>
-#include <cmsys/ios/iosfwd>
+#include <cmsys/Configure.hxx>
+#include <string>
+#include <iosfwd>
/** \class cmXMLSafe
* \brief Write strings to XML with proper escapes
@@ -37,8 +38,7 @@ private:
char const* Data;
unsigned long Size;
bool DoQuotes;
- friend cmsys_ios::ostream& operator<<(cmsys_ios::ostream&,
- cmXMLSafe const&);
+ friend std::ostream& operator<<(std::ostream&, cmXMLSafe const&);
};
#endif
diff --git a/Tests/CMakeLib/testVisualStudioSlnParser.cxx b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
index 5b62f23..5007ab8 100644
--- a/Tests/CMakeLib/testVisualStudioSlnParser.cxx
+++ b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
@@ -3,7 +3,7 @@
#include "cmVisualStudioSlnData.h"
#include "cmVisualStudioSlnParser.h"
-#include <cmsys/ios/iostream>
+#include <iostream>
//----------------------------------------------------------------------------
static bool parsedRight(cmVisualStudioSlnParser& parser,
@@ -27,10 +27,10 @@ static bool parsedRight(cmVisualStudioSlnParser& parser,
return true;
}
}
- cmsys_ios::cerr << "cmVisualStudioSlnParser mis-parsed " << file
- << "." SLN_EXTENSION << "; expected result " << expected
- << ", got " << parser.GetParseResult()
- << cmsys_ios::endl;
+ std::cerr << "cmVisualStudioSlnParser mis-parsed " << file
+ << "." SLN_EXTENSION << "; expected result " << expected
+ << ", got " << parser.GetParseResult()
+ << std::endl;
return false;
}
@@ -42,8 +42,8 @@ int testVisualStudioSlnParser(int, char*[])
// Test clean parser
if (parser.GetParseResult() != cmVisualStudioSlnParser::ResultOK)
{
- cmsys_ios::cerr << "cmVisualStudioSlnParser initialisation failed"
- << cmsys_ios::endl;
+ std::cerr << "cmVisualStudioSlnParser initialisation failed"
+ << std::endl;
return 1;
}
@@ -73,38 +73,38 @@ int testVisualStudioSlnParser(int, char*[])
const size_t expectedProjectCount = sizeof(names) / sizeof(*names);
if (projects.size() != expectedProjectCount)
{
- cmsys_ios::cerr << "cmVisualStudioSlnParser returned bad number of "
- << "projects (" << projects.size() << " instead of "
- << expectedProjectCount << ')'
- << cmsys_ios::endl;
+ std::cerr << "cmVisualStudioSlnParser returned bad number of "
+ << "projects (" << projects.size() << " instead of "
+ << expectedProjectCount << ')'
+ << std::endl;
return 1;
}
for (size_t idx = 0; idx < expectedProjectCount; ++idx)
{
if (projects[idx].GetName() != names[idx])
{
- cmsys_ios::cerr << "cmVisualStudioSlnParser returned bad project #"
- << idx << "; expected \"" << names[idx] << "\", got \""
- << projects[idx].GetName() << '"'
- << cmsys_ios::endl;
+ std::cerr << "cmVisualStudioSlnParser returned bad project #"
+ << idx << "; expected \"" << names[idx] << "\", got \""
+ << projects[idx].GetName() << '"'
+ << std::endl;
return 1;
}
}
if (projects[0].GetRelativePath() != "Utilities\\3rdParty")
{
- cmsys_ios::cerr << "cmVisualStudioSlnParser returned bad relative path of "
- << "project 3rdParty; expected \"Utilities\\3rdParty\", "
- << "got \"" << projects[0].GetRelativePath() << '"'
- << cmsys_ios::endl;
+ std::cerr << "cmVisualStudioSlnParser returned bad relative path of "
+ << "project 3rdParty; expected \"Utilities\\3rdParty\", "
+ << "got \"" << projects[0].GetRelativePath() << '"'
+ << std::endl;
return 1;
}
if (projects[2].GetGUID() != "{59BCCCCD-3AD1-4491-B8F4-C5793AC007E2}")
{
- cmsys_ios::cerr << "cmVisualStudioSlnParser returned bad relative path of "
- << "project CMakeLib; expected "
- << "\"{59BCCCCD-3AD1-4491-B8F4-C5793AC007E2}\", "
- << "got \"" << projects[2].GetGUID() << '"'
- << cmsys_ios::endl;
+ std::cerr << "cmVisualStudioSlnParser returned bad relative path of "
+ << "project CMakeLib; expected "
+ << "\"{59BCCCCD-3AD1-4491-B8F4-C5793AC007E2}\", "
+ << "got \"" << projects[2].GetGUID() << '"'
+ << std::endl;
return 1;
}
}
@@ -119,9 +119,9 @@ int testVisualStudioSlnParser(int, char*[])
}
if (!parser.GetParseHadBOM())
{
- cmsys_ios::cerr << "cmVisualStudioSlnParser didn't find BOM in bom."
- << SLN_EXTENSION
- << cmsys_ios::endl;
+ std::cerr << "cmVisualStudioSlnParser didn't find BOM in bom."
+ << SLN_EXTENSION
+ << std::endl;
return 1;
}
@@ -131,9 +131,9 @@ int testVisualStudioSlnParser(int, char*[])
}
if (parser.GetParseHadBOM())
{
- cmsys_ios::cerr << "cmVisualStudioSlnParser found BOM in nobom."
- << SLN_EXTENSION
- << cmsys_ios::endl;
+ std::cerr << "cmVisualStudioSlnParser found BOM in nobom."
+ << SLN_EXTENSION
+ << std::endl;
return 1;
}
}
diff --git a/Tests/CMakeLib/testXMLParser.cxx b/Tests/CMakeLib/testXMLParser.cxx
index 54ed5dc..b5219e2 100644
--- a/Tests/CMakeLib/testXMLParser.cxx
+++ b/Tests/CMakeLib/testXMLParser.cxx
@@ -2,7 +2,7 @@
#include "cmXMLParser.h"
-#include <cmsys/ios/iostream>
+#include <iostream>
int testXMLParser(int, char*[])
{
@@ -10,7 +10,7 @@ int testXMLParser(int, char*[])
cmXMLParser parser;
if(!parser.ParseFile(SOURCE_DIR "/testXMLParser.xml"))
{
- cmsys_ios::cerr << "cmXMLParser failed!" << cmsys_ios::endl;
+ std::cerr << "cmXMLParser failed!" << std::endl;
return 1;
}
return 0;