Create a minimal valid solution JSON string with given compile_options.
(compile_options: dict | None = None)
| 43 | |
| 44 | |
| 45 | def _make_solution_json(compile_options: dict | None = None) -> str: |
| 46 | """Create a minimal valid solution JSON string with given compile_options.""" |
| 47 | solution = { |
| 48 | "name": "test_solution", |
| 49 | "definition": "test_def", |
| 50 | "author": "test", |
| 51 | "spec": { |
| 52 | "languages": ["cuda_cpp"], |
| 53 | "target_hardware": ["LOCAL"], |
| 54 | "entry_point": "main.cpp::run", |
| 55 | "destination_passing_style": True, |
| 56 | "compile_options": compile_options, |
| 57 | }, |
| 58 | "sources": [{"path": "main.cpp", "content": "// test source"}], |
| 59 | } |
| 60 | return json.dumps(solution) |
| 61 | |
| 62 | |
| 63 | def _exec_build_ext( |