cmake_modules/CheckHaskellModuleExists.cmake
branch0.9.21
changeset 10723 2cfa65083621
parent 10109 91d126fbd7bd
child 11338 facac91c7c65
equal deleted inserted replaced
10721:9b789de8e5df 10723:2cfa65083621
    28                     "-DMODULE=${MODULE}"
    28                     "-DMODULE=${MODULE}"
    29                     "-DFUNCTION=${FUNCTION}"
    29                     "-DFUNCTION=${FUNCTION}"
    30                     "-DPARAMETERS=${PARAMETERS}"
    30                     "-DPARAMETERS=${PARAMETERS}"
    31                     -cpp
    31                     -cpp
    32                     -c "${CMAKE_MODULE_PATH}/checkModule.hs"
    32                     -c "${CMAKE_MODULE_PATH}/checkModule.hs"
       
    33                     RESULT_VARIABLE COMMAND_RESULT
    33                     ERROR_VARIABLE BUILD_ERROR
    34                     ERROR_VARIABLE BUILD_ERROR
    34                     OUTPUT_STRIP_TRAILING_WHITESPACE
    35                     OUTPUT_STRIP_TRAILING_WHITESPACE
    35                     )
    36                     )
    36 
    37     if(${COMMAND_RESULT} EQUAL 0)
    37     if("${BUILD_ERROR}" STREQUAL "")
       
    38       message(STATUS "Looking for ${FUNCTION} in ${MODULE} - found")
    38       message(STATUS "Looking for ${FUNCTION} in ${MODULE} - found")
    39       set(${VARIABLE} 1 CACHE INTERNAL "Have module ${MODULE}")
    39       set(${VARIABLE} 1 CACHE INTERNAL "Have module ${MODULE}")
    40       file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
    40       file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
    41         "Determining if the function ${FUNCTION} exists in the ${MODULE} passed\n\n")
    41         "Determining if the function ${FUNCTION} exists in the ${MODULE} passed\n\n")
    42     else()
    42     else()