Commit Graph

418 Commits

Author SHA1 Message Date
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
Seth Hillbrand 2bab30d9ac Allow Kicad to use OpenCascade
Adds the option of using OpenCascade not just the community edition.

Fixes: lp:1628950
* https://bugs.launchpad.net/kicad/+bug/1628950
2018-05-11 17:04:32 -07:00
Wayne Stambaugh 5d71153eab Fix macos build bug caused by commit 2f5fdcf3. 2018-04-30 15:47:50 -04:00
Simon Richter 2f5fdcf329 Don't reference CMAKE_INSTALL_PREFIX in installation paths
This is substituted at configuration time, creating an absolute path, which
breaks overriding CMAKE_INSTALL_PREFIX at installation time, breaking the
workflow for installation using GNU stow.
2018-04-30 10:32:15 -04:00
Seth Hillbrand b46fc7fe9c Adding option for Cmake-based DISTCC/CCACHE 2018-04-16 16:28:15 -07:00
Ievgenii Meshcheriakov 89bf02adb7 Define GLM_FORCE_CTOR_INIT during build
This ensures that GLM objects are still initialized correctly when new
version of this library are used (after 0.9.9-a2).

This also fixes display corruption in 3D-viewer with Raytracer.

Fixes: lp:1762379
* https://bugs.launchpad.net/kicad/+bug/1762379
2018-04-13 14:45:16 +02:00
Jon Evans b813eac254 Omit unnecessary scripts directory from MacOS build output 2018-03-30 22:56:51 -04:00
Bernhard Stegmaier 8f42e128da Fix missing C++-11 compiler flags when building on macOS with non-Xcode clang 2018-03-04 15:00:43 -05:00
Maciej Suminski fad0452c0e Fix builds with scripting disabled
Fixes: lp:1750853
* https://bugs.launchpad.net/kicad/+bug/1750853
2018-02-21 17:46:57 +01:00
Maciej Suminski dd04bcbcbf Make the wxWidgets toolkit test Linux specific
Other platforms (Windows, macOS) have only one base toolkit,
so there is no mismatch risk.
2018-02-21 11:44:32 +01:00
Maciej Suminski 1013f81608 Fix wxWidgets toolkit detection for msys2 builds 2018-02-20 20:33:02 +01:00
Maciej Suminski 792e9015ac CMakeLists: compare wxWidgets and wxPython toolkits
Having wxWidgets and wxPython build using different toolkits leads
to an unusable build. KiCad executables are linked against wxWidgets
shared libraries, which will be in conflict with wxPython ones that
are loaded at runtime. We cannot easily solve it, so at least warn
the users about expected problems.

More information:
https://forum.kicad.info/t/9493
https://bugs.launchpad.net/kicad/+bug/1746753
2018-02-20 17:51:50 +01:00
Maciej Suminski c3197a5906 CMakeLists: detect gtk3 using wx-config 2018-02-17 21:00:16 +01:00
Maciej Suminski 4561b2cba9 GTK3: Display a warning and enable wxGraphicsContext 2018-02-08 11:07:25 +01:00
Wayne Stambaugh 93683d0021 Enable all build configuration options ready for stable 5 release.
Enable Python scripting, OCE, and spice build configuration options.

Update compiling.md to reflect new option settings.
2017-12-29 17:38:42 -05:00
Tomasz Włostowski 8df299a6bc pcbnew: Optimized zone filling algorithm: code cleanup 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 316ddadec1 pcbnew: Optimized zone filling algorithm. 2017-12-05 14:54:57 +01:00
Nick ?stergaard c74437a44e Remove unused custom cmake target
This target seems to only create empty makefiles, tested on linux. And I
can not find any references to it in any of the current CMakeLists. Lets
remove it.
2017-12-03 18:21:40 -05:00
Marvin Schmidt c21a2a8a55 build: Don't install *.bat scripts on Unix 2017-11-09 19:52:17 +01:00
Marvin Schmidt 8a62aeb18d build: Remove dead code 2017-11-09 19:52:17 +01:00
Marvin Schmidt f9516cb48c build: Use CMAKE_INSTALL_DATADIR 2017-11-09 19:52:17 +01:00
Marvin Schmidt b6c3d4eb32 build: Don't install INSTALL.txt 2017-11-09 19:52:17 +01:00
jean-pierre charras 4e391ef21c Housekeeping: remove no more in use options. 2017-11-02 21:01:32 +01:00
jean-pierre charras e2d3fcec02 Add support for custom pad shape. Full support in DRC and PnS.
add option to use shape or convex hull as clearance area in zones.
simplify code to handle clearance area
2017-09-19 09:02:53 +02:00