From 5d5c5addc3ec60c1b1759f0d03826398e3b29f0f Mon Sep 17 00:00:00 2001 From: malaterre Date: Tue, 5 Jul 2005 23:34:14 +0000 Subject: [PATCH] ENH: Adding a cmake script to find which compiler return NULL on malloc(0)... fix typo --- src/gdcmjasper/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gdcmjasper/CMakeLists.txt b/src/gdcmjasper/CMakeLists.txt index 5d81feb2..4ab3071a 100644 --- a/src/gdcmjasper/CMakeLists.txt +++ b/src/gdcmjasper/CMakeLists.txt @@ -13,21 +13,21 @@ IF("NULL_ON_MALLOC_0" MATCHES "^NULL_ON_MALLOC_0$") "${GDCMJASPER_BINARY_DIR}" "${GDCMJASPER_BINARY_DIR}/jasperNULLmalloc.c" OUTPUT_VARIABLE OUTPUT) - IF(NULL_ON_MALLOC_0) + IF(RESULT_NULL_ON_MALLOC_0 EQUAL 0) MESSAGE(STATUS "Checking if compiler return NULL on malloc(0) -- yes") SET(NULL_ON_MALLOC_0 1 CACHE INTERNAL "Check if compiler returns NULL on malloc(0)") WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeOutput.log "Determining how compiler implement malloc(0)" "passed with the following output:\n" "${OUTPUT}\n" APPEND) - ELSE(NULL_ON_MALLOC_0) - MESSAGE(STATUS "Checking if ifreq has a sa_len -- no") + ELSE(RESULT_NULL_ON_MALLOC_0 EQUAL 0) + MESSAGE(STATUS "Checking if compiler returns NULL on malloc(0) -- no") SET(NULL_ON_MALLOC_0 0 CACHE INTERNAL "Check if compiler returns NULL on malloc(0)") WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log "Determining how compiler implement malloc(0)" "failed with the following output:\n" "${OUTPUT}\n" APPEND) - ENDIF(NULL_ON_MALLOC_0) + ENDIF(RESULT_NULL_ON_MALLOC_0 EQUAL 0) ENDIF("NULL_ON_MALLOC_0" MATCHES "^NULL_ON_MALLOC_0$") #OPTION(HAVE_LIBJPEG "Do you have ijg" OFF) -- 2.48.1