diff options
| -rw-r--r-- | host/CMakeLists.txt | 21 | ||||
| -rw-r--r-- | host/cmake/Modules/UHDPython.cmake | 32 | ||||
| -rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 4 | ||||
| -rw-r--r-- | host/docs/build.dox.in | 2 | ||||
| -rw-r--r-- | host/docs/pythonapi.dox | 9 | ||||
| -rw-r--r-- | host/examples/init_usrp/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | host/include/.clang-format | 94 | 
7 files changed, 18 insertions, 148 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index a630016e9..52050cb51 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -10,7 +10,7 @@  ########################################################################  # NOTE! If you change the version in the following line, also change  # CMAKE_MIN_VERSION below. (This won't take a variable). -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.8)  if(POLICY CMP0048)    cmake_policy(SET CMP0048 NEW) # Suppress Version warnings  endif(POLICY CMP0048) @@ -23,20 +23,19 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)  ########################################################################  # UHD Dependency Minimum Versions  ######################################################################## -set(CMAKE_MIN_VERSION "3.5.1") -set(GCC_MIN_VERSION "4.8.0") -set(CLANG_MIN_VERSION "3.4.0") -set(APPLECLANG_MIN_VERSION "503") +set(CMAKE_MIN_VERSION "3.8") +set(GCC_MIN_VERSION "5.4.0") +set(CLANG_MIN_VERSION "3.8.0") +set(APPLECLANG_MIN_VERSION "600")  # Make sure to update the next two in unison: -set(MSVC_MIN_VERSION "1900") -set(MSVC_MIN_VERSION_READABLE "14.0") +set(MSVC_MIN_VERSION "1910") +set(MSVC_MIN_VERSION_READABLE "15.0")  # This Python version gets used for Python API (if requested) as well as  # all the build-time Python scripts -set(PYTHON_MIN_VERSION "2.7") -set(PYTHON3_MIN_VERSION "3.5") +set(PYTHON_MIN_VERSION "3.5")  # Other deps  set(BOOST_MIN_VERSION "1.58") -set(NUMPY_MIN_VERSION "1.7") +set(NUMPY_MIN_VERSION "1.11")  set(PY_MAKO_MIN_VERSION "0.4.2")  set(PY_REQUESTS_MIN_VERSION "2.0") @@ -360,7 +359,7 @@ UHD_INSTALL(FILES  ########################################################################  # Register top level components  ######################################################################## -LIBUHD_REGISTER_COMPONENT("LibUHD" ENABLE_LIBUHD ON "Boost_FOUND;HAVE_PYTHON_PLAT_MIN_VERSION;HAVE_PYTHON_MODULE_MAKO" OFF ON) +LIBUHD_REGISTER_COMPONENT("LibUHD" ENABLE_LIBUHD ON "Boost_FOUND;HAVE_PYTHON_MODULE_MAKO" OFF ON)  LIBUHD_REGISTER_COMPONENT("LibUHD - C API" ENABLE_C_API ON "ENABLE_LIBUHD" OFF OFF)  if(WIN32)    LIBUHD_REGISTER_COMPONENT("LibUHD - Python API" ENABLE_PYTHON_API OFF "ENABLE_LIBUHD;HAVE_PYTHON_MODULE_NUMPY;HAVE_PYTHON_LIBS" OFF OFF) diff --git a/host/cmake/Modules/UHDPython.cmake b/host/cmake/Modules/UHDPython.cmake index a93761131..d3fac6100 100644 --- a/host/cmake/Modules/UHDPython.cmake +++ b/host/cmake/Modules/UHDPython.cmake @@ -19,12 +19,9 @@ if(PYTHON_EXECUTABLE)      set(PYTHONINTERP_FOUND TRUE)  endif(PYTHON_EXECUTABLE) -# We always try to find Py3k first. Once we only support Py3k we can remove -# most of this.  if(NOT PYTHONINTERP_FOUND) -    find_package(Python3 ${PYTHON3_MIN_VERSION} QUIET) +    find_package(Python3 ${PYTHON_MIN_VERSION} QUIET)      if(Python3_Interpreter_FOUND) -        set(PYTHON_MIN_VERSION ${PYTHON3_MIN_VERSION})          set(PYTHON_VERSION ${Python3_VERSION})          set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})          set(PYTHONINTERP_FOUND TRUE) @@ -32,43 +29,18 @@ if(NOT PYTHONINTERP_FOUND)  endif(NOT PYTHONINTERP_FOUND)  if(NOT PYTHONINTERP_FOUND) -    find_package(PythonInterp ${PYTHON3_MIN_VERSION} QUIET) +    find_package(PythonInterp ${PYTHON_MIN_VERSION} QUIET)      if(PYTHONINTERP_FOUND) -        set(PYTHON_MIN_VERSION ${PYTHON3_MIN_VERSION})          set(PYTHON_VERSION ${PYTHON_VERSION_STRING})      endif(PYTHONINTERP_FOUND)  endif(NOT PYTHONINTERP_FOUND) -# Next, try and find Py2k. -if(NOT PYTHONINTERP_FOUND) -    find_package(Python2 ${PYTHON_MIN_VERSION} QUIET) -    if(Python2_Interpreter_FOUND) -        set(PYTHON_VERSION ${Python2_VERSION}) -        set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE}) -        set(PYTHONINTERP_FOUND TRUE) -    endif(Python2_Interpreter_FOUND) -endif(NOT PYTHONINTERP_FOUND) - -if(NOT PYTHONINTERP_FOUND) -    find_package(PythonInterp ${PYTHON_MIN_VERSION} QUIET) -    set(PYTHON_VERSION ${PYTHON_VERSION_STRING}) -endif(NOT PYTHONINTERP_FOUND) -  # If that fails, try using the build-in find program routine.  if(NOT PYTHONINTERP_FOUND)      message(STATUS "Attempting to find Python without CMake...")      find_program(PYTHON_EXECUTABLE NAMES python3 python3.5 python3.6 python3.7 python3.8)      if(PYTHON_EXECUTABLE)          set(PYTHONINTERP_FOUND TRUE) -        set(PYTHON_MIN_VERSION ${PYTHON3_MIN_VERSION}) -    endif(PYTHON_EXECUTABLE) -endif(NOT PYTHONINTERP_FOUND) - -if(NOT PYTHONINTERP_FOUND) -    message(STATUS "Attempting to find Python without CMake...") -    find_program(PYTHON_EXECUTABLE NAMES python2 python2.7) -    if(PYTHON_EXECUTABLE) -        set(PYTHONINTERP_FOUND TRUE)      endif(PYTHON_EXECUTABLE)  endif(NOT PYTHONINTERP_FOUND) diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 99e898649..cf2767a1a 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -17,8 +17,8 @@ find_package(Git QUIET)  #  - Increment patch for bugfixes and docs  #  - set UHD_VERSION_DEVEL to true for master and development branches  ######################################################################## -set(UHD_VERSION_MAJOR 3) -set(UHD_VERSION_API   15) +set(UHD_VERSION_MAJOR 4) +set(UHD_VERSION_API   0)  set(UHD_VERSION_ABI   0)  set(UHD_VERSION_PATCH 0)  set(UHD_VERSION_DEVEL FALSE) diff --git a/host/docs/build.dox.in b/host/docs/build.dox.in index 819755b9a..e3e7c50de 100644 --- a/host/docs/build.dox.in +++ b/host/docs/build.dox.in @@ -64,7 +64,7 @@ The directory to which you extract libusb must not contain spaces. This is to sa  ### Python  - **Purpose:** Used by mako build time,  and utility scripts and the Python API at runtime -- **Minimum Version:** 2.7 +- **Minimum Version:** 3.5  - **Usage:** build time + runtime utility scripts (required)  - **Download URL:** http://www.python.org/download/  - **Comments for Windows Users:** diff --git a/host/docs/pythonapi.dox b/host/docs/pythonapi.dox index c8f504049..8015034a5 100644 --- a/host/docs/pythonapi.dox +++ b/host/docs/pythonapi.dox @@ -16,14 +16,7 @@ using the binary installers provided on https://www.python.org/downloads/windows  If CMake can't find the Python headers or library, specify  the `PYTHON_INCLUDE_DIR` and/or `PYTHON_LIBRARY` CMake variables manually. - -\subsection python_install_2v3 Python 2 vs. 3 - -The Python API supports both Python 2 and 3, but if you have both versions -installed, CMake might require some hints which version is the desired one. -To force a particular version, it helps to set `-DPYTHON_EXECUTABLE=/usr/bin/python3`, -or whatever interpreter you are expecting. The variables PYTHON_LIBRARY and -PYTHON_INCLUDE_DIR may also need to be set. +Note that since UHD version 4.0.0.0, Python 2 is no longer supported.  \subsection python_install_windows Installing on Windows diff --git a/host/examples/init_usrp/CMakeLists.txt b/host/examples/init_usrp/CMakeLists.txt index 40fcf9016..0a81d2d48 100644 --- a/host/examples/init_usrp/CMakeLists.txt +++ b/host/examples/init_usrp/CMakeLists.txt @@ -23,10 +23,10 @@ endif()  option(UHD_USE_STATIC_LIBS OFF)  # To add UHD as a dependency to this project, add a line such as this: -find_package(UHD 3.15.0 REQUIRED) +find_package(UHD 4.0.0 REQUIRED)  # The version in  ^^^^^  here is a minimum version.  # To specify an exact version: -#find_package(UHD 3.15.0 EXACT REQUIRED) +#find_package(UHD 4.0.0 EXACT REQUIRED)  # This example also requires Boost.  # Set components here, then include UHDBoost to do the actual finding diff --git a/host/include/.clang-format b/host/include/.clang-format deleted file mode 100644 index e2dc7e0a7..000000000 --- a/host/include/.clang-format +++ /dev/null @@ -1,94 +0,0 @@ ---- -Language: Cpp -AccessModifierOffset: -4 -AlignAfterOpenBracket: DontAlign -AlignConsecutiveAssignments: true -AlignConsecutiveDeclarations: false -AlignEscapedNewlines: Left -AlignOperands:   true -AlignTrailingComments: false -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: Empty -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: true -BinPackArguments: false -BinPackParameters: false -BreakBeforeBinaryOperators: NonAssignment -BreakBeforeBraces: Custom -BraceWrapping: -     AfterClass: true -     AfterControlStatement: false -     AfterEnum: false -     AfterFunction: true -     AfterNamespace: false -     AfterStruct: true -BreakBeforeInheritanceComma: false -BreakBeforeTernaryOperators: true -BreakConstructorInitializers: BeforeComma -BreakStringLiterals: true -ColumnLimit:     90 -CompactNamespaces: true -ConstructorInitializerAllOnOneLineOrOnePerLine: true -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: false -DisableFormat:   false -ExperimentalAutoDetectBinPacking: false -ForEachMacros: -  - foreach -  - BOOST_FOREACH -IncludeBlocks: Merge -IncludeCategories: -  - Regex:           '^"' -    Priority:        1 -  - Regex:           '^"(uhd)/' -    Priority:        2 -  - Regex:           '^"(uhdlib)/' -    Priority:        3 -  - Regex:           '^<(uhd)/' -    Priority:        4 -  - Regex:           '^<(uhdlib)/' -    Priority:        5 -  - Regex:           '^<(boost)/' -    Priority:        98 -  - Regex:           '^<[a-z]*>$' -    Priority:        99 -  - Regex:           '.*' -    Priority:        10 - -IndentCaseLabels: true -IndentPPDirectives: AfterHash -IndentWidth: 4 -IndentWrappedFunctionNames: false -KeepEmptyLinesAtTheStartOfBlocks: false -MaxEmptyLinesToKeep: 2 -NamespaceIndentation: None -PenaltyBreakAssignment: 10 -PenaltyBreakBeforeFirstCallParameter: 19 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Left -ReflowComments:  true -SortIncludes:    true -SpaceAfterCStyleCast: false -SpaceAfterTemplateKeyword: true -SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: ControlStatements -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles:  false -SpacesInContainerLiterals: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard:        Cpp03 -TabWidth:        8 -UseTab:          Never  | 
