From: Christopher S. M. <br...@ma...> - 2013-12-05 05:01:33
|
On Dec 4, 2013, at 9:29 PM, Tom Browder wrote: > I want to try compiling all BRL-CAD *.c file with a C++ compiler. > When I try it by setting, e.g., CC to: > > CC='gcc -x c++' > > and then running cmake I get CMake errors: That's unfortunate. Looks like the test in CMakeTestCCompiler.cmake sucks. There are a couple ways to trick it, though. For example, you can undefine __cplusplus for just that test by adding -U__cplusplus before CMakeTestCCompiler.cmake is loaded. Another way that should probably work is to set CMAKE_C_COMPILER_WORKS so it skips the test altogether (perhaps cmake -DCMAKE_C_COMPILER_WORKS=YES or some variation thereof). Awesome to see the progress. We have had a couple to-do's related to compiling all of BRL-CAD with a C++ compiler for a long time. Cheers! Sean |