File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ compiler=${1:- clang++}
2
+ # Go up one directory from 'build' to 'bitcoin'
3
+ pushd . || exit
4
+
5
+ # Remove the old build directory to ensure a clean slate
6
+ # rm -rf build || true
7
+
8
+ # Create a new build directory
9
+ mkdir -p build
10
+
11
+ # Change into the new build directory
12
+ pushd ./build || exit
13
+
14
+ if command -v brew & > /dev/null
15
+ then
16
+ brew install llvm
17
+ export LDFLAGS=" -L/usr/local/opt/llvm/lib"
18
+ export CPPFLAGS=" -I/usr/local/opt/llvm/include"
19
+ CC=$( brew --prefix llvm) /bin/clang CXX=$( brew --prefix llvm) /bin/clang++
20
+ fi
21
+
22
+ # Run CMake, explicitly setting the C++ standard to 20
23
+ # We'll also explicitly set the C++ compiler to clang++ (common on macOS)
24
+ # If you prefer g++, replace 'clang++' with 'g++'
25
+ cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_COMPILER=$compiler -DBUILD_GUI=ON -LH -S ../
26
+
27
+ # Now, try to build again
28
+ make
You can’t perform that action at this time.
0 commit comments