Skip to content

Commit

Permalink
review updates
Browse files Browse the repository at this point in the history
Co-authored-by: Marcel Koch <[email protected]>
  • Loading branch information
upsj and MarcelKoch committed Nov 27, 2023
1 parent a0d2f8a commit 78454bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake/rename.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ macro(gko_rename_cache deprecated actual type doc_string)
message("actual ${actual} and deprecated ${deprecated}")
if("${${actual}}" STREQUAL "${${deprecated}}")
# They are the same, so only throw warning
message(WARNING "${deprecated} was deprecated, please only use ${actual} instead.")
message(WARNING "${deprecated} was deprecated, please only use ${actual} instead. We removed the old variable.")
unset(${deprecated} CACHE)
else()
# They are different
message(FATAL_ERROR "Both ${deprecated} and ${actual} were specified differently, please only use ${actual} instead.")
endif()
else()
# Only set `deprecated`, move it to `actual`.
message(WARNING "${deprecated} was deprecated, please use ${actual} instead. "
"We copy ${${deprecated}} to ${actual} and remove the old variable")
"We copied ${${deprecated}} to ${actual} and removed the old variable.")
set(${actual} ${${deprecated}} CACHE ${type} "${doc_string}")
unset(${${deprecated}} CACHE)
unset(${deprecated} CACHE)
endif()
endif()
endmacro()

0 comments on commit 78454bb

Please sign in to comment.