summaryrefslogtreecommitdiff
path: root/cmake/check_linker_flag.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/check_linker_flag.cmake')
-rw-r--r--cmake/check_linker_flag.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/check_linker_flag.cmake b/cmake/check_linker_flag.cmake
index ff4b91e89f6..1ea1772d79e 100644
--- a/cmake/check_linker_flag.cmake
+++ b/cmake/check_linker_flag.cmake
@@ -6,11 +6,11 @@ FUNCTION(MY_CHECK_AND_SET_LINKER_FLAG flag_to_set)
RETURN()
ENDIF()
STRING(REGEX REPLACE "[-,= +]" "_" result "HAVE_LINK_FLAG_${flag_to_set}")
- SET(SAVE_CMAKE_REQUIRED_LINK_OPTIONS "${CMAKE_REQUIRED_LINK_OPTIONS}")
+ SET(SAVE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
STRING(REGEX REPLACE "^-Wno-" "-W" flag_to_check ${flag_to_set})
- SET(CMAKE_REQUIRED_LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS} ${flag_to_check})
+ SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${flag_to_check})
CHECK_CXX_SOURCE_COMPILES("int main(void) { return 0; }" ${result})
- SET(CMAKE_REQUIRED_LINK_OPTIONS "${SAVE_CMAKE_REQUIRED_LINK_OPTIONS}")
+ SET(CMAKE_REQUIRED_LIBRARIES "${SAVE_CMAKE_REQUIRED_LIBRARIES}")
IF (${result})
FOREACH(linktype SHARED MODULE EXE)
IF(ARGN)