@@ -30,6 +30,8 @@ if (USING_MSVC)
30
30
set (JERRY_HOST_C_FLAGS_INIT "-DWIN32" )
31
31
endif ()
32
32
33
+ separate_arguments (EXTRA_JERRY_CMAKE_PARAMS )
34
+
33
35
ExternalProject_Add (hostjerry
34
36
PREFIX ${DEPS_HOST_JERRY}
35
37
SOURCE_DIR ${ROOT_DIR} /deps/jerry/
@@ -45,10 +47,10 @@ ExternalProject_Add(hostjerry
45
47
-DJERRY_CMDLINE_SNAPSHOT=ON
46
48
-DJERRY_EXT=ON
47
49
-DJERRY_LOGGING=ON
50
+ -DJERRY_LINE_INFO=${JERRY_LINE_INFO}
48
51
-DJERRY_ERROR_MESSAGES=ON
49
52
-DJERRY_SNAPSHOT_SAVE=${ENABLE_SNAPSHOT}
50
53
-DJERRY_PROFILE=${JERRY_PROFILE}
51
- -DJERRY_LINE_INFO=${JERRY_LINE_INFO}
52
54
${EXTRA_JERRY_CMAKE_PARAMS}
53
55
54
56
# The snapshot tool does not require the system allocator
@@ -70,7 +72,7 @@ set_property(TARGET jerry-snapshot PROPERTY
70
72
71
73
# Utility method to add -D<KEY>=<KEY_Value>
72
74
macro (add_cmake_arg TARGET_ARG KEY )
73
- if (${KEY} )
75
+ if (DEFINED ${KEY} )
74
76
list (APPEND ${TARGET_ARG} -D${KEY}=${${KEY}} )
75
77
endif ()
76
78
endmacro (add_cmake_arg )
@@ -112,7 +114,7 @@ endif()
112
114
113
115
# Add a few cmake options based on buildtype/external cmake defines
114
116
if ("${CMAKE_BUILD_TYPE} " STREQUAL "Debug" )
115
- list ( APPEND DEPS_LIB_JERRY_ARGS -DJERRY_ERROR_MESSAGES= ON )
117
+ set ( JERRY_ERROR_MESSAGES ON )
116
118
endif ()
117
119
118
120
# NuttX is not using the default port implementation of JerryScript
@@ -129,8 +131,6 @@ add_cmake_arg(DEPS_LIB_JERRY_ARGS JERRY_DEBUGGER)
129
131
add_cmake_arg (DEPS_LIB_JERRY_ARGS JERRY_GLOBAL_HEAP_SIZE )
130
132
add_cmake_arg (DEPS_LIB_JERRY_ARGS JERRY_ATTR_GLOBAL_HEAP )
131
133
132
- separate_arguments (EXTRA_JERRY_CMAKE_PARAMS )
133
-
134
134
build_lib_name (JERRY_CORE_NAME jerry-core )
135
135
build_lib_name (JERRY_LIBM_NAME jerry-math )
136
136
build_lib_name (JERRY_EXT_NAME jerry-ext )
@@ -174,8 +174,6 @@ ExternalProject_Add(libjerry
174
174
-DJERRY_LOGGING=ON
175
175
-DJERRY_LINE_INFO=${JERRY_LINE_INFO}
176
176
-DJERRY_VM_EXEC_STOP=ON
177
- -DJERRY_ERROR_MESSAGES=ON
178
- -DENABLE_LTO=${ENABLE_LTO}
179
177
${DEPS_LIB_JERRY_ARGS}
180
178
${EXTRA_JERRY_CMAKE_PARAMS}
181
179
BUILD_BYPRODUCTS ${JERRY_LIB_BUILD_BYPRODUCTS}
0 commit comments