Support OpenMP on Windows
parent
e17d636d62
commit
083b78bcdc
|
@ -36,6 +36,7 @@ after_test:
|
|||
# Check Qt plugins by following https://wiki.qt.io/Deploy_an_Application_on_Windows
|
||||
- set /p VCRedistVersion=<"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\Microsoft.VCRedistVersion.default.txt"
|
||||
- set VCREDIST_CRT_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\%VCRedistVersion%\%PLATFORM%\Microsoft.VC141.CRT
|
||||
- set VCREDIST_OPENMP_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\%VCRedistVersion%\%PLATFORM%\Microsoft.VC141.OPENMP
|
||||
|
||||
- set TAG=%APPVEYOR_REPO_TAG_NAME%
|
||||
- if "%TAG%" == ""
|
||||
|
@ -55,6 +56,7 @@ after_test:
|
|||
- 7z a dust3d-%TAG%-%PLATFORM%.zip %QTDIR%\bin\Qt5Network.dll
|
||||
- 7z a dust3d-%TAG%-%PLATFORM%.zip "%VCREDIST_CRT_DIR%\msvcp140.dll"
|
||||
- 7z a dust3d-%TAG%-%PLATFORM%.zip "%VCREDIST_CRT_DIR%\vcruntime140.dll"
|
||||
- 7z a dust3d-%TAG%-%PLATFORM%.zip "%VCREDIST_OPENMP_DIR%\vcomp140.dll"
|
||||
- mkdir platforms
|
||||
- copy %QTDIR%\plugins\platforms\qwindows.dll %APPVEYOR_BUILD_FOLDER%\platforms\qwindows.dll
|
||||
- 7z a dust3d-%TAG%-%PLATFORM%.zip -r %APPVEYOR_BUILD_FOLDER%\platforms\
|
||||
|
|
17
dust3d.pro
17
dust3d.pro
|
@ -503,13 +503,18 @@ 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
|
||||
!exists(/usr/local/opt/libomp) {
|
||||
error("Please 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 {
|
||||
QMAKE_CXXFLAGS += /openmp
|
||||
DEFINES += WITH_OMP
|
||||
}
|
||||
|
||||
win32 {
|
||||
|
|
Loading…
Reference in New Issue