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
|
# 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 /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_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%
|
- set TAG=%APPVEYOR_REPO_TAG_NAME%
|
||||||
- if "%TAG%" == ""
|
- if "%TAG%" == ""
|
||||||
|
@ -55,6 +56,7 @@ after_test:
|
||||||
- 7z a dust3d-%TAG%-%PLATFORM%.zip %QTDIR%\bin\Qt5Network.dll
|
- 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%\msvcp140.dll"
|
||||||
- 7z a dust3d-%TAG%-%PLATFORM%.zip "%VCREDIST_CRT_DIR%\vcruntime140.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
|
- mkdir platforms
|
||||||
- copy %QTDIR%\plugins\platforms\qwindows.dll %APPVEYOR_BUILD_FOLDER%\platforms\qwindows.dll
|
- copy %QTDIR%\plugins\platforms\qwindows.dll %APPVEYOR_BUILD_FOLDER%\platforms\qwindows.dll
|
||||||
- 7z a dust3d-%TAG%-%PLATFORM%.zip -r %APPVEYOR_BUILD_FOLDER%\platforms\
|
- 7z a dust3d-%TAG%-%PLATFORM%.zip -r %APPVEYOR_BUILD_FOLDER%\platforms\
|
||||||
|
|
|
@ -503,13 +503,18 @@ INCLUDEPATH += thirdparty/QuadriFlow/3rd/pss
|
||||||
INCLUDEPATH += thirdparty/QuadriFlow/3rd/lemon-1.3.1
|
INCLUDEPATH += thirdparty/QuadriFlow/3rd/lemon-1.3.1
|
||||||
|
|
||||||
macx: {
|
macx: {
|
||||||
exists(/usr/local/opt/libomp) {
|
!exists(/usr/local/opt/libomp) {
|
||||||
# Install OpenMP: brew install libomp
|
error("Please install OpenMP: brew install libomp")
|
||||||
|
}
|
||||||
DEFINES += WITH_OMP
|
DEFINES += WITH_OMP
|
||||||
QMAKE_CXXFLAGS += -Xpreprocessor -fopenmp
|
QMAKE_CXXFLAGS += -Xpreprocessor -fopenmp
|
||||||
INCLUDEPATH += /usr/local/opt/libomp/include
|
INCLUDEPATH += /usr/local/opt/libomp/include
|
||||||
LIBS += -L/usr/local/opt/libomp/lib -lomp
|
LIBS += -L/usr/local/opt/libomp/lib -lomp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
QMAKE_CXXFLAGS += /openmp
|
||||||
|
DEFINES += WITH_OMP
|
||||||
}
|
}
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
|
|
Loading…
Reference in New Issue