* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.
If an in-tree build was done on Linux, it would install
both the configured kicad.appdata.xml file and the template
kicad.appdata.xml.in file. This breaks packaging, and is not
needed.
CHANGED: Update the Linux appdata file to include new tags
* Include version tags (and others) in the appdata file
* Refactor the version string generation to clean it up
Remove not used files:
- markdown2html is not used (we are using "Sundown" tool)
- newstroke_font_without_CJK.cpp is removed.
Due to code optimization the full font works fine without memory issues
-fix also a few very minor compil warnings
It allow using the previous font set without CJK.
The new font (with CJK) is very large (10x), and can create (on Opengl) out of memory issues
with some graphic cards.
Our coroutine system can make debugging memory issues harder by not
following a standard stack allocation system. We can get around this by
using valgrind's built-in stack instrumentation. Each coroutine
registers a stack allocation allowing memcheck to recognize when
accesses are bounded.
KICAD_STDLIB_DEBUG option generate intrusive tests and asserts, and on Windows, generate crashed not captured by GDB.
KICAD_STDLIB_LIGHT_DEBUG generate less intrusive tests and asserts.
it adds only -Wp,-D_GLIBCXX_ASSERTIONS and that generate less asserts.
Add also the new build options in dialog about.
This adds std library assertions and address sanitizer options.
They are not yet enabled by default for debug builds as they are not
compatible with our inline assembler
Defines:
- inhibit generation of #pragma comment(lib, ...) from boost
- inhibit warnings about "unsafe" containers
- inhibit warnings about "unsafe" C functions
- inhibit warnings about "deprecated" POSIX functions
- suppress min/max macros from windows.h
Flags:
- source and execution charsets are UTF-8
- suppress warnings about throw() not being fully supported in the compiler
- suppress warnings about values being explicitly cast to bool
- enable string pooling
- enable unreferenced code removal
- enable COMDAT folding
- generate PDB debug information
* Changed the KICAD_SCRIPTING flag to be a global disable, so it
will disable all other scripting flags when set to OFF
* Added version testing with the wxPython flags to ensure the
proper version is found for the flags provided
These options were used to support the legacy canvas when drawing on
MacOS and GTK3. With the move to 100% GAL, they are extraneous. This
moves all DC over to "COPY" as we only use this for printing support in
Eeschema at the moment, so there is a single draw command (no erasing)
for the canvas.
Add a new CMake target, qa_all, which builds all
tests, tools and their deps.
Then, when KICAD_BUILD_QA_TESTS is set OFF, remove tests
and tools from the ALL target, so `make all` doesn't include
these builds.
This means even when you turn the KICAD_BUILD_QA_TESTS option
off, you still have the option to:
* Build individual tests: `make qa_pcbnew`
* Build all tests: `make qa_all_tests`
* Build all tools: `make qa_all_tools`
* Build all QA executables: `make qa_all`
This also will provide a place to hang extra logic for test routine
wrangling (e.g. by CI tools)
Update the "Compiling KiCad" dev docs.
Also, CMakeModules .cmake files should not be excluded from git
The SEXPR class is a useful general-purpose S-Expression library
class and can (maybe) be used else where. It also should get
test coverage, as even if noone else uses it, it's critical for the
kicad2step exporter.
Also add some test coverage for some kicad2step routines. For now,
they're not useful outside kicad2step, but they are at least a useful
reference for S-Expression parsing.
This allows setting the config dir at build time, providing packagers a
method of controlling where the configuration files are placed.
Fixes: lp:1780601
* https://bugs.launchpad.net/kicad/+bug/1780601
Bus upgrades: core new connectivity code
Bus upgrades: eeschema integration and modifications
Bus upgrades: eeschema dialogs
Bus upgrades: netlist export
Bus upgrades: file format changes
Bsymbolic prevents DSO exceptions from being handled by the calling
application. This was added when some toolchains did not fully support
the -fhidden-visibility setting. Every platform now support it, so we
can remove the hammer.
See https://bugs.launchpad.net/kicad/+bug/1322354 for original details
Clang compiler uses the same syntax for sending flags to the linker as
gcc. If we use -XLinker, we can't use comma-separated options but
there appears to be no reason to anyway. Removes extra warning quieting
that was added for compiling Boost in tree.
Build fails on GCC, but not with Clang. Modify the check to only catch the
cases where GLM does not work for sure.
Reference: lp:1804030
* https://bugs.launchpad.net/kicad/+bug/1804030
Cairo supports antialiasing when rendering but can be slow when set to
sub-pixel mode. This bumps the minimum version of Cairo to 1.12
(available in 14.04 LTS as well as mingw) to support three antialias
settings (fast, good, best) that offer speed/appearance tradeoffs.
This can provide a higher-quality eeschema render as it works on a
per-element basis as opposed to the OpenGL per-screen antialias.
GLM version 0.9.9.3 has a C++11 error that causes issues for KiCad.
Earlier version function as expected. Since GLM is header-only, forcing
the version during compilation is sufficient to ensure that the
executable functions correctly.
Fixes: lp:1804030
* https://bugs.launchpad.net/kicad/+bug/1804030
Phoenix reports version 4.x but wxWidgets do not follow this version.
Phoenix also does not have or require the wxPython.h file.
Fixes: lp:1801109
* https://bugs.launchpad.net/kicad/+bug/1801109
The compile flag -ffloat-store requires floating point values to be
stored in memory rather than in registers to prevent errors when two
numbers are compared that were stored in different locations.
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt
std::thread is used instead for multithreaded computation
Certain distribution does not handle GLVND well, as the result the
accelerated canvas is not enabled. For the time being it is better to
keep using the legacy preference.
Thanks to Aurelio Lucchesi for investigating the cause.
Fixes: lp:1781581
* https://bugs.launchpad.net/kicad/+bug/1781581
It forces link option -g1 instead og -g3 which allows basic debug.
This is especially useful on Mingw because binaries in debug build are very large:
_pcbnew.kiface: 1.25 Gb, small file option: 65Mb
wxWidgets_CONFIG_OPTIONS can be utilised to explicitly select GTK2 or GTK3. It
must be evaluated when querying the toolkit to avoid a mismatch between the
version actually used and the version KiCad assumes to be used.
Reapplied the original version. The previous patch has been modified
under an invalid assumption of being incompatible with msys2.
wxWidgets_CONFIG_OPTIONS can be utilised to explicitly select GTK2 or GTK3. It
must be evaluated when querying the toolkit to avoid a mismatch between the
version actually used and the version KiCad assumes to be used.
The opencascade patch intrusively checked against libraries but broke
some build scripts. This restores the default cmake OCE behavior that was
changed by 2bab30d9a and makes the OpenCascade search truly secondary.
This is substituted at configuration time, creating an absolute path, which
breaks overriding CMAKE_INSTALL_PREFIX at installation time, breaking the
workflow for installation using GNU stow.
This ensures that GLM objects are still initialized correctly when new
version of this library are used (after 0.9.9-a2).
This also fixes display corruption in 3D-viewer with Raytracer.
Fixes: lp:1762379
* https://bugs.launchpad.net/kicad/+bug/1762379
Having wxWidgets and wxPython build using different toolkits leads
to an unusable build. KiCad executables are linked against wxWidgets
shared libraries, which will be in conflict with wxPython ones that
are loaded at runtime. We cannot easily solve it, so at least warn
the users about expected problems.
More information:
https://forum.kicad.info/t/9493https://bugs.launchpad.net/kicad/+bug/1746753
This target seems to only create empty makefiles, tested on linux. And I
can not find any references to it in any of the current CMakeLists. Lets
remove it.