ExecutablesΒΆ
Executable binaries for training, demonstration, or development-testing purposes should be added as subdirectories to the /src/executables directory. For an easy way to get started, follow these steps:
Duplicate Directory: Duplicate the
src/executables/executable_examplefolder, along with its entire contents, and choose an appropriate name for the new directory. The new directory should be, for example,src/executables/your_new_directory_name.- Include the New Directory: In
src/executables/CMakeLists.txt, add a line to include the newly created directory. Replaceyour_new_directory_namewith the name you just chose. add_subdirectory(executable_example) # Existing add_subdirectory(your_new_directory_name) # Added
- Include the New Directory: In
- In
src/executables/your_new_directory_name/CMakeLists.txt, change thetarget_nameas follows: # set(targetname executable_example) # Remove set(targetname your_new_directory_name) # Add
- In
Rerunning cmake should enable you to select the target dp_your_new_directory_name. Note that this target is excluded from all, meaning that you have to specifically select it to compile and run.