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

Add install/build options to requirements.txt #74

Open
marcovc opened this issue Oct 13, 2019 · 5 comments
Open

Add install/build options to requirements.txt #74

marcovc opened this issue Oct 13, 2019 · 5 comments

Comments

@marcovc
Copy link

marcovc commented Oct 13, 2019

Is there a way to add install options to the requirements.txt file, such as:

package1 -DOption1=1
package2 -DOption2=2

?

Thanks

@pfultz2
Copy link
Owner

pfultz2 commented Oct 14, 2019

Yes, this is already supported, see here.

@marcovc
Copy link
Author

marcovc commented Oct 17, 2019

Thanks. It seems it is not getting the defines in this requirements.txt file :

MiniZinc/libminizinc/archive/develop -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_C_FLAGS="-fPIC"

(but it works if I call it like cget install MiniZinc/libminizinc/archive/develop -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_C_FLAGS="-fPIC")

Any clues why?

@pfultz2
Copy link
Owner

pfultz2 commented Oct 17, 2019

You cant set those flags because they are usually set by the toolchain. Although there should be a way to add additional flags for some projects.

However, for your example, you can add -DCMAKE_POSITION_INDEPENDENT_CODE=On to add the -fPIC flag.

@marcovc
Copy link
Author

marcovc commented Oct 17, 2019 via email

@pfultz2
Copy link
Owner

pfultz2 commented Apr 22, 2020

I see. But then why does it work if set those flags when I call cget?

Variables like CMAKE_CXX_FLAGS are set by cget's internal cmake toolchain file, so it will override the flags set by -Detc.

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

No branches or pull requests

2 participants