platformio-core icon indicating copy to clipboard operation
platformio-core copied to clipboard

Added CLion IDE CTest support

Open hacker-cb opened this issue 2 years ago • 2 comments

This is very useful to run tests directly from the CLion IDE.

hacker-cb avatar Sep 03 '22 10:09 hacker-cb

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 03 '22 10:09 CLAassistant

Hi @ivankravets. Could you check this PR please?

hacker-cb avatar Sep 06 '22 14:09 hacker-cb

Hi @hacker-cb, sorry for the delay. Thanks for your PR!

Tests are very specific and not all IDEs support them. So, there is no need to trash time resources on fetching them for "all templates.

Nevertheless, there is a good solution. We can inject Python code into the templates. We use Python's Bottle template engine. So, could you move your Python-related code to https://github.com/platformio/platformio-core/blob/develop/platformio/project/integration/tpls/clion/CMakeLists.txt.tpl ?

See example https://github.com/platformio/platformio-core/blob/develop/platformio/project/integration/tpls/vscode/.vscode/c_cpp_properties.json.tpl

Regarding "project_dir", is it equal to the os.getcwd().

ivankravets avatar Sep 27 '22 16:09 ivankravets

Actually I solved this by creating custom CMakeListsUser.txt. No need to modify PlatformIO core.

hacker-cb avatar Dec 08 '22 12:12 hacker-cb

Actually I solved this by creating custom CMakeListsUser.txt. No need to modify PlatformIO core.

Project was moved to https://github.com/hacker-cb/platformio-cmake

hacker-cb avatar Dec 28 '22 16:12 hacker-cb

Project was moved to https://github.com/hacker-cb/platformio-cmake

Nice, I'm definitely gonna check it out.

You closes the issue though, wouldn't that make sense for this to be included in PIO? I guess I'd have to be lucky to find your repo with the solution – it would be nice if PIO and CLion worked together OOTB.

MacDada avatar Dec 28 '22 20:12 MacDada

Project was moved to https://github.com/hacker-cb/platformio-cmake

Nice, I'm definitely gonna check it out.

You closes the issue though, wouldn't that make sense for this to be included in PIO? I guess I'd have to be lucky to find your repo with the solution – it would be nice if PIO and CLion worked together OOTB.

Actually it is very simple to add any additional logic using CMakeListsUser.txt. My additions is just part of logic which can be useful by PlatdormIO users who use Clion or other CMake based IDEs. I agreed with developers that no need to include custom logic into the core. It can be done with custom CMake files.

hacker-cb avatar Dec 28 '22 21:12 hacker-cb