summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-01-15 09:17:20 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2009-01-15 09:17:20 -0500
commitcc93e3252696e812d0a8ddd8775b987152a379ce (patch)
tree84a3fa07f451317c7f6f4bbea07f830e3b4ca049
parent3dc60d33d976e7b8776723eee2322c2463d4b55b (diff)
downloadcmake-cc93e3252696e812d0a8ddd8775b987152a379ce.tar.gz
ENH: merge in changes from main tree, fix borland build
-rw-r--r--CMakeLists.txt2
-rw-r--r--ChangeLog.manual5
-rw-r--r--Source/cmDocumentVariables.cxx14
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx6
-rw-r--r--Source/cmFunctionCommand.cxx5
-rw-r--r--Source/cmMakefile.cxx5
-rw-r--r--Source/cmMakefile.h10
-rw-r--r--Tests/FindPackageTest/CMakeLists.txt3
8 files changed, 44 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 411b404862..dbcfe82945 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 3)
-SET(CMake_VERSION_RC 8)
+SET(CMake_VERSION_RC 9)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
diff --git a/ChangeLog.manual b/ChangeLog.manual
index e823fcadcd..bd27d0f820 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,8 @@
+Changes in CMake 2.6.3 RC 9
+- Fix borland 55 build
+- Pop a function scope even on error
+- Provide variable CMAKE_VERSION
+
Changes in CMake 2.6.3 RC 8
- CMAKE_VERBOSE_MAKEFILE fix for KDevelop3
- FindGettext.cmake fix #8122
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index c872d900e8..fb7f11685c 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -208,6 +208,20 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This specifies the minor version of the CMake"
" executable being run.",false,
"Variables that Provide Information");
+ cm->DefineProperty
+ ("CMAKE_PATCH_VERSION", cmProperty::VARIABLE,
+ "The patch version of cmake (i.e. the 3 in X.X.3).",
+ "This specifies the patch version of the CMake"
+ " executable being run.",false,
+ "Variables that Provide Information");
+ cm->DefineProperty
+ ("CMAKE_VERSION", cmProperty::VARIABLE,
+ "The full version of cmake in major.minor.patch format.",
+ "This specifies the full version of the CMake executable being run. "
+ "This variable is defined by versions 2.6.3 and higher. "
+ "See variables CMAKE_MAJOR_VERSION, CMAKE_MINOR_VERSION, and "
+ "CMAKE_PATCH_VERSION for individual version components.", false,
+ "Variables that Provide Information");
cm->DefineProperty
("CMAKE_PARENT_LIST_FILE", cmProperty::VARIABLE,
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index bdf4edc59b..fcf5b67991 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -648,8 +648,10 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
case cmTarget::GLOBAL_TARGET:
{
bool insertTarget = true;
- if(insertTarget && (this->TargetsToIgnore.find(t->first) !=
- this->TargetsToIgnore.end()))
+ if(insertTarget &&
+ (std::set<std::string>::const_iterator(
+ this->TargetsToIgnore.find(t->first)) !=
+ this->TargetsToIgnore.end()))
{
insertTarget = false;
}
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index 8bad1a4565..f36eb7477e 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -104,7 +104,8 @@ bool cmFunctionHelperCommand::InvokeInitialPass
}
// we push a scope on the makefile
- this->Makefile->PushScope();
+ cmMakefile::ScopePushPop varScope(this->Makefile);
+ static_cast<void>(varScope);
// set the value of argc
cmOStringStream strStream;
@@ -167,13 +168,11 @@ bool cmFunctionHelperCommand::InvokeInitialPass
}
if (status.GetReturnInvoked())
{
- this->Makefile->PopScope();
return true;
}
}
// pop scope on the makefile
- this->Makefile->PopScope();
return true;
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 424ca00143..1312c79c56 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2306,6 +2306,11 @@ void cmMakefile::AddDefaultDefinitions()
this->AddDefinition("CMAKE_MAJOR_VERSION", temp);
sprintf(temp, "%d", cmVersion::GetPatchVersion());
this->AddDefinition("CMAKE_PATCH_VERSION", temp);
+ sprintf(temp, "%u.%u.%u",
+ cmVersion::GetMajorVersion(),
+ cmVersion::GetMinorVersion(),
+ cmVersion::GetPatchVersion());
+ this->AddDefinition("CMAKE_VERSION", temp);
this->AddDefinition("CMAKE_FILES_DIRECTORY",
cmake::GetCMakeFilesDirectory());
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 5a12d2edce..386dd41d22 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -781,6 +781,16 @@ public:
void PopScope();
void RaiseScope(const char *var, const char *value);
+ /** Helper class to push and pop scopes automatically. */
+ class ScopePushPop
+ {
+ public:
+ ScopePushPop(cmMakefile* m): Makefile(m) { this->Makefile->PushScope(); }
+ ~ScopePushPop() { this->Makefile->PopScope(); }
+ private:
+ cmMakefile* Makefile;
+ };
+
void IssueMessage(cmake::MessageType t,
std::string const& text) const;
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index fe901ad592..f82f4a1962 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -49,6 +49,9 @@ ENDFOREACH(p)
SET(CMAKE_FIND_FRAMEWORK LAST)
SET(CMAKE_FIND_APPBUNDLE FIRST)
+# Set the wrong answer for a find to make sure it re-finds.
+set(VersionedA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/cmake/zot-4.0)
+
# Look for packages with new-style signatures.
FIND_PACKAGE(foo NO_MODULE)
FIND_PACKAGE(Foo CONFIGS FooConfig.cmake)