diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-20 19:01:27 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-20 19:01:27 (GMT) |
commit | 28159ebd71d2080012dabf35e9d9ad6d8538db44 (patch) | |
tree | 728f0787e7667a5af85dee3362fda5ae6d3bf8c7 /Modules/CheckSizeOf.cmake | |
parent | 202600f95a2fe3c401e7c6ba64a3ce93e2143f88 (diff) | |
download | CMake-28159ebd71d2080012dabf35e9d9ad6d8538db44.zip CMake-28159ebd71d2080012dabf35e9d9ad6d8538db44.tar.gz CMake-28159ebd71d2080012dabf35e9d9ad6d8538db44.tar.bz2 |
Fix tests for new trycompile and tryrun
Diffstat (limited to 'Modules/CheckSizeOf.cmake')
-rw-r--r-- | Modules/CheckSizeOf.cmake | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Modules/CheckSizeOf.cmake b/Modules/CheckSizeOf.cmake index 8f1b122..34f8d50 100644 --- a/Modules/CheckSizeOf.cmake +++ b/Modules/CheckSizeOf.cmake @@ -7,15 +7,13 @@ # MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) - TRY_RUN(RUN_RESULT COMPILE_OK + TRY_RUN(${VARIABLE} HAVE_${VARIABLE} ${PROJECT_BINARY_DIR} ${CMAKE_ROOT}/Modules/CheckSizeOf.c COMPILE_DEFINITIONS -DCHECK_SIZE_OF="${TYPE}" OUTPUT_VARIABLE OUTPUT) - IF(COMPILE_OK) - SET(${VARIABLE} ${RUN_RESULT}) - ELSE(COMPILE_OK) + IF(NOT HAVE_${VARIABLE}) WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n") - ENDIF(COMPILE_OK) + ENDIF(NOT HAVE_${VARIABLE}) ENDMACRO(CHECK_TYPE_SIZE) |