diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake index e6b87f67c3..4491c968f3 100644 --- a/Modules/CMakeBackwardCompatibilityCXX.cmake +++ b/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 - 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)