rollbear / trompeloeil

Header only C++14 mocking framework
Boost Software License 1.0
802 stars 85 forks source link

Build for QNX tests fail due to catch2 header file #319

Closed avrilzchen closed 10 months ago

avrilzchen commented 10 months ago

I'm trying to build the tests for trompeloeil v45 on QNX 8.0. I've applied all the changes mentioned in this commit https://github.com/rollbear/trompeloeil/commit/9d4f09aa4083e8e2eb71d1b03e195daa1dee6439 and I get the following error when building related to catch2 header file:

[ 12%] Building CXX object test/CMakeFiles/self_test.dir/compiling_tests.cpp.o
cd /home/avchen/trompeloeil/qnx/build/nto-aarch64-le/build/test && /home/avchen/l/trompeloeil/host/linux/x86_64/usr/bin/qcc -lang-c++ -DCATCH2_VERSION=2 -I/home/avchen/trompeloeil/include -I/home/avchen/trompeloeil/qnx/build/nto-aarch64-le/build/test/catch -Vgcc_ntoaarch64le -std=gnu++11   -I. -I. -I/home/avchen/trompeloeil/qnx/build/nto-aarch64-le -I/home/avchen/trompeloeil/qnx/build -I/home/avchen/l/trompeloeil/target/qnx/usr/include -I/home/avchen/l/trompeloeil/target/qnx/usr/include     -I. -I. -I/home/avchen/trompeloeil/qnx/build/nto-aarch64-le -I/home/avchen/trompeloeil/qnx/build -I/home/avchen/l/trompeloeil/target/qnx/usr/include -I/home/avchen/l/trompeloeil/target/qnx/usr/include -O3 -DNDEBUG -O3 -DNDEBUG -std=c++14 -Wp,-MD,CMakeFiles/self_test.dir/compiling_tests.cpp.o.d -Wp,-MT,test/CMakeFiles/self_test.dir/compiling_tests.cpp.o -Wp,-MF,CMakeFiles/self_test.dir/compiling_tests.cpp.o.d -o CMakeFiles/self_test.dir/compiling_tests.cpp.o -c /home/avchen/trompeloeil/test/compiling_tests.cpp
cc: warning - lang-c++ is deprecated
In file included from /home/avchen/trompeloeil/test/compiling_tests.cpp:22:
/home/avchen/trompeloeil/qnx/build/nto-aarch64-le/build/test/catch/catch2/catch.hpp: In function 'bool Catch::{anonymous}::useColourOnPlatform()':
/home/avchen/trompeloeil/qnx/build/nto-aarch64-le/build/test/catch/catch2/catch.hpp:10219:13: error: 'isatty' was not declared in this scope
10219 |             isatty(STDOUT_FILENO)
      |             ^~~~~~
test/CMakeFiles/self_test.dir/build.make:78: recipe for target 'test/CMakeFiles/self_test.dir/compiling_tests.cpp.o' failed
make[4]: *** [test/CMakeFiles/self_test.dir/compiling_tests.cpp.o] Error 1
make[4]: Leaving directory '/home/avchen/trompeloeil/qnx/build/nto-aarch64-le/build'

Environment:

Was wondering if anyone would know the issue.

Thanks

avrilzchen commented 10 months ago

All good I've fixed the issue.