Skip to content

Can not install CppUnit target #4398

@stkw0

Description

@stkw0

Describe the bug
I was packaging Poco 1.13.0 (pre-release) and found an error when installing the library (with ENABLE_TESTS=On).

CMake Error at CppUnit/cmake_install.cmake:46 (file):
  file INSTALL cannot find
  "/var/tmp/portage/dev-libs/poco-1.13.0/work/poco-poco-1.13.0-release/CppUnit/include/Poco":
  No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:66 (include)

Note that this error does not happen if ENABLE_TESTS is switched off.

To Reproduce
Configure with ENABLE_TESTS=On && ninja install

Expected behavior
Install the project correctly without installing CppUnit files (or having an easy option to disable the installation of CppUnit files).

Logs

ninja -v -j14 -l16 install
[0/1] cd /var/tmp/portage/dev-libs/poco-1.13.0/work/poco-poco-1.13.0-release_build && /usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "RelWithDebInfo"
-- Installing: /var/tmp/portage/dev-libs/poco-1.13.0/image/usr/lib64/cmake/Poco/PocoConfig.cmake
-- Installing: /var/tmp/portage/dev-libs/poco-1.13.0/image/usr/lib64/cmake/Poco/PocoConfigVersion.cmake
-- Installing: /var/tmp/portage/dev-libs/poco-1.13.0/image/usr/lib64/cmake/Poco/FindPCRE2.cmake
-- Installing: /var/tmp/portage/dev-libs/poco-1.13.0/image/usr/lib64/cmake/Poco/V39/FindEXPAT.cmake
-- Installing: /var/tmp/portage/dev-libs/poco-1.13.0/image/usr/lib64/cmake/Poco/V313/FindSQLite3.cmake
CMake Error at CppUnit/cmake_install.cmake:46 (file):
  file INSTALL cannot find
  "/var/tmp/portage/dev-libs/poco-1.13.0/work/poco-poco-1.13.0-release/CppUnit/include/Poco":
  No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:66 (include)

Please add relevant environment information:

  • Linux 6.6.6 (Gentoo)
  • Poco 1.13.0

Additional context
Seems that the bug was introduced with 81d7307 with the next two lines. To be honest I didn't understand why it was needed to install a target only used for testing.

POCO_INSTALL(CppUnit)
POCO_GENERATE_PACKAGE(CppUnit)

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions