summaryrefslogtreecommitdiffstats
path: root/Modules/CheckIncludeFile.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-20 19:01:27 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-20 19:01:27 (GMT)
commit28159ebd71d2080012dabf35e9d9ad6d8538db44 (patch)
tree728f0787e7667a5af85dee3362fda5ae6d3bf8c7 /Modules/CheckIncludeFile.cmake
parent202600f95a2fe3c401e7c6ba64a3ce93e2143f88 (diff)
downloadCMake-28159ebd71d2080012dabf35e9d9ad6d8538db44.zip
CMake-28159ebd71d2080012dabf35e9d9ad6d8538db44.tar.gz
CMake-28159ebd71d2080012dabf35e9d9ad6d8538db44.tar.bz2
Fix tests for new trycompile and tryrun
Diffstat (limited to 'Modules/CheckIncludeFile.cmake')
-rw-r--r--Modules/CheckIncludeFile.cmake12
1 files changed, 5 insertions, 7 deletions
diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake
index 8a35900..6dadfbf 100644
--- a/Modules/CheckIncludeFile.cmake
+++ b/Modules/CheckIncludeFile.cmake
@@ -9,17 +9,15 @@
MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
- ${PROJECT_BINARY_DIR}/CheckIncludeFile.c IMMEDIATE)
- TRY_COMPILE(COMPILE_OK
+ ${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
+ TRY_COMPILE(${VARIABLE}
${PROJECT_BINARY_DIR}
- ${PROJECT_BINARY_DIR}/CheckIncludeFile.c
+ ${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c
OUTPUT_VARIABLE OUTPUT)
- IF(COMPILE_OK)
- SET(${VARIABLE} ${COMPILE_OK})
- ELSE(COMPILE_OK)
+ IF(NOT ${VARIABLE})
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
"${OUTPUT}\n")
- ENDIF(COMPILE_OK)
+ ENDIF(NOT ${VARIABLE})
ENDMACRO(CHECK_INCLUDE_FILE)