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:

-- The C compiler identification is unknown
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/local/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61
(message):
  The C compiler "/usr/bin/gcc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /usr/local/src2/brlcad-build-c++/CMakeFiles/CMakeTmp



  Run Build Command:/usr/bin/make "cmTryCompileExec2936276730/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec2936276730.dir/build.make
  CMakeFiles/cmTryCompileExec2936276730.dir/build

  make[1]: Entering directory
  `/usr/local/src2/brlcad-build-c++/CMakeFiles/CMakeTmp'

  /usr/local/bin/cmake -E cmake_progress_report
  /usr/local/src2/brlcad-build-c++/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object
  CMakeFiles/cmTryCompileExec2936276730.dir/testCCompiler.c.o

  /usr/bin/gcc -x c++ -o
  CMakeFiles/cmTryCompileExec2936276730.dir/testCCompiler.c.o -c
  /usr/local/src2/brlcad-build-c++/CMakeFiles/CMakeTmp/testCCompiler.c

  /usr/local/src2/brlcad-build-c++/CMakeFiles/CMakeTmp/testCCompiler.c:2:3:
  error: #error "The CMAKE_C_COMPILER is set to a C++ compiler"

  make[1]: *** [CMakeFiles/cmTryCompileExec2936276730.dir/testCCompiler.c.o]
  Error 1

  make[1]: Leaving directory
  `/usr/local/src2/brlcad-build-c++/CMakeFiles/CMakeTmp'

  make: *** [cmTryCompileExec2936276730/fast] Error 2

    CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:131 (project)


-- Configuring incomplete, errors occurred!

Is there any easy way to make a configuration that will use C++ on the
whole BRL-CAD source?

Best regards,

-Tom

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to