Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loki-transform: Remove custom entry point options #465

Merged
merged 7 commits into from
Jan 17, 2025
Prev Previous commit
Next Next commit
CMake: Remove loki_transform_convert CMake macro
  • Loading branch information
mlange05 committed Jan 15, 2025
commit e7404c28858dde798200b288f3e920e622135e0b
56 changes: 0 additions & 56 deletions cmake/loki_transform.cmake
Original file line number Diff line number Diff line change
@@ -383,62 +383,6 @@ function( loki_transform_target )

endfunction()

##############################################################################
# .rst:
#
# loki_transform_convert
# ======================
#
# Deprecated interface to loki-transform.py. Use loki_transform( COMMAND convert ) instead.::
#
##############################################################################

function( loki_transform_convert )

ecbuild_warn( "\
loki_transform_convert() is deprecated and will be removed in a future version!
Please use
loki_transform( COMMAND convert [...] )
or
loki_transform_target( COMMAND convert [...] ).
"
)

set( options
CPP DATA_OFFLOAD REMOVE_OPENMP ASSUME_DEVICEPTR GLOBAL_VAR_OFFLOAD
TRIM_VECTOR_SECTIONS REMOVE_DERIVED_ARGS INLINE_MEMBERS
RESOLVE_SEQUENCE_ASSOCIATION DERIVE_ARGUMENT_ARRAY_SHAPE
)
set( oneValueArgs
MODE DIRECTIVE FRONTEND CONFIG PATH OUTPATH
)
set( multiValueArgs
OUTPUT DEPENDS INCLUDES HEADERS DEFINITIONS OMNI_INCLUDE XMOD
)

cmake_parse_arguments( _PAR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

if( _PAR_UNPARSED_ARGUMENTS )
ecbuild_critical( "Unknown keywords given to loki_transform_convert(): \"${_PAR_UNPARSED_ARGUMENTS}\"")
endif()

#
# Rewrite old argument names
#

# PATH -> SOURCES
list( TRANSFORM ARGV REPLACE "^PATH$" "SOURCES" )

# OUTPATH -> BUILDDIR
list( TRANSFORM ARGV REPLACE "^OUTPATH$" "BUILDDIR" )

#
# Call loki_transform
#
loki_transform( COMMAND "convert" ${ARGV} )

endfunction()

##############################################################################
# .rst:
#