Skip to content

Commit ca77696

Browse files
committed
create build system for Nabla DXC Tool (ndt), Cypi follow TODOs
1 parent c5657e6 commit ca77696

File tree

8 files changed

+55
-4
lines changed

8 files changed

+55
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,8 @@ add_subdirectory(${THIRD_PARTY_SOURCE_DIR})
352352

353353
add_subdirectory(src/nbl)
354354
add_subdirectory("${NBL_PYTHON_MODULE_ROOT_PATH}" tests) # Python Framework
355-
356-
if(NBL_BUILD_EXAMPLES)
357-
add_subdirectory(examples_tests)
358-
endif()
355+
add_subdirectory(examples_tests)
356+
add_subdirectory(tools)
359357

360358
if(NBL_BUILD_DOCS)
361359
add_subdirectory(docs)

tools/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add_subdirectory(ndt)

tools/ndt/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set(NBL_EXTRA_SOURCES
2+
# TODO: Cypi list extra sources if you need
3+
)
4+
5+
nbl_create_executable_project("${NBL_EXTRA_SOURCES}" "" "" "" "${NBL_EXECUTABLE_PROJECT_CREATION_PCH_TARGET}")

tools/ndt/__init__.py

Whitespace-only changes.

tools/ndt/config.json.template

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"enableParallelBuild": true,
3+
"threadsPerBuildProcess" : 2,
4+
"isExecuted": true,
5+
"scriptPath": "test/test.py",
6+
"cmake": {
7+
"configurations": [ "Release", "Debug", "RelWithDebInfo" ],
8+
"buildModes": [],
9+
"requiredOptions": []
10+
},
11+
"profiles": [
12+
{
13+
"backend": "vulkan",
14+
"platform": "windows",
15+
"buildModes": [],
16+
"runConfiguration": "Release",
17+
"gpuArchitectures": [],
18+
"inputs": [
19+
"test/config/release.json.template"
20+
]
21+
}
22+
],
23+
"inputs": []
24+
}

tools/ndt/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Cypi
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"dependencies": [],
3+
"data": [
4+
{
5+
"dependencies": [],
6+
"command": [
7+
"${NBL_EXECUTABLE_GEN_EXP_FILEPATH}"
8+
]
9+
}
10+
]
11+
}

tools/ndt/test/test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import framework as nbl
2+
3+
def main(args = None, config_json_filepaths = None, nabla_dir = None, warnings = None):
4+
if config_json_filepaths is None:
5+
args, config_json_filepaths, nabla_dir, warnings = nbl.get_args()
6+
if nbl.ExpectedFileAsDependencyTest("Nabla DXC Tool", config_json_filepaths, nabla_dir, warnings).run():
7+
print("Test finished, passed")
8+
exit(0)
9+
else:
10+
print()
11+
exit(1)

0 commit comments

Comments
 (0)