Commit Graph

641 Commits

Author SHA1 Message Date
Marek Roszko c794a6ce7a Add pdb install option for msvc 2021-07-14 23:42:45 -04:00
luz paz 0446d35f0d Fix source comment/doc typos (follow-up)
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
2021-07-13 10:48:17 +00:00
Wayne Stambaugh d30fc811a7 Set find Python interpreter minimum version. 2021-06-22 08:58:06 -04:00
Tomasz Wlostowski 24e7924997 qa: fixed building of the P&S debug tool after the changes/refactoring of the 3D viewer code. The tool can now be built
if KICAD_BUILD_PNS_DEBUG_TOOL is ON.
2021-06-19 23:21:23 +02:00
Eeli Kaikkonen 168a21bb43 OCC is the default cmake flag instead of OCE. 2021-06-16 16:36:38 +00:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
jean-pierre charras ef96374eec Fix an issue with KICAD_SCRIPTING_WXPYTHON=OFF on Linux.
Previously, with KICAD_SCRIPTING_WXPYTHON=OFF, a test using WXPYTHON_TOOLKIT was made.
2021-06-03 11:13:49 +02:00
Seth Hillbrand 74e4370a9b Promote internal pybind11 ahead of system 2021-06-01 20:18:24 +00:00
Seth Hillbrand b374f545be Keep CMake wxPython behind flags 2021-06-01 20:18:24 +00:00
Seth Hillbrand e050d42658 Re-enable KICAD_SCRIPTING_WXPYTHON
This keeps wxpython behind a build flag for platforms (mingw) that do
not yet support it.
2021-06-01 20:18:24 +00:00
Seth Hillbrand 192fbfd5e5 Finalize Python Frame 2021-06-01 20:18:24 +00:00
Seth Hillbrand 81d58bcea9 Working python window 2021-06-01 20:18:24 +00:00
Seth Hillbrand f274a00c08 Remove PYTHON_* compile options 2021-06-01 20:18:24 +00:00
Marek Roszko cbad18ad98 Hide gal profiling behind KICAD_GAL_PROFILE cmake option
__WXDEBUG__ is too easy to get set
2021-04-30 19:24:36 -04:00
Marek Roszko 51fee0a3ad Add binary bitness in version info.
Fix #4425
2021-04-30 19:24:36 -04:00
Marcus A. Romer c5e77e9739 Respect KICAD_DOCS when searching for help files
On Linux, the documentation and help files are potentially installed to
a non-standard location (i.e., outside of /usr/share/doc/kicad/). This
can be the case when, e.g., multiple versions of KiCad are installed in
parallel. Making KICAD_DOCS available at run-time is the only viable
solution to allow the applications to find the help files in this case.

Fixes https://gitlab.com/kicad/code/kicad/issues/7874
2021-04-21 19:19:25 +00:00
Adam Wolf a06f0ca908 Clean up macOS Python3 paths 2021-04-21 12:50:31 +00:00
Adam Wolf 4b7fbaef88 Fix typo. 2021-04-21 12:50:31 +00:00
Adam Wolf 7357424efc Update macOS to Python 3, wx 3.1, and Phoenix.
This is a work-in-progress.  It could use testing while I continue to fix
the remaining pieces.

There are some changes that will be needed for signing and notarization.

This currently relies on a Python tool I wrote (dyldstyle) to fixup
KiCad.app correctly. I would like any bundle fixing necessary to use a
built KiCad on macOS to live inside KiCad, rather than in
kicad-mac-builder or elsewhere.  While I was experimenting, I found this
worked, however, and I would love to get extra hands testing.

I added a CMake argument, MACOS_EXTRA_BUNDLE_FIX_DIRS, for devs and
packagers who have extra directories they need to add to
fixup_bundle on KiCad.app.

There's an issue about differing behavior when KiCad is opened via
the command line or via Finder/launchd.
2021-04-21 12:50:31 +00:00
Ian McInerney e237b6a2af Add thread sanitizer support to Cmake 2021-04-16 17:49:52 +01:00
Johannes Maibaum 39c1387b5b Allow to relocate EDA libraries out of KICAD_DATA
Introduce a new advanced config variable `KICAD_LIBRARY_DATA` which can
be used to move templates, symbols, footprints, and 3dmodels out of
`KICAD_DATA`. If not defined, everything is kept as before.

To facilitate this, PATHS::GetStockEDALibraryPath() is added. This
allows to differentiate code paths looking for EDA library data vs. code
paths looking for plugins, demos, and the like.

Thanks to Aimylios for the hints and suggestions with regards to the
stock EDA library data path handling on Windows and MacOS.
2021-04-14 01:51:22 +00:00
Marcus A. Romer 1632707d9b Replace tabs with spaces 2021-04-05 01:13:39 +00:00
Johannes Maibaum 2467b7e6c5 Do not explicitly strip binaries on Linux
Fedora, Flatpak, Debian, and possibly other distributions as well, have
packaging helpers who will strip out debug symbols into separate debug
packages.

Currently, the explicitly added "-s" EXE_LINKER_FLAG renders these
automatically created debug packages completely useless, so this change
removes it.
2021-03-27 16:28:44 +00:00
Jon Evans 1d879e36cc Make drc_proto an optional part of the build 2021-03-20 12:09:20 -04:00
Mark Roszko 795663620c Fix another arch flag typo 2021-03-12 15:10:44 +00:00
Marek Roszko db1f457ff9 Add msvc flag definition for ARM64 2021-03-10 21:48:04 -05:00
Marek Roszko 71c1be8de0 Guard BUILD_SMALL_DEBUG_FILES away for MSVC 2021-03-10 18:33:07 -05:00
Marek Roszko df2154a87a Rename KICAD_BUILD_PARALLEL_CL_MP to KICAD_WIN32_BUILD_PARALLEL_CL_MP
Also make it a dependent option on WIN32 for sanity.
2021-03-10 00:28:04 -05:00
Marek Roszko a82764f43a Fix the missing optimizations for RELWITHDEBINFO builds 2021-03-09 20:47:02 -05:00
Marek Roszko 8cb127b8e4 Change the msvc exception handling mode when using asm libcontext 2021-03-04 21:48:26 -05:00
Marek Roszko 2bf488e0c7 Add cmake option to enable win32 fibers 2021-03-04 21:48:26 -05:00
Marek Roszko 75c0dc7454 Make sure the mingw rc gets the build dir include 2021-03-04 07:32:58 -05:00
Marek Roszko 047bfdfb30 Ensure MSVC builds with standard unwinding enabled
It seems some cmake copies don't enable it for some odd reason ?
2021-02-27 14:20:45 -05:00
Marek Roszko 64f817001a Change pcbnew.pyd install location for vcpkg 2021-02-10 21:23:01 -05:00
Marek Roszko de4eafc38d Bump only the minimum cmake to 3.10 2021-02-09 18:51:27 -05:00
Marek Roszko 872184fe8b Revert "Bump minimum required CMake version to 3.10"
This reverts commit a475f45753.
2021-02-09 18:46:13 -05:00
Simon Richter a475f45753 Bump minimum required CMake version to 3.10
This allows us to remove even more workarounds
2021-02-08 12:23:08 +00:00
Ian McInerney 5418e3454c Default the translations build to off and build it in CI 2021-01-18 17:43:34 +00:00
Ian McInerney 43baf2e3f2 Translate the linux metadata files 2021-01-18 17:43:34 +00:00
Ian McInerney e9fa9f68b2 Integrate the i18n CMake into the main CMake
This adds a new target i18n that will compile all the translation
files.
2021-01-18 17:43:33 +00:00
Marek Roszko 3ad0e5d8bf Turn on /bigobj for MSVC as release objs with swigwin exceed the standard limit 2021-01-12 19:49:41 -05:00
Seth Hillbrand 2cb8dff650 Use KICAD_DATA for data path lookup in scripting
Fixes https://gitlab.com/kicad/code/kicad/issues/7036
2021-01-12 08:22:17 -08:00
Michael Kavanagh 9546ad88b5 Packaging: more human-friendly names on macOS...
At least it appears that way (just the symlinks are renamed).
2021-01-09 16:23:49 +00:00
Marek Roszko 84dd78e01d Fix the install location for vcpkg built python modules 2021-01-07 00:08:11 -05:00
Marek Roszko 318d7ab67b Use cmake_dependent_option for KICAD_WIN32_DPI_AWARE 2021-01-07 00:08:10 -05:00
Ian McKellar 7f6be05d9d Correct GLEW bundled include directory
There is no CMake target property PRIVATE_INCLUDE_DIRECTORIES, just
INCLUDE_DIRECTORIES (PRIVATE and PUBLIC directories) and
INTERFACE_INCLUDE_DIRECTORIES (PUBLIC and INTERFACE directories).

Building on Linux with -DKICAD_USE_EGL=ON but without a system-wide GLEW
fails without this change.
2020-12-01 00:56:28 +00:00
Ian McInerney 11e6cac42b Introduce EGL backend support for the OpenGL canvas
wxWidgets 3.1.5+ on Linux will compile with the Wayland EGL
canvas as the backend instead of the X11 backend. This requires a
version of GLEW compiled with the proper EGL defines and a different
header/code for certain parts that are X11 GLEW specific.

This introduces an in-tree version of GLEW that will be built with the
GLEW_EGL flag then statically linked into the KiCad executables when
EGL support is needed.
2020-11-11 00:41:02 +00:00
Seth Hillbrand 9ed6cdd943 Remove GITHUB plugins
KiCad github downloads are no longer supported

Fixes https://gitlab.com/kicad/code/kicad/issues/6182
2020-10-29 16:45:04 -07:00
Seth Hillbrand 19155edde0 Work around broken FindWxWidgets in vcpkg 2020-10-15 11:23:50 -07:00
Simon Richter d339979c28 Turn off compiler extensions
We want to be somewhat standards compliant if we can.

There is a small complication, which we work around:

gcc sets __STRICT_ANSI__ in "c++11" mode (the non-strict mode would be
"gnu++11"), which causes the "strdup" definition to go away. If wx < 3.1 is
compiled with GNU extensions, it just forwards the wxCRT strdup function to
system strdup and doesn't create a definition for the wxCRT function, and
when a program is then compiled in strict mode against that, the wxCRT
function is missing.

From 3.1 onwards, the function is provided unconditionally in wx, so the
workaround is no longer needed there.
2020-10-14 16:22:37 +00:00
Mark Roszko a8bd0a9b84 Handle Windows manifests ourselves and add dpi awareness option 2020-10-10 19:08:23 +00:00
Ian McInerney f1ebb64e51 Remove unused CMake option 2020-09-30 23:34:04 +01:00
Jon Evans 8a5163a9f5 Build cvpcb after pcbnew
cvpcb now depends on ${PCBNEW_IO_LIBRARIES} set in pcbnew's CMakeLists.txt
2020-08-23 16:22:29 -04:00
Seth Hillbrand a38c2aad1f ADDED: Support compressed STEP and VRML files
This adds support for opening .stpZ, step.gz and .wrz files where the
files have been compressed using ZIP or gzip according to the "standard"
published by the MBx volunteer forum at
https://www.cax-if.org/documents/rec_prac_file_compression_v12.pdf

Fixes https://gitlab.com/kicad/code/kicad/issues/2479
2020-08-19 03:20:30 +00:00
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
Ian McInerney 11ef147a36 Drop support for GTK2 on Linux
CHANGED: Drop support for GTK2 on Linux
2020-07-16 15:16:31 +00:00
Tomasz Wlostowski c897273f11 PROPERTY_MANAGER requires propgrid wx component 2020-07-05 22:44:38 +02:00
Seth Hillbrand 7e3a338518 Move warning flags to proper place
Cleans unitialized warnings in wxApps
2020-07-02 12:17:45 -07:00
Seth Hillbrand d663be853f Explicitly add signed/unsigned comparison to warnings 2020-07-02 10:54:34 -07:00
Ian McInerney d72a778f19 Move Doxygen test to main CMake scope
Fixes https://gitlab.com/kicad/code/kicad/issues/4468
2020-05-17 18:29:50 +01:00
Ian McInerney 0658d297e5 Cleanup cmake for documentation creation 2020-05-17 01:00:37 +01:00
Simon Richter 2341b69840 Make sure that Ninja knows the version header (fixes #4209)
This is required, because Ninja otherwise doesn't properly rebuild after
updating the version string header file.

Because BYPRODUCTS requires CMake 3.2, bump the minimum version and remove
now unused compatibility code for older CMake versions.
2020-05-09 15:25:33 +00:00
Ian McInerney e4b6487fca Overhaul compiler warnings infrastructure
* Track our warnings separate from normal flags
* Remove all warnings from the SWIG code
* Add more GCC warnings
2020-05-06 01:47:20 +01:00
Ian McInerney 5a4e4aea67 Enable new warnings 2020-04-25 00:46:29 +01:00
Jon Evans 7df3df3381 Add basic netlist QA test 2020-04-19 19:13:24 -04:00
Simon Richter f663f199b4 Tighten version requirements: GLM >= 0.9.8
Commit ae6fbc9c6 builds a glm::vec4 from a vec3 and one float, which
requires 0.9.8 at least.
2020-04-19 14:21:45 +00:00
Ian McInerney 7bda8178d1 Move library includes to main CMake file
Placing them behind the SYSTEM directive tells CMake to tell
the compiler they are system libraries, so it shouldn't show
warnings created from them.
2020-04-19 01:11:56 +01:00
jean-pierre charras 25d7c0cae2 Opencascade: fix min version: OCE=0.18, OCC=6.9.0
Fix also a few minor Coverity warnings.
2020-04-16 10:22:20 +02:00
Ian McInerney d787596124 When using ASAN, disable stack protection and source fortification
ASAN throws some false positive errors on stack overflows when
used with the stack protector option, and doesn't support source
fortification.
2020-03-18 19:12:24 +00:00
Jon Evans 009641d151 Make libcurl a required dependency and always build KICAD_CURL 2020-02-26 01:03:07 +00:00
jean-pierre charras 6d44a93eaf Linking, mingw: Add bcrypt to libraries linked to libcommon.
It is already added with MSVC, and must be added with gcc/mingw

However, the cmake option:
add_definitions( -DBOOST_UUID_FORCE_AUTO_LINK )
does not work on msys2 (at least with my cmake version), so another syntax is used.
2020-02-21 10:37:59 +01:00
Jon Evans e8e3b4f11e Rename UUID to KUUID to fix MSVC build
Also add another newly-required boost flag
2020-02-20 22:07:17 -05:00
Jon Evans b824051adf Ensure DEBUG is defined on all platforms for debug builds 2020-02-07 11:58:41 +00:00
Jon Evans 6b3fdf2d15 Remove cmake change that accidentally got merged 2020-02-05 20:47:08 +01:00
Jon Evans fe375b4419 Allow sheet pins to be strong drivers if they don't conflict with anything
Also try harder to match bus members in case one was renamed by a higher
priority label.

Fixes https://gitlab.com/kicad/code/kicad/issues/3797
2020-02-05 14:23:55 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* 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.
2020-01-07 17:12:59 +00:00
Ian McInerney e54c954aed cmake: Don't install the *.in files during an in-tree build
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.
2020-01-03 17:49:27 +00:00
Ian McInerney 5c0656d97f Move potrace and libcontext into thirdparty directory
Part of the cleanup in #3637
2019-12-28 18:17:55 +00:00
Ian McInerney 6ba8dcc121 Re-enable deprecation warnings
These were disabled by a3211b2b9e
for some reason. We should not globally disable these warnings,
and instead do so on a case-by-case basis.
2019-12-28 16:11:31 +00:00
Ian McInerney 25a302758e Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275
2019-12-26 12:42:25 +00:00
Ian McInerney 6b9f2ac91a Move markdown2html into thirdparty directory
Part of https://gitlab.com/kicad/code/kicad/issues/3637
2019-12-19 17:57:15 +00:00
Ian McInerney 116ac9aa75 Move dxflib, tinyspline and nanosvg into a thirdparty library directory
Part of fixing https://gitlab.com/kicad/code/kicad/issues/3637
2019-12-19 17:41:02 +00:00
Ian McInerney 3370e89967 Update Linux appdata file and CMake version strings
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
2019-12-18 17:24:07 +00:00
Simon Richter ac09c9c9d4 Enable full CTest framework
This allows asking CTest for running the test suite under valgrind
2019-11-26 17:40:34 -05:00
Ian McInerney 8bd2765f38 Fix typo in CMake error message 2019-11-24 21:25:40 +00:00
Seth Hillbrand 365f9224e7 CMake: Fix OCE/OCC swap
unset() needs to remove the cached variable to get rid of the implicit
version
2019-11-16 10:02:55 -08:00
jean-pierre charras c5290de6ec housekeeping:
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
2019-11-16 09:39:36 +01:00
jean-pierre charras 34b26a0ac7 Add KICAD_USE_FONT_REDUCED_SET (default OFF) to build options.
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.
2019-10-07 09:50:24 +02:00
Wayne Stambaugh d837a212aa Bump Boost version to 1.59. 2019-10-03 14:53:27 -04:00
jean-pierre charras 49dbc37277 Fix a few issues related to help files in html or markdown.
Fix *.cmake scripts that dropped the semicolon in strings during conversion.
Move markdown2html in a separate library.
2019-10-01 17:11:39 +02:00
Seth Hillbrand 0b80c00678 Add Valgrind stack instrumentation
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.
2019-08-10 08:28:25 -07:00
jean-pierre charras 38fc51c3b6 CMakeLists.txt: add compil option KICAD_STDLIB_LIGHT_DEBUG, useful when KICAD_STDLIB_DEBUG cannot be used.
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.
2019-08-07 14:51:28 +02:00
Seth Hillbrand 5aa48e523d C++14: Remove libglm version hold
We can now accept all versions of libglm >= 0.9.5.1 in the master
branch.
2019-08-06 18:43:45 -07:00
Seth Hillbrand 7ed4d11f0c cmake: Add options for debugging
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
2019-08-06 15:28:26 -07:00
Simon Richter a1f16f3681 Adapt CMake 3.0 compatibility code for C++14 2019-07-17 18:27:59 -07:00
Simon Richter e5463b5455 Define compiler flags for MSVC
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
2019-07-17 08:10:47 -04:00
Simon Richter cf4393091a Set _USE_MATH_DEFINES on Windows
All compilers need this in standards-compliant mode.
2019-07-17 08:10:47 -04:00
Seth Hillbrand 044b4a6d4c Bump C++ version to c++14
This is a provisional bump.  If supported platforms
(http://kicad-pcb.org/help/system-requirements/#_specific_system_requirements)
experience issues with this version we will revert back to c++11.

No code that requires c++14 will be committed yet.
2019-07-10 20:03:48 -07:00
Ian McInerney 42e14b5a4e Cleanup cmake python dependency handling to catch errors
* 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
2019-06-27 13:31:20 -04:00
Seth Hillbrand ffc1b6406f Remove last vestiges of WX_GRAPHICS_CONTEXT 2019-06-18 11:15:05 -07:00
jean-pierre charras b5cf03f5ad Remove boost::regex from required BOOST components, because now replaced by std::regex is used. 2019-06-18 08:22:05 +02:00
Seth Hillbrand ca12ce6f14 CMake: Bump version
Updates the minimum version to 3.0.2
2019-06-14 10:56:45 -07:00
Seth Hillbrand e52afd93a3 Remove Legacy options for overlay/context
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.
2019-06-12 06:01:03 -07:00
Tomasz Włostowski 37e057173c CMakeLists: temporarily disable --no-undefined which breaks builds with ASan 2019-05-22 16:37:16 +02:00
John Beard 45aa514591 QA: Allow to build tests manually if disabled
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
2019-04-17 18:00:40 +01:00
John Beard 03214b5dea Sexpr/QA: Split out the sexpr classes into a reusable lib and test
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.
2019-04-17 10:52:56 +01:00
jean-pierre charras ead5bfe64b Add option to build QA test suite (this option is on by default.
KICAD_BUILD_QA_TESTS=OFF skips the QA test suite build.
This is useful for daily work on Kicad. It spares compil and link time.
2019-04-16 18:40:56 +02:00
Seth Hillbrand 257d9b5fe9 Allow setting the kicad config dir
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
2019-04-08 12:33:49 -07:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
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
2019-03-31 19:53:41 -04:00
Seth Hillbrand 5619cc41f9 Remove Bsymbolic linker flag
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
2019-03-16 20:37:14 -07:00
Seth Hillbrand 6eb84e42f2 cmake: Remove invalid clang syntax
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.
2019-03-07 13:59:18 -08:00
Seth Hillbrand 81a5bd977b Force overlay when building GTK3
GTK3 does not provide the XOR method.  We need to force the overlay to
draw items in Page Layout editor when moving/dragging
2019-02-25 14:14:44 -08:00
Thomas Pointhuber bb7c889551 Fix check for incompatible glm version in cmake
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
2019-01-09 09:24:49 -05:00
Seth Hillbrand e8333633fe GAL: Add antialiasing options to Cairo
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.
2019-01-04 13:39:56 -08:00
Seth Hillbrand 968ea983aa GLM: Check for incompatible glm version in cmake
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
2018-12-14 16:29:18 -08:00
John Beard 4363cc0bec Docs: add docset generation target
This is a CMake (non-ALL) target that will build a Zeal-compatible
docset from a version of the doxygen HTML.

To do this, doxytag2zeal is used.
2018-12-03 10:14:15 -05:00
jean-pierre charras 95bc4f74c5 Windows compil option: always define UNICODE and_UNICODE needed by Kicad that uses unicode. 2018-11-06 18:15:52 +01:00
Maciej Suminski b7b9cccffc Moved wxPython/Phoenix detection to a separate CMake module 2018-11-02 11:28:30 +01:00
Maciej Suminski 23e574fbcd Remove a redundant semicolon in Python path configuration command 2018-11-02 10:40:05 +01:00
Maciej Suminski 179c46ce49 Handle another type of wxPython/Phoenix version string
Fixes: lp:1801109
* https://bugs.launchpad.net/kicad/+bug/1801109
2018-11-02 09:42:08 +01:00
Seth Hillbrand 672e98bd89 Phoenix: Fix wxwidget version
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
2018-11-01 08:49:51 -07:00
jean-pierre charras ad99983672 Windows build: link gdiplus library on all Windows targets, not only mingw. 2018-11-01 16:03:21 +01:00
jean-pierre charras 8be3471ba2 Windows specific: define GDI_PLUS_LIBRARIES even if USE_WX_GRAPHICS_CONTEXT is not used.
Because the cairo printing system uses gdiplus library, GDI_PLUS_LIBRARIES must be always defined
2018-11-01 08:38:23 +01:00
Maciej Suminski 38f94483f4 Warn the user about wxWidgets/Python toolkit mismatch instead of overriding the setting 2018-10-31 19:17:30 +01:00
Maciej Suminski 948f28ebcc Enforce the same toolkit version for wxWidgets and wxPython libraries
Fixes: lp:1747677
* https://bugs.launchpad.net/kicad/+bug/1747677

Fixes: lp:1783634
* https://bugs.launchpad.net/kicad/+bug/1783634
2018-10-31 19:17:30 +01:00
Wayne Stambaugh 9519de8ab2 Check for wxPython.h when wxPython scripting is enabled.
Fixes lp:1785663

https://bugs.launchpad.net/kicad/+bug/1785663
2018-10-31 10:15:32 +01:00
Thomas Pointhuber 0e0b4d52a2 Add initial support for Phoenix (new wxPython binding)
Based on the work of @mmccoo:
https://kicad.mmccoo.com/2017/11/23/learnings-from-moving-kicad-to-wxpython-4-0/
and this additional patchset to remove wxpy_api.h dependency:
http://mmccoo.com/random/0001-Remove-dependence-on-pywx_api.h.patch

Please note CreatePythonShellWindow changed quite a lot. Throughful testing
should be made for the old as well as new wxPython version on all platforms
2018-10-26 13:21:11 +02:00
Seth Hillbrand 40c70dd008 Prevent excess precision errors on 32-bit builds
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.
2018-10-23 15:27:58 -07:00
Wayne Stambaugh 8a251163dc Revert "Turn off compiler extensions"
The compiler option caused build failures on msys2.

This reverts commit 2c22bb1a60.
2018-10-19 18:19:45 -04:00
Simon Richter cc0489f6b5 Disallow variable length arrays
This is a gcc/clang extension, not standard C++
2018-10-19 10:25:32 -07:00
Simon Richter 2c22bb1a60 Turn off compiler extensions
We want to be somewhat standards compliant if we can.
2018-10-19 10:25:05 -07:00
Thomas Pointhuber 4a2a76af37 Improve CMake Python code
* We have code with u'' which means minimum version is 3.3
* Python 3.8 is already in development, be a bit more future proof
2018-10-19 09:59:06 +02:00
Thomas Pointhuber 86ecb9fe30 Fix cmake script for PythonLibs 2018-10-19 09:59:06 +02:00
Thomas Pointhuber 7548a3b1bf Add KICAD_SCRIPTING_PYTHON3 flag to about dialog and doc 2018-10-19 09:59:05 +02:00
Thomas Pointhuber 1a11480bfd Add cmake flag to switch to python3 build 2018-10-19 09:59:05 +02:00
Thomas Pointhuber de7b362695 Rewrite some code to work on Python 2.7 and 3+ 2018-10-19 09:59:03 +02:00
Seth Hillbrand f8784f30a8 Removing OpenMP
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
2018-09-21 12:44:20 -07:00
Damian Wrobel f85b1479aa Fix setting default cmake build type
Changes: Sets default cmake build type before
calling project(). Current version seems to follow
https://cmake.org/pipermail/cmake/2008-September/023808.html
however, it seems to miss the comment that:
"definition of CMAKE_BUILD_TYPE occurs in the PROJECT() command"
which means that setting cmake build type should happend prior
to calling PROJECT().

Fixes: lp:1785719
* https://bugs.launchpad.net/kicad/+bug/1785719
2018-09-05 08:12:03 -04:00
Wayne Stambaugh f52da8ed96 Pcbnew: enable scripting action menu build option by default.
Fixes lp:1783690

https://bugs.launchpad.net/kicad/+bug/1783690
2018-08-21 12:54:13 -04:00
Maciej Suminski 01925fd6a7 Changed the OpenGL CMake preference to LEGACY
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
2018-08-17 10:03:59 +02:00
jean-pierre charras 9a6fe2b8cd CMakeLists.txt: add a option (BUILD_SMALL_DEBUG_FILES, default off) to create smaller binaries in debug mode.
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
2018-07-28 10:38:00 +02:00
John Beard 2e977ec369 Enable CTest tests and add qa_geometry as a test
This allows the use of `make test` or `ctest` to run all registered
tests.

The ChamferFillet/Fillet test is disabled for now as it fails.
2018-07-27 08:57:19 -04:00
Maciej Suminski 944d22c08a Fix detection of wxWidgets toolkit
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.
2018-07-27 09:08:42 +02:00
Marcus A 31f77fc040 Fix detection of wxWidgets toolkit
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.
2018-07-26 17:23:28 +02:00
Marcus A d5f81c7255 Fix some typos in CMakeLists.txt 2018-07-26 16:47:52 +02:00
Marcus A 0dcc26f866 Update description of build options
Commit 93683d0021 changed the default build
options but did not update their description.
2018-07-26 16:47:52 +02:00
jean-pierre charras 72d1597201 DXF import: add import of DXF splines that are converted to Bezier curves.
Fix also a lot of bugs related to Bezier curves (S_CURVE shape in DRAW_SEGMENT class) in Pcbnew code.
Add missing code to handle these Bezier curves
2018-07-22 18:39:47 +02:00
Maciej Suminski 850aac5ec5 Set OpenGL_GL_PREFERENCE for CMake 3.11+ 2018-06-11 10:27:49 +02:00
Jean-Samuel Reynaud d4393b2813 Fix incorrect Eeschema BOM plugins install path on Linux.
Fixes lp:1697041

https://bugs.launchpad.net/kicad/+bug/1697041
2018-06-01 14:09:08 -04:00
Seth Hillbrand 584409b2ef Make OpenCascade more secondary
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.
2018-05-15 06:40:25 -07:00