Browse Source

CMakeBackwardCompatibilityCXX: Update documentation

This describes the module in more details to make upgrading code easier.
Peter Kokot 10 months ago
parent
commit
9883281982
1 changed files with 28 additions and 8 deletions
  1. 28 8
      Modules/CMakeBackwardCompatibilityCXX.cmake

+ 28 - 8
Modules/CMakeBackwardCompatibilityCXX.cmake

@@ -5,16 +5,36 @@
 CMakeBackwardCompatibilityCXX
 -----------------------------
 
-define a bunch of backwards compatibility variables
+This module defines several backward compatibility cache variables for the
+``CXX`` language to support early C++ (pre-C++98, ANSI C++).
 
-::
+The following modules are included by this module:
 
-  CMAKE_ANSI_CXXFLAGS - flag for ansi c++
-  CMAKE_HAS_ANSI_STRING_STREAM - has <strstream>
-  include(TestForANSIStreamHeaders)
-  include(CheckIncludeFileCXX)
-  include(TestForSTDNamespace)
-  include(TestForANSIForScope)
+* :module:`TestForANSIForScope`
+* :module:`TestForANSIStreamHeaders`
+* :module:`TestForSSTREAM`
+* :module:`TestForSTDNamespace`
+
+Additionally, the following cache variable may be defined:
+
+``CMAKE_ANSI_CXXFLAGS``
+  A space-separated string of compiler options for enabling ANSI C++ mode, if
+  available.
+
+.. note::
+
+  This module is intended for C++ code written before ``C++ 98``.  As of the
+  ``C++ 98`` standard, these issues have been formally addressed, making such
+  checks obsolete.
+
+Examples
+^^^^^^^^
+
+Including this module provides backward compatibility cache variables:
+
+.. code-block:: cmake
+
+  include(CMakeBackwardCompatibilityCXX)
 #]=======================================================================]
 
 if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)