john30 / ebusd

daemon for communication with eBUS heating systems
GNU General Public License v3.0
543 stars 129 forks source link

CMake: Test HAVE_DIRECT_FLOAT_FORMAT - Failed #254

Closed andr2000 closed 5 years ago

andr2000 commented 5 years ago

Trying to cross-compile with cmake produces the following errors during configuration:

-- Performing Test HAVE_DIRECT_FLOAT_FORMAT
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
   HAVE_DIRECT_FLOAT_FORMAT_EXITCODE (advanced)
For details see /home/a2k/projects/vaillant/sources/ebusd-build/TryRunResults.cmake
-- Performing Test HAVE_DIRECT_FLOAT_FORMAT - Failed
-- Configuring incomplete, errors occurred!

The issues seems to be that CMake tries to run target code on host and fails

john30 commented 5 years ago

the cmake is not desired to used for cross compilation yet. I wonder how one can determine availability of certain compiler features in such an environment then...

andr2000 commented 5 years ago

This is no problem when used with Yocto which is my case. Yocto also provides cross-SDK, so there is no worry about the environment as well

john30 commented 5 years ago

but that does not solve the problem, right?

andr2000 commented 5 years ago

Exactly, because the CMakeLists is written in a way it requires the cross-compiled test to run on the host which is obviously not possible

john30 commented 5 years ago

exactly. so you can't cross compile right now, as said before

andr2000 commented 5 years ago

Hm, but it can be fixed. I can cross-compile using autotools, but not CMake

john30 commented 5 years ago

then please go ahead. the autotools do the testing for compiler features on the build machine as well and not using the cross compiler, otherwise they'd fail as well

andr2000 commented 5 years ago

Pardon me, but by saying "go ahead" you mean what?

john30 commented 5 years ago

if you can fix it, then please do so, as I wouldn't know how that should be possible