gunit fails to compile on some compilers because of GCC pragmas

Issue #6 resolved
lindleylentati created an issue

Trying to install tempo2 on someone elses cluster, I get the following while compiling:

In file included from gtest-1.7.0/src/gtest-all.cc:39: ./gtest-1.7.0/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char, const char, const T1&, const T2&)’: ./gtest-1.7.0/include/gtest/gtest.h:1447: error: #pragma GCC diagnostic not allowed inside functions ./gtest-1.7.0/include/gtest/gtest.h:1451: error: #pragma GCC diagnostic not allowed inside functions make[2]: *** [gtest-1.7.0/src/gtest-all.lo] Error 1 make[2]: Leaving directory `/nfshome/lentati/tempo2/tests'

I dont really know what it means though.

Comments (7)

  1. Michael Keith

    Can you let me know what compiler is being used? For some reason gtest uses a GNU pragma to disable certain warnings, but clearly it isn't quite set up correctly for all compilers.

    A quick fix would be to disable compiling the test suite unless make check was actually run.

  2. lindleylentati reporter

    Apparently they have gcc 4.4.7 installed. I looked in the configure help (./configure -h) to see if there was an option to disable tests but didn't see it, will check again.

    Cheers Lindley

  3. Michael Keith

    N.B. "A quick fix would be to disable compiling the test suite unless make check was actually run." << I meant that I should do that in the makefile. I lazily build the test suite even if you aren't going to run any tests.

  4. Log in to comment