[CMake] need help fixing warning message... 3.0

Hendrik Sattler post at hendrik-sattler.de
Mon May 26 16:49:42 EDT 2014


Maybe you can explain _why_ you need to do it this way? Can it be solved more inline with the better cross-compile support in cmake-3.0?

On 26. Mai 2014 19:29:20 MESZ, J Decker <d3ck0r at gmail.com> wrote:
>So... no alternatives to location in this instance?
>
>
>On Sat, May 24, 2014 at 7:28 PM, J Decker <d3ck0r at gmail.com> wrote:
>
>> CMake Warning (dev) at
>>
>C:/general/build/android/karaway/debug_out/core/DefaultInstall.cmake:203
>> (get_property):
>>   Policy CMP0026 is not set: Disallow use of the LOCATION target
>property.
>>   Run "cmake --help-policy CMP0026" for policy details.  Use the
>> cmake_policy
>>   command to set the policy and suppress this warning.
>>
>>   The LOCATION property should not be read from target "keypad.isp". 
>Use
>> the
>>   target name directly with add_custom_command, or use the generator
>>   expression $<TARGET_FILE>, as appropriate.
>>
>> Call Stack (most recent call first):
>>   security.null/CMakeLists.txt:23 (my_target_link_libraries)
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>>
>> -------------
>>
>> macro(my_target_link_libraries target )
>>     if(CMAKE_COMPILER_IS_GNUCC AND __ANDROID__ )
>>        foreach( target_lib ${ARGN} )
>>           if( TARGET ${target_lib} )
>>              get_property( lib_path TARGET ${target_lib} PROPERTY
>LOCATION)
>>              get_property( existing_outname TARGET ${target_lib}
>PROPERTY
>> OUTPUT_NAME )
>>              if( NOT existing_outname )
>> set( existing_outname ${target_lib} )
>>              endif( NOT existing_outname )
>>              if( ${lib_path} MATCHES "(.*)/([^/]*)$" )
>>                 get_target_property(existing_link_flags ${target}
>> LINK_FLAGS)
>>                 if(existing_link_flags)
>>                     set(new_link_flags "${existing_link_flags} -L
>> ${CMAKE_MATCH_1} -l ${existing_outname}")
>>                 else()
>>                     set(new_link_flags "-L ${CMAKE_MATCH_1} -l
>> ${existing_outname}")
>>                 endif()
>>                 set_target_properties( ${target} PROPERTIES
>LINK_FLAGS
>> ${new_link_flags})
>>          add_dependencies( ${target} ${target_lib} )
>>              endif( ${lib_path} MATCHES "(.*)/([^/]*)$" )
>>           else()
>>              target_link_libraries( ${target} ${target_lib} )
>>           endif( TARGET ${target_lib} )
>>        endforeach( target_lib ${ARGN} )
>>     else()
>> target_link_libraries( ${target} ${ARGN} )
>>     endif()
>> endmacro()
>>
>> ----------------------
>> In the script I'm getting LOCATION to know if the referenced library
>is a
>> full pathname or a short  name so I can strip the path
>appropriately... I
>> don't think the target_file solution works here, what other
>alternative is
>> there?
>>
>
>
>------------------------------------------------------------------------
>
>-- 
>
>Powered by www.kitware.com
>
>Please keep messages on-topic and check the CMake FAQ at:
>http://www.cmake.org/Wiki/CMake_FAQ
>
>Kitware offers various services to support the CMake community. For
>more information on each offering, please visit:
>
>CMake Support: http://cmake.org/cmake/help/support.html
>CMake Consulting: http://cmake.org/cmake/help/consulting.html
>CMake Training Courses: http://cmake.org/cmake/help/training.html
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Follow this link to subscribe/unsubscribe:
>http://www.cmake.org/mailman/listinfo/cmake

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140526/33fb23be/attachment-0001.html>


More information about the CMake mailing list