[CMake] Irix SPROC check appears broken

James Bigler bigler at cs.utah.edu
Fri Apr 22 12:56:55 EDT 2005


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?

The man page for sproc indicates you need to include both:

SPROC(2) 
SPROC(2)

NAME
      sproc, sprocsp, nsproc - create a new share group process

C SYNOPSIS
      #include <sys/types.h>
      #include <sys/prctl.h>

      pid_t sproc (void (*entry) (void *), unsigned inh, ...);

      Type of optional third argument:
      void *arg;

      pid_t sprocsp (void (*entry) (void *, size_t), unsigned inh,
                     void *arg, caddr_t sp, size_t len);


Thanks,
James


More information about the CMake mailing list