(1) What contents are in /proc/cpuinfo?
(2) What are you getting as output when you use this CMake code?
(3) What do you expect to get?



On Fri, May 30, 2008 at 12:33 PM, Mathieu Malaterre <
[EMAIL PROTECTED]> wrote:

> regex are driving me nuts... could someone please let me know what is
> wrong with my 'REPLACE' expression.
>
> Thanks !
>
> FILE(READ /proc/cpuinfo cpuinfo)
> STRING(REGEX REPLACE "\r?\n" ";" cpuinfo "${cpuinfo}")
> SET(myoutput "")
>
> FOREACH(line ${cpuinfo})
>  STRING(REGEX MATCH "processor" proc_line ${line})
>  STRING(REGEX REPLACE
>    "^processor[ ]+:[ ]+([0-9]+)$"
>    " \\1 " nline "${line}")
>  IF(proc_line)
>  MESSAGE(${nline})
>    SET(myoutput "${myoutput}\n${nline}")
>  ENDIF(proc_line)
> ENDFOREACH(line)
>
> MESSAGE("${myoutput}")
>
> --
> Mathieu
> _______________________________________________
> CMake mailing list
> [email protected]
> http://www.cmake.org/mailman/listinfo/cmake
>
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to