Compile using CMD (Terminal)
This is probably the simplest way to compile the project, however, a couple of requisites must be fulfilled.
- Step out the projects folder to compile from the outside.
- Create a Build folder. This is where the DLL/so/EXE will be stored.
- Set the target, for that enter the following commands:
cmake -DCMAKE_BUILD_TYPE=Release -DMyOutputType:STRING=EXE ../OpenDSSC
- Compile using the following command
cmake --build . -j 12
As can be seen in step 3, the type of output (EXE/DLL) is specified in the argument -DMyOutputType. If the user wants to generate a command line executable use the value EXE, otherwise, use DLL (no matter the operating system). The build type or compilation purpose must be specified at the argument -DCMAKE_BUILD_TYPE. At the example presented on step 3 the compilation is for a release version. Otherwise, the user can use Debug if required.