From: navarrop Date: Tue, 28 Sep 2010 08:53:14 +0000 (+0000) Subject: add-to-cmake-files-the-pcre-library by David X-Git-Tag: v3_5~564 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/570adb77dbb990f7c8d7f166b2a3cc6d937dc6f2?hp=4c326c3ead872860a1ee05f216174ba56cae6e71 add-to-cmake-files-the-pcre-library by David git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8260 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 88751cdd51..cfd2bab693 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -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 diff --git a/buildtools/Cmake/MakeExeLib.cmake b/buildtools/Cmake/MakeExeLib.cmake index c3e9e90483..c776af12fb 100644 --- a/buildtools/Cmake/MakeExeLib.cmake +++ b/buildtools/Cmake/MakeExeLib.cmake @@ -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