Skip to content

Commit

Permalink
Add to find sst library, when using communication mode sst.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakio815 committed Feb 2, 2025
1 parent 259c2d0 commit af37f6f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.lflang.target.property.SingleThreadedProperty;
import org.lflang.target.property.TracePluginProperty;
import org.lflang.target.property.WorkersProperty;
import org.lflang.target.property.type.CommunicationModeType.CommunicationMode;
import org.lflang.target.property.type.PlatformType.Platform;
import org.lflang.util.FileUtil;

Expand Down Expand Up @@ -431,6 +432,13 @@ CodeBuilder generateCMakeCode(
cMakeCode.pr("set(COMM_TYPE " + targetConfig.get(CommunicationModeProperty.INSTANCE) + ")");
cMakeCode.newLine();
}
if (targetConfig.get(CommunicationModeProperty.INSTANCE) == CommunicationMode.SST) {
// If communication mode is SST, find sst package.
cMakeCode.pr("# Find sst-c-api and link to it.");
cMakeCode.pr("find_package(sst-lib REQUIRED)");
cMakeCode.pr("target_link_libraries(${LF_MAIN_TARGET} PRIVATE sst-lib::sst-c-api)");
cMakeCode.newLine();
}

if (!targetConfig.get(SingleThreadedProperty.INSTANCE)
&& platformOptions.platform() != Platform.ZEPHYR
Expand Down

0 comments on commit af37f6f

Please sign in to comment.