summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenThreads.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-06-09 20:04:06 (GMT)
committerBrad King <brad.king@kitware.com>2008-06-09 20:04:06 (GMT)
commite2ec3b671b3753da42df167ba1a4e496d08b5ce2 (patch)
treefe2cea51ff2d1d1e681483a4bdad911fea88457c /Modules/FindOpenThreads.cmake
parent05434489079708e9896d03b7fc9153ded1d960b4 (diff)
downloadCMake-e2ec3b671b3753da42df167ba1a4e496d08b5ce2.zip
CMake-e2ec3b671b3753da42df167ba1a4e496d08b5ce2.tar.gz
CMake-e2ec3b671b3753da42df167ba1a4e496d08b5ce2.tar.bz2
ENH: Cleanup Find* modules with new HINTS feature
- The find_* commands now provide a HINTS option. - The option specifies paths to be preferred over the system paths. - Many Find* modules were using two find calls with NO_DEFAULT_PATH to approximate the behavior, but that blocked users from overriding things with CMAKE_PREFIX_PATH. - This commit uses the HINTS feature to get desired behavior in only one find command call.
Diffstat (limited to 'Modules/FindOpenThreads.cmake')
-rw-r--r--Modules/FindOpenThreads.cmake27
1 files changed, 4 insertions, 23 deletions
diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake
index fc5cd36..75fdbdd 100644
--- a/Modules/FindOpenThreads.cmake
+++ b/Modules/FindOpenThreads.cmake
@@ -39,7 +39,7 @@
# Explicit -DVAR=value arguments should still be able to override everything.
FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
- PATHS
+ HINTS
$ENV{OPENTHREADS_INCLUDE_DIR}
$ENV{OPENTHREADS_DIR}/include
$ENV{OPENTHREADS_DIR}
@@ -48,12 +48,7 @@ FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
$ENV{OSG_DIR}
$ENV{OSGDIR}/include
$ENV{OSGDIR}
- NO_DEFAULT_PATH
-)
-
-
-
-FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
+ PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
@@ -69,7 +64,7 @@ FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
FIND_LIBRARY(OPENTHREADS_LIBRARY
NAMES OpenThreads OpenThreadsWin32
- PATHS
+ HINTS
$ENV{OPENTHREADS_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR}/lib64
$ENV{OPENTHREADS_DIR}/lib
@@ -81,13 +76,6 @@ FIND_LIBRARY(OPENTHREADS_LIBRARY
$ENV{OSGDIR}/lib64
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
- NO_DEFAULT_PATH
-)
-
-
-
-FIND_LIBRARY(OPENTHREADS_LIBRARY
- NAMES OpenThreads OpenThreadsWin32
PATHS
~/Library/Frameworks
/Library/Frameworks
@@ -110,7 +98,7 @@ FIND_LIBRARY(OPENTHREADS_LIBRARY
FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
NAMES OpenThreadsd OpenThreadsWin32d
- PATHS
+ HINTS
$ENV{OPENTHREADS_DEBUG_LIBRARY_DIR}
$ENV{OPENTHREADS_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR}/lib64
@@ -123,13 +111,6 @@ FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
$ENV{OSGDIR}/lib64
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
- NO_DEFAULT_PATH
-)
-
-
-
-FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
- NAMES OpenThreadsd OpenThreadsWin32d
PATHS
/usr/local/lib64
/usr/local/lib