-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbuild_fftw3.bat
75 lines (64 loc) · 1.65 KB
/
build_fftw3.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
SETLOCAL
echo ---- Building FFTW ----
set FFTW_PATH=fftw-3.3.4
SET VALRETURN=0
if %MACHINE_X86% (
set PLATFORM=Win32
) else (
set PLATFORM=x64
)
if %CONFIG_RELEASE% (
set CONFIG=Release
if %STATIC_LIBS% (
set CONFIG=Static-Release
)
) else (
set CONFIG=Debug
if %STATIC_LIBS% (
set CONFIG=Static-Debug
)
)
REM TODO(XXX): The output paths differ based on platform.
if %MACHINE_X86% (
set OUTPUT_PATH=%CONFIG%
) else (
set OUTPUT_PATH=%PLATFORM%\%CONFIG%
)
cd build\%FFTW_PATH%\fftw-3.3-libs
echo Cleaning all...
%MSBUILD% fftw-3.3-libs.sln /p:Configuration=%CONFIG% /p:Platform=%PLATFORM% /t:Clean
IF ERRORLEVEL 1 (
SET VALRETURN=1
goto END
)
REM NOTE(rryan): Couldn't get solution itself to resolve the build actions. Odd.
cd libfftw-3.3
%MSBUILD% libfftw-3.3.vcxproj /p:Configuration=%CONFIG% /p:Platform=%PLATFORM% /t:Rebuild
IF ERRORLEVEL 1 (
SET VALRETURN=1
goto END
)
copy %PLATFORM%\%CONFIG%\libfftw-3.3.lib %LIB_DIR%
copy %PLATFORM%\%CONFIG%\libfftw-3.3.pdb %LIB_DIR%
if not %STATIC_LIBS% (
copy %PLATFORM%\%CONFIG%\libfftw-3.3.dll %LIB_DIR%
)
rem Need libfftwf as well
cd ..\libfftwf-3.3
%MSBUILD% libfftwf-3.3.vcxproj /p:Configuration=%CONFIG% /p:Platform=%PLATFORM% /t:Rebuild
IF ERRORLEVEL 1 (
SET VALRETURN=1
goto END
)
copy %OUTPUT_PATH%\libfftwf-3.3.lib %LIB_DIR%
copy %OUTPUT_PATH%\libfftwf-3.3.pdb %LIB_DIR%
if not %STATIC_LIBS% (
copy %OUTPUT_PATH%\libfftwf-3.3.dll %LIB_DIR%
)
copy ..\..\api\fftw3.h %INCLUDE_DIR%
:END
cd %ROOT_DIR%
REM the GOTO command resets the errorlevel and the endlocal resets the local environment,
REM so I have to use this workaround
ENDLOCAL & SET VALRETURN=%VALRETURN%
exit /b %VALRETURN%