Skip to content

Commit

Permalink
Fix adding LF_SOURCE_GEN_DIRECTORY flag to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadliaJerad committed Jan 13, 2025
1 parent 00e2492 commit b19c602
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/org/lflang/generator/c/CCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,14 @@ private static List<String> cmakeOptions(TargetConfig targetConfig, FileConfig f
"-DLF_FILE_SEPARATOR='" + quote + separator + quote + "'"));
// Add #define for source file directory.
// Do not do this for federated programs because for those, the definition is
// put into the cmake file (and fileConfig.srcPath is the wrong directory anyway).
// put into the cmake file (and fileConfig.srcPath is the wrong directory
// anyway).
if (!fileConfig.srcPath.toString().contains("fed-gen")) {
// Do not convert to Unix path
arguments.add("-DLF_SOURCE_DIRECTORY='" + quote + srcPath + quote + "'");
arguments.add("-DLF_PACKAGE_DIRECTORY='" + quote + rootPath + quote + "'");
} else {
arguments.add("-DLF_SOURCE_GEN_DIRECTORY='" + quote + srcGenPath + quote + "'");
}
arguments.add("-DLF_SOURCE_GEN_DIRECTORY='" + quote + srcGenPath + quote + "'");
arguments.add(FileUtil.toUnixString(fileConfig.getSrcGenPath()));

if (GeneratorUtils.isHostWindows()) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/c/reactor-c

0 comments on commit b19c602

Please sign in to comment.