@@ -32,12 +32,12 @@ endif()
32
32
33
33
# Creates a custom command to build ${TARGET} with correct dependencies.
34
34
function (ADD_TOIT_SNAPSHOT SOURCE TARGET DEP_FILE ENV)
35
- if (NOT DEFINED TOITC )
36
- set (TOITC "$ENV{TOITC } " )
37
- if ("${TOITC } " STREQUAL "" )
38
- # TOITC is normally set to the toit.compile executable.
35
+ if (NOT DEFINED TOIT )
36
+ set (TOIT "$ENV{TOIT } " )
37
+ if ("${TOIT } " STREQUAL "" )
38
+ # TOIT is normally set to the toit executable.
39
39
# However, for cross-compilation the compiler must be provided manually.
40
- message (FATAL_ERROR "TOITC not provided" )
40
+ message (FATAL_ERROR "TOIT not provided" )
41
41
endif ()
42
42
endif ()
43
43
if (POLICY CMP0116)
@@ -47,7 +47,13 @@ function(ADD_TOIT_SNAPSHOT SOURCE TARGET DEP_FILE ENV)
47
47
OUTPUT "${TARGET} "
48
48
DEPFILE ${DEP_FILE}
49
49
DEPENDS download_packages "${SOURCE} "
50
- COMMAND ${CMAKE_COMMAND} -E env ${ENV} ASAN_OPTIONS=detect_leaks=false "${TOITC} " --dependency-file "${DEP_FILE} " --dependency-format ninja -w "${TARGET} " "${SOURCE} "
50
+ COMMAND ${CMAKE_COMMAND} -E env ${ENV} ASAN_OPTIONS=detect_leaks=false
51
+ "${TOIT} " compile
52
+ --snapshot
53
+ --dependency-file "${DEP_FILE} "
54
+ --dependency-format ninja
55
+ -o "${TARGET} "
56
+ "${SOURCE} "
51
57
)
52
58
endfunction (ADD_TOIT_SNAPSHOT)
53
59
@@ -70,7 +76,6 @@ function(ADD_TOIT_EXE SOURCE TARGET DEP_FILE ENV)
70
76
DEPENDS download_packages "${SOURCE} "
71
77
COMMAND ${CMAKE_COMMAND} -E env ${ENV} ASAN_OPTIONS=detect_leaks=false
72
78
"${TOIT} " compile
73
- --snapshot
74
79
--dependency-file "${DEP_FILE} "
75
80
--dependency-format ninja
76
81
-o "${TARGET} "
0 commit comments