Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add-to-cmake-files-the-pcre-library by David
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 28 Sep 2010 08:53:14 +0000 (08:53 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 28 Sep 2010 08:53:14 +0000 (08:53 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8260 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/MakeExeLib.cmake

index 88751cd..cfd2bab 100644 (file)
@@ -189,6 +189,18 @@ if(HAVE_CGRAPH_LIB AND HAVE_CGRAPH_H)
        
 endif(HAVE_CGRAPH_LIB AND HAVE_CGRAPH_H)
 
+#--------------------------------------------------------------------------------------------------
+### Initialize of pcre
+find_library(PCRE_LIB pcre "/usr/lib/" )
+
+if(PATH_PCRE_LIB)
+       message("LIBPCRE : ${PCRE_LIB}")
+       string(REGEX REPLACE "libpcre.*[.]so$" "" PATHLIBPCRE "${PCRE_LIB}")
+       message("PATH_LIBPCRE : ${PATHLIBPCRE}")
+       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${PATHLIBPCRE} ")
+       set(HAVE_PCRE_LIB 1)
+endif(PATH_PCRE_LIB)
+
 #--------------------------------------------------------------------------------------------------
 ### Initialize of CONTEXT THREADS
 
index c3e9e90..c776af1 100644 (file)
@@ -23,6 +23,10 @@ set(GRAS_DEP "-lm -lpthread")
 set(SIMGRID_DEP "-lm")
 set(SMPI_DEP "")
 
+if(HAVE_PCRE_LIB)
+       SET(SIMGRID_DEP "${SIMGRID_DEP} -lpcre")
+endif(HAVE_PCRE_LIB)
+
 if(HAVE_RUBY)
        set(SIMGRID_DEP "${SIMGRID_DEP} -l${RUBY_LIBRARY_NAME} -module")
        ADD_CUSTOM_TARGET(link_simgrid_ruby ALL