Re: [cmake-developers] CMP0071

2017-10-05 Thread Sebastian Holtermann
> I find myself setting SKIP_AUTOUIC on *.h and *.cpp files to silence
> CMP0071 warnings. 

It's an unfortunate situation.

In many cases (qt < 5.10) it might work to just let AUTOUIC probe
the (moc/uic/rcc) GENERATED files as well by setting
`cmake_policy(SET CMP0071 NEW)`

-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-10-05 Thread Sebastian Holtermann
On Mittwoch, 4. Oktober 2017 20:01:50 CEST clin...@elemtech.com wrote:
> - On Sep 26, 2017, at 9:07 AM, Sebastian Holtermann sebl...@xwmw.org 
wrote:
> >> I updated and I'm getting this:
> >> 
> >> CMake Warning (dev) in claro/navigation5/CMakeLists.txt:
> >> Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED
> >> files.
> >> Run "cmake --help-policy CMP0071" for policy details. Use the
> >> cmake_policy
> >> command to set the policy and suppress this warning.
> >> 
> >> AUTOMOC: Ignoring GENERATED header file(s):
> >> 
> >> "/path/to/ui_SomeFile.h"
> >> "/path/to/qrc_AnotherFile.cpp"
> >> 
> >> 
> >> Those ui_* and qrc_* files do not require processing by moc.
> >> In this case, I was using qt5_wrap_ui() and qt5_add_resources().
> >> 
> >> I did an experiment and replaced qt5_wrap_ui() with autouic, and the
> >> warning went away for those ui_* files.
> >> 
> >> Is there a way to not print out that policy warning on ui_* and qrc_*
> >> files
> >> when using qt5_wrap_ui()/qt5_add_resources()? These are the only file
> >> types
> >> for which I'm getting that warning.
> > 
> > You can set the source file property SKIP_AUTOMOC on the GENERATED files.
> > See: https://cmake.org/cmake/help/v3.9/prop_sf/SKIP_AUTOMOC.html
> > See: https://cmake.org/cmake/help/git-master/policy/CMP0071.html
> > 
> > For example like this
> > ```
> > set_property(SOURCE /path/to/ui_SomeFile.h PROPERTY SKIP_AUTOMOC ON)
> > set_property(SOURCE /path/to/qrc_AnotherFile.cpp PROPERTY SKIP_AUTOMOC ON)
> > ```
> 
> I'm probably pushing things here, but why not.
> I'm experimenting with setting AUTOMOC/AUTOUIC/AUTORCC on, and also using
> the qt5_* macros.
> 
> I see the rcc processing only looks at *.qrc files, but the uic processing
> looks at files with any extension.  Why not limit that to just *.ui files? 
> I find myself setting SKIP_AUTOUIC on *.h and *.cpp files to silence
> CMP0071 warnings.  Its obvious to me that a .cpp or .h file is not an xml
> file as expected by uic.
> 
> I can understand having to set SKIP_AUTOMOC on files with various file
> extensions.
> 
> I bring this up here in case something needs to change on the CMake side.

Despite it's name might imply that, AUTOUIC doesn't care about .ui files in the 
target sources. It never did.

AUTOUIC probes the same files as AUTOMOC, that is .h(xx/pp) and .c(xx/pp) 
files. 
In these files it searches for '#include "ui_.h"' strings and derives the 
.ui file names from that (for uic processing).

I don't think that this can (or should) be changed. It's a reasonable behavior 
and a number of projects rely on it. It just is not what people might expect 
at a first glance.





-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-10-04 Thread clinton

- On Sep 26, 2017, at 9:07 AM, Sebastian Holtermann sebl...@xwmw.org wrote:

>> I updated and I'm getting this:
>> 
>> CMake Warning (dev) in claro/navigation5/CMakeLists.txt:
>> Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
>> Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy
>> command to set the policy and suppress this warning.
>> 
>> AUTOMOC: Ignoring GENERATED header file(s):
>> 
>> "/path/to/ui_SomeFile.h"
>> "/path/to/qrc_AnotherFile.cpp"
>> 
>> 
>> Those ui_* and qrc_* files do not require processing by moc.
>> In this case, I was using qt5_wrap_ui() and qt5_add_resources().
>> 
>> I did an experiment and replaced qt5_wrap_ui() with autouic, and the warning
>> went away for those ui_* files.
>> 
>> Is there a way to not print out that policy warning on ui_* and qrc_* files
>> when using qt5_wrap_ui()/qt5_add_resources()? These are the only file types
>> for which I'm getting that warning.
> 
> You can set the source file property SKIP_AUTOMOC on the GENERATED files.
> See: https://cmake.org/cmake/help/v3.9/prop_sf/SKIP_AUTOMOC.html
> See: https://cmake.org/cmake/help/git-master/policy/CMP0071.html
> 
> For example like this
> ```
> set_property(SOURCE /path/to/ui_SomeFile.h PROPERTY SKIP_AUTOMOC ON)
> set_property(SOURCE /path/to/qrc_AnotherFile.cpp PROPERTY SKIP_AUTOMOC ON)
> ```
> 

I'm probably pushing things here, but why not.
I'm experimenting with setting AUTOMOC/AUTOUIC/AUTORCC on, and also using the 
qt5_* macros.

I see the rcc processing only looks at *.qrc files, but the uic processing 
looks at files with any extension.  Why not limit that to just *.ui files?  I 
find myself setting SKIP_AUTOUIC on *.h and *.cpp files to silence CMP0071 
warnings.  Its obvious to me that a .cpp or .h file is not an xml file as 
expected by uic.

I can understand having to set SKIP_AUTOMOC on files with various file 
extensions.

I bring this up here in case something needs to change on the CMake side.

Clint
-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-10-02 Thread Sebastian Holtermann
On Montag, 2. Oktober 2017 06:58:31 CEST Brad King wrote:
> On 09/26/2017 12:55 PM, clin...@elemtech.com wrote:
> > https://bugreports.qt.io/browse/QTBUG-63442
> 
> Please take a look at the proposed fix:
> 
>   https://codereview.qt-project.org/#/c/207327/

I dropped a few comments.

-Sebastian


-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-10-02 Thread Brad King
On 09/26/2017 12:55 PM, clin...@elemtech.com wrote:
> https://bugreports.qt.io/browse/QTBUG-63442

Please take a look at the proposed fix:

  https://codereview.qt-project.org/#/c/207327/

Thanks,
-Brad
-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-27 Thread Sebastian Holtermann
On Dienstag, 26. September 2017 11:49:18 CEST Brad King wrote:
> On 09/26/2017 11:15 AM, Sebastian Holtermann wrote:
> > "cmake --help-policy CMP0071" already mentions SKIP_AUTOMOC.
> > Should the warning mention SKIP_AUTOMOC as well?
> 
> Yes, please.  It removes an indirection.

The merge request:
https://gitlab.kitware.com/cmake/cmake/merge_requests/1322

-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread clinton
- On Sep 26, 2017, at 9:31 AM, Sebastian Holtermann sebl...@xwmw.org wrote:

> On Dienstag, 26. September 2017 09:25:36 CEST clin...@elemtech.com wrote:
>> - On Sep 26, 2017, at 9:07 AM, Sebastian Holtermann sebl...@xwmw.org
> wrote:
>> >> I updated and I'm getting this:
>> >> 
>> >> CMake Warning (dev) in claro/navigation5/CMakeLists.txt:
>> >> Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED
>> >> files.
>> >> Run "cmake --help-policy CMP0071" for policy details. Use the
>> >> cmake_policy
>> >> command to set the policy and suppress this warning.
>> >> 
>> >> AUTOMOC: Ignoring GENERATED header file(s):
>> >> 
>> >> "/path/to/ui_SomeFile.h"
>> >> "/path/to/qrc_AnotherFile.cpp"
>> >> 
>> >> 
>> >> Those ui_* and qrc_* files do not require processing by moc.
>> >> In this case, I was using qt5_wrap_ui() and qt5_add_resources().
>> >> 
>> >> I did an experiment and replaced qt5_wrap_ui() with autouic, and the
>> >> warning went away for those ui_* files.
>> >> 
>> >> Is there a way to not print out that policy warning on ui_* and qrc_*
>> >> files
>> >> when using qt5_wrap_ui()/qt5_add_resources()? These are the only file
>> >> types
>> >> for which I'm getting that warning.
>> > 
>> > You can set the source file property SKIP_AUTOMOC on the GENERATED files.
>> > See: https://cmake.org/cmake/help/v3.9/prop_sf/SKIP_AUTOMOC.html
>> > See: https://cmake.org/cmake/help/git-master/policy/CMP0071.html
>> > 
>> > For example like this
>> > ```
>> > set_property(SOURCE /path/to/ui_SomeFile.h PROPERTY SKIP_AUTOMOC ON)
>> > set_property(SOURCE /path/to/qrc_AnotherFile.cpp PROPERTY SKIP_AUTOMOC ON)
>> > ```
>> 
>> Would it make sense for qt5_wrap_ui() and qt5_add_resources() to set
>> SKIP_AUTOMOC on the ui_* and qrc_* files?
> 
> That would be the best solution. The macros are provided by Qt though and not
> by CMake.

I agree.

I've reported it there
https://bugreports.qt.io/browse/QTBUG-63442

Thanks,
Clint
-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread Sebastian Holtermann
On Dienstag, 26. September 2017 11:49:18 CEST Brad King wrote:
> On 09/26/2017 11:15 AM, Sebastian Holtermann wrote:
> > "cmake --help-policy CMP0071" already mentions SKIP_AUTOMOC.
> > Should the warning mention SKIP_AUTOMOC as well?
> 
> Yes, please.  It removes an indirection.

Okay, I got the patch ready but there is a conflict with MR
https://gitlab.kitware.com/cmake/cmake/merge_requests/1307
which needs to be merged first.

-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread Brad King
On 09/26/2017 11:15 AM, Sebastian Holtermann wrote:
> "cmake --help-policy CMP0071" already mentions SKIP_AUTOMOC.
> Should the warning mention SKIP_AUTOMOC as well?

Yes, please.  It removes an indirection.

Thanks,
-Brad
-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread Sebastian Holtermann
On Dienstag, 26. September 2017 09:25:36 CEST clin...@elemtech.com wrote:
> - On Sep 26, 2017, at 9:07 AM, Sebastian Holtermann sebl...@xwmw.org 
wrote:
> >> I updated and I'm getting this:
> >> 
> >> CMake Warning (dev) in claro/navigation5/CMakeLists.txt:
> >> Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED
> >> files.
> >> Run "cmake --help-policy CMP0071" for policy details. Use the
> >> cmake_policy
> >> command to set the policy and suppress this warning.
> >> 
> >> AUTOMOC: Ignoring GENERATED header file(s):
> >> 
> >> "/path/to/ui_SomeFile.h"
> >> "/path/to/qrc_AnotherFile.cpp"
> >> 
> >> 
> >> Those ui_* and qrc_* files do not require processing by moc.
> >> In this case, I was using qt5_wrap_ui() and qt5_add_resources().
> >> 
> >> I did an experiment and replaced qt5_wrap_ui() with autouic, and the
> >> warning went away for those ui_* files.
> >> 
> >> Is there a way to not print out that policy warning on ui_* and qrc_*
> >> files
> >> when using qt5_wrap_ui()/qt5_add_resources()? These are the only file
> >> types
> >> for which I'm getting that warning.
> > 
> > You can set the source file property SKIP_AUTOMOC on the GENERATED files.
> > See: https://cmake.org/cmake/help/v3.9/prop_sf/SKIP_AUTOMOC.html
> > See: https://cmake.org/cmake/help/git-master/policy/CMP0071.html
> > 
> > For example like this
> > ```
> > set_property(SOURCE /path/to/ui_SomeFile.h PROPERTY SKIP_AUTOMOC ON)
> > set_property(SOURCE /path/to/qrc_AnotherFile.cpp PROPERTY SKIP_AUTOMOC ON)
> > ```
> 
> Would it make sense for qt5_wrap_ui() and qt5_add_resources() to set
> SKIP_AUTOMOC on the ui_* and qrc_* files?

That would be the best solution. The macros are provided by Qt though and not 
by CMake.


-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread clinton


- On Sep 26, 2017, at 9:07 AM, Sebastian Holtermann sebl...@xwmw.org wrote:

>> I updated and I'm getting this:
>> 
>> CMake Warning (dev) in claro/navigation5/CMakeLists.txt:
>> Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
>> Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy
>> command to set the policy and suppress this warning.
>> 
>> AUTOMOC: Ignoring GENERATED header file(s):
>> 
>> "/path/to/ui_SomeFile.h"
>> "/path/to/qrc_AnotherFile.cpp"
>> 
>> 
>> Those ui_* and qrc_* files do not require processing by moc.
>> In this case, I was using qt5_wrap_ui() and qt5_add_resources().
>> 
>> I did an experiment and replaced qt5_wrap_ui() with autouic, and the warning
>> went away for those ui_* files.
>> 
>> Is there a way to not print out that policy warning on ui_* and qrc_* files
>> when using qt5_wrap_ui()/qt5_add_resources()? These are the only file types
>> for which I'm getting that warning.
> 
> You can set the source file property SKIP_AUTOMOC on the GENERATED files.
> See: https://cmake.org/cmake/help/v3.9/prop_sf/SKIP_AUTOMOC.html
> See: https://cmake.org/cmake/help/git-master/policy/CMP0071.html
> 
> For example like this
> ```
> set_property(SOURCE /path/to/ui_SomeFile.h PROPERTY SKIP_AUTOMOC ON)
> set_property(SOURCE /path/to/qrc_AnotherFile.cpp PROPERTY SKIP_AUTOMOC ON)
> ```
> 

Would it make sense for qt5_wrap_ui() and qt5_add_resources() to set 
SKIP_AUTOMOC on the ui_* and qrc_* files?

Clint
-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread Sebastian Holtermann
On Dienstag, 26. September 2017 11:04:30 CEST Brad King wrote:
> On 09/26/2017 09:32 AM, clin...@elemtech.com wrote:
> > CMake Warning (dev) in claro/navigation5/CMakeLists.txt:
> >   Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED
> > files. Run "cmake --help-policy CMP0071" for policy details.  Use the
> > cmake_policy command to set the policy and suppress this warning.
> > 
> >   AUTOMOC: Ignoring GENERATED header file(s):
> > 
> > "/path/to/ui_SomeFile.h"
> > "/path/to/qrc_AnotherFile.cpp"
> > 
> > Those ui_* and qrc_* files do not require processing by moc.
> > In this case, I was using qt5_wrap_ui() and qt5_add_resources().
> > 
> > Is there a way to not print out that policy warning
> 
> Clinton, you can set the SKIP_AUTOGEN source file property on them:
> 
>   https://cmake.org/cmake/help/v3.9/prop_sf/SKIP_AUTOGEN.html
> 
> Sebastian, please revise the policy warning to mention the
> alternatives.

"cmake --help-policy CMP0071" already mentions SKIP_AUTOMOC.
Should the warning mention SKIP_AUTOMOC as well?

-Sebastian

-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread Brad King
On 09/26/2017 11:07 AM, Sebastian Holtermann wrote:
>> AUTOMOC: Ignoring GENERATED header file(s):
>>
>> "/path/to/ui_SomeFile.h"
>> "/path/to/qrc_AnotherFile.cpp"
> 
> You can set the source file property SKIP_AUTOMOC on the GENERATED files.

Sebastian, please revise the policy warning to mention the
alternatives.

Thanks,
-Brad
-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread Sebastian Holtermann
> I updated and I'm getting this:
> 
> CMake Warning (dev) in claro/navigation5/CMakeLists.txt:
> Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
> Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy
> command to set the policy and suppress this warning.
> 
> AUTOMOC: Ignoring GENERATED header file(s):
> 
> "/path/to/ui_SomeFile.h"
> "/path/to/qrc_AnotherFile.cpp"
> 
> 
> Those ui_* and qrc_* files do not require processing by moc.
> In this case, I was using qt5_wrap_ui() and qt5_add_resources().
> 
> I did an experiment and replaced qt5_wrap_ui() with autouic, and the warning
> went away for those ui_* files.
> 
> Is there a way to not print out that policy warning on ui_* and qrc_* files
> when using qt5_wrap_ui()/qt5_add_resources()? These are the only file types
> for which I'm getting that warning.

You can set the source file property SKIP_AUTOMOC on the GENERATED files.
See: https://cmake.org/cmake/help/v3.9/prop_sf/SKIP_AUTOMOC.html
See: https://cmake.org/cmake/help/git-master/policy/CMP0071.html

For example like this
```
set_property(SOURCE /path/to/ui_SomeFile.h PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE /path/to/qrc_AnotherFile.cpp PROPERTY SKIP_AUTOMOC ON)
```

-Sebastian

-- 

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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0071

2017-09-26 Thread Brad King
On 09/26/2017 09:32 AM, clin...@elemtech.com wrote:
> CMake Warning (dev) in claro/navigation5/CMakeLists.txt:
>   Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
>   Run "cmake --help-policy CMP0071" for policy details.  Use the cmake_policy
>   command to set the policy and suppress this warning.
> 
>   AUTOMOC: Ignoring GENERATED header file(s):
> 
>     "/path/to/ui_SomeFile.h"
>     "/path/to/qrc_AnotherFile.cpp"
> 
> Those ui_* and qrc_* files do not require processing by moc.
> In this case, I was using qt5_wrap_ui() and qt5_add_resources().
> 
> Is there a way to not print out that policy warning

Clinton, you can set the SKIP_AUTOGEN source file property on them:

  https://cmake.org/cmake/help/v3.9/prop_sf/SKIP_AUTOGEN.html

Sebastian, please revise the policy warning to mention the
alternatives.

Thanks,
-Brad
-- 

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://public.kitware.com/mailman/listinfo/cmake-developers