[Cmake] Using CMake for scientific computing ?
Andy Cedilnik
andy.cedilnik at kitware.com
Wed Mar 12 17:04:38 EST 2003
Hi Christophe,
On Wed, 2003-03-12 at 16:56, Andy Cedilnik wrote:
> There is more:
> You can do something like:
>
> IF(WIN32)
> MESSAGE("Cannot do this on windows I guess")
> ELSE(WIN32)
> EXEC_PROGRAM(ls ${FortranProject_SOURCE_DIR}
> ARGS *.f
> OUTPUT_VARIABLE RSOURCES)
> ENDIF(WIN32)
>
> Then you can do something like:
>
Huh, missing step:
# Need a ; separated list
STRING(REGEX REPLACE "([^\\\\]) " "\\1;" RSOURCES ${RSOURCES})
> SET(SOURCES "")
> FOREACH(rsrc ${RSOURCES})
> GET_FILENAME_COMPONENT(src ${rsrc} NAME_WE)
> SET(SOURCES ${SOURCES} ${src})
> ENDFOREACH(rsrc)
In general you want to specify sources so that you have full control.
Andy
More information about the CMake
mailing list