<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I have recently joined a project where I am to do some coding. The code base is cross platform HPC type code and the original coders have defined their own little/big endian #defines (L_ENDIAN &amp; B_ENDIAN). They pass this into the compiler via -DL_ENDIAN during compiles. <DIV><BR class="khtml-block-placeholder"></DIV><DIV>Is there a way to automatically have cmake figure this out for me? Right now I have an OPTION(....) clause in my CMakeLists.txt file to select the right value.. which is stupid and error prone but it worked to boot strap the process for the moment.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Any hints would be appreciated.. </DIV><DIV><BR class="khtml-block-placeholder"><DIV><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Bitstream Vera Sans; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Jackson   Senior Research Engineer</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Innovative Management &amp; Technology Services</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></DIV></BODY></HTML>