Author Topic: Debugging projects with some foreign CMakeLists.txt inside  (Read 3509 times)

Offline Дмитро

  • Multiple posting newcomer
  • *
  • Posts: 107
Debugging projects with some foreign CMakeLists.txt inside
« 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!
 :)

Offline cacb

  • Lives here!
  • ****
  • Posts: 538
Re: Debugging projects with some foreign CMakeLists.txt inside
« Reply #1 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...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugging projects with some foreign CMakeLists.txt inside
« Reply #2 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. :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]