MarginaliaSearch/code/libraries/array/cpp/compile.sh
Jaseem Abid 0dd14a4bd0 Specify C++ standard in build command
The default C++ language standard on macOS is gnu++98, which won't build
this module.

Full error:

```
> Task :code:libraries:array:cpp:compileCpp FAILED
src/main/cpp/cpphelpers.cpp:28:5: error: expected expression
    [](const p64x2& fst, const p64x2& snd) {
    ^
```
2024-06-12 12:47:10 +01:00

11 lines
238 B
Bash
Executable File

#!/usr/bin/env sh
CXX=${CXX:-g++}
if ! which ${CXX} > /dev/null; then
echo "g++ not found, skipping compilation"
exit 0
fi
${CXX} -O3 -march=native -std=c++14 -shared -Isrc/main/public src/main/cpp/*.cpp -o resources/libcpp.so