Skip to content

Commit

Permalink
add more info on MacOS and other minor edits (#9184)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Jul 3, 2022
1 parent b391e0c commit d2b32cd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.cmake.md
Expand Up @@ -28,7 +28,7 @@ That said, if you are familiar with CMake and have all the dependencies installe
```sh
cd OpenModelica
cmake -S . -B build_cmake
cmake --build build_cmake --parallel <Nr. of cores> --target install
cmake --build build_cmake --target install --parallel <Nr. of cores>

# Default install dir is a directory named install_cmake inside the build directory.
./build_cmake/install_cmake/bin/omc --help
Expand Down Expand Up @@ -61,8 +61,17 @@ It is available for linux (of course) and, fortunatelly, for MSYS/MinGW as well
There is nothing special to be done for linux. You can follow the examples above or chose your own combination of parameters (e.g. build type, generator, install dir ...).

## 3.3. macOS
On macOS you need to install:
- XCode: ```xcode-select –install```

This comment has been minimized.

Copy link
@hkiel

hkiel Jul 4, 2022

Member

@adrpo the option to xcode-select is --install (double minus)

- homebrew: ```/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"```

This comment has been minimized.

Copy link
@hkiel

hkiel Jul 3, 2022

Member

@adrpo @mahge Is homebrew really needed, or is macports sufficient? (On my x86_64 macOS I have only macports and was always happy)

This comment has been minimized.

Copy link
@adrpo

adrpo Jul 3, 2022

Author Member

I don't really know for sure. I guess it might not be needed if all the deps can be installed via macports.
I will edit the text to make it optional.

This comment has been minimized.

Copy link
@mahge

mahge Jul 5, 2022

Contributor

I think you could do all of it with macports. The only reason I used homebrew was that it was just faster (just binaries) and used by more people (?). For the bigger dependencies like OpenSceneGraph, installing with hombrew is much much faster than installing with macports. Other than that macports should be fine.

What we know (so far) is that you definitely need macports to compile OpenModelica because we want qtwebkit and hombrew does not provide qtwebkit.

This comment has been minimized.

Copy link
@hkiel

hkiel Jul 5, 2022

Member

macports also brings binary packages for most packages (IIRC all of those I had to install for OpenModelica). I have no clue on the size of the communities.

This comment has been minimized.

Copy link
@mahge

mahge Jul 5, 2022

Contributor

Maybe you are right. Maybe it is not that it builds from source but just that it is self contained, using its own packages only. For me the biggest difference was OpenSceneGraph which took upwards of 6-7 mins on Github Actions compared to hombrew's less-than-a-minute. I think this might be package specific and it's not that it is slow but that OpenSceneGraph has a lot of dependencies and all of those needed to be fetched first. If you already had some of them then it is probably faster.

- macports (for qt5-wtwebkit): https://guide.macports.org/#installing.macports

On macOS there are a few pitfalls/issues which need attention.

- if building simulation code fails go OMEdit -> Preferences -> Simulation and change the C / C++ compiler to gcc/g++.

- gfortran is needed, install via ```brew install gfortran```

- If you plan to build the OpenModelica GUI clients (e.g. OMEdit) you need to install a Qt5 version that comes with `qt-webkit`. Unfortunately, the Qt formulae from `homebrew` does not provide `qt-webkit` anymore. Therefore, you will have to find a way of getting `qt-webkit` on your machine. The recommend and probably the easiest way to do this is using macports to install Qt and qt5-webkit:

```sh
Expand Down Expand Up @@ -95,7 +104,6 @@ On macOS there are a few pitfalls/issues which need attention.
cmake ... -DOM_OMC_ENABLE_FORTRAN=OFF -DOM_OMC_ENABLE_IPOPT=OFF ...
```


With these consideration, your final configure command should look something like

```sh
Expand Down

0 comments on commit d2b32cd

Please sign in to comment.