I am Trying to Build vsomeip from this wiki and it says it needs Boost library, so i made conanfile.txt in my project dir looks like this:
[requires]
boost/1.83.0
[options]
boost/*:without_stacktrace=True #disable this dependency to continue the build
[generators]
CMakeDeps
CMakeToolchain
and installed it in build directory in same project dir, my whole project dir now looks like this :
- build
- capicxx-someip-runtime
- vsomeip
- conanfile.txt
now from inside vsomeip dir, I run
> cmake -Bbuild -DCMAKE_INSTALL_PREFIX=../install_folder
> -DCMAKE_TOOLCHAIN_FILE="../build" -DENABLE_SIGNAL_HANDLING=1 -DDIAGNOSIS_ADDRESS=0x10 .
but i get this error it can't find Boost, do you know why?
> CMake Warning: Ignoring extra path from command line:
>
> "../install_folder"
>
>
> CMake Warning (dev) at CMakeLists.txt:191 (find_package): Policy
> CMP0167 is not set: The FindBoost module is removed. Run "cmake
> --help-policy CMP0167" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
>
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Error at
> C:/Tools/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233
> (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR system
> thread filesystem) (Required is at least version "1.66") Call Stack
> (most recent call first):
> C:/Tools/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603
> (_FPHSA_FAILURE_MESSAGE)
> C:/Tools/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/share/cmake-3.31/Modules/FindBoost.cmake:2423
> (find_package_handle_standard_args) CMakeLists.txt:191
> (find_package)
>
>
> -- Configuring incomplete, errors occurred!
I am Trying to Build vsomeip from this wiki and it says it needs Boost library, so i made conanfile.txt in my project dir looks like this:
[requires]
boost/1.83.0
[options]
boost/*:without_stacktrace=True #disable this dependency to continue the build
[generators]
CMakeDeps
CMakeToolchain
and installed it in build directory in same project dir, my whole project dir now looks like this :
- build
- capicxx-someip-runtime
- vsomeip
- conanfile.txt
now from inside vsomeip dir, I run
> cmake -Bbuild -DCMAKE_INSTALL_PREFIX=../install_folder
> -DCMAKE_TOOLCHAIN_FILE="../build" -DENABLE_SIGNAL_HANDLING=1 -DDIAGNOSIS_ADDRESS=0x10 .
but i get this error it can't find Boost, do you know why?
> CMake Warning: Ignoring extra path from command line:
>
> "../install_folder"
>
>
> CMake Warning (dev) at CMakeLists.txt:191 (find_package): Policy
> CMP0167 is not set: The FindBoost module is removed. Run "cmake
> --help-policy CMP0167" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
>
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Error at
> C:/Tools/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233
> (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR system
> thread filesystem) (Required is at least version "1.66") Call Stack
> (most recent call first):
> C:/Tools/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603
> (_FPHSA_FAILURE_MESSAGE)
> C:/Tools/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/share/cmake-3.31/Modules/FindBoost.cmake:2423
> (find_package_handle_standard_args) CMakeLists.txt:191
> (find_package)
>
>
> -- Configuring incomplete, errors occurred!
Share
Improve this question
edited Mar 8 at 1:56
3CxEZiVlQ
39.5k11 gold badges84 silver badges93 bronze badges
asked Mar 7 at 23:55
mr.Arrowmr.Arrow
877 bronze badges
2
|
1 Answer
Reset to default 2The problem was This warning means that CMake's built-in FindBoost
module has been removed, and find_package(Boost REQUIRED)
no longer works unless you use the new CMake package management approach.
In CMakeLists.txt of vsomeip, before calling find_package(Boost REQUIRED)
, I added cmake_policy(SET CMP0167 NEW)
it worked.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744906887a4600312.html
cmake
. CMake warns you that it ignores value ofCMAKE_INSTALL_PREFIX
. And I guess CMake absolutely ignores the second line, including a toolchain specification. As far as I understand Conan, exactly specific toolchain helps CMake to find packages installed by Conan. Doesbuild
is the actual name of your toolchain file? This is misleading name. Normally, CMake a toolchain file name has.cmake
extension (because it is actually a CMake script). – Tsyvarev Commented Mar 8 at 8:40