aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2014-08-14 06:45:53 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2014-08-14 06:45:53 -0700
commite3826b1a671f4fe9e197b72a9c8dc0aa6976ea0c (patch)
tree47d899052407ea405b397786966bf69b6fd78cef
parent781d7a24aba25ab045d2f4456071ce9aad3b389c (diff)
downloaduhd-e3826b1a671f4fe9e197b72a9c8dc0aa6976ea0c.tar.gz
uhd-e3826b1a671f4fe9e197b72a9c8dc0aa6976ea0c.tar.bz2
uhd-e3826b1a671f4fe9e197b72a9c8dc0aa6976ea0c.zip
Restoring compatibility with CMake 2.6
* The UNSET command didn't exist back then, but using SET with no value does the same thing * CMake 2.6 doesn't like nested parantheses in IF statements, so tweak IF/ELSE statements
-rw-r--r--host/CMakeLists.txt6
-rw-r--r--host/cmake/Modules/FindUSB1.cmake2
-rw-r--r--host/cmake/Modules/UHDPackage.cmake34
-rw-r--r--host/lib/convert/CMakeLists.txt2
-rw-r--r--host/lib/ic_reg_maps/CMakeLists.txt2
-rw-r--r--host/lib/types/CMakeLists.txt2
-rw-r--r--host/lib/utils/CMakeLists.txt2
7 files changed, 26 insertions, 24 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 2c574c54f..ba16ce894 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -149,7 +149,7 @@ IF(MSVC)
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
+ SET(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
ENDIF(BOOST_ALL_DYN_LINK)
ENDIF(MSVC)
@@ -262,8 +262,8 @@ STRING(REPLACE ";" " " UHD_PC_LIBS "${UHD_PC_LIBS}")
#unset these vars to avoid hard-coded paths to cross environment
IF(CMAKE_CROSSCOMPILING)
- UNSET(UHD_PC_CFLAGS)
- UNSET(UHD_PC_LIBS)
+ SET(UHD_PC_CFLAGS)
+ SET(UHD_PC_LIBS)
ENDIF(CMAKE_CROSSCOMPILING)
IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
diff --git a/host/cmake/Modules/FindUSB1.cmake b/host/cmake/Modules/FindUSB1.cmake
index 96e2a5aae..1e8e3ba03 100644
--- a/host/cmake/Modules/FindUSB1.cmake
+++ b/host/cmake/Modules/FindUSB1.cmake
@@ -23,7 +23,7 @@ FIND_PATH(LIBUSB_INCLUDE_DIRS
set(libusb1_library_names usb-1.0 libusb-1.0)
#libusb-1.0 compatible library on freebsd
-if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD"))
+if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD")
list(APPEND libusb1_library_names usb)
endif()
diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake
index d1c0fc099..a050a083d 100644
--- a/host/cmake/Modules/UHDPackage.cmake
+++ b/host/cmake/Modules/UHDPackage.cmake
@@ -63,22 +63,24 @@ ELSEIF(DEBIAN AND LIBUHDDEV_PKG)
ELSEIF(DEBIAN AND UHDHOST_PKG)
SET(CPACK_PACKAGE_FILE_NAME "uhd-host_${TRIMMED_UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
ELSE()
- FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release)
- IF((DEBIAN OR REDHAT) AND LSB_RELEASE_EXECUTABLE)
-
- #extract system information by executing the commands
- EXECUTE_PROCESS(
- COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id
- OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- EXECUTE_PROCESS(
- COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release
- OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
- #set a more sensible package name for this system
- SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}")
-ENDIF()
+ IF(DEBIAN OR REDHAT)
+ FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release)
+
+ IF(LSB_RELEASE_EXECUTABLE)
+ #extract system information by executing the commands
+ EXECUTE_PROCESS(
+ COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id
+ OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ EXECUTE_PROCESS(
+ COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release
+ OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+ #set a more sensible package name for this system
+ SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}")
+ ENDIF(LSB_RELEASE_EXECUTABLE)
+ ENDIF(DEBIAN OR REDHAT)
ENDIF(DEBIAN AND LIBUHD_PKG)
IF(${CPACK_GENERATOR} STREQUAL NSIS)
diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt
index 473b7f59f..363555f45 100644
--- a/host/lib/convert/CMakeLists.txt
+++ b/host/lib/convert/CMakeLists.txt
@@ -66,7 +66,7 @@ ENDIF()
SET(CMAKE_REQUIRED_FLAGS ${EMMINTRIN_FLAGS})
CHECK_INCLUDE_FILE_CXX(emmintrin.h HAVE_EMMINTRIN_H)
-UNSET(CMAKE_REQUIRED_FLAGS)
+SET(CMAKE_REQUIRED_FLAGS)
IF(HAVE_EMMINTRIN_H)
SET(convert_with_sse2_sources
diff --git a/host/lib/ic_reg_maps/CMakeLists.txt b/host/lib/ic_reg_maps/CMakeLists.txt
index 889c725db..c810c04ad 100644
--- a/host/lib/ic_reg_maps/CMakeLists.txt
+++ b/host/lib/ic_reg_maps/CMakeLists.txt
@@ -117,4 +117,4 @@ LIBUHD_PYTHON_GEN_SOURCE(
${CMAKE_CURRENT_BINARY_DIR}/lmk04816_regs.hpp
)
-UNSET(LIBUHD_PYTHON_GEN_SOURCE_DEPS)
+SET(LIBUHD_PYTHON_GEN_SOURCE_DEPS)
diff --git a/host/lib/types/CMakeLists.txt b/host/lib/types/CMakeLists.txt
index 7fc6bdd94..f19043c1e 100644
--- a/host/lib/types/CMakeLists.txt
+++ b/host/lib/types/CMakeLists.txt
@@ -31,7 +31,7 @@ CHECK_CXX_SOURCE_COMPILES("
}
" HAVE_CLOCK_GETTIME
)
-UNSET(CMAKE_REQUIRED_LIBRARIES)
+SET(CMAKE_REQUIRED_LIBRARIES)
INCLUDE(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("
diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt
index 2252f3221..106e2b650 100644
--- a/host/lib/utils/CMakeLists.txt
+++ b/host/lib/utils/CMakeLists.txt
@@ -84,7 +84,7 @@ CHECK_CXX_SOURCE_COMPILES("
}
" HAVE_DLOPEN
)
-UNSET(CMAKE_REQUIRED_LIBRARIES)
+SET(CMAKE_REQUIRED_LIBRARIES)
CHECK_CXX_SOURCE_COMPILES("
#define WIN32_LEAN_AND_MEAN