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.
This commit is contained in:
Simon Tatham
2021-05-23 10:38:32 +01:00
parent f729f51e47
commit 806e4e4088

View File

@ -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