ref: 806e4e4088be9f03da78aba8eb8cdda23d7c9cb6
parent: f729f51e475ff98d0caf529f0723ef810b1c88ef
author: Simon Tatham <anakin@pobox.com>
date: Sun May 23 06:38:32 EDT 2021
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.
--- a/cmake/platforms/nestedvm.cmake
+++ b/cmake/platforms/nestedvm.cmake
@@ -39,10 +39,10 @@
COMMAND ${Java_JAVA_EXECUTABLE} -cp ${NESTEDVM}/build:${NESTEDVM}/upstream/build/classgen/buildorg.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--
⑨