FreeCAD debug build with apeltauer's libpack builds release instead
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: FreeCAD debug build with apeltauer's libpack builds release instead
too many cons if your not already using vs...
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: FreeCAD debug build with apeltauer's libpack builds release instead
For me, that's simply:
* I'm familiar with Qt creator, I've been using it from the start
* FreeCAD's GUI is Qt, so it kinda makes sense to pick Qt Creator, as I would expect it to be better tuned to Qt development. Although I can't say I feel many advantages, apart from built-in .ui editor, maybe because I never actually compared the two.
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: FreeCAD debug build with apeltauer's libpack builds release instead
Today I found out a possible clue, when looking across FreeCAD_trunk.cbp.
Only FreeCADGui entries have that enforced release. No other targets.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6"/>
<Project>
<Build>
...
<Target title="FreeCADGui">
...
<Compiler>
...
<Add option="-DCMAKE_BUILD_TYPE="Release""/>
...
</Compiler>
...
</Target>
<Target title="FreeCADGui/fast">
...
<Compiler>
...
<Add option="-DCMAKE_BUILD_TYPE="Release""/>
...
</Compiler>
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: FreeCAD debug build with apeltauer's libpack builds release instead
Not so fast! I can watch how the execution goes, but I get no variable inspection capability. And the debugger freezes sometimes, forcing me to terminate qt creator.
Re: FreeCAD debug build with apeltauer's libpack builds release instead
That comes from src/Gui/CMakeLists.txt:Only FreeCADGui entries have that enforced release. No other targets.
Code: Select all
IF(CMAKE_BUILD_TYPE)
add_definitions(-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}")
ENDIF(CMAKE_BUILD_TYPE)
But nevertheless it's strange that the variable is set to "Release" in your case. But are you sure you looked in the correct build directory? For every build directory QtCreator creates the file FreeCAD_trunk.cbp.
On my system I have four different build directories for QtCreator and for the two where a debug version is built CMAKE_BUILD_TYPE is correctly set to Debug.
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: FreeCAD debug build with apeltauer's libpack builds release instead
Well, I'm kinda sure... even though I have created quite a few build directories, all builds were supposed to be debug and turned out to be release. I think I will delete all build directories and redo it from scratch yet again, just to verify... but later...
Re: FreeCAD debug build with apeltauer's libpack builds release instead
That's an issue that I discovered yesterday too with the new LibPack. It's caused by the Shiboken2Config.cmake file where a line is added that explicitly sets CMAKE_BUILD_TYPE to Release. But just removing this line is not an option because otherwise for some reason CMake configure fails when creating VS project files because for this generator CMAKE_BUILD_TYPE isn't defined.
So, I pushed a workaround that saves & restores CMAKE_BUILD_TYPE when doing the Shiboken2 check. git commit cc59222aa0
Actually you encounter this issue only when using nmake, jom or ninja because these are generators that rely on the existence of CMAKE_BUILD_TYPE while when creating regular VS projects you won't see the problem.
Off-topic:
It's also possible to use msbuild instead of jom or ninja. See: https://forum.qt.io/topic/91565/using-m ... -qtcreator
I recently installed QtCreator 4.9.2 and the default CMake generator is set to ninja. Obviously it handles parallel builds (i.e. it spawns several cl.exe processes) but a single build takes ages. So, I am testing msbuild right now and just for fun wanted to see if it can be used directly within QtCreator.