Commit 668b3f3c authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

Fix problems with required flags

parent e720b84d
......@@ -8,8 +8,8 @@
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS -DCHECK_FUNCTION_EXISTS=${FUNCTION}
${CMAKE_REQUIRED_FLAGS})
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
MESSAGE(STATUS "Looking for ${FUNCTION}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
......
......@@ -8,8 +8,8 @@
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})
SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
IF(CMAKE_REQUIRED_LIBRARIES)
......
......@@ -8,8 +8,8 @@
MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_TYPE_SIZE_FLAGS -DCHECK_TYPE_SIZE_TYPE="${TYPE}"
${CMAKE_REQUIRED_FLAGS})
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
"-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}")
IF(HAVE_SYS_TYPES_H)
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_SYS_TYPES_H")
......@@ -18,6 +18,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
SET(MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_STDINT_H")
ENDIF(HAVE_STDINT_H)
MESSAGE(STATUS "Check size of ${TYPE}")
MESSAGE(STATUS "Flags: ${MACRO_CHECK_TYPE_SIZE_FLAGS}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_TYPE_SIZE_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
......
......@@ -7,8 +7,8 @@
MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_VARIABLE_DEFINITIONS -DCHECK_VARIABLE_EXISTS=${VAR}
${CMAKE_REQUIRED_FLAGS})
SET(MACRO_CHECK_VARIABLE_DEFINITIONS
"-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
MESSAGE(STATUS "Looking for ${VARIABLE}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment