diff --git a/CMakeLists.txt b/CMakeLists.txt index 689e498d31..c5dda3adca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,10 +20,19 @@ 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 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.") +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.