Skip to content
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

Support appending flags #482

Closed
isuruf opened this issue May 27, 2021 · 5 comments · Fixed by #549
Closed

Support appending flags #482

isuruf opened this issue May 27, 2021 · 5 comments · Fixed by #549

Comments

@isuruf
Copy link

isuruf commented May 27, 2021

In other build systems, a user can give a set of flags that are appended to the default set of flags.
fpm build --flag <flags> overrides the defaults which is not what I want.

Also, it'd be great if this was supported as an environment flag FFLAGS which would make fpm
behave like every other build system. (CMake, autoconf, setuptools, meson, etc)

@awvwgk
Copy link
Member

awvwgk commented May 27, 2021

To retain the defaults you can specify the profile you want to append your flags to

fpm build --profile release --flag <flag>

Reading from FFLAGS automatically would be nice, but we are also ignoring FC right now and use our own FPM_COMPILER variable instead.

@isuruf
Copy link
Author

isuruf commented May 27, 2021

Thanks @awvwgk. If I have a set of flags in FFLAGS, I can't pass them like fpm build --profile release --flag $FFLAGS right? Is there a way to send in multiple without specifying --flag multiple times?

@awvwgk
Copy link
Member

awvwgk commented May 27, 2021

I don't see why

fpm build --profile release --flag "$FFLAGS"

wouldn't work for this purpose.

@awvwgk
Copy link
Member

awvwgk commented May 27, 2021

We are actually using this already for bootstrapping:

fpm/install.sh

Line 69 in 6d9004d

$BOOTSTRAP_DIR/fpm install --compiler "$FC" --flag "$FFLAGS" --prefix "$PREFIX"

@isuruf
Copy link
Author

isuruf commented May 27, 2021

That's great. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants