You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Thiruvalluvan M. G. (Jira)" <ji...@apache.org> on 2020/09/30 14:28:00 UTC

[jira] [Comment Edited] (AVRO-2933) avro c++ CMakeList enforces a specific version of C++ instead of letting user CXXFLAGS

    [ https://issues.apache.org/jira/browse/AVRO-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204772#comment-17204772 ] 

Thiruvalluvan M. G. edited comment on AVRO-2933 at 9/30/20, 2:27 PM:
---------------------------------------------------------------------

Instead of just adding this flag, we should just indicate that we require (at least) C++11 features. According CMAKE documentation [https://cmake.org/cmake/help/v3.5/prop_tgt/CXX_STANDARD.html], this is achieved by setting CXX_STANDARD property to 11 and then set CXX_STANDARD_REQUIRED to ON. [~thomas.barbier] Can you confirm if this approach works and if it does, please generate a pull request. I'll review and accept. Thank you


was (Author: thiru_mg):
Instead of just adding this flag, we should just indicate that we require (at least) C++11 features. According CMAKE documentatoin [https://cmake.org/cmake/help/v3.5/prop_tgt/CXX_STANDARD.html], this is achieved by setting CXX_STANDARD property to 11 and then set CXX_STANDARD_REQUIRED to ON. [~thomas.barbier] Can you confirm if this approach works and if it does, please generate a pull request. I'll review and accept. Thank you

> avro c++ CMakeList enforces a specific version of C++ instead of letting user CXXFLAGS
> --------------------------------------------------------------------------------------
>
>                 Key: AVRO-2933
>                 URL: https://issues.apache.org/jira/browse/AVRO-2933
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: c++
>    Affects Versions: 1.10.0, 1.9.2
>            Reporter: Thomas Barbier
>            Priority: Minor
>
> Hello,
> I have an issue with Avro C++: 
> The CMakeList enforces the use of C++11 (https://github.com/apache/avro/blob/master/lang/c%2B%2B/CMakeLists.txt#L57)
> {code:java}
> add_definitions(-std=c++11 -fPIC)
> {code}
> In local, I need to build with c++20 and therefore removed this line from my CMakeList (the std== parameters is in my CXXFLAGS).
>  
> As I don't know what is the best practice to let users choose their C++ version I create the issue to open the discussion and will submit a PR in case you agree with it.
>  
> Best Regards
> Thomas
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)