diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-11-13 21:53:22 -0800 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-11-14 14:10:09 -0800 |
commit | a69ab0c23a0c38e3fed3e412df36538d8959d23c (patch) | |
tree | e6669a138dad84f79c46588f43a38c69dda90246 /tools | |
parent | 4247f025020d7dd1f696dfbd3cce248957d6ace7 (diff) | |
download | uhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.tar.gz uhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.tar.bz2 uhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.zip |
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!)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dissectors/cmake/Modules/FindGLIB2.cmake | 188 | ||||
-rw-r--r-- | tools/dissectors/cmake/Modules/FindWireshark.cmake | 14 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/Modules/CMakeParseArgumentsCopy.cmake | 6 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/Modules/FindCppUnit.cmake | 12 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/Modules/FindGnuradioRuntime.cmake | 10 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/Modules/GrMiscUtils.cmake | 32 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/Modules/GrPython.cmake | 2 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/Modules/GrSwig.cmake | 6 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/Modules/GrTest.cmake | 4 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake | 10 | ||||
-rw-r--r-- | tools/gr-usrptest/cmake/cmake_uninstall.cmake.in | 42 | ||||
-rw-r--r-- | tools/gr-usrptest/lib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tools/gr-usrptest/swig/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tools/kitchen_sink/CMakeLists.txt | 26 | ||||
-rw-r--r-- | tools/nirio_programmer/CMakeLists.txt | 2 |
15 files changed, 179 insertions, 179 deletions
diff --git a/tools/dissectors/cmake/Modules/FindGLIB2.cmake b/tools/dissectors/cmake/Modules/FindGLIB2.cmake index ae7baddbb..e51c0b882 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_FIND_REQUIRED ) + set( _pkgconfig_REQUIRED "REQUIRED" ) + else ( GLIB2_FIND_REQUIRED ) + set( _pkgconfig_REQUIRED "" ) + endif ( GLIB2_FIND_REQUIRED ) - IF ( GLIB2_MIN_VERSION ) + if ( GLIB2_MIN_VERSION ) PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} ) - ELSE ( 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 ) + 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 @@ -85,9 +85,9 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS ) glib-2.0 ) - #MESSAGE(STATUS "Glib headers: ${_glib2_include_DIR}") + #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} ) + 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/cmake/Modules/CMakeParseArgumentsCopy.cmake b/tools/gr-usrptest/cmake/Modules/CMakeParseArgumentsCopy.cmake index 7ce4c49ae..a7e78bbdc 100644 --- a/tools/gr-usrptest/cmake/Modules/CMakeParseArgumentsCopy.cmake +++ b/tools/gr-usrptest/cmake/Modules/CMakeParseArgumentsCopy.cmake @@ -1,6 +1,6 @@ -# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...) +# cmake_parse_arguments(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...) # -# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for +# cmake_parse_arguments() is intended to be used in macros or functions for # parsing the arguments given to that macro or function. # It processes the arguments and defines a set of variables which hold the # values of the respective options. @@ -17,7 +17,7 @@ # which can be followed by more than one value, like e.g. the TARGETS or # FILES keywords of the install() command. # -# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the +# When done, cmake_parse_arguments() will have defined for each of the # keywords listed in <options>, <one_value_keywords> and # <multi_value_keywords> a variable composed of the given <prefix> # followed by "_" and the name of the respective keyword. diff --git a/tools/gr-usrptest/cmake/Modules/FindCppUnit.cmake b/tools/gr-usrptest/cmake/Modules/FindCppUnit.cmake index f93ade341..3ed6a8521 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) +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) +include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) -MARK_AS_ADVANCED(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..6c5f38f28 100644 --- a/tools/gr-usrptest/cmake/Modules/FindGnuradioRuntime.cmake +++ b/tools/gr-usrptest/cmake/Modules/FindGnuradioRuntime.cmake @@ -1,9 +1,9 @@ -INCLUDE(FindPkgConfig) +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) +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..2a4e01a8e 100644 --- a/tools/gr-usrptest/cmake/Modules/GrMiscUtils.cmake +++ b/tools/gr-usrptest/cmake/Modules/GrMiscUtils.cmake @@ -95,7 +95,7 @@ macro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE 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,7 +117,7 @@ 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) @@ -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}) @@ -188,7 +188,7 @@ endfunction(GR_LIBRARY_FOO) # Create a dummy custom command that depends on other targets. # Usage: # GR_GEN_TARGET_DEPS(unique_name target_deps <target1> <target2> ...) -# ADD_CUSTOM_COMMAND(<the usual args> ${target_deps}) +# add_custom_command(<the usual args> ${target_deps}) # # Custom command cant depend on targets, but can depend on executables, # and executables can depend on targets. So this is the process: @@ -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 diff --git a/tools/gr-usrptest/cmake/Modules/GrPython.cmake b/tools/gr-usrptest/cmake/Modules/GrPython.cmake index 06e061e21..9ac72c2d8 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) diff --git a/tools/gr-usrptest/cmake/Modules/GrSwig.cmake b/tools/gr-usrptest/cmake/Modules/GrSwig.cmake index abf4dc461..36b5191dd 100644 --- a/tools/gr-usrptest/cmake/Modules/GrSwig.cmake +++ b/tools/gr-usrptest/cmake/Modules/GrSwig.cmake @@ -110,7 +110,7 @@ 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) + include(CheckTypeSize) CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T) CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT) if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) @@ -173,7 +173,7 @@ macro(GR_SWIG_MAKE name) 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} diff --git a/tools/gr-usrptest/cmake/Modules/GrTest.cmake b/tools/gr-usrptest/cmake/Modules/GrTest.cmake index 62caab4b5..9304d33a9 100644 --- a/tools/gr-usrptest/cmake/Modules/GrTest.cmake +++ b/tools/gr-usrptest/cmake/Modules/GrTest.cmake @@ -72,8 +72,8 @@ function(GR_ADD_TEST test_name) #http://www.cmake.org/pipermail/cmake/2009-May/029464.html #Replaced this add test + set environs code with the shell script generation. #Its nicer to be able to manually run the shell script to diagnose problems. - #ADD_TEST(${ARGV}) - #SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}") + #add_test(${ARGV}) + #set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "${environs}") if(UNIX) set(LD_PATH_VAR "LD_LIBRARY_PATH") diff --git a/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake b/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake index 5244d466e..a593b2b68 100644 --- a/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake +++ b/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake @@ -1,7 +1,7 @@ -INCLUDE(FindPkgConfig) +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) +include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(USRPTEST DEFAULT_MSG USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS) -MARK_AS_ADVANCED(USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS) +mark_as_advanced(USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS) diff --git a/tools/gr-usrptest/cmake/cmake_uninstall.cmake.in b/tools/gr-usrptest/cmake/cmake_uninstall.cmake.in index 9ae1ae4bd..ab8f77ad7 100644 --- a/tools/gr-usrptest/cmake/cmake_uninstall.cmake.in +++ b/tools/gr-usrptest/cmake/cmake_uninstall.cmake.in @@ -1,32 +1,32 @@ # http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F -IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") -ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") -FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) -STRING(REGEX REPLACE "\n" ";" files "${files}") -FOREACH(file ${files}) - MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") - IF(EXISTS "$ENV{DESTDIR}${file}") - EXEC_PROGRAM( +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") +foreach(file ${files}) + message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") + if(EXISTS "$ENV{DESTDIR}${file}") + exec_program( "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval ) - IF(NOT "${rm_retval}" STREQUAL 0) - MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") - ENDIF(NOT "${rm_retval}" STREQUAL 0) - ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}") - EXEC_PROGRAM( + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") + endif(NOT "${rm_retval}" STREQUAL 0) + elseif(IS_SYMLINK "$ENV{DESTDIR}${file}") + exec_program( "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval ) - IF(NOT "${rm_retval}" STREQUAL 0) - MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") - ENDIF(NOT "${rm_retval}" STREQUAL 0) - ELSE(EXISTS "$ENV{DESTDIR}${file}") - MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") - ENDIF(EXISTS "$ENV{DESTDIR}${file}") -ENDFOREACH(file) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") + endif(NOT "${rm_retval}" STREQUAL 0) + else(EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") + endif(EXISTS "$ENV{DESTDIR}${file}") +endforeach(file) diff --git a/tools/gr-usrptest/lib/CMakeLists.txt b/tools/gr-usrptest/lib/CMakeLists.txt index 10ba461e1..1d6aeafac 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) diff --git a/tools/gr-usrptest/swig/CMakeLists.txt b/tools/gr-usrptest/swig/CMakeLists.txt index ae42be628..d1b1fa8ee 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) 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): |