Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake warnings around CPM, nlopt, ... #3900

Open
gzotti opened this issue Sep 17, 2024 · 8 comments
Open

CMake warnings around CPM, nlopt, ... #3900

gzotti opened this issue Sep 17, 2024 · 8 comments
Labels
dependencies dependencies (such like ShowMySky, QXlsx, etc.) related issues infrastructure Infrastructure related issues

Comments

@gzotti
Copy link
Member

gzotti commented Sep 17, 2024

Expected Behaviour

CMake sets up the project without warnings

Actual Behaviour

CMake reports various warnings. (Where) Can these be mitigated, or should it be reported to nlopt ?

-- Found CMake 3.24.2
-- Platform: Windows-10.0.22631 (AMD64)
-- Found Git 2.46.0.windows.1
-- Building Stellarium 24.2+ (v24.2.261; Mode: Release)
-- Found Stellarium User Guide
-- Found Qt6: C:/Qt/6.5.3/msvc2019_64/bin/qmake.exe (found suitable version 6.5.3)
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Building an OpenGL/OpenGL ES build
-- CPM: Using local package ShowMySky-Qt6@
-- Found ShowMySky library: D:/StelDev/GIT/build-stellarium-Desktop_Qt_6_5_3_MSVC2019_64bit-Release/_deps/showmysky-qt6-build/ShowMySky/ShowMySky-Qt6.dll
-- GPS: support by Qt's NMEA handling enabled.
-- Unit tests support: disabled
-- Using bundled zlib version at D:/StelDev/GIT/stellarium/src/external/zlib
-- Using bundled qtcompress at D:/StelDev/GIT/stellarium/src/external/qtcompress
-- Found windeployqt: C:/Qt/6.5.3/msvc2019_64/bin/windeployqt.exe
-- Found Spout library: D:/StelDev/GIT/stellarium/util/spout2/x64/SpoutLibrary.dll
-- Could NOT find Inno Setup compiler. You won't be able to build setup files.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Checking that std::from_chars for floats is supported by the C++ library
-- Checking that std::from_chars for floats is supported by the C++ library - yes
-- Checking that std::execution::par is supported by the C++ library
-- Checking that std::execution::par is supported by the C++ library - yes
-- CPM: Adding package [email protected] (1.8.5)
CMake Warning at plugins/LensDistortionEstimator/src/CMakeLists.txt:1 (FIND_PACKAGE):
By not providing "Findexiv2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "exiv2", but
CMake did not find one.

Could not find a package configuration file provided by "exiv2" with any of
the following names:

exiv2Config.cmake
exiv2-config.cmake

Add the installation prefix of "exiv2" to CMAKE_PREFIX_PATH or set
"exiv2_DIR" to a directory containing one of the above files. If "exiv2"
provides a separate development package or SDK, be sure it has been
installed.

-- CPM: Adding package [email protected] (2.7.1)
-- NLopt version 2.7.1
CMake Warning at C:/Qt/Tools/CMake_64/share/cmake-3.24/Modules/CPack.cmake:478 (message):
CPack.cmake has already been included!!
Call Stack (most recent call first):
D:/StelDev/GIT/build-stellarium-Desktop_Qt_6_5_3_MSVC2019_64bit-Release/_deps/nlopt-src/CMakeLists.txt:353 (include)

-- Found lupdate: C:/Qt/6.5.3/msvc2019_64/bin/lupdate.exe
-- Found lconvert: C:/Qt/6.5.3/msvc2019_64/bin/lconvert.exe
-- Configuring done
CMake Warning (dev) in D:/StelDev/GIT/build-stellarium-Desktop_Qt_6_5_3_MSVC2019_64bit-Release/_deps/nlopt-src/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.

For compatibility, CMake is excluding the GENERATED source file(s):

"D:/StelDev/GIT/build-stellarium-Desktop_Qt_6_5_3_MSVC2019_64bit-Release/_deps/nlopt-build/nlopt.hpp"

from processing by AUTOMOC and AUTOUIC. If any of the files should be
processed, set CMP0071 to NEW. If any of the files should not be
processed, explicitly exclude them by setting the source file property
SKIP_AUTOGEN:

set_property(SOURCE file.h PROPERTY SKIP_AUTOGEN ON)

This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: D:/StelDev/GIT/build-stellarium-Desktop_Qt_6_5_3_MSVC2019_64bit-Release

Steps to reproduce

Run cmake on master

System

  • Stellarium version: master, seen a few days ago
  • Operating system: Win11
  • Graphics Card: irrelevant.
@gzotti gzotti added infrastructure Infrastructure related issues dependencies dependencies (such like ShowMySky, QXlsx, etc.) related issues labels Sep 17, 2024
@10110111
Copy link
Contributor

The policy can be set in our CMakeLists. And the repeated inclusion of CPack I suppose needs a special support from the NLopt (e.g. an option to disable it, so that the package is more easily usable with CPM).

@alex-w
Copy link
Member

alex-w commented Sep 18, 2024

Hmm… but we set policy CMP0071 in our cmake file already…

@alex-w
Copy link
Member

alex-w commented Sep 18, 2024

@10110111 what about adding an option QUIET for FIND_PACKAGE(exiv2) - is it acceptable for you?

@10110111
Copy link
Contributor

what about adding an option QUIET for FIND_PACKAGE(exiv2) - is it acceptable for you?

No, lacking exiv2 implies lacking a piece of functionality of the plugin. It's better to be vocal about this.

@gzotti
Copy link
Member Author

gzotti commented Sep 18, 2024

Hmm… but we set policy CMP0071 in our cmake file already…

As I understand this is in one of CPM's packages, so not sure if we should patch this or report an issue upstream.

@alex-w
Copy link
Member

alex-w commented Sep 18, 2024

what about adding an option QUIET for FIND_PACKAGE(exiv2) - is it acceptable for you?

No, lacking exiv2 implies lacking a piece of functionality of the plugin. It's better to be vocal about this.

Please check branch cmake-exiv2

@alex-w
Copy link
Member

alex-w commented Sep 18, 2024

A small addition: adding ShowMySky via CPM generates warnings for cmake policy too

@10110111
Copy link
Contributor

Please check branch cmake-exiv2

No, this still doesn't stand out well enough. Missing desired library is an ugly situation, it should be reflected by an ugly message, as it is now in master.

As I understand this is in one of CPM's packages, so not sure if we should patch this or report an issue upstream.

Surely generally it's a thing for upstream to solve. I just thought CMake would let our choice be inherited by CMakeLists included... Anyway, I don't expect it to get into the nearest Stellarium release, even if the maintainers do apply the patch immediately (unless you want to refer to unreleased revisions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies dependencies (such like ShowMySky, QXlsx, etc.) related issues infrastructure Infrastructure related issues
Development

No branches or pull requests

3 participants