diff options
-rw-r--r-- | Modules/CheckFunctionExists.cmake | 3 | ||||
-rw-r--r-- | Modules/CheckIncludeFile.cmake | 3 | ||||
-rw-r--r-- | Modules/CheckIncludeFiles.cmake | 3 | ||||
-rw-r--r-- | Modules/CheckLibraryExists.cmake | 3 | ||||
-rw-r--r-- | Modules/CheckTypeSize.cmake | 3 | ||||
-rw-r--r-- | Modules/CheckVariableExists.cmake | 3 |
6 files changed, 14 insertions, 4 deletions
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index 5951e53..7d69238 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -8,7 +8,8 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) IF("${VARIABLE}" MATCHES "^${VARIABLE}$") - SET(MACRO_CHECK_FUNCTION_DEFINITIONS -DCHECK_FUNCTION_EXISTS=${FUNCTION}) + 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 diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index 03551dc..cc6a9d0 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -8,6 +8,7 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) IF("${VARIABLE}" MATCHES "^${VARIABLE}$") + SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS}) SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE}) CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c IMMEDIATE) @@ -15,6 +16,8 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) TRY_COMPILE(${VARIABLE} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} OUTPUT_VARIABLE OUTPUT) IF(${VARIABLE}) MESSAGE(STATUS "Looking for ${INCLUDE} - found") diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index 642fb01..686a548 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -9,6 +9,7 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE) IF("${VARIABLE}" MATCHES "^${VARIABLE}$") SET(CHECK_INCLUDE_FILES_CONTENT "/* */\n") + SET(MACRO_CHECK_INCLUDE_FILES_FLAGS ${CMAKE_REQUIRED_FLAGS}) STRING(ASCII 35 POUND) STRING(ASCII 40 41 PARENTS) FOREACH(FILE ${INCLUDE}) @@ -24,6 +25,8 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE) TRY_COMPILE(${VARIABLE} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS} OUTPUT_VARIABLE OUTPUT) IF(${VARIABLE}) MESSAGE(STATUS "Looking for set of ${INCLUDE} - found") diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index f720e3e..e206a7c 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -8,7 +8,8 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) IF("${VARIABLE}" MATCHES "^${VARIABLE}$") - SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION -DCHECK_FUNCTION_EXISTS=${FUNCTION}) + 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) diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index e7bc1b5..08d1a20 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -8,7 +8,8 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) IF("${VARIABLE}" MATCHES "^${VARIABLE}$") - SET(MACRO_CHECK_TYPE_SIZE_FLAGS -DCHECK_TYPE_SIZE_TYPE="${TYPE}") + 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") diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index 96906f7..1635b5d 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -7,7 +7,8 @@ MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE) IF("${VARIABLE}" MATCHES "^${VARIABLE}$") - SET(MACRO_CHECK_VARIABLE_DEFINITIONS -DCHECK_VARIABLE_EXISTS=${VAR}) + 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 |