debug("making cmake tool chain file for {$os} {$target_arch} with CFLAGS='{$cflags}'"); $root = BUILD_ROOT_PATH; $ccLine = ''; if ($cc) { $ccLine = 'SET(CMAKE_C_COMPILER ' . $cc . ')'; } $cxxLine = ''; if ($cxx) { $cxxLine = 'SET(CMAKE_CXX_COMPILER ' . $cxx . ')'; } $toolchain = << "-Ixxx"] * @return string like: CFLAGS="-Ixxx" */ public static function makeEnvVarString(array $vars): string { $str = ''; foreach ($vars as $key => $value) { if ($str !== '') { $str .= ' '; } $str .= $key . '=' . escapeshellarg($value); } return $str; } }