mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 14:08:35 +08:00
Compilers: protect use of __has_include
If the compiler does not have __has_include, pretend the answer is always no
This commit is contained in:
@@ -11,6 +11,12 @@
|
|||||||
# define volatile
|
# define volatile
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__has_include)
|
||||||
|
/* If the compiler does not have __has_include, pretend the answer is
|
||||||
|
always no. */
|
||||||
|
# define __has_include(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
@CMAKE_C_COMPILER_ID_CONTENT@
|
@CMAKE_C_COMPILER_ID_CONTENT@
|
||||||
|
|
||||||
/* Construct the string literal in pieces to prevent the source from
|
/* Construct the string literal in pieces to prevent the source from
|
||||||
|
@@ -5,6 +5,12 @@
|
|||||||
# error "A C compiler has been selected for C++."
|
# error "A C compiler has been selected for C++."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__has_include)
|
||||||
|
/* If the compiler does not have __has_include, pretend the answer is
|
||||||
|
always no. */
|
||||||
|
# define __has_include(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
@CMAKE_CXX_COMPILER_ID_CONTENT@
|
@CMAKE_CXX_COMPILER_ID_CONTENT@
|
||||||
|
|
||||||
/* Construct the string literal in pieces to prevent the source from
|
/* Construct the string literal in pieces to prevent the source from
|
||||||
|
Reference in New Issue
Block a user