I am trying to debug my project Makefile
that I imported into CLion
. I created a simple CMake
file as shown below
cmake_minimum_required(VERSION 2.8.4)
project(Project1)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
add_custom_target(myProject COMMAND make -j4 DEBUG=1
CLION_EXE_DIR=${PACKAGE_DIR})
ToolCMake
shows mistake CMake executable not specified
. I tried adding add_executable(myProject ${SOURCE_FILES})
with the correct source files, but still the same error.
Where, as on the page Edit Configurations
, I can not choose any configuration. The fall for the configuration is empty. Below I get an error Error: Configuration is not specified.
.
When I try to debug a program, I get a warning message Configuration is still incorrect. Do you want to edit it again?
. I click Continue Anyway, which compiles the program as I expect, and also generates the correct executable. But it cannot start the executable due to configuration errors.