From 806e4e4088be9f03da78aba8eb8cdda23d7c9cb6 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 23 May 2021 10:38:32 +0100 Subject: nestedvm.cmake: fix accidental use of dynamic scope. In this platform's set_platform_puzzle_target_properties, I referred to ${EXENAME} twice, which is not one of the function parameters. It worked anyway, because CMake has dynamic scope, and that variable was defined - to the right value - within the local-variable scope of the calling function. But that wasn't at all what I meant to do! Renamed it to ${TARGET}, which is the actual parameter name we get passed. --- cmake/platforms/nestedvm.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/platforms/nestedvm.cmake b/cmake/platforms/nestedvm.cmake index e5de2ee..6862896 100644 --- a/cmake/platforms/nestedvm.cmake +++ b/cmake/platforms/nestedvm.cmake @@ -39,10 +39,10 @@ function(set_platform_puzzle_target_properties NAME TARGET) COMMAND ${Java_JAVA_EXECUTABLE} -cp ${NESTEDVM}/build:${NESTEDVM}/upstream/build/classgen/build org.ibex.nestedvm.Compiler -outformat class -d . - PuzzleEngine ${CMAKE_CURRENT_BINARY_DIR}/${EXENAME} + PuzzleEngine ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} DEPENDS ${build_subdir} - ${CMAKE_CURRENT_BINARY_DIR}/${EXENAME} + ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} WORKING_DIRECTORY ${build_subdir}) add_custom_target(${TARGET}-jar ALL -- cgit v1.1