1

I have a cmake build that uses gtest - everything works as expected. When I add cotire in I get the error:

error: use of undeclared identifier 'DBL_MAX'

Anywhere #import <float.h> is used

It seems to me that some setting is being fubar'd by adding cotire, but the environment variables look roughly the same

https://gist.github.com/anonymous/259e824359b7b399bc10f7aefd30b827

Am I missing something obvious?

accordionfolder
  • 573
  • 4
  • 17
  • If you have both `float.h` and `gtest-internal.h`, can you try removing `float.h` and try again? – Serkan Pekçetin Oct 13 '17 at 17:07
  • 1
    I should have been more clear - it's in the gtest codebase itself that give off these errors. Not any code we have written. – accordionfolder Oct 13 '17 at 19:54
  • Try including `` instead of ``. If that works, I'll explain more why in a full answer. – Cinder Biscuits Oct 14 '17 at 13:14
  • Are you trying to use cotire to do a single compilation unit build that includes everything in your application as well as everything in gtest? Given that everyone has questions from your description, I think we need an [mcve](https://stackoverflow.com/help/mcve). – legalize Oct 16 '17 at 16:36
  • 1
    @CinderBiscuits - that change did not fix the issues, thank you for the suggestion though! I replaced the DBL_MAX with std:numeric_limits<> and it works fine now - I am trying to figure out what is causing this misconfiguration. – accordionfolder Oct 21 '17 at 18:46
  • @legalize - I agree - I'm short on time right now, but will try to get one together ASAP. – accordionfolder Oct 21 '17 at 18:46

0 Answers0