1
0
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:
Zack Galbreath
2021-06-07 18:18:29 +00:00
parent ed3aad97e3
commit 590553f322
2 changed files with 12 additions and 0 deletions

View File

@@ -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

View File

@@ -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