STYLE: don't use FIND_INCLUDE_FILE() but only FIND_INCLUDE_FILES() in

FindThreads.h

BUG: improve CheckC(XX)SourceRuns.cmake so that it works with cross
compiling, the return value has to go in the cache but shouldn't overwrite
the actual return value, and it should go only in the cache if we have a
result from try_run() otherwise we won't get here again if we have a result
later on

Alex
This commit is contained in:
Alexander Neundorf
2007-07-31 13:30:10 -04:00
parent be1b19ada0
commit 7beee2df48
3 changed files with 28 additions and 16 deletions
+1 -2
View File
@@ -6,7 +6,6 @@
# CMAKE_USE_PTHREADS_INIT - are we using pthreads
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
INCLUDE (CheckIncludeFile)
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists)
@@ -20,7 +19,7 @@ IF(CMAKE_HAVE_SPROC_H)
SET(CMAKE_USE_SPROC_INIT 1)
ELSE(CMAKE_HAVE_SPROC_H)
# Do we have pthreads?
CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
CHECK_INCLUDE_FILES("pthread.h" CMAKE_HAVE_PTHREAD_H)
IF(CMAKE_HAVE_PTHREAD_H)
# We have pthread.h
# Let's check for the library now.