Don't force user to compile with OpenMP.

This commit is contained in:
Benjamin Bouvier 2012-06-21 15:05:32 +02:00
commit d0a00a5216
2 changed files with 11 additions and 6 deletions

View file

@ -44,10 +44,12 @@ ENABLE_LANGUAGE(C)
### 2) Include required modules / configuration files
#####################################################################################
FIND_PACKAGE(OpenMP)
IF(OPENMP_FOUND)
IF(WITH_OMP)
FIND_PACKAGE(OpenMP)
IF(OPENMP_FOUND)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
ENDIF()
ENDIF()
INCLUDE(CMakeBackwardCompatibilityCXX)

View file

@ -5,10 +5,13 @@ SET(PROJECT_VERSION_MINOR 3)
SET(PROJECT_VERSION_PATCH 0)
SET(PROJECT_VERSION_MISC "-edge")
# If you plan to use OpenMP, put the following boolean to true :
SET(WITH_OMP FALSE CACHE BOOL "Use OpenMP ?" FORCE)
# If you plan to use MPI, precise here where are the static libraries from
# openmpi and boost::mpi.
SET(WITH_MPI FALSE CACHE BOOL "Use mpi ?" FORCE)
SET(MPI_DIR "put root directory of openmpi here" CACHE PATH "OpenMPI directory" FORCE)
SET(BOOST_DIR "put root directory of boost here" CACHE PATH "Boost directory" FORCE)
SET(MPI_DIR "/mpi/directory" CACHE PATH "OpenMPI directory" FORCE)
SET(BOOST_DIR "/boost/directory" CACHE PATH "Boost directory" FORCE)