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

find_package fails in version 4.0.2 with #1743

Open
HinrichAue opened this issue Jan 18, 2023 · 2 comments
Open

find_package fails in version 4.0.2 with #1743

HinrichAue opened this issue Jan 18, 2023 · 2 comments

Comments

@HinrichAue
Copy link

using Ubuntu 22.04.1 LTS
when executing
cmake .

I get:

CMake Error at /usr/lib/x86_64-linux-gnu/CppUTest/cmake/CppUTestConfig.cmake:11 (message):
  File or directory /usr/lib/include referenced by variable
  CppUTest_INCLUDE_DIRS does not exist !
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/CppUTest/cmake/CppUTestConfig.cmake:27 (set_and_check)
  CMakeLists.txt:5 (find_package)

fetching CppuTest with Fetch_Content works, but it looks like this particular version is broken

the CmakeLists.txt:

cmake_minimum_required(VERSION 3.16.0)

project(CmakePlayGround)

find_package(CppUTest REQUIRED)

add_library(cpputest main.cpp)
@thetic
Copy link
Contributor

thetic commented Jan 19, 2023

I believe this is a duplicate of #1563 and #1639.

See https://bugs.launchpad.net/ubuntu/+source/cpputest/+bug/1990274.

@LeStahL
Copy link

LeStahL commented May 2, 2023

I observe this problem after building master (at 34f8c45) on windows using CMake (cmake version 3.26.0-rc2) and CLang (clang version 15.0.6 Target: x86_64-pc-windows-msvc). I built the install target of cpputest. The resulting CppUTestConfig.cmake incorrectly searches CppUTest_INCLUDE_DIRS one folder above the source folder, while I would expect it to search for the includes inside the install folder.

Error log when using said CppUTestConfig.cmake:

CMake Error at [...]/code/cpputest/build/install/CppUTestConfig.cmake:11 (message):
  File or directory [...]/code/include referenced by
  variable CppUTest_INCLUDE_DIRS does not exist !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants