[CMake] Irix SPROC check appears broken

Brad King brad.king at kitware.com
Fri Apr 22 13:14:35 EDT 2005


James Bigler wrote:
> I'm using CMake on Irix, and I wanted to use the sproc threads.  I 
> decided to use Modules/FindThreads.cmake.  This module tests for the 
> sys/prctl.h include file.
> 
> IF(CMAKE_SYSTEM MATCHES IRIX)
>   CHECK_INCLUDE_FILE("sys/prctl.h"  CMAKE_HAVE_SPROC_H)
> ENDIF(CMAKE_SYSTEM MATCHES IRIX)
> 
> However, it fails because it needs to also include sys/types.h.  How can 
> I make it check for sys/prctl.h with sys/types.h?

Change these lines:

--------------------------------------------------------
# Do we have sproc?
IF(CMAKE_SYSTEM MATCHES IRIX)
   CHECK_INCLUDE_FILE("sys/prctl.h"  CMAKE_HAVE_SPROC_H)
ENDIF(CMAKE_SYSTEM MATCHES IRIX)
--------------------------------------------------------

to these:

--------------------------------------------------------
INCLUDE(CheckIncludeFiles)

# Do we have sproc?
IF(CMAKE_SYSTEM MATCHES IRIX)
   CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h"  CMAKE_HAVE_SPROC_H)
ENDIF(CMAKE_SYSTEM MATCHES IRIX)
--------------------------------------------------------

Then please submit a bug report here:

http://www.cmake.org/Bug

and include in the report whether this fix works.

Thanks,
-Brad


More information about the CMake mailing list