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 /host/lib/deps | |
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 'host/lib/deps')
-rw-r--r-- | host/lib/deps/CMakeLists.txt | 6 | ||||
-rw-r--r-- | host/lib/deps/rpc_CMakeLists.txt | 34 | ||||
-rw-r--r-- | host/lib/deps/rpclib/CMakeLists.txt | 34 |
3 files changed, 37 insertions, 37 deletions
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/rpc_CMakeLists.txt b/host/lib/deps/rpc_CMakeLists.txt index c8cb322da..ef28dbaf1 100644 --- a/host/lib/deps/rpc_CMakeLists.txt +++ b/host/lib/deps/rpc_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_VERSION_MAJOR ${rpclib_major_version}) -SET(RPCLIB_VERSION_MINOR ${rpclib_minor_version}) -SET(RPCLIB_VERSION_PATCH ${rpclib_patch_version}) +set(RPCLIB_VERSION_MAJOR ${rpclib_major_version}) +set(RPCLIB_VERSION_MINOR ${rpclib_minor_version}) +set(RPCLIB_VERSION_PATCH ${rpclib_patch_version}) -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/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}" |