Skip to content

Commit

Permalink
Should not compile the two files if -DWITH_AVX=OFF. (PaddlePaddle#163)
Browse files Browse the repository at this point in the history
* If cmake -DWITH_AVX=OFF during configuration, should not compile the file src/hl_math.cc and src/hl_avx_functions.cc.
  • Loading branch information
bombhero authored and reyoung committed Oct 10, 2016
1 parent 199a6a4 commit 9f244e4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions paddle/cuda/CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ set(AVX_SOURCES
src/hl_math.cc
src/hl_avx_functions.cc
)
set(CUDA_SOURCES
src/hl_time.cc
src/hl_cpu_functions.cc
${AVX_SOURCES})

if(WITH_AVX)
set(CUDA_SOURCES
src/hl_time.cc
src/hl_cpu_functions.cc
${AVX_SOURCES})
else()
set(CUDA_SOURCES
src/hl_time.cc
src/hl_cpu_functions.cc)
endif()

set(CUDA_CXX_WITH_GPU_SOURCES
src/hl_cuda_cublas.cc
Expand Down

0 comments on commit 9f244e4

Please sign in to comment.