OUTPUT_VARIABLE HAVE_SEM_OPEN_run)
if(HAVE_SEM_OPEN_run)
set(HAVE_SEM_OPEN 0)
+ message(STATUS "Warning: sem_open not compilable")
else(HAVE_SEM_OPEN_run)
exec_program("./testprog" RETURN_VALUE HAVE_SEM_OPEN_run2 OUTPUT_VARIABLE var_compil)
if(HAVE_SEM_OPEN_run2)
set(HAVE_SEM_OPEN 0)
+ message(STATUS "Warning: sem_open not executable")
else(HAVE_SEM_OPEN_run2)
set(HAVE_SEM_OPEN 1)
endif(HAVE_SEM_OPEN_run2)
OUTPUT_VARIABLE HAVE_SEM_INIT_run)
if(HAVE_SEM_INIT_run)
set(HAVE_SEM_INIT 0)
+ message(STATUS "Warning: sem_init not compilable")
else(HAVE_SEM_INIT_run)
exec_program("./testprog" RETURN_VALUE HAVE_SEM_INIT_run OUTPUT_VARIABLE var_compil)
if(HAVE_SEM_INIT_run)
set(HAVE_SEM_INIT 0)
+ message(STATUS "Warning: sem_init not executable")
else(HAVE_SEM_INIT_run)
set(HAVE_SEM_INIT 1)
endif(HAVE_SEM_INIT_run)
endif(HAVE_SEM_INIT_LIB)
if(NOT HAVE_SEM_OPEN AND NOT HAVE_SEM_INIT)
- message(FATAL_ERROR "Semaphores are not usable, but they are mandatory to threads (you may need to mount /dev).")
+ message(FATAL_ERROR "Semaphores are not usable (neither sem_open nor sem_init is both compilable and executable), but they are mandatory to threads (you may need to mount /dev).")
endif(NOT HAVE_SEM_OPEN AND NOT HAVE_SEM_INIT)
### Test that we have a way to timewait for semaphores