cget
                                
                                 cget copied to clipboard
                                
                                    cget copied to clipboard
                            
                            
                            
                        Add install/build options to requirements.txt
Is there a way to add install options to the requirements.txt file, such as:
package1 -DOption1=1 package2 -DOption2=2
?
Thanks
Yes, this is already supported, see here.
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?
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.
I see. But then why does it work if set those flags when I call cget?
I.e., this:
cget install -Detc
works in this case.
On Thu, Oct 17, 2019 at 3:23 PM Paul Fultz II [email protected] wrote:
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.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pfultz2/cget/issues/74?email_source=notifications&email_token=AAEYNNFRTYQPBJSCOGPHGWDQPBYNBA5CNFSM4JAF74F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBQI35I#issuecomment-543198709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEYNNHRAHIDEH5QY67TOSDQPBYNBANCNFSM4JAF74FQ .
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.