Cmake set variables, like I can do with the cmake-gui ?
I have a project that works with CMakeLists.txt
I can use cmake-gui to configure and generate an .sln project, but I needed to edit some of the variables.
I'm now trying to open the CMake project in CLion, but I don't know how to set the variables. I tried to add various formats to the build options, but all failed with the same error message. The options I tried to use:
1. -DBOOST_INCLUDE_DIR:STRING=D:\local\boost_1_72_0
2. -- -DBOOST_INCLUDE_DIR:STRING=D:\local\boost_1_72_0
3. -- BOOST_INCLUDE_DIR:STRING=D:\local\boost_1_72_0
4. -- -DBOOST_INCLUDE_DIR:STRING=D:\local\boost_1_72_0
The error message:
CMake Error at C:/Program Files/JetBrains/CLion 2020.3.2/bin/cmake/win/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find Boost (missing: Boost_INCLUDE_DIR system filesystem thread
program_options iostreams regex) (Required is at least version "1.66")
请先登录再写评论。
Hello!
You need to add such options as -DBOOST_INCLUDE_DIR:STRING=D:\local\boost_1_72_0 to File | Settings | Build, Execution, Deployment | CMake > CMake options.
Hey Anna,
as you can see this is actually the first option I tried. Unfortunately, that did not work and I still got the same error.
Any news?
It's been over a month. Currently CLIon can't be used due to this.
@... sorry for the delay in response. In what field did you specify these options? Your original post states "the build options", but the options should be specified in the "CMake options" field, not the "Build options" field.