Commit graph

5 commits

Author SHA1 Message Date
Joerg Hofrichter
608c8a3ab3 mpm: fixed cmake macro for enabling modules
The macro MPM_REGISTER_COMPONENT did not work as described: in case
the default enable was set to ON and all dependencies were met, the
module was still not enabled.

Also made the status prints more helpful:
- print the default value,
- print the user override (if one was provided)
- print the resulting VAR = VALUE
- print the override hint only if the user did not
  already specify an override

Example of old incorrect behavior:
-- Configuring Mykonos support...
--   Dependency ENABLE_LIBMPM = ON
--   Disabling Mykonos support.
--   Override with -DENABLE_MYKONOS=ON/OFF

Example of new correct behavior (also with changed prints):
-- Configuring Mykonos support...
--   Default value ENABLE_MYKONOS = ON
--   Dependency ENABLE_LIBMPM = ON
--   Enabling Mykonos support (ENABLE_MYKONOS = ON)
--   Override with -DENABLE_MYKONOS=ON/OFF
2020-01-22 12:54:54 -08:00
michael-west
1004eef88e cmake: Add UHD_COMPONENT variable
Added cmake variable to set the component (currently UHD or MPM).
so the banner printed by the log_resource would reference the correct
component.  Added accessor function and appropriate calls in log.cpp.

Signed-off-by: michael-west <michael.west@ettus.com>
2019-10-15 15:21:52 -07:00
Martin Braun
a69ab0c23a cmake: Update coding style to use lowercase commands
Also updates our coding style file.

Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code (with GNU compliant sed):

cmake --help-command-list | grep -v "cmake version" | while read c; do
  echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done > convert.sed \
&& git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \
'*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed

(Make sure the backslashes don't get mangled!)
2018-11-14 14:10:09 -08:00
Alex Williams
7dcd16f5a6 mpm: Use configurable components for build system
For a minimal build, default to off for components unless the MPM_DEVICE
or the user requests it specifically.
2018-04-18 15:34:51 -07:00
Martin Braun
a5b87ab7c4 mpm: cmake: Add git hash and version info to Python module
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-04-02 15:27:05 -07:00