File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ function(__arduino_preprocess_sketches SOURCE_DIRPATH MAIN_FILENAME OTHER_FILENA
5858
5959 file (WRITE "${OUTPUT_FILEPATH} " "${_combined_text} " )
6060
61+ set (ENV{TMP} "${OUTPUT_DIRPATH} /ctags/first-run" ) # work around Arduino's ctags having problems with tempfiles
62+ file (MAKE_DIRECTORY "$ENV{TMP} " )
63+
6164 __arduino_ctags(_symbols "${OUTPUT_FILEPATH} " --line-directives=no ) # <-------- find first declaration in merged C++
6265
6366 list (GET _symbols 0 _first_symbol)
@@ -69,6 +72,9 @@ function(__arduino_preprocess_sketches SOURCE_DIRPATH MAIN_FILENAME OTHER_FILENA
6972 math (EXPR _line_before_first_symbol "${CMAKE_MATCH_1} - 2" )
7073 endif ()
7174
75+ set (ENV{TMP} "${OUTPUT_DIRPATH} /ctags/second-run" ) # work around Arduino's ctags having problems with tempfiles
76+ file (MAKE_DIRECTORY "$ENV{TMP} " )
77+
7278 __arduino_ctags(_symbols "${OUTPUT_FILEPATH} " --line-directives=yes ) # <------- extract declarations from merged C++
7379
7480 unset (_prototypes)
You can’t perform that action at this time.
0 commit comments