Skip to content

Force SCons to use GCC when building .c files #928

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ Currently, the aim is to provide a way to compile or copy the implementation fil
To run the compilation for all implmeentations in one language, e.g. Rust, run the command `scons build/c`, and the resulting executables will be available in the `cuild/c` directory, each in their respective algorithm directory, containing the executable."""

from pathlib import Path
import os

env = Environment()
env = Environment(ENV={'PATH': os.environ['PATH']})

env['CC'] = 'gcc'
for tool in ['gcc','gnulink']:
env.Tool(tool)
env['CCFLAGS'] = ''

# Add other languages here when you want to add language targets
languages = ['c']
Expand Down