"Professional CMake" book suggest the following:
"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."
Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
* Add test causing crash and fix map sorting function.
When opening a model from FreeCAD 0.7, the model would crash when I
changed some of the parameters. This turned out to be due to the
ElementNameComparator::operator() not correctly sorting the items going
into the map, which caused the map to be invalid.
This change adds a test that represented the exact names causing the
crash as well as a fix for the problem. Names are now sorted:
1. Empty names first
2. Identifier based names second.
3. Hex based names last.
Identifiers are sorted lexicographically for the name portion and
numerically for the number portion, smallest to largest.
Hex based names are sorted by the value of the hex number, smallest to
largest.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix lint issues.
* Add another test form to the mix.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This is the original code from the Toponaming branch, modified slightly to update the
method name and correct some grammatical errors in the descriptive comment.
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>