2017-12-08 35 views
0

cmake를 CLion 환경에서 실행할 때이 결과가 표시됩니다. CLion 밖으로 나가면 아무런 경고없이 모든 것이 잘 작동합니다.CLion이 올바른 컴파일러를 사용하지 않습니까?

정말 이상한 부분은 컴파일러에 clang 및 clang ++을 지정하는 것입니다. CC 및 CXX 환경 변수와 CLion의 툴체인 설정에서이 작업을 수행하지만 g ++ 및 gcc는 오류. 그러나 CLion에 대한 모든 설정에서 gcc 또는 g ++에 대해 언급 한 부분이 없습니다.

여기는 어디에서 왔으며 어떻게 해결할 수 있습니까? 실제로 IDE에서이 프로젝트를 빌드하는 것이 좋습니다.

이 문제는 CLion 2017.3 업데이트 이후에 시작되었습니다.

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -G "CodeBlocks - Unix Makefiles" /home/rkratt/src 
-- The C compiler identification is Clang 3.9.0 
-- The CXX compiler identification is Clang 3.9.0 
-- Check for working C compiler: /usr/bin/clang 
-- Check for working C compiler: /usr/bin/clang -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Detecting C compile features 
-- Detecting C compile features - done 
-- Check for working CXX compiler: /usr/bin/clang++ 
-- Check for working CXX compiler: /usr/bin/clang++ -- works 
-- Detecting CXX compiler ABI info 
-- Detecting CXX compiler ABI info - done 
-- Detecting CXX compile features 
-- Detecting CXX compile features - done 
Building src in Debug mode. 
-- Configuring done 
-- Generating done 
-- Build files have been written to: /home/rkratt/src/cmake-build-debug 

Problems were encountered while collecting compiler information: 
    g++: error: unrecognized command line option '-fopenmp=libomp' 
    gcc: error: unrecognized command line option '-fopenmp=libomp' 

[Finished] 

답변

0

Ryan, 당신이 프로젝트에서 특정 대상과 g ++/gcc를 연관시키는 것 같습니다. 나는 건물도 실패 할 것으로 생각한다. 확인해 주시겠습니까?

문제를 해결할 수 없으면 a ticket을 보내 주시면 도와 드리겠습니다.

+0

예, 건물도 실패합니다. –