Using "Run..." pop-up changes Executable for the selected Configuration

已回答

One of my favorite features of CLion is the "Run..." pop-up, which I can summon with the keyboard shortcut Option-Command-R (on Mac). However, a recent version of CLion (I think within the last few months) introduced a very frustrating bug. Say that my currently selected Configuration is Foo, and that I use the "Run..." pop-up to select "Bar." CLion will then compile "Bar" but then run "Foo"! Somehow, using this pop-up causes CLion to change the "Executable" for the "Bar" configuration to "Foo". I've confirmed this by going to the "Run/Debug Configurations" window. Has anybody else had this issue? I do not have this issue when selecting a Configuration using the dropdown in the toolbar.

I'm using CLion 2017.3.3.

0

Hi! Unfortunately, I didn't manage to reproduce the issue on my side (CLion 2017.3.3, macOS).

How were these configurations created - manually or automatically based on the CMakeLists.txt file? Could you please provide us with the simple sample project with which the issue can be reproduced? Is it possible to record a screencast illustrating the issue? You can send the materials to clion-support at jetbrains.com.

Please also check whether the issue is still actual with CLion 2018.1 EAP.

0
Avatar
Permanently deleted user

Thank you Anna for responding and testing this so quickly. 

The configurations were created automatically based on a CMakeLists.txt file, though I may have edited the configurations to specify a working directory and/or environment variables. 

I'll try to create a sample project or record a screencast.

Am I able to install CLion 2018.1 EAP alongside a stable release?

0

Yes, sure, you can install CLion 2018.1 EAP alongside a stable release.

0
Avatar
Permanently deleted user

I'm also bumping into this on CLion 2018.1.5. I have an out-of-source CMakeLists.txt with this content:

cmake_minimum_required(VERSION 3.11)
project(my_project)

add_subdirectory(lib)
add_subdirectory(server)
add_subdirectory(client)

The project amounts to a hello world project over sockets with server and client each linking to lib.

project(my_project_server)

add_executable(server "")
target_compile_features(server PUBLIC cxx_std_17)
target_link_libraries(server lib)
target_sources(server PRIVATE server-main.cpp)

Both the client and server have almost the same CMakeLists.txt. The auto generated AND custom configurations for client will switch to the server executable after a couple of runs through the debugger. It can be pretty annoying, especially when the server tries to bind to the same port twice.

 

Hopefully that helps.

 

EDIT: I expanded on this a bit on the issue tracker: https://youtrack.jetbrains.com/issue/CPP-11628

0

@Abraidwood88 thanks for submitting the issue! Looks related to https://youtrack.jetbrains.com/issue/CPP-11874. Please try using CLion 2018.2 RC3 as my colleague asked.

0

请先登录再写评论。