Hello,
Under certain conditions which are not especially easy to reproduce,
the build of a test using test (starting at r663 until at least r677) fails with:
[ 11%] Building CXX object vm/vm/test/CMakeFiles/vmtest.dir/testutils.cc.o
/usr/bin/clang++ -Wall -std=c++0x -stdlib=libc++ -I/usr/lib/c++/v1 -O3 -DNDEBUG -I/Users/benoitdaloze/git/mozart2/vm/vm/test/../main -I/Users/benoitdaloze/prefix/build/moz2-release-tmp/vm/vm/test/../main -I/Users/benoitdaloze/prefix/build/moz2-release-tmp/externals/Source/gtest -I/Users/benoitdaloze/prefix/build/moz2-release-tmp/externals/Source/gtest/include -o CMakeFiles/vmtest.dir/testutils.cc.o -c /Users/benoitdaloze/git/mozart2/vm/vm/test/testutils.cc
In file included from /Users/benoitdaloze/git/mozart2/vm/vm/test/testutils.cc:1:
In file included from /Users/benoitdaloze/git/mozart2/vm/vm/test/testutils.hh:5:
In file included from /Users/benoitdaloze/prefix/build/moz2-release-tmp/externals/Source/gtest/include/gtest/gtest.h:58:
/Users/benoitdaloze/prefix/build/moz2-release-tmp/externals/Source/gtest/include/gtest/internal/gtest-internal.h:384:51: error: use of undeclared identifier 'FLT_MAX'
inline float FloatingPoint<float>::Max() { return FLT_MAX; }
^
/Users/benoitdaloze/prefix/build/moz2-release-tmp/externals/Source/gtest/include/gtest/internal/gtest-internal.h:386:53: error: use of undeclared identifier 'DBL_MAX'
inline double FloatingPoint<double>::Max() { return DBL_MAX; }
^
2 errors generated.
This happens on a build of Mozart2 (
https://github.com/mozart/mozart2) on OS X 10.8.5.
For now our fix is to stay at r662 (in vm/vm/CMakeLists.txt) but obviously this is not optimal.
This is most likely due to usage of FLT_MAX and DBL_MAX in gtest-internal.h but not #include-ing <climits> (only <limits>).
Could you therefore add that missing header in gtest-internal.h?