[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-2691-g720211d

Stephen Kelly steveire at gmail.com
Fri May 2 04:09:07 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  720211dc54e90e8f610477d6d9c068b2dc0a0a0c (commit)
       via  f9e85b9a298232d60c7b9418a21312b36cc4f8f6 (commit)
      from  95137add8e3ff19a4e69bfb077f937796a4466e2 (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=720211dc54e90e8f610477d6d9c068b2dc0a0a0c
commit 720211dc54e90e8f610477d6d9c068b2dc0a0a0c
Merge: 95137ad f9e85b9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 2 04:09:05 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 2 04:09:05 2014 -0400

    Merge topic 'WriteCompilerDetectionHeader-module' into next
    
    f9e85b9a Revert "Add the WriteCompilerDetectionHeader module."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9e85b9a298232d60c7b9418a21312b36cc4f8f6
commit f9e85b9a298232d60c7b9418a21312b36cc4f8f6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 2 10:08:43 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri May 2 10:08:43 2014 +0200

    Revert "Add the WriteCompilerDetectionHeader module."
    
    This reverts commit 50d43cf5555f98c3811bd7897eb43bc27bf8d215.

diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst
index ecc9cc4..2bbe622 100644
--- a/Help/manual/cmake-modules.7.rst
+++ b/Help/manual/cmake-modules.7.rst
@@ -232,4 +232,3 @@ All Modules
    /module/UsewxWidgets
    /module/Use_wxWindows
    /module/WriteBasicConfigVersionFile
-   /module/WriteCompilerDetectionHeader
diff --git a/Help/module/WriteCompilerDetectionHeader.rst b/Help/module/WriteCompilerDetectionHeader.rst
deleted file mode 100644
index 4c81b48..0000000
--- a/Help/module/WriteCompilerDetectionHeader.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. cmake-module:: ../../Modules/WriteCompilerDetectionHeader.cmake
diff --git a/Help/release/dev/module-WriteCompilerDetectionHeader.rst b/Help/release/dev/module-WriteCompilerDetectionHeader.rst
deleted file mode 100644
index d355d2c..0000000
--- a/Help/release/dev/module-WriteCompilerDetectionHeader.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-module-WriteCompilerDetectionHeader
------------------------------------
-
-* The WriteCompilerDetectionHeader module was added to allow creation of
-  a portable header file for compiler optional feature detection.
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
deleted file mode 100644
index 89a1808..0000000
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ /dev/null
@@ -1,367 +0,0 @@
-#.rst:
-# WriteCompilerDetectionHeader
-# ----------------------------
-#
-# This module provides the function write_compiler_detection_header().
-#
-# The ``WRITE_COMPILER_DETECTION_HEADER`` function can be used to generate
-# a file suitable for preprocessor inclusion which contains macros to be
-# used in source code::
-#
-#    write_compiler_detection_header(
-#              FILE <file>
-#              PREFIX <prefix>
-#              COMPILERS <compiler> [...]
-#              FEATURES <feature> [...]
-#              [VERSION <version>]
-#              [PROLOG <prolog>]
-#              [EPILOG <epilog>]
-#    )
-#
-# The ``write_compiler_detection_header`` function generates the
-# file ``<file>`` with macros which all have the prefix ``<prefix>``.
-#
-# ``VERSION`` may be used to specify a generation compatibility with older
-# CMake versions.  By default, a file is generated with compatibility with
-# the :variable:`CMAKE_MINIMUM_REQUIRED_VERSION`.  Newer CMake versions may
-# generate additional code, and the ``VERSION`` may be used to maintain
-# compatibility in the generated file while allowing the minimum CMake
-# version of the project to be changed indepenendently.
-#
-# ``PROLOG`` may be specified as text content to write at the start of the
-# header. ``EPILOG`` may be specified as text content to write at the end
-# of the header
-#
-# At least one ``<compiler>`` and one ``<feature>`` must be listed. Compilers
-# which are known to CMake, but not specified are detected and a preprocessor
-# ``#error`` is generated for them.  A preprocessor macro matching
-# ``${PREFIX}_COMPILER_IS_${CompilerId}`` is generated for each compiler
-# known to CMake to contain the value ``0`` or ``1``.
-#
-# Feature Test Macros
-# ===================
-#
-# For each compiler, a preprocessor test of the compiler version is generated
-# denoting whether the each feature is enabled.  A preprocessor macro
-# matching ``${PREFIX}_COMPILER_${FEATURE_NAME_UPPER}`` is generated to
-# contain the value ``0`` or ``1`` depending on whether the compiler in
-# use supports the feature:
-#
-# .. code-block:: cmake
-#
-#    write_compiler_detection_header(
-#      FILE climbingstats_compiler_detection.h
-#      PREFIX ClimbingStats
-#      COMPILERS GNU Clang MSVC
-#      FEATURES cxx_variadic_templates
-#    )
-#
-# .. code-block:: c++
-#
-#    #if ClimbingStats_COMPILER_CXX_VARIADIC_TEMPLATES
-#    template<typename... T>
-#    void someInterface(T t...) { /* ... */ }
-#    #else
-#    // Compatibility versions
-#    template<typename T1>
-#    void someInterface(T1 t1) { /* ... */ }
-#    template<typename T1, typename T2>
-#    void someInterface(T1 t1, T2 t2) { /* ... */ }
-#    template<typename T1, typename T2, typename T3>
-#    void someInterface(T1 t1, T2 t2, T3 t3) { /* ... */ }
-#    #endif
-#
-# Symbol Macros
-# =============
-#
-# Some additional symbol-defines are created for particular features for
-# use as symbols which may be conditionally defined empty. The macros for
-# such symbol defines match ``${PREFIX}_DECL_${FEATURE_NAME_UPPER}``:
-#
-# .. code-block:: c++
-#
-#    class MyClass ClimbingStats_DECL_CXX_FINAL
-#    {
-#        ClimbingStats_DECL_CXX_CONSTEXPR int someInterface() { return 42; }
-#    };
-#
-# The ``ClimbingStats_DECL_CXX_FINAL`` macro will expand to ``final`` if the
-# compiler (and its flags) support the ``cxx_final`` feature, and the
-# ``ClimbingStats_DECL_CXX_CONSTEXPR`` macro will expand to ``constexpr``
-# if ``cxx_constexpr`` is supported.
-#
-# The following features generate corresponding symbol defines:
-#
-# ========================== ===============
-#         Feature                 Symbol
-# ========================== ===============
-# ``cxx_constexpr``           ``constexpr``
-# ``cxx_deleted_functions``   ``= delete``
-# ``cxx_extern_templates``    ``extern``
-# ``cxx_final``               ``final``
-# ``cxx_noexcept``            ``noexcept``
-# ``cxx_override``            ``override``
-# ========================== ===============
-#
-# Compatibility Implemetation Macros
-# ==================================
-#
-# Some features are suitable for wrapping in a macro with a backward
-# compatibility implementation if the compiler does not support the feature.
-#
-# When the ``cxx_static_assert`` feature is not provided by the compiler,
-# a compatibility implementation is available via the
-# ``${PREFIX}_STATIC_ASSERT`` and ``${PREFIX}_STATIC_ASSERT_MSG``
-# function-like macros. The macros expand to ``static_assert`` where that
-# compiler feature is available, and to a compatibility implementation
-# otherwise.
-#
-# ========================== ================================
-#         Feature                         Define
-# ========================== ================================
-# ``cxx_alignas``              ``@PREFIX at _ALIGNAS``
-# ``cxx_alignof``              ``@PREFIX at _ALIGNOF``
-# ``cxx_deleted_functions``    ``@PREFIX at _DISABLE_COPY``
-# ``cxx_noexcept``             ``@PREFIX at _NOEXCEPT_EXPR(X)``
-# ``cxx_nullptr``              ``@PREFIX at _NULLPTR``
-# ``cxx_static_assert``        ``@PREFIX at _STATIC_ASSERT``
-# ``cxx_static_assert``        ``@PREFIX at _STATIC_ASSERT_MSG``
-# ========================== ================================
-
-
-#=============================================================================
-# Copyright 2014 Stephen Kelly <steveire at gmail.com>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/CMakeCompilerIdDetection.cmake)
-
-function(_load_compiler_variables CompilerId lang)
-  include("${CMAKE_ROOT}/Modules/Compiler/${CompilerId}-${lang}-FeatureTests.cmake" OPTIONAL)
-  foreach(feature ${ARGN})
-    set(_cmake_feature_test_${CompilerId}_${feature} ${_cmake_feature_test_${feature}} PARENT_SCOPE)
-    if (_cmake_symbol_alternative_${feature})
-      set(_cmake_symbol_alternative_${CompilerId}_${feature} ${_cmake_symbol_alternative_${feature}} PARENT_SCOPE)
-      set(_cmake_symbol_alternative_test_${CompilerId}_${feature} ${_cmake_symbol_alternative_test_${feature}} PARENT_SCOPE)
-    endif()
-  endforeach()
-endfunction()
-
-function(write_compiler_detection_header
-    file_keyword file_arg
-    prefix_keyword prefix_arg
-    )
-  if (NOT file_keyword STREQUAL FILE)
-    message(FATAL_ERROR "write_compiler_detection_header: FILE parameter missing.")
-  endif()
-  if (NOT prefix_keyword STREQUAL PREFIX)
-    message(FATAL_ERROR "write_compiler_detection_header: PREFIX parameter missing.")
-  endif()
-  set(options)
-  set(oneValueArgs VERSION EPILOG PROLOG)
-  set(multiValueArgs COMPILERS FEATURES)
-  cmake_parse_arguments(_WCD "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-  if (NOT _WCD_COMPILERS)
-    message(FATAL_ERROR "Invalid arguments.  write_compiler_detection_header requires at least one compiler.")
-  endif()
-  if (NOT _WCD_FEATURES)
-    message(FATAL_ERROR "Invalid arguments.  write_compiler_detection_header requires at least one feature.")
-  endif()
-
-  if(_WCD_UNPARSED_ARGUMENTS)
-    message(FATAL_ERROR "Unparsed arguments: ${_WCD_UNPARSED_ARGUMENTS}")
-  endif()
-
-  if(NOT _WCD_VERSION)
-    set(_WCD_VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION})
-  endif()
-  if (_WCD_VERSION VERSION_LESS 3.1.0) # Version which introduced this function
-    message(FATAL_ERROR "VERSION parameter too low.")
-  endif()
-
-  set(compilers
-    GNU
-  )
-  foreach(_comp ${_WCD_COMPILERS})
-    list(FIND compilers ${_comp} idx)
-    if (idx EQUAL -1)
-      message(FATAL_ERROR "Unsupported compiler ${_comp}.")
-    endif()
-  endforeach()
-
-  file(WRITE ${file_arg} "
-// This is a generated file. Do not edit!
-
-#ifndef ${prefix_arg}_COMPILER_DETECTION_H
-#define ${prefix_arg}_COMPILER_DETECTION_H
-")
-
-  if (_WCD_PROLOG)
-    file(APPEND "${file_arg}" "\n${_WCD_PROLOG}\n")
-  endif()
-
-  foreach(feature ${_WCD_FEATURES})
-    if (feature MATCHES "^cxx_")
-      list(APPEND _langs CXX)
-    endif()
-    if (feature MATCHES "^c_")
-      list(APPEND _langs C)
-    endif()
-  endforeach()
-  list(REMOVE_DUPLICATES _langs)
-
-  foreach(_lang ${_langs})
-
-    if(_lang STREQUAL CXX)
-      file(APPEND "${file_arg}" "\n#ifdef __cplusplus\n")
-    endif()
-
-    compiler_id_detection(ID_CONTENT ${_lang} PREFIX ${prefix_arg}_
-      ID_DEFINE
-    )
-
-    file(APPEND "${file_arg}" "${ID_CONTENT}\n")
-
-    set(pp_if "if")
-    foreach(compiler ${_WCD_COMPILERS})
-      _load_compiler_variables(${compiler} ${_lang} ${_WCD_FEATURES})
-      file(APPEND "${file_arg}" "\n#  ${pp_if} ${prefix_arg}_COMPILER_IS_${compiler}\n")
-      set(pp_if "elif")
-      foreach(feature ${_WCD_FEATURES})
-        list(FIND CMAKE_${_lang}_KNOWN_FEATURES ${feature} idx)
-        if (NOT idx EQUAL -1)
-          set(_define_item "\n#    define ${prefix_arg}_${CMAKE_PP_NAME_${feature}} 0\n")
-          if (_cmake_feature_test_${compiler}_${feature} STREQUAL "1")
-            set(_define_item "\n#    define ${prefix_arg}_${CMAKE_PP_NAME_${feature}} 1\n")
-          elseif (_cmake_feature_test_${compiler}_${feature})
-            set(_define_item "\n#      define ${prefix_arg}_${CMAKE_PP_NAME_${feature}} 0\n")
-            set(_define_item "\n#    if ${_cmake_feature_test_${compiler}_${feature}}\n#      define ${prefix_arg}_${CMAKE_PP_NAME_${feature}} 1\n#    else${_define_item}#    endif\n")
-          endif()
-          file(APPEND "${file_arg}" "${_define_item}")
-        endif()
-      endforeach()
-    endforeach()
-    if(pp_if STREQUAL "elif")
-      file(APPEND "${file_arg}" "\n#  else\n#  error Unsupported compiler\n#  endif\n\n")
-    endif()
-    foreach(feature ${_WCD_FEATURES})
-      set(def_value ${CMAKE_SYMBOL_DEFINE_${feature}})
-      if (def_value)
-        set(def_name ${prefix_arg}_${CMAKE_PP_DECL_${feature}})
-        file(APPEND "${file_arg}" "
-#  if ${prefix_arg}_${CMAKE_PP_NAME_${feature}}
-#    define ${def_name} ${def_value}
-#  else
-#    define ${def_name}
-#  endif
-\n")
-      endif()
-    endforeach()
-    foreach(feature ${_WCD_FEATURES})
-      if (feature STREQUAL cxx_static_assert)
-        set(def_name ${prefix_arg}_${CMAKE_PP_NAME_cxx_static_assert})
-        set(def_value "${prefix_arg}_STATIC_ASSERT(X)")
-        set(def_value_msg "${prefix_arg}_STATIC_ASSERT_MSG(X, MSG)")
-        set(static_assert_struct "template<bool> struct ${prefix_arg}StaticAssert;\ntemplate<> struct ${prefix_arg}StaticAssert<true>{};\n")
-        set(def_standard "#    define ${def_value} static_assert(X, #X)\n#    define ${def_value_msg} static_assert(X, MSG)")
-        set(def_alternative "${static_assert_struct}#    define ${def_value} sizeof(CMakeStaticAssert<X>)\n#    define ${def_value_msg} sizeof(CMakeStaticAssert<X>)")
-        file(APPEND "${file_arg}" "#  if ${def_name}\n${def_standard}\n#  else\n${def_alternative}\n#  endif\n\n")
-      endif()
-      if (feature STREQUAL cxx_alignas)
-        set(def_name ${prefix_arg}_${CMAKE_PP_NAME_${feature}})
-        set(def_value "${prefix_arg}_ALIGNAS(X)")
-        file(APPEND "${file_arg}" "
-#  if ${def_name}
-#    define ${def_value} alignas(X)
-#  elif ${prefix_arg}_COMPILER_IS_GNU
-#    define ${def_value} __attribute__ ((__aligned__(X)))
-#  else
-#    define ${def_value}
-#  endif
-\n")
-      endif()
-      if (feature STREQUAL cxx_alignof)
-        set(def_name ${prefix_arg}_${CMAKE_PP_NAME_${feature}})
-        set(def_value "${prefix_arg}_ALIGNOF(X)")
-        file(APPEND "${file_arg}" "
-#  if ${def_name}
-#    define ${def_value} alignof(X)
-#  elif ${prefix_arg}_COMPILER_IS_GNU
-#    define ${def_value} __alignof__(X)
-#  endif
-\n")
-      endif()
-      if (feature STREQUAL cxx_deleted_functions)
-        set(def_name ${prefix_arg}_${CMAKE_PP_NAME_${feature}})
-        set(def_value "${prefix_arg}_DELETED_FUNCTION")
-        file(APPEND "${file_arg}" "
-#  if ${def_name}
-#    define ${def_value} = delete
-#  else
-#    define ${def_value}
-#  endif
-
-#  define ${prefix_arg}_DISABLE_COPY(X) \\
-private: \\
-     X(X const&) ${prefix_arg}_DELETED_FUNCTION; \\
-     X& operator=(X const&) ${prefix_arg}_DELETED_FUNCTION;
-\n")
-      endif()
-      if (feature STREQUAL cxx_extern_templates)
-        set(def_name ${prefix_arg}_${CMAKE_PP_NAME_${feature}})
-        set(def_value "${prefix_arg}_EXTERN_TEMPLATE")
-        file(APPEND "${file_arg}" "
-#  if ${def_name}
-#    define ${def_value} extern
-#  else
-#    define ${def_value}
-#  endif
-\n")
-      endif()
-      if (feature STREQUAL cxx_noexcept)
-        set(def_name ${prefix_arg}_${CMAKE_PP_NAME_${feature}})
-        set(def_value "${prefix_arg}_NOEXCEPT")
-        file(APPEND "${file_arg}" "
-#  if ${def_name}
-#    define ${def_value} noexcept
-#    define ${def_value}_EXPR(X) noexcept(X)
-#  else
-#    define ${def_value}
-#    define ${def_value}_EXPR(X)
-#  endif
-\n")
-      endif()
-      if (feature STREQUAL cxx_nullptr)
-        set(def_name ${prefix_arg}_${CMAKE_PP_NAME_${feature}})
-        set(def_value "${prefix_arg}_NULLPTR")
-        file(APPEND "${file_arg}" "
-#  if ${def_name}
-#    define ${def_value} nullptr
-#  else
-#    define ${def_value} (void*)0
-#  endif
-\n")
-      endif()
-    endforeach()
-    if(_lang STREQUAL CXX)
-      file(APPEND "${file_arg}" "#endif\n")
-    endif()
-
-  endforeach()
-
-  if (_WCD_EPILOG)
-    file(APPEND "${file_arg}" "\n${_WCD_EPILOG}\n")
-  endif()
-
-  file(APPEND ${file_arg} "\n#endif\n")
-endfunction()
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b06e6a1..e758720 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2505,33 +2505,6 @@ const char* cmMakefile::GetDefinition(const std::string& name) const
     return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
 #undef STRING_LIST_ELEMENT
     }
-#define PP_FEATURE_NAME(F) \
-  if (name == "CMAKE_PP_NAME_" #F) \
-    { \
-    static std::string val = ("COMPILER_" + cmSystemTools::UpperCase(#F)); \
-    return val.c_str(); \
-    }
-  FOR_EACH_CXX_FEATURE(PP_FEATURE_NAME)
-#undef PP_FEATURE_NAME
-
-#define FOR_EACH_CXX_DECL_FEATURE(F) \
-  F(final) \
-  F(override) \
-  F(constexpr)
-
-#define PP_DECL_NAME(F) \
-  if (name == "CMAKE_PP_DECL_cxx_" #F) \
-    { \
-    static std::string val = ("DECL_CXX_" + cmSystemTools::UpperCase(#F)); \
-    return val.c_str(); \
-    } \
-  if (name == "CMAKE_SYMBOL_DEFINE_cxx_" #F) \
-    { \
-    return #F; \
-    }
-  FOR_EACH_CXX_DECL_FEATURE(PP_DECL_NAME)
-#undef PP_DECL_NAME
-
   const char* def = this->Internal->VarStack.top().Get(name);
   if(!def)
     {
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index fbad2d9..9d642cc 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -411,8 +411,6 @@ if(BUILD_TESTING)
   ADD_TEST_MACRO(Module.GenerateExportHeader GenerateExportHeader)
   ADD_TEST_MACRO(Module.FindDependency FindDependency)
 
-  ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader)
-
   if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
     include(CheckCXXCompilerFlag)
     check_cxx_compiler_flag(-fPIE run_pic_test)
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
deleted file mode 100644
index 4cc3155..0000000
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-cmake_minimum_required(VERSION 3.0.0)
-project(WriteCompilerDetectionHeader)
-
-if (NOT CMAKE_CXX_COMPILER_ID STREQUAL GNU)
-  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp"
-    "int main(int,char**) { return 0; }\n"
-  )
-  add_executable(WriteCompilerDetectionHeader "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp")
-  return()
-endif()
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-include(WriteCompilerDetectionHeader)
-
-write_compiler_detection_header(
-  FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h"
-  PREFIX TEST
-  COMPILERS GNU
-  VERSION 3.1
-  PROLOG "// something"
-  EPILOG "// more"
-  FEATURES
-    ${CMAKE_CXX_KNOWN_FEATURES}
-)
-
-macro(set_defines target true_defs false_defs)
-  set(defines)
-  foreach(def ${true_defs})
-    list(APPEND defines ${def}=1)
-  endforeach()
-  foreach(def ${false_defs})
-    list(APPEND defines ${def}=0)
-  endforeach()
-  target_compile_definitions(${target}
-    PRIVATE
-      ${defines}
-  )
-endmacro()
-
-if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
-  # False for C++98 mode.
-  list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
-  list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
-endif()
-
-add_executable(WriteCompilerDetectionHeader main.cpp)
-set_property(TARGET WriteCompilerDetectionHeader PROPERTY CXX_STANDARD 98)
-set_defines(WriteCompilerDetectionHeader "${true_defs}" "${false_defs}")
-
-if(MSVC)
-  return() # MSVC has only one mode.
-endif()
-
-# Since GNU 4.7
-if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_delegating_constructors;")
-  list(APPEND true_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
-  list(REMOVE_ITEM false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
-endif()
-
-# Since GNU 4.4
-if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_variadic_templates;")
-  list(APPEND true_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
-  list(REMOVE_ITEM false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
-endif()
-
-add_executable(WriteCompilerDetectionHeader_11 main.cpp)
-set_property(TARGET WriteCompilerDetectionHeader_11 PROPERTY CXX_STANDARD 11)
-set_defines(WriteCompilerDetectionHeader_11 "${true_defs}" "${false_defs}")
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main.cpp b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
deleted file mode 100644
index 628d26b..0000000
--- a/Tests/Module/WriteCompilerDetectionHeader/main.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-
-#include "test_compiler_detection.h"
-
-#define JOIN_IMPL(A, B) A ## B
-#define JOIN(A, B) JOIN_IMPL(A, B)
-#define CHECK(FEATURE) (JOIN(TEST_COMPILER_, FEATURE) == JOIN(EXPECTED_COMPILER_, FEATURE))
-
-#if !CHECK(CXX_DELEGATING_CONSTRUCTORS)
-#error cxx_delegating_constructors expected availability did not match.
-#endif
-
-#if !CHECK(CXX_VARIADIC_TEMPLATES)
-#error cxx_variadic_templates expected availability did not match.
-#endif
-
-int main(int argc, char **argv)
-{
-  return 0;
-}
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 7f6ebf1..e797a73 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -54,7 +54,6 @@ add_RunCMake_test(TargetObjects)
 add_RunCMake_test(TargetSources)
 add_RunCMake_test(find_dependency)
 add_RunCMake_test(CompileFeatures)
-add_RunCMake_test(WriteCompilerDetectionHeader)
 if(NOT WIN32)
   add_RunCMake_test(PositionIndependentCode)
   set(SKIP_VISIBILITY 0)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt
deleted file mode 100644
index 872338d..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 3.0)
-project(${RunCMake_TEST} CXX)
-include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-stderr.txt
deleted file mode 100644
index 62c4ff1..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\):
-  Unparsed arguments: GarbageArg
-Call Stack \(most recent call first\):
-  ExtraArgs.cmake:4 \(write_compiler_detection_header\)
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs.cmake
deleted file mode 100644
index c2a21af..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-
-include(WriteCompilerDetectionHeader)
-
-write_compiler_detection_header(
-  FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile"
-  PREFIX Pref
-  GarbageArg
-  COMPILERS GNU
-  FEATURES cxx_final
-)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-stderr.txt
deleted file mode 100644
index eb94426..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:164 \(message\):
-  write_compiler_detection_header: FILE parameter missing.
-Call Stack \(most recent call first\):
-  FileTypo.cmake:4 \(write_compiler_detection_header\)
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo.cmake
deleted file mode 100644
index c90eda2..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-
-include(WriteCompilerDetectionHeader)
-
-write_compiler_detection_header(
-  FILE_TYPO "${CMAKE_CURRENT_BINARY_DIR}/somefile"
-  PREFIX Pref
-)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-stderr.txt
deleted file mode 100644
index b4d7e08..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-stderr.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-CMake Error at InvalidArgs.cmake:4 \(write_compiler_detection_header\):
-  write_compiler_detection_header Function invoked with incorrect arguments
-  for function named: write_compiler_detection_header
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
-+
-CMake Error at InvalidArgs.cmake:6 \(write_compiler_detection_header\):
-  write_compiler_detection_header Function invoked with incorrect arguments
-  for function named: write_compiler_detection_header
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs.cmake
deleted file mode 100644
index cfebae1..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-
-include(WriteCompilerDetectionHeader)
-
-write_compiler_detection_header()
-
-write_compiler_detection_header(FILE)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-stderr.txt
deleted file mode 100644
index 9451348..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\):
-  Invalid arguments.  write_compiler_detection_header requires at least one
-  compiler.
-Call Stack \(most recent call first\):
-  NoCompiler.cmake:4 \(write_compiler_detection_header\)
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler.cmake
deleted file mode 100644
index 2dc14e9..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-
-include(WriteCompilerDetectionHeader)
-
-write_compiler_detection_header(
-    FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile"
-    PREFIX PREF_
-    # COMPILERS
-    FEATURES cxx_final
-    VERSION 3.1
-)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-stderr.txt
deleted file mode 100644
index 193f297..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\):
-  Invalid arguments.  write_compiler_detection_header requires at least one
-  feature.
-Call Stack \(most recent call first\):
-  NoFeature.cmake:4 \(write_compiler_detection_header\)
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature.cmake
deleted file mode 100644
index 1fbc129..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-
-include(WriteCompilerDetectionHeader)
-
-write_compiler_detection_header(
-    FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile"
-    PREFIX PREF_
-    COMPILERS GNU
-    # FEATURES
-    VERSION 3.1
-)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-stderr.txt
deleted file mode 100644
index 842eb3f..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\):
-  VERSION parameter too low.
-Call Stack \(most recent call first\):
-  OldVersion.cmake:4 \(write_compiler_detection_header\)
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion.cmake
deleted file mode 100644
index a6e3022..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-
-include(WriteCompilerDetectionHeader)
-
-write_compiler_detection_header(
-  FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile"
-  PREFIX Pref
-  VERSION 3.0
-  COMPILERS GNU
-  FEATURES cxx_final
-)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-stderr.txt
deleted file mode 100644
index 5fdcdb8..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\):
-  write_compiler_detection_header: PREFIX parameter missing.
-Call Stack \(most recent call first\):
-  PrefixTypo.cmake:4 \(write_compiler_detection_header\)
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo.cmake
deleted file mode 100644
index 8b6774c..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-
-include(WriteCompilerDetectionHeader)
-
-write_compiler_detection_header(
-  FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile"
-  PREFIX_TYPO Pref
-)
diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/RunCMakeTest.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/RunCMakeTest.cmake
deleted file mode 100644
index ea1f658..0000000
--- a/Tests/RunCMake/WriteCompilerDetectionHeader/RunCMakeTest.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-include(RunCMake)
-
-run_cmake(InvalidArgs)
-run_cmake(NoCompiler)
-run_cmake(NoFeature)
-run_cmake(FileTypo)
-run_cmake(PrefixTypo)
-run_cmake(ExtraArgs)
-run_cmake(OldVersion)

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

Summary of changes:
 Help/manual/cmake-modules.7.rst                    |    1 -
 Help/module/WriteCompilerDetectionHeader.rst       |    1 -
 .../dev/module-WriteCompilerDetectionHeader.rst    |    5 -
 Modules/WriteCompilerDetectionHeader.cmake         |  367 --------------------
 Source/cmMakefile.cxx                              |   27 --
 Tests/CMakeLists.txt                               |    2 -
 .../WriteCompilerDetectionHeader/CMakeLists.txt    |   69 ----
 Tests/Module/WriteCompilerDetectionHeader/main.cpp |   19 -
 Tests/RunCMake/CMakeLists.txt                      |    1 -
 .../WriteCompilerDetectionHeader/CMakeLists.txt    |    3 -
 .../ExtraArgs-result.txt                           |    1 -
 .../ExtraArgs-stderr.txt                           |    5 -
 .../WriteCompilerDetectionHeader/ExtraArgs.cmake   |   10 -
 .../FileTypo-result.txt                            |    1 -
 .../FileTypo-stderr.txt                            |    5 -
 .../WriteCompilerDetectionHeader/FileTypo.cmake    |    7 -
 .../InvalidArgs-result.txt                         |    1 -
 .../InvalidArgs-stderr.txt                         |   11 -
 .../WriteCompilerDetectionHeader/InvalidArgs.cmake |    6 -
 .../NoCompiler-result.txt                          |    1 -
 .../NoCompiler-stderr.txt                          |    6 -
 .../WriteCompilerDetectionHeader/NoCompiler.cmake  |   10 -
 .../NoFeature-result.txt                           |    1 -
 .../NoFeature-stderr.txt                           |    6 -
 .../WriteCompilerDetectionHeader/NoFeature.cmake   |   10 -
 .../OldVersion-result.txt                          |    1 -
 .../OldVersion-stderr.txt                          |    5 -
 .../WriteCompilerDetectionHeader/OldVersion.cmake  |   10 -
 .../PrefixTypo-result.txt                          |    1 -
 .../PrefixTypo-stderr.txt                          |    5 -
 .../WriteCompilerDetectionHeader/PrefixTypo.cmake  |    7 -
 .../RunCMakeTest.cmake                             |    9 -
 32 files changed, 614 deletions(-)
 delete mode 100644 Help/module/WriteCompilerDetectionHeader.rst
 delete mode 100644 Help/release/dev/module-WriteCompilerDetectionHeader.rst
 delete mode 100644 Modules/WriteCompilerDetectionHeader.cmake
 delete mode 100644 Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
 delete mode 100644 Tests/Module/WriteCompilerDetectionHeader/main.cpp
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-result.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-stderr.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs.cmake
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-result.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-stderr.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo.cmake
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-result.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-stderr.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs.cmake
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-result.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-stderr.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler.cmake
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-result.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-stderr.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature.cmake
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-result.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-stderr.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion.cmake
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-result.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-stderr.txt
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo.cmake
 delete mode 100644 Tests/RunCMake/WriteCompilerDetectionHeader/RunCMakeTest.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list