[Cmake-commits] CMake branch, next, updated. v3.0.1-5056-g8219c2a
Nils Gladitz
nilsgladitz at gmail.com
Wed Aug 27 10:00:27 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 8219c2a9733dd9dba58b26e6e362fa3fd043bc59 (commit)
via 7a9d4b512d64f82a21eac00a4e586cafb6295cf3 (commit)
from 1d3660f1e5a4447dabea31cc05a0d02e7dc64f22 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8219c2a9733dd9dba58b26e6e362fa3fd043bc59
commit 8219c2a9733dd9dba58b26e6e362fa3fd043bc59
Merge: 1d3660f 7a9d4b5
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Wed Aug 27 10:00:26 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 27 10:00:26 2014 -0400
Merge topic 'string-uuid' into next
7a9d4b51 StringUuid: Improve diagnostic messages and testing.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a9d4b512d64f82a21eac00a4e586cafb6295cf3
commit 7a9d4b512d64f82a21eac00a4e586cafb6295cf3
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Wed Aug 27 16:00:09 2014 +0200
Commit: Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Wed Aug 27 16:00:09 2014 +0200
StringUuid: Improve diagnostic messages and testing.
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index c38f452..90a8f85 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -995,7 +995,7 @@ bool cmStringCommand
if(args.size() < 2)
{
- this->SetError("no output variable specified.");
+ this->SetError("UUID sub-command requires an output variable.");
return false;
}
@@ -1013,7 +1013,7 @@ bool cmStringCommand
++argsIndex;
if(argsIndex >= args.size())
{
- this->SetError("missing value for NAMESPACE.");
+ this->SetError("UUID sub-command, NAMESPACE requires a value.");
return false;
}
uuidNamespaceString = args[argsIndex++];
@@ -1023,7 +1023,7 @@ bool cmStringCommand
++argsIndex;
if(argsIndex >= args.size())
{
- this->SetError("missing value for NAME.");
+ this->SetError("UUID sub-command, NAME requires a value.");
return false;
}
uuidName = args[argsIndex++];
@@ -1033,7 +1033,7 @@ bool cmStringCommand
++argsIndex;
if(argsIndex >= args.size())
{
- this->SetError("missing value for TYPE.");
+ this->SetError("UUID sub-command, TYPE requires a value.");
return false;
}
uuidType = args[argsIndex++];
@@ -1058,7 +1058,7 @@ bool cmStringCommand
std::vector<unsigned char> uuidNamespace;
if(!uuidGenerator.StringToBinary(uuidNamespaceString, uuidNamespace))
{
- this->SetError("malformed NAMESPACE UUID.");
+ this->SetError("UUID sub-command, malformed NAMESPACE UUID.");
return false;
}
@@ -1072,14 +1072,14 @@ bool cmStringCommand
}
else
{
- std::string e = "unknown UUID TYPE '" + uuidType + "'.";
+ std::string e = "UUID sub-command, unknown TYPE '" + uuidType + "'.";
this->SetError(e);
return false;
}
if(uuid.empty())
{
- this->SetError("UUID generation failed.");
+ this->SetError("UUID sub-command, generation failed.");
return false;
}
diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake
index 501acd2..e83db27 100644
--- a/Tests/RunCMake/string/RunCMakeTest.cmake
+++ b/Tests/RunCMake/string/RunCMakeTest.cmake
@@ -2,3 +2,11 @@ include(RunCMake)
run_cmake(Concat)
run_cmake(ConcatNoArgs)
+
+run_cmake(Uuid)
+run_cmake(UuidMissingNamespace)
+run_cmake(UuidMissingNamespaceValue)
+run_cmake(UuidBadNamespace)
+run_cmake(UuidMissingNameValue)
+run_cmake(UuidMissingTypeValue)
+run_cmake(UuidBadType)
diff --git a/Tests/RunCMake/string/Uuid.cmake b/Tests/RunCMake/string/Uuid.cmake
new file mode 100644
index 0000000..2613d26
--- /dev/null
+++ b/Tests/RunCMake/string/Uuid.cmake
@@ -0,0 +1,17 @@
+set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
+
+string(UUID WWW_EXAMPLE_COM_MD5_UUID
+ NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE MD5)
+
+if(NOT WWW_EXAMPLE_COM_MD5_UUID STREQUAL "5df41881-3aed-3515-88a7-2f4a814cf09e")
+ message(SEND_ERROR
+ "UUID did not create the expected MD5 result: ${WWW_EXAMPLE_COM_MD5_UUID}")
+endif()
+
+string(UUID WWW_EXAMPLE_COM_SHA1_UUID
+ NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE SHA1 UPPER)
+
+if(NOT WWW_EXAMPLE_COM_SHA1_UUID STREQUAL "2ED6657D-E927-568B-95E1-2665A8AEA6A2")
+ message(SEND_ERROR
+ "UUID did not create the expected SHA1 result: ${WWW_EXAMPLE_COM_SHA1_UUID}")
+endif()
diff --git a/Tests/RunCMake/string/UuidBadNamespace-result.txt b/Tests/RunCMake/string/UuidBadNamespace-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/UuidBadNamespace-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/UuidBadNamespace-stderr.txt b/Tests/RunCMake/string/UuidBadNamespace-stderr.txt
new file mode 100644
index 0000000..cb12903
--- /dev/null
+++ b/Tests/RunCMake/string/UuidBadNamespace-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UuidBadNamespace.cmake:3 \(string\):
+ string UUID sub-command, malformed NAMESPACE UUID.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/string/UuidBadNamespace.cmake b/Tests/RunCMake/string/UuidBadNamespace.cmake
new file mode 100644
index 0000000..f607925
--- /dev/null
+++ b/Tests/RunCMake/string/UuidBadNamespace.cmake
@@ -0,0 +1,4 @@
+set(UUID_DNS_NAMESPACE 6ba7b810-9dad-fooo-80b4-00c04fd430c8)
+
+string(UUID WWW_EXAMPLE_COM_MD5_UUID
+ NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE MD5)
diff --git a/Tests/RunCMake/string/UuidBadType-result.txt b/Tests/RunCMake/string/UuidBadType-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/UuidBadType-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/UuidBadType-stderr.txt b/Tests/RunCMake/string/UuidBadType-stderr.txt
new file mode 100644
index 0000000..1993c04
--- /dev/null
+++ b/Tests/RunCMake/string/UuidBadType-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UuidBadType.cmake:3 \(string\):
+ string UUID sub-command, unknown TYPE 'FOO'.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/string/UuidBadType.cmake b/Tests/RunCMake/string/UuidBadType.cmake
new file mode 100644
index 0000000..bf4909e
--- /dev/null
+++ b/Tests/RunCMake/string/UuidBadType.cmake
@@ -0,0 +1,4 @@
+set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
+
+string(UUID WWW_EXAMPLE_COM_MD5_UUID
+ NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE FOO)
diff --git a/Tests/RunCMake/string/UuidMissingNameValue-result.txt b/Tests/RunCMake/string/UuidMissingNameValue-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNameValue-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt b/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt
new file mode 100644
index 0000000..0b7cde4
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UuidMissingNameValue.cmake:3 \(string\):
+ string UUID sub-command, NAME requires a value.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/string/UuidMissingNameValue.cmake b/Tests/RunCMake/string/UuidMissingNameValue.cmake
new file mode 100644
index 0000000..407a1d7
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNameValue.cmake
@@ -0,0 +1,4 @@
+set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
+
+string(UUID WWW_EXAMPLE_COM_MD5_UUID
+ NAMESPACE ${UUID_DNS_NAMESPACE} TYPE MD5 NAME)
diff --git a/Tests/RunCMake/string/UuidMissingNamespace-result.txt b/Tests/RunCMake/string/UuidMissingNamespace-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNamespace-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt b/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt
new file mode 100644
index 0000000..dfcfe42
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UuidMissingNamespace.cmake:3 \(string\):
+ string UUID sub-command, malformed NAMESPACE UUID.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/string/UuidMissingNamespace.cmake b/Tests/RunCMake/string/UuidMissingNamespace.cmake
new file mode 100644
index 0000000..5a71e4f
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNamespace.cmake
@@ -0,0 +1,4 @@
+set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
+
+string(UUID WWW_EXAMPLE_COM_MD5_UUID
+ NAME www.example.com TYPE MD5)
diff --git a/Tests/RunCMake/string/UuidMissingNamespaceValue-result.txt b/Tests/RunCMake/string/UuidMissingNamespaceValue-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNamespaceValue-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt b/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt
new file mode 100644
index 0000000..86585ad
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UuidMissingNamespaceValue.cmake:3 \(string\):
+ string UUID sub-command, NAMESPACE requires a value.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/string/UuidMissingNamespaceValue.cmake b/Tests/RunCMake/string/UuidMissingNamespaceValue.cmake
new file mode 100644
index 0000000..f2219c0
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingNamespaceValue.cmake
@@ -0,0 +1,4 @@
+set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
+
+string(UUID WWW_EXAMPLE_COM_MD5_UUID
+ NAME www.example.com TYPE MD5 NAMESPACE)
diff --git a/Tests/RunCMake/string/UuidMissingTypeValue-result.txt b/Tests/RunCMake/string/UuidMissingTypeValue-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingTypeValue-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt b/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt
new file mode 100644
index 0000000..70252f8
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UuidMissingTypeValue.cmake:3 \(string\):
+ string UUID sub-command, TYPE requires a value.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/string/UuidMissingTypeValue.cmake b/Tests/RunCMake/string/UuidMissingTypeValue.cmake
new file mode 100644
index 0000000..6678a46
--- /dev/null
+++ b/Tests/RunCMake/string/UuidMissingTypeValue.cmake
@@ -0,0 +1,4 @@
+set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
+
+string(UUID WWW_EXAMPLE_COM_MD5_UUID
+ NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE)
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt
index 8004144..683f969 100644
--- a/Tests/StringFileTest/CMakeLists.txt
+++ b/Tests/StringFileTest/CMakeLists.txt
@@ -289,19 +289,3 @@ string(GENEX_STRIP "one;$<1:two;three>;four;$<TARGET_OBJECTS:some_target>" strip
if (NOT strip_result STREQUAL "one;four")
message(SEND_ERROR "GENEX_STRIP did not create expected result: ${strip_result}")
endif()
-
-set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
-
-string(UUID WWW_EXAMPLE_COM_MD5_UUID
- NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE MD5)
-
-if(NOT WWW_EXAMPLE_COM_MD5_UUID STREQUAL "5df41881-3aed-3515-88a7-2f4a814cf09e")
- message(SEND_ERROR "UUID did not create the expected MD5 result: ${WWW_EXAMPLE_COM_MD5_UUID}")
-endif()
-
-string(UUID WWW_EXAMPLE_COM_SHA1_UUID
- NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE SHA1 UPPER)
-
-if(NOT WWW_EXAMPLE_COM_SHA1_UUID STREQUAL "2ED6657D-E927-568B-95E1-2665A8AEA6A2")
- message(SEND_ERROR "UUID did not create the expected SHA1 result: ${WWW_EXAMPLE_COM_SHA1_UUID}")
-endif()
-----------------------------------------------------------------------
Summary of changes:
Source/cmStringCommand.cxx | 14 +++++++-------
Tests/RunCMake/string/RunCMakeTest.cmake | 8 ++++++++
Tests/RunCMake/string/Uuid.cmake | 17 +++++++++++++++++
.../UuidBadNamespace-result.txt} | 0
Tests/RunCMake/string/UuidBadNamespace-stderr.txt | 4 ++++
Tests/RunCMake/string/UuidBadNamespace.cmake | 4 ++++
.../UuidBadType-result.txt} | 0
Tests/RunCMake/string/UuidBadType-stderr.txt | 4 ++++
Tests/RunCMake/string/UuidBadType.cmake | 4 ++++
.../UuidMissingNameValue-result.txt} | 0
Tests/RunCMake/string/UuidMissingNameValue-stderr.txt | 4 ++++
Tests/RunCMake/string/UuidMissingNameValue.cmake | 4 ++++
.../UuidMissingNamespace-result.txt} | 0
Tests/RunCMake/string/UuidMissingNamespace-stderr.txt | 4 ++++
Tests/RunCMake/string/UuidMissingNamespace.cmake | 4 ++++
.../UuidMissingNamespaceValue-result.txt} | 0
.../string/UuidMissingNamespaceValue-stderr.txt | 4 ++++
Tests/RunCMake/string/UuidMissingNamespaceValue.cmake | 4 ++++
.../UuidMissingTypeValue-result.txt} | 0
Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt | 4 ++++
Tests/RunCMake/string/UuidMissingTypeValue.cmake | 4 ++++
Tests/StringFileTest/CMakeLists.txt | 16 ----------------
22 files changed, 80 insertions(+), 23 deletions(-)
create mode 100644 Tests/RunCMake/string/Uuid.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => string/UuidBadNamespace-result.txt} (100%)
create mode 100644 Tests/RunCMake/string/UuidBadNamespace-stderr.txt
create mode 100644 Tests/RunCMake/string/UuidBadNamespace.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => string/UuidBadType-result.txt} (100%)
create mode 100644 Tests/RunCMake/string/UuidBadType-stderr.txt
create mode 100644 Tests/RunCMake/string/UuidBadType.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => string/UuidMissingNameValue-result.txt} (100%)
create mode 100644 Tests/RunCMake/string/UuidMissingNameValue-stderr.txt
create mode 100644 Tests/RunCMake/string/UuidMissingNameValue.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => string/UuidMissingNamespace-result.txt} (100%)
create mode 100644 Tests/RunCMake/string/UuidMissingNamespace-stderr.txt
create mode 100644 Tests/RunCMake/string/UuidMissingNamespace.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => string/UuidMissingNamespaceValue-result.txt} (100%)
create mode 100644 Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt
create mode 100644 Tests/RunCMake/string/UuidMissingNamespaceValue.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => string/UuidMissingTypeValue-result.txt} (100%)
create mode 100644 Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt
create mode 100644 Tests/RunCMake/string/UuidMissingTypeValue.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list