diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-19 22:23:46 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-19 22:23:46 -0800 |
commit | 9239878b0b81c3a368bf11cfc2fe48bfb05ff902 (patch) | |
tree | f41a5e58eac89b35cb99537a0a0b64662384a9f2 /host/Modules/UHDComponent.cmake | |
parent | fc138381ee4bd8d191795230b7447071a85e1f28 (diff) | |
parent | 7d918c5f6acc9a5d2c8ae03e2e67b403f7efd5ff (diff) | |
download | uhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.tar.gz uhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.tar.bz2 uhd-9239878b0b81c3a368bf11cfc2fe48bfb05ff902.zip |
Merge branch 'next'
Conflicts:
host/lib/usrp/usrp2/codec_impl.cpp
Diffstat (limited to 'host/Modules/UHDComponent.cmake')
-rw-r--r-- | host/Modules/UHDComponent.cmake | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/host/Modules/UHDComponent.cmake b/host/Modules/UHDComponent.cmake index 0263b071f..4ea55bbb9 100644 --- a/host/Modules/UHDComponent.cmake +++ b/host/Modules/UHDComponent.cmake @@ -27,27 +27,17 @@ SET(_uhd_disabled_components "" CACHE INTERNAL "" FORCE) # - deps a list of dependencies # - dis the default disable setting ######################################################################## -FUNCTION(LIBUHD_REGISTER_COMPONENT name var enb deps dis) - INCLUDE(CMakeDependentOption) +MACRO(LIBUHD_REGISTER_COMPONENT name var enb deps dis) MESSAGE(STATUS "") MESSAGE(STATUS "Configuring ${name} support...") - IF(DEFINED ${var}) - MESSAGE(STATUS "${name} support configured ${var}=${${var}}") - ELSE(DEFINED ${var}) #not defined: automatic enabling of component - MESSAGE(STATUS "${name} support configured automatically") - ENDIF(DEFINED ${var}) + FOREACH(dep ${deps}) + MESSAGE(STATUS " Dependency ${dep} = ${${dep}}") + ENDFOREACH(dep) #setup the dependent option for this component + INCLUDE(CMakeDependentOption) CMAKE_DEPENDENT_OPTION(${var} "enable ${name} support" ${enb} "${deps}" ${dis}) - #remove previous occurrence of component in either list - IF(DEFINED _uhd_enabled_components) - LIST(REMOVE_ITEM _uhd_enabled_components ${name}) - ENDIF(DEFINED _uhd_enabled_components) - IF(DEFINED _uhd_disabled_components) - LIST(REMOVE_ITEM _uhd_disabled_components ${name}) - ENDIF(DEFINED _uhd_disabled_components) - #append the component into one of the lists IF(${var}) MESSAGE(STATUS " Enabling ${name} support.") @@ -56,11 +46,12 @@ FUNCTION(LIBUHD_REGISTER_COMPONENT name var enb deps dis) 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) -ENDFUNCTION(LIBUHD_REGISTER_COMPONENT) +ENDMACRO(LIBUHD_REGISTER_COMPONENT) ######################################################################## # Print the registered component summary @@ -68,7 +59,7 @@ ENDFUNCTION(LIBUHD_REGISTER_COMPONENT) FUNCTION(UHD_PRINT_COMPONENT_SUMMARY) MESSAGE(STATUS "") MESSAGE(STATUS "######################################################") - MESSAGE(STATUS "# LibUHD enabled components ") + MESSAGE(STATUS "# UHD enabled components ") MESSAGE(STATUS "######################################################") FOREACH(comp ${_uhd_enabled_components}) MESSAGE(STATUS " * ${comp}") @@ -76,7 +67,7 @@ FUNCTION(UHD_PRINT_COMPONENT_SUMMARY) MESSAGE(STATUS "") MESSAGE(STATUS "######################################################") - MESSAGE(STATUS "# LibUHD disabled components ") + MESSAGE(STATUS "# UHD disabled components ") MESSAGE(STATUS "######################################################") FOREACH(comp ${_uhd_disabled_components}) MESSAGE(STATUS " * ${comp}") |