Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated INSTALL file with MacOS info onn support for shared libs, Ope… #367

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Install required packages:

$ sudo apt install -y git cmake make build-essential libgl1-mesa-dev freeglut3-dev libpugixml-dev libjsoncpp-dev libboost-test-dev libboost-timer-dev qtbase5-dev qtbase5-dev-tools

Additional packages that you may need, depending on selected cmake options:
$ sudo apt install -y libboost-log-dev libboost-program-options-dev libboost-iostreams-dev libspdlog-dev libfmt-dev

Git
***

Expand Down Expand Up @@ -182,16 +185,36 @@ issues. It has been tested on MacBook Pro (M1 Max with ARM64) running MacOS Mont
the CLion IDE (version 2021.2.3). It should compile using other IDEs (like XCode) without any
issues.

Install command line build tools:
$ xcode-select --install

We recommend using Homebrew to install the dependencies:
https://brew.sh

All dependencies may then be installed from the command line:

$ brew install pugixml
$ brew install boost
$ brew install qt5
$ brew install jsoncpp

Make sure that QTDIR is set to the base qt folder containing the bin and lib dirs, while Qt5_DIR
should be set to the folder containing the Qt5Config.cmake file (typically $QTDIR/lib/cmake/Qt5/).

There is no default support for OpenMP as it is not supported by Apple clang (version 13.0.0).
The following environment variables should be set (for instance in your .bashrc file if you are
using bash):
- QTDIR should be set to the base qt folder containing the bin and lib dirs, typically
/opt/homebrew/opt/qt5/.
- BOOST_ROOT should be set to the directory containing the boost include and lib directories,
typically /opt/homebrew/opt/boost/.

OpenMP is not natively supported by Apple clang (version 15.0.0). It may however be enabled by
installing the LLVM OpenMP library:
$ brew install libomp

Set the following environment variables (add to .bashrc if you are using bash):
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
export CFLAGS="$CFLAGS -I/opt/homebrew/opt/libomp/include"
export CXXFLAGS="$CXXFLAGS -I/opt/homebrew/opt/libomp/include"
export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -lomp"

Logging and shared builds are not supported on MacOS.
Loading