How to use CMake big-endian test?
Pierre Abbat
phma at phma.optus.nu
Tue Feb 15 22:17:43 GMT 2011
I don't know where to ask, but I recently converted a project to CMake as a
result of switching to KDevelop 4, so I figured I'd ask here.
I have a project in KDevelop 4.1.0 with the following CMakeLists file:
---
project(tone12)
add_executable(tone12 tone12.cpp midi.cpp midi.h riffwave.cpp riffwave.cpp
tonegen.cpp tonegen.h)
INCLUDE(CPack)
INCLUDE(TestBigEndian)
TEST_BIG_ENDIAN(BIGENDIAN)
---
I am starting to write the MIDI file reading routine, which requires knowing
the endianness, as the size of chunks is stored big-endian, and I need to
know whether to flip it. I succeeded in getting the endian test result in
CMakeCache, but I don't know how to let the source code know what it is. How
do I make a config.h, or the equivalent, containing the result of the test?
Pierre
--
li ze te'a ci vu'u ci bi'e te'a mu du
li ci su'i ze te'a mu bi'e vu'u ci
More information about the KDevelop
mailing list