File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,16 @@ if(NOT DEFINED ENABLE_LTO)
5555 set (ENABLE_LTO OFF )
5656endif ()
5757
58+ if (NOT DEFINED JERRY_LINE_INFO)
59+ if ("${CMAKE_BUILD_TYPE} " STREQUAL "Debug" )
60+ message ("Line info default enabled in debug mode" )
61+ set (JERRY_LINE_INFO ON )
62+ else ()
63+ message ("Line info default disabled in non debug mode" )
64+ set (JERRY_LINE_INFO OFF )
65+ endif ()
66+ endif ()
67+
5868macro (iotjs_add_flags VAR)
5969 foreach (_flag ${ARGN} )
6070 set (${VAR} "${${VAR} } ${_flag} " )
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ set_property(TARGET jerry-snapshot PROPERTY
7070
7171# Utility method to add -D<KEY>=<KEY_Value>
7272macro (add_cmake_arg TARGET_ARG KEY)
73- if (${KEY} )
73+ if (DEFINED ${KEY} )
7474 list (APPEND ${TARGET_ARG} -D${KEY} =${${KEY} })
7575 endif ()
7676endmacro (add_cmake_arg)
@@ -112,7 +112,7 @@ endif()
112112
113113# Add a few cmake options based on buildtype/external cmake defines
114114if ("${CMAKE_BUILD_TYPE} " STREQUAL "Debug" )
115- list ( APPEND DEPS_LIB_JERRY_ARGS -DJERRY_ERROR_MESSAGES= ON )
115+ set (JERRY_ERROR_MESSAGES ON )
116116endif ()
117117
118118# NuttX is not using the default port implementation of JerryScript
@@ -174,8 +174,6 @@ ExternalProject_Add(libjerry
174174 -DJERRY_LOGGING=ON
175175 -DJERRY_LINE_INFO=${JERRY_LINE_INFO}
176176 -DJERRY_VM_EXEC_STOP=ON
177- -DJERRY_ERROR_MESSAGES=ON
178- -DENABLE_LTO=${ENABLE_LTO}
179177 ${DEPS_LIB_JERRY_ARGS}
180178 ${EXTRA_JERRY_CMAKE_PARAMS}
181179 BUILD_BYPRODUCTS ${JERRY_LIB_BUILD_BYPRODUCTS}
You can’t perform that action at this time.
0 commit comments