mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
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(CheckLib)
|
||||||
|
|
||||||
include(FindOpenGL REQUIRED)
|
include(FindOpenGL)
|
||||||
include_directories(${OPENGL_INCLUDE_DIR})
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
if(NOT OPENGL_GLU_FOUND)
|
if(NOT OPENGL_GLU_FOUND)
|
||||||
message(FATAL_ERROR "GLU is required but not found")
|
message(FATAL_ERROR "GLU is required but not found")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(FindOpenMP)
|
option(OPENMP "Enable OpenMP parallelization" ON)
|
||||||
if(OPENMP_FOUND)
|
if(OPENMP)
|
||||||
add_definitions("${OpenMP_CXX_FLAGS}")
|
include(FindOpenMP OPTIONAL)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
|
if(OPENMP_FOUND)
|
||||||
else()
|
message("OpenMP parallelization enabled")
|
||||||
message(FATAL_ERROR "OpenMP is required but not found")
|
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()
|
endif()
|
||||||
|
|
||||||
include(FindALSA OPTIONAL)
|
include(FindALSA OPTIONAL)
|
||||||
@ -381,7 +386,7 @@ if(NOT DISABLE_WX)
|
|||||||
VERSION_EQUAL 2.8.2)
|
VERSION_EQUAL 2.8.2)
|
||||||
check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED)
|
check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED)
|
||||||
else()
|
else()
|
||||||
include(FindGTK2 REQUIRED)
|
include(FindGTK2)
|
||||||
if(GTK2_FOUND)
|
if(GTK2_FOUND)
|
||||||
include_directories(${GTK2_INCLUDE_DIRS})
|
include_directories(${GTK2_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user