[mlpack-git] master: COMPILER_SUPPORT_LIBRARIES is necessary for the command-line programs. (8376f04)
gitdub at mlpack.org
gitdub at mlpack.org
Tue Sep 13 11:34:44 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/12a10f428c07dd409d52684932655842a8eddb29...8d6d3919faf8596778b6db8c8865262fec9c394b
>---------------------------------------------------------------
commit 8376f040b52d80940f7e1b75f989e27250724c85
Author: Ryan Curtin <ryan at ratml.org>
Date: Tue Sep 13 11:34:44 2016 -0400
COMPILER_SUPPORT_LIBRARIES is necessary for the command-line programs.
>---------------------------------------------------------------
8376f040b52d80940f7e1b75f989e27250724c85
CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 40164f6..1df3c97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,10 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
endif()
+# These support libraries are used if we need to link against something
+# specific. This list is a subset of MLPACK_LIBRARIES.
+set(COMPILER_SUPPORT_LIBRARIES "")
+
# If using clang, we have to link against libc++ depending on the
# OS (at least on some systems). Further, gcc sometimes optimizes calls to
# math.h functions, making -lm unnecessary with gcc, but it may still be
@@ -75,6 +79,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
endif()
# Link everything with -lm.
+ set(COMPILER_SUPPORT_LIBRARIES ${COMPILER_SUPPORT_LIBRARIES} "m")
set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} "m")
endif()
More information about the mlpack-git
mailing list