Skip to content

Commit a6a6db9

Browse files
updating cmake files
1 parent 5be8d0b commit a6a6db9

4 files changed

Lines changed: 24 additions & 13 deletions

File tree

docs/how/cmake/gc_example/typescript.cmake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ macro(add_tsc_files subpath)
2626

2727
if (CMAKE_BUILD_TYPE STREQUAL "Release")
2828
set (TS_FLAGS "-opt")
29-
set (LLC_FLAGS "")
3029
else()
31-
set (TS_FLAGS "")
32-
set (LLC_FLAGS "--experimental-debug-variable-locations")
30+
set (TS_FLAGS "--opt_level=0")
31+
set (TS_FLAGS ${TS_FLAGS} "--di")
3332
endif()
3433

3534
set (TS_FILES)
@@ -49,8 +48,7 @@ macro(add_tsc_files subpath)
4948

5049
add_custom_command(
5150
OUTPUT "${obj_file}"
52-
#COMMAND ${CMAKE_COMMAND} -E echo "Compiling ${source_file} to ${obj_file}"
53-
COMMAND "${TSC_APP}" --emit=obj -o="${obj_file}" ${TS_FLAGS} ${LLC_FLAGS} "${source_file}"
51+
COMMAND "${TSC_APP}" --emit=obj -o="${obj_file}" ${TS_FLAGS} "${source_file}"
5452
DEPENDS "${source_file}"
5553
BYPRODUCTS "${obj_file}"
5654
COMMENT "Compiling ${source_file} to ${obj_file}"

docs/how/cmake_vulkan/typescript.cmake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ macro(add_tsc_files subpath)
2626

2727
if (CMAKE_BUILD_TYPE STREQUAL "Release")
2828
set (TS_FLAGS "-opt")
29-
set (LLC_FLAGS "")
3029
else()
31-
set (TS_FLAGS "")
32-
set (LLC_FLAGS "--experimental-debug-variable-locations")
30+
set (TS_FLAGS "--opt_level=0")
31+
set (TS_FLAGS ${TS_FLAGS} "--di")
3332
endif()
3433

3534
set (TS_FILES)
@@ -49,8 +48,7 @@ macro(add_tsc_files subpath)
4948

5049
add_custom_command(
5150
OUTPUT "${obj_file}"
52-
#COMMAND ${CMAKE_COMMAND} -E echo "Compiling ${source_file} to ${obj_file}"
53-
COMMAND "${TSC_APP}" --emit=obj -o="${obj_file}" ${TS_FLAGS} ${LLC_FLAGS} "${source_file}"
51+
COMMAND "${TSC_APP}" --emit=obj -o="${obj_file}" ${TS_FLAGS} "${source_file}"
5452
DEPENDS "${source_file}"
5553
BYPRODUCTS "${obj_file}"
5654
COMMENT "Compiling ${source_file} to ${obj_file}"

docs/how/cmake_winapp/typescript.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ macro(add_tsc_files subpath)
2525
file(GLOB TSC_SRC "${fileSelectPath}/*.${TSExt}")
2626

2727
if (CMAKE_BUILD_TYPE STREQUAL "Release")
28-
set (TS_FLAGS "--opt")
28+
set (TS_FLAGS "-opt")
2929
else()
30-
set (TS_FLAGS "--opt_level=0 --di")
30+
set (TS_FLAGS "--opt_level=0")
31+
set (TS_FLAGS ${TS_FLAGS} "--di")
3132
endif()
3233

3334
set (TS_FILES)

tsc/tsc/.vscode/launch.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,20 @@
282282
"moduleLoad": true,
283283
"trace": true
284284
},
285-
}
285+
},
286+
{
287+
"name": "(Windows-cppvsdbg) TypeScriptApp.exe",
288+
"type": "cppvsdbg",
289+
"request": "launch",
290+
"program": "C:\\dev\\TypeScriptCompiler\\docs\\how\\cmake_winapp\\__build\\debug\\Debug\\TypeScriptApp.exe",
291+
"symbolSearchPath": "C:\\dev\\TypeScriptCompiler\\docs\\how\\cmake_winapp\\__build\\debug\\Debug\\",
292+
"args": [],
293+
"stopAtEntry": true,
294+
"cwd": "${workspaceRoot}",
295+
"logging": {
296+
"moduleLoad": true,
297+
"trace": true
298+
},
299+
}
286300
]
287301
}

0 commit comments

Comments
 (0)