add cxx-compiler input option

This commit is contained in:
Alfi Maulana 2023-01-08 12:18:05 +07:00
parent 2a9ea8f96b
commit 0b67ed5990
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4

View File

@ -16,6 +16,9 @@ inputs:
c-compiler:
description: The preferred executable for compiling C language files
required: false
cxx-compiler:
description: The preferred executable for compiling CXX language files
required: false
args:
description: Additional arguments passed during CMake configuration
required: false
@ -30,6 +33,9 @@ runs:
if [ -n '${{ inputs.c-compiler }}' ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS -D CMAKE_C_COMPILER=${{ inputs.c-compiler }}"
fi
if [ -n '${{ inputs.cxx-compiler }}' ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS -D CMAKE_CXX_COMPILER=${{ inputs.cxx-compiler }}"
fi
if [ -n '${{ inputs.args }}' ]; then
CONFIGURE_ARGS="$CONFIGURE_ARGS ${{ inputs.args }}"
fi