This repository was archived by the owner on Jun 25, 2020. It is now read-only.
File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,14 @@ std::vector<std::string> CompileCommands::get_arguments(const boost::filesystem:
147
147
arguments.emplace_back (" cuda_runtime.h" );
148
148
}
149
149
150
+ if (extension==" .cl" ) {
151
+ arguments.emplace_back (" -xcl" );
152
+ arguments.emplace_back (" -cl-std=CL2.0" );
153
+ arguments.emplace_back (" -Xclang" );
154
+ arguments.emplace_back (" -finclude-default-header" );
155
+ arguments.emplace_back (" -Wno-gcc-compat" );
156
+ }
157
+
150
158
if (!build_path.empty ()) {
151
159
arguments.emplace_back (" -working-directory" );
152
160
arguments.emplace_back (build_path.string ());
Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ Glib::RefPtr<Gsv::Language> Source::guess_language(const boost::filesystem::path
70
70
else
71
71
language=language_manager->get_language (" cpp" );
72
72
}
73
+ else if (language->get_id ()==" opencl" ) {
74
+ language = language_manager->get_language (" cpp" );
75
+ }
73
76
return language;
74
77
}
75
78
Original file line number Diff line number Diff line change @@ -561,7 +561,8 @@ bool Usages::Clang::is_source(const boost::filesystem::path &path) {
561
561
auto ext = path.extension ();
562
562
if (ext == " .c" || // c sources
563
563
ext == " .cpp" || ext == " .cxx" || ext == " .cc" || ext == " .C" || ext == " .c++" || // c++ sources
564
- ext == " .cu" ) // CUDA sources
564
+ ext == " .cu" || // CUDA sources
565
+ ext == " .cl" ) // OpenCL sources
565
566
return true ;
566
567
else
567
568
return false ;
You can’t perform that action at this time.
0 commit comments