Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

CMake Error #19

Open
Kendidi opened this issue Dec 5, 2023 · 1 comment
Open

CMake Error #19

Kendidi opened this issue Dec 5, 2023 · 1 comment

Comments

@Kendidi
Copy link

Kendidi commented Dec 5, 2023

I took the following steps trying to build the mctpd package:

mkdir build
cd build
cmake -DBUILD_STANDALONE=ON -DMCTPD_BUILD_UT=ON ../
make

But it failed with the following messages:

gmake[2]: *** [CMakeFiles/Boost.dir/build.make:86: Boost-prefix/src/Boost-stamp/Boost-build] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/Boost.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
-- Found Boost: /home/aie/SK/Intel-BMC/mctpd/build/libs/boost/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.71")  
CMake Error at CMakeLists.txt:159 (find_package):
  Could not find a package configuration file provided by "GTest" with any of
  the following names:

    GTestConfig.cmake
    gtest-config.cmake

  Add the installation prefix of "GTest" to CMAKE_PREFIX_PATH or set
  "GTest_DIR" to a directory containing one of the above files.  If "GTest"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/home/aie/SK/Intel-BMC/mctpd/build/CMakeFiles/CMakeOutput.log".

What is missing? How to fix it? Please advise! Thanks.

@Kendidi
Copy link
Author

Kendidi commented Dec 5, 2023

I installed GTest and GMock and now:

gmake[2]: *** [CMakeFiles/Boost.dir/build.make:86: Boost-prefix/src/Boost-stamp/Boost-build] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/Boost.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
-- Configuring done
CMake Error at CMakeLists.txt:155 (add_executable):
  Target "test-mctpd" links to target "GTest::gmock" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

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

No branches or pull requests

1 participant