AMO Tools Suite is a cross-platform collection of calculations and tools to support industrial equipment modeling. See our hosted documentation for the latest release at ornl-amo.github.io
- make
- CMake (cmake-curses to use the ccmake gui)
- GCC 4.8.5 or later
- Windows: Visual Studio Build Tools or Cygwin with other C++ compiler
- Doxygen (only for building documentation)
- Emscripten (emsdk) - Follow instructions for install, using '2.0.16' in place of 'latest' https://emscripten.org/docs/getting_started/downloads.html
- Node https://nodejs.org/en/ v12.8.0
- gyp: follow instructions for the OS at https://github.com/nodejs/node-gyp
- depending on platform and instructions, it states the correct python version to install or installs it
- Install node_modules dependencies:
cd
into AMO-Tools-Suite directory and run
npm install
cd
into the emsdk directory:- run
emsdk activate latest
(Build must target this version, if trouble try version 2.0.16)
- run
cd
into AMO-Tools-Suite directory:- run
emcmake cmake -DBUILD_WASM=ON -G "MinGW Makefiles"
- Note: If multiple compilers are present and default environment is not used, use -G "XXX Makefiles",
example for windows =>
emcmake cmake -D BUILD_WASM=ON -G "MinGW Makefiles"
- Note: If multiple compilers are present and default environment is not used, use -G "XXX Makefiles",
example for windows =>
- run
emmake mingw32-make
(or other make-file)
- run
- Edit the CMakeCache and enable desired build options via the ccmake tool:
ccmake .
andmake
to build - If ccmake isn't available, use
cmake -D BUILD_TESTING:BOOL=ON -D BUILD_PACKAGE:BOOL=OFF --config Debug ./
andcmake --build .
where config can beRelease
,Debug
,MinSizeRel
orRelWithDebInfo
- To build node modules:
npm install
or if already installed,node-gyp rebuild
to rebuild the modules
- To run the JavaScript unit tests for the node addons:
npm run test
- To run the WASM unit tests use:
npm run test-wasm
- To build C++ unit tests directly, ensure the
BUILD_TESTING
flag is set then:cmake --build . --target amo_tools_suite_tests
- On MacOS or Linux, the test executable can be found under the
bin
directory. On Windows, the executable can be found under either theDebug
orRelease
directories, depending on CMake configuration
- To run the JavaScript acceptance tests (roundtrip testing of JavaScript bindings to calculations to output validation):
npm run at
- Enable the
BUILD_PACKAGE
flag in the CMakeCache, thencmake ./
thenmake package
- Or use this directly for Windows:
cmake -D BUILD_TESTING:BOOL=OFF ./
andcmake --build . --config Release --target PACKAGE
- To make package on Linux or Mac, run
ccmake.
and set BUILD_TESTING OFF, BUILD_PACKAGE ON, then configure and generate. Thenmake package
.
- To generate documentation:
doxygen Doxyfile