Currently projects require setting the target compile features to C++ 11 in CMakeLists.txt with target_compile_features(my-example PUBLIC cxx_std_11) or risk getting the following errors:
[ 50%] Building CXX object CMakeFiles/list-s3-buckets.dir/main.cpp.o
In file included from /Users/dblock/source/aws-sdk/list-s3-buckets/main.cpp:2:
In file included from /usr/local/include/aws/core/Aws.h:17:
In file included from /usr/local/include/aws/core/utils/logging/LogLevel.h:20:
In file included from /usr/local/include/aws/core/utils/memory/stl/AWSString.h:20:
In file included from /usr/local/include/aws/core/utils/memory/stl/AWSAllocator.h:21:
/usr/local/include/aws/core/utils/memory/AWSMemory.h:162:78: error: 'T' does not refer to a value
std::size_t headerSize = (std::max)(sizeof(std::size_t), alignof(T));
^
/usr/local/include/aws/core/utils/memory/AWSMemory.h:149:23: note: declared here
template<typename T>
^
There should be a way to not have to do this for every project.
The text was updated successfully, but these errors were encountered:
Note that it would require to have at least one exported target to have this compile feature requirement.
It should either be used (transitively) for all targets that get installed or it could be handled by the https://github.com/aws/aws-sdk-cpp/blob/master/cmake/AWSSDKConfig.cmake file.
Since it already iterates over targets it could probably call target_compile_features for each of them ?
It already tries to do something with a hardcoded CPP_STANDARD
Greetings! Sorry to say but this is a very old issue that is probably not getting as much attention as it deservers. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.
What platform/OS are you using?
MacOS
Which version of the SDK?
Mojave
What compiler are you using? what version?
CMake 3.16.4
Coming from awsdocs/aws-doc-sdk-examples#1022 (comment)
Currently projects require setting the target compile features to C++ 11 in CMakeLists.txt with
target_compile_features(my-example PUBLIC cxx_std_11)
or risk getting the following errors:There should be a way to not have to do this for every project.
The text was updated successfully, but these errors were encountered: