From 1e7e11fb79d33288fbb402cf2f2f43ef67be5e17 Mon Sep 17 00:00:00 2001
From: "A. Maitland Bottoms" <bottoms@debian.org>
Date: Wed, 21 Mar 2018 16:19:59 -0400
Subject: [PATCH] unscreamify cmake

---
 firmware/fx2/CMakeLists.txt                        |  14 +-
 firmware/fx2/config/CMakeASM_SDCCInformation.cmake |  12 +-
 .../config/CMakeDetermineASM_SDCCCompiler.cmake    |   8 +-
 .../fx2/config/CMakeTestASM_SDCCCompiler.cmake     |   6 +-
 firmware/fx2/config/Rename.cmake                   |   4 +-
 firmware/fx2/config/Toolchain-sdcc.cmake           |   6 +-
 firmware/octoclock/CMakeLists.txt                  |   2 +-
 firmware/octoclock/lib/CMakeLists.txt              |  12 +-
 firmware/usrp2/CMakeLists.txt                      |  72 +--
 firmware/usrp2/lib/CMakeLists.txt                  |   2 +-
 firmware/usrp2/usrp2/CMakeLists.txt                |  18 +-
 firmware/usrp2/usrp2p/CMakeLists.txt               |  20 +-
 firmware/usrp2/usrp2p/bootloader/CMakeLists.txt    |  26 +-
 firmware/usrp3/CMakeLists.txt                      |  96 ++--
 firmware/usrp3/n230/CMakeLists.txt                 |   2 +-
 firmware/usrp3/x300/CMakeLists.txt                 |   6 +-
 host/CMakeLists.txt                                | 622 ++++++++++-----------
 host/cmake/Modules/CheckCXXSymbolExistsCopy.cmake  |   2 +-
 host/cmake/Modules/CheckSymbolExistsCopy.cmake     |   2 +-
 host/cmake/Modules/CodeCoverage.cmake              |  96 ++--
 host/cmake/Modules/FindDocutils.cmake              |   6 +-
 host/cmake/Modules/FindGPSD.cmake                  |  34 +-
 host/cmake/Modules/FindGZip.cmake                  |   6 +-
 host/cmake/Modules/FindLIBERIO.cmake               |  12 +-
 host/cmake/Modules/FindUSB1.cmake                  |  18 +-
 host/cmake/Modules/UHDBuildInfo.cmake              |  66 +--
 host/cmake/Modules/UHDComponent.cmake              | 210 +++----
 host/cmake/Modules/UHDGlobalDefs.cmake             |  22 +-
 host/cmake/Modules/UHDLog.cmake                    | 120 ++--
 host/cmake/Modules/UHDPackage.cmake                | 250 ++++-----
 host/cmake/Modules/UHDPython.cmake                 |  80 +--
 host/cmake/Modules/UHDVersion.cmake                | 122 ++--
 host/cmake/Toolchains/mingw_cross.cmake            |  48 +-
 host/docs/CMakeLists.txt                           | 162 +++---
 host/examples/CMakeLists.txt                       |  74 +--
 host/examples/getopt/CMakeLists.txt                |   4 +-
 host/examples/init_usrp/CMakeLists.txt             |  48 +-
 host/include/CMakeLists.txt                        |  10 +-
 host/include/uhd/CMakeLists.txt                    |  30 +-
 host/include/uhd/cal/CMakeLists.txt                |   2 +-
 host/include/uhd/rfnoc/CMakeLists.txt              |   8 +-
 host/include/uhd/rfnoc/blocks/CMakeLists.txt       |   4 +-
 host/include/uhd/transport/CMakeLists.txt          |   2 +-
 host/include/uhd/types/CMakeLists.txt              |   8 +-
 host/include/uhd/usrp/CMakeLists.txt               |   8 +-
 host/include/uhd/usrp_clock/CMakeLists.txt         |   8 +-
 host/include/uhd/utils/CMakeLists.txt              |   8 +-
 host/lib/CMakeLists.txt                            | 212 +++----
 host/lib/cal/CMakeLists.txt                        |  10 +-
 host/lib/convert/CMakeLists.txt                    |  74 +--
 host/lib/deps/CMakeLists.txt                       |   6 +-
 host/lib/deps/rpclib/CMakeLists.txt                |  34 +-
 host/lib/experts/CMakeLists.txt                    |  14 +-
 host/lib/ic_reg_maps/CMakeLists.txt                |  54 +-
 host/lib/include/CMakeLists.txt                    |   2 +-
 host/lib/rfnoc/CMakeLists.txt                      |   4 +-
 host/lib/rfnoc/nocscript/CMakeLists.txt            |  14 +-
 host/lib/transport/CMakeLists.txt                  | 124 ++--
 host/lib/transport/nirio/CMakeLists.txt            |  20 +-
 host/lib/transport/nirio/lvbitx/CMakeLists.txt     |  40 +-
 host/lib/transport/nirio/rpc/CMakeLists.txt        |   2 +-
 host/lib/types/CMakeLists.txt                      |  60 +-
 host/lib/usrp/CMakeLists.txt                       |  42 +-
 host/lib/usrp/b100/CMakeLists.txt                  |   6 +-
 host/lib/usrp/b200/CMakeLists.txt                  |   6 +-
 host/lib/usrp/common/CMakeLists.txt                |  18 +-
 host/lib/usrp/cores/CMakeLists.txt                 |   8 +-
 host/lib/usrp/dboard/CMakeLists.txt                |  22 +-
 host/lib/usrp/dboard/eiscat/CMakeLists.txt         |   8 +-
 host/lib/usrp/dboard/magnesium/CMakeLists.txt      |   8 +-
 host/lib/usrp/device3/CMakeLists.txt               |   2 +-
 host/lib/usrp/e300/CMakeLists.txt                  |  24 +-
 host/lib/usrp/mpmd/CMakeLists.txt                  |  20 +-
 host/lib/usrp/n230/CMakeLists.txt                  |   6 +-
 host/lib/usrp/usrp1/CMakeLists.txt                 |   6 +-
 host/lib/usrp/usrp2/CMakeLists.txt                 |   6 +-
 host/lib/usrp/x300/CMakeLists.txt                  |   6 +-
 host/lib/usrp_clock/CMakeLists.txt                 |  10 +-
 host/lib/usrp_clock/octoclock/CMakeLists.txt       |   6 +-
 host/lib/utils/CMakeLists.txt                      | 140 ++---
 host/tests/CMakeLists.txt                          |  94 ++--
 host/tests/devtest/CMakeLists.txt                  |  34 +-
 host/utils/CMakeLists.txt                          | 170 +++---
 host/utils/latency/CMakeLists.txt                  |  36 +-
 images/CMakeLists.txt                              |  42 +-
 mpm/CMakeLists.txt                                 | 186 +++---
 mpm/include/CMakeLists.txt                         |   2 +-
 mpm/include/mpm/CMakeLists.txt                     |  12 +-
 mpm/include/mpm/ad937x/CMakeLists.txt              |   2 +-
 mpm/include/mpm/dboards/CMakeLists.txt             |   2 +-
 mpm/include/mpm/spi/CMakeLists.txt                 |   2 +-
 mpm/include/mpm/types/CMakeLists.txt               |   2 +-
 mpm/lib/CMakeLists.txt                             |  14 +-
 mpm/lib/dboards/CMakeLists.txt                     |   2 +-
 mpm/lib/mykonos/CMakeLists.txt                     |  18 +-
 mpm/lib/mykonos/adi/CMakeLists.txt                 |   4 +-
 mpm/lib/mykonos/adi/mykonos_debug/CMakeLists.txt   |   2 +-
 mpm/lib/mykonos/config/CMakeLists.txt              |   2 +-
 mpm/lib/spi/CMakeLists.txt                         |   4 +-
 mpm/lib/types/CMakeLists.txt                       |   4 +-
 mpm/python/CMakeLists.txt                          |  36 +-
 mpm/python/copy_python_module.cmake                |   6 +-
 mpm/python/usrp_mpm/CMakeLists.txt                 |  20 +-
 mpm/python/usrp_mpm/chips/CMakeLists.txt           |   8 +-
 mpm/python/usrp_mpm/cores/CMakeLists.txt           |   8 +-
 mpm/python/usrp_mpm/dboard_manager/CMakeLists.txt  |   8 +-
 mpm/python/usrp_mpm/periph_manager/CMakeLists.txt  |   8 +-
 mpm/python/usrp_mpm/sys_utils/CMakeLists.txt       |   8 +-
 mpm/python/usrp_mpm/xports/CMakeLists.txt          |   8 +-
 mpm/systemd/CMakeLists.txt                         |  12 +-
 mpm/tests/CMakeLists.txt                           |   2 +-
 mpm/tools/CMakeLists.txt                           |  26 +-
 tools/dissectors/cmake/Modules/FindGLIB2.cmake     | 196 +++----
 tools/dissectors/cmake/Modules/FindWireshark.cmake |  14 +-
 tools/gr-usrptest/apps/CMakeLists.txt              |   2 +-
 tools/gr-usrptest/cmake/Modules/FindCppUnit.cmake  |  16 +-
 .../cmake/Modules/FindGnuradioRuntime.cmake        |  14 +-
 tools/gr-usrptest/cmake/Modules/GrMiscUtils.cmake  |  48 +-
 tools/gr-usrptest/cmake/Modules/GrPython.cmake     |   4 +-
 tools/gr-usrptest/cmake/Modules/GrSwig.cmake       |  24 +-
 tools/gr-usrptest/cmake/Modules/UseSWIG.cmake      |   6 +-
 .../gr-usrptest/cmake/Modules/usrptestConfig.cmake |  14 +-
 tools/gr-usrptest/lib/CMakeLists.txt               |   4 +-
 tools/gr-usrptest/python/CMakeLists.txt            |   4 +-
 tools/gr-usrptest/python/flowgraphs/CMakeLists.txt |   2 +-
 .../python/labview_control/CMakeLists.txt          |   2 +-
 tools/gr-usrptest/python/rts_tests/CMakeLists.txt  |   4 +-
 tools/gr-usrptest/swig/CMakeLists.txt              |   6 +-
 tools/kitchen_sink/CMakeLists.txt                  |  26 +-
 tools/nirio_programmer/CMakeLists.txt              |   2 +-
 130 files changed, 2292 insertions(+), 2292 deletions(-)

diff --git a/firmware/fx2/CMakeLists.txt b/firmware/fx2/CMakeLists.txt
index f7f6e96ca..7a41333f5 100644
--- a/firmware/fx2/CMakeLists.txt
+++ b/firmware/fx2/CMakeLists.txt
@@ -15,22 +15,22 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+cmake_minimum_required(VERSION 2.6)
 set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/config/Toolchain-sdcc.cmake)
-PROJECT(USRP1 C)
+project(USRP1 C)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/")
-INCLUDE(FindPythonInterp)
+include(FindPythonInterp)
 
 ########################################################################
 # Set toolchain to use SDCC
 ########################################################################
 # we're doing mixed ASM and C
-ENABLE_LANGUAGE(ASM_SDCC)
+enable_language(ASM_SDCC)
 
 ########################################################################
 # C flags and linking flags
 ########################################################################
-ADD_DEFINITIONS(-DHAVE_USRP2)
+add_definitions(-DHAVE_USRP2)
 set(CMAKE_C_LINK_FLAGS "--code-loc 0x0000 --code-size 0x1800 --xram-loc 0x1800 --xram-size 0x0800 -Wl '-b USBDESCSEG = 0xE000'")
 set(CMAKE_C_FLAGS "--no-xinit-opt")
 
@@ -45,5 +45,5 @@ set(BUILD_EEPROM ${CMAKE_SOURCE_DIR}/utils/build_eeprom.py)
 ########################################################################
 # Add the subdirectories
 ########################################################################
-ADD_SUBDIRECTORY(usrp1)
-ADD_SUBDIRECTORY(b100)
+add_subdirectory(usrp1)
+add_subdirectory(b100)
diff --git a/firmware/fx2/config/CMakeASM_SDCCInformation.cmake b/firmware/fx2/config/CMakeASM_SDCCInformation.cmake
index d9f28b8d3..6d922bfc6 100644
--- a/firmware/fx2/config/CMakeASM_SDCCInformation.cmake
+++ b/firmware/fx2/config/CMakeASM_SDCCInformation.cmake
@@ -16,13 +16,13 @@
 #
 
 # support for the SDCC assembler, asx8051
-SET( ASM_DIALECT "_SDCC" )
-SET( CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS a51 )
+set( ASM_DIALECT "_SDCC" )
+set( CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS a51 )
 
 #i don't want to talk about it. i had such high hopes for CMake.
-SET( CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -plosgff <SOURCE>" "${CMAKE_COMMAND} -DFILE=<OBJECT> -DSOURCE=<SOURCE> -P ${CMAKE_SOURCE_DIR}/config/Rename.cmake")
+set( CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -plosgff <SOURCE>" "${CMAKE_COMMAND} -DFILE=<OBJECT> -DSOURCE=<SOURCE> -P ${CMAKE_SOURCE_DIR}/config/Rename.cmake")
 
-INCLUDE( CMakeASMInformation )
-SET( CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION ".rel" ) #must go here because the include appears to overwrite it, although it shouldn't
+include( CMakeASMInformation )
+set( CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION ".rel" ) #must go here because the include appears to overwrite it, although it shouldn't
 # for future use
-SET( ASM_DIALECT )
+set( ASM_DIALECT )
diff --git a/firmware/fx2/config/CMakeDetermineASM_SDCCCompiler.cmake b/firmware/fx2/config/CMakeDetermineASM_SDCCCompiler.cmake
index 37481077c..2cade6002 100644
--- a/firmware/fx2/config/CMakeDetermineASM_SDCCCompiler.cmake
+++ b/firmware/fx2/config/CMakeDetermineASM_SDCCCompiler.cmake
@@ -14,9 +14,9 @@
 
 # Find the MS assembler (masm or masm64)
 
-SET(ASM_DIALECT "_SDCC")
+set(ASM_DIALECT "_SDCC")
 
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT sdas8051)
+set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT sdas8051)
 
-INCLUDE(CMakeDetermineASMCompiler)
-SET(ASM_DIALECT)
+include(CMakeDetermineASMCompiler)
+set(ASM_DIALECT)
diff --git a/firmware/fx2/config/CMakeTestASM_SDCCCompiler.cmake b/firmware/fx2/config/CMakeTestASM_SDCCCompiler.cmake
index 1cb71cd9d..16f7ba943 100644
--- a/firmware/fx2/config/CMakeTestASM_SDCCCompiler.cmake
+++ b/firmware/fx2/config/CMakeTestASM_SDCCCompiler.cmake
@@ -18,6 +18,6 @@
 # is set and cmake stops processing commands and will not generate
 # any makefiles or projects.
 
-SET(ASM_DIALECT "_SDCC")
-INCLUDE(CMakeTestASMCompiler)
-SET(ASM_DIALECT)
+set(ASM_DIALECT "_SDCC")
+include(CMakeTestASMCompiler)
+set(ASM_DIALECT)
diff --git a/firmware/fx2/config/Rename.cmake b/firmware/fx2/config/Rename.cmake
index 36cd33527..5428c489b 100644
--- a/firmware/fx2/config/Rename.cmake
+++ b/firmware/fx2/config/Rename.cmake
@@ -24,7 +24,7 @@ get_filename_component(source_path ${SOURCE} PATH)
 set(compiled_ext .rel)
 list(APPEND compiled_filepath ${source_path}/${source_noext}${compiled_ext})
 #EXECUTE_PROCESS(COMMAND echo Moving ${compiled_filepath} to ${FILE})
-EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E rename ${compiled_filepath} ${FILE})
+execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${compiled_filepath} ${FILE})
 
 #now do the same for the .lst
 set(compiled_lst .lst)
@@ -34,4 +34,4 @@ get_filename_component(lst_path ${FILE} PATH)
 list(APPEND compiled_lstpath ${source_path}/${source_noext}${compiled_lst})
 list(APPEND compiled_outputlstpath ${lst_path}/${lst_noext}${src_ext}${compiled_lst})
 #EXECUTE_PROCESS(COMMAND echo Moving ${compiled_lstpath} to ${compiled_outputlstpath})
-EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E rename ${compiled_lstpath} ${compiled_outputlstpath})
+execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${compiled_lstpath} ${compiled_outputlstpath})
diff --git a/firmware/fx2/config/Toolchain-sdcc.cmake b/firmware/fx2/config/Toolchain-sdcc.cmake
index f640ae665..9726b8b50 100644
--- a/firmware/fx2/config/Toolchain-sdcc.cmake
+++ b/firmware/fx2/config/Toolchain-sdcc.cmake
@@ -16,12 +16,12 @@
 #
 
 # the name of the target operating system
-SET(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_NAME Generic)
 # which compilers to use for C and C++
-SET(CMAKE_C_COMPILER sdcc)
+set(CMAKE_C_COMPILER sdcc)
 
 # here is where the target environment is located
-SET(CMAKE_FIND_ROOT_PATH  /usr/bin /usr/share/sdcc /usr/libexec/sdcc)
+set(CMAKE_FIND_ROOT_PATH  /usr/bin /usr/share/sdcc /usr/libexec/sdcc)
 
 # adjust the default behaviour of the FIND_XXX() commands:
 # search headers and libraries in the target environment, search 
diff --git a/firmware/octoclock/CMakeLists.txt b/firmware/octoclock/CMakeLists.txt
index 0f2af35e9..4d99add0a 100644
--- a/firmware/octoclock/CMakeLists.txt
+++ b/firmware/octoclock/CMakeLists.txt
@@ -27,7 +27,7 @@ project(OCTOCLOCK C)
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmcu=atmega128 -std=gnu99")
 
 if(NOT DEFINED PROGRAMMER)
-    SET(PROGRAMMER "avrisp2")
+    set(PROGRAMMER "avrisp2")
 endif(NOT DEFINED PROGRAMMER)
 
 if(OCTOCLOCK_DEBUG)
diff --git a/firmware/octoclock/lib/CMakeLists.txt b/firmware/octoclock/lib/CMakeLists.txt
index 3c992399e..0dfa1b0c9 100644
--- a/firmware/octoclock/lib/CMakeLists.txt
+++ b/firmware/octoclock/lib/CMakeLists.txt
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-SET(lib_files
+set(lib_files
     arp_cache.c
     clkdist.c
     enc28j60.c
@@ -27,11 +27,11 @@ SET(lib_files
     usart.c
 )
 
-IF(OCTOCLOCK_DEBUG)
-    LIST(APPEND lib_files serial.c)
-ENDIF(OCTOCLOCK_DEBUG)
+if(OCTOCLOCK_DEBUG)
+    list(APPEND lib_files serial.c)
+endif(OCTOCLOCK_DEBUG)
 
-ADD_LIBRARY(octoclock ${lib_files})
-SET_TARGET_PROPERTIES(octoclock
+add_library(octoclock ${lib_files})
+set_target_properties(octoclock
     PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -O2 -g"
 )
diff --git a/firmware/usrp2/CMakeLists.txt b/firmware/usrp2/CMakeLists.txt
index 80fd074bd..857be325e 100644
--- a/firmware/usrp2/CMakeLists.txt
+++ b/firmware/usrp2/CMakeLists.txt
@@ -18,19 +18,19 @@
 ########################################################################
 # setup project and compiler
 ########################################################################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+cmake_minimum_required(VERSION 2.6)
 #force the compiler because the check wont use the special flag below
-INCLUDE(CMakeForceCompiler)
-SET(CMAKE_SYSTEM_NAME Generic)
-CMAKE_FORCE_C_COMPILER(zpu-elf-gcc GNU)
-PROJECT(USRP_NXXX_FW C)
+include(CMakeForceCompiler)
+set(CMAKE_SYSTEM_NAME Generic)
+cmake_force_c_compiler(zpu-elf-gcc GNU)
+project(USRP_NXXX_FW C)
 
 ########################################################################
 # lwIP header include dirs
 ########################################################################
-SET(LWIPDIR ${CMAKE_SOURCE_DIR}/lwip/lwip-1.3.1)
+set(LWIPDIR ${CMAKE_SOURCE_DIR}/lwip/lwip-1.3.1)
 
-INCLUDE_DIRECTORIES(
+include_directories(
     ${CMAKE_SOURCE_DIR}/lwip
     ${CMAKE_SOURCE_DIR}/lwip_port
     ${LWIPDIR}/src/include
@@ -40,30 +40,30 @@ INCLUDE_DIRECTORIES(
 ########################################################################
 # misc flags for the gcc compiler
 ########################################################################
-SET(CMAKE_C_FLAGS -phi) #always needed compile time and link time
-ADD_DEFINITIONS(-Os)
-ADD_DEFINITIONS(--std=gnu99)
-ADD_DEFINITIONS(-Wall)
-ADD_DEFINITIONS(-Werror-implicit-function-declaration)
-ADD_DEFINITIONS(-ffunction-sections)
+set(CMAKE_C_FLAGS -phi) #always needed compile time and link time
+add_definitions(-Os)
+add_definitions(--std=gnu99)
+add_definitions(-Wall)
+add_definitions(-Werror-implicit-function-declaration)
+add_definitions(-ffunction-sections)
 
-MACRO(ADD_LINKER_FLAGS flags)
-    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flags}")
-ENDMACRO(ADD_LINKER_FLAGS)
+macro(ADD_LINKER_FLAGS flags)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flags}")
+endmacro(ADD_LINKER_FLAGS)
 
-ADD_LINKER_FLAGS("-Wl,--gc-sections")
-ADD_LINKER_FLAGS("-Wl,--relax")
+add_linker_flags("-Wl,--gc-sections")
+add_linker_flags("-Wl,--relax")
 
 ########################################################################
 # define for the hal io (FIXME move?)
 ########################################################################
 #ADD_DEFINITIONS(-DHAL_IO_USES_DBOARD_PINS)
-ADD_DEFINITIONS(-DHAL_IO_USES_UART)
+add_definitions(-DHAL_IO_USES_UART)
 
 ########################################################################
 # common cflags and ldflags
 ########################################################################
-INCLUDE_DIRECTORIES(
+include_directories(
     ${CMAKE_SOURCE_DIR}/../../host/lib/usrp
     ${CMAKE_SOURCE_DIR}/lib
 )
@@ -71,52 +71,52 @@ INCLUDE_DIRECTORIES(
 ########################################################################
 # setup programs for output files
 ########################################################################
-FIND_PROGRAM(LINKER zpu-elf-ld)
-FIND_PROGRAM(OBJCOPY zpu-elf-objcopy)
-FIND_PROGRAM(OBJDUMP zpu-elf-objdump)
-FIND_PROGRAM(HEXDUMP hexdump)
+find_program(LINKER zpu-elf-ld)
+find_program(OBJCOPY zpu-elf-objcopy)
+find_program(OBJDUMP zpu-elf-objdump)
+find_program(HEXDUMP hexdump)
 
 ########################################################################
 # helper functions to build output formats
 ########################################################################
-SET(GEN_OUTPUTS_BIN_SIZE "bin_size_not_set") #set before calling
-MACRO(GEN_OUTPUTS target)
-    GET_FILENAME_COMPONENT(name ${target} NAME_WE)
+set(GEN_OUTPUTS_BIN_SIZE "bin_size_not_set") #set before calling
+macro(GEN_OUTPUTS target)
+    get_filename_component(name ${target} NAME_WE)
     #command to create a map from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.map DEPENDS ${target}
         COMMAND ${LINKER} -Map ${name}.map ${target}
     )
     #command to create a bin from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.bin DEPENDS ${target}
         COMMAND ${OBJCOPY} -O binary ${target} ${name}.bin
         --pad-to ${GEN_OUTPUTS_BIN_SIZE}
     )
     #command to create a ihx from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.ihx DEPENDS ${target}
         COMMAND ${OBJCOPY} -O ihex ${target} ${name}.ihx
         --pad-to ${GEN_OUTPUTS_BIN_SIZE}
     )
     #command to create a dump from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.dump DEPENDS ${target}
         COMMAND ${OBJDUMP} -DSC ${target} > ${name}.dump
     )
     #command to create a rom from bin
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.rom DEPENDS ${name}.bin
         COMMAND ${HEXDUMP} -v -e'1/1 \"%.2X\\n\"' ${name}.bin > ${name}.rom
     )
     #add a top level target for output files
-    ADD_CUSTOM_TARGET(
+    add_custom_target(
         ${name}_outputs ALL DEPENDS ${name}.map ${name}.bin ${name}.ihx ${name}.dump ${name}.rom
     )
-ENDMACRO(GEN_OUTPUTS)
+endmacro(GEN_OUTPUTS)
 
 ########################################################################
 # Add the subdirectories
 ########################################################################
-ADD_SUBDIRECTORY(usrp2)
-ADD_SUBDIRECTORY(usrp2p)
+add_subdirectory(usrp2)
+add_subdirectory(usrp2p)
diff --git a/firmware/usrp2/lib/CMakeLists.txt b/firmware/usrp2/lib/CMakeLists.txt
index ce6b7fa44..7d83ddb4b 100644
--- a/firmware/usrp2/lib/CMakeLists.txt
+++ b/firmware/usrp2/lib/CMakeLists.txt
@@ -16,7 +16,7 @@
 #
 
 ########################################################################
-SET(COMMON_SRCS
+set(COMMON_SRCS
     ${CMAKE_SOURCE_DIR}/lib/u2_init.c
     ${CMAKE_SOURCE_DIR}/lib/abort.c
     ${CMAKE_SOURCE_DIR}/lib/ad9510.c
diff --git a/firmware/usrp2/usrp2/CMakeLists.txt b/firmware/usrp2/usrp2/CMakeLists.txt
index 3662532f1..8bc3ab481 100644
--- a/firmware/usrp2/usrp2/CMakeLists.txt
+++ b/firmware/usrp2/usrp2/CMakeLists.txt
@@ -16,22 +16,22 @@
 #
 
 ########################################################################
-INCLUDE(${CMAKE_SOURCE_DIR}/lib/CMakeLists.txt)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+include(${CMAKE_SOURCE_DIR}/lib/CMakeLists.txt)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
-ADD_DEFINITIONS(-DUSRP2)
-ADD_DEFINITIONS(-DUDP_UART_MASK=0)
+add_definitions(-DUSRP2)
+add_definitions(-DUDP_UART_MASK=0)
 
-ADD_LIBRARY(libusrp2fw STATIC
+add_library(libusrp2fw STATIC
     ${COMMON_SRCS}
     sd.c
     ethernet.c
 )
 
 ########################################################################
-SET(GEN_OUTPUTS_BIN_SIZE 0x3fff)
+set(GEN_OUTPUTS_BIN_SIZE 0x3fff)
 
-ADD_EXECUTABLE(usrp2_txrx_uhd.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c)
-TARGET_LINK_LIBRARIES(usrp2_txrx_uhd.elf libusrp2fw)
-GEN_OUTPUTS(usrp2_txrx_uhd.elf)
+add_executable(usrp2_txrx_uhd.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c)
+target_link_libraries(usrp2_txrx_uhd.elf libusrp2fw)
+gen_outputs(usrp2_txrx_uhd.elf)
 
diff --git a/firmware/usrp2/usrp2p/CMakeLists.txt b/firmware/usrp2/usrp2p/CMakeLists.txt
index 4cb663742..4b2753e29 100644
--- a/firmware/usrp2/usrp2p/CMakeLists.txt
+++ b/firmware/usrp2/usrp2p/CMakeLists.txt
@@ -16,13 +16,13 @@
 #
 
 ########################################################################
-INCLUDE(${CMAKE_SOURCE_DIR}/lib/CMakeLists.txt)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+include(${CMAKE_SOURCE_DIR}/lib/CMakeLists.txt)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
-ADD_DEFINITIONS(-DUSRP2P)
-ADD_DEFINITIONS(-DUDP_UART_MASK=4) #GPS=UART2 streaming enabled
+add_definitions(-DUSRP2P)
+add_definitions(-DUDP_UART_MASK=4) #GPS=UART2 streaming enabled
 
-ADD_LIBRARY(libusrp2pfw STATIC
+add_library(libusrp2pfw STATIC
     ${COMMON_SRCS}
     spif.c
     spi_flash.c
@@ -34,12 +34,12 @@ ADD_LIBRARY(libusrp2pfw STATIC
     u2p_init.c
 )
 
-ADD_SUBDIRECTORY(bootloader)
+add_subdirectory(bootloader)
 
 ########################################################################
-SET(GEN_OUTPUTS_BIN_SIZE 0x3fff)
+set(GEN_OUTPUTS_BIN_SIZE 0x3fff)
 
-ADD_EXECUTABLE(usrp2p_txrx_uhd.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c)
-TARGET_LINK_LIBRARIES(usrp2p_txrx_uhd.elf libusrp2pfw)
-GEN_OUTPUTS(usrp2p_txrx_uhd.elf)
+add_executable(usrp2p_txrx_uhd.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c)
+target_link_libraries(usrp2p_txrx_uhd.elf libusrp2pfw)
+gen_outputs(usrp2p_txrx_uhd.elf)
 
diff --git a/firmware/usrp2/usrp2p/bootloader/CMakeLists.txt b/firmware/usrp2/usrp2p/bootloader/CMakeLists.txt
index 07f234302..d06a18561 100644
--- a/firmware/usrp2/usrp2p/bootloader/CMakeLists.txt
+++ b/firmware/usrp2/usrp2p/bootloader/CMakeLists.txt
@@ -16,27 +16,27 @@
 #
 
 ########################################################################
-INCLUDE(FindPythonInterp)
+include(FindPythonInterp)
 
-MACRO(GEN_RMI target)
-    GET_FILENAME_COMPONENT(name ${target} NAME_WE)
+macro(GEN_RMI target)
+    get_filename_component(name ${target} NAME_WE)
     #command to create a rmi from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.rmi DEPENDS ${name}.bin
         COMMAND ${PYTHON_EXECUTABLE}
         ${CMAKE_SOURCE_DIR}/bin/bin_to_ram_macro_init.py ${name}.bin ${name}.rmi
     )
     #add a top level target for output files
-    ADD_CUSTOM_TARGET(
+    add_custom_target(
         ${name}_rmi ALL DEPENDS ${name}.rmi
     )
-ENDMACRO(GEN_RMI)
+endmacro(GEN_RMI)
 
 ########################################################################
-ADD_EXECUTABLE(bootloader.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c)
-ADD_DEFINITIONS(-DUSRP2P)
-ADD_DEFINITIONS(-DBOOTLOADER)
-TARGET_LINK_LIBRARIES(bootloader.elf libusrp2pfw)
-SET(GEN_OUTPUTS_BIN_SIZE 0x3fff)
-GEN_OUTPUTS(bootloader.elf)
-GEN_RMI(bootloader.bin)
+add_executable(bootloader.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c)
+add_definitions(-DUSRP2P)
+add_definitions(-DBOOTLOADER)
+target_link_libraries(bootloader.elf libusrp2pfw)
+set(GEN_OUTPUTS_BIN_SIZE 0x3fff)
+gen_outputs(bootloader.elf)
+gen_rmi(bootloader.bin)
diff --git a/firmware/usrp3/CMakeLists.txt b/firmware/usrp3/CMakeLists.txt
index 66a43b6bd..8cd1b1e6c 100644
--- a/firmware/usrp3/CMakeLists.txt
+++ b/firmware/usrp3/CMakeLists.txt
@@ -18,27 +18,27 @@
 ########################################################################
 # setup project and compiler
 ########################################################################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+cmake_minimum_required(VERSION 2.6)
 #force the compiler because the check wont use the special flag below
-INCLUDE(CMakeForceCompiler)
-SET(CMAKE_SYSTEM_NAME Generic)
-CMAKE_FORCE_C_COMPILER(zpu-elf-gcc GNU)
-PROJECT(USRP3_FW C)
+include(CMakeForceCompiler)
+set(CMAKE_SYSTEM_NAME Generic)
+cmake_force_c_compiler(zpu-elf-gcc GNU)
+project(USRP3_FW C)
 
-SET(UHD_VERSION_HASH 0 CACHE INTEGER "UHD Version Hash")
-EXECUTE_PROCESS(COMMAND ${CMAKE_SOURCE_DIR}/utils/git-hash.sh OUTPUT_VARIABLE UHD_VERSION_HASH)
-ADD_DEFINITIONS(-DUHD_VERSION_HASH=0x${UHD_VERSION_HASH})
+set(UHD_VERSION_HASH 0 CACHE INTEGER "UHD Version Hash")
+execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/git-hash.sh OUTPUT_VARIABLE UHD_VERSION_HASH)
+add_definitions(-DUHD_VERSION_HASH=0x${UHD_VERSION_HASH})
 
-INCLUDE_DIRECTORIES(include)
+include_directories(include)
 
 find_package(PythonInterp)
 
 ########################################################################
 # lwIP header include dirs
 ########################################################################
-SET(LWIPDIR ${CMAKE_SOURCE_DIR}/lwip/lwip-1.3.1)
+set(LWIPDIR ${CMAKE_SOURCE_DIR}/lwip/lwip-1.3.1)
 
-INCLUDE_DIRECTORIES(
+include_directories(
     ${CMAKE_SOURCE_DIR}/lwip
     ${CMAKE_SOURCE_DIR}/lwip_port
     ${LWIPDIR}/src/include
@@ -48,90 +48,90 @@ INCLUDE_DIRECTORIES(
 ########################################################################
 # misc flags for the gcc compiler
 ########################################################################
-SET(CMAKE_C_FLAGS -phi) #always needed compile time and link time
-ADD_DEFINITIONS(-Os)
-ADD_DEFINITIONS(--std=gnu99)
-ADD_DEFINITIONS(-Wall)
-ADD_DEFINITIONS(-Werror-implicit-function-declaration)
-ADD_DEFINITIONS(-ffunction-sections)
-ADD_DEFINITIONS(-DPRINTF_LONG_SUPPORT)
+set(CMAKE_C_FLAGS -phi) #always needed compile time and link time
+add_definitions(-Os)
+add_definitions(--std=gnu99)
+add_definitions(-Wall)
+add_definitions(-Werror-implicit-function-declaration)
+add_definitions(-ffunction-sections)
+add_definitions(-DPRINTF_LONG_SUPPORT)
 
-MACRO(ADD_LINKER_FLAGS flags)
-    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flags}")
-ENDMACRO(ADD_LINKER_FLAGS)
+macro(ADD_LINKER_FLAGS flags)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flags}")
+endmacro(ADD_LINKER_FLAGS)
 
-ADD_LINKER_FLAGS("-Wl,--gc-sections")
-ADD_LINKER_FLAGS("-Wl,--relax")
+add_linker_flags("-Wl,--gc-sections")
+add_linker_flags("-Wl,--relax")
 
 ########################################################################
 # setup programs for output files
 ########################################################################
-FIND_PROGRAM(LINKER zpu-elf-ld)
-FIND_PROGRAM(OBJCOPY zpu-elf-objcopy)
-FIND_PROGRAM(OBJDUMP zpu-elf-objdump)
-FIND_PROGRAM(HEXDUMP hexdump)
+find_program(LINKER zpu-elf-ld)
+find_program(OBJCOPY zpu-elf-objcopy)
+find_program(OBJDUMP zpu-elf-objdump)
+find_program(HEXDUMP hexdump)
 
 ########################################################################
 # Firmware tracing support
 ########################################################################
 # Look at include/trace.h to see what the different trace levels map to.
-SET(TRACE_LEVEL "0" CACHE STRING "Firmware Trace Level") #0 by default
-OPTION(TRACE_LEVEL "Firmware Trace Level" "") 
-IF(TRACE_LEVEL)
+set(TRACE_LEVEL "0" CACHE STRING "Firmware Trace Level") #0 by default
+option(TRACE_LEVEL "Firmware Trace Level" "") 
+if(TRACE_LEVEL)
     #If TRACE_LEVEL == 0, don't define UHD_FW_TRACE_LEVEL so that the C
     #code can easily detect if tracing is requested
-    IF(${TRACE_LEVEL} GREATER 0)
-        ADD_DEFINITIONS(-DUHD_FW_TRACE_LEVEL=${TRACE_LEVEL})
-    ENDIF(${TRACE_LEVEL} GREATER 0)
-ENDIF(TRACE_LEVEL)
+    if(${TRACE_LEVEL} GREATER 0)
+        add_definitions(-DUHD_FW_TRACE_LEVEL=${TRACE_LEVEL})
+    endif(${TRACE_LEVEL} GREATER 0)
+endif(TRACE_LEVEL)
 
 ########################################################################
 # helper functions to build output formats
 ########################################################################
-SET(GEN_OUTPUTS_BIN_SIZE "bin_size_not_set") #set before calling
-MACRO(GEN_OUTPUTS target pretty_name)
-    GET_FILENAME_COMPONENT(name ${target} NAME_WE)
+set(GEN_OUTPUTS_BIN_SIZE "bin_size_not_set") #set before calling
+macro(GEN_OUTPUTS target pretty_name)
+    get_filename_component(name ${target} NAME_WE)
     #command to create a map from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.map DEPENDS ${target}
         COMMAND ${LINKER} -Map ${name}.map ${target}
     )
     #command to create a bin from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.bin DEPENDS ${target}
         COMMAND ${OBJCOPY} -O binary ${target} ${name}.bin
         --pad-to ${GEN_OUTPUTS_BIN_SIZE}
     )
     #command to create a ihx from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.ihx DEPENDS ${target}
         COMMAND ${OBJCOPY} -O ihex ${target} ${name}.ihx
         --pad-to ${GEN_OUTPUTS_BIN_SIZE}
     )
     #command to create a dump from elf
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.dump DEPENDS ${target}
         COMMAND ${OBJDUMP} -DSC ${target} > ${name}.dump
     )
     #command to create a rom from bin
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.rom DEPENDS ${name}.bin
         COMMAND ${HEXDUMP} -v -e'1/1 \"%.2X\\n\"' ${name}.bin > ${name}.rom
     )
     #command to create a coe from bin
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${name}.coe DEPENDS ${name}.bin
         COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/utils/bin_to_coe.py ${name}.bin ${name}.coe
     )
     #add a top level target for output files
-    ADD_CUSTOM_TARGET(
+    add_custom_target(
         ${pretty_name} ALL DEPENDS ${name}.map ${name}.bin ${name}.ihx ${name}.dump ${name}.rom ${name}.coe
     )
-ENDMACRO(GEN_OUTPUTS)
+endmacro(GEN_OUTPUTS)
 
 ########################################################################
 # Add the subdirectories
 ########################################################################
-ADD_SUBDIRECTORY(lib)
-ADD_SUBDIRECTORY(x300)
-ADD_SUBDIRECTORY(n230)
+add_subdirectory(lib)
+add_subdirectory(x300)
+add_subdirectory(n230)
diff --git a/firmware/usrp3/n230/CMakeLists.txt b/firmware/usrp3/n230/CMakeLists.txt
index 5787fbb7d..dc0718918 100644
--- a/firmware/usrp3/n230/CMakeLists.txt
+++ b/firmware/usrp3/n230/CMakeLists.txt
@@ -31,7 +31,7 @@ set(GEN_OUTPUTS_BIN_SIZE 0x7fff)
 
 add_executable(n230_main.elf ${n230_sources})
 target_link_libraries(n230_main.elf usrp3fw)
-GEN_OUTPUTS(n230_main.elf n230)
+gen_outputs(n230_main.elf n230)
 
 #INSTALL(
 #    FILES ${CMAKE_CURRENT_BINARY_DIR}/n230_main.bin
diff --git a/firmware/usrp3/x300/CMakeLists.txt b/firmware/usrp3/x300/CMakeLists.txt
index 5e6134885..62be725e9 100644
--- a/firmware/usrp3/x300/CMakeLists.txt
+++ b/firmware/usrp3/x300/CMakeLists.txt
@@ -23,13 +23,13 @@ list(APPEND x300_sources x300_init.c x300_main.c)
 
 ########################################################################
 set(GEN_OUTPUTS_BIN_SIZE 0x7fff)
-SET(CMAKE_C_FLAGS_DEBUG -DX300_DEBUG_UART)
+set(CMAKE_C_FLAGS_DEBUG -DX300_DEBUG_UART)
 
 add_executable(x300_main.elf ${x300_sources})
 target_link_libraries(x300_main.elf usrp3fw)
-GEN_OUTPUTS(x300_main.elf x300)
+gen_outputs(x300_main.elf x300)
 
-INSTALL(
+install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/x300_main.bin
     DESTINATION share/uhd/images
     RENAME usrp_x300_fw.bin
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index ab7f41fb5..347cf802c 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -13,12 +13,12 @@
 ########################################################################
 # Project setup
 ########################################################################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-IF(POLICY CMP0048)
-  CMAKE_POLICY(SET CMP0048 NEW) # Suppress Version warnings
-ENDIF(POLICY CMP0048)
-PROJECT(UHD CXX C)
-ENABLE_TESTING()
+cmake_minimum_required(VERSION 2.8)
+if(POLICY CMP0048)
+  cmake_policy(SET CMP0048 NEW) # Suppress Version warnings
+endif(POLICY CMP0048)
+project(UHD CXX C)
+enable_testing()
 
 #make sure our local CMake Modules path comes first
 list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
@@ -27,239 +27,239 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
 # UHD Dependency Minimum Versions
 ########################################################################
 # Full C++11 came with GCC 4.7, Clang >= 3.3.0, Apple Clang >= 500
-SET(GCC_MIN_VERSION "4.8.0")
-SET(CLANG_MIN_VERSION "3.3.0")
-SET(APPLECLANG_MIN_VERSION "500")
+set(GCC_MIN_VERSION "4.8.0")
+set(CLANG_MIN_VERSION "3.3.0")
+set(APPLECLANG_MIN_VERSION "500")
 # 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 "1900")
+set(MSVC_MIN_VERSION_READABLE "14.0")
 # Other deps
-SET(BOOST_MIN_VERSION "1.53")
+set(BOOST_MIN_VERSION "1.53")
 
 ########################################################################
 # Check Compiler Version
 ########################################################################
-IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
-    IF(DEFINED CMAKE_CXX_COMPILER_VERSION)
-        IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS ${GCC_MIN_VERSION})
-            MESSAGE(WARNING "\nThe compiler selected to build UHD (GCC version ${CMAKE_CXX_COMPILER_VERSION} : ${CMAKE_CXX_COMPILER}) is older than that officially supported (${GCC_MIN_VERSION} minimum). This build may or not work. We highly recommend using a more recent GCC version.")
-         ENDIF()
-    ELSE()
-        MESSAGE(WARNING "\nCannot determine the version of the compiler selected to build UHD (GCC : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using GCC version ${GCC_MIN_VERSION} or more recent.")
-    ENDIF()
-    SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
-ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    EXECUTE_PROCESS(COMMAND
+if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+    if(DEFINED CMAKE_CXX_COMPILER_VERSION)
+        if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS ${GCC_MIN_VERSION})
+            message(WARNING "\nThe compiler selected to build UHD (GCC version ${CMAKE_CXX_COMPILER_VERSION} : ${CMAKE_CXX_COMPILER}) is older than that officially supported (${GCC_MIN_VERSION} minimum). This build may or not work. We highly recommend using a more recent GCC version.")
+         endif()
+    else()
+        message(WARNING "\nCannot determine the version of the compiler selected to build UHD (GCC : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using GCC version ${GCC_MIN_VERSION} or more recent.")
+    endif()
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
+elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+    execute_process(COMMAND
         ${CMAKE_CXX_COMPILER} -v
         RESULT_VARIABLE res ERROR_VARIABLE err
         ERROR_STRIP_TRAILING_WHITESPACE)
-    IF(${res} STREQUAL "0")
+    if(${res} STREQUAL "0")
         # output is in error stream
-        STRING(REGEX MATCH "^Apple.*" IS_APPLE ${err})
-        IF("${IS_APPLE}" STREQUAL "")
-            SET(MIN_VERSION ${CLANG_MIN_VERSION})
-            SET(APPLE_STR "")
+        string(REGEX MATCH "^Apple.*" IS_APPLE ${err})
+        if("${IS_APPLE}" STREQUAL "")
+            set(MIN_VERSION ${CLANG_MIN_VERSION})
+            set(APPLE_STR "")
             # retrieve the compiler's version from it
-            STRING(REGEX MATCH "clang version [0-9.]+" CLANG_OTHER_VERSION ${err})
-            STRING(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_OTHER_VERSION})
-        ELSE()
-            SET(MIN_VERSION ${APPLECLANG_MIN_VERSION})
-            SET(APPLE_STR "Apple ")
+            string(REGEX MATCH "clang version [0-9.]+" CLANG_OTHER_VERSION ${err})
+            string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_OTHER_VERSION})
+        else()
+            set(MIN_VERSION ${APPLECLANG_MIN_VERSION})
+            set(APPLE_STR "Apple ")
             # retrieve the compiler's version from it
-            STRING(REGEX MATCH "(clang-[0-9.]+)" CLANG_APPLE_VERSION ${err})
-            STRING(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_APPLE_VERSION})
-        ENDIF()
-        IF(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}")
-            MESSAGE(WARNING "\nThe compiler selected to build UHD (${APPLE_STR}Clang version ${CLANG_VERSION} : ${CMAKE_CXX_COMPILER}) is older than that officially supported (${MIN_VERSION} minimum). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
-        ENDIF()
-    ELSE()
-        MESSAGE(WARNING "\nCannot determine the version of the compiler selected to build UHD (${APPLE_STR}Clang : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
-    ENDIF()
-ELSEIF(MSVC)
-    IF(${MSVC_VERSION} VERSION_LESS ${MSVC_MIN_VERSION})
-	MESSAGE(FATAL_ERROR "\nMSVC version is less than the required minimum. Required: ${MSVC_MIN_VERSION_READABLE}")
-    ENDIF(${MSVC_VERSION} VERSION_LESS ${MSVC_MIN_VERSION})
-ENDIF()
-
-IF(CMAKE_VERSION VERSION_LESS "3.1")
-    IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
-        SET(CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
-    ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-        IF("${IS_APPLE}" STREQUAL "")
-            SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
-        ELSE()
-            SET(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
-        ENDIF()
-    ENDIF()
-ELSE()
-    SET(CMAKE_CXX_STANDARD 11)
-ENDIF()
-
-IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    SET(CMAKE_EXE_LINKER_FLAGS "-lthr ${CMAKE_EXE_LINKER_FLAGS}")
-    SET(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
-ENDIF()
+            string(REGEX MATCH "(clang-[0-9.]+)" CLANG_APPLE_VERSION ${err})
+            string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_APPLE_VERSION})
+        endif()
+        if(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}")
+            message(WARNING "\nThe compiler selected to build UHD (${APPLE_STR}Clang version ${CLANG_VERSION} : ${CMAKE_CXX_COMPILER}) is older than that officially supported (${MIN_VERSION} minimum). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
+        endif()
+    else()
+        message(WARNING "\nCannot determine the version of the compiler selected to build UHD (${APPLE_STR}Clang : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.")
+    endif()
+elseif(MSVC)
+    if(${MSVC_VERSION} VERSION_LESS ${MSVC_MIN_VERSION})
+	message(FATAL_ERROR "\nMSVC version is less than the required minimum. Required: ${MSVC_MIN_VERSION_READABLE}")
+    endif(${MSVC_VERSION} VERSION_LESS ${MSVC_MIN_VERSION})
+endif()
+
+if(CMAKE_VERSION VERSION_LESS "3.1")
+    if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+        set(CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
+    elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+        if("${IS_APPLE}" STREQUAL "")
+            set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
+        else()
+            set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
+        endif()
+    endif()
+else()
+    set(CMAKE_CXX_STANDARD 11)
+endif()
+
+if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+    set(CMAKE_EXE_LINKER_FLAGS "-lthr ${CMAKE_EXE_LINKER_FLAGS}")
+    set(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
+endif()
 
 ########################################################################
 # Packaging Variables
 ########################################################################
 
-SET(LIBUHD_PKG ${LIBUHD_PKG} CACHE BOOL "Build Debian libuhd003 package")
-SET(LIBUHDDEV_PKG ${LIBUHDDEV_PKG} CACHE BOOL "Build Debian libuhd-dev package")
-SET(UHDHOST_PKG ${UHDPOST_PKG} CACHE BOOL "Build Debian uhd-host package")
-INCLUDE(UHDComponent) #enable components
-INCLUDE(UHDPackage)   #setup cpack
+set(LIBUHD_PKG ${LIBUHD_PKG} CACHE BOOL "Build Debian libuhd003 package")
+set(LIBUHDDEV_PKG ${LIBUHDDEV_PKG} CACHE BOOL "Build Debian libuhd-dev package")
+set(UHDHOST_PKG ${UHDPOST_PKG} CACHE BOOL "Build Debian uhd-host package")
+include(UHDComponent) #enable components
+include(UHDPackage)   #setup cpack
 
 ########################################################################
 # Install Dirs
 ########################################################################
 #when the library suffix should be 64 (applies to redhat linux family)
-IF(NOT DEFINED LIB_SUFFIX AND REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
-    SET(LIB_SUFFIX 64)
-ENDIF()
-IF(CMAKE_INSTALL_LIBDIR MATCHES lib64)
-    SET(LIB_SUFFIX 64)
-ENDIF()
-
-SET(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")
-SET(RUNTIME_DIR bin)
-SET(LIBRARY_DIR lib${LIB_SUFFIX})
-SET(INCLUDE_DIR include)
-SET(PKG_DATA_DIR share/uhd)
-IF(NOT DEFINED PKG_LIB_DIR)
-    SET(PKG_LIB_DIR ${LIBRARY_DIR}/uhd)
-ENDIF()
-SET(PKG_DOC_DIR share/doc/uhd)
-SET(PKG_MAN_DIR share/man/man1)
+if(NOT DEFINED LIB_SUFFIX AND REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
+    set(LIB_SUFFIX 64)
+endif()
+if(CMAKE_INSTALL_LIBDIR MATCHES lib64)
+    set(LIB_SUFFIX 64)
+endif()
+
+set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")
+set(RUNTIME_DIR bin)
+set(LIBRARY_DIR lib${LIB_SUFFIX})
+set(INCLUDE_DIR include)
+set(PKG_DATA_DIR share/uhd)
+if(NOT DEFINED PKG_LIB_DIR)
+    set(PKG_LIB_DIR ${LIBRARY_DIR}/uhd)
+endif()
+set(PKG_DOC_DIR share/doc/uhd)
+set(PKG_MAN_DIR share/man/man1)
 
 ########################################################################
 # UHD config files
 ########################################################################
-SET(UHD_USER_CONF_FILE
+set(UHD_USER_CONF_FILE
     ".uhd/uhd.conf"
     CACHE STRING
     "Location of the user-specific UHD configuration file, relative to APPDATA (or HOME)"
 )
-IF(UNIX)
-    SET(UHD_SYS_CONF_FILE
+if(UNIX)
+    set(UHD_SYS_CONF_FILE
         "/etc/uhd/uhd.conf"
         CACHE STRING
         "Location of the system-wide UHD configuration file"
     )
-ELSEIF(WIN32)
-    SET(UHD_SYS_CONF_FILE
+elseif(WIN32)
+    set(UHD_SYS_CONF_FILE
         "%programdata%/uhd/uhd.conf"
         CACHE STRING
         "Location of the system-wide UHD configuration file"
     )
-ELSE()
-    MESSAGE(WARNING "Not setting UHD_SYS_CONF_FILE!")
-ENDIF()
+else()
+    message(WARNING "Not setting UHD_SYS_CONF_FILE!")
+endif()
 
 ########################################################################
 # UHD Image Directories
 ########################################################################
-IF(NOT DEFINED UHD_IMAGES_DIR)
-    IF(DEFINED FPGA_IMAGES_DIR)
-        SET(UHD_IMAGES_DIR ${FPGA_IMAGES_DIR})
-    ELSE(DEFINED FPGA_IMAGES_DIR)
-        FILE(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/share/uhd/images using_images_dir)
-        SET(UHD_IMAGES_DIR ${using_images_dir})
-    ENDIF(DEFINED FPGA_IMAGES_DIR)
-ENDIF(NOT DEFINED UHD_IMAGES_DIR)
+if(NOT DEFINED UHD_IMAGES_DIR)
+    if(DEFINED FPGA_IMAGES_DIR)
+        set(UHD_IMAGES_DIR ${FPGA_IMAGES_DIR})
+    else(DEFINED FPGA_IMAGES_DIR)
+        file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/share/uhd/images using_images_dir)
+        set(UHD_IMAGES_DIR ${using_images_dir})
+    endif(DEFINED FPGA_IMAGES_DIR)
+endif(NOT DEFINED UHD_IMAGES_DIR)
 
-OPTION(UHD_IMAGES_DIR "Path to installed UHD image binaries.")
-MESSAGE( STATUS "Using UHD Images Directory: ${UHD_IMAGES_DIR}" )
-ADD_DEFINITIONS(-DUHD_IMAGES_DIR=${UHD_IMAGES_DIR})
+option(UHD_IMAGES_DIR "Path to installed UHD image binaries.")
+message( STATUS "Using UHD Images Directory: ${UHD_IMAGES_DIR}" )
+add_definitions(-DUHD_IMAGES_DIR=${UHD_IMAGES_DIR})
 
-IF(DEFINED UHD_IMAGES_DIR_WINREG_KEY)
-    ADD_DEFINITIONS(-DUHD_IMAGES_DIR_WINREG_KEY=${UHD_IMAGES_DIR_WINREG_KEY})
-ENDIF(DEFINED UHD_IMAGES_DIR_WINREG_KEY)
+if(DEFINED UHD_IMAGES_DIR_WINREG_KEY)
+    add_definitions(-DUHD_IMAGES_DIR_WINREG_KEY=${UHD_IMAGES_DIR_WINREG_KEY})
+endif(DEFINED UHD_IMAGES_DIR_WINREG_KEY)
 
 ########################################################################
 # Local Include Dir
 ########################################################################
-INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+include_directories(${CMAKE_BINARY_DIR}/include)
+include_directories(${CMAKE_SOURCE_DIR}/include)
 
 ########################################################################
 # Static Lib Configuration
 ########################################################################
-OPTION(ENABLE_STATIC_LIBS "Enable building of static libraries" OFF)
-IF(ENABLE_STATIC_LIBS)
-    MESSAGE(STATUS "Building Static Libraries: ${ENABLE_STATIC_LIBS}")
-ENDIF(ENABLE_STATIC_LIBS)
+option(ENABLE_STATIC_LIBS "Enable building of static libraries" OFF)
+if(ENABLE_STATIC_LIBS)
+    message(STATUS "Building Static Libraries: ${ENABLE_STATIC_LIBS}")
+endif(ENABLE_STATIC_LIBS)
 
 ########################################################################
 # On Apple only, set install name and use rpath correctly, if not already set
 ########################################################################
-IF(APPLE)
-    IF(NOT CMAKE_INSTALL_NAME_DIR)
-        SET(CMAKE_INSTALL_NAME_DIR
+if(APPLE)
+    if(NOT CMAKE_INSTALL_NAME_DIR)
+        set(CMAKE_INSTALL_NAME_DIR
             ${CMAKE_INSTALL_PREFIX}/${LIBRARY_DIR} CACHE
             PATH "Library Install Name Destination Directory" FORCE)
-    ENDIF(NOT CMAKE_INSTALL_NAME_DIR)
-    IF(NOT CMAKE_INSTALL_RPATH)
-        SET(CMAKE_INSTALL_RPATH
+    endif(NOT CMAKE_INSTALL_NAME_DIR)
+    if(NOT CMAKE_INSTALL_RPATH)
+        set(CMAKE_INSTALL_RPATH
             ${CMAKE_INSTALL_PREFIX}/${LIBRARY_DIR} CACHE
             PATH "Library Install RPath" FORCE)
-    ENDIF(NOT CMAKE_INSTALL_RPATH)
-    IF(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
-        SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
+    endif(NOT CMAKE_INSTALL_RPATH)
+    if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
+        set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
             BOOL "Do Build Using Library Install RPath" FORCE)
-    ENDIF(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
-ENDIF(APPLE)
+    endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
+endif(APPLE)
 
 ########################################################################
 # Optional Compiler Flags
 ########################################################################
-INCLUDE(CheckCXXCompilerFlag)
-MACRO(UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG flag have)
-    CHECK_CXX_COMPILER_FLAG(${flag} ${have})
-    IF(${have})
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
-    ENDIF(${have})
-ENDMACRO(UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG)
+include(CheckCXXCompilerFlag)
+macro(UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG flag have)
+    check_cxx_compiler_flag(${flag} ${have})
+    if(${have})
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+    endif(${have})
+endmacro(UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG)
 
 #select the release build type by default to get optimization flags
-IF(NOT CMAKE_BUILD_TYPE)
-   SET(CMAKE_BUILD_TYPE "Release")
-   MESSAGE(STATUS "Build type not specified: defaulting to release.")
-ENDIF(NOT CMAKE_BUILD_TYPE)
-SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "")
+if(NOT CMAKE_BUILD_TYPE)
+   set(CMAKE_BUILD_TYPE "Release")
+   message(STATUS "Build type not specified: defaulting to release.")
+endif(NOT CMAKE_BUILD_TYPE)
+set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "")
 
 #force UHD_RELEASE_MODE to be a string for cmake-gui
-SET(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE STRING "UHD Release Mode")
+set(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE STRING "UHD Release Mode")
 
-IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR
+if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR
     ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    IF(STRIP_BINARIES)
-        IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
-            SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
-        ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
-    ENDIF(STRIP_BINARIES)
-    ADD_DEFINITIONS(-Wall)
-    ADD_DEFINITIONS(-Wextra)
-    ADD_DEFINITIONS(-Wsign-compare)
+    if(STRIP_BINARIES)
+        if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
+        endif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+    endif(STRIP_BINARIES)
+    add_definitions(-Wall)
+    add_definitions(-Wextra)
+    add_definitions(-Wsign-compare)
     #ADD_DEFINITIONS(-Wconversion)
     #ADD_DEFINITIONS(-pedantic)
     #ADD_DEFINITIONS(-ansi)
-    IF(NOT WIN32)
+    if(NOT WIN32)
         #only export symbols that are declared to be part of the uhd api (non dll platforms)
-        UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)
-        UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility-inlines-hidden HAVE_VISIBILITY_INLINES_HIDDEN)
-    ENDIF(NOT WIN32)
-    IF(${CMAKE_BUILD_TYPE} STREQUAL "Coverage")
+        uhd_add_optional_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)
+        uhd_add_optional_cxx_compiler_flag(-fvisibility-inlines-hidden HAVE_VISIBILITY_INLINES_HIDDEN)
+    endif(NOT WIN32)
+    if(${CMAKE_BUILD_TYPE} STREQUAL "Coverage")
         include(CodeCoverage)
         setup_target_for_coverage(coverage "ctest || return 0" coverage) # never fail ctest, always generate coverage report
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage" CACHE STRING "Flags used by the C++ compiler during Coverage builds." FORCE)
-        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage" CACHE STRING "Flags used by the C compiler during Coverage builds." FORCE)
-    ENDIF()
-ENDIF()
-
-IF(MSVC)
-    INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/cmake/msvc)
-    ADD_DEFINITIONS( #stop all kinds of compatibility warnings
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage" CACHE STRING "Flags used by the C++ compiler during Coverage builds." FORCE)
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage" CACHE STRING "Flags used by the C compiler during Coverage builds." FORCE)
+    endif()
+endif()
+
+if(MSVC)
+    include_directories(${CMAKE_SOURCE_DIR}/cmake/msvc)
+    add_definitions( #stop all kinds of compatibility warnings
         -DWIN32_LEAN_AND_MEAN
         -DVC_EXTRALEAN
         -D_SCL_SECURE_NO_WARNINGS
@@ -271,24 +271,24 @@ IF(MSVC)
         -D_WINSOCK_DEPRECATED_NO_WARNINGS
     )
     # multi-threaded build and increases the number of addressable sections in an .obj file.
-    SET (COMPILE_FLAGS ${COMPILE_FLAGS} /MP /bigobj)
-ENDIF(MSVC)
+    set (COMPILE_FLAGS ${COMPILE_FLAGS} /MP /bigobj)
+endif(MSVC)
 
-IF(CYGWIN)
-    ADD_DEFINITIONS(-D__USE_W32_SOCKETS) #boost asio says we need this
-ENDIF(CYGWIN)
+if(CYGWIN)
+    add_definitions(-D__USE_W32_SOCKETS) #boost asio says we need this
+endif(CYGWIN)
 
-IF(WIN32)
-    ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp
-    ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max
-ENDIF(WIN32)
+if(WIN32)
+    add_definitions(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp
+    add_definitions(-DNOMINMAX) #disables stupidity and enables std::min and std::max
+endif(WIN32)
 
 ########################################################################
 # Setup Boost
 ########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Configuring Boost C++ Libraries...")
-SET(BOOST_REQUIRED_COMPONENTS
+message(STATUS "")
+message(STATUS "Configuring Boost C++ Libraries...")
+set(BOOST_REQUIRED_COMPONENTS
     chrono
     date_time
     filesystem
@@ -298,65 +298,65 @@ SET(BOOST_REQUIRED_COMPONENTS
     unit_test_framework
     serialization
 )
-IF(MINGW)
-    LIST(APPEND BOOST_REQUIRED_COMPONENTS thread_win32)
-ELSE()
-    LIST(APPEND BOOST_REQUIRED_COMPONENTS thread)
-ENDIF()
-
-IF(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
-    LIST(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
-ENDIF(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
-
-IF(MSVC)
-    SET(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
-    IF(BOOST_ALL_DYN_LINK)
-        ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
-    ELSE(BOOST_ALL_DYN_LINK)
-        SET(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
-    ENDIF(BOOST_ALL_DYN_LINK)
-ENDIF(MSVC)
-
-SET(Boost_ADDITIONAL_VERSIONS
+if(MINGW)
+    list(APPEND BOOST_REQUIRED_COMPONENTS thread_win32)
+else()
+    list(APPEND BOOST_REQUIRED_COMPONENTS thread)
+endif()
+
+if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
+    list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
+endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
+
+if(MSVC)
+    set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
+    if(BOOST_ALL_DYN_LINK)
+        add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
+    else(BOOST_ALL_DYN_LINK)
+        set(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
+    endif(BOOST_ALL_DYN_LINK)
+endif(MSVC)
+
+set(Boost_ADDITIONAL_VERSIONS
     "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.48.0" "1.49" "1.50.0" "1.50"
     "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54" "1.55.0" "1.55"
     "1.56.0" "1.56" "1.57" "1.57" "1.58" "1.59" "1.60" "1.61"
 )
-FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
+find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
 
-INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
-LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+include_directories(${Boost_INCLUDE_DIRS})
+link_directories(${Boost_LIBRARY_DIRS})
 
-MESSAGE(STATUS "Boost include directories: ${Boost_INCLUDE_DIRS}")
-MESSAGE(STATUS "Boost library directories: ${Boost_LIBRARY_DIRS}")
-MESSAGE(STATUS "Boost libraries: ${Boost_LIBRARIES}")
+message(STATUS "Boost include directories: ${Boost_INCLUDE_DIRS}")
+message(STATUS "Boost library directories: ${Boost_LIBRARY_DIRS}")
+message(STATUS "Boost libraries: ${Boost_LIBRARIES}")
 
 ########################################################################
 # Additional settings for build environment
 ########################################################################
 # Note: RFNoC never gets fully disabled, but the public APIs do
-SET(ENABLE_RFNOC OFF CACHE BOOL "Export RFNoC includes and symbols")
-INCLUDE(UHDGlobalDefs)
-INCLUDE(UHDLog)
+set(ENABLE_RFNOC OFF CACHE BOOL "Export RFNoC includes and symbols")
+include(UHDGlobalDefs)
+include(UHDLog)
 
 ########################################################################
 # Check Python Modules
 ########################################################################
-INCLUDE(UHDPython)
+include(UHDPython)
 
-PYTHON_CHECK_MODULE(
+python_check_module(
     "Python version 2.7 or greater"
     "platform" "platform.python_version() >= '2.7'"
     HAVE_PYTHON_PLAT_MIN_VERSION
 )
 
-PYTHON_CHECK_MODULE(
+python_check_module(
     "Mako templates 0.4.2 or greater"
     "mako" "mako.__version__ >= '0.4.2'"
     HAVE_PYTHON_MODULE_MAKO
 )
 
-PYTHON_CHECK_MODULE(
+python_check_module(
     "requests 2.0 or greater"
     "requests" "requests.__version__ >= '2.0'"
     HAVE_PYTHON_MODULE_REQUESTS
@@ -365,19 +365,19 @@ PYTHON_CHECK_MODULE(
 ########################################################################
 # Create Uninstall Target
 ########################################################################
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
     ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
 @ONLY)
 
-ADD_CUSTOM_TARGET(uninstall
+add_custom_target(uninstall
     ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
 )
 
 ########################################################################
 # Install Package Docs
 ########################################################################
-UHD_INSTALL(FILES
+uhd_install(FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/README.md
     ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE
     DESTINATION ${PKG_DOC_DIR}
@@ -390,85 +390,85 @@ UHD_INSTALL(FILES
 #{{{IMG_SECTION
 # This section is written automatically by /images/create_imgs_package.py
 # Any manual changes in here will be overwritten.
-SET(UHD_IMAGES_MD5SUM "6fc29c5c141e8f3faec6189ab07e458d")
-SET(UHD_IMAGES_DOWNLOAD_SRC "uhd-images_3.11.0.git-227-g9277fc58.zip")
+set(UHD_IMAGES_MD5SUM "6fc29c5c141e8f3faec6189ab07e458d")
+set(UHD_IMAGES_DOWNLOAD_SRC "uhd-images_3.11.0.git-227-g9277fc58.zip")
 #}}}
 
 ########################################################################
 # 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 - C API" ENABLE_C_API ON "ENABLE_LIBUHD" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("Examples" ENABLE_EXAMPLES ON "ENABLE_LIBUHD" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("Utils" ENABLE_UTILS ON "ENABLE_LIBUHD" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("Tests" ENABLE_TESTS ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("LibUHD" ENABLE_LIBUHD ON "Boost_FOUND;HAVE_PYTHON_PLAT_MIN_VERSION;HAVE_PYTHON_MODULE_MAKO" OFF ON)
+libuhd_register_component("LibUHD - C API" ENABLE_C_API ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("Examples" ENABLE_EXAMPLES ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("Utils" ENABLE_UTILS ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("Tests" ENABLE_TESTS ON "ENABLE_LIBUHD" OFF OFF)
 
 ########################################################################
 # Check for fpga-src submodule
 ########################################################################
-SET(HAS_FPGA_SUBMODULE FALSE)
-EXECUTE_PROCESS(
+set(HAS_FPGA_SUBMODULE FALSE)
+execute_process(
     COMMAND ${PYTHON_EXECUTABLE} -c "import os; print(os.path.abspath(os.path.join('${CMAKE_SOURCE_DIR}', '..', 'fpga-src')))"
     OUTPUT_VARIABLE FPGA_SUBMODULE_DIR
     OUTPUT_STRIP_TRAILING_WHITESPACE
 )
-IF(EXISTS "${FPGA_SUBMODULE_DIR}/docs/fpga.md")
-    SET(HAS_FPGA_SUBMODULE TRUE)
-    MESSAGE(STATUS "")
-    MESSAGE(STATUS "Found FPGA submodule: ${FPGA_SUBMODULE_DIR}")
-ENDIF(EXISTS "${FPGA_SUBMODULE_DIR}/docs/fpga.md")
+if(EXISTS "${FPGA_SUBMODULE_DIR}/docs/fpga.md")
+    set(HAS_FPGA_SUBMODULE TRUE)
+    message(STATUS "")
+    message(STATUS "Found FPGA submodule: ${FPGA_SUBMODULE_DIR}")
+endif(EXISTS "${FPGA_SUBMODULE_DIR}/docs/fpga.md")
 
 ########################################################################
 # Add the subdirectories
 ########################################################################
-IF(ENABLE_LIBUHD)
-    ADD_SUBDIRECTORY(lib)
-ENDIF(ENABLE_LIBUHD)
+if(ENABLE_LIBUHD)
+    add_subdirectory(lib)
+endif(ENABLE_LIBUHD)
 
-ADD_SUBDIRECTORY(include)
+add_subdirectory(include)
 
-IF(ENABLE_EXAMPLES)
-    ADD_SUBDIRECTORY(examples)
-ENDIF(ENABLE_EXAMPLES)
+if(ENABLE_EXAMPLES)
+    add_subdirectory(examples)
+endif(ENABLE_EXAMPLES)
 
-IF(ENABLE_TESTS)
-    ADD_SUBDIRECTORY(tests)
-ENDIF(ENABLE_TESTS)
+if(ENABLE_TESTS)
+    add_subdirectory(tests)
+endif(ENABLE_TESTS)
 
-IF(ENABLE_UTILS)
-    ADD_SUBDIRECTORY(utils)
-ENDIF(ENABLE_UTILS)
+if(ENABLE_UTILS)
+    add_subdirectory(utils)
+endif(ENABLE_UTILS)
 
-ADD_SUBDIRECTORY(docs)
+add_subdirectory(docs)
 
 ########################################################################
 # Create Pkg Config File
 ########################################################################
-FOREACH(inc ${Boost_INCLUDE_DIRS})
-    LIST(APPEND UHD_PC_CFLAGS "-I${inc}")
-ENDFOREACH(inc)
+foreach(inc ${Boost_INCLUDE_DIRS})
+    list(APPEND UHD_PC_CFLAGS "-I${inc}")
+endforeach(inc)
 
-FOREACH(lib ${Boost_LIBRARY_DIRS})
-    LIST(APPEND UHD_PC_LIBS "-L${lib}")
-ENDFOREACH(lib)
+foreach(lib ${Boost_LIBRARY_DIRS})
+    list(APPEND UHD_PC_LIBS "-L${lib}")
+endforeach(lib)
 
 #use space-separation format for the pc file
-STRING(REPLACE ";" " " UHD_PC_REQUIRES "${UHD_PC_REQUIRES}")
-STRING(REPLACE ";" " " UHD_PC_CFLAGS "${UHD_PC_CFLAGS}")
-STRING(REPLACE ";" " " UHD_PC_LIBS "${UHD_PC_LIBS}")
+string(REPLACE ";" " " UHD_PC_REQUIRES "${UHD_PC_REQUIRES}")
+string(REPLACE ";" " " UHD_PC_CFLAGS "${UHD_PC_CFLAGS}")
+string(REPLACE ";" " " UHD_PC_LIBS "${UHD_PC_LIBS}")
 
 #unset these vars to avoid hard-coded paths to cross environment
-IF(CMAKE_CROSSCOMPILING)
-    SET(UHD_PC_CFLAGS)
-    SET(UHD_PC_LIBS)
-ENDIF(CMAKE_CROSSCOMPILING)
+if(CMAKE_CROSSCOMPILING)
+    set(UHD_PC_CFLAGS)
+    set(UHD_PC_LIBS)
+endif(CMAKE_CROSSCOMPILING)
 
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/uhd.pc.in
     ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc
 @ONLY)
 
-UHD_INSTALL(
+uhd_install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc
     DESTINATION ${LIBRARY_DIR}/pkgconfig
     COMPONENT "devel"
@@ -477,45 +477,45 @@ UHD_INSTALL(
 ########################################################################
 # Create and Install UHD cmake files
 ########################################################################
-IF(NOT CMAKE_MODULES_DIR)
-   SET(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
-ENDIF(NOT CMAKE_MODULES_DIR)
+if(NOT CMAKE_MODULES_DIR)
+   set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
+endif(NOT CMAKE_MODULES_DIR)
 
 # UHDConfig.cmake needs UHD_LINK_LIST_STATIC set:
-LIST(APPEND UHD_LINK_LIST_STATIC "dl")
-LIST(APPEND UHD_LINK_LIST_STATIC "pthread")
-FOREACH(Boost_Comp ${BOOST_REQUIRED_COMPONENTS})
-    IF(NOT ${Boost_Comp} STREQUAL "unit_test_framework")
-        LIST(APPEND UHD_LINK_LIST_STATIC "boost_${Boost_Comp}")
-    ENDIF(NOT ${Boost_Comp} STREQUAL "unit_test_framework")
-ENDFOREACH(Boost_Comp)
-IF(ENABLE_USB)
-    LIST(APPEND UHD_LINK_LIST_STATIC "usb-1.0")
-ENDIF(ENABLE_USB)
+list(APPEND UHD_LINK_LIST_STATIC "dl")
+list(APPEND UHD_LINK_LIST_STATIC "pthread")
+foreach(Boost_Comp ${BOOST_REQUIRED_COMPONENTS})
+    if(NOT ${Boost_Comp} STREQUAL "unit_test_framework")
+        list(APPEND UHD_LINK_LIST_STATIC "boost_${Boost_Comp}")
+    endif(NOT ${Boost_Comp} STREQUAL "unit_test_framework")
+endforeach(Boost_Comp)
+if(ENABLE_USB)
+    list(APPEND UHD_LINK_LIST_STATIC "usb-1.0")
+endif(ENABLE_USB)
 # UHDConfig.cmake also needs UHD_RFNOC_FOUND
-IF(ENABLE_RFNOC)
-    SET(UHD_RFNOC_FOUND "TRUE")
-ELSE()
-    SET(UHD_RFNOC_FOUND "FALSE")
-ENDIF(ENABLE_RFNOC)
+if(ENABLE_RFNOC)
+    set(UHD_RFNOC_FOUND "TRUE")
+else()
+    set(UHD_RFNOC_FOUND "FALSE")
+endif(ENABLE_RFNOC)
 
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_SOURCE_DIR}/cmake/Modules/UHDConfigVersion.cmake.in
     ${CMAKE_BINARY_DIR}/cmake/Modules/UHDConfigVersion.cmake
     @ONLY
 )
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_SOURCE_DIR}/cmake/Modules/UHDConfig.cmake.in
     ${CMAKE_BINARY_DIR}/cmake/Modules/UHDConfig.cmake
     @ONLY
 )
 
-SET(cmake_configs
+set(cmake_configs
     ${CMAKE_BINARY_DIR}/cmake/Modules/UHDConfig.cmake
     ${CMAKE_BINARY_DIR}/cmake/Modules/UHDConfigVersion.cmake
 )
 
-UHD_INSTALL(
+uhd_install(
     FILES ${cmake_configs}
     DESTINATION ${CMAKE_MODULES_DIR}/uhd
     COMPONENT "devel"
@@ -524,43 +524,43 @@ UHD_INSTALL(
 ########################################################################
 # Handle pre-built UHD Images for packaging
 ########################################################################
-IF(DEFINED UHD_IMAGES_SRC_DIR AND EXISTS "${UHD_IMAGES_SRC_DIR}")
-    MESSAGE(STATUS "Reading images from directory `${UHD_IMAGES_SRC_DIR}'")
-    FILE(GLOB_RECURSE _image_files "${UHD_IMAGES_SRC_DIR}/*")
-    MESSAGE(STATUS "These images files will be installed/packaged:")
-    FOREACH(_img ${_image_files})
-        MESSAGE(STATUS "  ${_img}")
-    ENDFOREACH(_img)
-    UHD_INSTALL(FILES ${_image_files} DESTINATION ${PKG_DATA_DIR}/images COMPONENT images)
-ENDIF(DEFINED UHD_IMAGES_SRC_DIR AND EXISTS "${UHD_IMAGES_SRC_DIR}")
+if(DEFINED UHD_IMAGES_SRC_DIR AND EXISTS "${UHD_IMAGES_SRC_DIR}")
+    message(STATUS "Reading images from directory `${UHD_IMAGES_SRC_DIR}'")
+    file(GLOB_RECURSE _image_files "${UHD_IMAGES_SRC_DIR}/*")
+    message(STATUS "These images files will be installed/packaged:")
+    foreach(_img ${_image_files})
+        message(STATUS "  ${_img}")
+    endforeach(_img)
+    uhd_install(FILES ${_image_files} DESTINATION ${PKG_DATA_DIR}/images COMPONENT images)
+endif(DEFINED UHD_IMAGES_SRC_DIR AND EXISTS "${UHD_IMAGES_SRC_DIR}")
 
 ########################################################################
 # Print Summary
 ########################################################################
-IF(LIBUHD_PKG)
-    MESSAGE(STATUS "")
-    SET(PRINT_APPEND " (Debian libuhd003 package configuration)")
-ELSEIF(LIBUHDDEV_PKG)
-    MESSAGE(STATUS "")
-    SET(PRINT_APPEND " (Debian libuhd-dev package configuration)")
-ELSEIF(UHDHOST_PKG)
-    MESSAGE(STATUS "")
-    SET(PRINT_APPEND " (Debian uhd-host package configuration)")
-ENDIF(LIBUHD_PKG)
-UHD_PRINT_COMPONENT_SUMMARY()
-IF(UHD_VERSION_DEVEL AND NOT UHD_GIT_BRANCH STREQUAL "maint")
-    MESSAGE(STATUS "******************************************************")
-    IF(UHD_GIT_BRANCH STREQUAL "master")
-        MESSAGE(STATUS "* You are building the UHD development master branch.")
-        MESSAGE(STATUS "* For production code, we recommend our stable,")
-        MESSAGE(STATUS "* releases or using the release branch (maint).")
-    ELSE()
-        MESSAGE(STATUS "* You are building a development branch of UHD.")
-        MESSAGE(STATUS "* These branches are designed to provide early access")
-        MESSAGE(STATUS "* to UHD and USRP features, but should be considered")
-        MESSAGE(STATUS "* unstable and/or experimental!")
-    ENDIF(UHD_GIT_BRANCH STREQUAL "master")
-    MESSAGE(STATUS "******************************************************")
-ENDIF(UHD_VERSION_DEVEL AND NOT UHD_GIT_BRANCH STREQUAL "maint")
-MESSAGE(STATUS "Building version: ${UHD_VERSION}${PRINT_APPEND}")
-MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
+if(LIBUHD_PKG)
+    message(STATUS "")
+    set(PRINT_APPEND " (Debian libuhd003 package configuration)")
+elseif(LIBUHDDEV_PKG)
+    message(STATUS "")
+    set(PRINT_APPEND " (Debian libuhd-dev package configuration)")
+elseif(UHDHOST_PKG)
+    message(STATUS "")
+    set(PRINT_APPEND " (Debian uhd-host package configuration)")
+endif(LIBUHD_PKG)
+uhd_print_component_summary()
+if(UHD_VERSION_DEVEL AND NOT UHD_GIT_BRANCH STREQUAL "maint")
+    message(STATUS "******************************************************")
+    if(UHD_GIT_BRANCH STREQUAL "master")
+        message(STATUS "* You are building the UHD development master branch.")
+        message(STATUS "* For production code, we recommend our stable,")
+        message(STATUS "* releases or using the release branch (maint).")
+    else()
+        message(STATUS "* You are building a development branch of UHD.")
+        message(STATUS "* These branches are designed to provide early access")
+        message(STATUS "* to UHD and USRP features, but should be considered")
+        message(STATUS "* unstable and/or experimental!")
+    endif(UHD_GIT_BRANCH STREQUAL "master")
+    message(STATUS "******************************************************")
+endif(UHD_VERSION_DEVEL AND NOT UHD_GIT_BRANCH STREQUAL "maint")
+message(STATUS "Building version: ${UHD_VERSION}${PRINT_APPEND}")
+message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
diff --git a/host/cmake/Modules/CheckCXXSymbolExistsCopy.cmake b/host/cmake/Modules/CheckCXXSymbolExistsCopy.cmake
index 2f16ba677..3f8afffb0 100644
--- a/host/cmake/Modules/CheckCXXSymbolExistsCopy.cmake
+++ b/host/cmake/Modules/CheckCXXSymbolExistsCopy.cmake
@@ -45,5 +45,5 @@
 include(CheckSymbolExistsCopy)
 
 macro(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
-  _CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
+  _check_symbol_exists("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
 endmacro()
diff --git a/host/cmake/Modules/CheckSymbolExistsCopy.cmake b/host/cmake/Modules/CheckSymbolExistsCopy.cmake
index 79c5ba78e..a9d0f2508 100644
--- a/host/cmake/Modules/CheckSymbolExistsCopy.cmake
+++ b/host/cmake/Modules/CheckSymbolExistsCopy.cmake
@@ -47,7 +47,7 @@
 
 
 macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
-  _CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
+  _check_symbol_exists("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
 endmacro()
 
 macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
diff --git a/host/cmake/Modules/CodeCoverage.cmake b/host/cmake/Modules/CodeCoverage.cmake
index a0b0ef526..70742b8fa 100644
--- a/host/cmake/Modules/CodeCoverage.cmake
+++ b/host/cmake/Modules/CodeCoverage.cmake
@@ -68,48 +68,48 @@
 #
 
 # Check prereqs
-FIND_PROGRAM( GCOV_PATH gcov )
-FIND_PROGRAM( LCOV_PATH lcov )
-FIND_PROGRAM( GENHTML_PATH genhtml )
-FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
-
-IF(NOT GCOV_PATH)
-	MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
-ENDIF() # NOT GCOV_PATH
-
-IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
-	IF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 3)
-		MESSAGE(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
-	ENDIF()
-ELSEIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-	MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
-ENDIF() # CHECK VALID COMPILER
-
-SET(CMAKE_CXX_FLAGS_COVERAGE
+find_program( GCOV_PATH gcov )
+find_program( LCOV_PATH lcov )
+find_program( GENHTML_PATH genhtml )
+find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
+
+if(NOT GCOV_PATH)
+	message(FATAL_ERROR "gcov not found! Aborting...")
+endif() # NOT GCOV_PATH
+
+if("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
+	if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 3)
+		message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
+	endif()
+elseif(NOT CMAKE_COMPILER_IS_GNUCXX)
+	message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
+endif() # CHECK VALID COMPILER
+
+set(CMAKE_CXX_FLAGS_COVERAGE
     "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
     CACHE STRING "Flags used by the C++ compiler during coverage builds."
     FORCE )
-SET(CMAKE_C_FLAGS_COVERAGE
+set(CMAKE_C_FLAGS_COVERAGE
     "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
     CACHE STRING "Flags used by the C compiler during coverage builds."
     FORCE )
-SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
+set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
     ""
     CACHE STRING "Flags used for linking binaries during coverage builds."
     FORCE )
-SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
+set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
     ""
     CACHE STRING "Flags used by the shared libraries linker during coverage builds."
     FORCE )
-MARK_AS_ADVANCED(
+mark_as_advanced(
     CMAKE_CXX_FLAGS_COVERAGE
     CMAKE_C_FLAGS_COVERAGE
     CMAKE_EXE_LINKER_FLAGS_COVERAGE
     CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
 
-IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage"))
-  MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
-ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
+if ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage"))
+  message( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
+endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
 
 
 # Param _targetname     The name of new the custom make target
@@ -120,23 +120,23 @@ ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
 #                       HTML report is generated in _outputname/index.html
 # Optional fourth parameter is passed as arguments to _testrunner
 #   Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
+function(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
 
-	IF(NOT LCOV_PATH)
-		MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
-	ENDIF() # NOT LCOV_PATH
+	if(NOT LCOV_PATH)
+		message(FATAL_ERROR "lcov not found! Aborting...")
+	endif() # NOT LCOV_PATH
 
-	IF(NOT GENHTML_PATH)
-		MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
-	ENDIF() # NOT GENHTML_PATH
+	if(NOT GENHTML_PATH)
+		message(FATAL_ERROR "genhtml not found! Aborting...")
+	endif() # NOT GENHTML_PATH
 
-	SET(coverage_info "${CMAKE_BINARY_DIR}/${_outputname}.info")
-	SET(coverage_cleaned "${coverage_info}.cleaned")
+	set(coverage_info "${CMAKE_BINARY_DIR}/${_outputname}.info")
+	set(coverage_cleaned "${coverage_info}.cleaned")
 
-	SEPARATE_ARGUMENTS(test_command UNIX_COMMAND "${_testrunner}")
+	separate_arguments(test_command UNIX_COMMAND "${_testrunner}")
 
 	# Setup target
-	ADD_CUSTOM_TARGET(${_targetname}
+	add_custom_target(${_targetname}
 
 		# Cleanup lcov
 		${LCOV_PATH} --directory . --zerocounters
@@ -155,29 +155,29 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
 	)
 
 	# Show info where to find the report
-	ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
+	add_custom_command(TARGET ${_targetname} POST_BUILD
 		COMMAND ;
 		COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
 	)
 
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
+endfunction() # SETUP_TARGET_FOR_COVERAGE
 
 # Param _targetname     The name of new the custom make target
 # Param _testrunner     The name of the target which runs the tests
 # Param _outputname     cobertura output is generated as _outputname.xml
 # Optional fourth parameter is passed as arguments to _testrunner
 #   Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
+function(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
 
-	IF(NOT PYTHON_EXECUTABLE)
-		MESSAGE(FATAL_ERROR "Python not found! Aborting...")
-	ENDIF() # NOT PYTHON_EXECUTABLE
+	if(NOT PYTHON_EXECUTABLE)
+		message(FATAL_ERROR "Python not found! Aborting...")
+	endif() # NOT PYTHON_EXECUTABLE
 
-	IF(NOT GCOVR_PATH)
-		MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
-	ENDIF() # NOT GCOVR_PATH
+	if(NOT GCOVR_PATH)
+		message(FATAL_ERROR "gcovr not found! Aborting...")
+	endif() # NOT GCOVR_PATH
 
-	ADD_CUSTOM_TARGET(${_targetname}
+	add_custom_target(${_targetname}
 
 		# Run tests
 		${_testrunner} ${ARGV3}
@@ -189,9 +189,9 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname
 	)
 
 	# Show info where to find the report
-	ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
+	add_custom_command(TARGET ${_targetname} POST_BUILD
 		COMMAND ;
 		COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
 	)
 
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
+endfunction() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
diff --git a/host/cmake/Modules/FindDocutils.cmake b/host/cmake/Modules/FindDocutils.cmake
index 7b103879e..0dcb616e3 100644
--- a/host/cmake/Modules/FindDocutils.cmake
+++ b/host/cmake/Modules/FindDocutils.cmake
@@ -6,6 +6,6 @@
 #
 
 ########################################################################
-FIND_PROGRAM(RST2HTML_EXECUTABLE NAMES rst2html rst2html.py)
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Docutils DEFAULT_MSG RST2HTML_EXECUTABLE)
+find_program(RST2HTML_EXECUTABLE NAMES rst2html rst2html.py)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Docutils DEFAULT_MSG RST2HTML_EXECUTABLE)
diff --git a/host/cmake/Modules/FindGPSD.cmake b/host/cmake/Modules/FindGPSD.cmake
index 3e29c7498..8e7a3ef44 100644
--- a/host/cmake/Modules/FindGPSD.cmake
+++ b/host/cmake/Modules/FindGPSD.cmake
@@ -12,40 +12,40 @@
 # also defined, but not for general use are
 #  LIBGPS_LIBRARY, where to find the GPSD library.
 
-INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(PC_GPSD "libgps")
-PKG_CHECK_MODULES(PC_GPSD_V3_11 "libgps >= 3.11")
+include(FindPkgConfig)
+pkg_check_modules(PC_GPSD "libgps")
+pkg_check_modules(PC_GPSD_V3_11 "libgps >= 3.11")
 
-IF(PC_GPSD_FOUND AND NOT PC_GPSD_V3_11_FOUND)
-    MESSAGE(WARNING "GPSD version found is too old")
-ENDIF(PC_GPSD_FOUND AND NOT PC_GPSD_V3_11_FOUND)
+if(PC_GPSD_FOUND AND NOT PC_GPSD_V3_11_FOUND)
+    message(WARNING "GPSD version found is too old")
+endif(PC_GPSD_FOUND AND NOT PC_GPSD_V3_11_FOUND)
 
-IF(PC_GPSD_V3_11_FOUND)
-  FIND_PATH(
+if(PC_GPSD_V3_11_FOUND)
+  find_path(
       LIBGPS_INCLUDE_DIR
       NAMES gps.h
       HINTS ${PC_GPSD_INCLUDE_DIR}
   )
 
-  SET(
+  set(
       LIBGPS_NAMES
       ${LIBGPS_NAMES} gps
   )
 
-  FIND_LIBRARY(
+  find_library(
       LIBGPS_LIBRARY
       NAMES ${LIBGPS_NAMES}
       HINTS ${PC_GPSD_LIBDIR}
   )
-ENDIF(PC_GPSD_V3_11_FOUND)
+endif(PC_GPSD_V3_11_FOUND)
 
 # handle the QUIETLY and REQUIRED arguments and set LIBGPS_FOUND to TRUE if
 # all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGPS DEFAULT_MSG LIBGPS_LIBRARY LIBGPS_INCLUDE_DIR)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LIBGPS DEFAULT_MSG LIBGPS_LIBRARY LIBGPS_INCLUDE_DIR)
 
-IF(LIBGPS_FOUND)
-  SET(LIBGPS_LIBRARIES ${LIBGPS_LIBRARY})
-ENDIF(LIBGPS_FOUND)
+if(LIBGPS_FOUND)
+  set(LIBGPS_LIBRARIES ${LIBGPS_LIBRARY})
+endif(LIBGPS_FOUND)
 
-MARK_AS_ADVANCED(LIBGPS_LIBRARY LIBGPS_INCLUDE_DIR)
+mark_as_advanced(LIBGPS_LIBRARY LIBGPS_INCLUDE_DIR)
diff --git a/host/cmake/Modules/FindGZip.cmake b/host/cmake/Modules/FindGZip.cmake
index 029e95a22..1178d8f5a 100644
--- a/host/cmake/Modules/FindGZip.cmake
+++ b/host/cmake/Modules/FindGZip.cmake
@@ -6,6 +6,6 @@
 #
 
 ########################################################################
-FIND_PROGRAM(GZIP_EXECUTABLE NAMES gzip)
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GZip DEFAULT_MSG GZIP_EXECUTABLE)
+find_program(GZIP_EXECUTABLE NAMES gzip)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GZip DEFAULT_MSG GZIP_EXECUTABLE)
diff --git a/host/cmake/Modules/FindLIBERIO.cmake b/host/cmake/Modules/FindLIBERIO.cmake
index 9a29e52e8..2ea777f51 100644
--- a/host/cmake/Modules/FindLIBERIO.cmake
+++ b/host/cmake/Modules/FindLIBERIO.cmake
@@ -13,22 +13,22 @@
 # also defined, but not for general use are
 #  LIBERIO_LIBRARY, where to find the liberio library.
 
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_LIBERIO QUIET liberio >= 0.3)
+find_package(PkgConfig)
+pkg_check_modules(PC_LIBERIO QUIET liberio >= 0.3)
 
-FIND_PATH(LIBERIO_INCLUDE_DIR liberio/liberio.h
+find_path(LIBERIO_INCLUDE_DIR liberio/liberio.h
 	HINTS $ENV{LIBERIO_DIR}/include ${PC_LIBERIO_INCLUDE_DIR}
 	PATH_SUFFIXES liberio
 )
 
-FIND_LIBRARY(LIBERIO_LIBRARY
+find_library(LIBERIO_LIBRARY
 	NAMES erio liberio
 	HINTS $ENV{LIBERIO_DIR}/lib ${PC_LIBERIO_LIBDIR} ${PC_LIBERIO_LIBRARY_DIRS}
 )
 
 include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBERIO DEFAULT_MSG LIBERIO_LIBRARY LIBERIO_INCLUDE_DIR)
-MARK_AS_ADVANCED(LIBERIO_INCLUDE_DIR LIBERIO_LIBRARY)
+find_package_handle_standard_args(LIBERIO DEFAULT_MSG LIBERIO_LIBRARY LIBERIO_INCLUDE_DIR)
+mark_as_advanced(LIBERIO_INCLUDE_DIR LIBERIO_LIBRARY)
 
 set(LIBERIO_LIBRARIES ${LIBERIO_LIBRARY})
 set(LIBERIO_INCLUDE_DIRS ${LIBERIO_INCLUDE_DIR})
diff --git a/host/cmake/Modules/FindUSB1.cmake b/host/cmake/Modules/FindUSB1.cmake
index 7c4a8fb6b..def3fe565 100644
--- a/host/cmake/Modules/FindUSB1.cmake
+++ b/host/cmake/Modules/FindUSB1.cmake
@@ -3,10 +3,10 @@
 #sets LIBUSB_FOUND, LIBUSB_LIBRARIES, LIBUSB_INCLUDE_DIRS
 #override LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS to manually set
 
-INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(PC_LIBUSB QUIET libusb-1.0)
+include(FindPkgConfig)
+pkg_check_modules(PC_LIBUSB QUIET libusb-1.0)
 
-FIND_PATH(LIBUSB_INCLUDE_DIRS
+find_path(LIBUSB_INCLUDE_DIRS
     NAMES libusb.h
     HINTS $ENV{LIBUSB_DIR}/include $ENV{LIBUSB_DIR}/include/libusb-1.0
     ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDEDIR}/libusb-1.0
@@ -27,7 +27,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD"
     list(APPEND libusb1_library_names usb)
 endif()
 
-FIND_LIBRARY(LIBUSB_LIBRARIES
+find_library(LIBUSB_LIBRARIES
     NAMES ${libusb1_library_names}
     HINTS $ENV{LIBUSB_DIR}/lib ${PC_LIBUSB_LIBDIR}
     PATHS /usr/local/lib /usr/lib /opt/local/lib
@@ -42,21 +42,21 @@ if(LIBUSB_LIBRARIES)
     set(CMAKE_REQUIRED_LIBRARIES ${LIBUSB_LIBRARIES})
 endif()
 
-CHECK_FUNCTION_EXISTS("libusb_handle_events_timeout_completed" HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED)
+check_function_exists("libusb_handle_events_timeout_completed" HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED)
 if(HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED)
     list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1")
 endif(HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED)
 
-CHECK_FUNCTION_EXISTS("libusb_error_name" HAVE_LIBUSB_ERROR_NAME)
+check_function_exists("libusb_error_name" HAVE_LIBUSB_ERROR_NAME)
 if(HAVE_LIBUSB_ERROR_NAME)
     list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_ERROR_NAME=1")
 endif(HAVE_LIBUSB_ERROR_NAME)
 
-CHECK_FUNCTION_EXISTS("libusb_strerror" HAVE_LIBUSB_STRERROR)
+check_function_exists("libusb_strerror" HAVE_LIBUSB_STRERROR)
 if(HAVE_LIBUSB_STRERROR)
     list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_STRERROR=1")
 endif(HAVE_LIBUSB_STRERROR)
 
 include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS)
-MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIRS LIBUSB_LIBRARIES)
+find_package_handle_standard_args(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS)
+mark_as_advanced(LIBUSB_INCLUDE_DIRS LIBUSB_LIBRARIES)
diff --git a/host/cmake/Modules/UHDBuildInfo.cmake b/host/cmake/Modules/UHDBuildInfo.cmake
index 21b1e3c1d..468635b15 100644
--- a/host/cmake/Modules/UHDBuildInfo.cmake
+++ b/host/cmake/Modules/UHDBuildInfo.cmake
@@ -8,46 +8,46 @@
 # We need this to be macro because GET_DIRECTORY_PROPERTY works with
 # the current directory.
 #
-MACRO(UHD_LOAD_BUILD_INFO)
-    MESSAGE(STATUS "")
-    MESSAGE(STATUS "Loading build info.")
+macro(UHD_LOAD_BUILD_INFO)
+    message(STATUS "")
+    message(STATUS "Loading build info.")
 
     # Build date
-    IF(IGNORE_BUILD_DATE)
-        SET(UHD_BUILD_DATE "")
-    ELSE()
-        EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
+    if(IGNORE_BUILD_DATE)
+        set(UHD_BUILD_DATE "")
+    else()
+        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
             "import time; print(time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()))"
             OUTPUT_VARIABLE UHD_BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE
         )
-    ENDIF(IGNORE_BUILD_DATE)
+    endif(IGNORE_BUILD_DATE)
 
     # Compiler name
-    IF(MSVC)
-        IF(MSVC10)
-            SET(UHD_C_COMPILER "MSVC 2010")
-            SET(UHD_CXX_COMPILER "MSVC 2010")
-        ELSEIF(MSVC11)
-            SET(UHD_C_COMPILER "MSVC 2012")
-            SET(UHD_CXX_COMPILER "MSVC 2012")
-        ELSEIF(MSVC12)
-            SET(UHD_C_COMPILER "MSVC 2013")
-            SET(UHD_CXX_COMPILER "MSVC 2013")
-        ELSEIF(MSVC14)
-            SET(UHD_C_COMPILER "MSVC 2015")
-            SET(UHD_CXX_COMPILER "MSVC 2015")
-        ELSE()
+    if(MSVC)
+        if(MSVC10)
+            set(UHD_C_COMPILER "MSVC 2010")
+            set(UHD_CXX_COMPILER "MSVC 2010")
+        elseif(MSVC11)
+            set(UHD_C_COMPILER "MSVC 2012")
+            set(UHD_CXX_COMPILER "MSVC 2012")
+        elseif(MSVC12)
+            set(UHD_C_COMPILER "MSVC 2013")
+            set(UHD_CXX_COMPILER "MSVC 2013")
+        elseif(MSVC14)
+            set(UHD_C_COMPILER "MSVC 2015")
+            set(UHD_CXX_COMPILER "MSVC 2015")
+        else()
             # Go with the ugly string
-            SET(UHD_C_COMPILER "MSVC ${CMAKE_C_COMPILER_VERSION}")
-            SET(UHD_CXX_COMPILER "MSVC ${CMAKE_CXX_COMPILER_VERSION}")
-        ENDIF(MSVC10)
-    ELSE()
-        SET(UHD_C_COMPILER "${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
-        SET(UHD_CXX_COMPILER "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
-    ENDIF(MSVC)
+            set(UHD_C_COMPILER "MSVC ${CMAKE_C_COMPILER_VERSION}")
+            set(UHD_CXX_COMPILER "MSVC ${CMAKE_CXX_COMPILER_VERSION}")
+        endif(MSVC10)
+    else()
+        set(UHD_C_COMPILER "${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
+        set(UHD_CXX_COMPILER "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
+    endif(MSVC)
 
     # Compiler flags
-    GET_DIRECTORY_PROPERTY(uhd_flags COMPILE_DEFINITIONS)
-    SET(UHD_C_FLAGS "${uhd_flags}${CMAKE_C_FLAGS}") # CMAKE_C_FLAGS starts with a space
-    SET(UHD_CXX_FLAGS "${uhd_flags}${CMAKE_CXX_FLAGS}") # CMAKE_CXX_FLAGS starts with a space
-ENDMACRO(UHD_LOAD_BUILD_INFO)
+    get_directory_property(uhd_flags COMPILE_DEFINITIONS)
+    set(UHD_C_FLAGS "${uhd_flags}${CMAKE_C_FLAGS}") # CMAKE_C_FLAGS starts with a space
+    set(UHD_CXX_FLAGS "${uhd_flags}${CMAKE_CXX_FLAGS}") # CMAKE_CXX_FLAGS starts with a space
+endmacro(UHD_LOAD_BUILD_INFO)
diff --git a/host/cmake/Modules/UHDComponent.cmake b/host/cmake/Modules/UHDComponent.cmake
index b18f651ea..b002bed32 100644
--- a/host/cmake/Modules/UHDComponent.cmake
+++ b/host/cmake/Modules/UHDComponent.cmake
@@ -6,8 +6,8 @@
 #
 
 ########################################################################
-SET(_uhd_enabled_components "" CACHE INTERNAL "" FORCE)
-SET(_uhd_disabled_components "" CACHE INTERNAL "" FORCE)
+set(_uhd_enabled_components "" CACHE INTERNAL "" FORCE)
+set(_uhd_disabled_components "" CACHE INTERNAL "" FORCE)
 
 ########################################################################
 # Register a component into the system
@@ -22,135 +22,135 @@ SET(_uhd_disabled_components "" CACHE INTERNAL "" FORCE)
 # "FOO" which is enabled by calling CMake with -DENABLE_FOO=ON. It defaults to
 # ON, unless DEPENDENCY_FOUND is false, in which case it becomes false.
 ########################################################################
-MACRO(LIBUHD_REGISTER_COMPONENT name var enb deps dis req)
-    MESSAGE(STATUS "")
-    MESSAGE(STATUS "Configuring ${name} support...")
-    FOREACH(dep ${deps})
-        MESSAGE(STATUS "  Dependency ${dep} = ${${dep}}")
-    ENDFOREACH(dep)
+macro(LIBUHD_REGISTER_COMPONENT name var enb deps dis req)
+    message(STATUS "")
+    message(STATUS "Configuring ${name} support...")
+    foreach(dep ${deps})
+        message(STATUS "  Dependency ${dep} = ${${dep}}")
+    endforeach(dep)
 
     # If user specified option, store here. Note: If the user doesn't specify
     # this option on the cmake command line, both user_enabled and
     # user_disabled will be false!
-    IF("${${var}}" STREQUAL "OFF")
-        SET(user_disabled TRUE)
-    ELSE()
-        SET(user_disabled FALSE)
-    ENDIF("${${var}}" STREQUAL "OFF")
-    IF("${${var}}" STREQUAL "ON")
-        SET(user_enabled TRUE)
-    ELSE()
-        SET(user_enabled FALSE)
-    ENDIF("${${var}}" STREQUAL "ON")
+    if("${${var}}" STREQUAL "OFF")
+        set(user_disabled TRUE)
+    else()
+        set(user_disabled FALSE)
+    endif("${${var}}" STREQUAL "OFF")
+    if("${${var}}" STREQUAL "ON")
+        set(user_enabled TRUE)
+    else()
+        set(user_enabled FALSE)
+    endif("${${var}}" STREQUAL "ON")
 
     #setup the dependent option for this component
-    INCLUDE(CMakeDependentOption)
-    CMAKE_DEPENDENT_OPTION(${var} "enable ${name} support" ${enb} "${deps}" ${dis})
+    include(CMakeDependentOption)
+    cmake_dependent_option(${var} "enable ${name} support" ${enb} "${deps}" ${dis})
 
     # There are two failure cases:
     # 1) The user requested this component explicitly (-DENABLE_FOO=ON) but the
     #    requirements are not met.
     # 2) The user did not explicitly turn off this component (-DENABLE_FOO=OFF)
     #    but it is flagged as required by ${req}
-    IF(NOT ${var} AND user_enabled) # Case 1)
-        MESSAGE(FATAL_ERROR "Dependencies for required component ${name} not met.")
-    ENDIF(NOT ${var} AND user_enabled)
-    IF(NOT ${var} AND ${req} AND NOT user_disabled) # Case 2)
-        MESSAGE(FATAL_ERROR "Dependencies for required component ${name} not met.")
-    ENDIF(NOT ${var} AND ${req} AND NOT user_disabled)
+    if(NOT ${var} AND user_enabled) # Case 1)
+        message(FATAL_ERROR "Dependencies for required component ${name} not met.")
+    endif(NOT ${var} AND user_enabled)
+    if(NOT ${var} AND ${req} AND NOT user_disabled) # Case 2)
+        message(FATAL_ERROR "Dependencies for required component ${name} not met.")
+    endif(NOT ${var} AND ${req} AND NOT user_disabled)
 
     #append the component into one of the lists
-    IF(${var})
-        MESSAGE(STATUS "  Enabling ${name} support.")
-        LIST(APPEND _uhd_enabled_components ${name})
-    ELSE(${var})
-        MESSAGE(STATUS "  Disabling ${name} support.")
-        LIST(APPEND _uhd_disabled_components ${name})
-    ENDIF(${var})
-    MESSAGE(STATUS "  Override with -D${var}=ON/OFF")
+    if(${var})
+        message(STATUS "  Enabling ${name} support.")
+        list(APPEND _uhd_enabled_components ${name})
+    else(${var})
+        message(STATUS "  Disabling ${name} support.")
+        list(APPEND _uhd_disabled_components ${name})
+    endif(${var})
+    message(STATUS "  Override with -D${var}=ON/OFF")
 
     #make components lists into global variables
-    SET(_uhd_enabled_components ${_uhd_enabled_components} CACHE INTERNAL "" FORCE)
-    SET(_uhd_disabled_components ${_uhd_disabled_components} CACHE INTERNAL "" FORCE)
-ENDMACRO(LIBUHD_REGISTER_COMPONENT)
+    set(_uhd_enabled_components ${_uhd_enabled_components} CACHE INTERNAL "" FORCE)
+    set(_uhd_disabled_components ${_uhd_disabled_components} CACHE INTERNAL "" FORCE)
+endmacro(LIBUHD_REGISTER_COMPONENT)
 
 ########################################################################
 # Install only if appropriate for package and if component is enabled
 ########################################################################
-FUNCTION(UHD_INSTALL)
+function(UHD_INSTALL)
     include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(UHD_INSTALL "" "DESTINATION;COMPONENT" "TARGETS;FILES;PROGRAMS" ${ARGN})
+    cmake_parse_arguments(UHD_INSTALL "" "DESTINATION;COMPONENT" "TARGETS;FILES;PROGRAMS" ${ARGN})
 
-    IF(UHD_INSTALL_FILES)
-        SET(TO_INSTALL "${UHD_INSTALL_FILES}")
-    ELSEIF(UHD_INSTALL_PROGRAMS)
-        SET(TO_INSTALL "${UHD_INSTALL_PROGRAMS}")
-    ELSEIF(UHD_INSTALL_TARGETS)
-        SET(TO_INSTALL "${UHD_INSTALL_TARGETS}")
-    ENDIF(UHD_INSTALL_FILES)
+    if(UHD_INSTALL_FILES)
+        set(TO_INSTALL "${UHD_INSTALL_FILES}")
+    elseif(UHD_INSTALL_PROGRAMS)
+        set(TO_INSTALL "${UHD_INSTALL_PROGRAMS}")
+    elseif(UHD_INSTALL_TARGETS)
+        set(TO_INSTALL "${UHD_INSTALL_TARGETS}")
+    endif(UHD_INSTALL_FILES)
 
-    IF(UHD_INSTALL_COMPONENT STREQUAL "headers")
-        IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "devel")
-        IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "examples")
-        IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "tests")
-        IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "utilities")
-        IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "manual")
-        IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "doxygen")
-        IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "manpages")
-        IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "images")
-        IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
-    ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "readme")
-        IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
-            INSTALL(${ARGN})
-        ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
-    ENDIF(UHD_INSTALL_COMPONENT STREQUAL "headers")
-ENDFUNCTION(UHD_INSTALL)
+    if(UHD_INSTALL_COMPONENT STREQUAL "headers")
+        if(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "devel")
+        if(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "examples")
+        if(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "tests")
+        if(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "utilities")
+        if(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "manual")
+        if(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "doxygen")
+        if(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "manpages")
+        if(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "images")
+        if(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
+    elseif(UHD_INSTALL_COMPONENT STREQUAL "readme")
+        if(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
+            install(${ARGN})
+        endif(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
+    endif(UHD_INSTALL_COMPONENT STREQUAL "headers")
+endfunction(UHD_INSTALL)
 
 ########################################################################
 # Print the registered component summary
 ########################################################################
-FUNCTION(UHD_PRINT_COMPONENT_SUMMARY)
-    MESSAGE(STATUS "")
-    MESSAGE(STATUS "######################################################")
-    MESSAGE(STATUS "# UHD enabled components                              ")
-    MESSAGE(STATUS "######################################################")
-    FOREACH(comp ${_uhd_enabled_components})
-        MESSAGE(STATUS "  * ${comp}")
-    ENDFOREACH(comp)
+function(UHD_PRINT_COMPONENT_SUMMARY)
+    message(STATUS "")
+    message(STATUS "######################################################")
+    message(STATUS "# UHD enabled components                              ")
+    message(STATUS "######################################################")
+    foreach(comp ${_uhd_enabled_components})
+        message(STATUS "  * ${comp}")
+    endforeach(comp)
 
-    MESSAGE(STATUS "")
-    MESSAGE(STATUS "######################################################")
-    MESSAGE(STATUS "# UHD disabled components                             ")
-    MESSAGE(STATUS "######################################################")
-    FOREACH(comp ${_uhd_disabled_components})
-        MESSAGE(STATUS "  * ${comp}")
-    ENDFOREACH(comp)
+    message(STATUS "")
+    message(STATUS "######################################################")
+    message(STATUS "# UHD disabled components                             ")
+    message(STATUS "######################################################")
+    foreach(comp ${_uhd_disabled_components})
+        message(STATUS "  * ${comp}")
+    endforeach(comp)
 
-    MESSAGE(STATUS "")
-ENDFUNCTION(UHD_PRINT_COMPONENT_SUMMARY)
+    message(STATUS "")
+endfunction(UHD_PRINT_COMPONENT_SUMMARY)
diff --git a/host/cmake/Modules/UHDGlobalDefs.cmake b/host/cmake/Modules/UHDGlobalDefs.cmake
index d21519479..98a2d5f17 100644
--- a/host/cmake/Modules/UHDGlobalDefs.cmake
+++ b/host/cmake/Modules/UHDGlobalDefs.cmake
@@ -7,22 +7,22 @@
 
 # This file sets up all the stuff for the config.h file
 
-INCLUDE(CheckCXXSymbolExistsCopy)
+include(CheckCXXSymbolExistsCopy)
 
 ## Check for std::log2
-CHECK_CXX_SYMBOL_EXISTS(log2 cmath HAVE_LOG2)
+check_cxx_symbol_exists(log2 cmath HAVE_LOG2)
 
 ## Macros for the version number
-IF(UHD_VERSION_DEVEL)
-    MATH(EXPR UHD_VERSION_ADDED "1000000 * ${UHD_VERSION_MAJOR} + 10000 * ${UHD_VERSION_API} + 100 * ${UHD_VERSION_ABI} + 99")
-ELSE()
-    MATH(EXPR UHD_VERSION_ADDED "1000000 * ${UHD_VERSION_MAJOR} + 10000 * ${UHD_VERSION_API} + 100 * ${UHD_VERSION_ABI} + ${UHD_VERSION_PATCH}")
-ENDIF(UHD_VERSION_DEVEL)
+if(UHD_VERSION_DEVEL)
+    math(EXPR UHD_VERSION_ADDED "1000000 * ${UHD_VERSION_MAJOR} + 10000 * ${UHD_VERSION_API} + 100 * ${UHD_VERSION_ABI} + 99")
+else()
+    math(EXPR UHD_VERSION_ADDED "1000000 * ${UHD_VERSION_MAJOR} + 10000 * ${UHD_VERSION_API} + 100 * ${UHD_VERSION_ABI} + ${UHD_VERSION_PATCH}")
+endif(UHD_VERSION_DEVEL)
 
 ## RFNoC
-IF(ENABLE_RFNOC)
-    ADD_DEFINITIONS(-DUHD_RFNOC_ENABLED)
-ENDIF(ENABLE_RFNOC)
+if(ENABLE_RFNOC)
+    add_definitions(-DUHD_RFNOC_ENABLED)
+endif(ENABLE_RFNOC)
 
 ## make sure the code knows about config.h
-ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+add_definitions(-DHAVE_CONFIG_H)
diff --git a/host/cmake/Modules/UHDLog.cmake b/host/cmake/Modules/UHDLog.cmake
index 4bc1daf13..6dc1f430c 100644
--- a/host/cmake/Modules/UHDLog.cmake
+++ b/host/cmake/Modules/UHDLog.cmake
@@ -1,72 +1,72 @@
 ########################################################################
 # Logging Variables
 ########################################################################
-IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
-    SET(UHD_LOG_MIN_LEVEL "debug" CACHE STRING "Set UHD log level to {trace, debug, info, warning, error, fatal}")
-    SET(UHD_LOG_CONSOLE_DISABLE "OFF" CACHE BOOL "Disable UHD logging to stderr")
-    SET(UHD_LOG_FILE_LEVEL "trace" CACHE STRING "SET UHD file logging level to {trace, debug, info, warning, error, fatal}")
-    SET(UHD_LOG_CONSOLE_LEVEL "debug" CACHE STRING "SET UHD file logging level to {trace, debug, info, warning, error, fatal}")
-ELSE()
-    SET(UHD_LOG_MIN_LEVEL "debug" CACHE STRING "Set UHD log level to {trace, debug, info, warning, error, fatal}")
-    SET(UHD_LOG_CONSOLE_DISABLE "OFF" CACHE BOOL "Disable UHD logging to stderr")
-    SET(UHD_LOG_FILE_LEVEL "info" CACHE STRING "SET UHD file logging level to {trace, debug, info, warning, error, fatal}")
-    SET(UHD_LOG_CONSOLE_LEVEL "info" CACHE STRING "SET UHD file logging level to {trace, debug, info, warning, error, fatal}")
-ENDIF()
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+    set(UHD_LOG_MIN_LEVEL "debug" CACHE STRING "Set UHD log level to {trace, debug, info, warning, error, fatal}")
+    set(UHD_LOG_CONSOLE_DISABLE "OFF" CACHE BOOL "Disable UHD logging to stderr")
+    set(UHD_LOG_FILE_LEVEL "trace" CACHE STRING "SET UHD file logging level to {trace, debug, info, warning, error, fatal}")
+    set(UHD_LOG_CONSOLE_LEVEL "debug" CACHE STRING "SET UHD file logging level to {trace, debug, info, warning, error, fatal}")
+else()
+    set(UHD_LOG_MIN_LEVEL "debug" CACHE STRING "Set UHD log level to {trace, debug, info, warning, error, fatal}")
+    set(UHD_LOG_CONSOLE_DISABLE "OFF" CACHE BOOL "Disable UHD logging to stderr")
+    set(UHD_LOG_FILE_LEVEL "info" CACHE STRING "SET UHD file logging level to {trace, debug, info, warning, error, fatal}")
+    set(UHD_LOG_CONSOLE_LEVEL "info" CACHE STRING "SET UHD file logging level to {trace, debug, info, warning, error, fatal}")
+endif()
 
-FUNCTION(UHD_LOG_LEVEL_CONVERT ARG1 ARG2)
+function(UHD_LOG_LEVEL_CONVERT ARG1 ARG2)
     string(TOLOWER "${ARG1}" LOG_LEVEL_LOWER)
-    IF(LOG_LEVEL_LOWER STREQUAL "trace")
-        ADD_DEFINITIONS(-D${ARG2}=0)
-    ELSEIF(LOG_LEVEL_LOWER STREQUAL "debug")
-        ADD_DEFINITIONS(-D${ARG2}=1)
-    ELSEIF(LOG_LEVEL_LOWER STREQUAL "info")
-        ADD_DEFINITIONS(-D${ARG2}=2)
-    ELSEIF(LOG_LEVEL_LOWER STREQUAL "warning")
-        ADD_DEFINITIONS(-D${ARG2}=3)
-    ELSEIF(LOG_LEVEL_LOWER STREQUAL "error")
-        ADD_DEFINITIONS(-D${ARG2}=4)
-    ELSEIF(LOG_LEVEL_LOWER STREQUAL "fatal")
-        ADD_DEFINITIONS(-D${ARG2}=5)
-    ELSE()
-        ADD_DEFINITIONS(-D${ARG2}=${ARG1})
-    ENDIF()
-ENDFUNCTION()
+    if(LOG_LEVEL_LOWER STREQUAL "trace")
+        add_definitions(-D${ARG2}=0)
+    elseif(LOG_LEVEL_LOWER STREQUAL "debug")
+        add_definitions(-D${ARG2}=1)
+    elseif(LOG_LEVEL_LOWER STREQUAL "info")
+        add_definitions(-D${ARG2}=2)
+    elseif(LOG_LEVEL_LOWER STREQUAL "warning")
+        add_definitions(-D${ARG2}=3)
+    elseif(LOG_LEVEL_LOWER STREQUAL "error")
+        add_definitions(-D${ARG2}=4)
+    elseif(LOG_LEVEL_LOWER STREQUAL "fatal")
+        add_definitions(-D${ARG2}=5)
+    else()
+        add_definitions(-D${ARG2}=${ARG1})
+    endif()
+endfunction()
 
-UHD_LOG_LEVEL_CONVERT(${UHD_LOG_MIN_LEVEL} "UHD_LOG_MIN_LEVEL")
-UHD_LOG_LEVEL_CONVERT(${UHD_LOG_CONSOLE_LEVEL} "UHD_LOG_CONSOLE_LEVEL")
-UHD_LOG_LEVEL_CONVERT(${UHD_LOG_FILE_LEVEL} "UHD_LOG_FILE_LEVEL")
+uhd_log_level_convert(${UHD_LOG_MIN_LEVEL} "UHD_LOG_MIN_LEVEL")
+uhd_log_level_convert(${UHD_LOG_CONSOLE_LEVEL} "UHD_LOG_CONSOLE_LEVEL")
+uhd_log_level_convert(${UHD_LOG_FILE_LEVEL} "UHD_LOG_FILE_LEVEL")
 
-IF(UHD_LOG_CONSOLE_DISABLE)
-    ADD_DEFINITIONS(-DUHD_LOG_CONSOLE_DISABLE)
-ELSE()
-    IF(UHD_LOG_CONSOLE_TIME)
-        ADD_DEFINITIONS(-DUHD_LOG_CONSOLE_TIME)
-    ENDIF()
-    IF(UHD_LOG_CONSOLE_THREAD)
-        ADD_DEFINITIONS(-DUHD_LOG_CONSOLE_THREAD)
-    ENDIF()
-    IF(UHD_LOG_CONSOLE_SRC)
-        ADD_DEFINITIONS(-DUHD_LOG_CONSOLE_SRC)
-    ENDIF()
-ENDIF()
+if(UHD_LOG_CONSOLE_DISABLE)
+    add_definitions(-DUHD_LOG_CONSOLE_DISABLE)
+else()
+    if(UHD_LOG_CONSOLE_TIME)
+        add_definitions(-DUHD_LOG_CONSOLE_TIME)
+    endif()
+    if(UHD_LOG_CONSOLE_THREAD)
+        add_definitions(-DUHD_LOG_CONSOLE_THREAD)
+    endif()
+    if(UHD_LOG_CONSOLE_SRC)
+        add_definitions(-DUHD_LOG_CONSOLE_SRC)
+    endif()
+endif()
 
-SET(UHD_LOG_FASTPATH_DISABLE "OFF" CACHE BOOL "Disable printing of fastpath logging symbols to stderr (DOSU)")
-IF(UHD_LOG_FASTPATH_DISABLE)
-    ADD_DEFINITIONS(-DUHD_LOG_FASTPATH_DISABLE)
-ENDIF()
+set(UHD_LOG_FASTPATH_DISABLE "OFF" CACHE BOOL "Disable printing of fastpath logging symbols to stderr (DOSU)")
+if(UHD_LOG_FASTPATH_DISABLE)
+    add_definitions(-DUHD_LOG_FASTPATH_DISABLE)
+endif()
 
-IF(MSVC OR CYGWIN)
-    SET(UHD_LOG_CONSOLE_COLOR "OFF" CACHE BOOL "Enable color output on the terminal")
-ELSE()
-    SET(UHD_LOG_CONSOLE_COLOR "ON" CACHE BOOL "Enable color output on the terminal")
-ENDIF()
+if(MSVC OR CYGWIN)
+    set(UHD_LOG_CONSOLE_COLOR "OFF" CACHE BOOL "Enable color output on the terminal")
+else()
+    set(UHD_LOG_CONSOLE_COLOR "ON" CACHE BOOL "Enable color output on the terminal")
+endif()
 
-IF(UHD_LOG_CONSOLE_COLOR)
-    ADD_DEFINITIONS(-DUHD_LOG_CONSOLE_COLOR)
-ENDIF()
+if(UHD_LOG_CONSOLE_COLOR)
+    add_definitions(-DUHD_LOG_CONSOLE_COLOR)
+endif()
 
-SET(UHD_LOG_FILE "" CACHE FILE "Set UHD log file to a file in a existing directory")
-IF(NOT UHD_LOG_FILE STREQUAL "")
-    ADD_DEFINITIONS(-DUHD_LOG_FILE=${UHD_LOG_FILE})
-ENDIF()
+set(UHD_LOG_FILE "" CACHE FILE "Set UHD log file to a file in a existing directory")
+if(NOT UHD_LOG_FILE STREQUAL "")
+    add_definitions(-DUHD_LOG_FILE=${UHD_LOG_FILE})
+endif()
 
diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake
index 8bd31910f..2258907af 100644
--- a/host/cmake/Modules/UHDPackage.cmake
+++ b/host/cmake/Modules/UHDPackage.cmake
@@ -6,167 +6,167 @@
 #
 
 ########################################################################
-INCLUDE(UHDVersion) #sets version information
+include(UHDVersion) #sets version information
 
-SET(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE BOOL "set UHD to release mode to build installers")
+set(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE BOOL "set UHD to release mode to build installers")
 
 ########################################################################
 # Setup additional defines for OS types
 ########################################################################
-IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    SET(LINUX TRUE)
-ENDIF()
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    set(LINUX TRUE)
+endif()
 
-IF(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/debian_version")
-    SET(DEBIAN TRUE)
-ENDIF()
+if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/debian_version")
+    set(DEBIAN TRUE)
+endif()
 
-IF(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/redhat-release")
-    SET(REDHAT TRUE)
-ENDIF()
+if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/redhat-release")
+    set(REDHAT TRUE)
+endif()
 
 ########################################################################
 # Set generator type for recognized systems
 ########################################################################
-IF(CPACK_GENERATOR)
+if(CPACK_GENERATOR)
     #already set
-ELSEIF(APPLE)
-    SET(CPACK_GENERATOR PackageMaker)
-ELSEIF(WIN32)
-    SET(CPACK_GENERATOR NSIS)
-ELSEIF(DEBIAN)
-    SET(CPACK_GENERATOR DEB)
-ELSEIF(REDHAT)
-    SET(CPACK_GENERATOR RPM)
-ELSE()
-    SET(CPACK_GENERATOR TGZ)
-ENDIF()
+elseif(APPLE)
+    set(CPACK_GENERATOR PackageMaker)
+elseif(WIN32)
+    set(CPACK_GENERATOR NSIS)
+elseif(DEBIAN)
+    set(CPACK_GENERATOR DEB)
+elseif(REDHAT)
+    set(CPACK_GENERATOR RPM)
+else()
+    set(CPACK_GENERATOR TGZ)
+endif()
 
 ########################################################################
 # Setup package file name
 ########################################################################
-IF(DEBIAN AND LIBUHD_PKG)
-    SET(CPACK_PACKAGE_FILE_NAME "libuhd${UHD_VERSION_MAJOR}_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
-ELSEIF(DEBIAN AND LIBUHDDEV_PKG)
-    SET(CPACK_PACKAGE_FILE_NAME "libuhd-dev_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
-ELSEIF(DEBIAN AND UHDHOST_PKG)
-    SET(CPACK_PACKAGE_FILE_NAME "uhd-host_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
-ELSE()
-    IF(DEBIAN OR REDHAT)
-        FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release)
-
-        IF(LSB_RELEASE_EXECUTABLE)
+if(DEBIAN AND LIBUHD_PKG)
+    set(CPACK_PACKAGE_FILE_NAME "libuhd${UHD_VERSION_MAJOR}_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
+elseif(DEBIAN AND LIBUHDDEV_PKG)
+    set(CPACK_PACKAGE_FILE_NAME "libuhd-dev_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
+elseif(DEBIAN AND UHDHOST_PKG)
+    set(CPACK_PACKAGE_FILE_NAME "uhd-host_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
+else()
+    if(DEBIAN OR REDHAT)
+        find_program(LSB_RELEASE_EXECUTABLE lsb_release)
+
+        if(LSB_RELEASE_EXECUTABLE)
             #extract system information by executing the commands
-            EXECUTE_PROCESS(
+            execute_process(
                 COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id
                 OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE
             )
-            EXECUTE_PROCESS(
+            execute_process(
                 COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release
                 OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE
             )
 
             #set a more sensible package name for this system
-            SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
-        ENDIF(LSB_RELEASE_EXECUTABLE)
-    ENDIF(DEBIAN OR REDHAT)
-ENDIF(DEBIAN AND LIBUHD_PKG)
+            set(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "")
+        endif(LSB_RELEASE_EXECUTABLE)
+    endif(DEBIAN OR REDHAT)
+endif(DEBIAN AND LIBUHD_PKG)
 
-IF(${CPACK_GENERATOR} STREQUAL NSIS)
+if(${CPACK_GENERATOR} STREQUAL NSIS)
 
-    ENABLE_LANGUAGE(C)
+    enable_language(C)
 
     include(CheckTypeSize)
     check_type_size("void*[8]" BIT_WIDTH BUILTIN_TYPES_ONLY)
     # If CMake option given, specify MSVC version in installer filename
-    IF(SPECIFY_MSVC_VERSION)
-        IF(MSVC90) # Visual Studio 2008 (9.0)
-            SET(MSVC_VERSION "VS2008")
-        ELSEIF(MSVC10) # Visual Studio 2010 (10.0)
-            SET(MSVC_VERSION "VS2010")
-        ELSEIF(MSVC11) # Visual Studio 2012 (11.0)
-            SET(MSVC_VERSION "VS2012")
-        ELSEIF(MSVC12) # Visual Studio 2013 (12.0)
-            SET(MSVC_VERSION "VS2013")
-        ELSEIF(MSVC14) # Visual Studio 2015 (14.0)
-            SET(MSVC_VERSION "VS2015")
-        ENDIF()
-        SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_Win${BIT_WIDTH}_${MSVC_VERSION}" CACHE INTERNAL "")
-    ELSE()
-        SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_Win${BIT_WIDTH}" CACHE INTERNAL "")
-    ENDIF(SPECIFY_MSVC_VERSION)
-
-    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}")
-ENDIF()
+    if(SPECIFY_MSVC_VERSION)
+        if(MSVC90) # Visual Studio 2008 (9.0)
+            set(MSVC_VERSION "VS2008")
+        elseif(MSVC10) # Visual Studio 2010 (10.0)
+            set(MSVC_VERSION "VS2010")
+        elseif(MSVC11) # Visual Studio 2012 (11.0)
+            set(MSVC_VERSION "VS2012")
+        elseif(MSVC12) # Visual Studio 2013 (12.0)
+            set(MSVC_VERSION "VS2013")
+        elseif(MSVC14) # Visual Studio 2015 (14.0)
+            set(MSVC_VERSION "VS2015")
+        endif()
+        set(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_Win${BIT_WIDTH}_${MSVC_VERSION}" CACHE INTERNAL "")
+    else()
+        set(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_Win${BIT_WIDTH}" CACHE INTERNAL "")
+    endif(SPECIFY_MSVC_VERSION)
+
+    set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}")
+endif()
 
 ########################################################################
 # Setup CPack General
 ########################################################################
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - USRP Hardware Driver")
-SET(CPACK_PACKAGE_VENDOR              "Ettus Research (National Instruments)")
-SET(CPACK_PACKAGE_CONTACT             "Ettus Research <support@ettus.com>")
-SET(CPACK_PACKAGE_VERSION "${UHD_VERSION}")
-SET(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.md)
-SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE)
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - USRP Hardware Driver")
+set(CPACK_PACKAGE_VENDOR              "Ettus Research (National Instruments)")
+set(CPACK_PACKAGE_CONTACT             "Ettus Research <support@ettus.com>")
+set(CPACK_PACKAGE_VERSION "${UHD_VERSION}")
+set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.md)
+set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE)
 
 ########################################################################
 # Setup CPack Source
 ########################################################################
 
-SET(CPACK_SOURCE_PACKAGE_FILE_NAME "uhd-${UHD_VERSION}" CACHE INTERNAL "")
-SET(CPACK_SOURCE_IGNORE_FILES "\\\\.git*;\\\\.swp$")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME "uhd-${UHD_VERSION}" CACHE INTERNAL "")
+set(CPACK_SOURCE_IGNORE_FILES "\\\\.git*;\\\\.swp$")
 
 ########################################################################
 # Setup CPack Components
 ########################################################################
-SET(CPACK_COMPONENT_LIBRARIES_GROUP      "Development")
-SET(CPACK_COMPONENT_HEADERS_GROUP        "Development")
-SET(CPACK_COMPONENT_UTILITIES_GROUP      "Runtime")
-SET(CPACK_COMPONENT_EXAMPLES_GROUP       "Runtime")
-SET(CPACK_COMPONENT_MANUAL_GROUP         "Documentation")
-SET(CPACK_COMPONENT_DOXYGEN_GROUP        "Documentation")
-SET(CPACK_COMPONENT_README_GROUP         "Documentation")
-
-SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME      "Libraries")
-SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME        "C++ Headers")
-SET(CPACK_COMPONENT_UTILITIES_DISPLAY_NAME      "Utilities")
-SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME       "Examples")
-SET(CPACK_COMPONENT_MANUAL_DISPLAY_NAME         "Manual")
-SET(CPACK_COMPONENT_DOXYGEN_DISPLAY_NAME        "Doxygen")
-SET(CPACK_COMPONENT_README_DISPLAY_NAME         "Readme")
-SET(CPACK_COMPONENT_IMAGES_DISPLAY_NAME         "Images")
-
-SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION     "Dynamic link library")
-SET(CPACK_COMPONENT_HEADERS_DESCRIPTION       "C++ development headers")
-SET(CPACK_COMPONENT_UTILITIES_DESCRIPTION     "Utility executables and python scripts")
-SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION      "Example executables")
-SET(CPACK_COMPONENT_MANUAL_DESCRIPTION        "Manual/application notes (rst and html)")
-SET(CPACK_COMPONENT_DOXYGEN_DESCRIPTION       "API documentation (html)")
-SET(CPACK_COMPONENT_README_DESCRIPTION        "Readme files (txt)")
-SET(CPACK_COMPONENT_IMAGES_DESCRIPTION        "FPGA and firmware images")
-
-SET(CPACK_COMPONENT_README_REQUIRED TRUE)
-
-SET(CPACK_COMPONENT_UTILITIES_DEPENDS libraries)
-SET(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries)
-SET(CPACK_COMPONENT_TESTS_DEPENDS libraries)
-
-SET(CPACK_COMPONENTS_ALL libraries headers utilities examples manual doxygen readme images)
+set(CPACK_COMPONENT_LIBRARIES_GROUP      "Development")
+set(CPACK_COMPONENT_HEADERS_GROUP        "Development")
+set(CPACK_COMPONENT_UTILITIES_GROUP      "Runtime")
+set(CPACK_COMPONENT_EXAMPLES_GROUP       "Runtime")
+set(CPACK_COMPONENT_MANUAL_GROUP         "Documentation")
+set(CPACK_COMPONENT_DOXYGEN_GROUP        "Documentation")
+set(CPACK_COMPONENT_README_GROUP         "Documentation")
+
+set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME      "Libraries")
+set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME        "C++ Headers")
+set(CPACK_COMPONENT_UTILITIES_DISPLAY_NAME      "Utilities")
+set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME       "Examples")
+set(CPACK_COMPONENT_MANUAL_DISPLAY_NAME         "Manual")
+set(CPACK_COMPONENT_DOXYGEN_DISPLAY_NAME        "Doxygen")
+set(CPACK_COMPONENT_README_DISPLAY_NAME         "Readme")
+set(CPACK_COMPONENT_IMAGES_DISPLAY_NAME         "Images")
+
+set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION     "Dynamic link library")
+set(CPACK_COMPONENT_HEADERS_DESCRIPTION       "C++ development headers")
+set(CPACK_COMPONENT_UTILITIES_DESCRIPTION     "Utility executables and python scripts")
+set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION      "Example executables")
+set(CPACK_COMPONENT_MANUAL_DESCRIPTION        "Manual/application notes (rst and html)")
+set(CPACK_COMPONENT_DOXYGEN_DESCRIPTION       "API documentation (html)")
+set(CPACK_COMPONENT_README_DESCRIPTION        "Readme files (txt)")
+set(CPACK_COMPONENT_IMAGES_DESCRIPTION        "FPGA and firmware images")
+
+set(CPACK_COMPONENT_README_REQUIRED TRUE)
+
+set(CPACK_COMPONENT_UTILITIES_DEPENDS libraries)
+set(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries)
+set(CPACK_COMPONENT_TESTS_DEPENDS libraries)
+
+set(CPACK_COMPONENTS_ALL libraries headers utilities examples manual doxygen readme images)
 
 ########################################################################
 # Setup CPack Debian
 ########################################################################
-SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-all-dev, python-requests")
-SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk")
-FOREACH(filename preinst postinst prerm postrm)
-    LIST(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_BINARY_DIR}/debian/${filename})
-    FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/debian)
-    CONFIGURE_FILE(
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-all-dev, python-requests")
+set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk")
+foreach(filename preinst postinst prerm postrm)
+    list(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_BINARY_DIR}/debian/${filename})
+    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/debian)
+    configure_file(
         ${CMAKE_SOURCE_DIR}/cmake/debian/${filename}.in
         ${CMAKE_BINARY_DIR}/debian/${filename}
     @ONLY)
-ENDFOREACH(filename)
-CONFIGURE_FILE(
+endforeach(filename)
+configure_file(
     ${CMAKE_SOURCE_DIR}/cmake/debian/watch
     ${CMAKE_BINARY_DIR}/debian/watch
 @ONLY)
@@ -174,37 +174,37 @@ CONFIGURE_FILE(
 ########################################################################
 # Setup CPack RPM
 ########################################################################
-SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel, python-requests")
+set(CPACK_RPM_PACKAGE_REQUIRES "boost-devel, python-requests")
 
-FOREACH(filename post_install post_uninstall pre_install pre_uninstall)
-    STRING(TOUPPER ${filename} filename_upper)
-    LIST(APPEND CPACK_RPM_${filename_upper}_SCRIPT_FILE ${CMAKE_BINARY_DIR}/redhat/${filename})
-    FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/redhat)
-    CONFIGURE_FILE(
+foreach(filename post_install post_uninstall pre_install pre_uninstall)
+    string(TOUPPER ${filename} filename_upper)
+    list(APPEND CPACK_RPM_${filename_upper}_SCRIPT_FILE ${CMAKE_BINARY_DIR}/redhat/${filename})
+    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/redhat)
+    configure_file(
         ${CMAKE_SOURCE_DIR}/cmake/redhat/${filename}.in
         ${CMAKE_BINARY_DIR}/redhat/${filename}
     @ONLY)
-ENDFOREACH(filename)
+endforeach(filename)
 
 ########################################################################
 # Setup CPack NSIS
 ########################################################################
-SET(CPACK_NSIS_MODIFY_PATH ON)
+set(CPACK_NSIS_MODIFY_PATH ON)
 
-SET(HLKM_ENV "\\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"")
+set(HLKM_ENV "\\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"")
 
-SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
+set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
     WriteRegStr HKLM ${HLKM_ENV} \\\"UHD_PKG_PATH\\\" \\\"$INSTDIR\\\"
 ")
 
-SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
+set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
     DeleteRegValue HKLM ${HLKM_ENV} \\\"UHD_PKG_PATH\\\"
 ")
 
-IF(WIN32)
+if(WIN32)
     #Install necessary runtime DLL's
-    INCLUDE(InstallRequiredSystemLibraries)
-ENDIF(WIN32)
+    include(InstallRequiredSystemLibraries)
+endif(WIN32)
 
 ########################################################################
-INCLUDE(CPack) #include after setting vars
+include(CPack) #include after setting vars
diff --git a/host/cmake/Modules/UHDPython.cmake b/host/cmake/Modules/UHDPython.cmake
index f63f47f03..15a57ae7e 100644
--- a/host/cmake/Modules/UHDPython.cmake
+++ b/host/cmake/Modules/UHDPython.cmake
@@ -5,49 +5,49 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
 #
 
-IF(NOT DEFINED INCLUDED_UHD_PYTHON_CMAKE)
-SET(INCLUDED_UHD_PYTHON_CMAKE TRUE)
+if(NOT DEFINED INCLUDED_UHD_PYTHON_CMAKE)
+set(INCLUDED_UHD_PYTHON_CMAKE TRUE)
 
 ########################################################################
 # Setup Python
 ########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Configuring the python interpreter...")
+message(STATUS "")
+message(STATUS "Configuring the python interpreter...")
 #this allows the user to override PYTHON_EXECUTABLE
-IF(PYTHON_EXECUTABLE)
+if(PYTHON_EXECUTABLE)
 
-    SET(PYTHONINTERP_FOUND TRUE)
+    set(PYTHONINTERP_FOUND TRUE)
 
 #otherwise if not set, try to automatically find it
-ELSE(PYTHON_EXECUTABLE)
+else(PYTHON_EXECUTABLE)
 
     #use the built-in find script
-    FIND_PACKAGE(PythonInterp)
+    find_package(PythonInterp)
 
     #and if that fails use the find program routine
-    IF(NOT PYTHONINTERP_FOUND)
-        FIND_PROGRAM(PYTHON_EXECUTABLE NAMES python python2.7 python2.6)
-        IF(PYTHON_EXECUTABLE)
-            SET(PYTHONINTERP_FOUND TRUE)
-        ENDIF(PYTHON_EXECUTABLE)
-    ENDIF(NOT PYTHONINTERP_FOUND)
+    if(NOT PYTHONINTERP_FOUND)
+        find_program(PYTHON_EXECUTABLE NAMES python python2.7 python2.6)
+        if(PYTHON_EXECUTABLE)
+            set(PYTHONINTERP_FOUND TRUE)
+        endif(PYTHON_EXECUTABLE)
+    endif(NOT PYTHONINTERP_FOUND)
 
-ENDIF(PYTHON_EXECUTABLE)
+endif(PYTHON_EXECUTABLE)
 
 #make the path to the executable appear in the cmake gui
-SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
+set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
 
-MESSAGE(STATUS "Python interpreter: ${PYTHON_EXECUTABLE}")
-MESSAGE(STATUS "Override with: -DPYTHON_EXECUTABLE=<path-to-python>")
+message(STATUS "Python interpreter: ${PYTHON_EXECUTABLE}")
+message(STATUS "Override with: -DPYTHON_EXECUTABLE=<path-to-python>")
 
-IF(NOT PYTHONINTERP_FOUND)
-    MESSAGE(FATAL_ERROR "Error: Python interpreter required by the build system.")
-ENDIF(NOT PYTHONINTERP_FOUND)
+if(NOT PYTHONINTERP_FOUND)
+    message(FATAL_ERROR "Error: Python interpreter required by the build system.")
+endif(NOT PYTHONINTERP_FOUND)
 
-MACRO(PYTHON_CHECK_MODULE desc mod cmd have)
-    MESSAGE(STATUS "")
-    MESSAGE(STATUS "Python checking for ${desc}")
-    EXECUTE_PROCESS(
+macro(PYTHON_CHECK_MODULE desc mod cmd have)
+    message(STATUS "")
+    message(STATUS "Python checking for ${desc}")
+    execute_process(
         COMMAND ${PYTHON_EXECUTABLE} -c "
 #########################################
 try: import ${mod}
@@ -58,19 +58,19 @@ exit(0)
 #########################################"
         RESULT_VARIABLE ${have}
     )
-    IF(${have} EQUAL 0)
-        MESSAGE(STATUS "Python checking for ${desc} - found")
-        SET(${have} TRUE)
-    ELSEIF(${have} EQUAL 1)
-        MESSAGE(STATUS "Python checking for ${desc} - \"import ${mod}\" failed")
-        SET(${have} FALSE)
-    ELSEIF(${have} EQUAL 2)
-        MESSAGE(STATUS "Python checking for ${desc} - \"assert ${cmd}\" failed")
-        SET(${have} FALSE)
-    ELSE()
-        MESSAGE(STATUS "Python checking for ${desc} - unknown error")
-        SET(${have} FALSE)
-    ENDIF()
-ENDMACRO(PYTHON_CHECK_MODULE)
+    if(${have} EQUAL 0)
+        message(STATUS "Python checking for ${desc} - found")
+        set(${have} TRUE)
+    elseif(${have} EQUAL 1)
+        message(STATUS "Python checking for ${desc} - \"import ${mod}\" failed")
+        set(${have} FALSE)
+    elseif(${have} EQUAL 2)
+        message(STATUS "Python checking for ${desc} - \"assert ${cmd}\" failed")
+        set(${have} FALSE)
+    else()
+        message(STATUS "Python checking for ${desc} - unknown error")
+        set(${have} FALSE)
+    endif()
+endmacro(PYTHON_CHECK_MODULE)
 
-ENDIF(NOT DEFINED INCLUDED_UHD_PYTHON_CMAKE)
+endif(NOT DEFINED INCLUDED_UHD_PYTHON_CMAKE)
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 0b8739823..b827f2b76 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -6,8 +6,8 @@
 #
 
 ########################################################################
-INCLUDE(UHDPython) #requires python for parsing
-FIND_PACKAGE(Git QUIET)
+include(UHDPython) #requires python for parsing
+find_package(Git QUIET)
 
 ########################################################################
 # Setup Version Numbers
@@ -17,58 +17,58 @@ 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    11)
-SET(UHD_VERSION_ABI     0)
-SET(UHD_VERSION_PATCH   1)
-SET(UHD_VERSION_DEVEL FALSE)
+set(UHD_VERSION_MAJOR   3)
+set(UHD_VERSION_API    11)
+set(UHD_VERSION_ABI     0)
+set(UHD_VERSION_PATCH   1)
+set(UHD_VERSION_DEVEL FALSE)
 
 ########################################################################
 # If we're on a development branch, we skip the patch version
 ########################################################################
-IF(DEFINED UHD_VERSION_PATCH_OVERRIDE)
-    SET(UHD_VERSION_DEVEL FALSE)
-    SET(UHD_VERSION_PATCH ${UHD_VERSION_PATCH_OVERRIDE})
-ENDIF(DEFINED UHD_VERSION_PATCH_OVERRIDE)
-IF(NOT DEFINED UHD_VERSION_DEVEL)
-    SET(UHD_VERSION_DEVEL FALSE)
-ENDIF(NOT DEFINED UHD_VERSION_DEVEL)
-SET(UHD_GIT_BRANCH "")
-IF(GIT_FOUND)
-    EXECUTE_PROCESS(
+if(DEFINED UHD_VERSION_PATCH_OVERRIDE)
+    set(UHD_VERSION_DEVEL FALSE)
+    set(UHD_VERSION_PATCH ${UHD_VERSION_PATCH_OVERRIDE})
+endif(DEFINED UHD_VERSION_PATCH_OVERRIDE)
+if(NOT DEFINED UHD_VERSION_DEVEL)
+    set(UHD_VERSION_DEVEL FALSE)
+endif(NOT DEFINED UHD_VERSION_DEVEL)
+set(UHD_GIT_BRANCH "")
+if(GIT_FOUND)
+    execute_process(
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
         COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
         OUTPUT_VARIABLE _git_branch OUTPUT_STRIP_TRAILING_WHITESPACE
         RESULT_VARIABLE _git_branch_result
     )
-    IF(_git_branch_result EQUAL 0)
-        SET(UHD_GIT_BRANCH ${_git_branch})
-        IF(UHD_GIT_BRANCH STREQUAL "maint")
-            MESSAGE(STATUS "Operating on maint branch (stable).")
-	    SET(UHD_VERSION_DEVEL FALSE)
-        ELSEIF(UHD_GIT_BRANCH STREQUAL "master")
-            MESSAGE(STATUS "Operating on master branch.")
-            SET(UHD_VERSION_DEVEL TRUE)
-        ELSE()
-            MESSAGE(STATUS "Working off of feature or development branch. Updating version number.")
-            EXECUTE_PROCESS(
+    if(_git_branch_result EQUAL 0)
+        set(UHD_GIT_BRANCH ${_git_branch})
+        if(UHD_GIT_BRANCH STREQUAL "maint")
+            message(STATUS "Operating on maint branch (stable).")
+	    set(UHD_VERSION_DEVEL FALSE)
+        elseif(UHD_GIT_BRANCH STREQUAL "master")
+            message(STATUS "Operating on master branch.")
+            set(UHD_VERSION_DEVEL TRUE)
+        else()
+            message(STATUS "Working off of feature or development branch. Updating version number.")
+            execute_process(
                 COMMAND ${PYTHON_EXECUTABLE} -c "print('${_git_branch}'.replace('/', '-'))"
                 OUTPUT_VARIABLE _git_safe_branch OUTPUT_STRIP_TRAILING_WHITESPACE
             )
-            SET(UHD_VERSION_PATCH ${_git_safe_branch})
-            SET(UHD_VERSION_DEVEL TRUE)
-        ENDIF()
-    ELSE()
-        MESSAGE(STATUS "Could not determine git branch. Probably building from tarball.")
-    ENDIF()
-ENDIF(GIT_FOUND)
+            set(UHD_VERSION_PATCH ${_git_safe_branch})
+            set(UHD_VERSION_DEVEL TRUE)
+        endif()
+    else()
+        message(STATUS "Could not determine git branch. Probably building from tarball.")
+    endif()
+endif(GIT_FOUND)
 
 ########################################################################
 # Version information discovery through git log
 ########################################################################
 
 #grab the git ref id for the current head
-EXECUTE_PROCESS(
+execute_process(
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
     COMMAND ${GIT_EXECUTABLE} describe --always --abbrev=8 --long
     OUTPUT_VARIABLE _git_describe OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -76,9 +76,9 @@ EXECUTE_PROCESS(
 )
 
 #only set the build info on success
-IF(_git_describe_result EQUAL 0)
-    IF(NOT UHD_GIT_COUNT)
-        EXECUTE_PROCESS(
+if(_git_describe_result EQUAL 0)
+    if(NOT UHD_GIT_COUNT)
+        execute_process(
             WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
             COMMAND ${PYTHON_EXECUTABLE} -c "
 try:
@@ -88,9 +88,9 @@ except IndexError:
 "
             OUTPUT_VARIABLE UHD_GIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE
         )
-    ENDIF()
-    IF(NOT UHD_GIT_HASH)
-        EXECUTE_PROCESS(
+    endif()
+    if(NOT UHD_GIT_HASH)
+        execute_process(
             WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
             COMMAND ${PYTHON_EXECUTABLE} -c "
 try:
@@ -100,35 +100,35 @@ except IndexError:
 "
              OUTPUT_VARIABLE UHD_GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE
         )
-    ENDIF()
-ENDIF()
+    endif()
+endif()
 
 ## Set default values if all fails. Make sure they're identical to the ones above.
-IF(NOT UHD_GIT_COUNT)
-    SET(UHD_GIT_COUNT "0")
-ENDIF()
+if(NOT UHD_GIT_COUNT)
+    set(UHD_GIT_COUNT "0")
+endif()
 
-IF(NOT UHD_GIT_HASH)
-    SET(UHD_GIT_HASH "unknown")
-ENDIF()
+if(NOT UHD_GIT_HASH)
+    set(UHD_GIT_HASH "unknown")
+endif()
 
-IF(UHD_RELEASE_MODE)
-    SET(UHD_GIT_HASH ${UHD_RELEASE_MODE})
+if(UHD_RELEASE_MODE)
+    set(UHD_GIT_HASH ${UHD_RELEASE_MODE})
 
     #Ignore UHD_GIT_COUNT in UHD_VERSION if the string 'release' is in UHD_RELEASE_MODE
-    EXECUTE_PROCESS(
+    execute_process(
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
         COMMAND ${PYTHON_EXECUTABLE} -c "print ('release' in '${UHD_RELEASE_MODE}') or ('rc' in '${UHD_RELEASE_MODE}')"
         OUTPUT_VARIABLE TRIM_UHD_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-ENDIF()
+endif()
 
 
 ########################################################################
-IF(DEFINED UHD_VERSION)
-    SET(UHD_VERSION "${UHD_VERSION}" CACHE STRING "Set UHD_VERSION to a custom value")
-ELSEIF(TRIM_UHD_VERSION STREQUAL "True")
-    SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}")
-ELSE()
-    SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}")
-ENDIF()
+if(DEFINED UHD_VERSION)
+    set(UHD_VERSION "${UHD_VERSION}" CACHE STRING "Set UHD_VERSION to a custom value")
+elseif(TRIM_UHD_VERSION STREQUAL "True")
+    set(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}")
+else()
+    set(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}")
+endif()
diff --git a/host/cmake/Toolchains/mingw_cross.cmake b/host/cmake/Toolchains/mingw_cross.cmake
index f1406ec46..264e1a597 100644
--- a/host/cmake/Toolchains/mingw_cross.cmake
+++ b/host/cmake/Toolchains/mingw_cross.cmake
@@ -3,10 +3,10 @@
 # most likely default if none given.
 #
 
-SET(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_NAME Windows)
 
-IF(NOT DEFINED MINGW_PREFIX)
-    SET(POSSIBLE_PREFIXES
+if(NOT DEFINED MINGW_PREFIX)
+    set(POSSIBLE_PREFIXES
         i586-mingw32msvc
         i686-pc-mingw32
         x86_64-pc-mingw32
@@ -14,36 +14,36 @@ IF(NOT DEFINED MINGW_PREFIX)
         x86_64-w64-mingw32
     )
 
-    SET(MINGW_FOUND 0)
-    FOREACH(prefix ${POSSIBLE_PREFIXES})
-        IF(EXISTS /usr/${prefix})
-            SET(MINGW_PREFIX ${prefix})
-            SET(MINGW_FOUND 1)
-            BREAK()
-        ENDIF(EXISTS /usr/${prefix})
-    ENDFOREACH(prefix ${POSSIBLE_PREFIXES})
+    set(MINGW_FOUND 0)
+    foreach(prefix ${POSSIBLE_PREFIXES})
+        if(EXISTS /usr/${prefix})
+            set(MINGW_PREFIX ${prefix})
+            set(MINGW_FOUND 1)
+            break()
+        endif(EXISTS /usr/${prefix})
+    endforeach(prefix ${POSSIBLE_PREFIXES})
 
-    IF(NOT MINGW_FOUND)
-        MESSAGE(FATAL_ERROR "No MinGW type specified, but none detected in the usual locations.")
-    ENDIF(NOT MINGW_FOUND)
-ENDIF(NOT DEFINED MINGW_PREFIX)
+    if(NOT MINGW_FOUND)
+        message(FATAL_ERROR "No MinGW type specified, but none detected in the usual locations.")
+    endif(NOT MINGW_FOUND)
+endif(NOT DEFINED MINGW_PREFIX)
 
-SET(MINGW_PREFIX ${MINGW_PREFIX} CACHE STRING "MinGW prefix")
+set(MINGW_PREFIX ${MINGW_PREFIX} CACHE STRING "MinGW prefix")
 
-SET(CMAKE_C_COMPILER ${MINGW_PREFIX}-gcc)
-SET(CMAKE_CXX_COMPILER ${MINGW_PREFIX}-g++)
-SET(CMAKE_RC_COMPILER ${MINGW_PREFIX}-windres)
+set(CMAKE_C_COMPILER ${MINGW_PREFIX}-gcc)
+set(CMAKE_CXX_COMPILER ${MINGW_PREFIX}-g++)
+set(CMAKE_RC_COMPILER ${MINGW_PREFIX}-windres)
 
-IF(NOT DEFINED CMAKE_FIND_ROOT_PATH)
-    SET(CMAKE_FIND_ROOT_PATH /usr/${MINGW_PREFIX})
-ENDIF(NOT DEFINED CMAKE_FIND_ROOT_PATH)
+if(NOT DEFINED CMAKE_FIND_ROOT_PATH)
+    set(CMAKE_FIND_ROOT_PATH /usr/${MINGW_PREFIX})
+endif(NOT DEFINED CMAKE_FIND_ROOT_PATH)
 
-SET(CMAKE_INCLUDE_PATH
+set(CMAKE_INCLUDE_PATH
     ${CMAKE_FIND_ROOT_PATH}/local/include
     ${CMAKE_FIND_ROOT_PATH}/include
 )
 
-SET(CMAKE_LIBRARY_PATH
+set(CMAKE_LIBRARY_PATH
     ${CMAKE_FIND_ROOT_PATH}/local/lib
     ${CMAKE_FIND_ROOT_PATH}/lib
 )
diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt
index 41f248557..2b78a4a31 100644
--- a/host/docs/CMakeLists.txt
+++ b/host/docs/CMakeLists.txt
@@ -12,13 +12,13 @@
 ########################################################################
 # Setup general Doxygen variables
 ########################################################################
-FIND_PACKAGE(Doxygen)
-SET(ENABLE_MANUAL_OR_DOXYGEN false)
+find_package(Doxygen)
+set(ENABLE_MANUAL_OR_DOXYGEN false)
 
 ########################################################################
 # Setup Manual (using Doxygen)
 ########################################################################
-LIBUHD_REGISTER_COMPONENT("Manual" ENABLE_MANUAL ON "DOXYGEN_FOUND" OFF OFF)
+libuhd_register_component("Manual" ENABLE_MANUAL ON "DOXYGEN_FOUND" OFF OFF)
 
 # Check if fpga submodule is there. If yes:
 # - Add fpga-src/docs and fpga-src/README.md to inputs
@@ -26,102 +26,102 @@ LIBUHD_REGISTER_COMPONENT("Manual" ENABLE_MANUAL ON "DOXYGEN_FOUND" OFF OFF)
 # If no:
 # - Make FPGA Manual reference link to our website
 
-IF(ENABLE_MANUAL)
-    SET(ENABLE_MANUAL_OR_DOXYGEN true)
+if(ENABLE_MANUAL)
+    set(ENABLE_MANUAL_OR_DOXYGEN true)
     # First: Set up UHD manual only
-    FILE(GLOB manual_sources "*.dox")
-    SET(DOXYGEN_DEPENDENCIES ${manual_sources})
-    SET(DOXYGEN_INPUT_DIRS "${CMAKE_SOURCE_DIR}/docs")
-    SET(DOXYGEN_DEP_COMPONENT "manual")
-    SET(DOXYGEN_FPGA_MANUAL_REFERENCE "<a href=\"http://files.ettus.com/manual/md_fpga.html\">Part III: FPGA Manual</a>")
-    SET(DOXYGEN_STRIP_EXTRA "")
-    SET(DOXYGEN_EXCLUDE_DIRS "")
-    IF(NOT ENABLE_RFNOC)
-        SET(DOXYGEN_EXCLUDE_DIRS "${DOXYGEN_EXCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include/uhd/rfnoc")
-    ENDIF(NOT ENABLE_RFNOC)
+    file(GLOB manual_sources "*.dox")
+    set(DOXYGEN_DEPENDENCIES ${manual_sources})
+    set(DOXYGEN_INPUT_DIRS "${CMAKE_SOURCE_DIR}/docs")
+    set(DOXYGEN_DEP_COMPONENT "manual")
+    set(DOXYGEN_FPGA_MANUAL_REFERENCE "<a href=\"http://files.ettus.com/manual/md_fpga.html\">Part III: FPGA Manual</a>")
+    set(DOXYGEN_STRIP_EXTRA "")
+    set(DOXYGEN_EXCLUDE_DIRS "")
+    if(NOT ENABLE_RFNOC)
+        set(DOXYGEN_EXCLUDE_DIRS "${DOXYGEN_EXCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include/uhd/rfnoc")
+    endif(NOT ENABLE_RFNOC)
     # Now, check if we have the FPGA sources as well.
     # If so, pull them in:
-    IF(HAS_FPGA_SUBMODULE)
-        FILE(GLOB_RECURSE fpga_manual_sources "${FPGA_SUBMODULE_DIR}/docs/*.md")
-        LIST(APPEND manual_sources ${fpga_manual_sources})
-        SET(DOXYGEN_INPUT_DIRS "${DOXYGEN_INPUT_DIRS} ${FPGA_SUBMODULE_DIR}/docs")
-        SET(DOXYGEN_FPGA_MANUAL_REFERENCE "\\subpage md_fpga \"Part III: FPGA Manual\"")
-	SET(DOXYGEN_STRIP_EXTRA "${FPGA_SUBMODULE_DIR}/docs")
-    ENDIF(HAS_FPGA_SUBMODULE)
-    CONFIGURE_FILE(
+    if(HAS_FPGA_SUBMODULE)
+        file(GLOB_RECURSE fpga_manual_sources "${FPGA_SUBMODULE_DIR}/docs/*.md")
+        list(APPEND manual_sources ${fpga_manual_sources})
+        set(DOXYGEN_INPUT_DIRS "${DOXYGEN_INPUT_DIRS} ${FPGA_SUBMODULE_DIR}/docs")
+        set(DOXYGEN_FPGA_MANUAL_REFERENCE "\\subpage md_fpga \"Part III: FPGA Manual\"")
+	set(DOXYGEN_STRIP_EXTRA "${FPGA_SUBMODULE_DIR}/docs")
+    endif(HAS_FPGA_SUBMODULE)
+    configure_file(
         ${CMAKE_CURRENT_SOURCE_DIR}/mainpage.dox.in
         ${CMAKE_CURRENT_BINARY_DIR}/mainpage.dox
     @ONLY)
-ENDIF(ENABLE_MANUAL)
+endif(ENABLE_MANUAL)
 
 ########################################################################
 # Setup API documentation (using Doxygen)
 ########################################################################
-LIBUHD_REGISTER_COMPONENT("API/Doxygen" ENABLE_DOXYGEN ON "DOXYGEN_FOUND" OFF OFF)
-OPTION(ENABLE_DOXYGEN_FULL "Use Doxygen to document the entire source tree (not just API)" OFF)
-OPTION(ENABLE_DOXYGEN_DOT "Let Doxygen use dot (requires graphviz)" OFF)
-OPTION(ENABLE_DOXYGEN_SHORTNAMES "Let Doxygen use shorter filenames (helps on Windows)" OFF)
+libuhd_register_component("API/Doxygen" ENABLE_DOXYGEN ON "DOXYGEN_FOUND" OFF OFF)
+option(ENABLE_DOXYGEN_FULL "Use Doxygen to document the entire source tree (not just API)" OFF)
+option(ENABLE_DOXYGEN_DOT "Let Doxygen use dot (requires graphviz)" OFF)
+option(ENABLE_DOXYGEN_SHORTNAMES "Let Doxygen use shorter filenames (helps on Windows)" OFF)
 
-IF(LIBUHDDEV_PKG)
-    SET(PKG_DOC_DIR share/doc/libuhd-dev)
-ENDIF(LIBUHDDEV_PKG)
+if(LIBUHDDEV_PKG)
+    set(PKG_DOC_DIR share/doc/libuhd-dev)
+endif(LIBUHDDEV_PKG)
 
-IF(ENABLE_DOXYGEN)
-    SET(ENABLE_MANUAL_OR_DOXYGEN true)
+if(ENABLE_DOXYGEN)
+    set(ENABLE_MANUAL_OR_DOXYGEN true)
     #make doxygen directory depend on the header files
-    FILE(GLOB_RECURSE header_files ${CMAKE_SOURCE_DIR}/include/*.hpp)
-    FILE(GLOB_RECURSE h_files ${CMAKE_SOURCE_DIR}/include/*.h)
-    LIST(APPEND header_files ${h_files})
-    SET(DOXYGEN_DEPENDENCIES ${DOXYGEN_DEPENDENCIES} ${header_files})
-    IF(ENABLE_DOXYGEN_FULL)
-        SET(DOXYGEN_INPUT_DIRS "${DOXYGEN_INPUT_DIRS} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/lib")
-    ELSE(ENABLE_DOXYGEN_FULL)
-        SET(DOXYGEN_INPUT_DIRS "${DOXYGEN_INPUT_DIRS} ${CMAKE_SOURCE_DIR}/include")
-    ENDIF(ENABLE_DOXYGEN_FULL)
-
-    SET(DOXYGEN_DEP_COMPONENT "doxygen")
-ENDIF(ENABLE_DOXYGEN)
+    file(GLOB_RECURSE header_files ${CMAKE_SOURCE_DIR}/include/*.hpp)
+    file(GLOB_RECURSE h_files ${CMAKE_SOURCE_DIR}/include/*.h)
+    list(APPEND header_files ${h_files})
+    set(DOXYGEN_DEPENDENCIES ${DOXYGEN_DEPENDENCIES} ${header_files})
+    if(ENABLE_DOXYGEN_FULL)
+        set(DOXYGEN_INPUT_DIRS "${DOXYGEN_INPUT_DIRS} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/lib")
+    else(ENABLE_DOXYGEN_FULL)
+        set(DOXYGEN_INPUT_DIRS "${DOXYGEN_INPUT_DIRS} ${CMAKE_SOURCE_DIR}/include")
+    endif(ENABLE_DOXYGEN_FULL)
+
+    set(DOXYGEN_DEP_COMPONENT "doxygen")
+endif(ENABLE_DOXYGEN)
 
 ########################################################################
 # Run Doxygen (on code and/or manual, depending on CMake flags)
 ########################################################################
-IF(ENABLE_MANUAL_OR_DOXYGEN)
+if(ENABLE_MANUAL_OR_DOXYGEN)
     #generate the doxygen configuration file
-    SET(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
-    IF(ENABLE_DOXYGEN_DOT)
-        SET(DOXYGEN_HAVE_DOT "YES")
-    ELSE(ENABLE_DOXYGEN_DOT)
-        SET(DOXYGEN_HAVE_DOT "NO")
-    ENDIF(ENABLE_DOXYGEN_DOT)
-    IF(ENABLE_DOXYGEN_SHORTNAMES)
-        SET(DOXYGEN_SHORT_NAMES "YES")
-    ELSE(ENABLE_DOXYGEN_SHORTNAMES)
-        SET(DOXYGEN_SHORT_NAMES "NO")
-    ENDIF(ENABLE_DOXYGEN_SHORTNAMES)
-
-    CONFIGURE_FILE(
+    set(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
+    if(ENABLE_DOXYGEN_DOT)
+        set(DOXYGEN_HAVE_DOT "YES")
+    else(ENABLE_DOXYGEN_DOT)
+        set(DOXYGEN_HAVE_DOT "NO")
+    endif(ENABLE_DOXYGEN_DOT)
+    if(ENABLE_DOXYGEN_SHORTNAMES)
+        set(DOXYGEN_SHORT_NAMES "YES")
+    else(ENABLE_DOXYGEN_SHORTNAMES)
+        set(DOXYGEN_SHORT_NAMES "NO")
+    endif(ENABLE_DOXYGEN_SHORTNAMES)
+
+    configure_file(
         ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
         ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
     @ONLY)
 
     #make doxygen directory depend on the header files
-    FILE(GLOB_RECURSE header_files ${CMAKE_SOURCE_DIR}/include/*.hpp)
-    ADD_CUSTOM_COMMAND(
+    file(GLOB_RECURSE header_files ${CMAKE_SOURCE_DIR}/include/*.hpp)
+    add_custom_command(
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DEPENDS ${DOXYGEN_DEPENDENCIES}
         COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
         COMMENT "Generating documentation with doxygen"
     )
 
     #make the doxygen generation a built-time dependency
-    ADD_CUSTOM_TARGET(doxygen_docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN})
-    UHD_INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR} COMPONENT ${DOXYGEN_DEP_COMPONENT})
-ENDIF(ENABLE_MANUAL_OR_DOXYGEN)
+    add_custom_target(doxygen_docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN})
+    uhd_install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR} COMPONENT ${DOXYGEN_DEP_COMPONENT})
+endif(ENABLE_MANUAL_OR_DOXYGEN)
 
 ########################################################################
 # List of man page sources
 ########################################################################
 
-SET(man_page_sources
+set(man_page_sources
     octoclock_firmware_burner.1
     uhd_cal_rx_iq_balance.1
     uhd_cal_tx_dc_offset.1
@@ -139,23 +139,23 @@ SET(man_page_sources
 ########################################################################
 # Setup man pages
 ########################################################################
-FIND_PACKAGE(GZip)
+find_package(GZip)
 
 # No elegant way in CMake to reverse a boolean
-IF(NOT WIN32)
-    SET(NOT_WIN32 TRUE)
-ENDIF(NOT WIN32)
+if(NOT WIN32)
+    set(NOT_WIN32 TRUE)
+endif(NOT WIN32)
 
-LIBUHD_REGISTER_COMPONENT("Man Pages" ENABLE_MAN_PAGES ON "GZIP_FOUND;NOT_WIN32" OFF OFF)
+libuhd_register_component("Man Pages" ENABLE_MAN_PAGES ON "GZIP_FOUND;NOT_WIN32" OFF OFF)
 
-IF(ENABLE_MAN_PAGES)
+if(ENABLE_MAN_PAGES)
     #Generate man pages
-    FOREACH(manfile ${man_page_sources})
+    foreach(manfile ${man_page_sources})
         #make the gzip file depend on the text file
-        STRING(REPLACE ".1" "" PROGRAM_NAME "${manfile}")
-        SET(gzfile "${CMAKE_CURRENT_BINARY_DIR}/${manfile}.gz")
-        SET(manfile "${CMAKE_CURRENT_SOURCE_DIR}/${manfile}")
-        ADD_CUSTOM_COMMAND(
+        string(REPLACE ".1" "" PROGRAM_NAME "${manfile}")
+        set(gzfile "${CMAKE_CURRENT_BINARY_DIR}/${manfile}.gz")
+        set(manfile "${CMAKE_CURRENT_SOURCE_DIR}/${manfile}")
+        add_custom_command(
             OUTPUT ${gzfile}
             DEPENDS ${manfile}
             COMMAND ${GZIP_EXECUTABLE} -9 -cf ${manfile} > ${gzfile}
@@ -163,10 +163,10 @@ IF(ENABLE_MAN_PAGES)
         )
 
         #make the man page target depend on the gz file
-        LIST(APPEND man_page_gz_files ${gzfile})
-        UHD_INSTALL(FILES ${gzfile} DESTINATION ${PKG_MAN_DIR} COMPONENT manpages)
-    ENDFOREACH(manfile ${man_page_sources})
+        list(APPEND man_page_gz_files ${gzfile})
+        uhd_install(FILES ${gzfile} DESTINATION ${PKG_MAN_DIR} COMPONENT manpages)
+    endforeach(manfile ${man_page_sources})
 
     #make the man pages a build-time dependency
-    ADD_CUSTOM_TARGET(man_page_gzips ALL DEPENDS ${man_page_gz_files})
-ENDIF(ENABLE_MAN_PAGES)
+    add_custom_target(man_page_gzips ALL DEPENDS ${man_page_gz_files})
+endif(ENABLE_MAN_PAGES)
diff --git a/host/examples/CMakeLists.txt b/host/examples/CMakeLists.txt
index 56d1e4f1f..be60c2fce 100644
--- a/host/examples/CMakeLists.txt
+++ b/host/examples/CMakeLists.txt
@@ -8,7 +8,7 @@
 ########################################################################
 # example applications
 ########################################################################
-SET(example_sources
+set(example_sources
     benchmark_rate.cpp
     network_relay.cpp
     rx_multi_samples.cpp
@@ -30,43 +30,43 @@ SET(example_sources
     sync_to_gps.cpp
 )
 
-IF(ENABLE_OCTOCLOCK)
-    LIST(APPEND example_sources test_clock_synch.cpp)
-ENDIF(ENABLE_OCTOCLOCK)
+if(ENABLE_OCTOCLOCK)
+    list(APPEND example_sources test_clock_synch.cpp)
+endif(ENABLE_OCTOCLOCK)
 
 #for each source: build an executable and install
-FOREACH(example_source ${example_sources})
-    GET_FILENAME_COMPONENT(example_name ${example_source} NAME_WE)
-    ADD_EXECUTABLE(${example_name} ${example_source})
-    TARGET_LINK_LIBRARIES(${example_name} uhd ${Boost_LIBRARIES})
-    UHD_INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
-ENDFOREACH(example_source)
+foreach(example_source ${example_sources})
+    get_filename_component(example_name ${example_source} NAME_WE)
+    add_executable(${example_name} ${example_source})
+    target_link_libraries(${example_name} uhd ${Boost_LIBRARIES})
+    uhd_install(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
+endforeach(example_source)
 
 ########################################################################
 # ASCII Art DFT - requires curses, so this part is optional
 ########################################################################
-FIND_PACKAGE(Curses)
+find_package(Curses)
 
-IF(CURSES_FOUND)
-    INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
-    ADD_EXECUTABLE(rx_ascii_art_dft rx_ascii_art_dft.cpp)
-    TARGET_LINK_LIBRARIES(rx_ascii_art_dft uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES})
-    UHD_INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
+if(CURSES_FOUND)
+    include_directories(${CURSES_INCLUDE_DIR})
+    add_executable(rx_ascii_art_dft rx_ascii_art_dft.cpp)
+    target_link_libraries(rx_ascii_art_dft uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES})
+    uhd_install(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
 
-    ADD_EXECUTABLE(twinrx_freq_hopping twinrx_freq_hopping.cpp)
-    TARGET_LINK_LIBRARIES(twinrx_freq_hopping uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES})
-    UHD_INSTALL(TARGETS twinrx_freq_hopping RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
-ENDIF(CURSES_FOUND)
+    add_executable(twinrx_freq_hopping twinrx_freq_hopping.cpp)
+    target_link_libraries(twinrx_freq_hopping uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES})
+    uhd_install(TARGETS twinrx_freq_hopping RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
+endif(CURSES_FOUND)
 
 ########################################################################
 # Examples using C API
 ########################################################################
-IF(ENABLE_C_API)
+if(ENABLE_C_API)
     #
     # Check if this particular C99 feature is available with this compiler
     #
-    INCLUDE(CheckCSourceCompiles)
-    CHECK_C_SOURCE_COMPILES("
+    include(CheckCSourceCompiles)
+    check_c_source_compiles("
     typedef struct {
         int bar;
         int baz;
@@ -83,22 +83,22 @@ IF(ENABLE_C_API)
     }
     " HAVE_C99_STRUCTDECL)
 
-    IF(HAVE_C99_STRUCTDECL)
-        ADD_SUBDIRECTORY(getopt)
-        INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/getopt)
+    if(HAVE_C99_STRUCTDECL)
+        add_subdirectory(getopt)
+        include_directories(${CMAKE_CURRENT_SOURCE_DIR}/getopt)
 
-        SET(C_API_EXAMPLES
+        set(C_API_EXAMPLES
             rx_samples_c
             tx_samples_c
         )
 
-        FOREACH(example ${C_API_EXAMPLES})
-            ADD_EXECUTABLE(${example} ${example}.c)
-            TARGET_LINK_LIBRARIES(${example} uhd getopt)
-            IF(UNIX)
-                TARGET_LINK_LIBRARIES(${example} m)
-            ENDIF(UNIX)
-            UHD_INSTALL(TARGETS ${example} RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
-        ENDFOREACH(example ${C_API_EXAMPLES})
-    ENDIF(HAVE_C99_STRUCTDECL)
-ENDIF(ENABLE_C_API)
+        foreach(example ${C_API_EXAMPLES})
+            add_executable(${example} ${example}.c)
+            target_link_libraries(${example} uhd getopt)
+            if(UNIX)
+                target_link_libraries(${example} m)
+            endif(UNIX)
+            uhd_install(TARGETS ${example} RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
+        endforeach(example ${C_API_EXAMPLES})
+    endif(HAVE_C99_STRUCTDECL)
+endif(ENABLE_C_API)
diff --git a/host/examples/getopt/CMakeLists.txt b/host/examples/getopt/CMakeLists.txt
index 047572108..4fe8ab43d 100644
--- a/host/examples/getopt/CMakeLists.txt
+++ b/host/examples/getopt/CMakeLists.txt
@@ -8,7 +8,7 @@
 ########################################################################
 # getopt library for C examples since MSVC does not include it
 ########################################################################
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIRECTORY})
-ADD_LIBRARY(getopt STATIC
+include_directories(${CMAKE_CURRENT_SOURCE_DIRECTORY})
+add_library(getopt STATIC
     ${CMAKE_CURRENT_SOURCE_DIR}/getopt.c
 )
diff --git a/host/examples/init_usrp/CMakeLists.txt b/host/examples/init_usrp/CMakeLists.txt
index ccbe3a1e3..9cc835442 100644
--- a/host/examples/init_usrp/CMakeLists.txt
+++ b/host/examples/init_usrp/CMakeLists.txt
@@ -36,24 +36,24 @@ find_package(UHD "3.8.0" REQUIRED)
 #find_package(UHD 3.8.1 EXACT REQUIRED)
 
 ### Configure Compiler ########################################################
-IF(CMAKE_VERSION VERSION_LESS "3.1")
-    IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
-        SET(CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
-    ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-        IF("${IS_APPLE}" STREQUAL "")
-            SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
-        ELSE()
-            SET(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
-        ENDIF()
-    ENDIF()
-ELSE()
-    SET(CMAKE_CXX_STANDARD 11)
-ENDIF()
+if(CMAKE_VERSION VERSION_LESS "3.1")
+    if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+        set(CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
+    elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+        if("${IS_APPLE}" STREQUAL "")
+            set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
+        else()
+            set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
+        endif()
+    endif()
+else()
+    set(CMAKE_CXX_STANDARD 11)
+endif()
 
-IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    SET(CMAKE_EXE_LINKER_FLAGS "-lthr ${CMAKE_EXE_LINKER_FLAGS}")
-    SET(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
-ENDIF()
+if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+    set(CMAKE_EXE_LINKER_FLAGS "-lthr ${CMAKE_EXE_LINKER_FLAGS}")
+    set(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
+endif()
 
 include_directories(
     ${Boost_INCLUDE_DIRS}
@@ -64,13 +64,13 @@ link_directories(${Boost_LIBRARY_DIRS})
 ### Make the executable #######################################################
 add_executable(init_usrp init_usrp.cpp)
 
-SET(CMAKE_BUILD_TYPE "Release")
-MESSAGE(STATUS "******************************************************************************")
-MESSAGE(STATUS "* NOTE: When building your own app, you probably need all kinds of different  ")
-MESSAGE(STATUS "* compiler flags. This is just an example, so it's unlikely these settings    ")
-MESSAGE(STATUS "* exactly match what you require. Make sure to double-check compiler and     ")
-MESSAGE(STATUS "* linker flags to make sure your specific requirements are included.          ")
-MESSAGE(STATUS "******************************************************************************")
+set(CMAKE_BUILD_TYPE "Release")
+message(STATUS "******************************************************************************")
+message(STATUS "* NOTE: When building your own app, you probably need all kinds of different  ")
+message(STATUS "* compiler flags. This is just an example, so it's unlikely these settings    ")
+message(STATUS "* exactly match what you require. Make sure to double-check compiler and     ")
+message(STATUS "* linker flags to make sure your specific requirements are included.          ")
+message(STATUS "******************************************************************************")
 
 # Shared library case: All we need to do is link against the library, and
 # anything else we need (in this case, some Boost libraries):
diff --git a/host/include/CMakeLists.txt b/host/include/CMakeLists.txt
index 0efed9785..095f1520b 100644
--- a/host/include/CMakeLists.txt
+++ b/host/include/CMakeLists.txt
@@ -5,16 +5,16 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
     ${CMAKE_CURRENT_BINARY_DIR}/config.h
 )
 
-IF(ENABLE_C_API)
-    UHD_INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/uhd.h
+if(ENABLE_C_API)
+    uhd_install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/uhd.h
         DESTINATION ${INCLUDE_DIR}
         COMPONENT headers
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
 
-ADD_SUBDIRECTORY(uhd)
+add_subdirectory(uhd)
diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt
index e0599fd82..db97f3ba6 100644
--- a/host/include/uhd/CMakeLists.txt
+++ b/host/include/uhd/CMakeLists.txt
@@ -5,20 +5,20 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-ADD_SUBDIRECTORY(rfnoc)
-ADD_SUBDIRECTORY(transport)
-ADD_SUBDIRECTORY(types)
-ADD_SUBDIRECTORY(cal)
-ADD_SUBDIRECTORY(usrp)
-ADD_SUBDIRECTORY(usrp_clock)
-ADD_SUBDIRECTORY(utils)
+add_subdirectory(rfnoc)
+add_subdirectory(transport)
+add_subdirectory(types)
+add_subdirectory(cal)
+add_subdirectory(usrp)
+add_subdirectory(usrp_clock)
+add_subdirectory(utils)
 
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/version.hpp.in
     ${CMAKE_CURRENT_BINARY_DIR}/version.hpp
 )
 
-UHD_INSTALL(FILES
+uhd_install(FILES
     build_info.hpp
     config.hpp
     convert.hpp
@@ -33,19 +33,19 @@ UHD_INSTALL(FILES
     COMPONENT headers
 )
 
-IF(ENABLE_RFNOC)
-    UHD_INSTALL(FILES
+if(ENABLE_RFNOC)
+    uhd_install(FILES
         device3.hpp
         DESTINATION ${INCLUDE_DIR}/uhd
         COMPONENT headers
     )
-ENDIF(ENABLE_RFNOC)
+endif(ENABLE_RFNOC)
 
-IF(ENABLE_C_API)
-    UHD_INSTALL(FILES
+if(ENABLE_C_API)
+    uhd_install(FILES
         config.h
         error.h
         DESTINATION ${INCLUDE_DIR}/uhd
         COMPONENT headers
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
diff --git a/host/include/uhd/cal/CMakeLists.txt b/host/include/uhd/cal/CMakeLists.txt
index f648aa501..db6460a03 100644
--- a/host/include/uhd/cal/CMakeLists.txt
+++ b/host/include/uhd/cal/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-UHD_INSTALL(FILES
+uhd_install(FILES
     container.hpp
     power_container.hpp
     DESTINATION ${INCLUDE_DIR}/uhd/cal
diff --git a/host/include/uhd/rfnoc/CMakeLists.txt b/host/include/uhd/rfnoc/CMakeLists.txt
index 6ed9fd3c3..e08d48194 100644
--- a/host/include/uhd/rfnoc/CMakeLists.txt
+++ b/host/include/uhd/rfnoc/CMakeLists.txt
@@ -5,8 +5,8 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-IF(ENABLE_RFNOC)
-    UHD_INSTALL(FILES
+if(ENABLE_RFNOC)
+    uhd_install(FILES
         # Infrastructure
         block_ctrl_base.hpp
         block_ctrl.hpp
@@ -32,8 +32,8 @@ IF(ENABLE_RFNOC)
         DESTINATION ${INCLUDE_DIR}/uhd/rfnoc
         COMPONENT headers
     )
-ENDIF(ENABLE_RFNOC)
+endif(ENABLE_RFNOC)
 
-ADD_SUBDIRECTORY(blocks)
+add_subdirectory(blocks)
 #ADD_SUBDIRECTORY(components)
 
diff --git a/host/include/uhd/rfnoc/blocks/CMakeLists.txt b/host/include/uhd/rfnoc/blocks/CMakeLists.txt
index 027b6eb53..ff3d8d8dc 100644
--- a/host/include/uhd/rfnoc/blocks/CMakeLists.txt
+++ b/host/include/uhd/rfnoc/blocks/CMakeLists.txt
@@ -5,10 +5,10 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-FILE(GLOB xml_files "*.xml")
+file(GLOB xml_files "*.xml")
 
 # We always need this, even when RFNoC is 'disabled'
-UHD_INSTALL(
+uhd_install(
     FILES ${xml_files}
     DESTINATION ${PKG_DATA_DIR}/rfnoc/blocks
     COMPONENT headers # TODO: Different component
diff --git a/host/include/uhd/transport/CMakeLists.txt b/host/include/uhd/transport/CMakeLists.txt
index 3ce06b5b1..787f1650e 100644
--- a/host/include/uhd/transport/CMakeLists.txt
+++ b/host/include/uhd/transport/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-UHD_INSTALL(FILES
+uhd_install(FILES
     bounded_buffer.hpp
     bounded_buffer.ipp
     buffer_pool.hpp
diff --git a/host/include/uhd/types/CMakeLists.txt b/host/include/uhd/types/CMakeLists.txt
index d9f28b08c..aa71d2ad7 100644
--- a/host/include/uhd/types/CMakeLists.txt
+++ b/host/include/uhd/types/CMakeLists.txt
@@ -6,7 +6,7 @@
 #
 
 
-UHD_INSTALL(FILES
+uhd_install(FILES
     byte_vector.hpp
     clock_config.hpp
     device_addr.hpp
@@ -33,8 +33,8 @@ UHD_INSTALL(FILES
     COMPONENT headers
 )
 
-IF(ENABLE_C_API)
-    UHD_INSTALL(FILES
+if(ENABLE_C_API)
+    uhd_install(FILES
         metadata.h
         ranges.h
         sensors.h
@@ -45,4 +45,4 @@ IF(ENABLE_C_API)
         DESTINATION ${INCLUDE_DIR}/uhd/types
         COMPONENT headers
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt
index abc159d8f..cc8920b2d 100644
--- a/host/include/uhd/usrp/CMakeLists.txt
+++ b/host/include/uhd/usrp/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-UHD_INSTALL(FILES
+uhd_install(FILES
 
     #### dboard headers ###
     fe_connection.hpp
@@ -28,8 +28,8 @@ UHD_INSTALL(FILES
     COMPONENT headers
 )
 
-IF(ENABLE_C_API)
-    UHD_INSTALL(FILES
+if(ENABLE_C_API)
+    uhd_install(FILES
         dboard_eeprom.h
         mboard_eeprom.h
         subdev_spec.h
@@ -37,4 +37,4 @@ IF(ENABLE_C_API)
         DESTINATION ${INCLUDE_DIR}/uhd/usrp
         COMPONENT headers
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
diff --git a/host/include/uhd/usrp_clock/CMakeLists.txt b/host/include/uhd/usrp_clock/CMakeLists.txt
index 5bb2499b2..a94f311df 100644
--- a/host/include/uhd/usrp_clock/CMakeLists.txt
+++ b/host/include/uhd/usrp_clock/CMakeLists.txt
@@ -5,17 +5,17 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-UHD_INSTALL(FILES
+uhd_install(FILES
     octoclock_eeprom.hpp
     multi_usrp_clock.hpp
     DESTINATION ${INCLUDE_DIR}/uhd/usrp_clock
     COMPONENT headers
 )
 
-IF(ENABLE_C_API)
-    UHD_INSTALL(FILES
+if(ENABLE_C_API)
+    uhd_install(FILES
     usrp_clock.h
     DESTINATION ${INCLUDE_DIR}/uhd/usrp_clock
     COMPONENT headers
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt
index 85afc09bb..12fdb9928 100644
--- a/host/include/uhd/utils/CMakeLists.txt
+++ b/host/include/uhd/utils/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-UHD_INSTALL(FILES
+uhd_install(FILES
     algorithm.hpp
     assert_has.hpp
     assert_has.ipp
@@ -34,11 +34,11 @@ UHD_INSTALL(FILES
     COMPONENT headers
 )
 
-IF(ENABLE_C_API)
-    UHD_INSTALL(FILES
+if(ENABLE_C_API)
+    uhd_install(FILES
         thread_priority.h
         log.h
         DESTINATION ${INCLUDE_DIR}/uhd/utils
         COMPONENT headers
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 2c1422119..fde10053f 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -8,95 +8,95 @@
 ########################################################################
 # Helpful Macros
 ########################################################################
-MACRO(LIBUHD_APPEND_SOURCES)
-    LIST(APPEND libuhd_sources ${ARGV})
-ENDMACRO(LIBUHD_APPEND_SOURCES)
+macro(LIBUHD_APPEND_SOURCES)
+    list(APPEND libuhd_sources ${ARGV})
+endmacro(LIBUHD_APPEND_SOURCES)
 
-MACRO(LIBUHD_APPEND_LIBS)
-    LIST(APPEND libuhd_libs ${ARGV})
-ENDMACRO(LIBUHD_APPEND_LIBS)
+macro(LIBUHD_APPEND_LIBS)
+    list(APPEND libuhd_libs ${ARGV})
+endmacro(LIBUHD_APPEND_LIBS)
 
-MACRO(LIBUHD_PYTHON_GEN_SOURCE pyfile outfile)
+macro(LIBUHD_PYTHON_GEN_SOURCE pyfile outfile)
     #ensure that the directory exists for outfile
-    GET_FILENAME_COMPONENT(outfile_dir ${outfile} PATH)
-    FILE(MAKE_DIRECTORY ${outfile_dir})
+    get_filename_component(outfile_dir ${outfile} PATH)
+    file(MAKE_DIRECTORY ${outfile_dir})
 
     #make the outfile depend on the python script
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${outfile} DEPENDS ${pyfile} ${LIBUHD_PYTHON_GEN_SOURCE_DEPS}
         COMMAND ${PYTHON_EXECUTABLE} -B ${pyfile} ${outfile}
         COMMENT "Generating ${outfile}"
     )
 
     #make libuhd depend on the outfile
-    LIBUHD_APPEND_SOURCES(${outfile})
-ENDMACRO(LIBUHD_PYTHON_GEN_SOURCE)
+    libuhd_append_sources(${outfile})
+endmacro(LIBUHD_PYTHON_GEN_SOURCE)
 
-MACRO(INCLUDE_SUBDIRECTORY subdir)
+macro(INCLUDE_SUBDIRECTORY subdir)
     #insert the current directories on the front of the list
-    LIST(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR})
-    LIST(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR})
+    list(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR})
+    list(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR})
 
     #set the current directories to the names of the subdirs
-    SET(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir})
-    SET(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir})
+    set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir})
+    set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir})
 
     #include the subdirectory CMakeLists to run it
-    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-    INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
+    file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
 
     #reset the value of the current directories
-    LIST(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR)
-    LIST(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR)
+    list(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR)
+    list(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR)
 
     #pop the subdir names of the front of the list
-    LIST(REMOVE_AT _cmake_source_dirs 0)
-    LIST(REMOVE_AT _cmake_binary_dirs 0)
-ENDMACRO(INCLUDE_SUBDIRECTORY)
+    list(REMOVE_AT _cmake_source_dirs 0)
+    list(REMOVE_AT _cmake_binary_dirs 0)
+endmacro(INCLUDE_SUBDIRECTORY)
 
 ########################################################################
 # Register lower level components
 ########################################################################
-MESSAGE(STATUS "")
+message(STATUS "")
 # Dependencies
-FIND_PACKAGE(USB1)
-FIND_PACKAGE(GPSD)
-FIND_PACKAGE(LIBERIO)
-LIBUHD_REGISTER_COMPONENT("LIBERIO" ENABLE_LIBERIO ON "ENABLE_LIBUHD;LIBERIO_FOUND" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("USB" ENABLE_USB ON "ENABLE_LIBUHD;LIBUSB_FOUND" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("GPSD" ENABLE_GPSD OFF "ENABLE_LIBUHD;ENABLE_GPSD;LIBGPS_FOUND" OFF OFF)
+find_package(USB1)
+find_package(GPSD)
+find_package(LIBERIO)
+libuhd_register_component("LIBERIO" ENABLE_LIBERIO ON "ENABLE_LIBUHD;LIBERIO_FOUND" OFF OFF)
+libuhd_register_component("USB" ENABLE_USB ON "ENABLE_LIBUHD;LIBUSB_FOUND" OFF OFF)
+libuhd_register_component("GPSD" ENABLE_GPSD OFF "ENABLE_LIBUHD;ENABLE_GPSD;LIBGPS_FOUND" OFF OFF)
 # Devices
-LIBUHD_REGISTER_COMPONENT("B100" ENABLE_B100 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("B200" ENABLE_B200 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("E300" ENABLE_E300 OFF "ENABLE_LIBUHD" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("USRP1" ENABLE_USRP1 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("USRP2" ENABLE_USRP2 ON "ENABLE_LIBUHD" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("X300" ENABLE_X300 ON "ENABLE_LIBUHD" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("N230" ENABLE_N230 ON "ENABLE_LIBUHD" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("MPMD" ENABLE_MPMD ON "ENABLE_LIBUHD" OFF OFF)
-LIBUHD_REGISTER_COMPONENT("OctoClock" ENABLE_OCTOCLOCK ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("B100" ENABLE_B100 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF)
+libuhd_register_component("B200" ENABLE_B200 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF)
+libuhd_register_component("E300" ENABLE_E300 OFF "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("USRP1" ENABLE_USRP1 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF)
+libuhd_register_component("USRP2" ENABLE_USRP2 ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("X300" ENABLE_X300 ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("N230" ENABLE_N230 ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("MPMD" ENABLE_MPMD ON "ENABLE_LIBUHD" OFF OFF)
+libuhd_register_component("OctoClock" ENABLE_OCTOCLOCK ON "ENABLE_LIBUHD" OFF OFF)
 
 ########################################################################
 # Include subdirectories (different than add)
 ########################################################################
-INCLUDE_SUBDIRECTORY(include)
-INCLUDE_SUBDIRECTORY(ic_reg_maps)
-INCLUDE_SUBDIRECTORY(types)
-INCLUDE_SUBDIRECTORY(convert)
-INCLUDE_SUBDIRECTORY(rfnoc)
-INCLUDE_SUBDIRECTORY(cal)
-INCLUDE_SUBDIRECTORY(usrp)
-INCLUDE_SUBDIRECTORY(usrp_clock)
-INCLUDE_SUBDIRECTORY(utils)
-INCLUDE_SUBDIRECTORY(experts)
-INCLUDE_SUBDIRECTORY(transport)
+include_subdirectory(include)
+include_subdirectory(ic_reg_maps)
+include_subdirectory(types)
+include_subdirectory(convert)
+include_subdirectory(rfnoc)
+include_subdirectory(cal)
+include_subdirectory(usrp)
+include_subdirectory(usrp_clock)
+include_subdirectory(utils)
+include_subdirectory(experts)
+include_subdirectory(transport)
 
 ########################################################################
 # Build info
 ########################################################################
-INCLUDE(UHDBuildInfo)
-UHD_LOAD_BUILD_INFO()
-CONFIGURE_FILE(
+include(UHDBuildInfo)
+uhd_load_build_info()
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/build_info.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/build_info.cpp
 @ONLY)
@@ -104,7 +104,7 @@ CONFIGURE_FILE(
 ########################################################################
 # Setup UHD_VERSION_STRING for version.cpp
 ########################################################################
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
 @ONLY)
@@ -112,7 +112,7 @@ CONFIGURE_FILE(
 ########################################################################
 # Append to the list of sources for lib uhd
 ########################################################################
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_BINARY_DIR}/build_info.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/deprecated.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/device.cpp
@@ -124,79 +124,79 @@ LIBUHD_APPEND_SOURCES(
     ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
 )
 
-IF(ENABLE_C_API)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_C_API)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/error_c.cpp
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
 
 ########################################################################
 # Add DLL resource file to Windows build
 ########################################################################
-IF(MSVC)
-    MATH(EXPR RC_VERSION_MAJOR_API "${UHD_VERSION_MAJOR} * 1000 + ${UHD_VERSION_API}")
-    SET(RC_VERSION_PATCH ${UHD_VERSION_PATCH})
-    IF(UHD_VERSION_DEVEL)
-        SET(RC_VERSION_PATCH "999")
-    ENDIF(UHD_VERSION_DEVEL)
+if(MSVC)
+    math(EXPR RC_VERSION_MAJOR_API "${UHD_VERSION_MAJOR} * 1000 + ${UHD_VERSION_API}")
+    set(RC_VERSION_PATCH ${UHD_VERSION_PATCH})
+    if(UHD_VERSION_DEVEL)
+        set(RC_VERSION_PATCH "999")
+    endif(UHD_VERSION_DEVEL)
 
     # Allow a custom .rc template file to be used
-    IF(CUSTOM_RC_FILE)
-        IF(IS_ABSOLUTE "${CUSTOM_RC_FILE}")
-            SET(UHD_RC_IN "${CUSTOM_RC_FILE}")
-        ELSE()
-            SET(UHD_RC_IN "${CMAKE_BINARY_DIR}/${CUSTOM_RC_FILE}")
-        ENDIF(IS_ABSOLUTE "${CUSTOM_RC_FILE}")
-        MESSAGE(STATUS "")
-        MESSAGE(STATUS "Using custom RC template: ${UHD_RC_IN}")
-        MESSAGE(STATUS "")
-    ELSE()
-        SET(UHD_RC_IN "${CMAKE_CURRENT_SOURCE_DIR}/uhd.rc.in")
-    ENDIF(CUSTOM_RC_FILE)
-    SET(UHD_RC_IN ${UHD_RC_IN} CACHE STRING "uhd.rc template filepath")
-
-    CONFIGURE_FILE(
+    if(CUSTOM_RC_FILE)
+        if(IS_ABSOLUTE "${CUSTOM_RC_FILE}")
+            set(UHD_RC_IN "${CUSTOM_RC_FILE}")
+        else()
+            set(UHD_RC_IN "${CMAKE_BINARY_DIR}/${CUSTOM_RC_FILE}")
+        endif(IS_ABSOLUTE "${CUSTOM_RC_FILE}")
+        message(STATUS "")
+        message(STATUS "Using custom RC template: ${UHD_RC_IN}")
+        message(STATUS "")
+    else()
+        set(UHD_RC_IN "${CMAKE_CURRENT_SOURCE_DIR}/uhd.rc.in")
+    endif(CUSTOM_RC_FILE)
+    set(UHD_RC_IN ${UHD_RC_IN} CACHE STRING "uhd.rc template filepath")
+
+    configure_file(
         ${UHD_RC_IN}
         ${CMAKE_CURRENT_BINARY_DIR}/uhd.rc
     @ONLY)
 
-    LIST(APPEND libuhd_sources ${CMAKE_CURRENT_BINARY_DIR}/uhd.rc)
-ENDIF(MSVC)
+    list(APPEND libuhd_sources ${CMAKE_CURRENT_BINARY_DIR}/uhd.rc)
+endif(MSVC)
 
 ########################################################################
 # Setup libuhd library
 ########################################################################
-IF(ENABLE_MPMD)
-    INCLUDE_DIRECTORIES(deps/rpclib/include)
-    ADD_SUBDIRECTORY(deps)
-    LIST(APPEND libuhd_sources $<TARGET_OBJECTS:uhd_rpclib>)
-ENDIF()
-ADD_LIBRARY(uhd SHARED ${libuhd_sources})
-TARGET_LINK_LIBRARIES(uhd ${Boost_LIBRARIES} ${libuhd_libs})
-SET_TARGET_PROPERTIES(uhd PROPERTIES DEFINE_SYMBOL "UHD_DLL_EXPORTS")
-IF(NOT LIBUHDDEV_PKG)
-    SET_TARGET_PROPERTIES(uhd PROPERTIES SOVERSION "${UHD_VERSION_MAJOR}")
-    SET_TARGET_PROPERTIES(uhd PROPERTIES VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}")
-ENDIF(NOT LIBUHDDEV_PKG)
-IF(DEFINED LIBUHD_OUTPUT_NAME)
-    SET_TARGET_PROPERTIES(uhd PROPERTIES OUTPUT_NAME ${LIBUHD_OUTPUT_NAME})
-ENDIF(DEFINED LIBUHD_OUTPUT_NAME)
-
-IF(NOT UHDHOST_PKG) #Syntax makes it unusable by UHD_INSTALL
-    INSTALL(TARGETS uhd
+if(ENABLE_MPMD)
+    include_directories(deps/rpclib/include)
+    add_subdirectory(deps)
+    list(APPEND libuhd_sources $<TARGET_OBJECTS:uhd_rpclib>)
+endif()
+add_library(uhd SHARED ${libuhd_sources})
+target_link_libraries(uhd ${Boost_LIBRARIES} ${libuhd_libs})
+set_target_properties(uhd PROPERTIES DEFINE_SYMBOL "UHD_DLL_EXPORTS")
+if(NOT LIBUHDDEV_PKG)
+    set_target_properties(uhd PROPERTIES SOVERSION "${UHD_VERSION_MAJOR}")
+    set_target_properties(uhd PROPERTIES VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}")
+endif(NOT LIBUHDDEV_PKG)
+if(DEFINED LIBUHD_OUTPUT_NAME)
+    set_target_properties(uhd PROPERTIES OUTPUT_NAME ${LIBUHD_OUTPUT_NAME})
+endif(DEFINED LIBUHD_OUTPUT_NAME)
+
+if(NOT UHDHOST_PKG) #Syntax makes it unusable by UHD_INSTALL
+    install(TARGETS uhd
         LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .so file
         ARCHIVE DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .lib file
         RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT libraries # .dll file
     )
-ENDIF(NOT UHDHOST_PKG)
+endif(NOT UHDHOST_PKG)
 
 #######################################################
 # Setup libuhd library (static)
 #######################################################
-IF(ENABLE_STATIC_LIBS)
-    ADD_LIBRARY(uhd_static STATIC ${libuhd_sources})
-    SET_TARGET_PROPERTIES(uhd_static PROPERTIES OUTPUT_NAME uhd)
-    INSTALL(TARGETS uhd_static
+if(ENABLE_STATIC_LIBS)
+    add_library(uhd_static STATIC ${libuhd_sources})
+    set_target_properties(uhd_static PROPERTIES OUTPUT_NAME uhd)
+    install(TARGETS uhd_static
         ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib or .a file
     )
-ENDIF(ENABLE_STATIC_LIBS)
+endif(ENABLE_STATIC_LIBS)
diff --git a/host/lib/cal/CMakeLists.txt b/host/lib/cal/CMakeLists.txt
index db15334a4..86d22d310 100644
--- a/host/lib/cal/CMakeLists.txt
+++ b/host/lib/cal/CMakeLists.txt
@@ -8,15 +8,15 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-INCLUDE(CheckIncludeFileCXX)
-MESSAGE(STATUS "")
+include(CheckIncludeFileCXX)
+message(STATUS "")
 
 ########################################################################
 # Convert types generation
 ########################################################################
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/power_container_impl.cpp
 )
diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt
index 219d3b74d..3599c5f31 100644
--- a/host/lib/convert/CMakeLists.txt
+++ b/host/lib/convert/CMakeLists.txt
@@ -8,31 +8,31 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-INCLUDE(CheckIncludeFileCXX)
-MESSAGE(STATUS "")
+include(CheckIncludeFileCXX)
+message(STATUS "")
 
 ########################################################################
 # Check for SSE2 SIMD headers
 ########################################################################
-IF(CMAKE_COMPILER_IS_GNUCXX)
-    SET(EMMINTRIN_FLAGS -msse2)
-    SET(TMMINTRIN_FLAGS -mssse3)
-ELSEIF(MSVC)
-    SET(EMMINTRIN_FLAGS /arch:SSE2)
-ENDIF()
+if(CMAKE_COMPILER_IS_GNUCXX)
+    set(EMMINTRIN_FLAGS -msse2)
+    set(TMMINTRIN_FLAGS -mssse3)
+elseif(MSVC)
+    set(EMMINTRIN_FLAGS /arch:SSE2)
+endif()
 
-SET(CMAKE_REQUIRED_FLAGS ${EMMINTRIN_FLAGS})
-CHECK_INCLUDE_FILE_CXX(emmintrin.h HAVE_EMMINTRIN_H)
-SET(CMAKE_REQUIRED_FLAGS)
+set(CMAKE_REQUIRED_FLAGS ${EMMINTRIN_FLAGS})
+check_include_file_cxx(emmintrin.h HAVE_EMMINTRIN_H)
+set(CMAKE_REQUIRED_FLAGS)
 
-IF(ENABLE_SSSE3)
-SET(CMAKE_REQUIRED_FLAGS ${TMMINTRIN_FLAGS})
-CHECK_INCLUDE_FILE_CXX(tmmintrin.h HAVE_TMMINTRIN_H)
-SET(CMAKE_REQUIRED_FLAGS)
-ENDIF(ENABLE_SSSE3)
+if(ENABLE_SSSE3)
+set(CMAKE_REQUIRED_FLAGS ${TMMINTRIN_FLAGS})
+check_include_file_cxx(tmmintrin.h HAVE_TMMINTRIN_H)
+set(CMAKE_REQUIRED_FLAGS)
+endif(ENABLE_SSSE3)
 
-IF(HAVE_EMMINTRIN_H)
-    SET(convert_with_sse2_sources
+if(HAVE_EMMINTRIN_H)
+    set(convert_with_sse2_sources
         ${CMAKE_CURRENT_SOURCE_DIR}/sse2_sc16_to_sc16.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/sse2_sc16_to_fc64.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/sse2_sc16_to_fc32.cpp
@@ -43,53 +43,53 @@ IF(HAVE_EMMINTRIN_H)
         ${CMAKE_CURRENT_SOURCE_DIR}/sse2_fc64_to_sc8.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/sse2_fc32_to_sc8.cpp
     )
-    SET_SOURCE_FILES_PROPERTIES(
+    set_source_files_properties(
         ${convert_with_sse2_sources}
         PROPERTIES COMPILE_FLAGS "${EMMINTRIN_FLAGS}"
     )
-    LIBUHD_APPEND_SOURCES(${convert_with_sse2_sources})
-ENDIF(HAVE_EMMINTRIN_H)
+    libuhd_append_sources(${convert_with_sse2_sources})
+endif(HAVE_EMMINTRIN_H)
 
-IF(HAVE_TMMINTRIN_H)
-    SET(convert_with_ssse3_sources
+if(HAVE_TMMINTRIN_H)
+    set(convert_with_ssse3_sources
         ${CMAKE_CURRENT_SOURCE_DIR}/ssse3_pack_sc12.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/ssse3_unpack_sc12.cpp
     )
-    SET_SOURCE_FILES_PROPERTIES(
+    set_source_files_properties(
         ${convert_with_ssse3_sources}
         PROPERTIES COMPILE_FLAGS "${TMMINTRIN_FLAGS}"
     )
-    LIBUHD_APPEND_SOURCES(${convert_with_ssse3_sources})
-ENDIF(HAVE_TMMINTRIN_H)
+    libuhd_append_sources(${convert_with_ssse3_sources})
+endif(HAVE_TMMINTRIN_H)
 
 ########################################################################
 # Check for NEON SIMD headers
 ########################################################################
-IF(CMAKE_COMPILER_IS_GNUCXX)
-    CHECK_INCLUDE_FILE_CXX(arm_neon.h HAVE_ARM_NEON_H)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX)
+    check_include_file_cxx(arm_neon.h HAVE_ARM_NEON_H)
+endif(CMAKE_COMPILER_IS_GNUCXX)
 
-IF(HAVE_ARM_NEON_H AND (${CMAKE_SIZEOF_VOID_P} EQUAL 4))
-    ENABLE_LANGUAGE(ASM)
+if(HAVE_ARM_NEON_H AND (${CMAKE_SIZEOF_VOID_P} EQUAL 4))
+    enable_language(ASM)
 
-    LIBUHD_APPEND_SOURCES(
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/convert_neon.S
     )
-ENDIF()
+endif()
 
 ########################################################################
 # Convert types generation
 ########################################################################
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_convert_general.py
     ${CMAKE_CURRENT_BINARY_DIR}/convert_general.cpp
 )
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_tables.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/convert_impl.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/convert_item32.cpp
diff --git a/host/lib/deps/CMakeLists.txt b/host/lib/deps/CMakeLists.txt
index a3858bad8..6e171efea 100644
--- a/host/lib/deps/CMakeLists.txt
+++ b/host/lib/deps/CMakeLists.txt
@@ -4,6 +4,6 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-IF(ENABLE_MPMD)
-    ADD_SUBDIRECTORY(rpclib)
-ENDIF()
+if(ENABLE_MPMD)
+    add_subdirectory(rpclib)
+endif()
diff --git a/host/lib/deps/rpclib/CMakeLists.txt b/host/lib/deps/rpclib/CMakeLists.txt
index dd53fabe8..56c4865c4 100644
--- a/host/lib/deps/rpclib/CMakeLists.txt
+++ b/host/lib/deps/rpclib/CMakeLists.txt
@@ -1,26 +1,26 @@
-PROJECT(UHD_RPCLIB CXX)
+project(UHD_RPCLIB CXX)
 
-SET(RPCLIB_DEFAULT_BUFFER_SIZE "1024 << 10" CACHE STRING "Default buffer size")
+set(RPCLIB_DEFAULT_BUFFER_SIZE "1024 << 10" CACHE STRING "Default buffer size")
 
-SET(RPCLIB_VERISION_MAJOR 1)
-SET(RPCLIB_VERSION_MINOR 0)
-SET(RPCLIB_VERSION_PATCH 0)
+set(RPCLIB_VERISION_MAJOR 1)
+set(RPCLIB_VERSION_MINOR 0)
+set(RPCLIB_VERSION_PATCH 0)
 
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/include/rpc/version.h.in
     ${CMAKE_CURRENT_BINARY_DIR}/version.h)
 
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/include/rpc/config.h.in
     ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
-SET(RPCLIB_COMPILE_DEFINITIONS "")
-IF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+set(RPCLIB_COMPILE_DEFINITIONS "")
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
 
-ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
 
-ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
-    SET(RPCLIB_COMPILE_DEFINITIONS
+elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
+    set(RPCLIB_COMPILE_DEFINITIONS
         "${RPCLIB_COMPILE_DEFINITIONS}"
         "WIN32_LEAN_AND_MEAN"
         "NOMINMAX"
@@ -35,11 +35,11 @@ ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
         "ASIO_HAS_STD_SHARED_PTR"
         "ASIO_HAS_STD_TYPE_TRAITS"
     )
-ENDIF()
+endif()
 
-INCLUDE_DIRECTORIES(include)
-INCLUDE_DIRECTORIES(include/rpc)
-ADD_LIBRARY(uhd_rpclib OBJECT
+include_directories(include)
+include_directories(include/rpc)
+add_library(uhd_rpclib OBJECT
     lib/rpc/dispatcher.cc
     lib/rpc/server.cc
     lib/rpc/client.cc
@@ -51,7 +51,7 @@ ADD_LIBRARY(uhd_rpclib OBJECT
     lib/rpc/detail/response.cc
     lib/rpc/detail/client_error.cc
 )
-SET_TARGET_PROPERTIES(uhd_rpclib
+set_target_properties(uhd_rpclib
     PROPERTIES
     POSITION_INDEPENDENT_CODE ON
     COMPILE_DEFINITIONS "${RPCLIB_COMPILE_DEFINITIONS}"
diff --git a/host/lib/experts/CMakeLists.txt b/host/lib/experts/CMakeLists.txt
index 3101a7330..739a4c35e 100644
--- a/host/lib/experts/CMakeLists.txt
+++ b/host/lib/experts/CMakeLists.txt
@@ -8,15 +8,15 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/expert_container.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/expert_factory.cpp
 )
 
 # Verbose Debug output for send/recv
-SET( UHD_EXPERT_LOGGING OFF CACHE BOOL "Enable verbose logging for experts" )
-OPTION( UHD_EXPERT_LOGGING "Enable verbose logging for experts" "" )
-IF(UHD_EXPERT_LOGGING)
-    MESSAGE(STATUS "Enabling verbose logging for experts")
-    ADD_DEFINITIONS(-DUHD_EXPERT_LOGGING)
-ENDIF()
+set( UHD_EXPERT_LOGGING OFF CACHE BOOL "Enable verbose logging for experts" )
+option( UHD_EXPERT_LOGGING "Enable verbose logging for experts" "" )
+if(UHD_EXPERT_LOGGING)
+    message(STATUS "Enabling verbose logging for experts")
+    add_definitions(-DUHD_EXPERT_LOGGING)
+endif()
diff --git a/host/lib/ic_reg_maps/CMakeLists.txt b/host/lib/ic_reg_maps/CMakeLists.txt
index c917f9627..1c257d421 100644
--- a/host/lib/ic_reg_maps/CMakeLists.txt
+++ b/host/lib/ic_reg_maps/CMakeLists.txt
@@ -9,127 +9,127 @@
 # This file included, use CMake directory variables
 ########################################################################
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-SET(LIBUHD_PYTHON_GEN_SOURCE_DEPS ${CMAKE_CURRENT_SOURCE_DIR}/common.py)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+set(LIBUHD_PYTHON_GEN_SOURCE_DEPS ${CMAKE_CURRENT_SOURCE_DIR}/common.py)
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf4350_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/adf4350_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf4351_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/adf4351_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2870_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/max2870_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2871_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/max2871_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf4360_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/adf4360_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9510_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/ad9510_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9777_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/ad9777_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad5623_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/ad5623_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad7922_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/ad7922_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2829_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/max2829_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2118_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/max2118_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2112_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/max2112_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2112_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/max2112_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9862_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/ad9862_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9522_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/ad9522_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_ads62p44_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/ads62p44_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_ads62p48_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/ads62p48_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_tuner_4937di5_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/tuner_4937di5_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_tda18272hnm_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/tda18272hnm_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_lmk04816_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/lmk04816_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf5355_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/adf5355_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf5356_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/adf5356_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_lmk04828_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/lmk04828_regs.hpp
 )
 
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_mgcpld_regs.py
     ${CMAKE_CURRENT_BINARY_DIR}/magnesium_cpld_regs.hpp
 )
 
-SET(LIBUHD_PYTHON_GEN_SOURCE_DEPS)
+set(LIBUHD_PYTHON_GEN_SOURCE_DEPS)
diff --git a/host/lib/include/CMakeLists.txt b/host/lib/include/CMakeLists.txt
index 5eea68f80..9ba3273d9 100644
--- a/host/lib/include/CMakeLists.txt
+++ b/host/lib/include/CMakeLists.txt
@@ -4,5 +4,5 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
diff --git a/host/lib/rfnoc/CMakeLists.txt b/host/lib/rfnoc/CMakeLists.txt
index 9ee4970a3..ba748587f 100644
--- a/host/lib/rfnoc/CMakeLists.txt
+++ b/host/lib/rfnoc/CMakeLists.txt
@@ -9,7 +9,7 @@
 # This file included, use CMake directory variables
 ########################################################################
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     # Infrastructure:
     ${CMAKE_CURRENT_SOURCE_DIR}/block_ctrl_base.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/block_ctrl_base_factory.cpp
@@ -38,4 +38,4 @@ LIBUHD_APPEND_SOURCES(
     ${CMAKE_CURRENT_SOURCE_DIR}/dma_fifo_block_ctrl_impl.cpp
 )
 
-INCLUDE_SUBDIRECTORY(nocscript)
+include_subdirectory(nocscript)
diff --git a/host/lib/rfnoc/nocscript/CMakeLists.txt b/host/lib/rfnoc/nocscript/CMakeLists.txt
index 503bd5e03..f0329dbdf 100644
--- a/host/lib/rfnoc/nocscript/CMakeLists.txt
+++ b/host/lib/rfnoc/nocscript/CMakeLists.txt
@@ -5,21 +5,21 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-LIBUHD_PYTHON_GEN_SOURCE(
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_basic_funcs.py
     ${CMAKE_CURRENT_BINARY_DIR}/basic_functions.hpp
 )
 
-IF(ENABLE_MANUAL)
-    LIBUHD_PYTHON_GEN_SOURCE(
+if(ENABLE_MANUAL)
+    libuhd_python_gen_source(
         ${CMAKE_CURRENT_SOURCE_DIR}/gen_basic_funcs.py
         ${CMAKE_BINARY_DIR}/docs/nocscript_functions.dox
     )
-ENDIF(ENABLE_MANUAL)
+endif(ENABLE_MANUAL)
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/expression.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/function_table.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/parser.cpp
diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt
index ae903d956..5b27791e8 100644
--- a/host/lib/transport/CMakeLists.txt
+++ b/host/lib/transport/CMakeLists.txt
@@ -12,43 +12,43 @@
 ########################################################################
 # Include subdirectories (different than add)
 ########################################################################
-IF(ENABLE_X300)
-    INCLUDE_SUBDIRECTORY(nirio)
-ENDIF(ENABLE_X300)
+if(ENABLE_X300)
+    include_subdirectory(nirio)
+endif(ENABLE_X300)
 
 ########################################################################
 # Setup libusb
 ########################################################################
-IF(ENABLE_USB)
-    MESSAGE(STATUS "")
-    MESSAGE(STATUS "USB support enabled via libusb.")
-    INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS})
-    LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES})
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_USB)
+    message(STATUS "")
+    message(STATUS "USB support enabled via libusb.")
+    include_directories(${LIBUSB_INCLUDE_DIRS})
+    libuhd_append_libs(${LIBUSB_LIBRARIES})
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_control.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_zero_copy.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_base.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_base.hpp
     )
-    SET_SOURCE_FILES_PROPERTIES(
+    set_source_files_properties(
         ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_zero_copy.cpp
         PROPERTIES COMPILE_DEFINITIONS "${LIBUSB_DEFINITIONS}"
     )
-ELSE(ENABLE_USB)
-    LIBUHD_APPEND_SOURCES(
+else(ENABLE_USB)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/usb_dummy_impl.cpp
     )
-ENDIF(ENABLE_USB)
+endif(ENABLE_USB)
 
 ########################################################################
 # Setup defines for interface address discovery
 ########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Configuring interface address discovery...")
-INCLUDE(CheckCXXSourceCompiles)
-INCLUDE(CheckIncludeFileCXX)
+message(STATUS "")
+message(STATUS "Configuring interface address discovery...")
+include(CheckCXXSourceCompiles)
+include(CheckIncludeFileCXX)
 
-CHECK_CXX_SOURCE_COMPILES("
+check_cxx_source_compiles("
     #include <ifaddrs.h>
     int main(){
         struct ifaddrs *ifap;
@@ -58,20 +58,20 @@ CHECK_CXX_SOURCE_COMPILES("
     " HAVE_GETIFADDRS
 )
 
-CHECK_INCLUDE_FILE_CXX(winsock2.h HAVE_WINSOCK2_H)
+check_include_file_cxx(winsock2.h HAVE_WINSOCK2_H)
 
-IF(HAVE_GETIFADDRS)
-    MESSAGE(STATUS "  Interface address discovery supported through getifaddrs.")
-    SET(IF_ADDRS_DEFS HAVE_GETIFADDRS)
-ELSEIF(HAVE_WINSOCK2_H)
-    MESSAGE(STATUS "  Interface address discovery supported through SIO_GET_INTERFACE_LIST.")
-    SET(IF_ADDRS_DEFS HAVE_SIO_GET_INTERFACE_LIST)
-ELSE()
-    MESSAGE(STATUS "  Interface address discovery not supported.")
-    SET(IF_ADDRS_DEFS HAVE_IF_ADDRS_DUMMY)
-ENDIF()
+if(HAVE_GETIFADDRS)
+    message(STATUS "  Interface address discovery supported through getifaddrs.")
+    set(IF_ADDRS_DEFS HAVE_GETIFADDRS)
+elseif(HAVE_WINSOCK2_H)
+    message(STATUS "  Interface address discovery supported through SIO_GET_INTERFACE_LIST.")
+    set(IF_ADDRS_DEFS HAVE_SIO_GET_INTERFACE_LIST)
+else()
+    message(STATUS "  Interface address discovery not supported.")
+    set(IF_ADDRS_DEFS HAVE_IF_ADDRS_DUMMY)
+endif()
 
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
     ${CMAKE_CURRENT_SOURCE_DIR}/if_addrs.cpp
     PROPERTIES COMPILE_DEFINITIONS "${IF_ADDRS_DEFS}"
 )
@@ -79,39 +79,39 @@ SET_SOURCE_FILES_PROPERTIES(
 ########################################################################
 # Setup UDP
 ########################################################################
-IF(WIN32)
-    LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/udp_wsa_zero_copy.cpp)
-ELSE()
-    LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy.cpp)
-ENDIF()
+if(WIN32)
+    libuhd_append_sources(${CMAKE_CURRENT_SOURCE_DIR}/udp_wsa_zero_copy.cpp)
+else()
+    libuhd_append_sources(${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy.cpp)
+endif()
 
 #On windows, the boost asio implementation uses the winsock2 library.
 #Note: we exclude the .lib extension for cygwin and mingw platforms.
-IF(WIN32)
-    LIBUHD_APPEND_LIBS(ws2_32)
-ENDIF()
+if(WIN32)
+    libuhd_append_libs(ws2_32)
+endif()
 
 #atlbase.h is not included with visual studio express
 #conditionally check for atlbase.h and define if found
-INCLUDE(CheckIncludeFileCXX)
-CHECK_INCLUDE_FILE_CXX(atlbase.h HAVE_ATLBASE_H)
-IF(HAVE_ATLBASE_H)
-    SET_SOURCE_FILES_PROPERTIES(
+include(CheckIncludeFileCXX)
+check_include_file_cxx(atlbase.h HAVE_ATLBASE_H)
+if(HAVE_ATLBASE_H)
+    set_source_files_properties(
         ${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/udp_wsa_zero_copy.cpp
         PROPERTIES COMPILE_DEFINITIONS "HAVE_ATLBASE_H"
     )
-ENDIF(HAVE_ATLBASE_H)
+endif(HAVE_ATLBASE_H)
 
 ########################################################################
 # Append to the list of sources for lib uhd
 ########################################################################
-LIBUHD_PYTHON_GEN_SOURCE(
+libuhd_python_gen_source(
     ${CMAKE_CURRENT_SOURCE_DIR}/gen_vrt_if_packet.py
     ${CMAKE_CURRENT_BINARY_DIR}/vrt_if_packet.cpp
 )
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/zero_copy_recv_offload.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/tcp_zero_copy.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/buffer_pool.cpp
@@ -122,27 +122,27 @@ LIBUHD_APPEND_SOURCES(
     ${CMAKE_CURRENT_SOURCE_DIR}/zero_copy_flow_ctrl.cpp
 )
 
-IF(ENABLE_X300)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_X300)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/nirio_zero_copy.cpp
     )
-ENDIF(ENABLE_X300)
-
-IF(ENABLE_LIBERIO)
-    MESSAGE(STATUS "")
-    MESSAGE(STATUS "liberio support enabled.")
-    INCLUDE_DIRECTORIES(${LIBERIO_INCLUDE_DIRS})
-    LIBUHD_APPEND_LIBS(${LIBERIO_LIBRARIES})
-    LIBUHD_APPEND_SOURCES(
+endif(ENABLE_X300)
+
+if(ENABLE_LIBERIO)
+    message(STATUS "")
+    message(STATUS "liberio support enabled.")
+    include_directories(${LIBERIO_INCLUDE_DIRS})
+    libuhd_append_libs(${LIBERIO_LIBRARIES})
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/liberio_zero_copy.cpp
     )
-ENDIF(ENABLE_LIBERIO)
+endif(ENABLE_LIBERIO)
 
 # Verbose Debug output for send/recv
-SET( UHD_TXRX_DEBUG_PRINTS OFF CACHE BOOL "Use verbose debug output for send/recv" )
-OPTION( UHD_TXRX_DEBUG_PRINTS "Use verbose debug output for send/recv" "" )
-IF(UHD_TXRX_DEBUG_PRINTS)
-	MESSAGE(STATUS "Using verbose debug output for send/recv")
-	ADD_DEFINITIONS(-DUHD_TXRX_DEBUG_PRINTS)
-ENDIF()
+set( UHD_TXRX_DEBUG_PRINTS OFF CACHE BOOL "Use verbose debug output for send/recv" )
+option( UHD_TXRX_DEBUG_PRINTS "Use verbose debug output for send/recv" "" )
+if(UHD_TXRX_DEBUG_PRINTS)
+	message(STATUS "Using verbose debug output for send/recv")
+	add_definitions(-DUHD_TXRX_DEBUG_PRINTS)
+endif()
 
diff --git a/host/lib/transport/nirio/CMakeLists.txt b/host/lib/transport/nirio/CMakeLists.txt
index 8336d6063..85c09a95a 100644
--- a/host/lib/transport/nirio/CMakeLists.txt
+++ b/host/lib/transport/nirio/CMakeLists.txt
@@ -12,14 +12,14 @@
 ########################################################################
 # Include subdirectories (different than add)
 ########################################################################
-INCLUDE_SUBDIRECTORY(lvbitx)
-INCLUDE_SUBDIRECTORY(rpc)
+include_subdirectory(lvbitx)
+include_subdirectory(rpc)
 
 ########################################################################
 # Append to the list of sources for lib uhd
 ########################################################################
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/nifpga_lvbitx.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/niusrprio_session.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/niriok_proxy.cpp
@@ -29,10 +29,10 @@ LIBUHD_APPEND_SOURCES(
     ${CMAKE_CURRENT_SOURCE_DIR}/status.cpp
 )
 
-IF(WIN32)
-    LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_win.cpp)
-ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") #Built-in variable encompasses all UNIX-like systems
-    LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_linux.cpp)
-ELSE()
-    LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_unsupported.cpp)
-ENDIF(WIN32)
+if(WIN32)
+    libuhd_append_sources(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_win.cpp)
+elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") #Built-in variable encompasses all UNIX-like systems
+    libuhd_append_sources(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_linux.cpp)
+else()
+    libuhd_append_sources(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_unsupported.cpp)
+endif(WIN32)
diff --git a/host/lib/transport/nirio/lvbitx/CMakeLists.txt b/host/lib/transport/nirio/lvbitx/CMakeLists.txt
index 6fbd6b469..6da3c3788 100644
--- a/host/lib/transport/nirio/lvbitx/CMakeLists.txt
+++ b/host/lib/transport/nirio/lvbitx/CMakeLists.txt
@@ -5,21 +5,21 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-MACRO(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM lvbitx binfile)
-    GET_FILENAME_COMPONENT(lvbitxprefix ${lvbitx} NAME_WE)
+macro(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM lvbitx binfile)
+    get_filename_component(lvbitxprefix ${lvbitx} NAME_WE)
 
-    IF( ${binfile} STREQUAL "OFF" )
-        SET( GEN_OPTIONS )
-        MESSAGE( STATUS "  Using ${lvbitx} for codegen" )
-    ELSE( ${binfile} STREQUAL "OFF" )
-        SET( GEN_OPTIONS --merge-bin=${CMAKE_SOURCE_DIR}/../binaries/${binfile} --output-lvbitx-path=${CMAKE_SOURCE_DIR}/../binaries )
-        MESSAGE( STATUS "  Merging ${lvbitx} with ${binfile} for codegen" )
-    ENDIF( ${binfile} STREQUAL "OFF" )
+    if( ${binfile} STREQUAL "OFF" )
+        set( GEN_OPTIONS )
+        message( STATUS "  Using ${lvbitx} for codegen" )
+    else( ${binfile} STREQUAL "OFF" )
+        set( GEN_OPTIONS --merge-bin=${CMAKE_SOURCE_DIR}/../binaries/${binfile} --output-lvbitx-path=${CMAKE_SOURCE_DIR}/../binaries )
+        message( STATUS "  Merging ${lvbitx} with ${binfile} for codegen" )
+    endif( ${binfile} STREQUAL "OFF" )
 
-    SET(OUTPUT_PATH_OPT --output-src-path=${CMAKE_CURRENT_BINARY_DIR})
-    SET(IMAGES_PATH_OPT --uhd-images-path=${UHD_IMAGES_DIR})
+    set(OUTPUT_PATH_OPT --output-src-path=${CMAKE_CURRENT_BINARY_DIR})
+    set(IMAGES_PATH_OPT --uhd-images-path=${UHD_IMAGES_DIR})
 
-    ADD_CUSTOM_COMMAND(
+    add_custom_command(
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.cpp
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.hpp
         DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/process-lvbitx.py
@@ -31,21 +31,21 @@ MACRO(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM lvbitx binfile)
     )
 
     #make libuhd depend on the output file
-    LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.hpp)
-    LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.cpp)
-ENDMACRO(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM)
+    libuhd_append_sources(${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.hpp)
+    libuhd_append_sources(${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.cpp)
+endmacro(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
 ########################################################################
 # Generation code
 ########################################################################
 
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Processing NI-RIO FPGA LVBITX Bitstreams...")
+message(STATUS "")
+message(STATUS "Processing NI-RIO FPGA LVBITX Bitstreams...")
 
 # X300 Stuff
-LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM(x300.lvbitx_base OFF)
+libuhd_lvbitx_gen_source_and_bitstream(x300.lvbitx_base OFF)
 
 # X310 Stuff
-LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM(x310.lvbitx_base OFF)
+libuhd_lvbitx_gen_source_and_bitstream(x310.lvbitx_base OFF)
diff --git a/host/lib/transport/nirio/rpc/CMakeLists.txt b/host/lib/transport/nirio/rpc/CMakeLists.txt
index bde242ca3..c02d60a2d 100644
--- a/host/lib/transport/nirio/rpc/CMakeLists.txt
+++ b/host/lib/transport/nirio/rpc/CMakeLists.txt
@@ -13,7 +13,7 @@
 # Append to the list of sources for lib uhd
 ########################################################################
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/rpc_client.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/usrprio_rpc_client.cpp
 )
diff --git a/host/lib/types/CMakeLists.txt b/host/lib/types/CMakeLists.txt
index 2156160cd..c6b998821 100644
--- a/host/lib/types/CMakeLists.txt
+++ b/host/lib/types/CMakeLists.txt
@@ -8,12 +8,12 @@
 ########################################################################
 # Setup defines for high resolution timing
 ########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Configuring high resolution timing...")
-INCLUDE(CheckCXXSourceCompiles)
+message(STATUS "")
+message(STATUS "Configuring high resolution timing...")
+include(CheckCXXSourceCompiles)
 
-SET(CMAKE_REQUIRED_LIBRARIES -lrt)
-CHECK_CXX_SOURCE_COMPILES("
+set(CMAKE_REQUIRED_LIBRARIES -lrt)
+check_cxx_source_compiles("
     #include <ctime>
     int main(){
         timespec ts;
@@ -21,10 +21,10 @@ CHECK_CXX_SOURCE_COMPILES("
     }
     " HAVE_CLOCK_GETTIME
 )
-SET(CMAKE_REQUIRED_LIBRARIES)
+set(CMAKE_REQUIRED_LIBRARIES)
 
-INCLUDE(CheckCXXSourceCompiles)
-CHECK_CXX_SOURCE_COMPILES("
+include(CheckCXXSourceCompiles)
+check_cxx_source_compiles("
     #include <mach/mach_time.h>
     int main(){
         mach_timebase_info_data_t info;
@@ -35,33 +35,33 @@ CHECK_CXX_SOURCE_COMPILES("
     " HAVE_MACH_ABSOLUTE_TIME
 )
 
-CHECK_CXX_SOURCE_COMPILES("
+check_cxx_source_compiles("
     #include <Windows.h>
     int main(){
         LARGE_INTEGER value;
-        QueryPerformanceCounter(&value);
-        QueryPerformanceFrequency(&value);
+        queryperformancecounter(&value);
+        queryperformancefrequency(&value);
         return 0;
     }
     " HAVE_QUERY_PERFORMANCE_COUNTER
 )
 
-IF(HAVE_CLOCK_GETTIME)
-    MESSAGE(STATUS "  High resolution timing supported through clock_gettime.")
-    SET(TIME_SPEC_DEFS HAVE_CLOCK_GETTIME)
-    LIBUHD_APPEND_LIBS("-lrt")
-ELSEIF(HAVE_MACH_ABSOLUTE_TIME)
-    MESSAGE(STATUS "  High resolution timing supported through mach_absolute_time.")
-    SET(TIME_SPEC_DEFS HAVE_MACH_ABSOLUTE_TIME)
-ELSEIF(HAVE_QUERY_PERFORMANCE_COUNTER)
-    MESSAGE(STATUS "  High resolution timing supported through QueryPerformanceCounter.")
-    SET(TIME_SPEC_DEFS HAVE_QUERY_PERFORMANCE_COUNTER)
-ELSE()
-    MESSAGE(STATUS "  High resolution timing supported though microsec_clock.")
-    SET(TIME_SPEC_DEFS HAVE_MICROSEC_CLOCK)
-ENDIF()
+if(HAVE_CLOCK_GETTIME)
+    message(STATUS "  High resolution timing supported through clock_gettime.")
+    set(TIME_SPEC_DEFS HAVE_CLOCK_GETTIME)
+    libuhd_append_libs("-lrt")
+elseif(HAVE_MACH_ABSOLUTE_TIME)
+    message(STATUS "  High resolution timing supported through mach_absolute_time.")
+    set(TIME_SPEC_DEFS HAVE_MACH_ABSOLUTE_TIME)
+elseif(HAVE_QUERY_PERFORMANCE_COUNTER)
+    message(STATUS "  High resolution timing supported through QueryPerformanceCounter.")
+    set(TIME_SPEC_DEFS HAVE_QUERY_PERFORMANCE_COUNTER)
+else()
+    message(STATUS "  High resolution timing supported though microsec_clock.")
+    set(TIME_SPEC_DEFS HAVE_MICROSEC_CLOCK)
+endif()
 
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
     ${CMAKE_CURRENT_SOURCE_DIR}/time_spec.cpp
     PROPERTIES COMPILE_DEFINITIONS "${TIME_SPEC_DEFS}"
 )
@@ -69,7 +69,7 @@ SET_SOURCE_FILES_PROPERTIES(
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/device_addr.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/mac_addr.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/metadata.cpp
@@ -85,8 +85,8 @@ LIBUHD_APPEND_SOURCES(
     ${CMAKE_CURRENT_SOURCE_DIR}/byte_vector.cpp
 )
 
-IF(ENABLE_C_API)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_C_API)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/metadata_c.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/ranges_c.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/sensors_c.cpp
@@ -94,4 +94,4 @@ IF(ENABLE_C_API)
         ${CMAKE_CURRENT_SOURCE_DIR}/tune_c.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/usrp_info_c.cpp
     )
-ENDIF()
+endif()
diff --git a/host/lib/usrp/CMakeLists.txt b/host/lib/usrp/CMakeLists.txt
index 9a1818599..ac8bdf150 100644
--- a/host/lib/usrp/CMakeLists.txt
+++ b/host/lib/usrp/CMakeLists.txt
@@ -8,9 +8,9 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/dboard_base.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/dboard_eeprom.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/dboard_id.cpp
@@ -22,31 +22,31 @@ LIBUHD_APPEND_SOURCES(
     ${CMAKE_CURRENT_SOURCE_DIR}/fe_connection.cpp
 )
 
-IF(ENABLE_C_API)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_C_API)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/dboard_eeprom_c.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/mboard_eeprom_c.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/subdev_spec_c.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/usrp_c.cpp
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
 
-IF(ENABLE_GPSD)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_GPSD)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/gpsd_iface.cpp
     )
-    LIBUHD_APPEND_LIBS(${LIBGPS_LIBRARY})
-ENDIF(ENABLE_GPSD)
+    libuhd_append_libs(${LIBGPS_LIBRARY})
+endif(ENABLE_GPSD)
 
-INCLUDE_SUBDIRECTORY(cores)
-INCLUDE_SUBDIRECTORY(dboard)
-INCLUDE_SUBDIRECTORY(common)
-INCLUDE_SUBDIRECTORY(device3)
-INCLUDE_SUBDIRECTORY(mpmd)
-INCLUDE_SUBDIRECTORY(usrp1)
-INCLUDE_SUBDIRECTORY(usrp2)
-INCLUDE_SUBDIRECTORY(b100)
-INCLUDE_SUBDIRECTORY(e300)
-INCLUDE_SUBDIRECTORY(x300)
-INCLUDE_SUBDIRECTORY(b200)
-INCLUDE_SUBDIRECTORY(n230)
+include_subdirectory(cores)
+include_subdirectory(dboard)
+include_subdirectory(common)
+include_subdirectory(device3)
+include_subdirectory(mpmd)
+include_subdirectory(usrp1)
+include_subdirectory(usrp2)
+include_subdirectory(b100)
+include_subdirectory(e300)
+include_subdirectory(x300)
+include_subdirectory(b200)
+include_subdirectory(n230)
diff --git a/host/lib/usrp/b100/CMakeLists.txt b/host/lib/usrp/b100/CMakeLists.txt
index b1bcd22a4..bd1c3e40c 100644
--- a/host/lib/usrp/b100/CMakeLists.txt
+++ b/host/lib/usrp/b100/CMakeLists.txt
@@ -12,8 +12,8 @@
 ########################################################################
 # Conditionally configure the B100 support
 ########################################################################
-IF(ENABLE_B100)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_B100)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/b100_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp
@@ -22,4 +22,4 @@ IF(ENABLE_B100)
         ${CMAKE_CURRENT_SOURCE_DIR}/mb_eeprom.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/usb_zero_copy_wrapper.cpp
     )
-ENDIF(ENABLE_B100)
+endif(ENABLE_B100)
diff --git a/host/lib/usrp/b200/CMakeLists.txt b/host/lib/usrp/b200/CMakeLists.txt
index 2f3ea2483..13b0cbec2 100644
--- a/host/lib/usrp/b200/CMakeLists.txt
+++ b/host/lib/usrp/b200/CMakeLists.txt
@@ -12,8 +12,8 @@
 ########################################################################
 # Conditionally configure the B200 support
 ########################################################################
-IF(ENABLE_B200)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_B200)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/b200_image_loader.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/b200_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/b200_iface.cpp
@@ -22,4 +22,4 @@ IF(ENABLE_B200)
         ${CMAKE_CURRENT_SOURCE_DIR}/b200_cores.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/b200_mb_eeprom.cpp
     )
-ENDIF(ENABLE_B200)
+endif(ENABLE_B200)
diff --git a/host/lib/usrp/common/CMakeLists.txt b/host/lib/usrp/common/CMakeLists.txt
index 9e27fb880..b63ef2b70 100644
--- a/host/lib/usrp/common/CMakeLists.txt
+++ b/host/lib/usrp/common/CMakeLists.txt
@@ -8,24 +8,24 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-IF(ENABLE_USB)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_USB)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/fx2_ctrl.cpp
     )
-ENDIF(ENABLE_USB)
+endif(ENABLE_USB)
 
-IF(ENABLE_E300 OR ENABLE_B200 OR ENABLE_N230)
-    INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/ad9361_driver")
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_E300 OR ENABLE_B200 OR ENABLE_N230)
+    include_directories("${CMAKE_CURRENT_SOURCE_DIR}/ad9361_driver")
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/ad9361_ctrl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/ad936x_manager.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/ad9361_driver/ad9361_device.cpp
     )
-ENDIF(ENABLE_E300 OR ENABLE_B200 OR ENABLE_N230)
+endif(ENABLE_E300 OR ENABLE_B200 OR ENABLE_N230)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/adf4001_ctrl.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/adf435x.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/adf535x.cpp
diff --git a/host/lib/usrp/cores/CMakeLists.txt b/host/lib/usrp/cores/CMakeLists.txt
index 95102f29d..a13f90628 100644
--- a/host/lib/usrp/cores/CMakeLists.txt
+++ b/host/lib/usrp/cores/CMakeLists.txt
@@ -9,8 +9,8 @@
 # This file included, use CMake directory variables
 ########################################################################
 
-IF(ENABLE_B100 OR ENABLE_USRP2)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_B100 OR ENABLE_USRP2)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/gpio_core_200.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/i2c_core_200.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/rx_dsp_core_200.cpp
@@ -18,9 +18,9 @@ IF(ENABLE_B100 OR ENABLE_USRP2)
         ${CMAKE_CURRENT_SOURCE_DIR}/tx_dsp_core_200.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/user_settings_core_200.cpp
     )
-ENDIF(ENABLE_B100 OR ENABLE_USRP2)
+endif(ENABLE_B100 OR ENABLE_USRP2)
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/dma_fifo_core_3000.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/dsp_core_utils.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/gpio_atr_3000.cpp
diff --git a/host/lib/usrp/dboard/CMakeLists.txt b/host/lib/usrp/dboard/CMakeLists.txt
index 6bca04290..18daceed0 100644
--- a/host/lib/usrp/dboard/CMakeLists.txt
+++ b/host/lib/usrp/dboard/CMakeLists.txt
@@ -8,8 +8,8 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-IF(ENABLE_X300 OR ENABLE_USRP1 OR ENABLE_USRP2 OR ENABLE_B100)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_X300 OR ENABLE_USRP1 OR ENABLE_USRP2 OR ENABLE_B100)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/db_basic_and_lf.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/db_rfx.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/db_xcvr2450.cpp
@@ -29,22 +29,22 @@ IF(ENABLE_X300 OR ENABLE_USRP1 OR ENABLE_USRP2 OR ENABLE_B100)
         ${CMAKE_CURRENT_SOURCE_DIR}/db_dbsrx2.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/db_tvrx2.cpp
     )
-ENDIF(ENABLE_X300 OR ENABLE_USRP1 OR ENABLE_USRP2 OR ENABLE_B100)
+endif(ENABLE_X300 OR ENABLE_USRP1 OR ENABLE_USRP2 OR ENABLE_B100)
 
-IF(ENABLE_E300)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_E300)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/db_e3x0.cpp
     )
-ENDIF(ENABLE_E300)
+endif(ENABLE_E300)
 
-IF(ENABLE_X300)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_X300)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/twinrx/twinrx_ctrl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/twinrx/twinrx_experts.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/twinrx/twinrx_gain_tables.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/db_twinrx.cpp
     )
-ENDIF(ENABLE_X300)
+endif(ENABLE_X300)
 
-INCLUDE_SUBDIRECTORY(magnesium)
-INCLUDE_SUBDIRECTORY(eiscat)
+include_subdirectory(magnesium)
+include_subdirectory(eiscat)
diff --git a/host/lib/usrp/dboard/eiscat/CMakeLists.txt b/host/lib/usrp/dboard/eiscat/CMakeLists.txt
index 156e139fb..f42b2b27d 100644
--- a/host/lib/usrp/dboard/eiscat/CMakeLists.txt
+++ b/host/lib/usrp/dboard/eiscat/CMakeLists.txt
@@ -4,10 +4,10 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-IF(ENABLE_MPMD AND ENABLE_EISCAT)
-    LIST(APPEND EISCAT_SOURCES
+if(ENABLE_MPMD AND ENABLE_EISCAT)
+    list(APPEND EISCAT_SOURCES
         ${CMAKE_CURRENT_SOURCE_DIR}/eiscat_radio_ctrl_impl.cpp
     )
-    LIBUHD_APPEND_SOURCES(${EISCAT_SOURCES})
-ENDIF(ENABLE_MPMD AND ENABLE_EISCAT)
+    libuhd_append_sources(${EISCAT_SOURCES})
+endif(ENABLE_MPMD AND ENABLE_EISCAT)
 
diff --git a/host/lib/usrp/dboard/magnesium/CMakeLists.txt b/host/lib/usrp/dboard/magnesium/CMakeLists.txt
index eca9e5234..5aac6631e 100644
--- a/host/lib/usrp/dboard/magnesium/CMakeLists.txt
+++ b/host/lib/usrp/dboard/magnesium/CMakeLists.txt
@@ -4,8 +4,8 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-IF(ENABLE_MPMD)
-    LIST(APPEND MAGNESIUM_SOURCES
+if(ENABLE_MPMD)
+    list(APPEND MAGNESIUM_SOURCES
         ${CMAKE_CURRENT_SOURCE_DIR}/magnesium_radio_ctrl_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/magnesium_radio_ctrl_init.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/magnesium_radio_ctrl_cpld.cpp
@@ -15,6 +15,6 @@ IF(ENABLE_MPMD)
         ${CMAKE_CURRENT_SOURCE_DIR}/magnesium_cpld_ctrl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/magnesium_gain_table.cpp
     )
-    LIBUHD_APPEND_SOURCES(${MAGNESIUM_SOURCES})
-ENDIF(ENABLE_MPMD)
+    libuhd_append_sources(${MAGNESIUM_SOURCES})
+endif(ENABLE_MPMD)
 
diff --git a/host/lib/usrp/device3/CMakeLists.txt b/host/lib/usrp/device3/CMakeLists.txt
index 110fa873b..440157095 100644
--- a/host/lib/usrp/device3/CMakeLists.txt
+++ b/host/lib/usrp/device3/CMakeLists.txt
@@ -9,7 +9,7 @@
 # This file included, use CMake directory variables
 ########################################################################
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/device3_impl.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/device3_io_impl.cpp
 )
diff --git a/host/lib/usrp/e300/CMakeLists.txt b/host/lib/usrp/e300/CMakeLists.txt
index c31a4a712..51bb6a889 100644
--- a/host/lib/usrp/e300/CMakeLists.txt
+++ b/host/lib/usrp/e300/CMakeLists.txt
@@ -14,8 +14,8 @@
 ########################################################################
 find_package(UDev)
 
-IF(ENABLE_E300)
-    LIST(APPEND E300_SOURCES
+if(ENABLE_E300)
+    list(APPEND E300_SOURCES
         ${CMAKE_CURRENT_SOURCE_DIR}/e300_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/e300_io_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/e300_fifo_config.cpp
@@ -29,21 +29,21 @@ IF(ENABLE_E300)
         ${CMAKE_CURRENT_SOURCE_DIR}/e300_common.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/e300_remote_codec_ctrl.cpp
     )
-    LIBUHD_APPEND_SOURCES(${E300_SOURCES})
-    IF(UDEV_FOUND AND NOT E300_FORCE_NETWORK)
-        INCLUDE_DIRECTORIES(${UDEV_INCLUDE_DIR})
-        LIBUHD_APPEND_LIBS(${UDEV_LIBS})
-        SET_SOURCE_FILES_PROPERTIES(
+    libuhd_append_sources(${E300_SOURCES})
+    if(UDEV_FOUND AND NOT E300_FORCE_NETWORK)
+        include_directories(${UDEV_INCLUDE_DIR})
+        libuhd_append_libs(${UDEV_LIBS})
+        set_source_files_properties(
             ${E300_SOURCES}
             PROPERTIES COMPILE_DEFINITIONS "E300_NATIVE=1"
         )
-    ENDIF(UDEV_FOUND AND NOT E300_FORCE_NETWORK)
+    endif(UDEV_FOUND AND NOT E300_FORCE_NETWORK)
 
-    IF(ENABLE_GPSD)
-        SET_SOURCE_FILES_PROPERTIES(
+    if(ENABLE_GPSD)
+        set_source_files_properties(
             ${CMAKE_CURRENT_SOURCE_DIR}/e300_impl.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/e300_impl.hpp
             PROPERTIES COMPILE_DEFINITIONS "E300_GPSD=1"
         )
-    ENDIF(ENABLE_GPSD)
-ENDIF(ENABLE_E300)
+    endif(ENABLE_GPSD)
+endif(ENABLE_E300)
diff --git a/host/lib/usrp/mpmd/CMakeLists.txt b/host/lib/usrp/mpmd/CMakeLists.txt
index 4447f2dc4..823ad2465 100644
--- a/host/lib/usrp/mpmd/CMakeLists.txt
+++ b/host/lib/usrp/mpmd/CMakeLists.txt
@@ -4,13 +4,13 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-IF(ENABLE_MPMD)
-    IF(ENABLE_LIBERIO)
-        MESSAGE(STATUS "Compiling MPMD with liberio support...")
-        ADD_DEFINITIONS(-DHAVE_LIBERIO)
-    ENDIF(ENABLE_LIBERIO)
+if(ENABLE_MPMD)
+    if(ENABLE_LIBERIO)
+        message(STATUS "Compiling MPMD with liberio support...")
+        add_definitions(-DHAVE_LIBERIO)
+    endif(ENABLE_LIBERIO)
 
-    LIBUHD_APPEND_SOURCES(
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/mpmd_find.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/mpmd_image_loader.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/mpmd_impl.cpp
@@ -21,10 +21,10 @@ IF(ENABLE_MPMD)
         ${CMAKE_CURRENT_SOURCE_DIR}/mpmd_xport_ctrl_udp.cpp
     )
 
-    IF(ENABLE_LIBERIO)
-        LIBUHD_APPEND_SOURCES(
+    if(ENABLE_LIBERIO)
+        libuhd_append_sources(
             ${CMAKE_CURRENT_SOURCE_DIR}/mpmd_xport_ctrl_liberio.cpp
         )
-    ENDIF(ENABLE_LIBERIO)
+    endif(ENABLE_LIBERIO)
 
-ENDIF(ENABLE_MPMD)
+endif(ENABLE_MPMD)
diff --git a/host/lib/usrp/n230/CMakeLists.txt b/host/lib/usrp/n230/CMakeLists.txt
index 9d16067a0..a4fd4e86b 100644
--- a/host/lib/usrp/n230/CMakeLists.txt
+++ b/host/lib/usrp/n230/CMakeLists.txt
@@ -12,8 +12,8 @@
 ########################################################################
 # Conditionally configure the N230 support
 ########################################################################
-IF(ENABLE_N230)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_N230)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/n230_cores.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/n230_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/n230_resource_manager.cpp
@@ -25,4 +25,4 @@ IF(ENABLE_N230)
         ${CMAKE_CURRENT_SOURCE_DIR}/n230_image_loader.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/n230_fw_ctrl_iface.cpp
    )
-ENDIF(ENABLE_N230)
+endif(ENABLE_N230)
diff --git a/host/lib/usrp/usrp1/CMakeLists.txt b/host/lib/usrp/usrp1/CMakeLists.txt
index 0c3c94c7b..361dd089a 100644
--- a/host/lib/usrp/usrp1/CMakeLists.txt
+++ b/host/lib/usrp/usrp1/CMakeLists.txt
@@ -12,8 +12,8 @@
 ########################################################################
 # Conditionally configure the USRP1 support
 ########################################################################
-IF(ENABLE_USRP1)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_USRP1)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/io_impl.cpp
@@ -22,4 +22,4 @@ IF(ENABLE_USRP1)
         ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_iface.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_impl.cpp
     )
-ENDIF(ENABLE_USRP1)
+endif(ENABLE_USRP1)
diff --git a/host/lib/usrp/usrp2/CMakeLists.txt b/host/lib/usrp/usrp2/CMakeLists.txt
index 8e7e186bb..2112b70ca 100644
--- a/host/lib/usrp/usrp2/CMakeLists.txt
+++ b/host/lib/usrp/usrp2/CMakeLists.txt
@@ -12,8 +12,8 @@
 ########################################################################
 # Conditionally configure the USRP2 support
 ########################################################################
-IF(ENABLE_USRP2)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_USRP2)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp
@@ -24,4 +24,4 @@ IF(ENABLE_USRP2)
         ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_fifo_ctrl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/n200_image_loader.cpp
     )
-ENDIF(ENABLE_USRP2)
+endif(ENABLE_USRP2)
diff --git a/host/lib/usrp/x300/CMakeLists.txt b/host/lib/usrp/x300/CMakeLists.txt
index 08dde87d2..7919f0e71 100644
--- a/host/lib/usrp/x300/CMakeLists.txt
+++ b/host/lib/usrp/x300/CMakeLists.txt
@@ -12,8 +12,8 @@
 ########################################################################
 # Conditionally configure the X300 support
 ########################################################################
-IF(ENABLE_X300)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_X300)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/x300_radio_ctrl_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/x300_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/x300_fw_ctrl.cpp
@@ -28,4 +28,4 @@ IF(ENABLE_X300)
         ${CMAKE_CURRENT_SOURCE_DIR}/x300_mb_eeprom.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/cdecode.c
     )
-ENDIF(ENABLE_X300)
+endif(ENABLE_X300)
diff --git a/host/lib/usrp_clock/CMakeLists.txt b/host/lib/usrp_clock/CMakeLists.txt
index 1812fcca5..764eb7f58 100644
--- a/host/lib/usrp_clock/CMakeLists.txt
+++ b/host/lib/usrp_clock/CMakeLists.txt
@@ -9,14 +9,14 @@
 # This file included, use CMake directory variables
 ########################################################################
 
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/multi_usrp_clock.cpp
 )
 
-IF(ENABLE_C_API)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_C_API)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/usrp_clock_c.cpp
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
 
-INCLUDE_SUBDIRECTORY(octoclock)
+include_subdirectory(octoclock)
diff --git a/host/lib/usrp_clock/octoclock/CMakeLists.txt b/host/lib/usrp_clock/octoclock/CMakeLists.txt
index 6a978bd2a..9a624c88d 100644
--- a/host/lib/usrp_clock/octoclock/CMakeLists.txt
+++ b/host/lib/usrp_clock/octoclock/CMakeLists.txt
@@ -8,11 +8,11 @@
 ########################################################################
 # Conditionally configure the OctoClock support
 ########################################################################
-IF(ENABLE_OCTOCLOCK)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_OCTOCLOCK)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/octoclock_eeprom.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/octoclock_image_loader.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/octoclock_impl.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/octoclock_uart.cpp
     )
-ENDIF(ENABLE_OCTOCLOCK)
+endif(ENABLE_OCTOCLOCK)
diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt
index 543443615..df2a52f35 100644
--- a/host/lib/utils/CMakeLists.txt
+++ b/host/lib/utils/CMakeLists.txt
@@ -12,11 +12,11 @@
 ########################################################################
 # Setup defines for process scheduling
 ########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Configuring priority scheduling...")
-INCLUDE(CheckCXXSourceCompiles)
+message(STATUS "")
+message(STATUS "Configuring priority scheduling...")
+include(CheckCXXSourceCompiles)
 
-CHECK_CXX_SOURCE_COMPILES("
+check_cxx_source_compiles("
     #include <pthread.h>
     int main(){
         struct sched_param sp;
@@ -26,16 +26,16 @@ CHECK_CXX_SOURCE_COMPILES("
     " HAVE_PTHREAD_SETSCHEDPARAM
 )
 
-IF(CYGWIN)
+if(CYGWIN)
     #SCHED_RR non-operational on cygwin
-    SET(HAVE_PTHREAD_SETSCHEDPARAM False)
-ENDIF(CYGWIN)
+    set(HAVE_PTHREAD_SETSCHEDPARAM False)
+endif(CYGWIN)
 
-CHECK_CXX_SOURCE_COMPILES("
+check_cxx_source_compiles("
     #include <windows.h>
     int main(){
-        SetThreadPriority(GetCurrentThread(), 0);
-        SetPriorityClass(GetCurrentProcess(), 0);
+        setthreadpriority(GetCurrentThread(), 0);
+        setpriorityclass(GetCurrentProcess(), 0);
         return 0;
     }
     " HAVE_WIN_SETTHREADPRIORITY
@@ -43,21 +43,21 @@ CHECK_CXX_SOURCE_COMPILES("
 
 
 
-IF(HAVE_PTHREAD_SETSCHEDPARAM)
-    MESSAGE(STATUS "  Priority scheduling supported through pthread_setschedparam.")
-    LIST(APPEND THREAD_PRIO_DEFS HAVE_PTHREAD_SETSCHEDPARAM)
-    LIBUHD_APPEND_LIBS(pthread)
-ELSEIF(HAVE_WIN_SETTHREADPRIORITY)
-    MESSAGE(STATUS "  Priority scheduling supported through windows SetThreadPriority.")
-    SET(THREAD_PRIO_DEFS HAVE_WIN_SETTHREADPRIORITY)
-ELSE()
-    MESSAGE(STATUS "  Priority scheduling not supported.")
-    SET(THREAD_PRIO_DEFS HAVE_THREAD_PRIO_DUMMY)
-ENDIF()
+if(HAVE_PTHREAD_SETSCHEDPARAM)
+    message(STATUS "  Priority scheduling supported through pthread_setschedparam.")
+    list(APPEND THREAD_PRIO_DEFS HAVE_PTHREAD_SETSCHEDPARAM)
+    libuhd_append_libs(pthread)
+elseif(HAVE_WIN_SETTHREADPRIORITY)
+    message(STATUS "  Priority scheduling supported through windows SetThreadPriority.")
+    set(THREAD_PRIO_DEFS HAVE_WIN_SETTHREADPRIORITY)
+else()
+    message(STATUS "  Priority scheduling not supported.")
+    set(THREAD_PRIO_DEFS HAVE_THREAD_PRIO_DUMMY)
+endif()
 
-SET(CMAKE_REQUIRED_LIBRARIES "pthread")
+set(CMAKE_REQUIRED_LIBRARIES "pthread")
 
-CHECK_CXX_SOURCE_COMPILES("
+check_cxx_source_compiles("
     #include <pthread.h>
     int main(){
         pthread_t pt;
@@ -68,22 +68,22 @@ CHECK_CXX_SOURCE_COMPILES("
     " HAVE_PTHREAD_SETNAME
 )
 
-IF(CYGWIN)
+if(CYGWIN)
     #SCHED_RR non-operational on cygwin
-    SET(HAVE_PTHREAD_SETNAME False)
-ENDIF(CYGWIN)
+    set(HAVE_PTHREAD_SETNAME False)
+endif(CYGWIN)
 
-IF(HAVE_PTHREAD_SETNAME)
-    MESSAGE(STATUS "  Setting thread names is supported through pthread_setname_np.")
-    LIST(APPEND THREAD_PRIO_DEFS HAVE_PTHREAD_SETNAME)
-    LIBUHD_APPEND_LIBS(pthread)
-ELSE()
-    MESSAGE(STATUS "  Setting thread names is not supported.")
-    LIST(APPEND THREAD_PRIO_DEFS HAVE_THREAD_SETNAME_DUMMY)
-ENDIF()
+if(HAVE_PTHREAD_SETNAME)
+    message(STATUS "  Setting thread names is supported through pthread_setname_np.")
+    list(APPEND THREAD_PRIO_DEFS HAVE_PTHREAD_SETNAME)
+    libuhd_append_libs(pthread)
+else()
+    message(STATUS "  Setting thread names is not supported.")
+    list(APPEND THREAD_PRIO_DEFS HAVE_THREAD_SETNAME_DUMMY)
+endif()
 
 
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
     ${CMAKE_CURRENT_SOURCE_DIR}/thread.cpp
     PROPERTIES COMPILE_DEFINITIONS "${THREAD_PRIO_DEFS}"
 )
@@ -91,12 +91,12 @@ SET_SOURCE_FILES_PROPERTIES(
 ########################################################################
 # Setup defines for module loading
 ########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Configuring module loading...")
-INCLUDE(CheckCXXSourceCompiles)
+message(STATUS "")
+message(STATUS "Configuring module loading...")
+include(CheckCXXSourceCompiles)
 
-SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
-CHECK_CXX_SOURCE_COMPILES("
+set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
+check_cxx_source_compiles("
     #include <dlfcn.h>
     int main(){
         dlopen(0, 0);
@@ -104,31 +104,31 @@ CHECK_CXX_SOURCE_COMPILES("
     }
     " HAVE_DLOPEN
 )
-SET(CMAKE_REQUIRED_LIBRARIES)
+set(CMAKE_REQUIRED_LIBRARIES)
 
-CHECK_CXX_SOURCE_COMPILES("
+check_cxx_source_compiles("
     #define WIN32_LEAN_AND_MEAN
     #include <windows.h>
     int main(){
-        LoadLibrary(0);
+        loadlibrary(0);
         return 0;
     }
     " HAVE_LOAD_LIBRARY
 )
 
-IF(HAVE_DLOPEN)
-    MESSAGE(STATUS "  Module loading supported through dlopen.")
-    SET(LOAD_MODULES_DEFS HAVE_DLOPEN)
-    LIBUHD_APPEND_LIBS(${CMAKE_DL_LIBS})
-ELSEIF(HAVE_LOAD_LIBRARY)
-    MESSAGE(STATUS "  Module loading supported through LoadLibrary.")
-    SET(LOAD_MODULES_DEFS HAVE_LOAD_LIBRARY)
-ELSE()
-    MESSAGE(STATUS "  Module loading not supported.")
-    SET(LOAD_MODULES_DEFS HAVE_LOAD_MODULES_DUMMY)
-ENDIF()
-
-SET_SOURCE_FILES_PROPERTIES(
+if(HAVE_DLOPEN)
+    message(STATUS "  Module loading supported through dlopen.")
+    set(LOAD_MODULES_DEFS HAVE_DLOPEN)
+    libuhd_append_libs(${CMAKE_DL_LIBS})
+elseif(HAVE_LOAD_LIBRARY)
+    message(STATUS "  Module loading supported through LoadLibrary.")
+    set(LOAD_MODULES_DEFS HAVE_LOAD_LIBRARY)
+else()
+    message(STATUS "  Module loading not supported.")
+    set(LOAD_MODULES_DEFS HAVE_LOAD_MODULES_DUMMY)
+endif()
+
+set_source_files_properties(
     ${CMAKE_CURRENT_SOURCE_DIR}/load_modules.cpp
     PROPERTIES COMPILE_DEFINITIONS "${LOAD_MODULES_DEFS}"
 )
@@ -136,24 +136,24 @@ SET_SOURCE_FILES_PROPERTIES(
 ########################################################################
 # Define UHD_PKG_DATA_PATH for paths.cpp
 ########################################################################
-FILE(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" UHD_PKG_PATH)
-STRING(REPLACE "\\" "\\\\" UHD_PKG_PATH "${UHD_PKG_PATH}")
+file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" UHD_PKG_PATH)
+string(REPLACE "\\" "\\\\" UHD_PKG_PATH "${UHD_PKG_PATH}")
 
-STRING(REGEX MATCH ".*/.*" SLASH "${LIB_SUFFIX}")
-IF(SLASH STREQUAL "")
-    SET(UHD_LIB_DIR "lib${LIB_SUFFIX}")
-ELSE()
-    SET(UHD_LIB_DIR "lib")
-ENDIF(SLASH STREQUAL "")
+string(REGEX MATCH ".*/.*" SLASH "${LIB_SUFFIX}")
+if(SLASH STREQUAL "")
+    set(UHD_LIB_DIR "lib${LIB_SUFFIX}")
+else()
+    set(UHD_LIB_DIR "lib")
+endif(SLASH STREQUAL "")
 
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
     ${CMAKE_CURRENT_SOURCE_DIR}/paths.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/images.cpp
     PROPERTIES COMPILE_DEFINITIONS
     "UHD_PKG_PATH=\"${UHD_PKG_PATH}\";UHD_LIB_DIR=\"${UHD_LIB_DIR}\""
 )
 
-SET_SOURCE_FILES_PROPERTIES(
+set_source_files_properties(
     ${CMAKE_CURRENT_SOURCE_DIR}/prefs.cpp
     PROPERTIES COMPILE_DEFINITIONS
     "UHD_SYS_CONF_FILE=\"${UHD_SYS_CONF_FILE}\";UHD_USER_CONF_FILE=\"${UHD_USER_CONF_FILE}\""
@@ -162,7 +162,7 @@ SET_SOURCE_FILES_PROPERTIES(
 ########################################################################
 # Append sources
 ########################################################################
-LIBUHD_APPEND_SOURCES(
+libuhd_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/csv.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/config_parser.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/compat_check.cpp
@@ -180,9 +180,9 @@ LIBUHD_APPEND_SOURCES(
     ${CMAKE_CURRENT_SOURCE_DIR}/thread.cpp
 )
 
-IF(ENABLE_C_API)
-    LIBUHD_APPEND_SOURCES(
+if(ENABLE_C_API)
+    libuhd_append_sources(
         ${CMAKE_CURRENT_SOURCE_DIR}/log_c.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/thread_priority_c.cpp
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt
index 7d53b50c4..ddfb9997b 100644
--- a/host/tests/CMakeLists.txt
+++ b/host/tests/CMakeLists.txt
@@ -13,7 +13,7 @@ include(UHDUnitTest)
 ########################################################################
 # unit test suite
 ########################################################################
-SET(test_sources
+set(test_sources
     addr_test.cpp
     buffer_test.cpp
     byteswap_test.cpp
@@ -45,10 +45,10 @@ SET(test_sources
 )
 
 #turn each test cpp file into an executable with an int main() function
-ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
+add_definitions(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
 
-IF(ENABLE_RFNOC)
-    LIST(APPEND test_sources
+if(ENABLE_RFNOC)
+    list(APPEND test_sources
         block_id_test.cpp
         blockdef_test.cpp
         device3_test.cpp
@@ -58,10 +58,10 @@ IF(ENABLE_RFNOC)
         stream_sig_test.cpp
         tick_node_test.cpp
     )
-ENDIF(ENABLE_RFNOC)
+endif(ENABLE_RFNOC)
 
-IF(ENABLE_C_API)
-    LIST(APPEND test_sources
+if(ENABLE_C_API)
+    list(APPEND test_sources
         eeprom_c_test.c
         error_c_test.cpp
         ranges_c_test.c
@@ -69,79 +69,79 @@ IF(ENABLE_C_API)
         string_vector_c_test.c
         subdev_spec_c_test.c
     )
-ENDIF(ENABLE_C_API)
+endif(ENABLE_C_API)
 
-INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/lib/include")
+include_directories("${CMAKE_SOURCE_DIR}/lib/include")
 
 #for each source: build an executable, register it as a test
-FOREACH(test_source ${test_sources})
-    GET_FILENAME_COMPONENT(test_name ${test_source} NAME_WE)
-    ADD_EXECUTABLE(${test_name} ${test_source})
-    TARGET_LINK_LIBRARIES(${test_name} uhd ${Boost_LIBRARIES})
-    UHD_ADD_TEST(${test_name} ${test_name})
-    UHD_INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
-ENDFOREACH(test_source)
+foreach(test_source ${test_sources})
+    get_filename_component(test_name ${test_source} NAME_WE)
+    add_executable(${test_name} ${test_source})
+    target_link_libraries(${test_name} uhd ${Boost_LIBRARIES})
+    uhd_add_test(${test_name} ${test_name})
+    uhd_install(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
+endforeach(test_source)
 
 # Other tests that don't directly link with libuhd: (TODO find a nicer way to do this)
-INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/lib/rfnoc/nocscript/)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/)
-ADD_EXECUTABLE(nocscript_expr_test
+include_directories(${CMAKE_BINARY_DIR}/lib/rfnoc/nocscript/)
+include_directories(${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/)
+add_executable(nocscript_expr_test
     nocscript_expr_test.cpp
     ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/expression.cpp
 )
-TARGET_LINK_LIBRARIES(nocscript_expr_test uhd ${Boost_LIBRARIES})
-UHD_ADD_TEST(nocscript_expr_test nocscript_expr_test)
-UHD_INSTALL(TARGETS nocscript_expr_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
+target_link_libraries(nocscript_expr_test uhd ${Boost_LIBRARIES})
+uhd_add_test(nocscript_expr_test nocscript_expr_test)
+uhd_install(TARGETS nocscript_expr_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
 
-ADD_EXECUTABLE(nocscript_ftable_test
+add_executable(nocscript_ftable_test
     nocscript_ftable_test.cpp
     ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/function_table.cpp
     ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/expression.cpp
 )
-TARGET_LINK_LIBRARIES(nocscript_ftable_test uhd ${Boost_LIBRARIES})
-UHD_ADD_TEST(nocscript_ftable_test nocscript_ftable_test)
-UHD_INSTALL(TARGETS nocscript_ftable_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
+target_link_libraries(nocscript_ftable_test uhd ${Boost_LIBRARIES})
+uhd_add_test(nocscript_ftable_test nocscript_ftable_test)
+uhd_install(TARGETS nocscript_ftable_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
 
-ADD_EXECUTABLE(nocscript_parser_test
+add_executable(nocscript_parser_test
     nocscript_parser_test.cpp
     ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/parser.cpp
     ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/function_table.cpp
     ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/expression.cpp
 )
-TARGET_LINK_LIBRARIES(nocscript_parser_test uhd ${Boost_LIBRARIES})
-UHD_ADD_TEST(nocscript_parser_test nocscript_parser_test)
-UHD_INSTALL(TARGETS nocscript_parser_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
+target_link_libraries(nocscript_parser_test uhd ${Boost_LIBRARIES})
+uhd_add_test(nocscript_parser_test nocscript_parser_test)
+uhd_install(TARGETS nocscript_parser_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
 
-ADD_EXECUTABLE(config_parser_test
+add_executable(config_parser_test
     config_parser_test.cpp
     ${CMAKE_SOURCE_DIR}/lib/utils/config_parser.cpp
 )
-TARGET_LINK_LIBRARIES(config_parser_test uhd ${Boost_LIBRARIES})
-UHD_ADD_TEST(config_parser_test config_parser_test)
-UHD_INSTALL(TARGETS
+target_link_libraries(config_parser_test uhd ${Boost_LIBRARIES})
+uhd_add_test(config_parser_test config_parser_test)
+uhd_install(TARGETS
     config_parser_test
     RUNTIME
     DESTINATION ${PKG_LIB_DIR}/tests
     COMPONENT tests
 )
 
-ADD_EXECUTABLE(paths_test
+add_executable(paths_test
     paths_test.cpp
     ${CMAKE_SOURCE_DIR}/lib/utils/pathslib.cpp
 )
 # Careful: This is to satisfy the out-of-library build of paths.cpp. This is
 # duplicate code from lib/utils/CMakeLists.txt, and it's been simplified.
-SET(UHD_LIB_DIR "lib")
-FILE(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" UHD_PKG_PATH)
-STRING(REPLACE "\\" "\\\\" UHD_PKG_PATH "${UHD_PKG_PATH}")
-SET_SOURCE_FILES_PROPERTIES(
+set(UHD_LIB_DIR "lib")
+file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" UHD_PKG_PATH)
+string(REPLACE "\\" "\\\\" UHD_PKG_PATH "${UHD_PKG_PATH}")
+set_source_files_properties(
     ${CMAKE_SOURCE_DIR}/lib/utils/paths.cpp
     PROPERTIES COMPILE_DEFINITIONS
     "UHD_PKG_PATH=\"${UHD_PKG_PATH}\";UHD_LIB_DIR=\"${UHD_LIB_DIR}\""
 )
-TARGET_LINK_LIBRARIES(paths_test uhd ${Boost_LIBRARIES})
-UHD_ADD_TEST(paths_test paths_test)
-UHD_INSTALL(TARGETS
+target_link_libraries(paths_test uhd ${Boost_LIBRARIES})
+uhd_add_test(paths_test paths_test)
+uhd_install(TARGETS
     paths_test
     RUNTIME
     DESTINATION ${PKG_LIB_DIR}/tests
@@ -151,9 +151,9 @@ UHD_INSTALL(TARGETS
 ########################################################################
 # demo of a loadable module
 ########################################################################
-IF(MSVC OR APPLE OR LINUX)
-    ADD_LIBRARY(module_test MODULE module_test.cpp)
-    TARGET_LINK_LIBRARIES(module_test uhd)
-ENDIF()
+if(MSVC OR APPLE OR LINUX)
+    add_library(module_test MODULE module_test.cpp)
+    target_link_libraries(module_test uhd)
+endif()
 
-ADD_SUBDIRECTORY(devtest)
+add_subdirectory(devtest)
diff --git a/host/tests/devtest/CMakeLists.txt b/host/tests/devtest/CMakeLists.txt
index 14f8b1f01..1e16433ed 100644
--- a/host/tests/devtest/CMakeLists.txt
+++ b/host/tests/devtest/CMakeLists.txt
@@ -6,11 +6,11 @@
 #
 
 # Formatting
-MESSAGE(STATUS "")
+message(STATUS "")
 
 # All devtest files get installed:
-FILE(GLOB py_devtest_files "*.py")
-UHD_INSTALL(PROGRAMS
+file(GLOB py_devtest_files "*.py")
+uhd_install(PROGRAMS
     ${py_devtest_files}
     DESTINATION ${PKG_LIB_DIR}/tests/devtest
     COMPONENT tests
@@ -20,9 +20,9 @@ UHD_INSTALL(PROGRAMS
 # - pattern: This will be used to identify which devtest_*.py is to be executed.
 # - filter: Will be used in args strings as "type=<filter>".
 # - devtype: A descriptive string. Is only used for CMake output.
-MACRO(ADD_DEVTEST pattern filter devtype)
-    MESSAGE(STATUS "Adding ${devtype} device test target")
-    ADD_CUSTOM_TARGET("test_${pattern}"
+macro(ADD_DEVTEST pattern filter devtype)
+    message(STATUS "Adding ${devtype} device test target")
+    add_custom_target("test_${pattern}"
         ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/run_testsuite.py
         "--src-dir" "${CMAKE_CURRENT_SOURCE_DIR}"
         "--devtest-pattern" "${pattern}"
@@ -32,17 +32,17 @@ MACRO(ADD_DEVTEST pattern filter devtype)
         COMMENT "Running device test on all connected ${devtype} devices:"
         WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
     )
-ENDMACRO(ADD_DEVTEST)
+endmacro(ADD_DEVTEST)
 
-IF(ENABLE_B200)
-    ADD_DEVTEST("b2xx" "b200" "B2XX")
-ENDIF(ENABLE_B200)
-IF(ENABLE_X300)
-    ADD_DEVTEST("x3x0" "x300" "X3x0")
-ENDIF(ENABLE_X300)
-IF(ENABLE_E300)
-    ADD_DEVTEST("e3xx" "e3x0" "E3XX")
-ENDIF(ENABLE_E300)
+if(ENABLE_B200)
+    add_devtest("b2xx" "b200" "B2XX")
+endif(ENABLE_B200)
+if(ENABLE_X300)
+    add_devtest("x3x0" "x300" "X3x0")
+endif(ENABLE_X300)
+if(ENABLE_E300)
+    add_devtest("e3xx" "e3x0" "E3XX")
+endif(ENABLE_E300)
 
 # Formatting
-MESSAGE(STATUS "")
+message(STATUS "")
diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt
index 8d391caf1..e1683c916 100644
--- a/host/utils/CMakeLists.txt
+++ b/host/utils/CMakeLists.txt
@@ -8,7 +8,7 @@
 ########################################################################
 # Utilities that get installed into the runtime path
 ########################################################################
-SET(util_runtime_sources
+set(util_runtime_sources
     uhd_config_info.cpp
     uhd_find_devices.cpp
     uhd_usrp_probe.cpp
@@ -19,192 +19,192 @@ SET(util_runtime_sources
     usrp_n2xx_simple_net_burner.cpp
 )
 
-SET(x3xx_burner_sources
+set(x3xx_burner_sources
     usrp_x3xx_fpga_burner.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/../lib/usrp/x300/cdecode.c
 )
 
 find_package(UDev)
-IF(ENABLE_E300 AND NOT E300_FORCE_NETWORK)
-    IF(UDEV_FOUND)
-        LIST(APPEND util_runtime_sources usrp_e3x0_network_mode.cpp)
-    ENDIF(UDEV_FOUND)
-ENDIF(ENABLE_E300 AND NOT E300_FORCE_NETWORK)
+if(ENABLE_E300 AND NOT E300_FORCE_NETWORK)
+    if(UDEV_FOUND)
+        list(APPEND util_runtime_sources usrp_e3x0_network_mode.cpp)
+    endif(UDEV_FOUND)
+endif(ENABLE_E300 AND NOT E300_FORCE_NETWORK)
 
 #for each source: build an executable and install
-FOREACH(util_source ${util_runtime_sources})
-    GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE)
-    ADD_EXECUTABLE(${util_name} ${util_source})
-    TARGET_LINK_LIBRARIES(${util_name} uhd ${Boost_LIBRARIES})
-    UHD_INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
-ENDFOREACH(util_source)
-
-IF(ENABLE_X300)
-    INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/usrp/x300)
-    ADD_EXECUTABLE(usrp_x3xx_fpga_burner ${x3xx_burner_sources})
-    TARGET_LINK_LIBRARIES(usrp_x3xx_fpga_burner uhd ${Boost_LIBRARIES})
-    UHD_INSTALL(TARGETS usrp_x3xx_fpga_burner RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
-ENDIF(ENABLE_X300)
+foreach(util_source ${util_runtime_sources})
+    get_filename_component(util_name ${util_source} NAME_WE)
+    add_executable(${util_name} ${util_source})
+    target_link_libraries(${util_name} uhd ${Boost_LIBRARIES})
+    uhd_install(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
+endforeach(util_source)
+
+if(ENABLE_X300)
+    include_directories(${CMAKE_SOURCE_DIR}/lib/usrp/x300)
+    add_executable(usrp_x3xx_fpga_burner ${x3xx_burner_sources})
+    target_link_libraries(usrp_x3xx_fpga_burner uhd ${Boost_LIBRARIES})
+    uhd_install(TARGETS usrp_x3xx_fpga_burner RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
+endif(ENABLE_X300)
 
 ########################################################################
 # Utilities that get installed into the share path
 ########################################################################
-SET(util_share_sources
+set(util_share_sources
     converter_benchmark.cpp
     query_gpsdo_sensors.cpp
     usrp_burn_db_eeprom.cpp
     usrp_burn_mb_eeprom.cpp
 )
-SET(util_share_sources_py
+set(util_share_sources_py
     converter_benchmark.py
 )
-IF(ENABLE_USB)
-    LIST(APPEND util_share_sources
+if(ENABLE_USB)
+    list(APPEND util_share_sources
         fx2_init_eeprom.cpp
     )
-    INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS})
-    IF(ENABLE_B200)
-        LIST(APPEND util_share_sources
+    include_directories(${LIBUSB_INCLUDE_DIRS})
+    if(ENABLE_B200)
+        list(APPEND util_share_sources
             b2xx_fx3_utils.cpp
         )
         # Additional include directories for b2xx_fx3_utils
-        INCLUDE_DIRECTORIES(
+        include_directories(
             ${CMAKE_CURRENT_SOURCE_DIR}/../lib/include
             ${CMAKE_CURRENT_SOURCE_DIR}/../lib/usrp/b200
             ${CMAKE_CURRENT_SOURCE_DIR}/../lib/usrp/common
             ${CMAKE_CURRENT_SOURCE_DIR}/../lib/usrp/common/ad9361_driver
         )
-    ENDIF(ENABLE_B200)
-ENDIF(ENABLE_USB)
-IF(ENABLE_OCTOCLOCK)
-    LIST(APPEND util_share_sources
+    endif(ENABLE_B200)
+endif(ENABLE_USB)
+if(ENABLE_OCTOCLOCK)
+    list(APPEND util_share_sources
         octoclock_burn_eeprom.cpp
     )
 
-    SET(octoclock_burner_sources
+    set(octoclock_burner_sources
         octoclock_firmware_burner.cpp
         ${CMAKE_SOURCE_DIR}/lib/utils/ihex.cpp
     )
 
-    INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/usrp_clock/octoclock)
-    ADD_EXECUTABLE(octoclock_firmware_burner ${octoclock_burner_sources})
-    TARGET_LINK_LIBRARIES(octoclock_firmware_burner uhd ${Boost_LIBRARIES})
-    UHD_INSTALL(TARGETS octoclock_firmware_burner RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
-ENDIF(ENABLE_OCTOCLOCK)
+    include_directories(${CMAKE_SOURCE_DIR}/lib/usrp_clock/octoclock)
+    add_executable(octoclock_firmware_burner ${octoclock_burner_sources})
+    target_link_libraries(octoclock_firmware_burner uhd ${Boost_LIBRARIES})
+    uhd_install(TARGETS octoclock_firmware_burner RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
+endif(ENABLE_OCTOCLOCK)
 
-IF(LINUX AND ENABLE_USB)
-    UHD_INSTALL(FILES
+if(LINUX AND ENABLE_USB)
+    uhd_install(FILES
         uhd-usrp.rules
         DESTINATION ${PKG_LIB_DIR}/utils
         COMPONENT utilities
     )
-ENDIF(LINUX AND ENABLE_USB)
+endif(LINUX AND ENABLE_USB)
 
 #for each source: build an executable and install
-FOREACH(util_source ${util_share_sources})
-    GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE)
-    ADD_EXECUTABLE(${util_name} ${util_source})
-    TARGET_LINK_LIBRARIES(${util_name} uhd ${Boost_LIBRARIES})
-    UHD_INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
-ENDFOREACH(util_source)
-FOREACH(util_source ${util_share_sources_py})
-    UHD_INSTALL(PROGRAMS
+foreach(util_source ${util_share_sources})
+    get_filename_component(util_name ${util_source} NAME_WE)
+    add_executable(${util_name} ${util_source})
+    target_link_libraries(${util_name} uhd ${Boost_LIBRARIES})
+    uhd_install(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
+endforeach(util_source)
+foreach(util_source ${util_share_sources_py})
+    uhd_install(PROGRAMS
         ${CMAKE_CURRENT_SOURCE_DIR}/${util_source}
         DESTINATION ${PKG_LIB_DIR}/utils
         COMPONENT utilities
     )
-ENDFOREACH(util_source)
+endforeach(util_source)
 
-IF(ENABLE_USRP2)
-    UHD_INSTALL(TARGETS usrp_n2xx_simple_net_burner RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
-ENDIF(ENABLE_USRP2)
-IF(ENABLE_X300)
-    UHD_INSTALL(TARGETS usrp_x3xx_fpga_burner RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
-ENDIF(ENABLE_X300)
+if(ENABLE_USRP2)
+    uhd_install(TARGETS usrp_n2xx_simple_net_burner RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
+endif(ENABLE_USRP2)
+if(ENABLE_X300)
+    uhd_install(TARGETS usrp_x3xx_fpga_burner RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
+endif(ENABLE_X300)
 
 #UHD images downloader configuration
-FILE(READ ${CMAKE_CURRENT_SOURCE_DIR}/../../images/manifest.txt CMAKE_MANIFEST_CONTENTS)
-CONFIGURE_FILE(
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../../images/manifest.txt CMAKE_MANIFEST_CONTENTS)
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/uhd_images_downloader.py.in
     ${CMAKE_CURRENT_BINARY_DIR}/uhd_images_downloader.py
 @ONLY)
 # TODO: FIXME when know how.
 # This is a hack to force cmake regenerate uhd_images_downloader.py
 # whenever manifest.txt file changed.
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/../../images/manifest.txt
     ${CMAKE_CURRENT_SOURCE_DIR}/../../images/manifest.txt
 COPYONLY)
 
-UHD_INSTALL(PROGRAMS
+uhd_install(PROGRAMS
     ${CMAKE_CURRENT_BINARY_DIR}/uhd_images_downloader.py
     DESTINATION ${PKG_LIB_DIR}/utils
     COMPONENT utilities
 )
-IF(LINUX)
-    UHD_INSTALL(PROGRAMS
+if(LINUX)
+    uhd_install(PROGRAMS
         ${CMAKE_CURRENT_BINARY_DIR}/uhd_images_downloader.py
         RENAME uhd_images_downloader
         DESTINATION ${RUNTIME_DIR}
         COMPONENT utilities
     )
-ENDIF(LINUX)
-IF(NOT HAVE_PYTHON_MODULE_REQUESTS)
-    MESSAGE(WARNING "Module requests not found -- uhd_images_downloader.py will not work without it.")
-ENDIF(NOT HAVE_PYTHON_MODULE_REQUESTS)
+endif(LINUX)
+if(NOT HAVE_PYTHON_MODULE_REQUESTS)
+    message(WARNING "Module requests not found -- uhd_images_downloader.py will not work without it.")
+endif(NOT HAVE_PYTHON_MODULE_REQUESTS)
 
-IF(ENABLE_USRP2)
-    SET(burners
+if(ENABLE_USRP2)
+    set(burners
         usrp2_card_burner.py
         usrp_n2xx_net_burner.py
     )
 
-    IF(WIN32 AND UHD_RELEASE_MODE) #include dd.exe
-        FILE(DOWNLOAD
+    if(WIN32 AND UHD_RELEASE_MODE) #include dd.exe
+        file(DOWNLOAD
             "http://files.ettus.com/dd.exe"
             ${CMAKE_CURRENT_BINARY_DIR}/dd.exe
         )
-        UHD_INSTALL(FILES
+        uhd_install(FILES
             ${CMAKE_CURRENT_BINARY_DIR}/dd.exe
             DESTINATION ${PKG_LIB_DIR}/utils
             COMPONENT utilities
         )
-    ENDIF(WIN32 AND UHD_RELEASE_MODE)
-    IF(LINUX)
-        UHD_INSTALL(PROGRAMS
+    endif(WIN32 AND UHD_RELEASE_MODE)
+    if(LINUX)
+        uhd_install(PROGRAMS
             usrp2_recovery.py
             DESTINATION ${PKG_LIB_DIR}/utils
             COMPONENT utilities
         )
-        UHD_INSTALL(PROGRAMS
+        uhd_install(PROGRAMS
             usrp2_card_burner.py
             RENAME usrp2_card_burner
             DESTINATION ${RUNTIME_DIR}
             COMPONENT utilities
         )
-    ENDIF(LINUX)
-    FOREACH(burner ${burners})
-        UHD_INSTALL(PROGRAMS
+    endif(LINUX)
+    foreach(burner ${burners})
+        uhd_install(PROGRAMS
             ${burner}
             DESTINATION ${PKG_LIB_DIR}/utils
             COMPONENT utilities
         )
-    ENDFOREACH(burner ${burners})
+    endforeach(burner ${burners})
 
-ENDIF(ENABLE_USRP2)
+endif(ENABLE_USRP2)
 
 ########################################################################
 # Other files that are not utilities or executables
 ########################################################################
-IF(WIN32)
-    SET(windows_extra_files
+if(WIN32)
+    set(windows_extra_files
         FastSendDatagramThreshold.reg
     )
-    UHD_INSTALL(
+    uhd_install(
         FILES ${windows_extra_files}
         DESTINATION ${PKG_DATA_DIR}
         COMPONENT utilities
     )
-ENDIF(WIN32)
+endif(WIN32)
 
-ADD_SUBDIRECTORY(latency)
+add_subdirectory(latency)
diff --git a/host/utils/latency/CMakeLists.txt b/host/utils/latency/CMakeLists.txt
index 4ccfd3eba..b6dd598bc 100644
--- a/host/utils/latency/CMakeLists.txt
+++ b/host/utils/latency/CMakeLists.txt
@@ -5,32 +5,32 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-FIND_PACKAGE(Curses)
+find_package(Curses)
 
-IF(CURSES_FOUND)
-    INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
-    SET(latency_include_dir ${CMAKE_CURRENT_SOURCE_DIR}/include)
-    INCLUDE_DIRECTORIES(${latency_include_dir})
-    SET(latency_lib_path ${CMAKE_CURRENT_SOURCE_DIR}/lib/Responder.cpp)
+if(CURSES_FOUND)
+    include_directories(${CURSES_INCLUDE_DIR})
+    set(latency_include_dir ${CMAKE_CURRENT_SOURCE_DIR}/include)
+    include_directories(${latency_include_dir})
+    set(latency_lib_path ${CMAKE_CURRENT_SOURCE_DIR}/lib/Responder.cpp)
 
-    SET(sources
+    set(sources
         responder.cpp
     )
 
-    SET(latency_comp_name utilities)
-    SET(latency_comp_dest ${PKG_LIB_DIR}/utils/latency)
+    set(latency_comp_name utilities)
+    set(latency_comp_dest ${PKG_LIB_DIR}/utils/latency)
 
     #for each source: build an executable and install
-    FOREACH(source ${sources})
-        GET_FILENAME_COMPONENT(name ${source} NAME_WE)
-        ADD_EXECUTABLE(${name} ${source} ${latency_lib_path})
-    	LIBUHD_APPEND_SOURCES(${name})
-        TARGET_LINK_LIBRARIES(${name} uhd ${Boost_LIBRARIES} ${CURSES_LIBRARIES})
-    	UHD_INSTALL(TARGETS ${name} RUNTIME DESTINATION ${latency_comp_dest} COMPONENT ${latency_comp_name})
-    ENDFOREACH(source)
+    foreach(source ${sources})
+        get_filename_component(name ${source} NAME_WE)
+        add_executable(${name} ${source} ${latency_lib_path})
+    	libuhd_append_sources(${name})
+        target_link_libraries(${name} uhd ${Boost_LIBRARIES} ${CURSES_LIBRARIES})
+    	uhd_install(TARGETS ${name} RUNTIME DESTINATION ${latency_comp_dest} COMPONENT ${latency_comp_name})
+    endforeach(source)
 
-    UHD_INSTALL(PROGRAMS run_tests.py graph.py
+    uhd_install(PROGRAMS run_tests.py graph.py
                 DESTINATION ${latency_comp_dest}
                 COMPONENT ${latency_comp_name}
     )
-ENDIF(CURSES_FOUND)
+endif(CURSES_FOUND)
diff --git a/images/CMakeLists.txt b/images/CMakeLists.txt
index 229f0c422..453de1647 100644
--- a/images/CMakeLists.txt
+++ b/images/CMakeLists.txt
@@ -19,34 +19,34 @@
 # Setup Project
 ########################################################################
 #OPTION(UHD_PATCH_OVERRIDE "Use this string to force a patch level version string." OFF)
-MESSAGE(STATUS ${UHD_PATCH_OVERRIDE})
-IF(DEFINED UHD_PATCH_OVERRIDE)
-    SET(UHD_VERSION_PATCH_OVERRIDE ${UHD_PATCH_OVERRIDE})
-ENDIF(DEFINED UHD_PATCH_OVERRIDE)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-PROJECT(UHD-images NONE)
-LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../host/cmake/Modules)
-INCLUDE(UHDVersion) #sets version variables (used below)
-EXECUTE_PROCESS(COMMAND "date" OUTPUT_VARIABLE DATETIME_NOW OUTPUT_STRIP_TRAILING_WHITESPACE) #sets the date
+message(STATUS ${UHD_PATCH_OVERRIDE})
+if(DEFINED UHD_PATCH_OVERRIDE)
+    set(UHD_VERSION_PATCH_OVERRIDE ${UHD_PATCH_OVERRIDE})
+endif(DEFINED UHD_PATCH_OVERRIDE)
+cmake_minimum_required(VERSION 2.8)
+project(UHD-images NONE)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../host/cmake/Modules)
+include(UHDVersion) #sets version variables (used below)
+execute_process(COMMAND "date" OUTPUT_VARIABLE DATETIME_NOW OUTPUT_STRIP_TRAILING_WHITESPACE) #sets the date
 
 ########################################################################
 # Setup CPack
 ########################################################################
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - USRP Hardware Driver Images")
-SET(CPACK_PACKAGE_VENDOR              "Ettus Research LLC")
-SET(CPACK_PACKAGE_CONTACT             "support@ettus.com")
-SET(CPACK_PACKAGE_VERSION ${UHD_VERSION})
-SET(CPACK_PACKAGE_FILE_NAME "uhd-images_${UHD_VERSION}")
-SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all")
-INCLUDE(CPack) #include after setting vars
-MESSAGE(STATUS "Version: ${UHD_VERSION}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - USRP Hardware Driver Images")
+set(CPACK_PACKAGE_VENDOR              "Ettus Research LLC")
+set(CPACK_PACKAGE_CONTACT             "support@ettus.com")
+set(CPACK_PACKAGE_VERSION ${UHD_VERSION})
+set(CPACK_PACKAGE_FILE_NAME "uhd-images_${UHD_VERSION}")
+set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all")
+include(CPack) #include after setting vars
+message(STATUS "Version: ${UHD_VERSION}")
 
 ########################################################################
 # Install Images
 ########################################################################
 
 #tag the images with a version number (something identifiable)
-FILE(WRITE ${CMAKE_SOURCE_DIR}/images/${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH}.tag "${UHD_VERSION}\n${DATETIME_NOW}\n")
-INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/images DESTINATION share/uhd)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/../host/LICENSE DESTINATION share/uhd/images)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/manifest.txt DESTINATION share/uhd/images)
+file(WRITE ${CMAKE_SOURCE_DIR}/images/${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH}.tag "${UHD_VERSION}\n${DATETIME_NOW}\n")
+install(DIRECTORY ${CMAKE_SOURCE_DIR}/images DESTINATION share/uhd)
+install(FILES ${CMAKE_SOURCE_DIR}/../host/LICENSE DESTINATION share/uhd/images)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/manifest.txt DESTINATION share/uhd/images)
diff --git a/mpm/CMakeLists.txt b/mpm/CMakeLists.txt
index 72d72bcfc..b849ec723 100644
--- a/mpm/CMakeLists.txt
+++ b/mpm/CMakeLists.txt
@@ -4,153 +4,153 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
 #
 
-CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
-PROJECT(MPM C CXX) # Also has Python, but CMake can take care of that later
+cmake_minimum_required(VERSION 3.1)
+project(MPM C CXX) # Also has Python, but CMake can take care of that later
 # Set the default value for CMAKE_INSTALL_PREFIX to /usr
-IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-    SET(CMAKE_INSTALL_PREFIX "/usr"
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+    set(CMAKE_INSTALL_PREFIX "/usr"
         CACHE
         PATH
         "Default installation path for MPM"
         FORCE
     )
-ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
 
 ########################################################################
 # useful macros
 ########################################################################
-MACRO(USRP_PERIPHS_APPEND_SOURCES)
-    SET(usrp_periphs_sources ${usrp_periphs_sources} PARENT_SCOPE)
-    LIST(APPEND usrp_periphs_sources ${ARGV})
-ENDMACRO(USRP_PERIPHS_APPEND_SOURCES)
+macro(USRP_PERIPHS_APPEND_SOURCES)
+    set(usrp_periphs_sources ${usrp_periphs_sources} PARENT_SCOPE)
+    list(APPEND usrp_periphs_sources ${ARGV})
+endmacro(USRP_PERIPHS_APPEND_SOURCES)
 
-MACRO(USRP_PERIPHS_APPEND_OBJECTS)
-    SET(usrp_periphs_objects ${usrp_periphs_objects} PARENT_SCOPE)
+macro(USRP_PERIPHS_APPEND_OBJECTS)
+    set(usrp_periphs_objects ${usrp_periphs_objects} PARENT_SCOPE)
     foreach(arg ${ARGV})
-        LIST(APPEND usrp_periphs_objects $<TARGET_OBJECTS:${arg}>)
+        list(APPEND usrp_periphs_objects $<TARGET_OBJECTS:${arg}>)
     endforeach(arg)
-    SET(usrp_periphs_objects ${usrp_periphs_objects} PARENT_SCOPE)
-ENDMACRO(USRP_PERIPHS_APPEND_OBJECTS)
+    set(usrp_periphs_objects ${usrp_periphs_objects} PARENT_SCOPE)
+endmacro(USRP_PERIPHS_APPEND_OBJECTS)
 
-MACRO(USRP_PERIPHS_ADD_OBJECT name)
-  ADD_LIBRARY(${name} OBJECT ${ARGN})
-  SET_PROPERTY(TARGET ${name} PROPERTY POSITION_INDEPENDENT_CODE ON)
-  USRP_PERIPHS_APPEND_OBJECTS(${name})
-ENDMACRO(USRP_PERIPHS_ADD_OBJECT)
+macro(USRP_PERIPHS_ADD_OBJECT name)
+  add_library(${name} OBJECT ${ARGN})
+  set_property(TARGET ${name} PROPERTY POSITION_INDEPENDENT_CODE ON)
+  usrp_periphs_append_objects(${name})
+endmacro(USRP_PERIPHS_ADD_OBJECT)
 
 ########################################################################
 # Setup Boost
 ########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Configuring Boost C++ Libraries...")
-SET(BOOST_REQUIRED_COMPONENTS
+message(STATUS "")
+message(STATUS "Configuring Boost C++ Libraries...")
+set(BOOST_REQUIRED_COMPONENTS
   system
   python3
 )
 
-IF(MINGW)
-    LIST(APPEND BOOST_REQUIRED_COMPONENTS thread_win32)
-ELSE()
-    LIST(APPEND BOOST_REQUIRED_COMPONENTS thread)
-ENDIF()
-
-IF(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
-    LIST(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
-ENDIF(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
-
-IF(MSVC)
-    SET(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
-    IF(BOOST_ALL_DYN_LINK)
-        ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
-    ELSE(BOOST_ALL_DYN_LINK)
-        SET(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
-    ENDIF(BOOST_ALL_DYN_LINK)
-ENDIF(MSVC)
-
-SET(Boost_ADDITIONAL_VERSIONS
+if(MINGW)
+    list(APPEND BOOST_REQUIRED_COMPONENTS thread_win32)
+else()
+    list(APPEND BOOST_REQUIRED_COMPONENTS thread)
+endif()
+
+if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
+    list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
+endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
+
+if(MSVC)
+    set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
+    if(BOOST_ALL_DYN_LINK)
+        add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
+    else(BOOST_ALL_DYN_LINK)
+        set(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
+    endif(BOOST_ALL_DYN_LINK)
+endif(MSVC)
+
+set(Boost_ADDITIONAL_VERSIONS
     "1.56.0" "1.56" "1.57" "1.57" "1.58" "1.59" "1.60" "1.61" "1.62" "1.63"
     "1.64"
 )
-FIND_PACKAGE(Boost 1.53 COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
+find_package(Boost 1.53 COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
 
-INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
-LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+include_directories(${Boost_INCLUDE_DIRS})
+link_directories(${Boost_LIBRARY_DIRS})
 
-MESSAGE(STATUS "Boost include directories: ${Boost_INCLUDE_DIRS}")
-MESSAGE(STATUS "Boost library directories: ${Boost_LIBRARY_DIRS}")
-MESSAGE(STATUS "Boost libraries: ${Boost_LIBRARIES}")
+message(STATUS "Boost include directories: ${Boost_INCLUDE_DIRS}")
+message(STATUS "Boost library directories: ${Boost_LIBRARY_DIRS}")
+message(STATUS "Boost libraries: ${Boost_LIBRARIES}")
 
 ########################################################################
 # Setup Python API
 ########################################################################
-SET(PYTHON_ADDITIONAL_VERSIONS 3.4 3.5)
-FIND_PACKAGE(PythonInterp 3)
-FIND_PACKAGE(PythonLibs 3)
+set(PYTHON_ADDITIONAL_VERSIONS 3.4 3.5)
+find_package(PythonInterp 3)
+find_package(PythonLibs 3)
 
 ########################################################################
 # Install Dirs
 ########################################################################
 #when the library suffix should be 64 (applies to redhat linux family)
-IF(NOT DEFINED LIB_SUFFIX AND REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
-    SET(LIB_SUFFIX 64)
-ENDIF()
-IF(CMAKE_INSTALL_LIBDIR MATCHES lib64)
-    SET(LIB_SUFFIX 64)
-ENDIF()
-
-SET(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")
-SET(RUNTIME_DIR bin)
-SET(LIBRARY_DIR lib${LIB_SUFFIX})
-SET(INCLUDE_DIR include)
-SET(PKG_DATA_DIR share/mpm)
-IF(NOT DEFINED PKG_LIB_DIR)
-    SET(PKG_LIB_DIR ${LIBRARY_DIR}/mpm)
-ENDIF()
-SET(PKG_DOC_DIR share/doc/mpm)
-SET(PKG_MAN_DIR share/man/man1)
+if(NOT DEFINED LIB_SUFFIX AND REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
+    set(LIB_SUFFIX 64)
+endif()
+if(CMAKE_INSTALL_LIBDIR MATCHES lib64)
+    set(LIB_SUFFIX 64)
+endif()
+
+set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")
+set(RUNTIME_DIR bin)
+set(LIBRARY_DIR lib${LIB_SUFFIX})
+set(INCLUDE_DIR include)
+set(PKG_DATA_DIR share/mpm)
+if(NOT DEFINED PKG_LIB_DIR)
+    set(PKG_LIB_DIR ${LIBRARY_DIR}/mpm)
+endif()
+set(PKG_DOC_DIR share/doc/mpm)
+set(PKG_MAN_DIR share/man/man1)
 
 
 
 ########################################################################
 # Setup library configuration
 ########################################################################
-SET(CMAKE_CXX_STANDARD 11)
-SET(MPM_DEVICE "n3xx" CACHE STRING "Choose an MPM device to build")
-SET_PROPERTY(CACHE MPM_DEVICE PROPERTY STRINGS n3xx tests)
+set(CMAKE_CXX_STANDARD 11)
+set(MPM_DEVICE "n3xx" CACHE STRING "Choose an MPM device to build")
+set_property(CACHE MPM_DEVICE PROPERTY STRINGS n3xx tests)
 
-SET(UHD_HOST_ROOT ${CMAKE_SOURCE_DIR}/../host)
+set(UHD_HOST_ROOT ${CMAKE_SOURCE_DIR}/../host)
 
-ADD_SUBDIRECTORY(include)
-INCLUDE_DIRECTORIES(
+add_subdirectory(include)
+include_directories(
   ${CMAKE_CURRENT_SOURCE_DIR}/include
   ${CMAKE_BINARY_DIR}/include
   ${UHD_HOST_ROOT}/include
   )
 
-ADD_SUBDIRECTORY(lib)
+add_subdirectory(lib)
 
-MESSAGE("usrp_periphs objects: ${usrp_periphs_objects}")
-ADD_LIBRARY(usrp-periphs SHARED ${usrp_periphs_objects})
-TARGET_LINK_LIBRARIES(usrp-periphs
+message("usrp_periphs objects: ${usrp_periphs_objects}")
+add_library(usrp-periphs SHARED ${usrp_periphs_objects})
+target_link_libraries(usrp-periphs
     udev
     ${Boost_LIBRARIES}
 )
 
-IF(WIN32)
-    SET(DESTINATION_KEYWORD RUNTIME)
-ELSE()
-    SET(DESTINATION_KEYWORD LIBRARY)
-ENDIF()
-INSTALL(TARGETS usrp-periphs ${DESTINATION_KEYWORD} DESTINATION ${LIBRARY_DIR} COMPONENT libraries)
+if(WIN32)
+    set(DESTINATION_KEYWORD RUNTIME)
+else()
+    set(DESTINATION_KEYWORD LIBRARY)
+endif()
+install(TARGETS usrp-periphs ${DESTINATION_KEYWORD} DESTINATION ${LIBRARY_DIR} COMPONENT libraries)
 
-SET(USRP_PERIPHS_MAJOR 0)
-SET(USRP_PERIPHS_MINOR 1)
-SET(USRP_PERIPHS_PATCH 0)
-SET(USRP_PERIPHS_VERSION ${USRP_PERIPHS_MAJOR}.${USRP_PERIPHS_MINOR}.${USRP_PERIPHS_PATCH})
+set(USRP_PERIPHS_MAJOR 0)
+set(USRP_PERIPHS_MINOR 1)
+set(USRP_PERIPHS_PATCH 0)
+set(USRP_PERIPHS_VERSION ${USRP_PERIPHS_MAJOR}.${USRP_PERIPHS_MINOR}.${USRP_PERIPHS_PATCH})
 
-SET_TARGET_PROPERTIES(usrp-periphs PROPERTIES VERSION ${USRP_PERIPHS_VERSION})
-SET_TARGET_PROPERTIES(usrp-periphs PROPERTIES SOVERSION ${USRP_PERIPHS_MAJOR})
+set_target_properties(usrp-periphs PROPERTIES VERSION ${USRP_PERIPHS_VERSION})
+set_target_properties(usrp-periphs PROPERTIES SOVERSION ${USRP_PERIPHS_MAJOR})
 
-ADD_SUBDIRECTORY(python)
-ADD_SUBDIRECTORY(tools)
-ADD_SUBDIRECTORY(systemd)
+add_subdirectory(python)
+add_subdirectory(tools)
+add_subdirectory(systemd)
diff --git a/mpm/include/CMakeLists.txt b/mpm/include/CMakeLists.txt
index 83ee6bd09..49ffd9df9 100644
--- a/mpm/include/CMakeLists.txt
+++ b/mpm/include/CMakeLists.txt
@@ -4,4 +4,4 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-ADD_SUBDIRECTORY(mpm)
+add_subdirectory(mpm)
diff --git a/mpm/include/mpm/CMakeLists.txt b/mpm/include/mpm/CMakeLists.txt
index d9cb68e03..404987e2e 100644
--- a/mpm/include/mpm/CMakeLists.txt
+++ b/mpm/include/mpm/CMakeLists.txt
@@ -3,14 +3,14 @@
 #
 # SPDX-License-Identifier: GPL-3.0
 #
-INSTALL(FILES
+install(FILES
     xbar_iface.hpp
     exception.hpp
     DESTINATION ${INCLUDE_DIR}/mpm
 )
 
-ADD_SUBDIRECTORY(ad937x)
-ADD_SUBDIRECTORY(chips)
-ADD_SUBDIRECTORY(dboards)
-ADD_SUBDIRECTORY(spi)
-ADD_SUBDIRECTORY(types)
+add_subdirectory(ad937x)
+add_subdirectory(chips)
+add_subdirectory(dboards)
+add_subdirectory(spi)
+add_subdirectory(types)
diff --git a/mpm/include/mpm/ad937x/CMakeLists.txt b/mpm/include/mpm/ad937x/CMakeLists.txt
index de27f322e..2ccd141f4 100644
--- a/mpm/include/mpm/ad937x/CMakeLists.txt
+++ b/mpm/include/mpm/ad937x/CMakeLists.txt
@@ -3,7 +3,7 @@
 #
 # SPDX-License-Identifier: GPL-3.0
 #
-INSTALL(FILES
+install(FILES
     adi_ctrl.hpp
     ad937x_ctrl.hpp
     DESTINATION ${INCLUDE_DIR}/mpm/mykonos
diff --git a/mpm/include/mpm/dboards/CMakeLists.txt b/mpm/include/mpm/dboards/CMakeLists.txt
index 3d3db8ead..4dd02a6d6 100644
--- a/mpm/include/mpm/dboards/CMakeLists.txt
+++ b/mpm/include/mpm/dboards/CMakeLists.txt
@@ -3,7 +3,7 @@
 #
 # SPDX-License-Identifier: GPL-3.0
 #
-INSTALL(FILES
+install(FILES
     magnesium_manager.hpp
     DESTINATION ${INCLUDE_DIR}/mpm/dboards
 )
diff --git a/mpm/include/mpm/spi/CMakeLists.txt b/mpm/include/mpm/spi/CMakeLists.txt
index 6c961d266..c04c240f6 100644
--- a/mpm/include/mpm/spi/CMakeLists.txt
+++ b/mpm/include/mpm/spi/CMakeLists.txt
@@ -4,7 +4,7 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-INSTALL(FILES
+install(FILES
   spi_iface.hpp
   spi_regs_iface.hpp
   DESTINATION ${INCLUDE_DIR}/mpm/spi
diff --git a/mpm/include/mpm/types/CMakeLists.txt b/mpm/include/mpm/types/CMakeLists.txt
index ce22c7a52..42d65ee66 100644
--- a/mpm/include/mpm/types/CMakeLists.txt
+++ b/mpm/include/mpm/types/CMakeLists.txt
@@ -4,7 +4,7 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-INSTALL(FILES
+install(FILES
   regs_iface.hpp
   DESTINATION ${INCLUDE_DIR}/mpm/types
 )
diff --git a/mpm/lib/CMakeLists.txt b/mpm/lib/CMakeLists.txt
index 091c2c25f..810098c89 100644
--- a/mpm/lib/CMakeLists.txt
+++ b/mpm/lib/CMakeLists.txt
@@ -4,18 +4,18 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-SET(UHD_HOST_ROOT ${CMAKE_SOURCE_DIR}/../host)
+set(UHD_HOST_ROOT ${CMAKE_SOURCE_DIR}/../host)
 
-ADD_SUBDIRECTORY(dboards)
-ADD_SUBDIRECTORY(chips)
-ADD_SUBDIRECTORY(spi)
-ADD_SUBDIRECTORY(types)
+add_subdirectory(dboards)
+add_subdirectory(chips)
+add_subdirectory(spi)
+add_subdirectory(types)
 
 if(MPM_DEVICE STREQUAL "n3xx")
-    ADD_SUBDIRECTORY(mykonos)
+    add_subdirectory(mykonos)
 endif(MPM_DEVICE STREQUAL "n3xx")
 
-USRP_PERIPHS_ADD_OBJECT(periphs
+usrp_periphs_add_object(periphs
     exception.cpp
     xbar_iface.cpp
     ${UHD_HOST_ROOT}/lib/exception.cpp
diff --git a/mpm/lib/dboards/CMakeLists.txt b/mpm/lib/dboards/CMakeLists.txt
index a1017d8d3..cd09ff97f 100644
--- a/mpm/lib/dboards/CMakeLists.txt
+++ b/mpm/lib/dboards/CMakeLists.txt
@@ -9,7 +9,7 @@
 ########################################################################
 
 if(MPM_DEVICE STREQUAL "n3xx")
-    USRP_PERIPHS_ADD_OBJECT(dboards
+    usrp_periphs_add_object(dboards
         magnesium_manager.cpp
     )
 endif(MPM_DEVICE STREQUAL "n3xx")
diff --git a/mpm/lib/mykonos/CMakeLists.txt b/mpm/lib/mykonos/CMakeLists.txt
index db6fbf517..1978f8476 100644
--- a/mpm/lib/mykonos/CMakeLists.txt
+++ b/mpm/lib/mykonos/CMakeLists.txt
@@ -8,13 +8,13 @@
 # This file included, use CMake directory variables
 ########################################################################
 
-MACRO(MYKONOS_APPEND_SOURCES)
-    SET(mykonos_sources ${mykonos_sources})
-    LIST(APPEND mykonos_sources ${ARGV})
-    SET(mykonos_sources ${mykonos_sources} PARENT_SCOPE)
-ENDMACRO(MYKONOS_APPEND_SOURCES)
+macro(MYKONOS_APPEND_SOURCES)
+    set(mykonos_sources ${mykonos_sources})
+    list(APPEND mykonos_sources ${ARGV})
+    set(mykonos_sources ${mykonos_sources} PARENT_SCOPE)
+endmacro(MYKONOS_APPEND_SOURCES)
 
-SET(mykonos_sources
+set(mykonos_sources
     ${CMAKE_CURRENT_SOURCE_DIR}/ad937x_ctrl.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/ad937x_device.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/ad937x_spi_iface.cpp
@@ -22,7 +22,7 @@ SET(mykonos_sources
     ${UHD_HOST_ROOT}/lib/types/ranges.cpp
 )
 
-ADD_SUBDIRECTORY(adi)
-ADD_SUBDIRECTORY(config)
+add_subdirectory(adi)
+add_subdirectory(config)
 
-USRP_PERIPHS_ADD_OBJECT(mykonos ${mykonos_sources})
+usrp_periphs_add_object(mykonos ${mykonos_sources})
diff --git a/mpm/lib/mykonos/adi/CMakeLists.txt b/mpm/lib/mykonos/adi/CMakeLists.txt
index 4bab71e05..8a727d98a 100644
--- a/mpm/lib/mykonos/adi/CMakeLists.txt
+++ b/mpm/lib/mykonos/adi/CMakeLists.txt
@@ -3,10 +3,10 @@
 #
 # SPDX-License-Identifier: GPL-3.0
 #
-MYKONOS_APPEND_SOURCES(
+mykonos_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/mykonos.c
     ${CMAKE_CURRENT_SOURCE_DIR}/mykonos_gpio.c
     ${CMAKE_CURRENT_SOURCE_DIR}/mykonos_user.c
 )
 
-ADD_SUBDIRECTORY(mykonos_debug)
+add_subdirectory(mykonos_debug)
diff --git a/mpm/lib/mykonos/adi/mykonos_debug/CMakeLists.txt b/mpm/lib/mykonos/adi/mykonos_debug/CMakeLists.txt
index 4ad1b2c46..07f04a100 100644
--- a/mpm/lib/mykonos/adi/mykonos_debug/CMakeLists.txt
+++ b/mpm/lib/mykonos/adi/mykonos_debug/CMakeLists.txt
@@ -3,6 +3,6 @@
 #
 # SPDX-License-Identifier: GPL-3.0
 #
-MYKONOS_APPEND_SOURCES(
+mykonos_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/mykonos_dbgjesd.c
 )
diff --git a/mpm/lib/mykonos/config/CMakeLists.txt b/mpm/lib/mykonos/config/CMakeLists.txt
index 37ff57fc6..53a6270cd 100644
--- a/mpm/lib/mykonos/config/CMakeLists.txt
+++ b/mpm/lib/mykonos/config/CMakeLists.txt
@@ -3,7 +3,7 @@
 #
 # SPDX-License-Identifier: GPL-3.0
 #
-MYKONOS_APPEND_SOURCES(
+mykonos_append_sources(
     ${CMAKE_CURRENT_SOURCE_DIR}/ad937x_fir.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/ad937x_config_t.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/ad937x_gain_ctrl_config.cpp
diff --git a/mpm/lib/spi/CMakeLists.txt b/mpm/lib/spi/CMakeLists.txt
index ccc9597f9..8ce0cf1ae 100644
--- a/mpm/lib/spi/CMakeLists.txt
+++ b/mpm/lib/spi/CMakeLists.txt
@@ -3,10 +3,10 @@
 #
 # SPDX-License-Identifier: GPL-3.0
 #
-SET(SPI_SOURCES
+set(SPI_SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/spidev_iface.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/spi_regs_iface.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/spidev.c
 )
 
-USRP_PERIPHS_ADD_OBJECT(spi ${SPI_SOURCES})
+usrp_periphs_add_object(spi ${SPI_SOURCES})
diff --git a/mpm/lib/types/CMakeLists.txt b/mpm/lib/types/CMakeLists.txt
index dc97bc0e8..f65e41f44 100644
--- a/mpm/lib/types/CMakeLists.txt
+++ b/mpm/lib/types/CMakeLists.txt
@@ -3,10 +3,10 @@
 #
 # SPDX-License-Identifier: GPL-3.0
 #
-SET(TYPES_SOURCES
+set(TYPES_SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/lockable.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/log_buf.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/mmap_regs_iface.cpp
 )
 
-USRP_PERIPHS_ADD_OBJECT(types ${TYPES_SOURCES})
+usrp_periphs_add_object(types ${TYPES_SOURCES})
diff --git a/mpm/python/CMakeLists.txt b/mpm/python/CMakeLists.txt
index c7a5ac698..6198cfb36 100644
--- a/mpm/python/CMakeLists.txt
+++ b/mpm/python/CMakeLists.txt
@@ -8,40 +8,40 @@
 # This file included, use CMake directory variables
 ########################################################################
 
-ADD_LIBRARY(pyusrp_periphs SHARED pyusrp_periphs.cpp)
-TARGET_INCLUDE_DIRECTORIES(pyusrp_periphs PUBLIC
+add_library(pyusrp_periphs SHARED pyusrp_periphs.cpp)
+target_include_directories(pyusrp_periphs PUBLIC
     ${PYTHON_INCLUDE_DIRS}
     ${CMAKE_SOURCE_DIR}/lib/
     ${UHD_HOST_ROOT}/lib/usrp/common
 )
-TARGET_LINK_LIBRARIES(pyusrp_periphs ${Boost_PYTHON_LIBRARY} ${Boost_LIBRARIES} usrp-periphs)
-ADD_CUSTOM_COMMAND(TARGET pyusrp_periphs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libpyusrp_periphs.so ${CMAKE_CURRENT_BINARY_DIR}/usrp_mpm/libpyusrp_periphs.so)
+target_link_libraries(pyusrp_periphs ${Boost_PYTHON_LIBRARY} ${Boost_LIBRARIES} usrp-periphs)
+add_custom_command(TARGET pyusrp_periphs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libpyusrp_periphs.so ${CMAKE_CURRENT_BINARY_DIR}/usrp_mpm/libpyusrp_periphs.so)
 
-SET(USRP_MPM_FILES "")
-ADD_SUBDIRECTORY(usrp_mpm)
+set(USRP_MPM_FILES "")
+add_subdirectory(usrp_mpm)
 
-SET(OUTPUT      "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
-SET(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
-SET(SETUP_PY    "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
-SET(PERIPH_MGR_INIT_IN "${CMAKE_CURRENT_SOURCE_DIR}/usrp_mpm/periph_manager/__init__.py.in")
-SET(PERIPH_MGR_INIT "${CMAKE_CURRENT_BINARY_DIR}/usrp_mpm/periph_manager/__init__.py")
+set(OUTPUT      "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
+set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
+set(SETUP_PY    "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
+set(PERIPH_MGR_INIT_IN "${CMAKE_CURRENT_SOURCE_DIR}/usrp_mpm/periph_manager/__init__.py.in")
+set(PERIPH_MGR_INIT "${CMAKE_CURRENT_BINARY_DIR}/usrp_mpm/periph_manager/__init__.py")
 
-CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY})
-CONFIGURE_FILE(${PERIPH_MGR_INIT_IN} ${PERIPH_MGR_INIT})
+configure_file(${SETUP_PY_IN} ${SETUP_PY})
+configure_file(${PERIPH_MGR_INIT_IN} ${PERIPH_MGR_INIT})
 
-ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT}
+add_custom_command(OUTPUT ${OUTPUT}
      COMMAND ${CMAKE_COMMAND}  -DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}" -DBINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}"  -P ${CMAKE_CURRENT_SOURCE_DIR}/copy_python_module.cmake
      COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} -q build
      COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
      DEPENDS ${USRP_MPM_FILES})
-ADD_CUSTOM_TARGET(usrp_mpm ALL DEPENDS ${OUTPUT} pyusrp_periphs)
+add_custom_target(usrp_mpm ALL DEPENDS ${OUTPUT} pyusrp_periphs)
 
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
+execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
     "from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_python_lib(plat_specific=True, prefix=''))"
     OUTPUT_VARIABLE USRP_MPM_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
 )
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build/lib/usrp_mpm DESTINATION ${CMAKE_INSTALL_PREFIX}/${USRP_MPM_PYTHON_DIR})
-INSTALL(PROGRAMS
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build/lib/usrp_mpm DESTINATION ${CMAKE_INSTALL_PREFIX}/${USRP_MPM_PYTHON_DIR})
+install(PROGRAMS
     aurora_bist_test.py
     n3xx_bist
     usrp_hwd.py
diff --git a/mpm/python/copy_python_module.cmake b/mpm/python/copy_python_module.cmake
index 501793419..76d546d01 100644
--- a/mpm/python/copy_python_module.cmake
+++ b/mpm/python/copy_python_module.cmake
@@ -1,4 +1,4 @@
-SET(BINARY_DIR "" CACHE STRING "")
-SET(SOURCE_DIR "" CACHE STRING "")
-FILE(COPY "${SOURCE_DIR}/usrp_mpm/" DESTINATION ${BINARY_DIR}/usrp_mpm
+set(BINARY_DIR "" CACHE STRING "")
+set(SOURCE_DIR "" CACHE STRING "")
+file(COPY "${SOURCE_DIR}/usrp_mpm/" DESTINATION ${BINARY_DIR}/usrp_mpm
     FILES_MATCHING PATTERN *.py)
diff --git a/mpm/python/usrp_mpm/CMakeLists.txt b/mpm/python/usrp_mpm/CMakeLists.txt
index a3585cc6b..e9973bb08 100644
--- a/mpm/python/usrp_mpm/CMakeLists.txt
+++ b/mpm/python/usrp_mpm/CMakeLists.txt
@@ -7,8 +7,8 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-SET(USRP_MPM_FILES ${USRP_MPM_FILES})
-SET(USRP_MPM_TOP_FILES
+set(USRP_MPM_FILES ${USRP_MPM_FILES})
+set(USRP_MPM_TOP_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
     ${CMAKE_CURRENT_SOURCE_DIR}/aurora_control.py
     ${CMAKE_CURRENT_SOURCE_DIR}/bfrfs.py
@@ -23,11 +23,11 @@ SET(USRP_MPM_TOP_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/prefs.py
     ${CMAKE_CURRENT_SOURCE_DIR}/rpc_server.py
 )
-LIST(APPEND USRP_MPM_FILES ${USRP_MPM_TOP_FILES})
-ADD_SUBDIRECTORY(chips)
-ADD_SUBDIRECTORY(cores)
-ADD_SUBDIRECTORY(dboard_manager)
-ADD_SUBDIRECTORY(periph_manager)
-ADD_SUBDIRECTORY(sys_utils)
-ADD_SUBDIRECTORY(xports)
-SET(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
+list(APPEND USRP_MPM_FILES ${USRP_MPM_TOP_FILES})
+add_subdirectory(chips)
+add_subdirectory(cores)
+add_subdirectory(dboard_manager)
+add_subdirectory(periph_manager)
+add_subdirectory(sys_utils)
+add_subdirectory(xports)
+set(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
diff --git a/mpm/python/usrp_mpm/chips/CMakeLists.txt b/mpm/python/usrp_mpm/chips/CMakeLists.txt
index ffe1b2419..a1b2f125d 100644
--- a/mpm/python/usrp_mpm/chips/CMakeLists.txt
+++ b/mpm/python/usrp_mpm/chips/CMakeLists.txt
@@ -4,11 +4,11 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-SET(USRP_MPM_FILES ${USRP_MPM_FILES})
-SET(USRP_MPM_CHIP_FILES
+set(USRP_MPM_FILES ${USRP_MPM_FILES})
+set(USRP_MPM_CHIP_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
     ${CMAKE_CURRENT_SOURCE_DIR}/lmk04828.py
 )
-LIST(APPEND USRP_MPM_FILES ${USRP_MPM_CHIP_FILES})
-SET(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
+list(APPEND USRP_MPM_FILES ${USRP_MPM_CHIP_FILES})
+set(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
 
diff --git a/mpm/python/usrp_mpm/cores/CMakeLists.txt b/mpm/python/usrp_mpm/cores/CMakeLists.txt
index 85ac2348d..ad5277dd7 100644
--- a/mpm/python/usrp_mpm/cores/CMakeLists.txt
+++ b/mpm/python/usrp_mpm/cores/CMakeLists.txt
@@ -4,12 +4,12 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-SET(USRP_MPM_FILES ${USRP_MPM_FILES})
-SET(USRP_MPM_CORE_FILES
+set(USRP_MPM_FILES ${USRP_MPM_FILES})
+set(USRP_MPM_CORE_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
     ${CMAKE_CURRENT_SOURCE_DIR}/tdc_sync.py
     ${CMAKE_CURRENT_SOURCE_DIR}/nijesdcore.py
 )
-LIST(APPEND USRP_MPM_FILES ${USRP_MPM_CORE_FILES})
-SET(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
+list(APPEND USRP_MPM_FILES ${USRP_MPM_CORE_FILES})
+set(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
 
diff --git a/mpm/python/usrp_mpm/dboard_manager/CMakeLists.txt b/mpm/python/usrp_mpm/dboard_manager/CMakeLists.txt
index 542497898..08dd7fba9 100644
--- a/mpm/python/usrp_mpm/dboard_manager/CMakeLists.txt
+++ b/mpm/python/usrp_mpm/dboard_manager/CMakeLists.txt
@@ -7,8 +7,8 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-SET(USRP_MPM_FILES ${USRP_MPM_FILES})
-SET(USRP_MPM_DBMGR_FILES
+set(USRP_MPM_FILES ${USRP_MPM_FILES})
+set(USRP_MPM_DBMGR_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
     ${CMAKE_CURRENT_SOURCE_DIR}/base.py
     ${CMAKE_CURRENT_SOURCE_DIR}/eiscat.py
@@ -20,5 +20,5 @@ SET(USRP_MPM_DBMGR_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/test.py
     ${CMAKE_CURRENT_SOURCE_DIR}/unknown.py
 )
-LIST(APPEND USRP_MPM_FILES ${USRP_MPM_DBMGR_FILES})
-SET(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
+list(APPEND USRP_MPM_FILES ${USRP_MPM_DBMGR_FILES})
+set(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
diff --git a/mpm/python/usrp_mpm/periph_manager/CMakeLists.txt b/mpm/python/usrp_mpm/periph_manager/CMakeLists.txt
index 8000ebc6d..b16932f90 100644
--- a/mpm/python/usrp_mpm/periph_manager/CMakeLists.txt
+++ b/mpm/python/usrp_mpm/periph_manager/CMakeLists.txt
@@ -7,12 +7,12 @@
 ########################################################################
 # This file included, use CMake directory variables
 ########################################################################
-SET(USRP_MPM_FILES ${USRP_MPM_FILES})
-SET(USRP_MPM_PERIPHMGR_FILES
+set(USRP_MPM_FILES ${USRP_MPM_FILES})
+set(USRP_MPM_PERIPHMGR_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in
     ${CMAKE_CURRENT_SOURCE_DIR}/base.py
     ${CMAKE_CURRENT_SOURCE_DIR}/n3xx.py
     ${CMAKE_CURRENT_SOURCE_DIR}/test.py
     )
-LIST(APPEND USRP_MPM_FILES ${USRP_MPM_PERIPHMGR_FILES})
-SET(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
+list(APPEND USRP_MPM_FILES ${USRP_MPM_PERIPHMGR_FILES})
+set(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
diff --git a/mpm/python/usrp_mpm/sys_utils/CMakeLists.txt b/mpm/python/usrp_mpm/sys_utils/CMakeLists.txt
index ee7c249df..d2b67b054 100644
--- a/mpm/python/usrp_mpm/sys_utils/CMakeLists.txt
+++ b/mpm/python/usrp_mpm/sys_utils/CMakeLists.txt
@@ -4,8 +4,8 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-SET(USRP_MPM_FILES ${USRP_MPM_FILES})
-SET(USRP_MPM_SYSUTILS_FILES
+set(USRP_MPM_FILES ${USRP_MPM_FILES})
+set(USRP_MPM_SYSUTILS_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
     ${CMAKE_CURRENT_SOURCE_DIR}/dtoverlay.py
     ${CMAKE_CURRENT_SOURCE_DIR}/net.py
@@ -15,6 +15,6 @@ SET(USRP_MPM_SYSUTILS_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/uio.py
     ${CMAKE_CURRENT_SOURCE_DIR}/watchdog.py
 )
-LIST(APPEND USRP_MPM_FILES ${USRP_MPM_SYSUTILS_FILES})
-SET(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
+list(APPEND USRP_MPM_FILES ${USRP_MPM_SYSUTILS_FILES})
+set(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
 
diff --git a/mpm/python/usrp_mpm/xports/CMakeLists.txt b/mpm/python/usrp_mpm/xports/CMakeLists.txt
index 1f8ffc2b1..87e2ac66d 100644
--- a/mpm/python/usrp_mpm/xports/CMakeLists.txt
+++ b/mpm/python/usrp_mpm/xports/CMakeLists.txt
@@ -4,12 +4,12 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-SET(USRP_MPM_FILES ${USRP_MPM_FILES})
-SET(USRP_MPM_XPORT_FILES
+set(USRP_MPM_FILES ${USRP_MPM_FILES})
+set(USRP_MPM_XPORT_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
     ${CMAKE_CURRENT_SOURCE_DIR}/xportmgr_udp.py
     ${CMAKE_CURRENT_SOURCE_DIR}/xportmgr_liberio.py
 )
-LIST(APPEND USRP_MPM_FILES ${USRP_MPM_XPORT_FILES})
-SET(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
+list(APPEND USRP_MPM_FILES ${USRP_MPM_XPORT_FILES})
+set(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE)
 
diff --git a/mpm/systemd/CMakeLists.txt b/mpm/systemd/CMakeLists.txt
index bd8dded91..ef58693fd 100644
--- a/mpm/systemd/CMakeLists.txt
+++ b/mpm/systemd/CMakeLists.txt
@@ -4,18 +4,18 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(SYSTEMD "systemd" REQUIRED)
+include(FindPkgConfig)
+pkg_check_modules(SYSTEMD "systemd" REQUIRED)
 
-PKG_GET_VARIABLE(SYSTEMD_SYSTEM_UNITDIR systemd systemdsystemunitdir)
-MESSAGE(STATUS "Systemd system unit directory ${SYSTEMD_SYSTEM_UNITDIR}")
+pkg_get_variable(SYSTEMD_SYSTEM_UNITDIR systemd systemdsystemunitdir)
+message(STATUS "Systemd system unit directory ${SYSTEMD_SYSTEM_UNITDIR}")
 
-CONFIGURE_FILE(
+configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/usrp-hwd.service.in
     ${CMAKE_CURRENT_BINARY_DIR}/usrp-hwd.service
 )
 
-INSTALL(FILES
+install(FILES
   ${CMAKE_CURRENT_BINARY_DIR}/usrp-hwd.service
   DESTINATION ${SYSTEMD_SYSTEM_UNITDIR}
 )
diff --git a/mpm/tests/CMakeLists.txt b/mpm/tests/CMakeLists.txt
index df685332d..5759a33d0 100644
--- a/mpm/tests/CMakeLists.txt
+++ b/mpm/tests/CMakeLists.txt
@@ -9,5 +9,5 @@
 ########################################################################
 
 
-USRP_PERIPHS_ADD_OBJECT(tests
+usrp_periphs_add_object(tests
   ${CMAKE_CURRENT_SOURCE_DIR}/tests_spi_iface.cpp)
diff --git a/mpm/tools/CMakeLists.txt b/mpm/tools/CMakeLists.txt
index 1aa079f28..a719dd95c 100644
--- a/mpm/tools/CMakeLists.txt
+++ b/mpm/tools/CMakeLists.txt
@@ -4,19 +4,19 @@
 # SPDX-License-Identifier: GPL-3.0
 #
 
-INSTALL(PROGRAMS
+install(PROGRAMS
     mpm_shell.py
     mpm_debug.py
     DESTINATION ${RUNTIME_DIR}
 )
 
-SET(eeprom_tool_sources)
-SET(eeprom_tool_libs)
+set(eeprom_tool_sources)
+set(eeprom_tool_libs)
 
-IF("${MPM_DEVICE}" STREQUAL "n3xx")
-    MESSAGE(STATUS "Adding N3XX-specific EEPROM tools...")
-    SET(eeprom_tool_libs eeprom.c)
-    SET(eeprom_tool_sources
+if("${MPM_DEVICE}" STREQUAL "n3xx")
+    message(STATUS "Adding N3XX-specific EEPROM tools...")
+    set(eeprom_tool_libs eeprom.c)
+    set(eeprom_tool_sources
         db-dump.c
         db-id.c
         db-init.c
@@ -27,11 +27,11 @@ IF("${MPM_DEVICE}" STREQUAL "n3xx")
         eeprom-set-flags.c
         fan-limits.c
     )
-ENDIF("${MPM_DEVICE}" STREQUAL "n3xx")
+endif("${MPM_DEVICE}" STREQUAL "n3xx")
 
 #for each source: build an executable and install
-FOREACH(eeprom_tool_source ${eeprom_tool_sources})
-    GET_FILENAME_COMPONENT(eeprom_tool ${eeprom_tool_source} NAME_WE)
-    ADD_EXECUTABLE(${eeprom_tool} ${eeprom_tool_source} ${eeprom_tool_libs})
-    INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${eeprom_tool} DESTINATION ${RUNTIME_DIR})
-ENDFOREACH(eeprom_tool_source ${eeprom_tool_sources})
+foreach(eeprom_tool_source ${eeprom_tool_sources})
+    get_filename_component(eeprom_tool ${eeprom_tool_source} NAME_WE)
+    add_executable(${eeprom_tool} ${eeprom_tool_source} ${eeprom_tool_libs})
+    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${eeprom_tool} DESTINATION ${RUNTIME_DIR})
+endforeach(eeprom_tool_source ${eeprom_tool_sources})
diff --git a/tools/dissectors/cmake/Modules/FindGLIB2.cmake b/tools/dissectors/cmake/Modules/FindGLIB2.cmake
index ae7baddbb..0fa90230c 100644
--- a/tools/dissectors/cmake/Modules/FindGLIB2.cmake
+++ b/tools/dissectors/cmake/Modules/FindGLIB2.cmake
@@ -24,36 +24,36 @@
 #
 
 
-IF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
+if (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
   # in cache already
-  SET(GLIB2_FOUND TRUE)
-ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
+  set(GLIB2_FOUND TRUE)
+else (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
 
-  INCLUDE(FindPkgConfig)
+  include(FindPkgConfig)
 
   ## Glib
-  IF ( GLIB2_FIND_REQUIRED )
-    SET( _pkgconfig_REQUIRED "REQUIRED" )
-  ELSE ( GLIB2_FIND_REQUIRED )
-    SET( _pkgconfig_REQUIRED "" )
-  ENDIF ( GLIB2_FIND_REQUIRED )
-
-  IF ( GLIB2_MIN_VERSION )
-    PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} )
-  ELSE ( GLIB2_MIN_VERSION )
-    PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 )
-  ENDIF ( GLIB2_MIN_VERSION )
-  IF ( PKG_CONFIG_FOUND )
-    IF ( GLIB2_FOUND )
-      SET ( GLIB2_CORE_FOUND TRUE )
-    ELSE ( GLIB2_FOUND )
-      SET ( GLIB2_CORE_FOUND FALSE )
-    ENDIF ( GLIB2_FOUND )
-  ENDIF ( PKG_CONFIG_FOUND )
+  if ( GLIB2_FIND_REQUIRED )
+    set( _pkgconfig_REQUIRED "REQUIRED" )
+  else ( GLIB2_FIND_REQUIRED )
+    set( _pkgconfig_REQUIRED "" )
+  endif ( GLIB2_FIND_REQUIRED )
+
+  if ( GLIB2_MIN_VERSION )
+    pkg_search_module( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} )
+  else ( GLIB2_MIN_VERSION )
+    pkg_search_module( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 )
+  endif ( GLIB2_MIN_VERSION )
+  if ( PKG_CONFIG_FOUND )
+    if ( GLIB2_FOUND )
+      set ( GLIB2_CORE_FOUND TRUE )
+    else ( GLIB2_FOUND )
+      set ( GLIB2_CORE_FOUND FALSE )
+    endif ( GLIB2_FOUND )
+  endif ( PKG_CONFIG_FOUND )
 
   # Look for glib2 include dir and libraries w/o pkgconfig
-  IF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
-    FIND_PATH(
+  if ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
+    find_path(
       _glibconfig_include_DIR
     NAMES
       glibconfig.h
@@ -71,7 +71,7 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
       glib-2.0/include
     )
 
-    FIND_PATH(
+    find_path(
       _glib2_include_DIR
     NAMES
       glib.h
@@ -87,7 +87,7 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
 
     #MESSAGE(STATUS "Glib headers: ${_glib2_include_DIR}")
 
-    FIND_LIBRARY(
+    find_library(
       _glib2_link_DIR
     NAMES
       glib-2.0
@@ -99,23 +99,23 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
       /usr/lib
       /usr/local/lib
     )
-    IF ( _glib2_include_DIR AND _glib2_link_DIR )
-        SET ( _glib2_FOUND TRUE )
-    ENDIF ( _glib2_include_DIR AND _glib2_link_DIR )
+    if ( _glib2_include_DIR AND _glib2_link_DIR )
+        set ( _glib2_FOUND TRUE )
+    endif ( _glib2_include_DIR AND _glib2_link_DIR )
 
 
-    IF ( _glib2_FOUND )
-        SET ( GLIB2_INCLUDE_DIRS ${_glib2_include_DIR} ${_glibconfig_include_DIR} )
-        SET ( GLIB2_LIBRARIES ${_glib2_link_DIR} )
-        SET ( GLIB2_CORE_FOUND TRUE )
-    ELSE ( _glib2_FOUND )
-        SET ( GLIB2_CORE_FOUND FALSE )
-    ENDIF ( _glib2_FOUND )
+    if ( _glib2_FOUND )
+        set ( GLIB2_INCLUDE_DIRS ${_glib2_include_DIR} ${_glibconfig_include_DIR} )
+        set ( GLIB2_LIBRARIES ${_glib2_link_DIR} )
+        set ( GLIB2_CORE_FOUND TRUE )
+    else ( _glib2_FOUND )
+        set ( GLIB2_CORE_FOUND FALSE )
+    endif ( _glib2_FOUND )
 
     # Handle dependencies
     # libintl
-    IF ( NOT LIBINTL_FOUND )
-      FIND_PATH(LIBINTL_INCLUDE_DIR
+    if ( NOT LIBINTL_FOUND )
+      find_path(LIBINTL_INCLUDE_DIR
       NAMES
         libintl.h
       PATHS
@@ -126,7 +126,7 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
         /usr/local/include
       )
 
-      FIND_LIBRARY(LIBINTL_LIBRARY
+      find_library(LIBINTL_LIBRARY
       NAMES
         intl
       PATHS
@@ -137,14 +137,14 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
         /usr/lib
       )
 
-      IF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
-        SET (LIBINTL_FOUND TRUE)
-      ENDIF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
-    ENDIF ( NOT LIBINTL_FOUND )
+      if (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
+        set (LIBINTL_FOUND TRUE)
+      endif (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
+    endif ( NOT LIBINTL_FOUND )
 
     # libiconv
-    IF ( NOT LIBICONV_FOUND )
-      FIND_PATH(LIBICONV_INCLUDE_DIR
+    if ( NOT LIBICONV_FOUND )
+      find_path(LIBICONV_INCLUDE_DIR
       NAMES
         iconv.h
       PATHS
@@ -159,7 +159,7 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
         glib-2.0
       )
 
-      FIND_LIBRARY(LIBICONV_LIBRARY
+      find_library(LIBICONV_LIBRARY
       NAMES
         iconv
       PATHS
@@ -170,69 +170,69 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
         /usr/local/lib
       )
 
-      IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
-        SET (LIBICONV_FOUND TRUE)
-      ENDIF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
-    ENDIF ( NOT LIBICONV_FOUND )
+      if (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
+        set (LIBICONV_FOUND TRUE)
+      endif (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
+    endif ( NOT LIBICONV_FOUND )
 
-    IF (LIBINTL_FOUND)
-      SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBINTL_LIBRARY})
-      SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR})
-    ENDIF (LIBINTL_FOUND)
+    if (LIBINTL_FOUND)
+      set (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBINTL_LIBRARY})
+      set (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR})
+    endif (LIBINTL_FOUND)
 
-    IF (LIBICONV_FOUND)
-      SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
-      SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
-    ENDIF (LIBICONV_FOUND)
+    if (LIBICONV_FOUND)
+      set (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
+      set (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
+    endif (LIBICONV_FOUND)
 
-  ENDIF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
+  endif ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
   ##
 
-  IF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
-    SET (GLIB2_FOUND TRUE)
-  ENDIF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
+  if (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
+    set (GLIB2_FOUND TRUE)
+  endif (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
 
-  IF (GLIB2_FOUND)
-    IF (NOT GLIB2_FIND_QUIETLY)
-      MESSAGE (STATUS "Found GLib2: ${GLIB2_LIBRARIES} ${GLIB2_INCLUDE_DIRS}")
-    ENDIF (NOT GLIB2_FIND_QUIETLY)
-  ELSE (GLIB2_FOUND)
-    IF (GLIB2_FIND_REQUIRED)
-      MESSAGE (SEND_ERROR "Could not find GLib2")
-    ENDIF (GLIB2_FIND_REQUIRED)
-  ENDIF (GLIB2_FOUND)
+  if (GLIB2_FOUND)
+    if (NOT GLIB2_FIND_QUIETLY)
+      message (STATUS "Found GLib2: ${GLIB2_LIBRARIES} ${GLIB2_INCLUDE_DIRS}")
+    endif (NOT GLIB2_FIND_QUIETLY)
+  else (GLIB2_FOUND)
+    if (GLIB2_FIND_REQUIRED)
+      message (SEND_ERROR "Could not find GLib2")
+    endif (GLIB2_FIND_REQUIRED)
+  endif (GLIB2_FOUND)
 
   # show the GLIB2_INCLUDE_DIRS and GLIB2_LIBRARIES variables only in the advanced view
-  MARK_AS_ADVANCED(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES)
-  MARK_AS_ADVANCED(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY)
-  MARK_AS_ADVANCED(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY)
+  mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES)
+  mark_as_advanced(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY)
+  mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY)
 
-ENDIF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS)
+endif (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS)
 
-IF ( WIN32 )
+if ( WIN32 )
     # include libiconv for win32
-    IF ( NOT LIBICONV_FOUND )
-      FIND_PATH(LIBICONV_INCLUDE_DIR iconv.h PATH_SUFFIXES glib-2.0)
-
-      FIND_LIBRARY(LIBICONV_LIBRARY NAMES iconv)
-
-      IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
-        SET (LIBICONV_FOUND TRUE)
-      ENDIF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
-    ENDIF ( NOT LIBICONV_FOUND )
-    IF (LIBICONV_FOUND)
-      SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
-      SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
-    ENDIF (LIBICONV_FOUND)
-ENDIF ( WIN32 )
-
-IF ( GLIB2_FOUND )
+    if ( NOT LIBICONV_FOUND )
+      find_path(LIBICONV_INCLUDE_DIR iconv.h PATH_SUFFIXES glib-2.0)
+
+      find_library(LIBICONV_LIBRARY NAMES iconv)
+
+      if (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
+        set (LIBICONV_FOUND TRUE)
+      endif (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
+    endif ( NOT LIBICONV_FOUND )
+    if (LIBICONV_FOUND)
+      set (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
+      set (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
+    endif (LIBICONV_FOUND)
+endif ( WIN32 )
+
+if ( GLIB2_FOUND )
 	# Check if system has a newer version of glib
 	# which supports g_regex_match_simple
-	INCLUDE( CheckIncludeFiles )
-	SET( CMAKE_REQUIRED_INCLUDES ${GLIB2_INCLUDE_DIRS} )
-	CHECK_INCLUDE_FILES ( glib/gregex.h HAVE_GLIB_GREGEX_H )
-	CHECK_INCLUDE_FILES ( glib/gchecksum.h HAVE_GLIB_GCHECKSUM_H )
+	include( CheckIncludeFiles )
+	set( CMAKE_REQUIRED_INCLUDES ${GLIB2_INCLUDE_DIRS} )
+	check_include_files ( glib/gregex.h HAVE_GLIB_GREGEX_H )
+	check_include_files ( glib/gchecksum.h HAVE_GLIB_GCHECKSUM_H )
 	# Reset CMAKE_REQUIRED_INCLUDES
-	SET( CMAKE_REQUIRED_INCLUDES "" )
-ENDIF( GLIB2_FOUND )
+	set( CMAKE_REQUIRED_INCLUDES "" )
+endif( GLIB2_FOUND )
diff --git a/tools/dissectors/cmake/Modules/FindWireshark.cmake b/tools/dissectors/cmake/Modules/FindWireshark.cmake
index 276201245..7c73cf41f 100644
--- a/tools/dissectors/cmake/Modules/FindWireshark.cmake
+++ b/tools/dissectors/cmake/Modules/FindWireshark.cmake
@@ -16,13 +16,13 @@
 # wireshark does not install its library with pkg-config information,
 # so we need to manually find the libraries and headers
 
-FIND_PATH( WIRESHARK_INCLUDE_DIRS epan/column.h PATH_SUFFIXES wireshark )
-FIND_LIBRARY( WIRESHARK_LIBRARIES wireshark )
+find_path( WIRESHARK_INCLUDE_DIRS epan/column.h PATH_SUFFIXES wireshark )
+find_library( WIRESHARK_LIBRARIES wireshark )
 
 # Report results
-IF ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
-  SET( WIRESHARK_FOUND 1 )
-ELSE ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
-  MESSAGE( SEND_ERROR "Could NOT find the wireshark library and headers" )
-ENDIF ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
+if ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
+  set( WIRESHARK_FOUND 1 )
+else ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
+  message( SEND_ERROR "Could NOT find the wireshark library and headers" )
+endif ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
 
diff --git a/tools/gr-usrptest/apps/CMakeLists.txt b/tools/gr-usrptest/apps/CMakeLists.txt
index a40192924..adb6c7810 100644
--- a/tools/gr-usrptest/apps/CMakeLists.txt
+++ b/tools/gr-usrptest/apps/CMakeLists.txt
@@ -19,7 +19,7 @@
 
 include(GrPython)
 
-GR_PYTHON_INSTALL(
+gr_python_install(
     PROGRAMS
     usrp_phasealignment.py
     DESTINATION bin
diff --git a/tools/gr-usrptest/cmake/Modules/FindCppUnit.cmake b/tools/gr-usrptest/cmake/Modules/FindCppUnit.cmake
index f93ade341..cd2f18eef 100644
--- a/tools/gr-usrptest/cmake/Modules/FindCppUnit.cmake
+++ b/tools/gr-usrptest/cmake/Modules/FindCppUnit.cmake
@@ -9,10 +9,10 @@
 # CPPUNIT_LIBRARIES, the libraries to link against to use CppUnit.
 # CPPUNIT_FOUND, If false, do not try to use CppUnit.
 
-INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(PC_CPPUNIT "cppunit")
+include(FindPkgConfig)
+pkg_check_modules(PC_CPPUNIT "cppunit")
 
-FIND_PATH(CPPUNIT_INCLUDE_DIRS
+find_path(CPPUNIT_INCLUDE_DIRS
     NAMES cppunit/TestCase.h
     HINTS ${PC_CPPUNIT_INCLUDE_DIR}
     ${CMAKE_INSTALL_PREFIX}/include
@@ -21,7 +21,7 @@ FIND_PATH(CPPUNIT_INCLUDE_DIRS
     /usr/include
 )
 
-FIND_LIBRARY(CPPUNIT_LIBRARIES
+find_library(CPPUNIT_LIBRARIES
     NAMES cppunit
     HINTS ${PC_CPPUNIT_LIBDIR}
     ${CMAKE_INSTALL_PREFIX}/lib
@@ -32,8 +32,8 @@ FIND_LIBRARY(CPPUNIT_LIBRARIES
     /usr/lib
 )
 
-LIST(APPEND CPPUNIT_LIBRARIES ${CMAKE_DL_LIBS})
+list(APPEND CPPUNIT_LIBRARIES ${CMAKE_DL_LIBS})
 
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS)
-MARK_AS_ADVANCED(CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS)
+mark_as_advanced(CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS)
diff --git a/tools/gr-usrptest/cmake/Modules/FindGnuradioRuntime.cmake b/tools/gr-usrptest/cmake/Modules/FindGnuradioRuntime.cmake
index afed684a5..58acb0e33 100644
--- a/tools/gr-usrptest/cmake/Modules/FindGnuradioRuntime.cmake
+++ b/tools/gr-usrptest/cmake/Modules/FindGnuradioRuntime.cmake
@@ -1,9 +1,9 @@
-INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(PC_GNURADIO_RUNTIME gnuradio-runtime)
+include(FindPkgConfig)
+pkg_check_modules(PC_GNURADIO_RUNTIME gnuradio-runtime)
 
 if(PC_GNURADIO_RUNTIME_FOUND)
   # look for include files
-  FIND_PATH(
+  find_path(
     GNURADIO_RUNTIME_INCLUDE_DIRS
     NAMES gnuradio/top_block.h
     HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
@@ -14,7 +14,7 @@ if(PC_GNURADIO_RUNTIME_FOUND)
     )
 
   # look for libs
-  FIND_LIBRARY(
+  find_library(
     GNURADIO_RUNTIME_LIBRARIES
     NAMES gnuradio-runtime
     HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
@@ -30,7 +30,7 @@ if(PC_GNURADIO_RUNTIME_FOUND)
   set(GNURADIO_RUNTIME_FOUND ${PC_GNURADIO_RUNTIME_FOUND})
 endif(PC_GNURADIO_RUNTIME_FOUND)
 
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 # do not check GNURADIO_RUNTIME_INCLUDE_DIRS, is not set when default include path us used.
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_RUNTIME DEFAULT_MSG GNURADIO_RUNTIME_LIBRARIES)
-MARK_AS_ADVANCED(GNURADIO_RUNTIME_LIBRARIES GNURADIO_RUNTIME_INCLUDE_DIRS)
+find_package_handle_standard_args(GNURADIO_RUNTIME DEFAULT_MSG GNURADIO_RUNTIME_LIBRARIES)
+mark_as_advanced(GNURADIO_RUNTIME_LIBRARIES GNURADIO_RUNTIME_INCLUDE_DIRS)
diff --git a/tools/gr-usrptest/cmake/Modules/GrMiscUtils.cmake b/tools/gr-usrptest/cmake/Modules/GrMiscUtils.cmake
index 5bad57c51..e8e4bab65 100644
--- a/tools/gr-usrptest/cmake/Modules/GrMiscUtils.cmake
+++ b/tools/gr-usrptest/cmake/Modules/GrMiscUtils.cmake
@@ -48,8 +48,8 @@ endfunction(GR_ADD_COND_DEF)
 ########################################################################
 function(GR_CHECK_HDR_N_DEF hdr def)
     include(CheckIncludeFileCXX)
-    CHECK_INCLUDE_FILE_CXX(${hdr} ${def})
-    GR_ADD_COND_DEF(${def})
+    check_include_file_cxx(${hdr} ${def})
+    gr_add_cond_def(${def})
 endfunction(GR_CHECK_HDR_N_DEF)
 
 ########################################################################
@@ -92,10 +92,10 @@ endmacro(GR_INCLUDE_SUBDIRECTORY)
 ########################################################################
 macro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have)
     include(CheckCXXCompilerFlag)
-    CHECK_CXX_COMPILER_FLAG(${flag} ${have})
+    check_cxx_compiler_flag(${flag} ${have})
     if(${have})
       if(${CMAKE_VERSION} VERSION_GREATER "2.8.4")
-        STRING(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_dup)
+        string(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_dup)
         if(${flag_dup} EQUAL -1)
           set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
           set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
@@ -117,12 +117,12 @@ function(GR_LIBTOOL)
 
     if(GENERATE_LIBTOOL)
         include(CMakeParseArgumentsCopy)
-        CMAKE_PARSE_ARGUMENTS(GR_LIBTOOL "" "TARGET;DESTINATION" "" ${ARGN})
+        cmake_parse_arguments(GR_LIBTOOL "" "TARGET;DESTINATION" "" ${ARGN})
 
         find_program(LIBTOOL libtool)
         if(LIBTOOL)
             include(CMakeMacroLibtoolFile)
-            CREATE_LIBTOOL_FILE(${GR_LIBTOOL_TARGET} /${GR_LIBTOOL_DESTINATION})
+            create_libtool_file(${GR_LIBTOOL_TARGET} /${GR_LIBTOOL_DESTINATION})
         endif(LIBTOOL)
     endif(GENERATE_LIBTOOL)
 
@@ -137,7 +137,7 @@ endfunction(GR_LIBTOOL)
 function(GR_LIBRARY_FOO target)
     #parse the arguments for component names
     include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_LIBRARY "" "RUNTIME_COMPONENT;DEVEL_COMPONENT" "" ${ARGN})
+    cmake_parse_arguments(GR_LIBRARY "" "RUNTIME_COMPONENT;DEVEL_COMPONENT" "" ${ARGN})
 
     #set additional target properties
     set_target_properties(${target} PROPERTIES SOVERSION ${LIBVER})
@@ -158,7 +158,7 @@ function(GR_LIBRARY_FOO target)
     if(LIBRARY_EXTRAS)
 
         #create .la file before changing props
-        GR_LIBTOOL(TARGET ${target} DESTINATION ${GR_LIBRARY_DIR})
+        gr_libtool(TARGET ${target} DESTINATION ${GR_LIBRARY_DIR})
 
         #give the library a special name with ultra-zero soversion
         set_target_properties(${target} PROPERTIES OUTPUT_NAME ${target}-${LIBVER} SOVERSION "0.0.0")
@@ -226,7 +226,7 @@ endfunction(GR_GEN_TARGET_DEPS)
 function(GR_LOGGING)
   find_package(Log4cpp)
 
-  OPTION(ENABLE_GR_LOG "Use gr_logger" ON)
+  option(ENABLE_GR_LOG "Use gr_logger" ON)
   if(ENABLE_GR_LOG)
     # If gr_logger is enabled, make it usable
     add_definitions( -DENABLE_GR_LOG )
@@ -234,22 +234,22 @@ function(GR_LOGGING)
     # also test LOG4CPP; if we have it, use this version of the logger
     # otherwise, default to the stdout/stderr model.
     if(LOG4CPP_FOUND)
-      SET(HAVE_LOG4CPP True CACHE INTERNAL "" FORCE)
+      set(HAVE_LOG4CPP True CACHE INTERNAL "" FORCE)
       add_definitions( -DHAVE_LOG4CPP )
     else(not LOG4CPP_FOUND)
-      SET(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE)
-      SET(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
-      SET(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE)
-      SET(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
+      set(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE)
+      set(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
+      set(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE)
+      set(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
     endif(LOG4CPP_FOUND)
 
-    SET(ENABLE_GR_LOG ${ENABLE_GR_LOG} CACHE INTERNAL "" FORCE)
+    set(ENABLE_GR_LOG ${ENABLE_GR_LOG} CACHE INTERNAL "" FORCE)
 
   else(ENABLE_GR_LOG)
-    SET(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE)
-    SET(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
-    SET(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE)
-    SET(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
+    set(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE)
+    set(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
+    set(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE)
+    set(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
   endif(ENABLE_GR_LOG)
 
   message(STATUS "ENABLE_GR_LOG set to ${ENABLE_GR_LOG}.")
@@ -274,7 +274,7 @@ function(GRCC)
   set(filenames ${ARGV})
   file(MAKE_DIRECTORY ${directory})
 
-  SET(GRCC_COMMAND ${CMAKE_SOURCE_DIR}/gr-utils/python/grcc)
+  set(GRCC_COMMAND ${CMAKE_SOURCE_DIR}/gr-utils/python/grcc)
 
   # GRCC uses some stuff in grc and gnuradio-runtime, so we force
   # the known paths here
@@ -330,7 +330,7 @@ endfunction(GRCC)
 ########################################################################
 macro(GR_CHECK_LINUX_SCHED_AVAIL)
 set(CMAKE_REQUIRED_LIBRARIES -lpthread)
-    CHECK_CXX_SOURCE_COMPILES("
+    check_cxx_source_compiles("
         #include <pthread.h>
         int main(){
             pthread_t pthread;
@@ -338,9 +338,9 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
             return 0;
         } " HAVE_PTHREAD_SETSCHEDPARAM
     )
-    GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM)
+    gr_add_cond_def(HAVE_PTHREAD_SETSCHEDPARAM)
 
-    CHECK_CXX_SOURCE_COMPILES("
+    check_cxx_source_compiles("
         #include <sched.h>
         int main(){
             pid_t pid;
@@ -348,7 +348,7 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
             return 0;
         } " HAVE_SCHED_SETSCHEDULER
     )
-    GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
+    gr_add_cond_def(HAVE_SCHED_SETSCHEDULER)
 endmacro(GR_CHECK_LINUX_SCHED_AVAIL)
 
 ########################################################################
diff --git a/tools/gr-usrptest/cmake/Modules/GrPython.cmake b/tools/gr-usrptest/cmake/Modules/GrPython.cmake
index 06e061e21..00ed46792 100644
--- a/tools/gr-usrptest/cmake/Modules/GrPython.cmake
+++ b/tools/gr-usrptest/cmake/Modules/GrPython.cmake
@@ -130,7 +130,7 @@ endfunction(GR_UNIQUE_TARGET)
 ########################################################################
 function(GR_PYTHON_INSTALL)
     include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
+    cmake_parse_arguments(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
 
     ####################################################################
     if(GR_PYTHON_INSTALL_FILES)
@@ -225,7 +225,7 @@ function(GR_PYTHON_INSTALL)
 
     endif()
 
-    GR_UNIQUE_TARGET("pygen" ${python_install_gen_targets})
+    gr_unique_target("pygen" ${python_install_gen_targets})
 
 endfunction(GR_PYTHON_INSTALL)
 
diff --git a/tools/gr-usrptest/cmake/Modules/GrSwig.cmake b/tools/gr-usrptest/cmake/Modules/GrSwig.cmake
index abf4dc461..f7396b2cc 100644
--- a/tools/gr-usrptest/cmake/Modules/GrSwig.cmake
+++ b/tools/gr-usrptest/cmake/Modules/GrSwig.cmake
@@ -62,7 +62,7 @@ function(GR_SWIG_MAKE_DOCS output_file)
 
         #Create a dummy custom command that depends on other targets
         include(GrMiscUtils)
-        GR_GEN_TARGET_DEPS(_${name}_tag tag_deps ${GR_SWIG_DOCS_TARGET_DEPS})
+        gr_gen_target_deps(_${name}_tag tag_deps ${GR_SWIG_DOCS_TARGET_DEPS})
 
         #call doxygen on the Doxyfile + input headers
         add_custom_command(
@@ -110,9 +110,9 @@ macro(GR_SWIG_MAKE name)
     # vector<long unsigned int> (on 64-bit machines). Use this to test
     # the size of size_t, then set SIZE_T_32 if it's a 32-bit machine
     # or not if it's 64-bit. The logic in gr_type.i handles the rest.
-    INCLUDE(CheckTypeSize)
-    CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T)
-    CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT)
+    include(CheckTypeSize)
+    check_type_size("size_t" SIZEOF_SIZE_T)
+    check_type_size("unsigned int" SIZEOF_UINT)
     if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT})
       list(APPEND GR_SWIG_FLAGS -DSIZE_T_32)
     endif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT})
@@ -121,7 +121,7 @@ macro(GR_SWIG_MAKE name)
     if(GR_SWIG_DOC_FILE)
         set(GR_SWIG_DOCS_SOURCE_DEPS ${GR_SWIG_SOURCE_DEPS})
         list(APPEND GR_SWIG_DOCS_TARGET_DEPS ${GR_SWIG_TARGET_DEPS})
-        GR_SWIG_MAKE_DOCS(${GR_SWIG_DOC_FILE} ${GR_SWIG_DOC_DIRS})
+        gr_swig_make_docs(${GR_SWIG_DOC_FILE} ${GR_SWIG_DOC_DIRS})
         add_custom_target(${name}_swig_doc DEPENDS ${GR_SWIG_DOC_FILE})
         list(APPEND GR_SWIG_TARGET_DEPS ${name}_swig_doc ${GR_RUNTIME_SWIG_DOC_FILE})
     endif()
@@ -147,7 +147,7 @@ macro(GR_SWIG_MAKE name)
 
     #Create a dummy custom command that depends on other targets
     include(GrMiscUtils)
-    GR_GEN_TARGET_DEPS(_${name}_swig_tag tag_deps ${GR_SWIG_TARGET_DEPS})
+    gr_gen_target_deps(_${name}_swig_tag tag_deps ${GR_SWIG_TARGET_DEPS})
     set(tag_file ${CMAKE_CURRENT_BINARY_DIR}/${name}.tag)
     add_custom_command(
         OUTPUT ${tag_file}
@@ -170,10 +170,10 @@ macro(GR_SWIG_MAKE name)
 
     #setup the actual swig library target to be built
     include(UseSWIG)
-    SWIG_ADD_MODULE(${name} python ${ifiles})
-    SWIG_LINK_LIBRARIES(${name} ${PYTHON_LIBRARIES} ${GR_SWIG_LIBRARIES})
+    swig_add_module(${name} python ${ifiles})
+    swig_link_libraries(${name} ${PYTHON_LIBRARIES} ${GR_SWIG_LIBRARIES})
     if(${name} STREQUAL "runtime_swig")
-        SET_TARGET_PROPERTIES(${SWIG_MODULE_runtime_swig_REAL_NAME} PROPERTIES DEFINE_SYMBOL "gnuradio_runtime_EXPORTS")
+        set_target_properties(${SWIG_MODULE_runtime_swig_REAL_NAME} PROPERTIES DEFINE_SYMBOL "gnuradio_runtime_EXPORTS")
     endif(${name} STREQUAL "runtime_swig")
 
 endmacro(GR_SWIG_MAKE)
@@ -189,7 +189,7 @@ endmacro(GR_SWIG_MAKE)
 macro(GR_SWIG_INSTALL)
 
     include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN})
+    cmake_parse_arguments(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN})
 
     foreach(name ${GR_SWIG_INSTALL_TARGETS})
         install(TARGETS ${SWIG_MODULE_${name}_REAL_NAME}
@@ -198,12 +198,12 @@ macro(GR_SWIG_INSTALL)
         )
 
         include(GrPython)
-        GR_PYTHON_INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py
+        gr_python_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py
             DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
             COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
         )
 
-        GR_LIBTOOL(
+        gr_libtool(
             TARGET ${SWIG_MODULE_${name}_REAL_NAME}
             DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
         )
diff --git a/tools/gr-usrptest/cmake/Modules/UseSWIG.cmake b/tools/gr-usrptest/cmake/Modules/UseSWIG.cmake
index c0f172870..1925b88c3 100644
--- a/tools/gr-usrptest/cmake/Modules/UseSWIG.cmake
+++ b/tools/gr-usrptest/cmake/Modules/UseSWIG.cmake
@@ -126,7 +126,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
   else()
     set(swig_outdir ${CMAKE_CURRENT_BINARY_DIR})
   endif()
-  SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE}
+  swig_get_extra_output_files(${SWIG_MODULE_${name}_LANGUAGE}
     swig_extra_generated_files
     "${swig_outdir}"
     "${infile}")
@@ -240,7 +240,7 @@ endmacro()
 # Create Swig module
 #
 macro(SWIG_ADD_MODULE name language)
-  SWIG_MODULE_INITIALIZE(${name} ${language})
+  swig_module_initialize(${name} ${language})
   set(swig_dot_i_sources)
   set(swig_other_sources)
   foreach(it ${ARGN})
@@ -253,7 +253,7 @@ macro(SWIG_ADD_MODULE name language)
 
   set(swig_generated_sources)
   foreach(it ${swig_dot_i_sources})
-    SWIG_ADD_SOURCE_TO_MODULE(${name} swig_generated_source ${it})
+    swig_add_source_to_module(${name} swig_generated_source ${it})
     set(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}")
   endforeach()
   get_directory_property(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
diff --git a/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake b/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake
index 5244d466e..aa41bd33e 100644
--- a/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake
+++ b/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake
@@ -1,7 +1,7 @@
-INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(PC_USRPTEST usrptest)
+include(FindPkgConfig)
+pkg_check_modules(PC_USRPTEST usrptest)
 
-FIND_PATH(
+find_path(
     USRPTEST_INCLUDE_DIRS
     NAMES usrptest/api.h
     HINTS $ENV{USRPTEST_DIR}/include
@@ -11,7 +11,7 @@ FIND_PATH(
           /usr/include
 )
 
-FIND_LIBRARY(
+find_library(
     USRPTEST_LIBRARIES
     NAMES gnuradio-usrptest
     HINTS $ENV{USRPTEST_DIR}/lib
@@ -24,7 +24,7 @@ FIND_LIBRARY(
           /usr/lib64
 )
 
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(USRPTEST DEFAULT_MSG USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS)
-MARK_AS_ADVANCED(USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(USRPTEST DEFAULT_MSG USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS)
+mark_as_advanced(USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS)
 
diff --git a/tools/gr-usrptest/lib/CMakeLists.txt b/tools/gr-usrptest/lib/CMakeLists.txt
index 10ba461e1..7a6f9f3b2 100644
--- a/tools/gr-usrptest/lib/CMakeLists.txt
+++ b/tools/gr-usrptest/lib/CMakeLists.txt
@@ -31,7 +31,7 @@ list(APPEND usrptest_sources
 
 set(usrptest_sources "${usrptest_sources}" PARENT_SCOPE)
 if(NOT usrptest_sources)
-	MESSAGE(STATUS "No C++ sources... skipping lib/")
+	message(STATUS "No C++ sources... skipping lib/")
 	return()
 endif(NOT usrptest_sources)
 
@@ -49,7 +49,7 @@ endif(APPLE)
 # Install built library files
 ########################################################################
 include(GrMiscUtils)
-GR_LIBRARY_FOO(gnuradio-usrptest RUNTIME_COMPONENT "usrptest_runtime" DEVEL_COMPONENT "usrptest_devel")
+gr_library_foo(gnuradio-usrptest RUNTIME_COMPONENT "usrptest_runtime" DEVEL_COMPONENT "usrptest_devel")
 
 ########################################################################
 # Print summary
diff --git a/tools/gr-usrptest/python/CMakeLists.txt b/tools/gr-usrptest/python/CMakeLists.txt
index 7bb812b0c..d7062e017 100644
--- a/tools/gr-usrptest/python/CMakeLists.txt
+++ b/tools/gr-usrptest/python/CMakeLists.txt
@@ -28,7 +28,7 @@ endif()
 ########################################################################
 # Install python sources
 ########################################################################
-GR_PYTHON_INSTALL(
+gr_python_install(
     FILES
     __init__.py
     functions.py
@@ -46,4 +46,4 @@ include(GrTest)
 
 set(GR_TEST_TARGET_DEPS gnuradio-usrptest)
 set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig)
-GR_ADD_TEST(qa_measurement_sink_f ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_measurement_sink_f.py)
+gr_add_test(qa_measurement_sink_f ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_measurement_sink_f.py)
diff --git a/tools/gr-usrptest/python/flowgraphs/CMakeLists.txt b/tools/gr-usrptest/python/flowgraphs/CMakeLists.txt
index 7ea94b505..31199d671 100644
--- a/tools/gr-usrptest/python/flowgraphs/CMakeLists.txt
+++ b/tools/gr-usrptest/python/flowgraphs/CMakeLists.txt
@@ -20,7 +20,7 @@
 ########################################################################
 # Install python sources
 ########################################################################
-GR_PYTHON_INSTALL(
+gr_python_install(
     FILES
     __init__.py
     selftest_fg.py
diff --git a/tools/gr-usrptest/python/labview_control/CMakeLists.txt b/tools/gr-usrptest/python/labview_control/CMakeLists.txt
index 924df5479..4f84ccaf4 100644
--- a/tools/gr-usrptest/python/labview_control/CMakeLists.txt
+++ b/tools/gr-usrptest/python/labview_control/CMakeLists.txt
@@ -20,7 +20,7 @@
 ########################################################################
 # Install python sources
 ########################################################################
-GR_PYTHON_INSTALL(
+gr_python_install(
     FILES
     __init__.py
     lv_control.py DESTINATION ${GR_PYTHON_DIR}/usrptest/labview_control
diff --git a/tools/gr-usrptest/python/rts_tests/CMakeLists.txt b/tools/gr-usrptest/python/rts_tests/CMakeLists.txt
index 03111a9bb..f7aebc90d 100644
--- a/tools/gr-usrptest/python/rts_tests/CMakeLists.txt
+++ b/tools/gr-usrptest/python/rts_tests/CMakeLists.txt
@@ -20,13 +20,13 @@
 ########################################################################
 # Install python sources
 ########################################################################
-GR_PYTHON_INSTALL(
+gr_python_install(
     FILES
     __init__.py
     test_phasealignment.py DESTINATION ${GR_PYTHON_DIR}/usrptest/rts_tests
 )
 
-GR_PYTHON_INSTALL(
+gr_python_install(
     PROGRAMS
     test_phasealignment.py
     DESTINATION bin
diff --git a/tools/gr-usrptest/swig/CMakeLists.txt b/tools/gr-usrptest/swig/CMakeLists.txt
index ae42be628..98bcfcafe 100644
--- a/tools/gr-usrptest/swig/CMakeLists.txt
+++ b/tools/gr-usrptest/swig/CMakeLists.txt
@@ -21,7 +21,7 @@
 # Check if there is C++ code at all
 ########################################################################
 if(NOT usrptest_sources)
-	MESSAGE(STATUS "No C++ sources... skipping swig/")
+	message(STATUS "No C++ sources... skipping swig/")
 	return()
 endif(NOT usrptest_sources)
 
@@ -47,12 +47,12 @@ set(GR_SWIG_LIBRARIES gnuradio-usrptest)
 set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/usrptest_swig_doc.i)
 set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
 
-GR_SWIG_MAKE(usrptest_swig usrptest_swig.i)
+gr_swig_make(usrptest_swig usrptest_swig.i)
 
 ########################################################################
 # Install the build swig module
 ########################################################################
-GR_SWIG_INSTALL(TARGETS usrptest_swig DESTINATION ${GR_PYTHON_DIR}/usrptest)
+gr_swig_install(TARGETS usrptest_swig DESTINATION ${GR_PYTHON_DIR}/usrptest)
 
 ########################################################################
 # Install swig .i files for development
diff --git a/tools/kitchen_sink/CMakeLists.txt b/tools/kitchen_sink/CMakeLists.txt
index edbc33bd0..dc7f5c6ef 100644
--- a/tools/kitchen_sink/CMakeLists.txt
+++ b/tools/kitchen_sink/CMakeLists.txt
@@ -37,27 +37,27 @@ set(BOOST_REQUIRED_COMPONENTS
     thread
     unit_test_framework
 )
-IF(UNIX AND EXISTS "/usr/lib64")
-    LIST(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
-ENDIF(UNIX AND EXISTS "/usr/lib64")
+if(UNIX AND EXISTS "/usr/lib64")
+    list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
+endif(UNIX AND EXISTS "/usr/lib64")
 
-IF(MSVC)
-    SET(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
-    IF(BOOST_ALL_DYN_LINK)
-        ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
-    ELSE(BOOST_ALL_DYN_LINK)
-        UNSET(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
-    ENDIF(BOOST_ALL_DYN_LINK)
-ENDIF(MSVC)
+if(MSVC)
+    set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
+    if(BOOST_ALL_DYN_LINK)
+        add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
+    else(BOOST_ALL_DYN_LINK)
+        unset(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
+    endif(BOOST_ALL_DYN_LINK)
+endif(MSVC)
 
-SET(Boost_ADDITIONAL_VERSIONS
+set(Boost_ADDITIONAL_VERSIONS
     "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49"
     "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54"
     "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59"
     "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
     "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
 )
-FIND_PACKAGE(Boost 1.46 COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
+find_package(Boost 1.46 COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
 
 #### Set up UHD:
 find_package(UHD "3.7.3" REQUIRED)
diff --git a/tools/nirio_programmer/CMakeLists.txt b/tools/nirio_programmer/CMakeLists.txt
index bde0ea574..9d3884863 100644
--- a/tools/nirio_programmer/CMakeLists.txt
+++ b/tools/nirio_programmer/CMakeLists.txt
@@ -57,7 +57,7 @@ link_directories(${Boost_LIBRARY_DIRS})
 ### Make the executable #######################################################
 add_executable(nirio_programmer nirio_programmer.cpp)
 
-SET(CMAKE_BUILD_TYPE "Release")
+set(CMAKE_BUILD_TYPE "Release")
 
 # Shared library case: All we need to do is link against the library, and
 # anything else we need (in this case, some Boost libraries):
-- 
2.11.0

