[Cmake-commits] CMake branch, next, updated. v2.8.12.2-7727-gd8389d6

Stephen Kelly steveire at gmail.com
Sat Feb 15 05:47:48 EST 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  d8389d6149cbbdc7073997b63fcf0170067d8c40 (commit)
       via  370cc3ac290dd7327fea06e8c30fada6e95989b0 (commit)
       via  945a66a5433aefea42cb624fd5e33c3e2316f39d (commit)
      from  51a0501c8ae25b7e4435a639fb4d25d3498e94d7 (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=d8389d6149cbbdc7073997b63fcf0170067d8c40
commit d8389d6149cbbdc7073997b63fcf0170067d8c40
Merge: 51a0501 370cc3a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Feb 15 05:47:47 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Feb 15 05:47:47 2014 -0500

    Merge topic 'cmake-toolchain-requirements' into next
    
    370cc3ac Test some capabilities required to build cmake.
    945a66a5 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=370cc3ac290dd7327fea06e8c30fada6e95989b0
commit 370cc3ac290dd7327fea06e8c30fada6e95989b0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Feb 15 11:46:23 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Feb 15 11:46:23 2014 +0100

    Test some capabilities required to build cmake.
    
    Record the capabilities of the dashboard toolchains.

diff --git a/Tests/SystemInformation/CMakeLists.txt b/Tests/SystemInformation/CMakeLists.txt
index 838fd4a..70c5c41 100644
--- a/Tests/SystemInformation/CMakeLists.txt
+++ b/Tests/SystemInformation/CMakeLists.txt
@@ -58,4 +58,132 @@ get_directory_property(res INCLUDE_REGULAR_EXPRESSION)
 file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
   "INCLUDE_REGULAR_EXPRESSION: ${res}\n")
 
+macro(test_compiler_capability NAME CODE)
+  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.cpp" "${CODE}
+int main() { return 0; }
+")
+  unset(${NAME} CACHE)
+  try_compile(${NAME} "${CMAKE_CURRENT_BINARY_DIR}/${NAME}"
+    "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.cpp"
+    OUTPUT_VARIABLE OUTPUT
+  )
+  message("${NAME}: ${${NAME}}")
+  if (NOT ${NAME})
+    message("OUTPUT: ${OUTPUT}")
+  endif()
+endmacro()
+
+test_compiler_capability(HAVE_MEMBER_TEMPLATES "
+class Foo
+{
+  template<typename T>
+  void foo(T t) { (void)t; }
+};
+")
+
+test_compiler_capability(HAVE_VECTOR_AT "
+#include <vector>
+int foo()
+{
+  std::vector<int> vec;
+  vec.push_back(1);
+  return vec.at(0);
+}
+")
+
+test_compiler_capability(HAVE_STRING_APPEND "
+#include <string>
+void foo()
+{
+  std::string s;
+  s.append(\"content\");
+}
+")
+
+test_compiler_capability(HAVE_STRING_CLEAR "
+#include <string>
+void foo()
+{
+  std::string s;
+  s.clear();
+}
+")
+
+test_compiler_capability(HAVE_BINARY_SEARCH_CONVERSION "
+#include <vector>
+#include <string>
+#include <algorithm>
+void foo()
+{
+  const char* needle = \"content\";
+  std::vector<std::string> vec;
+  std::binary_search(vec.begin(), vec.end(), needle);
+}
+")
+
+test_compiler_capability(HAVE_TEMPLATE_NON_FUNCTION_PARAMETERS "
+template<typename PropertyType>
+PropertyType getTypedProperty(const char* prop)
+{
+  PropertyType t;
+  return t;
+}
+
+int foo()
+{
+  getTypedProperty<int>(0);
+}
+")
+
+
+test_compiler_capability(HAVE_TEMPLATE_PARAMETER_DEFAULTED_POINTER "
+template<typename PropertyType>
+PropertyType getTypedProperty(const char* prop,
+                              PropertyType* = 0)
+{
+  PropertyType t;
+  return t;
+}
+
+int foo()
+{
+  getTypedProperty<int>(0);
+}
+")
+
+test_compiler_capability(HAVE_WORKING_SIZE_T "
+#include <cstddef>
+
+template<long>
+void bar();
+template<>
+void bar<sizeof(std::size_t)>()
+{
+
+}
+void foo()
+{
+  bar<sizeof(size_t)>();
+}
+")
+
+test_compiler_capability(HAVE_TEMPLATE_FRIENDS "
+#include <cstddef>
+
+template<typename T>
+void bar();
+
+class Foo
+{
+private:
+  template<typename T> friend void bar();
+  void foo() {}
+};
 
+template<typename T>
+void bar()
+{
+  Foo f;
+  f.foo();
+}
+")

-----------------------------------------------------------------------

Summary of changes:
 Source/CMakeVersion.cmake              |    2 +-
 Tests/SystemInformation/CMakeLists.txt |  128 ++++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list