Commit Graph

202 Commits

Author SHA1 Message Date
Steven A. Falco 0c2e550143 Fix GCC 13 build error.
See https://kicad.zulipchat.com/#narrow/stream/258851-Developer-Chat/topic/GCC.20Breakage
for more info.
2023-01-18 23:14:33 +00:00
Marek Roszko 3c325f2e61 Add missing include to spacemouse CCommandTreeNode.hpp
Required by MSVC in conformance mode
2023-01-15 20:24:29 -05:00
Seth Hillbrand f8d2bdbdf9 Fix Clipper2 memory leak 2022-12-18 11:45:52 -08:00
Marek Roszko 24ca892afb Update tinysplice to latest
A few years worth of bug fixes
2022-12-06 22:28:23 -05:00
Seth Hillbrand 1b18e1eb6a Avoid double-move
This was flagged by coverity but doesn't seem to be an actual issue in
g++/clang.  It technically leaves the moved rvalue in a "valid but
undefined state", so it is best to avoid.  The single copy into an
lvalue is (I think) cheap
2022-12-04 10:26:48 -08:00
Seth Hillbrand f9a36b9c91 Update thread_pool to 3.3
Fixes an issue with `wait_for_tasks()` and adds a lower-overhead
`push_loop` helper.  We replace our usage of `parallelize_loop` with
`push_loop` as we didn't use the multi-future vector return and don't
need the extra overhead.
2022-12-02 12:01:34 -08:00
Seth Hillbrand 203f5538aa Correctly place static library spec 2022-11-22 05:45:26 -08:00
Seth Hillbrand e2fd67d434 Remove extra CPack 2022-11-21 07:01:39 -08:00
Marek Roszko 6cf6888489 Update argparse 2022-11-13 11:50:27 -05:00
jean-pierre charras 85e44c2dae pcbnew, SVG import: fix an issue for SVG files using a CR+LF end of file
The issue was in a validity test working only if CR+LF is not replaced by LF
Fixes #10096
https://gitlab.com/kicad/code/kicad/issues/10096
2022-11-09 09:33:51 +01:00
Jon Evans dd94b2d3a7 Rename PROPERTIES to STRING_UTF8_MAP for clarity
This class has nothing to do with the properties system
2022-11-06 11:51:52 -05:00
Jon Evans 995a153f27 Update nlohmann::json to 3.11.2
Also update json_schema_validator to match new deprecations
2022-11-05 10:53:57 -04:00
Seth Hillbrand fd592abddd Refactor inline RectClip routines 2022-10-28 21:34:25 -07:00
Seth Hillbrand f91ac8a03f Undefine None for X11 after Clipper2 update 2022-10-28 21:30:59 -07:00
Seth Hillbrand c6417fd101 Update Clipper2 to 1.0.6 2022-10-28 17:01:36 -07:00
Seth Hillbrand 283dba00c3 Fix the "None" define with a hammer
The X.h definition of None creeps in older Linux distributions in
multiple places.  Better to just force undefine it because we never need
it
2022-10-20 08:24:09 -07:00
jean-pierre charras 0a2fa51d91 Clipper2: fix an incorrect compil otion on mingw 2022-10-20 11:29:31 +02:00
Seth Hillbrand 27add591ec Add Clipper2
Currently this lives behind the advanced config flag `UseClipper2`.
Enabling this flag will route all Clipper-based calls through the
Clipper2 library instead of the older Clipper.  The changes should be
mostly transparent.

Of note, Clipper2 does not utilize the `STRICTLY_SIMPLE` flag because
clipper1 did not actually guarantee a strictly simple polygon.
Currently we ignore this flag but we may decide to run strictly-simple
operations through a second NULL union to simplify the results as much
as possible.

Additionally, the inflation options are slightly different.  We cannot
choose the fallback miter.  The fallback miter is always square.  This
only affects the CHAMFER_ACUTE_CORNERS option in inflate, which does not
appear to be used.

Lastly, we currently utilize the 64-bit integer coordinates for
calculations.  This appears to still be faster than 32-bit calculations
in Clipper1 on a modern x86 system.  This may not be the case for older
systems, particularly 32-bit systems.
2022-10-19 16:25:45 -07:00
Marek Roszko d6f8ca9a2e Patch out the install for argparse 2022-10-12 23:17:05 -04:00
Mark Roszko fb8a4c10f7 Shove kicad2step into pcbnew itself with a new cli 2022-10-04 01:53:37 +00:00
Alex ec6cb49570 Fix warnings in rectpack2D. 2022-09-28 13:37:23 +00:00
Alex 120da60824 Add rectpack2D library. 2022-09-28 13:37:23 +00:00
Ian McInerney 31498673b7 nanodbc: Add readme describing thirdparty module 2022-09-24 01:37:57 +01:00
Ian McInerney 69a6ddae03 nanodbc: Remove extra CXX flags from the build
nanodbc was overriding the C++ standard library being used, which would
break builds with clang. Additionally, adding Werror unconditionally in
production code is a bad idea because different compiler versions can
change/add warnings and then break the code.
2022-09-24 01:37:57 +01:00
Jon Evans 60f6bb8c77 DbLib: Fixes for MySQL ODBC driver
SQLSetConnectAttr crashes for this driver, and SQLSetStmtAttr is the ODBC3 way anyway.
2022-09-01 00:24:56 -04:00
Jon Evans c98ad7218a Explicitly build fmt as static lib 2022-08-31 09:03:26 -04:00
Jon Evans ae6a2a6443 ADDED: Database libraries MVP
Allows placing parts from an external database that reference symbols from another loaded library.

Includes:
- nanodbc wrapper
- database schematic library plugin
- basic tests

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7436
2022-08-26 10:51:13 -04:00
Jon Evans 20ba716c1f Patch nanodbc for postgres support 2022-08-26 09:38:11 -04:00
Jon Evans 63a6237d2d Remove second Boost find routine 2022-08-26 09:38:11 -04:00
Jon Evans 31c24f4421 Add nanodbc 2022-08-26 09:38:11 -04:00
Marek Roszko 96446cba1d Update sentry sdk 2022-08-15 20:48:53 -04:00
Marek Roszko ed08b0ecf6 Add some missing sentry-native cmake 2022-08-15 19:12:46 -04:00
Marek Roszko 6bc2f0eece add missing {fmt} cmake files 2022-08-15 07:52:42 -04:00
Jon Evans 6365a37042 Add {fmt} library 2022-08-14 22:49:55 -04:00
Alex fb7bc263de Slight optimization in RTREE_QUAL::RectSphericalVolume. 2022-07-16 19:51:32 +03:00
Seth Hillbrand 03c279ffd4 ADDED: Threadpool
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs.  This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta.  It
also avoids the heuristics needed to determine the optimal number of
threads to spawn
2022-06-24 22:59:24 +00:00
Seth Hillbrand 8f1b2acdc6 Fix one missing commit for MSVC 2022-06-20 16:40:47 -07:00
Seth Hillbrand c483c58276 Patch pybind11 for MSVC
Re-comit of earlier ef38642bf1 after updating pybind11 to 2.9.2
2022-06-20 16:21:37 -07:00
Seth Hillbrand 8d003804e0 Update pybind11 to 2.9.2
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10729
2022-06-20 16:21:22 -07:00
Marek Roszko 9a0fa460d1 Add missing sentry-native file
gitignore gone wrong
2022-04-03 21:23:10 -04:00
Mark Roszko f0f33ef1d3 Introduce sentry for crash data collection 2022-04-02 01:21:55 +00:00
jean-pierre charras 9a342458fa Fix a few Coverity and compil warnings. 2022-03-26 16:21:23 +01:00
Sylwester Kocjan a65999b063 qa: Add Turtle 1.3.2 mocking framework 2022-03-18 17:51:09 +00:00
Marek Roszko 28ce11212c Emplace_back a bit a in clipper 2022-02-05 21:00:34 -05:00
markus-bonk be58ab679b Fix coding style policy violations and CMake version.
Fix violations of 4.2.2 Function Definitions and 4.2.3 Control
Statements.
Set the minimum CMake version required to build to 3.1.
Removed the Visual Studio solution and project files.
2022-01-28 12:21:42 +00:00
markus-bonk b9a27a8fab Fix build issues macOS and msys2
Added #if USE_DECLSPEC_PROPERTY condition to control use of
__declspec(property). The -fdeclspec now is not needed to compile using
clang.

Removed use of the IS_INTRESOURCE() macro to the inline method bool
IsIntResource() as the former depends on Windows.h.
2022-01-28 12:21:42 +00:00
markus-bonk aec7802fcf EDA_3D_VIEWER_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Full support for using a 3Dconnexion device in the 3D viewer has been added. Full 3D navigation is available for both the orthographic and perspective projections. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

ADDED: A build option KICAD_USE_3DCONNEXION (default = ON) has been added to the main CMakeLists.txt. The option controls whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk f61c798295 Fix compilation errors in Fedora pipeline. 2022-01-28 12:21:42 +00:00
markus-bonk c99a4f4d85 Include the required third party code for the SpaceMouse implementation
The commit only adds the headers and code required by the SpaceMouse
implementation to compile and link. This extract from the 3Dconnexion
SDK is added to the third party directory to allow developers to build without
needing to acquire a cmake enabled version.
2022-01-28 12:21:42 +00:00
alexfanqi 01f0aad7c0 Add riscv64 support for libcontext
modified to match function arguments different from upstream

Author: Andreas Schwab
2022-01-27 13:12:43 +00:00
Ola Rinta-Koski dcab2833b8 PEGTL 2.x->3.x 2022-01-10 23:22:23 +00:00
Jeff Young e41a4d406a Cherry-pick MARKUP_PARSER from rockola/kicad-strokefont. 2022-01-02 14:57:03 +00:00
Peng Peng b7ab5330bf Adding the LoongArch CPU support for libcontext 2021-10-27 19:46:52 +00:00
Tomasz Wlostowski c60eecc165 thirdparty/dxflib: suport for vertex start/end line width attribute.
This change is required to correctly import DXFs exported by Cadence.
2021-10-25 17:37:38 +02:00
Marek Roszko fc3fb86cb5 Bump the dxflib version string to match upstream 2021-10-23 08:18:20 -04:00
Marek Roszko 643d7cc303 fix check for DXF R12 variables 2021-10-23 08:18:19 -04:00
Marek Roszko ade9418300 Add dxf write support for dimtad, dimtih 2021-10-23 08:18:19 -04:00
Marek Roszko e0ccf553f8 Add vertexIndex bounds check 2021-10-23 08:18:19 -04:00
Seth Hillbrand 62b7239ed1 Adjust M1 alignment for better performance 2021-10-18 13:27:08 -07:00
qu1ck a221f7aa56 Mark json validator lib explicitly STATIC 2021-09-25 13:24:10 +00:00
Marek Roszko daca9d21f2 Add dxf point import
Fix #9149
2021-09-12 19:38:52 -04:00
Seth Hillbrand 45c7ef7e76 Remove last pybind11 forcing non-debug libs 2021-08-31 09:19:26 -07:00
Seth Hillbrand fc01eb73ae Remove unused elif in FindPythonLibsNew.cmake 2021-08-31 09:12:14 -07:00
Marek Roszko ef38642bf1 Patch pybind11 for MSVC
Pulls a series of patches for MSVC options from earlier in tree
2021-08-31 06:35:35 -07:00
Seth Hillbrand 317fae2098 Update Pybind11 to prevent conflict with wxTranslate
We change the pybind templates '_' to be '_x' to avoid conflicting with
the wxTranslate macro `_`
2021-08-30 16:55:49 -07:00
Seth Hillbrand 84c7cc6c21 Update to pybind11 v2.7.1 2021-08-30 16:55:36 -07:00
qu1ck 1d17e12371 Add json-schema-validator library 2021-08-27 21:11:47 +00:00
qu1ck 2ba41c9b27 Add picosha2 library 2021-08-27 21:11:47 +00:00
Roberto Fernandez Bautista cad27f9baa Clipper: Use std::function for Z fill callback 2021-07-03 19:37:50 +00:00
Roberto Fernandez Bautista 83263784ea Define use_xyz in clipper.hpp to allow use of Z values 2021-07-03 19:37:50 +00:00
Marek Roszko 2bde19bde2 Patch pybind11 to use debug python libraries on windows 2021-06-01 20:18:24 +00:00
Marek Roszko 3c361aae59 Fix vcpkg find of python libraries 2021-06-01 20:18:24 +00:00
Seth Hillbrand d585b6580d Patchup pybin11 FindPythonLibsNew for MSVC 2021-06-01 20:18:24 +00:00
Seth Hillbrand 24f6cc99fa Add missing cmake 2021-06-01 20:18:24 +00:00
Seth Hillbrand 256f259627 Fix PyBind11 _ usage to be compatible with i18n 2021-06-01 20:18:24 +00:00
Seth Hillbrand 81d58bcea9 Working python window 2021-06-01 20:18:24 +00:00
Mark Roszko 27bf45417a Fix typo in arch name 2021-03-12 15:05:38 +00:00
Marek Roszko db1f457ff9 Add msvc flag definition for ARM64 2021-03-10 21:48:04 -05:00
Marek Roszko 204e615b49 Fix wrong offset in msys2 x64 libcontext implementation not saving fiber data pointer
This should have/may have been causing random crashes on calls into win32 api. fiber data is located at offset 0x20 of the stack not 0x18.
2021-03-07 15:55:23 -05:00
Marek Roszko ccaf352a5e Add /safeseh for 32bit msvc libcontext
Special flag thats default for modern platforms already
2021-03-04 22:20:58 -05:00
Marek Roszko 2bf488e0c7 Add cmake option to enable win32 fibers 2021-03-04 21:48:26 -05:00
Marek Roszko bdb141da0a Fix fiber local storage offset (crashfix) 2021-03-03 21:14:17 -05:00
Marek Roszko 320b519278 Add assembly based libcontext implementation for MSVC builds 2021-03-03 21:14:17 -05:00
Jon Evans 24e375742b Update nlohmann::json to 3.9.1
Release notes:
https://github.com/nlohmann/json/releases/tag/v3.9.1
2021-03-03 19:36:05 -05:00
Marek Roszko 907e282347 Silence some msvc warnings
- exception variables that were unused
- RAYSEG2D improperly foward declared with class instead of struct
- unused vars
2021-02-20 11:58:55 -05:00
Marek Roszko 627d321ec5 Remove questionable dropping of inline for msvc in markdown2html 2021-01-31 19:54:33 -05:00
Marek Roszko 9d0b16e814 bool/int type safety 2021-01-31 19:54:32 -05:00
Marek Roszko b17ba9d632 Tiny tiny cleanup 2021-01-31 19:09:28 -05:00
Seth Hillbrand 1a3ab551cf Cleanup
FindLineSegmentIntersection() was refactored in 2012 but there are a few
uses that didn't get updated.  This finalizes the cleanup

Fixes https://gitlab.com/kicad/code/kicad/issues/7365
2021-01-31 15:55:52 -08:00
Jiajie Chen ce8039c327 libcontext: Initial support for Apple Silicon
The assembly for apple_arm64 is adapted from linux_arm64 target with small modifications:

1. Re-enable FPU conditional save/restore as apple_x86_64 does
2. Workaround limitation in relocation in assembly for clang
2021-01-08 19:51:28 +00:00
Ian McInerney 580293c7fa libcontext: Call exit instead of random memory address on MSW x86_64
The original call would jump to a meaningless low address on error,
but the upstream Boost context and 32bit version of this function
call exit to properly terminate the code when this error occurs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6820
2020-12-23 23:40:56 +00:00
Ian McInerney 31c5776fc0 Add missing header to rtree
Another GCC11 header change that broke the build
2020-12-09 23:13:33 +00:00
jean-pierre charras 20880268bf fix a few Coverity warnings 2020-11-26 07:36:37 +01:00
jean-pierre charras e5daac97c2 fix compil warrnings (shadowed vars) 2020-11-20 09:13:31 +01:00
Marek Roszko 6dfcc8a755 dxflib_qcad: add <cstring> to includes for strlen() prototype
upstream commit
d4ea687c4a6039a43cc782fbbce477720df11e78
2020-11-19 19:19:59 -05:00
Marek Roszko 86d4daa591 dxflib_qcad: add support for flipped dimension arrows to dxflib
upstream: 2f8c19e2a4434f1ce2b94ac798028b9bb12c983a
2020-11-19 19:19:59 -05:00
Marek Roszko d7e10c22c6 dxflib_qcad: match rename of DimAngularData to DimAngularData2L
upstream 1655be6c7d58609397e9f04cfaff08336d69b20e
2020-11-19 19:19:59 -05:00
Marek Roszko baebf7036f dxflib_qcad: Saving dimension with custom text position
upstream commit b4c74180a6857c7b63f7a71e1236930e85c15134
2020-11-19 19:19:59 -05:00
Marek Roszko 5ea6755594 dxflib_qcad: add dimscale support for leaders
upstream commit
049e1bf95138f32360609b83372e358963a9dd9c
2020-11-19 19:19:59 -05:00
Marek Roszko ac31cee0cc dxflib_qcad: fix DL_POLYLINE3D flag definition
upstream commit
3504cddee254bec2240456d8b3acbbc2dec06fef
2020-11-19 19:19:58 -05:00