Commit d580f92f authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added --with-openmp flag to the build script

parent a86bd502
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ endif( WITH_CUDA STREQUAL "yes" )
####
# Check for OpenMP
#
if( OPENMP_FOUND )
if( OPENMP_FOUND AND WITH_OPENMP STREQUAL "yes" )
   message( "Compiler supports OpenMP." )
   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_OPENMP ${OpenMP_CXX_FLAGS}" )
endif()
+4 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ VERBOSE=""
WITH_CLANG="no"
WITH_CUDA="yes"
WITH_CUDA_ARCH="auto"
WITH_OPENMP="yes"
WITH_TESTS="yes"
WITH_COVERAGE="no"
WITH_EXAMPLES="yes"
@@ -44,6 +45,7 @@ do
        --with-mic=*                     ) WITH_MIC="${option#*=}" ;;
        --with-cuda=*                    ) WITH_CUDA="${option#*=}" ;;
        --with-cuda-arch=*               ) WITH_CUDA_ARCH="${option#*=}";;
        --with-openmp=*                  ) WITH_OPENMP="${option#*=}" ;;
        --with-tests=*                   ) WITH_TESTS="${option#*=}" ;;
        --with-coverage=*                ) WITH_COVERAGE="${option#*=}" ;;
        --with-examples=*                ) WITH_EXAMPLES="${option#*=}" ;;
@@ -77,6 +79,7 @@ then
    echo "   --with-mic=yes/no                     Enable MIC (Intel Xeon Phi). 'no' by default (Intel Compiler required)."
    echo "   --with-cuda=yes/no                    Enable CUDA. 'yes' by default (CUDA Toolkit is required)."
    echo "   --with-cuda-arch=all/auto/30/35/...   Choose CUDA architecture. 'auto' by default."
    echo "   --with-openmp=yes/no                  Enable OpenMP. 'yes' by default."
    echo "   --with-tests=yes/no                   Enable unit tests. 'yes' by default."
    echo "   --with-coverage=yes/no                Enable code coverage reports for unit tests. 'no' by default (lcov is required)."
    echo "   --with-examples=yes/no                Compile the 'examples' directory. 'yes' by default."
@@ -104,6 +107,7 @@ ${CMAKE} ${ROOT_DIR} \
         -DWITH_MIC=${WITH_MIC} \
         -DWITH_CUDA=${WITH_CUDA} \
         -DWITH_CUDA_ARCH=${WITH_CUDA_ARCH} \
         -DWITH_OPENMP=${WITH_OPENMP} \
         -DWITH_TESTS=${WITH_TESTS} \
         -DWITH_COVERAGE=${WITH_COVERAGE} \
         -DWITH_EXAMPLES=${WITH_EXAMPLES} \