A helper class that generates a CMakefile that can be used to compile the generated C code.
More...
A helper class that generates a CMakefile that can be used to compile the generated C code.
Adapted from
- See also
- org.lflang.generator.CppCmakeGenerator.kt
- Author
- Soroush Bateni
-
Peter Donovan
◆ CCmakeGenerator() [1/2]
| org.lflang.generator.c.CCmakeGenerator.CCmakeGenerator |
( |
FileConfig | fileConfig, |
|
|
List< String > | additionalSources ) |
◆ CCmakeGenerator() [2/2]
| org.lflang.generator.c.CCmakeGenerator.CCmakeGenerator |
( |
FileConfig | fileConfig, |
|
|
List< String > | additionalSources, |
|
|
SetUpMainTarget | setUpMainTarget, |
|
|
String | installCode ) |
◆ generateCMakeCode()
| CodeBuilder org.lflang.generator.c.CCmakeGenerator.generateCMakeCode |
( |
List< String > | sources, |
|
|
boolean | CppMode, |
|
|
boolean | hasMain, |
|
|
String | cMakeExtras, |
|
|
LFGeneratorContext | context ) |
|
package |
Generate the contents of a CMakeLists.txt that builds the provided LF C 'sources'.
Any error will be reported in the 'errorReporter'.
- Parameters
-
| sources | A list of .c files to build. |
| CppMode | Indicate if the compilation should happen in C++ mode |
| hasMain | Indicate if the .lf file has a main reactor or not. If not, a library target will be created instead of an executable. |
| cMakeExtras | CMake-specific code that should be appended to the CMakeLists.txt. |
| context | The context of the code generator. |
- Returns
- The content of the CMakeLists.txt.
◆ setCmakeGenerator()
| void org.lflang.generator.c.CCmakeGenerator.setCmakeGenerator |
( |
SetUpMainTarget | setUpMainTarget | ) |
|
Set the code generator for the CMake main target.
- Parameters
-
◆ MIN_CMAKE_VERSION
| final String org.lflang.generator.c.CCmakeGenerator.MIN_CMAKE_VERSION = "3.19" |
|
static |
The documentation for this class was generated from the following file:
- /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java