[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-2004-g11c7c62

Stephen Kelly steveire at gmail.com
Mon Apr 7 05:40:08 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  11c7c6213a64825b3cd914cfdf0131e9c2dd3f4d (commit)
       via  dcafeee2c2a9aeb7ca1375e2daa94917ed265ce6 (commit)
      from  958b4e2eba31677734c1c200c59d707fa97c6e62 (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=11c7c6213a64825b3cd914cfdf0131e9c2dd3f4d
commit 11c7c6213a64825b3cd914cfdf0131e9c2dd3f4d
Merge: 958b4e2 dcafeee
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Apr 7 05:40:07 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Apr 7 05:40:07 2014 -0400

    Merge topic 'MSVC-features' into next
    
    dcafeee2 Change the target_compile_features test to use cxx_auto_type.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcafeee2c2a9aeb7ca1375e2daa94917ed265ce6
commit dcafeee2c2a9aeb7ca1375e2daa94917ed265ce6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Apr 7 11:38:54 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 7 11:38:54 2014 +0200

    Change the target_compile_features test to use cxx_auto_type.

diff --git a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt
index 7452f05..ad76411 100644
--- a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt
@@ -5,13 +5,13 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
 
 add_executable(target_compile_features main.cpp)
 target_compile_features(target_compile_features
-  PRIVATE cxx_delegating_constructors
+  PRIVATE cxx_auto_type
 )
 
-add_library(lib_delegating_constructors lib_delegating_constructors.cpp)
-target_compile_features(lib_delegating_constructors
-  PUBLIC cxx_delegating_constructors
+add_library(lib_auto_type lib_auto_type.cpp)
+target_compile_features(lib_auto_type
+  PUBLIC cxx_auto_type
 )
 
 add_executable(lib_user lib_user.cpp)
-target_link_libraries(lib_user lib_delegating_constructors)
+target_link_libraries(lib_user lib_auto_type)
diff --git a/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp b/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp
new file mode 100644
index 0000000..71b2215
--- /dev/null
+++ b/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp
@@ -0,0 +1,6 @@
+
+int getAutoTypeImpl()
+{
+  auto i = 0;
+  return i;
+}
diff --git a/Tests/CMakeCommands/target_compile_features/lib_auto_type.h b/Tests/CMakeCommands/target_compile_features/lib_auto_type.h
new file mode 100644
index 0000000..c825b10
--- /dev/null
+++ b/Tests/CMakeCommands/target_compile_features/lib_auto_type.h
@@ -0,0 +1,8 @@
+
+int getAutoTypeImpl();
+
+int getAutoType()
+{
+  auto i = getAutoTypeImpl();
+  return i;
+}
diff --git a/Tests/CMakeCommands/target_compile_features/lib_delegating_constructors.cpp b/Tests/CMakeCommands/target_compile_features/lib_delegating_constructors.cpp
deleted file mode 100644
index e597acd..0000000
--- a/Tests/CMakeCommands/target_compile_features/lib_delegating_constructors.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-
-#include "lib_delegating_constructors.h"
-
-Foo::Foo(int i)
-  : m_i(i)
-{
-
-}
diff --git a/Tests/CMakeCommands/target_compile_features/lib_delegating_constructors.h b/Tests/CMakeCommands/target_compile_features/lib_delegating_constructors.h
deleted file mode 100644
index 75be701..0000000
--- a/Tests/CMakeCommands/target_compile_features/lib_delegating_constructors.h
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#include <cstring>
-
-class Foo
-{
-public:
-  Foo(int i);
-
-  Foo(const char *a)
-    : Foo(strlen(a))
-  {
-
-  }
-
-private:
-  int m_i;
-};
diff --git a/Tests/CMakeCommands/target_compile_features/lib_user.cpp b/Tests/CMakeCommands/target_compile_features/lib_user.cpp
index 83ad51e..976068a 100644
--- a/Tests/CMakeCommands/target_compile_features/lib_user.cpp
+++ b/Tests/CMakeCommands/target_compile_features/lib_user.cpp
@@ -1,27 +1,7 @@
 
-#include "lib_delegating_constructors.h"
-
-class Bar
-{
-  Bar(int i)
-    :m_i(i)
-  {
-
-  }
-
-  Bar(const char *a)
-    : Bar(strlen(a))
-  {
-
-  }
-
-private:
-  int m_i;
-};
+#include "lib_auto_type.h"
 
 int main(int argc, char **argv)
 {
-  Foo f("hello");
-  Foo b("world");
-  return 0;
+  return getAutoType();
 }
diff --git a/Tests/CMakeCommands/target_compile_features/main.cpp b/Tests/CMakeCommands/target_compile_features/main.cpp
index 77671b0..fe29b04 100644
--- a/Tests/CMakeCommands/target_compile_features/main.cpp
+++ b/Tests/CMakeCommands/target_compile_features/main.cpp
@@ -1,25 +1,6 @@
 
-#include <cstring>
-
-class Foo
-{
-  Foo(int i)
-    :m_i(i)
-  {
-
-  }
-
-  Foo(const char *a)
-    : Foo(strlen(a))
-  {
-
-  }
-
-private:
-  int m_i;
-};
-
 int main(int, char **)
 {
-  return 0;
+  auto i = 0;
+  return i;
 }
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 505caac..c436fb0 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -204,6 +204,7 @@ if(BUILD_TESTING)
       OR ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
         AND NOT MSVC_VERSION VERSION_LESS 1600))
     ADD_TEST_MACRO(CompileFeatures CompileFeatures)
+    ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features)
   endif()
   # assume no resources building to test
   set(TEST_RESOURCES FALSE)
@@ -2235,10 +2236,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
   ADD_TEST_MACRO(CMakeCommands.target_compile_definitions target_compile_definitions)
   ADD_TEST_MACRO(CMakeCommands.target_compile_options target_compile_options)
 
-  if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
-    ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features)
-  endif()
-
   configure_file(
     "${CMake_SOURCE_DIR}/Tests/CTestTestCrash/test.cmake.in"
     "${CMake_BINARY_DIR}/Tests/CTestTestCrash/test.cmake"

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

Summary of changes:
 .../target_compile_features/CMakeLists.txt         |   10 ++++----
 .../target_compile_features/lib_auto_type.cpp      |    6 +++++
 .../target_compile_features/lib_auto_type.h        |    8 +++++++
 .../lib_delegating_constructors.cpp                |    8 -------
 .../lib_delegating_constructors.h                  |   17 --------------
 .../target_compile_features/lib_user.cpp           |   24 ++------------------
 .../CMakeCommands/target_compile_features/main.cpp |   23 ++-----------------
 Tests/CMakeLists.txt                               |    5 +---
 8 files changed, 24 insertions(+), 77 deletions(-)
 create mode 100644 Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp
 create mode 100644 Tests/CMakeCommands/target_compile_features/lib_auto_type.h
 delete mode 100644 Tests/CMakeCommands/target_compile_features/lib_delegating_constructors.cpp
 delete mode 100644 Tests/CMakeCommands/target_compile_features/lib_delegating_constructors.h


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list