diff options
Diffstat (limited to 'cmake')
-rwxr-xr-x | cmake/config-ix.cmake | 1 | ||||
-rwxr-xr-x | cmake/modules/LLVM-Config.cmake | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 274de31c9e..c625b871e4 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -99,6 +99,7 @@ if( NOT PURE_WINDOWS ) endif() endif() check_library_exists(dl dlopen "" HAVE_LIBDL) + check_library_exists(rt clock_gettime "" HAVE_LIBRT) endif() # function checks diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake index 574335c49d..163401c857 100755 --- a/cmake/modules/LLVM-Config.cmake +++ b/cmake/modules/LLVM-Config.cmake @@ -4,11 +4,14 @@ function(get_system_libs return_var) if( MINGW ) set(system_libs ${system_libs} imagehlp psapi) elseif( CMAKE_HOST_UNIX ) + if( HAVE_LIBRT ) + set(system_libs ${system_libs} rt) + endif() if( HAVE_LIBDL ) - set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) + set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) endif() if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) - set(system_libs ${system_libs} pthread) + set(system_libs ${system_libs} pthread) endif() endif( MINGW ) endif( NOT MSVC ) |