Skip to content

Commit

Permalink
- fixed cross-compilation support
Browse files Browse the repository at this point in the history
Lemon's post build command aborts configuration step after CMake version bump to 3.1.0 in ba618d3
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.
  • Loading branch information
alexey-lysiuk committed Mar 14, 2021
1 parent 5c84177 commit 1b3c67e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/lemon/CMakeLists.txt
Expand Up @@ -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 $<TARGET_FILE_DIR:lemon>
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c $<TARGET_FILE_DIR:lemon> )
# Lemon wants lempar.c in its directory
add_custom_command( TARGET lemon
POST_BUILD
COMMAND echo $<TARGET_FILE_DIR:lemon>
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c $<TARGET_FILE_DIR:lemon> )
endif()

0 comments on commit 1b3c67e

Please sign in to comment.