Make OpenMP optional on linux. For now it is on by default, but you can disable it by adding -DOPENMP=OFF to the cmake command line.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7301 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
25231f8007
commit
fb4f317503
|
@ -139,18 +139,23 @@ endif()
|
|||
|
||||
include(CheckLib)
|
||||
|
||||
include(FindOpenGL REQUIRED)
|
||||
include(FindOpenGL)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
if(NOT OPENGL_GLU_FOUND)
|
||||
message(FATAL_ERROR "GLU is required but not found")
|
||||
endif()
|
||||
|
||||
include(FindOpenMP)
|
||||
if(OPENMP_FOUND)
|
||||
add_definitions("${OpenMP_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
else()
|
||||
message(FATAL_ERROR "OpenMP is required but not found")
|
||||
option(OPENMP "Enable OpenMP parallelization" ON)
|
||||
if(OPENMP)
|
||||
include(FindOpenMP OPTIONAL)
|
||||
if(OPENMP_FOUND)
|
||||
message("OpenMP parallelization enabled")
|
||||
add_definitions("${OpenMP_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT OPENMP_FOUND)
|
||||
message("OpenMP parallelization disabled")
|
||||
endif()
|
||||
|
||||
include(FindALSA OPTIONAL)
|
||||
|
@ -381,7 +386,7 @@ if(NOT DISABLE_WX)
|
|||
VERSION_EQUAL 2.8.2)
|
||||
check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED)
|
||||
else()
|
||||
include(FindGTK2 REQUIRED)
|
||||
include(FindGTK2)
|
||||
if(GTK2_FOUND)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue