Skip to content
New issue

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

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

Already on GitHub? # to your account

Compiler flags for for C++14 #112

Closed
const-ae opened this issue Jan 3, 2021 · 3 comments
Closed

Compiler flags for for C++14 #112

const-ae opened this issue Jan 3, 2021 · 3 comments
Labels
feature a feature request or enhancement

Comments

@const-ae
Copy link
Contributor

const-ae commented Jan 3, 2021

Hi,

I am maintaining a package that depends on C++14 features. I tried to compile the package with debug flags, but noticed that pkgbuild::with_debug(devtools::load_all()) had no effect on the optimization level. After some digging, I found that withr::with_makevars(c(CXX14FLAGS = "-Wall -g -O0", devtools::load_all()) has the desired behavior.

As far as I can see, the problem comes from the fact that pkgbuild defines the compiler flags only for C++11.

Would it be possible to add a line for C++14 (and newer versions)?

Best Regards,
Constantin

@jimhester
Copy link
Member

Sure, do you want to write a pull request to add the flags for C++14, C++17 and C++20?

@jimhester jimhester added the feature a feature request or enhancement label Jan 4, 2021
const-ae added a commit to const-ae/pkgbuild that referenced this issue Jan 4, 2021
Add compiler flags for packages that target CXX14, CXX17, and CXX20
@const-ae
Copy link
Contributor Author

const-ae commented Jan 4, 2021

The pull request is at #113

gaborcsardi pushed a commit that referenced this issue Dec 8, 2021
Add compiler flags for packages that target CXX14, CXX17, and CXX20
@gaborcsardi
Copy link
Member

This was fixed in #113.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants