diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2018-01-23 03:17:19 -0800 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2020-12-05 21:28:08 +0100 |
commit | e773bc9a69fab60cb1b8c782caeb32330d41264f (patch) | |
tree | eb319d563a861ea007ce4d683576eb92294b36d7 | |
parent | 25442ad2e625756e825be565ff0cfbd1af314dd9 (diff) |
installcheck-local.sh: test with C++11
Some header files use C++11 features.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-rwxr-xr-x | src/syncevo/installcheck-local.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/syncevo/installcheck-local.sh b/src/syncevo/installcheck-local.sh index c0c57743..2878ceb4 100755 --- a/src/syncevo/installcheck-local.sh +++ b/src/syncevo/installcheck-local.sh @@ -17,17 +17,20 @@ trap rmtmp EXIT # check that c++ works, whatever it is cat >$TMPFILE_CXX <<EOF #include <iostream> +#include <memory> int main(int argc, char **argv) { std::cout << "hello world\n"; + std::shared_ptr<char> ptr; return 0; } EOF -for CXX in "c++ -Wall -Werror" "g++ -Wall -Werror" "c++" "g++" ""; do +# C++11 is needed for std::unique_ptr. +for CXX in "c++ -Wall -Werror -std=c++11" "g++ -Wall -Werror -std=c++11" "c++ -std=c++11" "g++ -std=c++11" ""; do if [ ! "$CXX" ]; then - echo "no usable compiler, skipping tests" + echo "no usable C++11 compiler, skipping tests" exit 0 fi if $CXX $TMPFILE_CXX -o $TMPFILE; then |