]> AND Public Git Repository - simgrid.git/blobdiff - buildtools/Cmake/CompleteInFiles.cmake
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more explicit error message
[simgrid.git] / buildtools / Cmake / CompleteInFiles.cmake
index 77b1af5835b30af557f00859e392823c8561b8c3..639baa0fa67dbcdf3ec4d1899685da0fa8e77047 100644 (file)
@@ -194,15 +194,17 @@ endif(HAVE_CGRAPH_LIB AND HAVE_CGRAPH_H)
 
 #--------------------------------------------------------------------------------------------------
 ### Initialize of pcre
-find_library(PCRE_LIB pcre "/usr/lib/" )
+find_library(PATH_PCRE_LIB pcre "/usr/lib/")
 
 if(PATH_PCRE_LIB)
-       string(REGEX REPLACE "/libpcre.*[.]so$" "" PATHLIBPCRE "${PCRE_LIB}")
+       string(REGEX REPLACE "/libpcre.*[.]so$" "" PATHLIBPCRE "${PATH_PCRE_LIB}")
                string(REGEX MATCH "-L${PATHLIBPCRE} " operation "${CMAKE_C_FLAGS}")
                if(NOT operation)
                        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${PATHLIBPCRE} ")
                endif(NOT operation)
        set(HAVE_PCRE_LIB 1)
+else(PATH_PCRE_LIB)
+               message(FATAL_ERROR "You must have libpcre installed (please install the libpcre3-dev package or equivalent)")
 endif(PATH_PCRE_LIB)
 
 #--------------------------------------------------------------------------------------------------