From 1b3c67ee1fa73577fd497b08ddaf65c45d84900e Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 14 Mar 2021 15:01:51 +0200 Subject: [PATCH] - fixed cross-compilation support Lemon's post build command aborts configuration step after CMake version bump to 3.1.0 in ba618d308c859f423cf67c8cb368e4b65c15c7bd When CMake version was 2.8.7 the same command produced a warning CMake Error at tools/lemon/CMakeLists.txt:11 (add_custom_command): TARGET 'lemon' is IMPORTED and does not build here. --- tools/lemon/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/lemon/CMakeLists.txt b/tools/lemon/CMakeLists.txt index dd1d41bf1..71418eda5 100644 --- a/tools/lemon/CMakeLists.txt +++ b/tools/lemon/CMakeLists.txt @@ -5,10 +5,10 @@ if( NOT CMAKE_CROSSCOMPILING ) add_executable( lemon lemon.c ) set( CROSS_EXPORTS ${CROSS_EXPORTS} lemon PARENT_SCOPE ) -endif() -# Lemon wants lempar.c in its directory -add_custom_command( TARGET lemon - POST_BUILD - COMMAND echo $ - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c $ ) + # Lemon wants lempar.c in its directory + add_custom_command( TARGET lemon + POST_BUILD + COMMAND echo $ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c $ ) +endif()