[mlpack-git] master: Fix CMake version check. (ee0da57)

gitdub at mlpack.org gitdub at mlpack.org
Wed Oct 5 11:28:10 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/c72f9c3224a2381dc8db6da5d83815d3b6465d45...ee0da579342f05c77f7cf54b54d624fc408db713

>---------------------------------------------------------------

commit ee0da579342f05c77f7cf54b54d624fc408db713
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Oct 5 11:28:10 2016 -0400

    Fix CMake version check.


>---------------------------------------------------------------

ee0da579342f05c77f7cf54b54d624fc408db713
 src/mlpack/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mlpack/CMakeLists.txt b/src/mlpack/CMakeLists.txt
index 8e32636..0aad986 100644
--- a/src/mlpack/CMakeLists.txt
+++ b/src/mlpack/CMakeLists.txt
@@ -25,7 +25,9 @@ add_library(mlpack ${MLPACK_SRCS})
 
 # If we are not forcing C++11 support, check that the compiler supports C++11
 # and enable it.
-if (NOT FORCE_CXX11)
+if ((NOT FORCE_CXX11) AND
+    (NOT (${CMAKE_MAJOR_VERSION} LESS 3 OR
+         (${CMAKE_MAJOR_VERSION} EQUAL 3 AND ${CMAKE_MINOR_VERSION} LESS 1))))
   # Use the newer C++11 checks.
   include(../../CMake/NewCXX11.cmake)
 endif ()




More information about the mlpack-git mailing list