[CMake] newline: for all platforms

Ryan Pavlik rpavlik at iastate.edu
Sat Nov 27 23:53:16 EST 2010


In most cases, \n works everywhere for compilation - you just can't use
windows notepad to edit files like that.  Since only Windows (well, and
pre-OS X mac) uses something other than \n as far as I know, you could also
just do
if(WIN32)

and set it yourself if it really does matter in your situation.

Ryan



On Sat, Nov 27, 2010 at 11:07 AM, Hicham Mouline <hicham at mouline.org> wrote:

>  Hi,
>
>
>
> Is there a variable that holds the proper newline for the current platform?
>
> \n for unix linux mac
>
> \n\r for windows
>
> I need a cmake variable that will hold
>
>
>
> #include "header1.hpp"
>
> #include "header1.hpp"
>
> ...
>
> #include "headern.hpp"
>
>
>
> and that will be replaced by configure_file to generate a .cxx source file
> that will contain all these #includes.
>
> The newline is therefore essential
>
>
>
> regards,
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101127/d6a9a8ea/attachment.htm>


More information about the CMake mailing list