Is there a possibility to debug CMakeLists.txt
files (at least listing of variables) except for the message statement?
You can also start a debug session from Solution Explorer. First, switch to CMake Targets View in the Solution Explorer window. Then, right-click on an executable and select Debug. This command automatically starts debugging the selected target based on your active configuration.
CMakeLists. txt file contains a set of directives and instructions describing the project's source files and targets (executable, library, or both). When you create a new project, CLion generates CMakeLists. txt file automatically and places it in the project root directory.
CMakeLists. txt is placed at the root of the source tree of any application, library it will work for. If there are multiple modules, and each module can be compiled and built separately, CMakeLists. txt can be inserted into the sub folder.
However, to comment several lines at once, select the required lines and hit CTRL + Q . If the file is a . txt file (e.g. CMakeLists. txt), you can either set Notepad++ to always treat .
There is no interactive debugger for CMake, however there are also the flags -Wdev
, --debug-output
and --trace
which might help. Also remember to check the log files CMakeFiles\CMakeOutput.log
and CMakeFiles\CMakeError.log
which mainly collect outputs of processes called by CMake (for example while checking for presence of a type or header).
Since version 3.7, CMake now officially supports a "server mode" so integration in IDEs is likely to improve in the near future. Initial support exists both in Qt Creator and Visual Studio 2017 RC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With