Tons of CMake warnings with cmake 3.0.1 about CMP0042 policy

asked 2014-09-22 07:59:13 -0600

Aleksandr Motsjonov gravatar image

I have cmake version 3.0.1 While building it give many-many of this kind of sections:

  CMake Warning (dev) at cmake/OpenCVGenPkgconfig.cmake:40 (get_target_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 "opencv_videostab".
  Use the target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

I am new to cmake / make business. But from what I understand something have to be changed in current CMakeLists.txt I haven't found any issue about it, so I am thinking of making one?

edit retag flag offensive close merge delete

Comments

1
1

Oh, bummer. I forgot issues are not in github. I searched there and tab "issue" in search result led me into thinking it's not present. Thx.

Aleksandr Motsjonov gravatar imageAleksandr Motsjonov ( 2014-09-22 08:10:34 -0600 )edit

Hello Aleksandr, May I ask if you have been able to solve the problem? Bevause I am having the same and i can't find any solution... Thank you in advance.

Bensch gravatar imageBensch ( 2014-10-19 11:12:55 -0600 )edit

@Bensch. as annoying as it gets, it's just a warning.

using a cmake version < 3 would get rid of it, but it's probaly not worth changing only for that.

berak gravatar imageberak ( 2014-10-19 11:17:14 -0600 )edit