2

I have configuration in CMAkeLists.txt

set(SOURCE_FILES client/client.cpp)
add_executable(Client ${SOURCE_FILES} client/client.cpp)

So I can launch client.cpp in CLion (Shift + F10). But if I need to launch client.cpp with argv parameter (it has one integer as parameter) I must change configuration in CLion adding program arguments.

Maybe I can add some parameters using CMakeLists.txt?

1 Answer 1

1

CMakeList is only responsible for configuring your program, it does so by generating a Makefile, which then will build your program binary. Clion then launch the binary using the arguments you specified.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.