Library and Executable with the same name gives error


In my CMake project I have two targets, one library which is called `Simulation` (and gets built into ``) and an executable called `simulation`. They share the same name except the first upper case letter.

When I try to run the `simulation` target from the IDE, I get an error because it tries to execute the `` instead. This problem disappears if you don't use the same name for both.

On the `simulation` target options I can see the lowercase `simulation` selected as the executable.

I have tried to delete the project and clone it again without success.

Otherwise the project can be built correctly from the terminal and the executable runs correctly, so I think its and IDE issue.

I have found a workaround, which is using a different name for the executable and then renaming it using CMake's set_target_properties. However I won't see the "correct" name of the target in the IDE.

Please sign in to leave a comment.