Skip to content

Commit

Permalink
Use check cache variables before dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
dudoslav committed Oct 4, 2024
1 parent 4859434 commit a3cd2fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
endif()
else()
set(CPACK_SYSTEM_NAME "Linux")
if ($CACHE{CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
if (DEFINED CACHE{CMAKE_SYSTEM_PROCESSOR} AND $CACHE{CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
set(CPACK_SYSTEM_PROCESSOR "arm64")
else()
set(CPACK_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
Expand Down

0 comments on commit a3cd2fe

Please sign in to comment.