|
|
|
|
|
|
|
|
'external/taywee-args/include', |
|
|
'external/taywee-args/include', |
|
|
'external/spdlog/include', |
|
|
'external/spdlog/include', |
|
|
'external/wil/include', |
|
|
'external/wil/include', |
|
|
|
|
|
'external/ranges-v3/include', |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (not 'clang' in cxx.name) and 'cl' in cxx.name |
|
|
return (not 'clang' in cxx.name) and 'cl' in cxx.name |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def have_ccache() -> bool: |
|
|
|
|
|
try: |
|
|
|
|
|
subprocess.check_output(['ccache', '--version']) |
|
|
|
|
|
return True |
|
|
|
|
|
except subprocess.CalledProcessError: |
|
|
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _create_compile_command(opts: BuildOptions, cpp_file: Path, |
|
|
def _create_compile_command(opts: BuildOptions, cpp_file: Path, |
|
|
obj_file: Path) -> List[str]: |
|
|
obj_file: Path) -> List[str]: |
|
|
if not opts.is_msvc: |
|
|
if not opts.is_msvc: |
|
|
|
|
|
|
|
|
str(cpp_file), |
|
|
str(cpp_file), |
|
|
f'-o{obj_file}', |
|
|
f'-o{obj_file}', |
|
|
] |
|
|
] |
|
|
|
|
|
if have_ccache(): |
|
|
|
|
|
cmd.insert(0, 'ccache') |
|
|
if opts.static: |
|
|
if opts.static: |
|
|
cmd.append('-static') |
|
|
cmd.append('-static') |
|
|
if opts.debug: |
|
|
if opts.debug: |
|
|
|
|
|
|
|
|
'/nologo', |
|
|
'/nologo', |
|
|
'/EHsc', |
|
|
'/EHsc', |
|
|
'/std:c++latest', |
|
|
'/std:c++latest', |
|
|
|
|
|
'/permissive-', |
|
|
'/DFMT_HEADER_ONLY=1', |
|
|
'/DFMT_HEADER_ONLY=1', |
|
|
f'/I{ROOT / "src"}', |
|
|
f'/I{ROOT / "src"}', |
|
|
str(cpp_file), |
|
|
str(cpp_file), |