color_coded icon indicating copy to clipboard operation
color_coded copied to clipboard

color_coded seems to be using clang no matter what

Open cyboflash opened this issue 4 years ago • 1 comments

I'm on Ubuntu 19.04. Trying to build color_coded. Want to build using GCC but it builds using clang. Here is the output of my update-alternatives --config c++ command

There are 2 choices for the alternative c++ (providing /usr/bin/c++).

  Selection    Path              Priority   Status
------------------------------------------------------------
  0            /usr/bin/g++       20        auto mode
  1            /usr/bin/clang++   10        manual mode
* 2            /usr/bin/g++       20        manual mode

Press <enter> to keep the current choice[*], or type selection number:

Here is the where /usr/bin/g++ is pointing to

$ ls -lah /usr/bin/g++
lrwxrwxrwx 1 root root 5 Sep 13 11:40 /usr/bin/g++ -> g++-8

Here is how I run my cmake cmake .. -DDOWNLOAD_CLANG=0 -DLLVM_CONFIG=/usr/bin/llvm-config-8 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON

Then I run make and here is where I have a problem. I noticed that cmake is using clang instead of gcc. Here is one example of the build:

[100%] Linking CXX executable color_coded_config_test /usr/bin/cmake -E cmake_link_script CMakeFiles/color_coded_config_test.dir/link.txt --verbose=1 /usr/bin/c++ -std=c++14 -O3 -DNDEBUG -rdynamic CMakeFiles/color_coded_config_test.dir/test/src/config/main.cpp.o -o color_coded_config_test -Wl,-rpath,/usr/lib/llvm-8/lib /usr/lib/llvm-8/lib/libclang.so /usr/lib/llvm-8/lib/libclangTooling.a /usr/lib/llvm-8/lib/libclangToolingCore.a /usr/lib/llvm-8/lib/libclangIndex.a /usr/lib/llvm-8/lib/libclangFrontend.a /usr/lib/llvm-8/lib/libclangFrontendTool.a /usr/lib/llvm-8/lib/libclangDriver.a /usr/lib/llvm-8/lib/libclangFormat.a /usr/lib/llvm-8/lib/libclangCodeGen.a /usr/lib/llvm-8/lib/libclangParse.a /usr/lib/llvm-8/lib/libclangSema.a /usr/lib/llvm-8/lib/libclangEdit.a /usr/lib/llvm-8/lib/libclangAnalysis.a /usr/lib/llvm-8/lib/libclangSerialization.a /usr/lib/llvm-8/lib/libclangStaticAnalyzerFrontend.a /usr/lib/llvm-8/lib/libclangStaticAnalyzerCheckers.a /usr/lib/llvm-8/lib/libclangStaticAnalyzerCore.a /usr/lib/llvm-8/lib/libclangRewriteFrontend.a /usr/lib/llvm-8/lib/libclangRewrite.a /usr/lib/llvm-8/lib/libclangAnalysis.a /usr/lib/llvm-8/lib/libclangAST.a /usr/lib/llvm-8/lib/libclangASTMatchers.a /usr/lib/llvm-8/lib/libclangDynamicASTMatchers.a /usr/lib/llvm-8/lib/libclangLex.a /usr/lib/llvm-8/lib/libclangBasic.a -lLLVM-8 -L/usr/lib/llvm-8/lib libcolor_coded_boost.a -llua5.3 -lm -lcurses -lz -lpthread /usr/lib/llvm-8/lib/libclangSerialization.a /usr/lib/llvm-8/lib/libclangStaticAnalyzerFrontend.a /usr/lib/llvm-8/lib/libclangStaticAnalyzerCheckers.a /usr/lib/llvm-8/lib/libclangStaticAnalyzerCore.a /usr/lib/llvm-8/lib/libclangRewriteFrontend.a /usr/lib/llvm-8/lib/libclangRewrite.a /usr/lib/llvm-8/lib/libclangAST.a /usr/lib/llvm-8/lib/libclangASTMatchers.a /usr/lib/llvm-8/lib/libclangDynamicASTMatchers.a /usr/lib/llvm-8/lib/libclangLex.a /usr/lib/llvm-8/lib/libclangBasic.a -lLLVM-8 -llua5.3 -lm -lcurses -lz -lpthread

How do I build with gcc instead of clang?

cyboflash avatar Sep 20 '19 19:09 cyboflash

The output shows cmake using /usr/bin/c++, which should point to g++ on your system. The other llvm and clang stuff you see are simply the libraries color_coded needs to link against.

UnrealQuester avatar Sep 21 '19 06:09 UnrealQuester