[mlpack-svn] r15221 - mlpack/trunk/src/mlpack

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Jun 11 12:31:08 EDT 2013


Author: marcus
Date: 2013-06-11 12:31:08 -0400 (Tue, 11 Jun 2013)
New Revision: 15221

Modified:
   mlpack/trunk/src/mlpack/CMakeLists.txt
Log:
Add target_link_libraries for librt to support clock_gettime() for Linux.

Modified: mlpack/trunk/src/mlpack/CMakeLists.txt
===================================================================
--- mlpack/trunk/src/mlpack/CMakeLists.txt	2013-06-11 15:44:54 UTC (rev 15220)
+++ mlpack/trunk/src/mlpack/CMakeLists.txt	2013-06-11 16:31:08 UTC (rev 15221)
@@ -35,6 +35,12 @@
   SOVERSION 1
 )
 
+# Make sure the linker can find the needed library.
+# rt: clock_gettime()
+if(UNIX AND NOT APPLE)
+    target_link_libraries(mlpack rt)
+endif(UNIX AND NOT APPLE)
+
 # Collect all header files in the library.
 file(GLOB_RECURSE INCLUDE_H_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
 file(GLOB_RECURSE INCLUDE_HPP_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.hpp)




More information about the mlpack-svn mailing list