fstl-app / fstl

A fast STL file viewer
449 stars 105 forks source link

Warning When Configuring on Windows 10 with CMake 3.10.2 #27

Closed DeveloperPaul123 closed 6 years ago

DeveloperPaul123 commented 6 years ago

When configuring on windows 10 using the latest version of CMake (3.10.2) a warning is thrown because of the having CMAKE_AUTOMOC and CMAKE_AUTOUIC to on without explicitly setting the CMake policy CMP0071:

image

We can fix this multiple ways:

  1. Explicitly set CMP0071
  2. Turn CMAKE_AUTOMOC and CMAKE_AUTOUIC off and instead use qt5_wrap_cpp and qt5_wrap_ui.

@mkeeter What are your thoughts?

mkeeter commented 6 years ago

Usually, when I run into these issues, I set whatever CMake policy they're asking for (cmake_policy(SET CMP0071 NEW) in this case).

If that doesn't break anything in your build, it's the simplest solution.

DeveloperPaul123 commented 6 years ago

@mkeeter According to the warning, setting that policy to NEW means those files will be processed by automoc and autouic. We don't want this right since those files are generated by qt5_wrap_qrc, right?