CMake: Use implicit compiler library paths to find OpenMP library
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 3 Dec 2015 10:34:41 +0000 (15:34 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 3 Dec 2015 10:34:41 +0000 (15:34 +0500)
Was lost since the original patch sent to Cambo, didn't notice the failure before
because had it applied locally.

Without this flag certain configuration wouldn't fins libgomp.

CMakeLists.txt

index 039a745070d2bc679923fdd9b25f27044a112d5f..26e0a3f13799a823a522387e2fea691e31e00341 100644 (file)
@@ -2468,7 +2468,7 @@ if(WITH_OPENMP)
                        # since they're passed to the linker as well.
                        add_definitions("${OpenMP_C_FLAGS}")
 
-                       find_library_static(OpenMP_LIBRARIES gomp)
+                       find_library_static(OpenMP_LIBRARIES gomp ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
                endif()
        else()
                set(WITH_OPENMP OFF)