Modules: Restore unnecessary inclusions for compatibility

Since commit 03c6ebf2b5 (Modules:Check,GenerateExportHeader: include
only what's needed, 2023-03-09, v3.27.0-rc1~327^2) some existing
projects broke because they were accidentally relying on indirect
inclusion of some check modules.  For now, restore the unnecessary
includes for compatibility.  They can be removed with a policy later.

Fixes: #24991
Issue: #24994
This commit is contained in:
Brad King
2023-06-12 09:59:23 -04:00
parent bebb2abb4b
commit 4a2b708144
7 changed files with 30 additions and 0 deletions

View File

@@ -50,3 +50,7 @@ include(Internal/CheckCompilerFlag)
macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
cmake_check_compiler_flag(C "${_FLAG}" ${_RESULT})
endmacro ()
# FIXME(#24994): The following module is included only for compatibility
# with projects that accidentally relied on it with CMake 3.26 and below.
include(CheckCSourceCompiles)

View File

@@ -33,3 +33,7 @@ include(Internal/CheckCompilerFlag)
macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
cmake_check_compiler_flag(CXX "${_FLAG}" ${_RESULT})
endmacro ()
# FIXME(#24994): The following module is included only for compatibility
# with projects that accidentally relied on it with CMake 3.26 and below.
include(CheckCXXSourceCompiles)

View File

@@ -52,3 +52,7 @@ include(Internal/CheckCompilerFlag)
macro (CHECK_FORTRAN_COMPILER_FLAG _FLAG _RESULT)
cmake_check_compiler_flag(Fortran "${_FLAG}" ${_RESULT})
endmacro ()
# FIXME(#24994): The following module is included only for compatibility
# with projects that accidentally relied on it with CMake 3.26 and below.
include(CheckFortranSourceCompiles)

View File

@@ -52,3 +52,7 @@ include(Internal/CheckCompilerFlag)
macro (CHECK_OBJC_COMPILER_FLAG _FLAG _RESULT)
cmake_check_compiler_flag(OBJC "${_FLAG}" ${_RESULT})
endmacro ()
# FIXME(#24994): The following module is included only for compatibility
# with projects that accidentally relied on it with CMake 3.26 and below.
include(CheckOBJCSourceCompiles)

View File

@@ -52,3 +52,7 @@ include(Internal/CheckCompilerFlag)
macro (CHECK_OBJCXX_COMPILER_FLAG _FLAG _RESULT)
cmake_check_compiler_flag(OBJCXX "${_FLAG}" ${_RESULT})
endmacro ()
# FIXME(#24994): The following module is included only for compatibility
# with projects that accidentally relied on it with CMake 3.26 and below.
include(CheckOBJCXXSourceCompiles)

View File

@@ -81,3 +81,8 @@ int main()
message(FATAL_ERROR "Unknown language:\n ${_lang}\nSupported languages: C, CXX.\n")
endif()
endmacro ()
# FIXME(#24994): The following modules are included only for compatibility
# with projects that accidentally relied on them with CMake 3.26 and below.
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)

View File

@@ -453,3 +453,8 @@ function(add_compiler_export_flags)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE)
endif()
endfunction()
# FIXME(#24994): The following module(s) are included only for compatibility
# with projects that accidentally relied on them with CMake 3.26 and below.
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)