Changeset dfd0762c in OpenModelica


Ignore:
Timestamp:
2023-03-31T15:41:25+02:00 (13 months ago)
Author:
Martin Sjölund <martin.sjolund@…>
Parents:
a510dec
Message:

Add homebrew instructions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • README.cmake.md

    rbe44f4b rdfd0762c  
    6969
    7070## 3.3. macOS
    71 On macOS you need to install: XCode and macports
    72 - XCode:
     71On macOS you need to install: XCode and either macports or homebrew
     72
     73### XCode
     74
    7375  ```sh
    7476  xcode-select –-install
    7577  ```
    76 - macports: Follow the instructions on https://guide.macports.org/#installing.macports
     78
     79### Macports
     80
     81Follow the instructions on https://guide.macports.org/#installing.macports
    7782
    7883Once XCode and macports are installed, you need to install the dependencies for OpenModelica using macports:
     
    8186  sudo port install cmake ccache qt5 qt5-qtwebkit autoconf boost OpenSceneGraph openjdk11
    8287  ```
     88
     89### Homebrew
     90
     91Follow the instructions on https://brew.sh/
     92
     93  ```sh
     94  brew install autoconf automake openjdk pkg-config cmake make ccache
     95  echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc
     96  ```
     97
     98### Building
    8399
    84100Optionally, You can also install `gfortran` if you plan to use OpenModelica for dynamic optimization purposes.
     
    94110  # With Fortran ON
    95111  cmake -S . -B build_cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran
     112  # For homebrew, you also need to disable the graphical clients
     113  cmake -S . -B build_cmake -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ -DOM_OMC_ENABLE_FORTRAN=OFF -DOM_OMC_ENABLE_IPOPT=OFF -D OM_ENABLE_GUI_CLIENTS=OFF -D CMAKE_INSTALL_PREFIX=$PWD/install
    96114  ```
    97115
     
    100118
    101119> **Warning**
    102 > This applies **even when you want to use the systems default compiler**. The reason for this is that `/usr/bin/c++` and your actual compiler (e.g., `clang++`) may not match in what default include directories they search.
     120> This applies **even when you want to use the systems default compiler**. The reason for this is that `cmake` does not use the default compiler `/usr/bin/c++` or `clang++`, but an a version inside of XCode that disables the default include directories.
    103121
    104122Once configuration finishes successfully you can build OpenModelica as you would on any unix system, e.g.,
Note: See TracChangeset for help on using the changeset viewer.