From 297c63fa65327491a2b50e521b661c5835a19fe4 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 13 Aug 2013 07:48:01 -0400 Subject: Imported Upstream version 2.8.11.2 --- Modules/CheckVariableExists.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Modules/CheckVariableExists.cmake') diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index f9155a014..a21e65f26 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -26,7 +26,6 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake") macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) @@ -35,10 +34,8 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) "-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}") message(STATUS "Looking for ${VAR}") if(CMAKE_REQUIRED_LIBRARIES) - # this one translates potentially used imported library targets to their files on disk - CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}") set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}") + LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) else() set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES) endif() @@ -46,8 +43,8 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/CheckVariableExists.c COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + ${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_VARIABLE_DEFINITIONS} - "${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES}" OUTPUT_VARIABLE OUTPUT) if(${VARIABLE}) set(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}") -- cgit v1.2.3