uhd/host/cmake
Martin Braun 7e765bbb1f cmake: Replace CMAKE_{SOURCE,BINARY}_DIR with UHD_*_DIR
See the CMake 3.8 documentation on these two variables:
https://cmake.org/cmake/help/v3.8/variable/PROJECT-NAME_SOURCE_DIR.html
https://cmake.org/cmake/help/v3.8/variable/CMAKE_SOURCE_DIR.html

Under normal circumstances, these two are identical. For sub-projects
(i.e., when building UHD as part of something else that is also a CMake
project), only the former is useful. There is no discernible downside of
using UHD_SOURCE_DIR over CMAKE_SOURCE_DIR.

This was changed using sed:

$ sed -i "s/CMAKE_SOURCE_DIR/UHD_SOURCE_DIR/g" \
    `ag -l CMAKE_SOURCE_DIR **/{CMakeLists.txt,*.cmake}`
$ sed -i "s/CMAKE_BINARY_DIR/UHD_BINARY_DIR/g" \
    `ag -l CMAKE_BINARY_DIR **/{CMakeLists.txt,*.cmake}`

At the same time, we also replace the CMake variable UHD_HOST_ROOT (used
in MPM) with UHD_SOURCE_DIR. There's no reason to have two variables
with the same meaning and different names, but more importantly, this
means that UHD_SOURCE_DIR is defined even in those cases where MPM calls
into CMake files from UHD without any additional patches.

Shoutout to GitHub user marcobergamin for bringing this up.
2021-09-29 12:42:38 -05:00
..
debian installers: resolve ubuntu linter issue 2021-06-04 13:51:15 -05:00
Modules cmake: Replace CMAKE_{SOURCE,BINARY}_DIR with UHD_*_DIR 2021-09-29 12:42:38 -05:00
msvc uhd: Update license headers 2018-02-19 16:54:52 -08:00
redhat cpack: Fix RPM generation 2019-01-28 14:18:44 +01:00
Toolchains cmake: Update coding style to use lowercase commands 2018-11-14 14:10:09 -08:00
cmake_uninstall.cmake.in cmake: Update coding style to use lowercase commands 2018-11-14 14:10:09 -08:00