Skip to content

Commit

Permalink
Use CMAKE_COMMAND variable instead of plain cmake executable (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-park authored Apr 12, 2024
1 parent 31ecbcd commit 87a6147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ if(ZLIB_TEST AND NOT CMAKE_CROSSCOMPILING)
GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/test_${target}.cmake
CONTENT
"execute_process(
COMMAND cmake -E echo hello world
COMMAND \${CMAKE_COMMAND} -E echo hello world
COMMAND $<TARGET_FILE:${target}>
COMMAND $<TARGET_FILE:${target}> -d
COMMAND_ERROR_IS_FATAL ANY
)"
)
add_test(
NAME test_${target}
COMMAND cmake -P ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/test_${target}.cmake
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/test_${target}.cmake
COMMAND_EXPAND_LISTS
)
else()
Expand Down

0 comments on commit 87a6147

Please sign in to comment.