[mlpack] 14/58: Only depend on automatic linking when MSVC is used, and prep for OpenMP support.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Tue Sep 9 13:19:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit a344e5dff0d6fd3de0ff2d62ee880b571848acab
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Mon Aug 18 14:32:51 2014 +0000

    Only depend on automatic linking when MSVC is used, and prep for OpenMP support.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17062 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 CMakeLists.txt | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13cd8fa..82a97e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -182,19 +182,28 @@ include_directories(${Boost_INCLUDE_DIRS})
 
 link_directories(${Boost_LIBRARY_DIRS})
 
-# On Windows, automatic linking is performed, so we don't need to worry about
-# it.  Clear the list of libraries to link against and let Visual Studio handle
-# it.
-if (WIN32)
+# In Visual Studio, automatic linking is performed, so we don't need to worry
+# about it.  Clear the list of libraries to link against and let Visual Studio
+# handle it.
+if (MSVC)
   link_directories(${Boost_LIBRARY_DIRS})
   set(Boost_LIBRARIES "")
-endif (WIN32)
+endif (MSVC)
 
 # For Boost testing framework (will have no effect on non-testing executables).
 # This specifies to Boost that we are dynamically linking to the Boost test
 # library.
 add_definitions(-DBOOST_TEST_DYN_LINK)
 
+# We require OpenMP now.
+#find_package(OpenMP REQUIRED)
+#if (OPENMP_FOUND)
+#  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+#  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+#  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}
+#      ${OpenMP_EXE_LINKER_FLAGS}")
+#endif (OPENMP_FOUND)
+
 # Create a 'distclean' target in case the user is using an in-source build for
 # some reason.
 include(CMake/TargetDistclean.cmake OPTIONAL)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list