Changeset dfd0762c in OpenModelica
- Timestamp:
- 2023-03-31T15:41:25+02:00 (13 months ago)
- Parents:
- a510dec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
README.cmake.md
rbe44f4b rdfd0762c 69 69 70 70 ## 3.3. macOS 71 On macOS you need to install: XCode and macports 72 - XCode: 71 On macOS you need to install: XCode and either macports or homebrew 72 73 ### XCode 74 73 75 ```sh 74 76 xcode-select –-install 75 77 ``` 76 - macports: Follow the instructions on https://guide.macports.org/#installing.macports 78 79 ### Macports 80 81 Follow the instructions on https://guide.macports.org/#installing.macports 77 82 78 83 Once XCode and macports are installed, you need to install the dependencies for OpenModelica using macports: … … 81 86 sudo port install cmake ccache qt5 qt5-qtwebkit autoconf boost OpenSceneGraph openjdk11 82 87 ``` 88 89 ### Homebrew 90 91 Follow 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 83 99 84 100 Optionally, You can also install `gfortran` if you plan to use OpenModelica for dynamic optimization purposes. … … 94 110 # With Fortran ON 95 111 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 96 114 ``` 97 115 … … 100 118 101 119 > **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. 103 121 104 122 Once 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.