Skip to content

Scons compilation examples #863

New issue

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

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

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Amaras
Copy link
Member

@Amaras Amaras commented Sep 8, 2021

This PR aims to provide examples on how to create compilation (and run) instructions with SCons, as per #691.
As this is currently the only effort to provide concrete examples of compilation instructions, I highly encourage others to open their own draft PRs with their own compilation instructions, until we decide what system to use.
I'd like to give the systems a fair comparison, so try to provide them for the same chapter(s) as I did (in other words, please don't get too ahead of me.)

Below is a basic instruction manual for the Barnsley Fern chapter

How to use (e.g. create the out.dat or barnsley.dat file)

  1. go to the directory you want to compile code for;
  2. run scons out.dat or scons barnsley.dat (depending on the implementation)
  3. (optional) clean the directory with scons -c . to remove all the intermediate and final files.

Note: if you want to only clean the out.dat file and keep the executables/classes (and so on) files, you can run scons -c out.dat

@Amaras
Copy link
Member Author

Amaras commented Sep 8, 2021

Hum... I think I branched off a PR branch... I'll try to get it correct later or reopen the PR branching off master.

The point still stands, as there should not be a problem with that (especially since the SCons PR should be merged after the C++ flood fill one)

@ntindle
Copy link
Member

ntindle commented Sep 11, 2021

Are we doing it this way as opposed to @stormofice 's implementation

@Amaras
Copy link
Member Author

Amaras commented Sep 11, 2021

Are we doing it this way as opposed to @stormofice 's implementation

This is one way to do it. I'm not sure if it's the best way.

@stormofice
Copy link
Contributor

Does SCons work with every language?

Regardless of that, I don't see why this would interfere with the verifier, as better compilation/running instructions would just simplify the language configuration files.

@Amaras
Copy link
Member Author

Amaras commented Sep 11, 2021

Does SCons work with every language?

Out of the box, SCons works with C/C++, Fortran, D, TeX/LaTeX, Java, some Assembler languages, and some other languages. We'd probably need to provide Builders to ensure consistent compilation for Rust, Scala, etc.
You can see #691 for more detail about my questioning

@leios
Copy link
Member

leios commented Sep 15, 2021

I think this is fine and if it makes things easier for @stormofice, then let's do it!

I will say that we probably don't need the flood fill example in this PR, though

@Amaras
Copy link
Member Author

Amaras commented Sep 15, 2021

I will say that we probably don't need the flood fill example in this PR, though

Yeah, I'm not exactly sure how to remove the flood fill thingy, properly :/

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@Amaras
Copy link
Member Author

Amaras commented Sep 18, 2021

I'm not sure if I removed the previous branch commits properly, but it should be okay.

@Amaras
Copy link
Member Author

Amaras commented Oct 8, 2021

Because we chose to go with the single SConstruct approach, I will close this PR, because it's not relevant.

@Amaras Amaras closed this Oct 8, 2021
@Amaras Amaras deleted the scons_compilation branch December 5, 2021 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants