summaryrefslogtreecommitdiff
path: root/Modules/CheckCSourceCompiles.cmake
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-08-13 07:48:01 -0400
committerAnas Nashif <anas.nashif@intel.com>2013-08-13 07:48:01 -0400
commit297c63fa65327491a2b50e521b661c5835a19fe4 (patch)
treecf30d58014e240eb5e4417727d8f137cdbe75828 /Modules/CheckCSourceCompiles.cmake
parentef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff)
downloadcmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.gz
cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.bz2
cmake-297c63fa65327491a2b50e521b661c5835a19fe4.zip
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
Diffstat (limited to 'Modules/CheckCSourceCompiles.cmake')
-rw-r--r--Modules/CheckCSourceCompiles.cmake7
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index b4577544e..86a4565ce 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -24,7 +24,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_C_SOURCE_COMPILES SOURCE VAR)
@@ -43,10 +42,8 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
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_C_SOURCE_COMPILES_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
endif()
@@ -64,8 +61,8 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)