summaryrefslogtreecommitdiff
path: root/Modules/CheckIncludeFiles.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-01-03 19:23:19 -0500
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-01-03 19:23:19 -0500
commite720b84d6b6622a0e8780bd87fc9d364658de3f0 (patch)
tree4bb3b5de03655c1f13dcd3321d19d2cd120a7b35 /Modules/CheckIncludeFiles.cmake
parent624a222df3d98052d2ee9a72a0a56836045f4d1d (diff)
downloadcmake-e720b84d6b6622a0e8780bd87fc9d364658de3f0.tar.gz
Add required flags
Diffstat (limited to 'Modules/CheckIncludeFiles.cmake')
-rw-r--r--Modules/CheckIncludeFiles.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index 642fb0193b..686a548148 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -9,6 +9,7 @@
MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(CHECK_INCLUDE_FILES_CONTENT "/* */\n")
+ SET(MACRO_CHECK_INCLUDE_FILES_FLAGS ${CMAKE_REQUIRED_FLAGS})
STRING(ASCII 35 POUND)
STRING(ASCII 40 41 PARENTS)
FOREACH(FILE ${INCLUDE})
@@ -24,6 +25,8 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c
+ CMAKE_FLAGS
+ -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for set of ${INCLUDE} - found")