Re: Cmake end with an error message. [message #5529 is a reply to message #5528] |
Thu, 29 November 2007 16:29 |
Anonymous Poster
|
|
From: *ikp.kfa-juelich.de
|
|
Hi Florian,
you are right. The entry /home/kph/sokolov/geant4/bin/Linux-g++ in the PATH cause an error.
Therefore I would suggest to modify the UNIQUE macro as following:
MACRO(UNIQUE var_name list)
#######################################################################
# Make the given list have only one instance of each unique element and
# store it in var_name.
#######################################################################
SET(unique_tmp "")
FOREACH(l ${list})
STRING(REGEX REPLACE "[+]" "\\\\+" l1 ${l})
IF(NOT "${unique_tmp}" MATCHES "(^|;)${l1}(;|$)")
SET(unique_tmp ${unique_tmp} ${l})
ENDIF(NOT "${unique_tmp}" MATCHES "(^|;)${l1}(;|$)")
ENDFOREACH(l)
SET(${var_name} ${unique_tmp})
ENDMACRO(UNIQUE)
It will screen each + symbol with \ and problem should disappear.
Also I would propose modify the WriteConfigFile.cmake as follow:
<skipped>
SET (PATH ${ROOTSYS}/bin:${PATH})
STRING(REGEX MATCHALL "[^:]+" PATH1 ${PATH})
MESSAGE("PATH :"${PATH1})
UNIQUE(PATH "${PATH1}")
CONVERT_LIST_TO_STRING(${PATH})
<skipped>
otherwise the is no sence to use UNIQUE macro at all.
Best regards,
Andrey
|
|
|