[CMake] Is there a way to specify NEWLINE_STYLE in an install command?

Peter Kjær Willendrup pkwi at fysik.dtu.dk
Wed Oct 2 04:11:28 EDT 2013


Hi all,


I develop a simulation code (http://www.mcstas.org) that runs on multiple platforms, including both various Unixes and Windows.

We have recently moved our build environment from being based on autoconf, make and home-grown scripts to cmake + cpack.

A portion of our shipped datafiles should be installed with platform-dependent linefeeds, but as builds for Windows happen via mingw on a Linux box, I would like to have cmake do this at either configure or install time.

I have found that this is possible for individual files via

configure_file(<input> <output>
                 [COPYONLY] [ESCAPE_QUOTES] [@ONLY]
                 [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])

but have failed to find something similar for the install () command which we use for installing directories with datafiles.

Is the only way really to loop all the datafiles individually and configure_file them?


Best,

Peter


Peter Kjær Willendrup
Senior Research Engineer, Special Advisor

DTU Physics



Technical University of Denmark



[cid:image002.gif at 01CCCAF1.5E6331F0][cid:EC2A3CAB-AF57-4CEB-96B0-23F6DC35FE76 at fysik.dtu.dk]

Department of Physics
Neutrons and X-rays for Materials Physics
Fysikvej

Building 307

DK-2800 Kongens Lyngby

Direct +45 2125 4612

Mobil +45 2125 4612
Fax +45 4593 2399


pkwi at fysik.dtu.dk<mailto:pkwi at fysik.dtu.dk>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131002/0cc3fa73/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131002/0cc3fa73/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131002/0cc3fa73/attachment-0003.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nexmap.jpg
Type: image/jpeg
Size: 10708 bytes
Desc: nexmap.jpg
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131002/0cc3fa73/attachment-0001.jpg>


More information about the CMake mailing list