Commit Graph

10 Commits

Author SHA1 Message Date
Ian McInerney 0a1d8c1aaa Move lemon parser generation into build directory
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
2020-08-10 13:53:54 +00:00
Simon Richter c8c3e1f96a Fix build order for generated headers and sources
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
2019-07-03 09:36:40 -04:00
jean-pierre charras 8d84e22f31 Functions.cmake: add missing dependency to *.keywords.
Due to this missing dependency, when a xxx.keyword file was modified, the files built from it were not rebuilt
2019-06-26 19:25:24 +02:00
Seth Hillbrand e6e4000863 CMake: Add generated lexer files to clean list
When running make clean, we'd like to remove all generated files
including the lexer files to allow for a fresh rebuild
2019-06-18 06:22:18 -07:00
Seth Hillbrand 8112a8ade1 cmake: Further petting dependencies
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
2019-06-13 06:51:52 -07:00
Seth Hillbrand 720889edd0 CMake: Another go at linear dependencies
This simplifies the linear dependencies for custom targets.  Should be
single shot for make this time.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-10 14:47:14 -07:00
Seth Hillbrand c6af38477d CMake: Handle custom_target indirection
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
2019-06-05 13:05:43 -07:00
Dick Hollenbeck 939ef4ad59 Add support for building *.deb file using CPack, install ~/fp-lib-table either from kicad-install.sh or from make install_user_configuration_files 2013-10-17 14:03:36 -05:00
Dick Hollenbeck 2fc698846b *) Refinements to ExternalProject_Add( boost )
*) Enhancements to make_lexer().
*) Support multi-threaded build.
*) Switch to "bzr patch" from patch.exe for Windows users.
2013-05-31 16:22:34 -05:00
Dick Hollenbeck 364132cbe1 add cmake function make_lexer 2010-12-27 10:51:45 -06:00