QA: other One or more CMake variables were not used by the project: DISABLE_STATIC LONG_OUTPUT_NAMES ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0_libressl_20180623-161904 -------------------------------------------------------------------
> One or more CMake variables were not used by the project: > DISABLE_STATIC > LONG_OUTPUT_NAMES I think this is a very misleading warning. Both variables are used in CMakeLists (via add_subdirectory) and and affect installation. - DISABLE_STATIC adds static library installation. - LONG_OUTPUT_NAMES changes file names when package is installed. +kde@ (cmake maintainer) to check if ift's an intended behaviour of 'add_subdirectory()' +dev-portage@ (portage maintanier) to evaluate if it's ok to have QA check with such false positive (if it's indeed a false positive) Thanks!
I see those variables used as ifdefs inside CMakeLists.txt, but nowhere defined as option variable.
(In reply to Andreas Sturmlechner from comment #2) > I see those variables used as ifdefs inside CMakeLists.txt, but nowhere > defined as option variable. Oh, that makes sense. Can cmake's warning message be fixed or extended to hint at expected way of declaring the available options?
Everything is possible; the question is if upstream cmake is going to hear you. This is really trivial though, in root CMakeLists.txt, usually somewhere below include macros: option(DISABLE_STATIC "Disable static library installation" ON) option(LONG_OUTPUT_NAMES "Long output names(?)" ON)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccc69bc760de2a0cba00f6123349dc4f380b4abb commit ccc69bc760de2a0cba00f6123349dc4f380b4abb Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-07-03 21:51:16 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-07-03 21:51:53 +0000 dev-lang/squirrel: declare used CMake variables, bug #659880 portage's QA check complains: > One or more CMake variables were not used by the project: > DISABLE_STATIC > LONG_OUTPUT_NAMES The warning is misleading. Variables are used but not declared as 'options()'s. This change tweaks the declaration. Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/659880 Package-Manager: Portage-2.3.41, Repoman-2.3.9 dev-lang/squirrel/files/squirrel-3.1-declare-options.patch | 10 ++++++++++ dev-lang/squirrel/squirrel-3.1.ebuild | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-)
This message is coming from CMake: > CMake Warning: > Manually-specified variables were not used by the project: > > DISABLE_STATIC > LONG_OUTPUT_NAMES
Proposed change to squirrel upstream as: https://github.com/albertodemichelis/squirrel/pull/143
(In reply to Andreas Sturmlechner from comment #6) > This message is coming from CMake: > > > CMake Warning: > > Manually-specified variables were not used by the project: > > > > DISABLE_STATIC > > LONG_OUTPUT_NAMES While it comes from cmake it's portage's decision to convert it to eqawarn: https://gitweb.gentoo.org/proj/portage.git/tree/bin/install-qa-check.d/90cmake-warnings#n12
It is a CMake issue (https://gitlab.kitware.com/cmake/cmake/issues/18152), triggered by unusual use of these variables in squirrel (https://github.com/albertodemichelis/squirrel/pull/144). Keeping this as a QA issue is a good idea IMHO.
Eike noticed i've messed up STATIC_LIBS handling. Reopening until it's fixed.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91f2886698abf49373ce68c5a9bbd655cfa8b5c1 commit 91f2886698abf49373ce68c5a9bbd655cfa8b5c1 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-07-04 21:10:12 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-07-04 21:12:45 +0000 Revert "dev-lang/squirrel: declare used CMake variables, bug #659880" This reverts commit ccc69bc760de2a0cba00f6123349dc4f380b4abb. Eike noticed i've messed up STATIC_LIBS variable handling and static libs are not installed at all. Bug: https://bugs.gentoo.org/659880 dev-lang/squirrel/files/squirrel-3.1-declare-options.patch | 10 ---------- dev-lang/squirrel/squirrel-3.1.ebuild | 6 +----- 2 files changed, 1 insertion(+), 15 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89641f00c8624e7b6d8a4d444a447b05ba166ce5 commit 89641f00c8624e7b6d8a4d444a447b05ba166ce5 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-07-05 18:11:26 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-07-05 18:11:26 +0000 dev-lang/squirrel: grab 3.1_p20200612 release snapshot Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/659880 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-lang/squirrel/Manifest | 1 + dev-lang/squirrel/squirrel-3.1_p20200612.ebuild | 42 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+)