2

I have a c project that uses make and I tried to set it up for debugging via CLion IDE which supports CMake via the following solution:

https://stackoverflow.com/a/27871173/1561108

However in the run/debug config dialog I cannot get anything to appear in the drop down for Configuration underneath Target (which is set to 'All targets'). I also set Executable to the output executable.

both CMake and GDB are installed correctly and clion references them correctly. Why can I not get any config to load in the drop down?

cmake_minimum_required(VERSION 2.8.4)
project(<MINE>)

set(SOURCE_FILES
        main.c
        <MORE C FILES>
        )

set(PROJECT_BINARY_DIR /PATH/TO/<PROJ DIR>)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c++11")

add_custom_target(<MINE> COMMAND make -C ${PROJECT_BINARY_DIR}
        CLION_EXE_DIR=${PROJECT_BINARY_DIR})

add_executable(<mine> ${SOURCE_FILES})
Community
  • 1
  • 1
user1561108
  • 2,666
  • 9
  • 44
  • 69

1 Answers1

0

I had the same problem. Fixed by installing g++ from Cygwin and clicking rebuild.

(I'd been ignoring CLion's "C++ Compiler: not found" complaint because my project includes only C code.)

gherson
  • 169
  • 2
  • 9