This will gracefully handle errors that prevent the file translation
by simply copying the file if they occur. This allows the build to
proceed and the logs to contain the error.
The BuildSteps folder now contains the CMake scripts that are
called during the build process as individual stages, while
the root CMakeModules directory contains the CMake files used
during the configuration phase.
There was an ABI change for 64 bit aligned vectors between gcc 5 and gcc 6
on a few 64 bit platforms, and gcc 10 reports "note" level warnings for
each affected access, which is very noisy and hides more important
information.
These notes are issued because there is no reliable diagnostic for actual
problems.
This moves the generated files out of the source tree and into
the build directory. They are now regenerated each time they are
needed, based on the timestamp of the generated file compared to
the timestamp of the lemon file.
To do this, we also bundle lemon into the thirdparty directory
and build it for ourselves since it is a very tiny program and
not all platforms seem to distribute it in a consistent manner.
Fixes https://gitlab.com/kicad/code/kicad/issues/5013
The config.h header for ngspice is not packaged with all platforms so
use pkg-config to fetch the version information when available. When
pkg-config is not available, check if the ngspice/config.h file is
installed on the system before including it to build the ngspice version
string. If neither pkg-config or ngspice/config.h is available set the
version string to "unknown".
Fixes https://gitlab.com/kicad/code/kicad/issues/4851
Recent msys version does not find libngspice-0.dll, only
libngspice-0.dll.a when using find_library.
When not found, a find_file is made, instead of find_library.
Let cmake generate the needed version strings, so we don't
have to spend program time doing it. This simplifies the
settings manager versioning.
Also, convert some file line endings to UNIX from Windows.
A more robust fix for https://gitlab.com/kicad/code/kicad/-/issues/4015.
These help files are created from the .md source files and contain I18n strings,
but do not exist if kicad is not built from sources.
However they are needed by translators.
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
This will sync the git tag for this commit. This should help prevent
confusion for users who were thinking that 5.0.0-r#####-g######## was
an older version than the 5.1 branch.
This changes make_lexer() so that it no longer generates a custom target
but instead attaches the generated files to an existing one (so the first
argument now is the name of an existing library or executable, and it needs
to come after the add_library/add_executable call).
The generated source is no longer listed in the project sources, as it is
added by the function. The files are generated in the build tree rather
than the source tree, and the directory is added to the include path for
the respective project as well as exported to projects linking against it.
Generated files in subdirectories are somewhat supported, but need to be
referenced with the same name as they were generated (i.e. including the
subdirectory name).
Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
Fixes: lp:1832357
* https://bugs.launchpad.net/kicad/+bug/1832357
Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
eeschema cpp files consume generated header files that have targets in
the common directory, so no dependencies get created from eeschema. We
add the dependencies in common to force the setting through libraries.
Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
Building custom targets that depend on custom commands such as our
keyword lexer requires two layers of indirection to pick up changes
properly and not overwrite the same file in parallel builds.
Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
This allows CI tools to get machine-readable test reports.
By default, this is off - when you test normally, you probably
want the regular console spew.
Boost tests use the in-built Boost test command line options.
The Python tests take an --xml parameter and output the tests
there.
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
Some developer scripts ended up in the demonstration scripts directory
that was bundled with builds. This moves them to the build_tools
directory and updates the associated Documentation
Fixes: lp:1815891
* https://bugs.launchpad.net/kicad/+bug/1815891
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.
Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.
This avoids a circular dependency that was previously reported
by static analysis.
Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)
Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
Adds a link-time dependency for libngspice, so that other tools may
detect ngspice as a KiCad dependency.
The library is still loaded with dlopen() as it gives a way to reload it
in case of problems. The DLL name is recognized during CMake
configuration and used to load the library at runtime.
The CMake scripts calculate the install path for python scripts by
distutils.sysconfig.get_python_lib(
plat_specific=0,
standard_lib=0,
prefix=''
)
which generates a string in line with
lib/python2.7/site-packages
This string ends up in the CMake variable PYTHON_DEST and is used by the
install step as destination directory for pcbnew.py.
There has been a hard-coded assumption on the content of that string in
PcbNew which is not compatible with FreeBSD 11.1.
This commit eliminates the hard-coded assumption in PcbNew and reuses
the install path as known by CMake.
Fixes: lp:1777921
* https://bugs.launchpad.net/kicad/+bug/1777921
(cherry picked from commit dd3c24faf8)
OpenCascade 7.3 deprecates some TK libraries that were not required by
KiCad, therefore we should not include them in the compile.
Also correct missing compiles for STEP import/export induced by 584409b2e when using OCCT. There is no effect on OCE to this change.
Git is always used to generate the KiCad version string using the
command `git describe --dirty`. This gives a more concise and
accurate version string than the previous method. When git is not
available, the version string defaults to the value defined in
KiCadVersion.cmake. It is imperative that moving forward that the
default version string be updated the commit following a git tag
so that when git is not available, the last known commit following
a git tag will at least give some usable information about which
development branch of KiCad was used for a build.
Both official one and KiCad one version of FindwxWidgets.cmake do not check if
all the required components are part of the wxWidgets build. This couses trouble
on Ubuntu when user misses libwxgtk3.0-dev package - CMake succeeds, build does
not.
This fix was accepted also to the CMake 3.9 upstream
(https://gitlab.kitware.com/cmake/cmake/merge_requests/704).
Fixes: lp:1630020
* https://bugs.launchpad.net/kicad/+bug/1630020