mirror of https://github.com/wb2osz/direwolf.git
				
				
				
			Add -lrt to Linux link so it will work with CentOS 6.
This commit is contained in:
		
							parent
							
								
									249f5bd471
								
							
						
					
					
						commit
						b382e5fb0f
					
				|  | @ -180,8 +180,17 @@ if (C_CLANG OR C_GCC) | |||
|   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wvla -ffast-math -ftree-vectorize -D_GNU_SOURCE ${EXTRA_FLAGS}") | ||||
|   # | ||||
|   # | ||||
|   # for math.h | ||||
|   # -lm is needed for functins in math.h | ||||
|   if (LINUX) | ||||
|     # We have another problem with CentOS 6.  clock_gettime() is in librt so we need -lrt. | ||||
|     # The clock_* functions were moved into gnu libc for version 2.17. | ||||
|     #   https://sourceware.org/ml/libc-announce/2012/msg00001.html | ||||
|     # If using gnu libc 2.17, or later, the -lrt is no longer needed but doesn't hurt. | ||||
|     # I'm making this conditional on LINUX because it is not needed for BSD and MacOSX. | ||||
|     link_libraries("-lrt -lm") | ||||
|   else() | ||||
|     link_libraries("-lm") | ||||
|   endif() | ||||
| elseif (C_MSVC) | ||||
|   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W3 -MP ${EXTRA_FLAGS}") | ||||
| endif() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue