diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-07-11 18:14:03 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-07-11 18:14:03 (GMT) |
commit | a17587c24449c2ae12fd0aaccf9d2ba36838eead (patch) | |
tree | 9698a8bb6d3c083cbd58a93496cbebd2da656166 /Modules/CheckLibraryExists.cmake | |
parent | 958987c27ffe95733e01c5d2313758922e60de74 (diff) | |
download | CMake-a17587c24449c2ae12fd0aaccf9d2ba36838eead.zip CMake-a17587c24449c2ae12fd0aaccf9d2ba36838eead.tar.gz CMake-a17587c24449c2ae12fd0aaccf9d2ba36838eead.tar.bz2 |
ENH: Replace WRITE_FILE with FILE(WRITE and FILE(APPEND. Replace MAKE_DIRECTORY with FILE(MAKE_DIRECTORY, replace STRING(ASCII things
Diffstat (limited to 'Modules/CheckLibraryExists.cmake')
-rw-r--r-- | Modules/CheckLibraryExists.cmake | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index ea223d3..3aa33cf 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -9,21 +9,21 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) IF("${VARIABLE}" MATCHES "^${VARIABLE}$") SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION - "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}") + "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}") MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}") SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY}) IF(CMAKE_REQUIRED_LIBRARIES) SET(CHECK_LIBRARY_EXISTS_LIBRARIES - ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES}) + ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES}) ENDIF(CMAKE_REQUIRED_LIBRARIES) TRY_COMPILE(${VARIABLE} - ${CMAKE_BINARY_DIR} - ${CMAKE_ROOT}/Modules/CheckFunctionExists.c - CMAKE_FLAGS - -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION} - -DLINK_DIRECTORIES:STRING=${LOCATION} - "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}" - OUTPUT_VARIABLE OUTPUT) + ${CMAKE_BINARY_DIR} + ${CMAKE_ROOT}/Modules/CheckFunctionExists.c + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION} + -DLINK_DIRECTORIES:STRING=${LOCATION} + "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT) IF(${VARIABLE}) MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found") @@ -31,10 +31,10 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) ELSE(${VARIABLE}) MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found") SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}") - WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log "Determining if the function ${FUNCTION} exists in the ${LIBRARY} " "failed with the following output:\n" - "${OUTPUT}\n" APPEND) + "${OUTPUT}\n") ENDIF(${VARIABLE}) ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") ENDMACRO(CHECK_LIBRARY_EXISTS) |