-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.
Description
Describe the bug
When compiling a project that uses the SDK as a dependency and resolves said dependency with pkgconfig, the AWS SDK ends up injecting -std=c++11 into the compilation flags of the main project. This appears hard-coded in the configuration:
aws-sdk-cpp/cmake/compiler_settings.cmake
Line 39 in 095b07c
| list(APPEND AWS_COMPILER_FLAGS "-fno-exceptions" "-std=c++${CPP_STANDARD}") |
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
The dependency should not inject any c++ standard requirements into the parent project
Current Behavior
Compilation fails for projects newer than C++11
Reproduction Steps
Create a module that uses a C++14 feature, like so:
auto doNothing() {
}
int main() {
return 0;
}Attempting to compile this with a dependency on aws-cpp-sdk-core will fail:
$ gcc `pkg-config --cflags aws-cpp-sdk-core` main.cc
main.cc:1:1: error: ‘doNothing’ function uses ‘auto’ type specifier without trailing return type
1 | auto doNothing() {
| ^~~~
main.cc:1:1: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.68
Compiler and Version used
gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0
Operating System and version
Ubuntu 25.10
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.