From ed336525343f3825e748349254afff35c3569f59 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 29 Sep 2021 15:44:52 +0300 Subject: [PATCH] Handle "test" folder as a part of CLion project // Resolve #4005 --- HISTORY.rst | 2 ++ platformio/ide/projectgenerator.py | 1 + platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index a2bfc732..30df34be 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,10 +12,12 @@ PlatformIO Core 5 ~~~~~~~~~~~~~~~~~~ - Allowed to override a default library builder via a new ``builder`` field in a ``build`` group of `library.json `__ manifest (`issue #3957 `_) +- Handle "test" folder as a part of CLion project (`issue #4005 `_) - Fixed a "KeyError: Invalid board option 'build.cpu'" when using a precompiled library with a board that does not have a CPU field in the manifest (`issue #4056 `_) - Fixed a "FileExist" error when the `platformio ci `__ command is used in pair with the ``--keep-build-dir`` option (`issue #4011 `_) - Fixed an issue with draft values of C++ language standards that broke static analysis via Cppcheck (`issue #3944 `_) + 5.2.0 (2021-09-13) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index 30eaa97d..56930b9a 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -81,6 +81,7 @@ class ProjectGenerator(object): "src_files": self.get_src_files(), "project_src_dir": self.config.get_optional_dir("src"), "project_lib_dir": self.config.get_optional_dir("lib"), + "project_test_dir": self.config.get_optional_dir("test"), "project_libdeps_dir": os.path.join( self.config.get_optional_dir("libdeps"), self.env_name ), diff --git a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl index dc03b2e5..a5c0010b 100644 --- a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl +++ b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl @@ -115,7 +115,7 @@ endif() % end FILE(GLOB_RECURSE SRC_LIST -% for path in (project_src_dir, project_lib_dir): +% for path in (project_src_dir, project_lib_dir, project_test_dir): {{ _normalize_path(path) + "/*.*" }} % end )