Emit a warning if llvm_map_components_to_libraries() is used noting that its

use is deprecated in favour of llvm_map_components_to_libnames()

Although message(DEPRECATION "msg") would probably be a better fit this
does nothing if CMAKE_ERROR_DEPRECATED and CMAKE_WARNING_DEPRECATED are
both off, which is the default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214078 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Liew 2014-07-28 13:36:50 +00:00
parent 1149da67c5
commit b3768f6fb0

View File

@ -51,12 +51,14 @@ function(explicit_llvm_config executable)
endfunction(explicit_llvm_config) endfunction(explicit_llvm_config)
# This is a variant intended for the final user: # This is Deprecated
function(llvm_map_components_to_libraries OUT_VAR) function(llvm_map_components_to_libraries OUT_VAR)
message(AUTHOR_WARNING "Using llvm_map_components_to_libraries() is deprecated. Use llvm_map_components_to_libnames() instead")
explicit_map_components_to_libraries(result ${ARGN}) explicit_map_components_to_libraries(result ${ARGN})
set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE ) set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE )
endfunction(llvm_map_components_to_libraries) endfunction(llvm_map_components_to_libraries)
# This is a variant intended for the final user:
# Map LINK_COMPONENTS to actual libnames. # Map LINK_COMPONENTS to actual libnames.
function(llvm_map_components_to_libnames out_libs) function(llvm_map_components_to_libnames out_libs)
set( link_components ${ARGN} ) set( link_components ${ARGN} )