yet another try to unhack libgomp linking: use OpenMP binding if and only if present
This commit is contained in:
		
							parent
							
								
									a883b73981
								
							
						
					
					
						commit
						97f6468663
					
				@ -272,9 +272,10 @@ target_link_libraries(OSRM ${STXXL_LIBRARY})
 | 
			
		||||
target_link_libraries(osrm-extract ${STXXL_LIBRARY})
 | 
			
		||||
target_link_libraries(osrm-prepare ${STXXL_LIBRARY})
 | 
			
		||||
 | 
			
		||||
find_package(Gomp REQUIRED)
 | 
			
		||||
if(LIBGOMP_FOUND)
 | 
			
		||||
  target_link_libraries(osrm-extract gomp)
 | 
			
		||||
find_package(OpenMP)
 | 
			
		||||
if(OPENMP_FOUND)
 | 
			
		||||
 message(STATUS "OpenMP support found. Linking just in case for stxxl")
 | 
			
		||||
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OSMPBF REQUIRED)
 | 
			
		||||
 | 
			
		||||
@ -1,18 +0,0 @@
 | 
			
		||||
# - Try to find Libgomp
 | 
			
		||||
# Once done this will define
 | 
			
		||||
#  LIBGOMP_FOUND - System has Libgomp
 | 
			
		||||
#  LIBGOMP_INCLUDE_DIRS - The Libgomp include directories
 | 
			
		||||
#  LIBGOMP_DEFINITIONS - Compiler switches required for using Libgomp
 | 
			
		||||
 | 
			
		||||
message(STATUS "Checking if libgomp is present")
 | 
			
		||||
 | 
			
		||||
find_library(LIBGOMP_LIBRARY NAMES gomp libgomp
 | 
			
		||||
             HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS} )
 | 
			
		||||
 | 
			
		||||
set(LIBGOMP_LIBRARIES ${LIBGOMP_LIBRARY} )
 | 
			
		||||
 | 
			
		||||
include(FindPackageHandleStandardArgs)
 | 
			
		||||
# handle the QUIETLY and REQUIRED arguments and set LIBGOMP_FOUND to TRUE
 | 
			
		||||
# if all listed variables are TRUE
 | 
			
		||||
#find_package_handle_standard_args(Libgomp  DEFAULT_MSG
 | 
			
		||||
#                                  LIBGOMP_LIBRARY LIBGOMP_INCLUDE_DIR)
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user