diff options
| author | Simon Tatham <anakin@pobox.com> | 2021-05-23 10:38:32 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2021-05-25 10:44:28 +0100 |
| commit | 806e4e4088be9f03da78aba8eb8cdda23d7c9cb6 (patch) | |
| tree | 3678f047bba879af63b801c21263e3d8e67b11fd | |
| parent | f729f51e475ff98d0caf529f0723ef810b1c88ef (diff) | |
| download | puzzles-806e4e4088be9f03da78aba8eb8cdda23d7c9cb6.zip puzzles-806e4e4088be9f03da78aba8eb8cdda23d7c9cb6.tar.gz puzzles-806e4e4088be9f03da78aba8eb8cdda23d7c9cb6.tar.bz2 puzzles-806e4e4088be9f03da78aba8eb8cdda23d7c9cb6.tar.xz | |
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.
| -rw-r--r-- | cmake/platforms/nestedvm.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
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 |