How to use CMake big-endian test?

Gerhard Stengel Gerhard.Stengel at gmx.net
Tue Feb 15 22:36:33 GMT 2011


Hi,

see the documentation of "configure_file", this is the command to create a header file and substitue some results that 
cmake has found.

regards

Gerhard
Am Dienstag, 15. Februar 2011, 23:17:43 schrieb Pierre Abbat:
> 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
> 
> _______________________________________________
> kdevelop mailing list
> kdevelop at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop
> 





More information about the KDevelop mailing list