Apply review comments
This commit is contained in:
parent
4673fd0dcb
commit
3bee004f63
|
@ -1,15 +1,16 @@
|
|||
#include <stdio.h>
|
||||
#ifndef BUILD_KERNEL
|
||||
|
||||
#ifndef BUILD_WITH_MESON
|
||||
#include "config.h"
|
||||
#else
|
||||
#ifdef BUILD_WITH_MESON
|
||||
#include "_config_for_getarch_2nd.h"
|
||||
#else
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#else
|
||||
#include "config_kernel.h"
|
||||
#endif
|
||||
|
||||
#if (defined(__WIN32__) || defined(__WIN64__) || defined(__CYGWIN32__) || defined(__CYGWIN64__) || defined(_WIN32) || defined(_WIN64)) && defined(__64BIT__)
|
||||
typedef long long BLASLONG;
|
||||
typedef unsigned long long BLASULONG;
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
import argparse
|
||||
|
||||
|
||||
def merge_files(file1_path: str, file2_path: str) -> str:
|
||||
# Open files in read mode
|
||||
with open(file1_path, 'r') as file1, open(file2_path, 'r') as file2:
|
||||
content1 = file1.read()
|
||||
content2 = file2.read()
|
||||
merged_content = content1 + "\n" + content2
|
||||
return merged_content
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Merge and print content from two text files.")
|
||||
parser.add_argument("file1", help="Path to the first text file.")
|
||||
parser.add_argument("file2", help="Path to the second text file.")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
output = merge_files(args.file1, args.file2)
|
||||
print(output)
|
|
@ -1,5 +1,6 @@
|
|||
add_languages('fortran', native: false)
|
||||
ff = meson.get_compiler('fortran')
|
||||
# TODO(mtsokol): make it a local setting
|
||||
# if ff.has_argument('-Wno-conversion')
|
||||
# add_project_arguments('-Wno-conversion', language: 'fortran')
|
||||
# endif
|
||||
|
|
21
meson.build
21
meson.build
|
@ -22,6 +22,7 @@ openblas_version = f'@openblas_major_version@.@openblas_minor_version@.@openblas
|
|||
# Skip the check for valid CC
|
||||
cc = meson.get_compiler('c')
|
||||
fc = meson.get_compiler('fortran')
|
||||
cc_id = cc.get_id()
|
||||
fc_id = fc.get_id()
|
||||
|
||||
# Common args
|
||||
|
@ -415,8 +416,10 @@ symb_defs = {
|
|||
|
||||
# config.h file generation
|
||||
|
||||
run_command('c_check', 'Makefile.conf', './build/_config_1.h', 'gcc')
|
||||
run_command('f_check', 'Makefile.conf', './build/_config_1.h', 'gfortran')
|
||||
_config_1_path = meson.current_build_dir() / '_config_1.h'
|
||||
_join_files_py = '../join_files.py'
|
||||
run_command('./c_check', 'Makefile.conf', _config_1_path, cc_id, check: true)
|
||||
run_command('./f_check', 'Makefile.conf', _config_1_path, fc_id, check: true)
|
||||
|
||||
getarch = executable('getarch', ['getarch.c', 'cpuid.S'])
|
||||
|
||||
|
@ -429,7 +432,12 @@ _config_2h = custom_target('_config_2h',
|
|||
|
||||
_config_for_getarch_2nd_h = custom_target('_config_for_getarch_2nd_h',
|
||||
output: '_config_for_getarch_2nd.h',
|
||||
command: [find_program('cat'), './_config_1.h', _config_2h],
|
||||
command: [
|
||||
find_program('python'),
|
||||
_join_files_py,
|
||||
_config_1_path,
|
||||
_config_2h,
|
||||
],
|
||||
depends: [_config_2h],
|
||||
capture: true,
|
||||
)
|
||||
|
@ -448,7 +456,12 @@ _config_3h = custom_target('_config_3h',
|
|||
|
||||
config_h = custom_target('config_h',
|
||||
output: 'config.h',
|
||||
command: [find_program('cat'), _config_for_getarch_2nd_h, _config_3h],
|
||||
command: [
|
||||
find_program('python'),
|
||||
_join_files_py,
|
||||
_config_for_getarch_2nd_h,
|
||||
_config_3h,
|
||||
],
|
||||
depends: [_config_3h],
|
||||
capture: true,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue