Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22002

CMake cannot indentify path to compiler mentioned by set(CMAKE_C_COMPILER "path") rule [duplicate]

$
0
0

OS: Windows 10
compiler: g++ 9.2.0
call:

cmake .

my CmakeLists.txt:

cmake_minimum_required(VERSION 3.17.1)project("Client")set(CMAKE_C_COMPILER "C:/Strawberry/c/bin/gcc.exe")set(CMAKE_CXX_COMPILER "C:/Strawberry/c/bin/g++.exe")enable_testing()set(CMAKE_CXX_FLAGS "-std=c++17 " )add_executable(Client  main.cpp  client.cpp  client.h  logmsg.cpp  includes.h)target_link_libraries(Client wsock32 ws2_32)add_test(NAME test COMMAND Client )#SET( CMAKE_MAKE_PROGRAM C:/Strawberry/c/bin/mingw32-make.exe FORCE )#SET( CMAKE_MAKE_PROGRAM C:/Strawberry/c/bin/make.exe FORCE )

output:

-- The C compiler identification is unknown-- The CXX compiler identification is unknown

used in proper set() rule path is 100% right because CMake GUI's output of configuring shows :

The C compiler identification is GNU 9.2.0The CXX compiler identification is GNU 9.2.0Check for working C compiler: C:/Strawberry/c/bin/gcc.exeCheck for working C compiler: C:/Strawberry/c/bin/gcc.exe - worksDetecting C compiler ABI infoDetecting C compiler ABI info - doneDetecting C compile featuresDetecting C compile features - doneCheck for working CXX compiler: C:/Strawberry/c/bin/g++.exeCheck for working CXX compiler: C:/Strawberry/c/bin/g++.exe - worksDetecting CXX compiler ABI infoDetecting CXX compiler ABI info - doneDetecting CXX compile featuresDetecting CXX compile features - doneConfiguring done

I cannot undertand where I am wrong.Saw this topic but I cannot make proper conclusion by myself:
CMAKE_C_COMPILER is not a full path to an existing compiler tool


Viewing all articles
Browse latest Browse all 22002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>