1+ # Xyce(TM) XDM Netlist Translator
2+
13Xyce(TM) XDM Netlist Translator
24Copyright 2002-2020 National Technology & Engineering Solutions of
35Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
@@ -17,7 +19,6 @@ You should have received a copy of the GNU General Public License
1719along with this program. If not, see < http://www.gnu.org/licenses/ > .
1820
1921
20- # Xyce(TM) XDM Netlist Translator
2122
2223XDM uses CMake, the Boost Spirit header files, the Boost Python libraries, and
2324Python 3 to create a mixed language Python/C++ tool called xdm_bdl that can
@@ -29,76 +30,66 @@ along with the XDM User's Guide. Source code for XDM and Xyce can be found here
2930
3031There are two ways to run xdm_bdl both are available with the released version
3132of XDM:
32-
33- 2. As a standalone executable built from xdm_bdl.py and the aforementioned
34- binaries using PyInstaller. Both are available in the release of XDM
35-
3633 1. As a python script xdm_bdl.py that loads the compiled XDM libraries
3734 SpiritCommon, SpiritExprCommon, and XdmRapidXmlReader. These are C++
3835 libraries that can be imported as Python 3 modules.
39-
36+ 2. As a standalone executable built from xdm_bdl.py and the aforementioned
37+ binaries using PyInstaller. Both are available in the release of XDM
4038
4139# Building XDM
4240
43- Building XDM and it's dependents can be tricky since there are many versions of
44- Boost, Python 3, and C++ compilers available not all of which are compatible
45- with each other. In particular older versions of Boost (before Boost 1.70.0)
46- don't have CMake support and XDM developers may have trouble building
47- pre-1.70.0 Boost against later versions of Python 3 and recent C++ compilers.
48- XDM is developed with Boost 1.70.0 and later, Python 3.8 and 3.9, Clang 12, and
49- GCC 8.3 XDM's only C++11 restriction is having a C++11 compatible compiler. As
50- such, older compilers may work but aren't supported. Experience has shown that
51- more modern compilers can yield noticeable speed improvements which may be a
52- factor when converting large files.
41+ Building XDM can be tricky since there are many versions of Boost, Python 3,
42+ and C++ compilers available not all of which are compatible with each other. In
43+ particular older versions of Boost (before Boost 1.70.0) don't have CMake
44+ support and XDM developers may have trouble building against later versions of
45+ Python 3 and recent C++ compilers. XDM is developed with Boost 1.70.0 and
46+ later, Python 3.8 and 3.9, Clang 12, and GCC 8.X.X. XDM's only C++11
47+ restriction is having a C++11 compatible compiler. As such, older compilers may
48+ work as well but aren't supported. Experience has shown that more modern
49+ compilers can yield noticeable speed improvements, which may be a factor when
50+ converting large files.
5351
5452
55- # CMake configure
53+ ## CMake configure
5654
5755The XDM build should be simple given a system where the Boost Python libraries
5856are installed with CMake support and built against Python 3. Something like the
5957CMake command below should work from an empty directory intended to be the
60- XDM build directory .
58+ build XDM .
6159
6260
63- ## Configure with Boost with CMake Support
61+ ### Configure with Boost with CMake Support
6462
65- ```
63+ ```
6664 cmake <path to XDM source> \
6765 -DBOOST_ROOT=<top level boost intallation location> \
68- -DPYINSTALLER_PATH=<path to pyinstaller>
69- ```
66+ -DPyInstaller_PATH=${PyInstaller_PATH}
67+ ```
7068
7169
72- ## Configure with Boost without CMake Support
73-
74- In some cases the Boost CMake configuration files may not be helpful in
75- building XDM. In particular Windows builds of Boost seem to be missing
76- information required to copy the Boost Python libraries to the XDM build
77- directory. (This is required for the Boost-Pytnon modules on Windows). In those
78- cases it helps to tell CMake to not use the Boost CMake configuration files and
79- instead explicitly specify the Boost headers and Boost Python libraries.
70+ ### Configure with Boost without CMake Support
71+
72+ The following should also work in the above case but also if Boost doesn't have
73+ CMake support:
8074
81- ```
75+ ```
8276 cmake <path to XDM source > \
8377 -DBoost_NO_BOOST_CMAKE=ON \
84- -DBoost_INCLUDE_DIR=<path to boost include directory> \
85- -DBoost_PYTHON38_LIBRARY_RELEASE=<path to boost-python release dir> \
86- -DBoost_PYTHON38_LIBRARY_DEBUG=<path to boost-python release dir> \
87- -DPYINSTALLER_PATH=<path to pyinstaller>
88- ```
89-
90- In the above either the Debug or Release version of the libraries are required
91- depending on which CMAKE_BUILD_TYPE is choosen. Of course the "38" in the above
92- snippet refers to the Python 3 major and minor version numbers used to build
93- the Boost Python libraries.
94-
78+ -DBOOST_INCLUDEDIR=<top level boost installation locations >/include \
79+ -DBOOST_LIBARYDIR=<top level boost installation location >k/lib \
80+ -DPyInstaller_PATH=${PyInstaller_PATH}
81+ ```
82+
83+ The "top level boost installation location" should contain the typical
84+ "include" and "lib" directories and with a "lib/cmake" sub-directory that
85+ contains a number of CMake files if CMake support is available.
9586
96- # Notes:
87+ Notes:
9788
9889 1. CMake can be invoked from the command line on Unix-like systems with the
9990 command ```cmake``` or ```ccmake``` to use an interactive NCurses GUI.
100- On Windows CMake also has a GUI and it works much like the Unix based
101- NCurses interface.
91+ On Windows CMake is GUI based and works much like the Unix based NCurses
92+ interface.
10293 2. PyInstaller is optional for building XDM. If is available to CMake it
10394 will be used to create a standalone executable xdm_bdl that can be
10495 relocated and shared with others on compatible systems. If PyInstaller
@@ -121,13 +112,8 @@ the Boost Python libraries.
121112 - [CMAKE_CXX_COMPILER](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html#variable:CMAKE_%3CLANG%3E_COMPILER)
122113 7. For available CMake build configurations see: [CMake Build Variants](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html)
123114 8. XDM will not work with Python 2.
124- 9. Adding the CMake flag "-DPython3_FIND_VIRTUALENV=ONLY" helps CMake find
125- the correct version of Python 3 if you are using a Python virtual
126- environment. By default CMake finds the latest version of Python whether
127- there is a Python interpreter in your path or not.
128-
129115
130- # Common CMake XDM problems:
116+ Common CMake XDM problems:
131117
132118 1. The most common XDM build problem is when Boost is built with a
133119 different version of Python from what CMake found in the configuration
0 commit comments