11set (CMAKE_LEGACY_CYGWIN_WIN32 0)
2- set (CADABRA_CMAKE_VERSION 3.11 )
2+ set (CADABRA_CMAKE_VERSION 3.12 )
33
44# Policy settings for CMake to resolve ambiguities.
55
@@ -14,12 +14,7 @@ if(POLICY CMP0127)
1414endif ()
1515
1616cmake_minimum_required (VERSION ${CADABRA_CMAKE_VERSION} )
17- if (${CMAKE_VERSION} VERSION_LESS "3.8.0" )
18- set (CMAKE_CXX_STANDARD 14)
19- message (STATUS "Using C++14 as you are using CMake < 3.8; consider upgrading as future versions of Cadabra may use C++17 features" )
20- else ()
21- set (CMAKE_CXX_STANDARD 17)
22- endif ()
17+ set (CMAKE_CXX_STANDARD 17)
2318project (Cadabra)
2419
2520if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
@@ -115,9 +110,6 @@ include(cmake/packaging.cmake)
115110#
116111option (MSVC_TARGET_CONSOLE "Force Release book on MSVC to display a console window" OFF )
117112
118- # Provide option to build with Python 3 (default) or Python 2.
119- option (USE_PYTHON_3 "Use Python 3 if ON, or fall back to Python 2 if OFF" ON )
120-
121113option (APPIMAGE_MODE "Run in AppImage mode, overriding path settings" OFF )
122114if (APPIMAGE_MODE)
123115 message (STATUS "Building for AppImage packaging (Debian paths, MicroTeX)" )
@@ -285,15 +277,10 @@ print_header("Configuring Python")
285277# NEEDED TO USE CMAKE_INSTALL_FULL<dir>
286278include (GNUInstallDirs)
287279
288- if (USE_PYTHON_3)
289- set (PYTHON_POSTFIX "3" )
290- message (STATUS "Building for use with Python 3 (good!)" )
291- else ()
292- set (PYTHON_POSTFIX "" )
293- message (STATUS "Building for use with Python 2 (consider upgrading!)" )
294- endif ()
280+ set (PYTHON_POSTFIX "3" )
281+ # message(STATUS "Building for use with Python 3 (good!)")
295282
296- # set(PYBIND11_FINDPYTHON ON )
283+ find_package (Python COMPONENTS Interpreter Development )
297284add_subdirectory (libs/pybind11)
298285
299286message (STATUS "Found python ${PYTHON_LIBRARIES} " )
0 commit comments