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

The build instructions build Debug by default but install looks for Release #101

Open
TayyabJaved opened this issue Aug 7, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@TayyabJaved
Copy link

TayyabJaved commented Aug 7, 2024

Running these instructions created a Debug build

git clone https://github.com/lfreist/hwinfo && cd hwinfo
mkdir build
cmake -B build && cmake --build build
cmake --install build

However, the install command is looking for it in Release

CMake Error at build/src/cmake_install.cmake:51 (file):
  file INSTALL cannot find
  ".../hwinfo/build/lib/Release/hwinfo_battery.lib":
  No error.
Call Stack (most recent call first):
@lfreist lfreist added bug Something isn't working good first issue Good for newcomers labels Aug 7, 2024
@keineahnung2345
Copy link
Contributor

From src/cmake_install.cmake:

# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
  if(BUILD_TYPE)
    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
  else()
    set(CMAKE_INSTALL_CONFIG_NAME "Release")
  endif()
  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()

It seems when installing, BUILD_TYPE must be specified, otherwise it will default use Release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants