Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more verbose message when semaphores get disabled at config time
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 20 Jul 2011 16:24:28 +0000 (18:24 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 20 Jul 2011 16:24:28 +0000 (18:24 +0200)
buildtools/Cmake/CompleteInFiles.cmake

index 6c59857..30c3610 100644 (file)
@@ -219,10 +219,12 @@ if(pthread)
                             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)       
@@ -236,10 +238,12 @@ if(pthread)
                             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)
@@ -249,7 +253,7 @@ if(pthread)
        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