Skip to content

Commit c7040b0

Browse files
committed
Since new library manager fetches all files, builder should only collect the ones that can be used for compilation (no pdf for you Compilergit add -p)
1 parent c8256ea commit c7040b0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Symfony/src/Codebender/ApiBundle/Controller/DefaultController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,13 @@ protected function checkHeaders($files, array $userlibs)
125125

126126
if ($data["success"]) {
127127
$fetchedLibs[] = $header;
128+
$files_to_add = array();
129+
foreach ($data["files"] as $file){
130+
if (in_array(pathinfo($file['filename'], PATHINFO_EXTENSION), array('cpp', 'h', 'c', 'S', 'inc')))
131+
$files_to_add[] = $file;
132+
}
128133

129-
$libraries[$header] = $data["files"];
134+
$libraries[$header] = $files_to_add;
130135
$foundHeaders[] = $header . ".h";
131136

132137
} elseif (!$data['success']){

0 commit comments

Comments
 (0)