diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2023-06-25 15:26:57 +0300 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2023-06-28 13:30:55 +0000 |
commit | e0f831bd8a9016b4b8a536e5eb08dda262173e93 (patch) | |
tree | b8cf6f0546dd4cd962ad3f16e6d81a5be39d1283 | |
parent | e10db9409bebab761d52c966536f114310ec93d3 (diff) |
Export cxxLanguageVersion from protobuf modules
This amends eb008eac0535ac8265cbacb449fac6806204ebe3.
Change-Id: Iab410d81c9f708aa1363bc9ca969cb219fe797b5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
8 files changed, 4 insertions, 6 deletions
diff --git a/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs b/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs index 619e43550..717f5d84d 100644 --- a/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs +++ b/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs @@ -5,7 +5,6 @@ CppApplication { condition: protobuf.cpp.present && qbs.targetPlatform === Host.platform() Depends { name: "cpp" } - cpp.cxxLanguageVersion: "c++17" cpp.minimumMacosVersion: "10.8" Depends { name: "protobuf.cpp"; required: false } diff --git a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs index ae218a0c2..af1a5d2cd 100644 --- a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs +++ b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs @@ -18,6 +18,8 @@ ProtobufBase { property string grpcIncludePath: grpcIncludeProbe.found ? grpcIncludeProbe.path : undefined property string grpcLibraryPath: grpcLibraryProbe.found ? grpcLibraryProbe.path : undefined + property string _cxxLanguageVersion: qbs.targetOS.contains("darwin") ? "c++17" : "c++14" + readonly property string _libraryName: { var libraryName; if (libraryProbe.found) { @@ -87,6 +89,7 @@ ProtobufBase { result.push(grpcIncludePath); return result; } + cpp.cxxLanguageVersion: _cxxLanguageVersion Rule { inputs: ["protobuf.input", "protobuf.grpc"] diff --git a/share/qbs/modules/protobuf/nanopb/nanopb.qbs b/share/qbs/modules/protobuf/nanopb/nanopb.qbs index 898e230b6..ada7c20bb 100644 --- a/share/qbs/modules/protobuf/nanopb/nanopb.qbs +++ b/share/qbs/modules/protobuf/nanopb/nanopb.qbs @@ -41,6 +41,7 @@ ProtobufBase { result.push(includePath); return result; } + cpp.cxxLanguageVersion: qbs.targetOS.contains("darwin") ? ["c++17"] : ["c++11"] Rule { inputs: ["protobuf.input"] diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs index 3a91dbe8b..2db71fd03 100644 --- a/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs +++ b/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs @@ -11,7 +11,6 @@ CppApplication { consoleApplication: true Depends { name: "cpp" } - cpp.cxxLanguageVersion: "c++17" cpp.minimumMacosVersion: "10.8" Depends { name: "protobuf.cpp"; required: false } diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs index d2a030b2e..3dfc911e1 100644 --- a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs +++ b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs @@ -11,7 +11,6 @@ CppApplication { consoleApplication: true Depends { name: "cpp" } - cpp.cxxLanguageVersion: "c++17" cpp.minimumMacosVersion: "10.8" Depends { name: "protobuf.nanopb"; required: false } diff --git a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs index 234df2eb6..005752fd8 100644 --- a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs +++ b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs @@ -11,7 +11,6 @@ Project { name: "proto_lib" Depends { name: "cpp" } - cpp.cxxLanguageVersion: "c++17" cpp.minimumMacosVersion: "10.8" protobuf.cpp.importPaths: product.sourceDirectory diff --git a/tests/auto/blackbox/testdata/protobuf/import.qbs b/tests/auto/blackbox/testdata/protobuf/import.qbs index 1b857a4d9..56d489de8 100644 --- a/tests/auto/blackbox/testdata/protobuf/import.qbs +++ b/tests/auto/blackbox/testdata/protobuf/import.qbs @@ -12,7 +12,6 @@ CppApplication { protobuf.cpp.importPaths: [sourceDirectory] - cpp.cxxLanguageVersion: "c++17" cpp.minimumMacosVersion: "10.8" Depends { name: "protobuf.cpp"; required: false } diff --git a/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs b/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs index 143e9c20f..07be566cb 100644 --- a/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs +++ b/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs @@ -13,7 +13,6 @@ CppApplication { property path theImportDir protobuf.cpp.importPaths: (theImportDir ? [theImportDir] : []).concat([sourceDirectory]) - cpp.cxxLanguageVersion: "c++11" cpp.minimumMacosVersion: "10.8" Depends { name: "protobuf.cpp"; required: false } |