diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-01-01 20:02:20 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-01-01 20:02:20 (GMT) |
commit | 6d5c4370450fa34afb754ca2fdef79ee71ab9d99 (patch) | |
tree | 9b3b0fdfe1fd7e94a2db560a503256198ce9e428 /Modules/CheckTypeSize.cmake | |
parent | fe6721af84a5ec31f1b185fce1f6024a5d9c7e20 (diff) | |
download | CMake-6d5c4370450fa34afb754ca2fdef79ee71ab9d99.zip CMake-6d5c4370450fa34afb754ca2fdef79ee71ab9d99.tar.gz CMake-6d5c4370450fa34afb754ca2fdef79ee71ab9d99.tar.bz2 |
Add a way to add custom libraries to the mix
Diffstat (limited to 'Modules/CheckTypeSize.cmake')
-rw-r--r-- | Modules/CheckTypeSize.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index 35dcaaa..306f1a1 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -17,10 +17,15 @@ 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}") + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_TYPE_SIZE_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ENDIF(CMAKE_REQUIRED_LIBRARIES) TRY_RUN(${VARIABLE} HAVE_${VARIABLE} ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/CheckTypeSize.c CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS} + ${CHECK_TYPE_SIZE_ADD_LIBRARIES} OUTPUT_VARIABLE OUTPUT) IF(HAVE_${VARIABLE}) MESSAGE(STATUS "Check size of ${TYPE} - done") |