Reputation: 453
I'm new to C++, really trying to get familiar with CMake, but there's always something wrong.
I'm using CLion with Cygwin and G++11 package installed
My CMakeLists.txt file:
cmake_minimum_required(VERSION 3.20)
project(testing)
set(CMAKE_CXX_STANDARD 20)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
add_executable(testing main.cpp)
Clion says me that execution
header is not found, but I could locate it in lib/
folder:
Could somebody tell me what I'm doing wrong?
Upvotes: 1
Views: 166
Reputation: 13599
Here are a few things I have tried when debugging similar problems:
PATH
, or to force CMake to find the correct one via CMAKE_CXX_COMPILER
.-I
, -isystem
). Make sure that directory is in there.
compile_commands.json
file that should contain the same information by setting CMAKE_EXPORT_COMPILE_COMMANDS=true
Upvotes: 1