OpenCOR (and its corresponding tests) can be built, tested and run either from the command line or using Qt Creator. By default, Ninja is used to build OpenCOR, but if it is not available, then JOM (on Windows) or Make (on Linux/macOS) will be used.
Various batch/VBScript files (.bat
| .vbs
) and shell scripts are available on Windows and Linux/macOS, respectively:
[OpenCOR]/ci
[.bat
]: build and test everything, both in release and debug mode;
[OpenCOR]/cd
[.bat
]: build our documentation;
[OpenCOR]/clean
[all
][.bat
]: clean (all) the OpenCOR environment;
[OpenCOR]/make
[.bat
]: build a release version of OpenCOR;
Note: if you use Make, then OpenCOR will, by default, be built sequentially.
You can, however, specify a maximum number of jobs (n
) to be run simultaneously by calling make -j [n]
.
If no n
value is provided, then as many jobs as possible will be run simultaneously.
[OpenCOR]/maketests
[.bat
]: build a debug version of OpenCOR suitable for testing;
[OpenCOR]/run
[.bat
| .vbs
]: run OpenCOR; and
Note: on Windows, if you run OpenCOR from a console window by entering run
, then run.bat
will be executed (rather than run.vbs
), offering you the opportunity to use OpenCOR as a CLI application.
However, if you run OpenCOR by double clicking run.bat
in, say, Windows Explorer, then a console window will quickly appear and disappear.
To avoid this, use run.vbs
.
[OpenCOR]/runtests
[.bat
]: runs OpenCOR’s tests.
Start Qt Creator;
Open [OpenCOR]/CMakeLists.txt
(by selecting the File
| Open File or Project...
menu or by pressing Ctrl
+O
;
Configure the project as you see fit and click on the Configure Project
button;
Configure CMake, if needed, by going to the Projects
page and setting, for example, ENABLE_TESTS
to ON
, and click on the Run CMake
button; and
Build and run OpenCOR (by selecting the Build
| Run
menu or by pressing Ctrl
+R
).