← Back to team overview

kicad-developers team mailing list archive

Re: Simulator towards 5.0

 

This patch changes the default build values in cmake, and adds an instruction on how to disable the the spice simulator in the cmake error.

 -Kristoffer

On 12/05/2017 05:30 PM, Maciej Sumiński wrote:
When you build a program, do you always go through its build manual or
do you start with 'cmake .. && make'? I think there is no point
enforcing an optional dependency. Another good solution would be to
autodetect libngspice and enable the simulator if it is available.

On 12/05/2017 05:18 PM, Nick Østergaard wrote:
Isn't it good enough to mention it under the KiCad Build Configuration
Options in the devdocs as it is already?


2017-12-05 16:56 GMT+01:00 Maciej Sumiński <maciej.suminski@xxxxxxx>:

If everyone agrees that Spice simulator should be enabled by default,
then please display a note saying it is optional and might be disabled
for cases when it is not found by CMake.

Regards,
Orson

On 12/05/2017 03:47 PM, Nick Østergaard wrote:
If they are not available for some reason the packager for that platform
can disable the feature until he figures out how to support the feature.

I don't really see the rationale in having supported features be enabled
explicitly.

2017-12-05 15:33 GMT+01:00 Wayne Stambaugh <stambaughw@xxxxxxxxx>:

Can we guarantee that these build dependencies are available on all
platforms?  I'm primarily think of BSD devs.  For the windows, macos,
and linux devs there are no issues.

On 12/5/2017 9:28 AM, Nick Østergaard wrote:
I would personally also like to see these options enabled by default.
It
makes it easier for a packager to be convinced what options to
enable...
:)

2017-12-05 15:05 GMT+01:00 Kristoffer Ödmark
<kristofferodmark90@xxxxxxxxx <mailto:kristofferodmark90@xxxxxxxxx>>:

     I checked the default package in Ubuntu ppa through a friend.
Indeed
     all of this is enabled.

     Here I attach a small patch that changes the default compile-flags
     to the ones in the released packages. Its a small fix and it doesnt
     add or remove anything really, just a changes how a default build
     for a novice will look, maybe it will reduce some initial confusion
     for someone.

     - Kristoffer

     On 12/04/2017 10:19 PM, Nick Østergaard wrote:



         Den 4. dec. 2017 18.50 <tel:2017%2018.50> skrev "kristoffer
         Ödmark" <kristofferodmark90@xxxxxxxxx
         <mailto:kristofferodmark90@xxxxxxxxx>
         <mailto:kristofferodmark90@xxxxxxxxx
         <mailto:kristofferodmark90@xxxxxxxxx>>>:



             On 2017-12-04 15:22, Tomasz Wlostowski wrote:

                 Kristoffer,

                 You're very welcome to specify how you'd like to have
the
                 Spice-related
                 fields organized - but remember it's not only the
         integrated ngspice
                 simulator that relies on them. People have been
         exporting PSpice
                 netlists from Kicad for a while and AFAIR netlist
export
         depends on
                 these particular fields.

             Okay, My suggestions:

             1. Enable the spice simulator by default and start shipping
         it with
             windows nightlies. This way we will find much more bugs.
         Because I
             doubt everyone is running with the simulator on even on
         nightlies.
             Same goes for the OCE and step stuff. This I see as a must
         to get a
             smoother v5 transition for most users, even those moving
from v4
             stable to v5 stable without ever trying nightlies.


         Everything should be enabled for the windows nightlies. It has
         been when the OCE stuff and ngspice stuff was merged. If it not
         it is a bug.


             2. Parse the "value" field and reference in the simulator
to
         get the
             basic primitives. like Resistor and Capactiors, inductors
         etc, based
             on the first Letter in the Reference. We already have
         name-dependent
             functions for the differential-pair so having this here,
and

             3. Move the Spice_Netlist_Enabled field to a new right-side
         toggle
             menu to select between "Spice and PCB, Spice Only, PCB
         only", so one
             can specify if the item should be added to both the PCB and
the
             Spice netlist, or only one of them, by default I guess both
         should
             be enabled.

             4. When the Spice_Model field is selected, the button "Edit
         Spice
             Model" should be shown under there, instead of always on
the
         left
             side. Just to be more like the other fields.

             5. Add context-menu entries and toolbar buttons for the
         simulator
             interface.

             This would make the simulator seem like its a part of kicad
         and not
             only a strange addon that is just hackishly attached to
         kicad with
             duct-tape. Dont get me wrong, Its an awesome feature, and
         works well
             it just looks like an outsider when using it currently.



                 As for the polishing up before the V5, there's several
         tasks to do:
                 - update the pspice.lib library (it doesn't follow the
         KLC) and make
                 sure all Spice devices are in there.
                 - fix quirks in the plot component (wxMathPlot).
                 - document and make a few example designs (I can help
         with this
                 point).

                 Cheers,
                 Tom



             _______________________________________________
             Mailing list: https://launchpad.net/~kicad-developers
         <https://launchpad.net/~kicad-developers>
             <https://launchpad.net/~kicad-developers
         <https://launchpad.net/~kicad-developers>>
             Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
             <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
             Unsubscribe : https://launchpad.net/~kicad-developers
         <https://launchpad.net/~kicad-developers>
             <https://launchpad.net/~kicad-developers
         <https://launchpad.net/~kicad-developers>>
             More help   : https://help.launchpad.net/ListHelp
         <https://help.launchpad.net/ListHelp>
             <https://help.launchpad.net/ListHelp
         <https://help.launchpad.net/ListHelp>>





_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp




_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp




_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp







_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

>From 581d3c7f499b52a138004d724c266243f9288368 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20=C3=96dmark?= <kristoffer.odmark90@xxxxxxxxx>
Date: Tue, 5 Dec 2017 14:33:10 +0100
Subject: [PATCH] Changed default compile-flags to match released packages

added a message on how to compile without spice support if needed
---
 CMakeLists.txt                         | 30 +++++++++++++++++++-----------
 Documentation/development/compiling.md | 12 ++++++------
 2 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c70a34237..44bb23a2b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,24 +54,24 @@ option( USE_WX_OVERLAY
     "Use wxOverlay: Always ON for MAC (default OFF).  Warning, this is experimental" )
 
 option( KICAD_SCRIPTING
-    "Build the Python scripting support inside KiCad binaries (default OFF)."
-    )
+    "Build the Python scripting support inside KiCad binaries (default ON)."
+    ON )
 
 option( KICAD_SCRIPTING_MODULES
     "Build native portion of the pcbnew Python module: _pcbnew.{pyd,so} for OS command line use of Python."
-    )
+    ON )
 
 option( KICAD_SCRIPTING_WXPYTHON
-    "Build wxPython implementation for wx interface building in Python and py.shell (default OFF)."
-    )
+    "Build wxPython implementation for wx interface building in Python and py.shell (default ON)."
+    ON )
 
 option( KICAD_SCRIPTING_ACTION_MENU
-    "Build a tools menu with registred python plugins: actions plugins (default OFF)."
-    )
+    "Build a tools menu with registred python plugins: actions plugins (default ON)."
+    ON )
 
 option( KICAD_USE_OCE
-    "Build tools and plugins related to OpenCascade Community Edition (default OFF)"
-    )
+    "Build tools and plugins related to OpenCascade Community Edition (default ON)"
+    ON )
 
 option( KICAD_INSTALL_DEMOS
     "Install kicad demos and examples (default ON)"
@@ -97,7 +97,7 @@ endif()
 
 option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON )
 
-option( KICAD_SPICE "Build Kicad with internal Spice simulator." OFF )
+option( KICAD_SPICE "Build Kicad with internal Spice simulator." ON )
 
 # Global setting: exports are explicit
 set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
@@ -554,7 +554,15 @@ endif()
 
 # Find ngspice library, required for integrated circuit simulator
 if( KICAD_SPICE )
-    find_package( ngspice REQUIRED )
+    find_package( ngspice )
+    if( NOT NGSPICE_FOUND )
+        message( FATAL_ERROR "Required ngspice library not found, to \
+        compile kicad without integrated circuit simulator, run cmake with \
+        -DKICAD_SPICE=OFF" )
+    endif()
+
+
+
 endif()
 
 # Find OpenCascade Community Edition, required for STEP plugin and tools
diff --git a/Documentation/development/compiling.md b/Documentation/development/compiling.md
index 43d388235..0c3578c01 100644
--- a/Documentation/development/compiling.md
+++ b/Documentation/development/compiling.md
@@ -132,17 +132,17 @@ on macOS.  This is enabled on macOS by default and disabled on all other platfor
 ## Scripting Support ## {#scripting_opt}
 
 The KICAD_SCRIPTING option is used to enable building the Python scripting support into Pcbnew.
-This options is disabled by default.
+This options is enabled by default.
 
 ## Scripting Module Support ## {#scripting_mod_opt}
 
 The KICAD_SCRIPTING_MODULES option is used to enable building and installing the Python modules
-supplied by KiCad.  This option is disabled by default.
+supplied by KiCad.  This option is enabled by default.
 
 ## wxPython Scripting Support ## {#wxpython_opt}
 
 The KICAD_SCRIPTING_WXPYTHON option is used to enable building the wxPython interface into
-Pcbnew including the wxPython console.  This option is disabled by default.
+Pcbnew including the wxPython console.  This option is enabled by default.
 
 ## GitHub Plugin ## {#github_opt}
 
@@ -153,14 +153,14 @@ enabled by default.
 
 The KICAD_SPICE option is used to control if the Spice simulator interface for Eeschema is built.  When
 this option is enabled, it requires [ngspice][] to be available as a shared library.  This option is
-disabled by default.
+enabled by default.
 
 ## STEP/IGES support for the 3D viewer ## {#oce_opt}
 
 The KICAD_USE_OCE is used for the 3D viewer plugin to support STEP and IGES 3D models. Build tools
 and plugins related to OpenCascade Community Edition (OCE) are enabled with this option. When
 enabled it requires [OCE][] to be available, and the location of the installed OCE library to be
-passed via the OCE_DIR flag. This option is disabled by default.
+passed via the OCE_DIR flag. This option is enabled by default.
 
 ## Demos and Examples ## {#demo_install_opt}
 
@@ -172,7 +172,7 @@ $PREFIX/share/kicad/demos by default.
 ## Python Scripting Action Menu Support ## {#python_action_menu_opt}
 
 The KICAD_SCRIPTING_ACTION_MENU option allows Python scripts to be added directly to the Pcbnew
-menu.  This option is disabled by default.  Please note that this option is highly experimental
+menu.  This option is enabled by default.  Please note that this option is highly experimental
 and can cause Pcbnew to crash if Python scripts create an invalid object state within Pcbnew.
 
 ## Setting the Build Version and Repository Name ## {#build_version_opt}
-- 
2.15.1


References