diff options
Diffstat (limited to 'media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch')
-rw-r--r-- | media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch new file mode 100644 index 000000000000..d83e64e0c21f --- /dev/null +++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch @@ -0,0 +1,38 @@ +--- luminance-hdr-2.3.1/cmake/CompilerSettings.cmake ++++ luminance-hdr-2.3.1/cmake/CompilerSettings.cmake +@@ -8,6 +8,8 @@ + ENDIF() + ENDIF() + ++OPTION(USE_OPENMP "Use openmp threading support." ON) ++ + #Activate C++11 support, when available + if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) +@@ -39,16 +41,18 @@ + endif() + + #OpenMP Support under Linux, Windows with MSVC & MacOS X with GCC >= 4.3 +-IF(MSVC) +- FIND_PACKAGE(OpenMP REQUIRED) +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") +-ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX) +- EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) +- IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) +- MESSAGE(STATUS "GCC >= 4.3") ++IF(USE_OPENMP) ++ IF(MSVC) + FIND_PACKAGE(OpenMP REQUIRED) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") ++ ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX) ++ EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) ++ IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) ++ MESSAGE(STATUS "GCC >= 4.3") ++ FIND_PACKAGE(OpenMP REQUIRED) ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") ++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") ++ ENDIF() + ENDIF() + ENDIF() |