Support OpenMP on Mac

master
Jeremy Hu 2020-01-01 17:21:44 +09:30
parent 1e1cc8d453
commit e17d636d62
2 changed files with 13 additions and 0 deletions

View File

@ -55,6 +55,9 @@ install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install qt59base qt59tools --force-yes; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt59/bin/qt59-env.sh; fi
# (Mac) Install OpenMP
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then HOMEBREW_VERBOSE_USING_DOTS=1 brew reinstall --verbose libomp; fi
script:
# Build Dust3D

View File

@ -502,6 +502,16 @@ INCLUDEPATH += thirdparty/QuadriFlow/3rd/pcg32
INCLUDEPATH += thirdparty/QuadriFlow/3rd/pss
INCLUDEPATH += thirdparty/QuadriFlow/3rd/lemon-1.3.1
macx: {
exists(/usr/local/opt/libomp) {
# Install OpenMP: brew install libomp
DEFINES += WITH_OMP
QMAKE_CXXFLAGS += -Xpreprocessor -fopenmp
INCLUDEPATH += /usr/local/opt/libomp/include
LIBS += -L/usr/local/opt/libomp/lib -lomp
}
}
win32 {
# Fix error LNK2001: unresolved external symbol "struct lemon::Invalid const lemon::INVALID" (?INVALID@lemon@@3UInvalid@1@B)
DEFINES += LEMON_ONLY_TEMPLATES