Library/Compiler.php
public function preCompileHeaders()
    {
        if (is_windows()) {
            // TODO: Add Windows support
            return;
        }

        $phpIncludes = $this->getPhpIncludeDirs();

        foreach (new \DirectoryIterator('ext/kernel') as $file) {
            if ($file->isDir()) {
                continue;
            }

            if (preg_match('/\.h$/', $file)) {
                $path = $file->getRealPath();

                $command = sprintf(
                    'cd ext && gcc -c kernel/%s  -I. %s  -o kernel/%s.gch',
                    $file->getBaseName(),
                    $phpIncludes,
                    $file->getBaseName()
                );

                if (!file_exists($path.'.gch') || filemtime($path) > filemtime($path.'.gch')) {
                    $this->filesystem->system($command, 'stdout', 'compile-header');
                }
            }
        }
    }
public function preCompileHeaders()
    {
        if (is_windows()) {
            // TODO: Add Windows support
            return;
        }

        $phpIncludes = $this->getPhpIncludeDirs();

        foreach (new \DirectoryIterator('ext/kernel') as $file) {
            if ($file->isDir()) {
                continue;
            }

            if (preg_match('/\.h$/', $file)) {
                $path = $file->getRealPath();

                $command = sprintf(
                    'cd ext && gcc -c kernel/%s  -I. %s  -o kernel/%s.gch',
                    $file->getBaseName(),
                    $phpIncludes,
                    $file->getBaseName()
                );

                if (!file_exists($path.'.gch') || filemtime($path) > filemtime($path.'.gch')) {
                    $this->filesystem->system($command, 'stdout', 'compile-header');
                }
            }
        }
    }
public function preCompileHeaders ( ) { if ( is_windows ( ) ) { // TODO: Add Windows support return ; } $ phpIncludes = $ this -> getPhpIncludeDirs ( ) ; foreach ( new \ DirectoryIterator ( 'ext/kernel' ) as $ file ) { if ( $ file -> isDir ( ) ) { continue ; } if ( preg_match ( '/\.h$/' , $ file ) ) { $ path = $ file -> getRealPath ( ) ; $ command = sprintf ( 'cd ext && gcc -c kernel/%s  -I. %s  -o kernel/%s.gch' , $ file -> getBaseName ( ) , $ phpIncludes , $ file -> getBaseName ( ) ) ; if ( ! file_exists ( $ path . '.gch' ) || filemtime ( $ path ) > filemtime ( $ path . '.gch' ) ) { $ this -> filesystem -> system ( $ command , 'stdout' , 'compile-header' ) ; } } } }
Pre-compile headers to speed up compilation.
Pre - compile headers to speed up compilation .