Commit Graph

495 Commits

Author SHA1 Message Date
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