Open potswa opened 6 years ago
I could try to introduce travis CI for clang and gcc on Linux and macOS based on https://github.com/jbcoe/polymorphic_value/blob/master/.travis.yml
That would be great! Let me know how it goes.
Do you have a link to the AppVeyor CI project?
https://ci.appveyor.com/project/potswa/cxx-function/ (it fails on one testcase)
If it helps, here's my local test script:
GCCINC=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/
failures=''
for testcase in $*; do
echo "== $testcase =="
for lang in c++11 c++14; do
echo clang $lang && clang++ -std=$lang -I . -Wall -Wextra $TESTOPTS -o check $testcase && ./check || failures="$failures $testcase clang, "
echo gcc $lang && /baseline/usr/local/bin/g++ -std=$lang -isystem $GCCINC -I . -Wall -Wextra $TESTOPTS -o check $testcase && DYLD_LIBRARY_PATH=/baseline/usr/local/lib ./check || failures="$failures $testcase gcc, "
echo clang+libstdc++ && clang++ $testcase -o check -I . -nostdlib -isystem /baseline/usr/local/include/c++/5.1.0/ -isystem /baseline/usr/local/include/c++/5.1.0/x86_64-apple-darwin14.3.0/ -lc /baseline/usr/local/lib/libsupc++.a /baseline/usr/local/lib/libstdc++.a -std=c++11 /baseline/usr/local/lib/gcc/x86_64-apple-darwin14.3.0/5.1.0/libgcc_eh.a $TESTOPTS -w || failures="$failures $testcase clang+libstdc++, "
done
done
if [ "$failures" ]; then
echo FAIL $failures
else
echo SUCCESS
fi
Would you be opposed to me adding CMake support? It would make things more standard.
Sure. This recent branch might help: https://github.com/CMakeezer/cxx_function
Currently this project runs AppVeyor CI checking MSVC compatibility. My laptop has GCC 5.1 and Clang 3.6 which are quite old. Everything else is checked ad-hoc on an online compiler. It would be nice to test many compiler + version + standard library + language flag combinations using a proper CI service.
One thing that was significant in 2015 (when I created this) was that Linux used the GCC library even with Clang. If that's still the case, then mind the coverage.