Let me try this again.
I have a f90 subroutine that performs file IO. I would like to link
that with a C++ driver.
If I use a fortran driver, I am able to set the binary format via
set( CMAKE_Fortran_FLAGS "-fconvert=big-endian" )
This results in file IO in big-endian format.
When using the C++ driver, (linking with g++), I cannot get things
working properly. I have tried various compiler settings:
add_definitions( -Xlinker -fconvert=big-endian ) # links, but does
not affect endian-ness
add_definitions( -Wl,-fconvert=big-endian ) # links, but does not
affect endian-ness
add_definitions( -mbig-endian ) # does not work - link fails with
unrecognized flag
None of these result in an executable that properly handles big-endian
file formats.
The system I am compiling on is a little-endian system (intel Mac)
with gfortran 4.4.0 and g++ 4.0.1.
_______________________________________________
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