From: <sv...@op...> - 2024-07-22 18:24:19
|
Author: manx Date: Mon Jul 22 20:24:02 2024 New Revision: 21248 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21248 Log: [Imp] build: dist: Perform header checks also for C++23 and C23. See <https://bugs.openmpt.org/view.php?id=1803>. Modified: trunk/OpenMPT/build/auto/dist.sh Modified: trunk/OpenMPT/build/auto/dist.sh ============================================================================== --- trunk/OpenMPT/build/auto/dist.sh Mon Jul 22 20:23:12 2024 (r21247) +++ trunk/OpenMPT/build/auto/dist.sh Mon Jul 22 20:24:02 2024 (r21248) @@ -40,6 +40,10 @@ echo " cc 18" cc -std=c18 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.cc18.out fi +if cc -std=c23 -c bin/empty.c -o bin/empty.cc23.out > /dev/null 2>&1 ; then +echo " cc 23" +cc -std=c23 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.cc23.out +fi echo " gcc 89" gcc -std=c89 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.gcc89.out echo " gcc 99" @@ -52,6 +56,10 @@ echo " gcc 18" gcc -std=c18 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.gcc18.out fi +if gcc -std=c23 -c bin/empty.c -o bin/empty.gcc23.out > /dev/null 2>&1 ; then +echo " gcc 23" +gcc -std=c23 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.gcc23.out +fi echo " clang 89" clang -std=c89 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.clang89.out echo " clang 99" @@ -64,6 +72,10 @@ echo " clang 18" clang -std=c18 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.clang18.out fi +if clang -std=c23 -c bin/empty.c -o bin/empty.clang23.out > /dev/null 2>&1 ; then +echo " clang 23" +clang -std=c23 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.clang23.out +fi if [ `uname -s` != "Darwin" ] ; then if [ `uname -m` == "x86_64" ] ; then if [ "${MSYSTEM}x" == "x" ]; then @@ -101,18 +113,30 @@ echo " c++ 20" c++ -std=c++20 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.cpp -o bin/headercheck.cpp20.out fi +if c++ -std=c++23 -c bin/empty.cpp -o bin/empty.cpp23.out > /dev/null 2>&1 ; then +echo " c++ 23" +c++ -std=c++23 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.cpp -o bin/headercheck.cpp23.out +fi echo " g++ 17" g++ -std=c++17 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.cpp -o bin/headercheck.gpp17.out if g++ -std=c++20 -c bin/empty.cpp -o bin/empty.gpp20.out > /dev/null 2>&1 ; then echo " g++ 20" g++ -std=c++20 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.cpp -o bin/headercheck.gpp20.out fi +if g++ -std=c++23 -c bin/empty.cpp -o bin/empty.gpp23.out > /dev/null 2>&1 ; then +echo " g++ 23" +g++ -std=c++23 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.cpp -o bin/headercheck.gpp23.out +fi echo " clang++ 17" clang++ -std=c++17 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.cpp -o bin/headercheck.clangpp17.out if clang++ -std=c++20 -c bin/empty.cpp -o bin/empty.clangpp20.out > /dev/null 2>&1 ; then echo " clang++ 20" clang++ -std=c++20 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.cpp -o bin/headercheck.clangpp20.out fi +if clang++ -std=c++23 -c bin/empty.cpp -o bin/empty.clangpp23.out > /dev/null 2>&1 ; then +echo " clang++ 23" +clang++ -std=c++23 -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.cpp -o bin/headercheck.clangpp23.out +fi rm bin/headercheck.*.out rm bin/headercheck.cpp rm bin/empty.*.out |