mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
Add cmake build option for disabling OpenMP (#986)
In my case this is because of issue #985, but there's also the use case of being able to test without OpenMP. For example, to disable it on my system in order to test if the crash had anything to do with OpenMP, I had to manually edit `CMakeLists.txt` each time I wanted to turn it off and on again.
This commit is contained in:
parent
6c593180ce
commit
db5db4b845
1 changed files with 2 additions and 1 deletions
|
@ -90,6 +90,7 @@ option ( enable-pkgconfig "use pkg-config to locate fluidsynth's (mostly optiona
|
|||
option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
|
||||
option ( enable-readline "compile readline lib line editing (if it is available)" on )
|
||||
option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
|
||||
option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" on )
|
||||
|
||||
# Platform specific options
|
||||
if ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )
|
||||
|
@ -698,7 +699,7 @@ endif ( enable-threads )
|
|||
|
||||
unset ( HAVE_OPENMP CACHE )
|
||||
find_package ( OpenMP QUIET )
|
||||
if ( OpenMP_FOUND OR OpenMP_C_FOUND )
|
||||
if (enable-openmp AND ( OpenMP_FOUND OR OpenMP_C_FOUND ) )
|
||||
message(STATUS "Found OpenMP ${OpenMP_C_SPEC_DATE}")
|
||||
# require at least OMP 4.0
|
||||
if ( ( NOT OpenMP_C_SPEC_DATE LESS "201307" ) OR NOT ( OpenMP_C_VERSION VERSION_LESS "4.0" ) )
|
||||
|
|
Loading…
Reference in a new issue