Я пробовал < /p>
Следуйте ошибке (изменилось на оба: C: \ Program Files \ boost \ boost_1_87_0 \ tools \ boost_install и c: \ Program \ boost \ boost_1_87_0 \ Files \ Boost \ Boost_1_87_0 \ Tools \ Cmake \ config): файл MIDIES, который не отображается на моем компьютере (поиск по evrything) < /li>
Установлен BOOST_ROOT: Нет результата < /li>
Установлен BOOST_DIR: нет результата < /li>
< /ol>
Код: Выделить всё
cmake_minimum_required (VERSION 4.0)
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$")
endif()
project ("OSLab2")
add_subdirectory(src/main)
set(CXX_STANDARD 98)
# set(BOOST_ROOT "C:\\Program Files\\boost\\boost_1_87_0\\tools\\boost_install")
set(Boost_DEBUG ON)
# set(Boost_DIR "C:\\Program\ Files\\boost\\boost_1_87_0")
# set(Boost_DIR "C:\\Program Files\\boost\\boost_1_87_0\\tools\\cmake\\config")
# set(Boost_DIR "C:\\Program Files\\boost\\boost_1_87_0\\tools\\boost_install")
find_package(Boost REQUIRED COMPONENTS lambda)
include_directories(${Boost_INCLUDE_DIRS})
# sets install default path to current repository
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}")
set(BIN_PATH bin)
install(TARGETS DESTINATION ${BIN_PATH}) # P.S. install dir do not work
< /code>
Вывод консоли < /p>
[main] Configuring project: OSLab2
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_INSTALL_PREFIX=C:/Users/Ilya/work/OS/OSLab2/bin -SC:/Users/Ilya/work/OS/OSLab2 -BC:/Users/Ilya/work/OS/OSLab2/build -G Ninja
[cmake] -- The C compiler identification is MSVC 19.43.34808.0
[cmake] -- The CXX compiler identification is MSVC 19.43.34808.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] CMake Error at CMakeLists.txt:27 (find_package):
[cmake] By not providing "FindBoost.cmake" in CMAKE_MODULE_PATH this project has
[cmake] asked CMake to find a package configuration file provided by "Boost", but
[cmake] CMake did not find one.
[cmake]
[cmake] Could not find a package configuration file provided by "Boost" with any of
[cmake] the following names:
[cmake]
[cmake] BoostConfig.cmake
[cmake] boost-config.cmake
[cmake]
[cmake] Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set
[cmake] "Boost_DIR" to a directory containing one of the above files. If "Boost"
[cmake] provides a separate development package or SDK, be sure it has been
[cmake] installed.
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_INSTALL_PREFIX=C:/Users/Ilya/work/OS/OSLab2/bin -SC:/Users/Ilya/work/OS/OSLab2 -BC:/Users/Ilya/work/OS/OSLab2/build -G Ninja exited with code: 1
Подробнее здесь: https://stackoverflow.com/questions/795 ... any-of-cma