Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Emit compile instruction if --no-compile flag is introduced #2077

Closed
axmmisaka opened this issue Oct 28, 2023 · 4 comments
Closed

Emit compile instruction if --no-compile flag is introduced #2077

axmmisaka opened this issue Oct 28, 2023 · 4 comments
Labels
c Related to C target cmake cpp Related to C++ target enhancement Enhancement of existing feature good first issue Good for newcomers

Comments

@axmmisaka
Copy link
Collaborator

This is similar to #1986.

I am trying to export src-gen to armv7l target and build there because I couldn't figure out how to make cross-compiling work. It appears that cmake src-gen/TargetName is futile because I need to supply a bunch of flags, which will emit if I do not include --no-compile, something like:

cmake -DLF_REACTION_GRAPH_BREADTH=3 -DLF_THREADED=1 -DNUMBER_OF_WORKERS=3 -DSCHEDULER=NP -DLOG_LEVEL=2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/nkagamihara/lf/ScheduleTestVanilla -DCMAKE_INSTALL_BINDIR=bin -DLF_FILE_SEPARATOR="/" -DLF_SOURCE_DIRECTORY="/home/nkagamihara/lf/ScheduleTestVanilla/src" -DLF_PACKAGE_DIRECTORY="/home/nkagamihara/lf/ScheduleTestVanilla" /home/nkagamihara/lf/ScheduleTestVanilla/src-gen/ScheduleTest

It would be nice if we could emit this if --no-compile is supplied, or generate a script for compilation.

Expected behaviour

-> lingua-franca git:(static-schedule) ✗ ./build/install/lf-cli/bin/lfc -s=NP --no-compile ~/lf/ScheduleTestVanilla/src/ScheduleTest.lf
lfc: info: Generating code for: file:/home/nkagamihara/lf/ScheduleTestVanilla/src/ScheduleTest.lf
lfc: info: Generation mode: STANDALONE
lfc: info: Generating sources into: /home/nkagamihara/lf/ScheduleTestVanilla/src-gen/ScheduleTest
Cleaning /home/nkagamihara/lf/ScheduleTestVanilla/include
lfc: info: Code generation finished.
lfc: info: To make with cmake, run cmake -DLF_REACTION_GRAPH_BREADTH=3 -DLF_THREADED=1 -DNUMBER_OF_WORKERS=3 -DSCHEDULER=NP -DLOG_LEVEL=2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/nkagamihara/lf/ScheduleTestVanilla -DCMAKE_INSTALL_BINDIR=bin -DLF_FILE_SEPARATOR="/" -DLF_SOURCE_DIRECTORY="/home/nkagamihara/lf/ScheduleTestVanilla/src" -DLF_PACKAGE_DIRECTORY="/home/nkagamihara/lf/ScheduleTestVanilla" /home/nkagamihara/lf/ScheduleTestVanilla/src-gen/ScheduleTest

@axmmisaka axmmisaka added enhancement Enhancement of existing feature good first issue Good for newcomers c Related to C target cpp Related to C++ target cmake labels Oct 28, 2023
@erlingrj
Copy link
Collaborator

Hm, the generated CMakeLists.txt should include a default value for all the flags. So you should be able to comile with just: cmake -B build

@erlingrj
Copy link
Collaborator

It is a pretty recent addition though, if you are working on the static scheduler it probably isnt there:
#2036

@axmmisaka axmmisaka reopened this Oct 31, 2023
@erlingrj
Copy link
Collaborator

erlingrj commented Nov 1, 2023

@axmmisaka did you reopen it by mistake?

@axmmisaka
Copy link
Collaborator Author

yes...:cry:

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
c Related to C target cmake cpp Related to C++ target enhancement Enhancement of existing feature good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants