Skip to content

Commit

Permalink
Project Generator: add new targets for CLion IDE "BUILD_VERBOSE" and …
Browse files Browse the repository at this point in the history
…"MONITOR" (serial port monitor) // Resolve #359
  • Loading branch information
ivankravets committed Feb 23, 2019
1 parent 42c2275 commit e0b9d08
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ PlatformIO 4.0

* Added Python 3.5+ support
(`issue #895 <https://github.com/platformio/platformio-core/issues/895>`_)
* Project Generator: added new targets for CLion IDE "BUILD_VERBOSE" and "MONITOR" (serial port monitor)
(`issue #359 <https://github.com/platformio/platformio-core/issues/359>`_)
* Fixed an issue with slow updating of PlatformIO Core packages on Windows
* Fixed an issue when `platformio ci <https://docs.platformio.org/en/latest/userguide/cmd_ci.html>`__ recompiles project if ``--keep-build-dir`` option is passed
(`issue #2109 <https://github.com/platformio/platformio-core/issues/2109>`_)
Expand Down
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 1 files
+9 −10 ide/clion.rst
12 changes: 12 additions & 0 deletions platformio/ide/tpls/clion/CMakeLists.txt.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ add_custom_target(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_custom_target(
PLATFORMIO_BUILD_VERBOSE ALL
COMMAND ${PLATFORMIO_CMD} -f -c clion run --verbose
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_custom_target(
PLATFORMIO_UPLOAD ALL
COMMAND ${PLATFORMIO_CMD} -f -c clion run --target upload
Expand All @@ -21,6 +27,12 @@ add_custom_target(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_custom_target(
PLATFORMIO_MONITOR ALL
COMMAND ${PLATFORMIO_CMD} -f -c clion device monitor
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_custom_target(
PLATFORMIO_TEST ALL
COMMAND ${PLATFORMIO_CMD} -f -c clion test
Expand Down
4 changes: 4 additions & 0 deletions platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# !!! WARNING !!!
# PLEASE DO NOT MODIFY THIS FILE!
# USE https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags

% def _normalize_path(path):
% if project_dir in path:
% path = path.replace(project_dir, "${CMAKE_CURRENT_LIST_DIR}")
Expand Down

0 comments on commit e0b9d08

Please sign in to comment.