-
Notifications
You must be signed in to change notification settings - Fork 1
Development
I highly recommend to use the Qt Creator IDE for developing the code. It is much faster than Visual Studio, runs cross platform (you do not have to change IDE when switching platforms), has much better code navigation ("find uses", "go to definition") and a much more robust code analysis than VC. Also, it is free for open-source development.
In order to create code that matches the coding-guidelines, please setup Qt Creator as described in Qt Creator Editor Settings.
See the following documents for guidelines/settings to use:
This is a cross-platform project, so line-ending settings should be set correctly: on Windows checkout CRLF, but commit unix-style LF.
You can set this via the command line:
git config --global core.autocrlf true
Or when using SmartGit edit repository/user git config and specify:
[pull]
rebase = true
[core]
autocrlf = true
git config --global core.autocrlf input
Building the solver is automated via command line scripts:
On Linux/Mac:
cd build/cmake
# build with 4 CPUs in release mode
./build.sh 4 release
On Windows:
cd build/cmake
:: build with 4 CPUs in release mode
build.bat 4 release
OpenHAM is just a single command line executable, statically built against dependend libraries. All you need to do is copy the executable.
On Windows you may need to copy the following DLLs alongside the executable, unless already installed on the target machine (via VC redistributable or similar).
When building with VC 2015:
msvcp140.dll
vcruntime140.dll
When building with GCC:
libgcc_s_dw2-1.dll
libstdc++-6.dll
libwinpthread-1.dll
Using Qt Creator for development is recommended. To ensure consistency in source code, please use the following settings to configure your editor.
Edit the project's coding style, clone the preset and set:
-
Text editor -> Behavior:
Use Spaces instead of Tabs = off Tab width = 4 Clean whitespaces = Entire Document
-
Text editor -> Display (try to keep lines within this limit):
Show right margin = 120 chars
- Open the menu and go to Options/Preferences.
- Open and select the C++ conventions.
- Remove the lower case option for filenames and save your configuration by clicking Apply/OK.