AMO-Tools-Suite
AMO-Tools-Suite copied to clipboard
AMO-Tools-Suite is an energy efficiency calculation library in C++ with optional Nan Node add-on bindings for the Department of Energy Advanced Manufacturing Office (DOE AMO) Desktop, also known as ME...
AMO Tools Suite
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
Dependencies
C++
- 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)
Web Assembly Compilation SDK
- Emscripten (emsdk) - Follow instructions for install https://emscripten.org/docs/getting_started/downloads.html
Node
- Node LTS https://nodejs.org/en/
Building
- 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
- Note: If multiple compilers are present and default environment is not used, use -G "XXX Makefiles",
example for windows using MinGW =>
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 using MinGW =>
- run
emmake make
(oremmake
and specify makefile related to above note)
- run
Unit Tests
- 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
Packaging
- 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
.
Documentation
- To generate documentation:
doxygen Doxyfile