diff --git a/host/cmake/Modules/UHDBoost.cmake b/host/cmake/Modules/UHDBoost.cmake
index 08d46f78a..579f41d62 100644
--- a/host/cmake/Modules/UHDBoost.cmake
+++ b/host/cmake/Modules/UHDBoost.cmake
@@ -143,10 +143,10 @@ if(POLICY CMP0093)
cmake_policy(SET CMP0093 NEW)
endif()
-# if no CXX STANDARD is set, default to that required by UHD: c++14
+# if no CXX STANDARD is set, default to that required by UHD: c++20
if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
- message(WARNING "\nC++ standard not yet set; setting to C++14.\n")
+ set(CMAKE_CXX_STANDARD 20)
+ message(WARNING "\nC++ standard not yet set; setting to C++20.\n")
endif()
if(${UHD_BOOST_OPTIONAL_COMPONENTS_LEN} GREATER 0)
diff --git a/host/cmake/Modules/UHDConfig.cmake.in b/host/cmake/Modules/UHDConfig.cmake.in
index ac7417684..de1ffad81 100644
--- a/host/cmake/Modules/UHDConfig.cmake.in
+++ b/host/cmake/Modules/UHDConfig.cmake.in
@@ -23,6 +23,10 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}")
include("${CMAKE_CURRENT_LIST_DIR}/UHDMinDepVersions.cmake")
+if(POLICY CMP0167)
+ cmake_policy(PUSH)
+ cmake_policy(SET CMP0167 NEW)
+endif()
include(CMakeFindDependencyMacro)
find_dependency(Boost ${UHD_BOOST_MIN_VERSION}
COMPONENTS
@@ -34,6 +38,9 @@ find_dependency(Boost ${UHD_BOOST_MIN_VERSION}
thread
unit_test_framework
)
+if(POLICY CMP0167)
+ cmake_policy(POP)
+endif()
include("${CMAKE_CURRENT_LIST_DIR}/UHDTargets.cmake")
diff --git a/host/examples/extension_example/CMakeLists.txt b/host/examples/extension_example/CMakeLists.txt
index 47f13cde4..f1898f344 100644
--- a/host/examples/extension_example/CMakeLists.txt
+++ b/host/examples/extension_example/CMakeLists.txt
@@ -34,7 +34,6 @@ find_package(UHD 4.3.0 REQUIRED)
# Set components here, then include UHDBoost to do the actual finding
set(UHD_BOOST_REQUIRED_COMPONENTS
program_options
- system
thread
)
set(UHD_BOOST_MIN_VERSION 1.71)
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt
index 74b741ab1..ce6078886 100644
--- a/host/tests/CMakeLists.txt
+++ b/host/tests/CMakeLists.txt
@@ -106,9 +106,18 @@ if(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS)
set(Boost_USE_STATIC_LIBS OFF)
endif()
# Duplicate find_package(Boost) arguments used in UHDBoost.cmake
+if(POLICY CMP0167)
+ cmake_policy(PUSH)
+ cmake_policy(SET CMP0167 NEW)
+endif()
+
find_package(Boost ${UHD_BOOST_MIN_VERSION} QUIET
COMPONENTS unit_test_framework ${UHD_BOOST_REQUIRED})
+if(POLICY CMP0167)
+ cmake_policy(POP)
+endif()
+
if(Boost_VERBOSE OR Boost_DEBUG)
# After: find_package(Boost REQUIRED COMPONENTS unit_test_framework)
# The actual library file(s) per-config
diff --git a/tools/kitchen_sink/CMakeLists.txt b/tools/kitchen_sink/CMakeLists.txt
index 6c621b448..549840054 100644
--- a/tools/kitchen_sink/CMakeLists.txt
+++ b/tools/kitchen_sink/CMakeLists.txt
@@ -16,8 +16,9 @@
# along with this program. If not, see .
#
-cmake_minimum_required(VERSION 3.5.1)
+cmake_minimum_required(VERSION 3.12)
project(kitchen_sink CXX)
+set(CMAKE_CXX_STANDARD 20)
###############################################################################
diff --git a/tools/nirio_programmer/CMakeLists.txt b/tools/nirio_programmer/CMakeLists.txt
index c579f3be1..361ee6889 100644
--- a/tools/nirio_programmer/CMakeLists.txt
+++ b/tools/nirio_programmer/CMakeLists.txt
@@ -16,9 +16,9 @@
# along with this program. If not, see .
#
-cmake_minimum_required(VERSION 3.5.1)
+cmake_minimum_required(VERSION 3.12)
project(NIRIO_PROGRAMMER CXX)
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 20)
### Set up build environment ##################################################
# Choose a static or shared-library build (shared is default, and static will