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

Broken CMake configuration #295

Closed
akallabeth opened this issue Sep 26, 2023 · 2 comments
Closed

Broken CMake configuration #295

akallabeth opened this issue Sep 26, 2023 · 2 comments
Assignees
Labels

Comments

@akallabeth
Copy link
Contributor

Describe the bug

CMake is not able to install libcbor due to a bug in the configuration

To Reproduce

  1. cmake -GNinja -Bxxx -S. -DCMAKE_INSTALL_PREFIX=/tmp/cbor
  2. cmake --build xxx/ --target install
  3. watch the install step failing

Expected behavior

A properly installed libcbor under /tmp/cbor/

Environment

current master
all os tested so far (mac os 14, debian 12, windows 10)

@PJK
Copy link
Owner

PJK commented Sep 26, 2023

This is not actionable. Can you please provide the exact environment description and logs?

@akallabeth
Copy link
Contributor Author

@PJK ok, figured out what was going on.

option(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "cmake --build --target install does not depend on cmake --build" true)
is what causes this.
reading through https://cmake.org/cmake/help/latest/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.html tells me that is what you desired with that change?

so, to sum up:
with CMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON you need to run:

  1. cmake -GNinja -Bxxx -S. -DCMAKE_INSTALL_PREFIX=/tmp/cbor
  2. cmake --build xxx
  3. cmake --install xxx or cmake --build xxx --target install

whereas with

  1. cmake -GNinja -Bxxx -S. -DCMAKE_INSTALL_PREFIX=/tmp/cbor -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=OFF
  2. cmake --build xxx --target install

suffices.

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

No branches or pull requests

2 participants