Skip to content

Commit

Permalink
Clean up: Remove GLEW, add common entry for boost, add entries for ne…
Browse files Browse the repository at this point in the history
…w CUDA computes
  • Loading branch information
shehzan10 committed Oct 17, 2016
1 parent 81a9eb2 commit 64de68a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
15 changes: 9 additions & 6 deletions common.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ REM BILD NONFREE COMPONENTS SUCH AS SIFT
REM THIS HAS A NON-FREE LICENSE
SET BUILD_NONFREE=OFF

REM CPU ASYNCHRONOUS OPTION
SET CPU_ASYNC=ON

REM Set CUDA_COMPUTE_DETECT to OFF to disable auto detection.
REM If no CUDA computes are detected (for example when running on a remote machine)
REM it will default to 20, 30, 50, unless at least one of CUDA_COMPUTE_XY (below) are set to ON
Expand All @@ -37,8 +40,11 @@ REM If CUDA_COMPUTE_DETECT is turned on, the detected computes will be enabled a
SET CUDA_COMPUTE_20=OFF
SET CUDA_COMPUTE_30=OFF
SET CUDA_COMPUTE_35=OFF
SET CUDA_COMPUTE_37=OFF
SET CUDA_COMPUTE_50=OFF
SET CUDA_COMPUTE_52=OFF
SET CUDA_COMPUTE_60=OFF
SET CUDA_COMPUTE_61=OFF

REM TOGGLE EXAMPLES AND TESTS
SET EXAMPLES=ON
Expand All @@ -58,17 +64,14 @@ SET CPU_BLAS_TYPE=LAPACKE
REM CPU_LAPACK_TYPE can be LAPACKE, MKL
SET CPU_LAPACK_TYPE=LAPACKE

REM GLEWmx_STATIC can be ON or OFF
SET GLEWmx_STATIC=OFF

REM PATH SETTING TO RUN EXECUTABLES
SET FI_DIR=%DEPS_DIR%/freeimage-3.17.0_x64
SET FFTW_DIR=%DEPS_DIR%/fftw-3.3.4
SET ACML_DIR=%DEPS_DIR%/acml/ifort64
SET MKL_DIR=%DEPS_DIR%/mkl
SET LAPACKE_DIR=%DEPS_DIR%/lapacke
SET GLEW_DIR=%DEPS_DIR%/glew
SET GLFW_DIR=%DEPS_DIR%/glfw
SET BOOST_DIR=%DEPS_DIR%/boost_1_56_0

SET PATH_EXT=%AF_DIR%\%BUILD_DIR%\package\lib;

Expand Down Expand Up @@ -123,8 +126,8 @@ if "%CPU_LAPACK_TYPE%"=="LAPACKE" (

SET GRAPHICS_OPTIONS=
if "%GRAPHICS%"=="ON" (
SET GRAPHICS_OPTIONS=-DBUILD_GRAPHICS:BOOL=ON -DGLEW_ROOT_DIR="%GLEW_DIR%" -DUSE_GLEWmx_STATIC:BOOL=%GLEWmx_STATIC% -DGLEW_INCLUDE_DIR:STRING="%GLEW_DIR%/include" -DGLEW_LIBRARY="%GLEW_DIR%/lib/glew32.lib" -DGLEWmxd_LIBRARY="%GLEW_DIR%/lib/glew32mx.lib" -DGLEWmxs_LIBRARY="%GLEW_DIR%/lib/glew32mxs.lib" -DGLFW_ROOT_DIR="%GLFW_DIR%" -DGLFW_INCLUDE_DIR:STRING="%GLFW_DIR%/include" -DGLFW_LIBRARY="%GLFW_DIR%/lib/glfw3.lib"
SET PATH_EXT=%PATH_EXT%%DEPS_DIR%\glew\lib;%DEPS_DIR%\glfw\lib;
SET GRAPHICS_OPTIONS=-DBUILD_GRAPHICS:BOOL=ON -DGLFW_ROOT_DIR="%GLFW_DIR%" -DGLFW_INCLUDE_DIR:STRING="%GLFW_DIR%/include" -DGLFW_LIBRARY="%GLFW_DIR%/lib/glfw3.lib"
SET PATH_EXT=%PATH_EXT%%DEPS_DIR%\glfw\lib;
) else (
SET GRAPHICS_OPTIONS=-DBUILD_GRAPHICS:BOOL=OFF
)
Expand Down
8 changes: 4 additions & 4 deletions rebuild_arrayfire.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ SET UNIFIED_OPTIONS=-DBUILD_UNIFIED:BOOL=OFF

if "%CPU%"=="ON" (
echo "Running CPU CMake Configuration"
SET CPU_OPTIONS=-DBUILD_CPU:BOOL=ON %FFT_OPTIONS% %BLAS_OPTIONS% %LAPACK_OPTIONS%
SET CPU_OPTIONS=-DBUILD_CPU:BOOL=ON -DBUILD_CPU_ASYNC:BOOL=%CPU_ASYNC% %FFT_OPTIONS% %BLAS_OPTIONS% %LAPACK_OPTIONS%
)
if "%CUDA%"=="ON" (
echo "Running CUDA CMake Configuration"
SET CUDA_OPTIONS=-DBUILD_CUDA:BOOL=ON -DCUDA_COMPUTE_DETECT:BOOL=%CUDA_COMPUTE_DETECT% -DCUDA_COMPUTE_20:BOOL=%CUDA_COMPUTE_20% -DCUDA_COMPUTE_30:BOOL=%CUDA_COMPUTE_30% -DCUDA_COMPUTE_32:BOOL=%CUDA_COMPUTE_32% -DCUDA_COMPUTE_50:BOOL=%CUDA_COMPUTE_50% -DCUDA_COMPUTE_52:BOOL=%CUDA_COMPUTE_52% -DBOOST_INCLUDEDIR:STRING="%DEPS_DIR%/boost_1_56_0"
SET CUDA_OPTIONS=-DBUILD_CUDA:BOOL=ON -DCUDA_COMPUTE_DETECT:BOOL=%CUDA_COMPUTE_DETECT% -DCUDA_COMPUTE_20:BOOL=%CUDA_COMPUTE_20% -DCUDA_COMPUTE_30:BOOL=%CUDA_COMPUTE_30% -DCUDA_COMPUTE_32:BOOL=OFF -DCUDA_COMPUTE_35:BOOL=%CUDA_COMPUTE_35% -DCUDA_COMPUTE_37:BOOL=%CUDA_COMPUTE_37% -DCUDA_COMPUTE_50:BOOL=%CUDA_COMPUTE_50% -DCUDA_COMPUTE_52:BOOL=%CUDA_COMPUTE_52% -DCUDA_COMPUTE_53:BOOL=OFF -DCUDA_COMPUTE_60:BOOL=%CUDA_COMPUTE_60% -DCUDA_COMPUTE_61:BOOL=%CUDA_COMPUTE_61% -DBOOST_INCLUDEDIR:STRING="%BOOST_DIR%"
)
if "%OPENCL%"=="ON" (
echo "Running OpenCL CMake Configuration"
SET OPENCL_OPTIONS=-DBUILD_OPENCL:BOOL=ON -DBOOST_INCLUDEDIR:STRING="%DEPS_DIR%/boost_1_56_0" %BLAS_OPTIONS% %LAPACK_OPTIONS%
SET OPENCL_OPTIONS=-DBUILD_OPENCL:BOOL=ON -DBOOST_INCLUDEDIR:STRING="%BOOST_DIR%" %BLAS_OPTIONS% %LAPACK_OPTIONS%
)
if "%UNIFIED%"=="ON" (
echo "Running Unified CMake Configuration"
SET UNIFIED_OPTIONS=-DBUILD_UNIFIED:BOOL=ON
)

echo "Generating CMAKE"
%CMAKE% .. %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE:STRING="%BUILD_TYPE%" -DMIN_BUILD_TIME:BOOL=%MIN_BUILD_TIME% -DCMAKE_INSTALL_PREFIX:STRING=%AF_INSTALL_PATH% -DBUILD_TEST:STRING=%TESTS% -DBUILD_GTEST:STRING=%TESTS% -DBUILD_EXAMPLES:STRING=%EXAMPLES% -DBUILD_NONFREE=%BUILD_NONFREE% %FREEIMAGE_OPTIONS% %GRAPHICS_OPTIONS% %CPU_OPTIONS% %CUDA_OPTIONS% %OPENCL_OPTIONS% %UNIFIED_OPTIONS%
%CMAKE% .. %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE:STRING="%BUILD_TYPE%" -DMIN_BUILD_TIME:BOOL=%MIN_BUILD_TIME% -DCMAKE_INSTALL_PREFIX:STRING=%AF_INSTALL_PATH% -DBUILD_TEST:STRING=%TESTS% -DBUILD_EXAMPLES:STRING=%EXAMPLES% -DBUILD_NONFREE=%BUILD_NONFREE% %FREEIMAGE_OPTIONS% %GRAPHICS_OPTIONS% %CPU_OPTIONS% %CUDA_OPTIONS% %OPENCL_OPTIONS% %UNIFIED_OPTIONS%

@echo off

Expand Down

0 comments on commit 64de68a

Please sign in to comment.