From 729f54dbc904a49a2b0d717e61cf9f57b26e0358 Mon Sep 17 00:00:00 2001 From: Leon Chen <32035063+LeonCHEN233@users.noreply.github.com> Date: Wed, 14 Feb 2018 15:35:43 +0000 Subject: [PATCH 1/5] Update CMakeLists.txt --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e59adf518..3284f0400e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,6 @@ option(MATLAB_BINDINGS "Compile MATLAB bindings if MATLAB is found." OFF) option(TEST_VERBOSE "Run test cases with verbose output." OFF) option(BUILD_TESTS "Build tests." ON) option(BUILD_CLI_EXECUTABLES "Build command-line executables." ON) -option(BUILD_PYTHON_BINDINGS "Build Python bindings." ON) option(BUILD_SHARED_LIBS "Compile shared libraries (if OFF, static libraries are compiled)." ON) option(BUILD_WITH_COVERAGE @@ -24,6 +23,16 @@ option(FORCE_CXX11 OFF) enable_testing() +# Python can not be binged with mlpack-master on windows yet +# Set BUILD_PYTHON_BINDINGS to OFF when the platform are windows +if(WIN32) + option(BUILD_PYTHON_BINDINGS "Build Python bindings." OFF) + MESSAGE("BUILD_PYTHON_BINDINGS?" ${BUILD_PYTHON_BINDINGS}) +else() + option(BUILD_PYTHON_BINDINGS "Build Python bindings." ON) + MESSAGE("BUILD_PYTHON_BINDINGS?" ${BUILD_PYTHON_BINDINGS}) +endif() + # Ensure that we have a C++11 compiler. In newer versions of CMake, this is # done with target_compile_features() when the mlpack library target is added in # src/mlpack/CMakeLists.txt. From 6d7250b1390d6ea3f46d2fdfd0080c6210cb6d7b Mon Sep 17 00:00:00 2001 From: Leon Chen <32035063+LeonCHEN233@users.noreply.github.com> Date: Wed, 14 Feb 2018 19:11:32 +0000 Subject: [PATCH 2/5] Update CMakeLists.txt --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3284f0400e..50830fa618 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,10 +27,9 @@ enable_testing() # Set BUILD_PYTHON_BINDINGS to OFF when the platform are windows if(WIN32) option(BUILD_PYTHON_BINDINGS "Build Python bindings." OFF) - MESSAGE("BUILD_PYTHON_BINDINGS?" ${BUILD_PYTHON_BINDINGS}) + message(WARNING "By default Python bindings are not compiled for Windows because they are not known to work. Set BUILD_PYTHON_BINDINGS to ON if you want them built.") else() option(BUILD_PYTHON_BINDINGS "Build Python bindings." ON) - MESSAGE("BUILD_PYTHON_BINDINGS?" ${BUILD_PYTHON_BINDINGS}) endif() # Ensure that we have a C++11 compiler. In newer versions of CMake, this is From d2c69afb68dac185046e781de3ba87dad85aee4c Mon Sep 17 00:00:00 2001 From: Leon Chen <32035063+LeonCHEN233@users.noreply.github.com> Date: Wed, 28 Feb 2018 00:05:47 +0000 Subject: [PATCH 3/5] Update CMakeLists.txt --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50830fa618..69b2387ab9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ option(MATLAB_BINDINGS "Compile MATLAB bindings if MATLAB is found." OFF) option(TEST_VERBOSE "Run test cases with verbose output." OFF) option(BUILD_TESTS "Build tests." ON) option(BUILD_CLI_EXECUTABLES "Build command-line executables." ON) +option(BUILD_PYTHON_BINDINGS "Build Python bindings." ON) option(BUILD_SHARED_LIBS "Compile shared libraries (if OFF, static libraries are compiled)." ON) option(BUILD_WITH_COVERAGE @@ -23,13 +24,11 @@ option(FORCE_CXX11 OFF) enable_testing() -# Python can not be binged with mlpack-master on windows yet +# Currently Python bindings aren't supported on windows # Set BUILD_PYTHON_BINDINGS to OFF when the platform are windows if(WIN32) option(BUILD_PYTHON_BINDINGS "Build Python bindings." OFF) message(WARNING "By default Python bindings are not compiled for Windows because they are not known to work. Set BUILD_PYTHON_BINDINGS to ON if you want them built.") -else() - option(BUILD_PYTHON_BINDINGS "Build Python bindings." ON) endif() # Ensure that we have a C++11 compiler. In newer versions of CMake, this is From 93876f8cb1aeabc42e5ab40586658f93975e61c0 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Thu, 1 Mar 2018 10:00:28 -0500 Subject: [PATCH 4/5] Clarify messages and comments slightly (and wrap lines). --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a1ebd8257..7842358222 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,15 +20,17 @@ option(BUILD_WITH_COVERAGE option(MATHJAX "Use MathJax for HTML Doxygen output (disabled by default)." OFF) option(FORCE_CXX11 - "Don't check that the compiler supports C++11, just assume it. Make sure to specify any necessary flag to enable C++11 as part of CXXFLAGS." - OFF) + "Don't check that the compiler supports C++11, just assume it. Make sure " + "to specify any necessary flag to enable C++11 as part of CXXFLAGS." OFF) enable_testing() -# Currently Python bindings aren't supported on windows -# Set BUILD_PYTHON_BINDINGS to OFF when the platform are windows +# Currently Python bindings aren't known to build successfully on Windows, so +# set BUILD_PYTHON_BINDINGS to OFF when the platform is Windows. if(WIN32) option(BUILD_PYTHON_BINDINGS "Build Python bindings." OFF) - message(WARNING "By default Python bindings are not compiled for Windows because they are not known to work. Set BUILD_PYTHON_BINDINGS to ON if you want them built.") + message(WARNING "By default Python bindings are not compiled for Windows " + "because they are not known to work. Set BUILD_PYTHON_BINDINGS to ON if " + "you want them built.") endif() # Ensure that we have a C++11 compiler. In newer versions of CMake, this is From 3997410ebbb777fff32f30d790778cbe805913e9 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Thu, 1 Mar 2018 10:01:18 -0500 Subject: [PATCH 5/5] Fix spacing. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7842358222..c5dda3adca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ enable_testing() # Currently Python bindings aren't known to build successfully on Windows, so # set BUILD_PYTHON_BINDINGS to OFF when the platform is Windows. -if(WIN32) +if (WIN32) option(BUILD_PYTHON_BINDINGS "Build Python bindings." OFF) message(WARNING "By default Python bindings are not compiled for Windows " "because they are not known to work. Set BUILD_PYTHON_BINDINGS to ON if "