X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/795359a4a2c81571bb061f8dfbcc6c15323c9bf3..17e66beb16f52e6ed5191e24b8220a2694805007:/tools/cmake/MaintainerMode.cmake diff --git a/tools/cmake/MaintainerMode.cmake b/tools/cmake/MaintainerMode.cmake index 51e01cf2fe..d7ce7eb303 100644 --- a/tools/cmake/MaintainerMode.cmake +++ b/tools/cmake/MaintainerMode.cmake @@ -85,7 +85,7 @@ if(enable_maintainer_mode AND NOT WIN32) message(STATUS "Found flex: ${FLEX_EXE}") IF(FLEX_EXE) set(HAVE_FLEX 1) - exec_program("${FLEX_EXE} --version" OUTPUT_VARIABLE FLEX_VERSION) + execute_process(COMMAND ${FLEX_EXE} --version OUTPUT_VARIABLE FLEX_VERSION) string(REGEX MATCH "[0-9]+[.]+[0-9]+[.]+[0-9]+" FLEX_VERSION "${FLEX_VERSION}") string(REGEX MATCH "^[0-9]+" FLEX_MAJOR_VERSION "${FLEX_VERSION}") string(REGEX MATCH "[0-9]+[.]+[0-9]+$" FLEX_VERSION "${FLEX_VERSION}") @@ -96,7 +96,7 @@ if(enable_maintainer_mode AND NOT WIN32) message(STATUS "Found flexml: ${FLEXML_EXE}") IF(FLEXML_EXE) set(HAVE_FLEXML 1) - exec_program("${FLEXML_EXE} --version" OUTPUT_VARIABLE FLEXML_VERSION) + execute_process(COMMAND ${FLEXML_EXE} --version OUTPUT_VARIABLE FLEXML_VERSION) if (FLEXML_VERSION MATCHES "version Id:") message(FATAL_ERROR "You have an ancient flexml version (${FLEXML_VERSION}). You need at least v${FLEXML_MIN_MAJOR}.${FLEXML_MIN_MINOR}.${FLEXML_MIN_PATCH} to compile in maintainer mode. Upgrade your flexml, or disable the Maintainer mode option in cmake.") endif() @@ -155,6 +155,7 @@ if(enable_maintainer_mode AND NOT WIN32) COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf/xml COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P surfxml --sysid=http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd -S src/surf/xml/simgrid_dtd.l -L src/surf/xml/simgrid.dtd COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.l + COMMAND ${SED_EXE} -i "'s/FAIL(\"Bad declaration %s.\",yytext)/FAIL(\"Bad declaration %s.\\\\nIf your are using a XML v3 file (check the version attribute in ), please update it with tools\\/simgrid_update_xml.pl\",yytext)/'" src/surf/xml/simgrid_dtd.l COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.l" #${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd