Compilation log cleansing

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
xtemp09
Posts: 72
Joined: Tue Jul 12, 2022 2:16 pm

Compilation log cleansing

Post by xtemp09 »

Dear developers,

The compilation log is filled with warnings about deprecation of std::iterator. This happens because the legacy code of SMESH is compiled with modern C++ compilers that know that std::iterator is marked as deprecated feature.

I propose:
  • to add set(CXX_STANDARD 14) to src/3rdParty/salomesmesh/CMakeLists.txt to purge the compilation log of 2600 lines (≈99.9%) of warnings.
Of course, CMAKE_CXX_STANDARD can be added somewhere else or other options can be used.

What do you think?
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compilation log cleansing

Post by wmayer »

Sure! Can you please create a PR because obviously other developers don't get these warnings with a C++17 compiler.
xtemp09
Posts: 72
Joined: Tue Jul 12, 2022 2:16 pm

Re: Compilation log cleansing

Post by xtemp09 »

Actually, if you take a look at any PR, every CMake Build is filled with these messages. For example, here.
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compilation log cleansing

Post by wmayer »

Thanks for the pointer. I have a Xubuntu 22.04 and I neither get these warnings with clang nor with gcc. But good to know that they appear on the CI builds.
xtemp09
Posts: 72
Joined: Tue Jul 12, 2022 2:16 pm

Re: Compilation log cleansing

Post by xtemp09 »

Yes, seems like this is present only in the CI. I'm compiling, but I don't see this warning either. Whom should I address with this issue?
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Compilation log cleansing

Post by openBrain »

wmayer wrote: Wed Feb 08, 2023 1:50 pm Thanks for the pointer. I have a Xubuntu 22.04 and I neither get these warnings with clang nor with gcc. But good to know that they appear on the CI builds.
What libstdc++ version do you have ? These warnings come with v12, and IIRC 22.04 provides v11 by default. ;)
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compilation log cleansing

Post by wmayer »

The packages that are installed:
Package: libstdc++6 in version: 12.1.0-2ubuntu1~22.04
Package: libstdc++-11-dev in version: 11.3.0-1ubuntu1~22.04
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compilation log cleansing

Post by wmayer »

xtemp09 wrote: Wed Feb 08, 2023 3:07 pm Yes, seems like this is present only in the CI. I'm compiling, but I don't see this warning either. Whom should I address with this issue?
Don't worry I can do it.
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compilation log cleansing

Post by wmayer »

https://github.com/FreeCAD/FreeCAD/pull/8408

Instead of forcing C++14 for smesh I fixed the problem directly as otherwise the warnings would still appear for the Fem and MeshPart modules.
xtemp09
Posts: 72
Joined: Tue Jul 12, 2022 2:16 pm

Re: Compilation log cleansing

Post by xtemp09 »

Brilliant. Now the warnings are visible.
Post Reply