Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Дмитро on February 25, 2020, 02:39:30 pm

Title: Debugging projects with some foreign CMakeLists.txt inside
Post by: Дмитро on February 25, 2020, 02:39:30 pm
Good and good to all the time of day and a good season of the year!
I downloaded a program that contains many different CMakeLists.txt inside, this program successfully into a project for Code :: Blocks, and it compiled very well, and programs and libraries were formed, with extensions including example.exe and many other different.exe, and besides some libgame.dll, others different .dll, libgame.a, other .a, in a word it’s good.
But now I want to debug, and I really don’t know, I don’t understand. Here is what writes for me: The selected target is only running pre / post build step commands
Can't debug such a target ...
And here below: Active debugger config: GDB / CDB debugger: Default
Building to ensure sources are up-to-date
Selecting target:
aborted

I do not know what to do.


Moreover, when debugging for some projects, I sometimes want to be able to set parameters on the command line, for example like this mainrar.exe -x -9 example_0_1.txt. But execute in the debugger.
Yesterday, I googled for two hours, then Yandex, various other search engines on the Internet .... There wasn’t! Teach me, help me! Be kind!
 :)
Title: Re: Debugging projects with some foreign CMakeLists.txt inside
Post by: cacb on February 25, 2020, 03:42:49 pm
Moreover, when debugging for some projects, I sometimes want to be able to set parameters on the command line, for example like this mainrar.exe -x -9 example_0_1.txt. But execute in the debugger.
Yesterday, I googled for two hours, then Yandex, various other search engines on the Internet .... There wasn’t! Teach me, help me! Be kind!
 :)

I can't answer the CMake related questions, but for setting parameters on command line for debugging, see
Project -> Set Programs' arguments...
Title: Re: Debugging projects with some foreign CMakeLists.txt inside
Post by: oBFusCATed on February 26, 2020, 08:26:10 pm
What is the selected target?
My guess is that it is all or install.
There is a chance that it will work if you select the target for the executable.
This is an area of the cmake integration I'm not really sure how to handle well. :(