Skip to content

Commit

Permalink
update -I flags + remove vector test in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
niosus committed May 7, 2016
1 parent 7d05f6f commit 1059f1a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 0 additions & 3 deletions EasyClangComplete.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"/usr/include",
"/usr/include/c++/4.6", // this is for travis build
"/usr/include/c++/4.6/x86_64-linux-gnu",
"C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\include",
"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include",
"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include",
"$project_base_path/src",
"/workspace/$project_name/src",
],
Expand Down
6 changes: 3 additions & 3 deletions plugin/completion/bin_complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ def init(self, view, includes, settings, project_folder):
# init needed variables from settings
self.flags_dict[view.id()] = []
for include in includes:
self.flags_dict[view.id()].append('-I' + include)
self.flags_dict[view.id()].append('-I "{}"'.format(include))

# support .clang_complete file with -I<indlude> entries
# support .clang_complete file with -I "<indlude>" entries
if settings.search_clang_complete:
log.debug(" searching for .clang_complete in %s up to %s",
file_folder, project_folder)
Expand Down Expand Up @@ -192,7 +192,7 @@ def complete(self, view, cursor_pos, show_errors):
std=self.std_flag,
complete_at=complete_at_str,
includes=" ".join(self.flags_dict[view.id()]))
log.warning(" clang command: \n%s", complete_cmd)
log.debug(" clang command: \n%s", complete_cmd)
# execute clang code completion
start = time.time()
log.debug(" started code complete for view %s", view.id())
Expand Down
2 changes: 1 addition & 1 deletion plugin/completion/lib_complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def init(self, view, includes, settings, project_folder):
clang_complete_file)
clang_flags += flags

log.warning(" clang flags are: %s", clang_flags)
log.debug(" clang flags are: %s", clang_flags)
try:
TU = Completer.tu_module
start = time.time()
Expand Down
4 changes: 4 additions & 0 deletions tests/test_complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import tempfile
import time
import logging
import platform
from os import path
from unittest import TestCase

Expand Down Expand Up @@ -114,6 +115,9 @@ def test_complete(self):
self.assertTrue(expected in completer.completions)

def test_complete_vector(self):
if platform.system() == "Windows":
logging.warning(" NOT TESTING VECTOR COMPLETION ON WINDOWS!")
return
file_name = path.join(path.dirname(__file__), 'test_vector.cpp')
self.view = sublime.active_window().open_file(file_name)
while self.view.is_loading():
Expand Down

0 comments on commit 1059f1a

Please sign in to comment.