I'm currently developing a fairly large library dependent on other libraries (Eigen, Catch2, and Kokkos), and use CMake for building and linking everything. Because so much is going on, it's difficult to use a MWE here or give a lot of detail, but there's currently an error in compilation within a precompiled version of Catch2 and CMake won't show me where it's coming from in my library. Once CMake starts compiling my code, I eventually end up with
[ 59%] Building CXX object CMakeFiles/RunTests.dir/tests/Test_File.cpp.o
/home/jovyan/installs/CATCH2/include/catch2/benchmark/catch_constructor.hpp(62): error: invalid type conversion
1 error detected in the compilation of "/home/jovyan/.../tests/Test_File.cpp".
make[2]: *** [CMakeFiles/RunTests.dir/build.make:121: CMakeFiles/RunTests.dir/tests/Test_File.cpp.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:140: CMakeFiles/RunTests.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
The file in question being compiled (here called Test_File.cpp
) is not unique-- if I remove this test, any other file that includes Catch2/catch_all.hpp
will fail compilation as well with this same problem, or at least the other few files that I've tried have done so.
How do I get CMake to tell me what file this is coming from on my side?
EDIT: For reference, this code compiles when I use g++. Right now, I'm trying to ensure that the code also works on the GPU, so I'm compiling it with the nvcc wrapper provided in Kokkos. As such, I can't really figure out how to make this independent of the external libraries. I'll keep trying to make an MRE, but obviously the problem is some interplay between my library and Kokkos/Catch2.