properly name cached variables

This commit is contained in:
Thomas Lindner 2022-10-19 18:37:20 +02:00
parent c4dcd7203d
commit a0c27643f2
2 changed files with 8 additions and 6 deletions

View file

@ -1,9 +1,10 @@
find_program(_CLANG_FORMAT clang-format)
find_program(clang-format_EXECUTABLE clang-format)
mark_as_advanced(clang-format_EXECUTABLE)
if(_CLANG_FORMAT)
if(clang-format_EXECUTABLE)
add_executable(clang-format IMPORTED)
set_target_properties(clang-format PROPERTIES
IMPORTED_LOCATION ${_CLANG_FORMAT})
IMPORTED_LOCATION ${clang-format_EXECUTABLE})
endif()
unset(_CLANG_FORMAT)

View file

@ -1,9 +1,10 @@
find_program(_MAKEHEADERS makeheaders)
find_program(makeheaders_EXECUTABLE makeheaders)
mark_as_advanced(makeheaders_EXECUTABLE)
if(_MAKEHEADERS)
if(makeheaders_EXECUTABLE)
add_executable(makeheaders IMPORTED)
set_target_properties(makeheaders PROPERTIES
IMPORTED_LOCATION ${_MAKEHEADERS})
IMPORTED_LOCATION ${makeheaders_EXECUTABLE})
else()
add_executable(makeheaders ${CMAKE_CURRENT_LIST_DIR}/makeheaders.c)
endif()