[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/06: cmake: fix FindUHD.cmake to work bet
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/06: cmake: fix FindUHD.cmake to work better wit CMake 2.6, and in general. |
Date: |
Fri, 29 Aug 2014 17:21:25 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit c8fcd0252255e7a7b85b2f69c14c2f48e7896e9e
Author: Michael Dickens <address@hidden>
Date: Fri Aug 29 12:00:45 2014 -0400
cmake: fix FindUHD.cmake to work better wit CMake 2.6, and in general.
---
cmake/Modules/FindUHD.cmake | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/cmake/Modules/FindUHD.cmake b/cmake/Modules/FindUHD.cmake
index d4d2069..cfb89b1 100644
--- a/cmake/Modules/FindUHD.cmake
+++ b/cmake/Modules/FindUHD.cmake
@@ -2,23 +2,24 @@
# Find the library for the USRP Hardware Driver
########################################################################
+# make this file non-reentrant
+if(__INCLUDED_FIND_UHD_CMAKE)
+ return()
+endif()
+set(__INCLUDED_FIND_UHD_CMAKE TRUE)
+
# First check to see if UHD installed its own CMake files
# save the current MODULE path
set(SAVED_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
-# remove the current directory from the MODULE path
-list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+# clear the current MODULE path; uses system paths only
+unset(CMAKE_MODULE_PATH)
# try to find UHD via the provided parameters,
# handle REQUIRED internally later
unset(UHD_FOUND)
-# try quietly when possible (CMake 2.8+).
-if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.0")
- set(UHD_QUIET "QUIET")
-endif()
-
# was the version specified?
unset(LOCAL_UHD_FIND_VERSION)
if(UHD_FIND_VERSION)
@@ -35,7 +36,7 @@ endif(UHD_FIND_VERSION_EXACT)
# UHDConfigVersion will catch a pass-through version bug ...
find_package(
UHD ${LOCAL_UHD_FIND_VERSION}
- ${LOCAL_UHD_FIND_VERSION_EXACT} ${UHD_QUIET}
+ ${LOCAL_UHD_FIND_VERSION_EXACT} QUIET
)
# restore CMAKE_MODULE_PATH
- [Commit-gnuradio] [gnuradio] branch master updated (1c9377b -> 4eb84b1), git, 2014/08/29
- [Commit-gnuradio] [gnuradio] 02/06: cmake: fix setting and usage of CMAKE_MODULES_DIR, git, 2014/08/29
- [Commit-gnuradio] [gnuradio] 04/06: cmake: on APPLE only, add defaults for rpath and install name info for libraries, git, 2014/08/29
- [Commit-gnuradio] [gnuradio] 01/06: cmake: fix FindUHD.cmake to work better wit CMake 2.6, and in general.,
git <=
- [Commit-gnuradio] [gnuradio] 05/06: Merge remote-tracking branch 'michaelld/refix_findUHD', git, 2014/08/29
- [Commit-gnuradio] [gnuradio] 03/06: cmake: whitespace only, git, 2014/08/29
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'michaelld/cmake_fixes', git, 2014/08/29