42 lines
1.1 KiB
Diff
42 lines
1.1 KiB
Diff
Source: Johannes (@jnbr)
|
|
Upstream: no
|
|
|
|
--- a/tools/lemon/CMakeLists.txt 2019-02-28 18:56:38.000000000 +0100
|
|
+++ b/tools/lemon/CMakeLists.txt 2019-03-11 20:41:14.211616335 +0100
|
|
@@ -7,6 +7,14 @@
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
#
|
|
|
|
+if(CMAKE_CROSSCOMPILING)
|
|
+ add_custom_target(
|
|
+ lemon
|
|
+ COMMAND $ENV{CC_FOR_BUILD} -o ${EXECUTABLE_OUTPUT_PATH}/lemon ${CMAKE_CURRENT_SOURCE_DIR}/lemon.c
|
|
+ COMMENT "generate lemon for host"
|
|
+ )
|
|
+else()
|
|
+
|
|
add_executable(lemon lemon.c)
|
|
|
|
# To keep lemon.c as close to upstream as possible, deliberately ignore
|
|
@@ -62,6 +70,7 @@
|
|
endif()
|
|
target_compile_options(lemon PRIVATE ${lemon_cflags})
|
|
|
|
+endif() # CMAKE_CROSSCOMPILING
|
|
#
|
|
# Editor modelines - https://www.wireshark.org/tools/modelines.html
|
|
#
|
|
|
|
--- a/cmake/modules/UseLemon.cmake 2019-02-28 18:56:38.000000000 +0100
|
|
+++ b/cmake/modules/UseLemon.cmake 2019-03-11 21:19:28.352163076 +0100
|
|
@@ -13,7 +13,7 @@
|
|
# These files are generated as side-effect
|
|
${_out}.h
|
|
${_out}.out
|
|
- COMMAND $<TARGET_FILE:lemon>
|
|
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/lemon
|
|
-T${_lemonpardir}/lempar.c
|
|
-d.
|
|
${_in}
|
|
|