Compile with utf8 on macOS.
This commit is contained in:
parent
72d86f91ed
commit
2d86b34c40
|
@ -4,9 +4,27 @@
|
||||||
rm -f -R antlr4-runtime build lib 2> /dev/null
|
rm -f -R antlr4-runtime build lib 2> /dev/null
|
||||||
rm antlr4-cpp-runtime-macos.zip 2> /dev/null
|
rm antlr4-cpp-runtime-macos.zip 2> /dev/null
|
||||||
|
|
||||||
|
# Get utf8 dependency.
|
||||||
|
mkdir -p runtime/thirdparty 2> /dev/null
|
||||||
|
pushd runtime/thirdparty
|
||||||
|
if [ ! -d utfcpp ]
|
||||||
|
then
|
||||||
|
git clone https://github.com/nemtrif/utfcpp.git utfcpp
|
||||||
|
pushd utfcpp
|
||||||
|
git checkout tags/v3.1.1
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
popd
|
||||||
|
|
||||||
# Binaries
|
# Binaries
|
||||||
xcodebuild -project runtime/antlrcpp.xcodeproj -target antlr4 -configuration Release
|
xcodebuild -project runtime/antlrcpp.xcodeproj \
|
||||||
xcodebuild -project runtime/antlrcpp.xcodeproj -target antlr4_static -configuration Release
|
-target antlr4 \
|
||||||
|
# GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS USE_UTF8_INSTEAD_OF_CODECVT' \
|
||||||
|
-configuration Release
|
||||||
|
xcodebuild -project runtime/antlrcpp.xcodeproj \
|
||||||
|
-target antlr4_static \
|
||||||
|
# GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS USE_UTF8_INSTEAD_OF_CODECVT' \
|
||||||
|
-configuration Release
|
||||||
rm -f -R lib
|
rm -f -R lib
|
||||||
mkdir lib
|
mkdir lib
|
||||||
mv runtime/build/Release/libantlr4-runtime.a lib/
|
mv runtime/build/Release/libantlr4-runtime.a lib/
|
||||||
|
@ -17,6 +35,9 @@ rm -f -R antlr4-runtime
|
||||||
pushd runtime/src
|
pushd runtime/src
|
||||||
find . -name '*.h' | cpio -pdm ../../antlr4-runtime
|
find . -name '*.h' | cpio -pdm ../../antlr4-runtime
|
||||||
popd
|
popd
|
||||||
|
pushd runtime/thirdparty/utfcpp/source
|
||||||
|
find . -name '*.h' | cpio -pdm ../../../../antlr4-runtime
|
||||||
|
popd
|
||||||
|
|
||||||
# Zip up and clean up
|
# Zip up and clean up
|
||||||
zip -r antlr4-cpp-runtime-macos.zip antlr4-runtime lib
|
zip -r antlr4-cpp-runtime-macos.zip antlr4-runtime lib
|
||||||
|
|
Loading…
Reference in New Issue