[Paraview] CMake warning when linking plugin with library

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Feb 6 13:17:49 EST 2015


Fix it as:

target_link_libraries(Reader LINK_PRIVATE ${READER_LIBS})

(Note the LINK_PRIVATE flag). See [1] for details.

Utkarsh

[1] http://www.cmake.org/cmake/help/v3.0/command/target_link_libraries.html


On Thu, Feb 5, 2015 at 7:03 AM, Gonzalo Brito Gadeschi
<g.brito at aia.rwth-aachen.de> wrote:
> When using the following CMake code to link a library to a paraview plugin:
>
>> add_paraview_plugin(Reader "v1.0"
>>  SERVER_MANAGER_XML vtkReaderServConf.xml
>>  GUI_INTERFACES ${interfaces}
>>  SERVER_MANAGER_SOURCES vtkReader.cxx
>>  SOURCES ${sources}
>>  REQUIRED_ON_SERVER)
>>
>> target_link_libraries(Reader ${READER_LIBS})
>
> I get from CMake the following warning.
>
> CMake Warning (dev) at reader/CMakeLists.txt:22 (target_link_libraries):
>
>> PolicyCMP0023 is not set: Plain and keyword target_link_libraries
>>   signatures cannot be mixed.  Run "cmake --help-policy CMP0023" for
>> policy
>>   details.  Use the cmake_policy command to set the policy and suppress
>> this
>>   warning.
>>   The keyword signature for target_link_libraries has already been used
>> with
>>   the target "Reader".  All uses of target_link_libraries with a target
>>   should be either all-keyword or all-plain.
>>
>>  The uses of the keyword signature are here:
>>   * paraview_src/CMake/ParaViewPlugins.cmake:1096 (target_link_libraries)
>>   * paraview_src/CMake/ParaViewPlugins.cmake:1099 (target_link_libraries)
>>
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> What am I doing wrong and how do I fix it?
>
> --
> Dipl.-Ing. Gonzalo Brito Gadeschi
> Institute of Aerodynamics and Chair of Fluid Mechanics
> RWTH Aachen University
> Wuellnerstraße 5a
> D-52062 Aachen
> Germany
> Phone: ++49-(0)241-80-94821
> Fax: ++49-(0)241-80-92257
> E-mail:  g.brito at aia.rwth-aachen.de
> Internet: www.aia.rwth-aachen.de
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>


More information about the ParaView mailing list