mirror of
				https://github.com/threeal/cmake-action.git
				synced 2025-11-03 21:33:42 +00:00 
			
		
		
		
	add args input option
				
					
				
			This commit is contained in:
		
							parent
							
								
									62dfe4c021
								
							
						
					
					
						commit
						835c31b955
					
				@ -13,6 +13,9 @@ inputs:
 | 
				
			|||||||
    description: The build directory of CMake project
 | 
					    description: The build directory of CMake project
 | 
				
			||||||
    required: false
 | 
					    required: false
 | 
				
			||||||
    default: build
 | 
					    default: build
 | 
				
			||||||
 | 
					  args:
 | 
				
			||||||
 | 
					    description: Other arguments passed during CMake configuration
 | 
				
			||||||
 | 
					    required: false
 | 
				
			||||||
runs:
 | 
					runs:
 | 
				
			||||||
  using: composite
 | 
					  using: composite
 | 
				
			||||||
  steps:
 | 
					  steps:
 | 
				
			||||||
@ -21,6 +24,9 @@ runs:
 | 
				
			|||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        CONFIGURE_ARGS="${{ inputs.source-dir }} -B ${{ inputs.build-dir }}"
 | 
					        CONFIGURE_ARGS="${{ inputs.source-dir }} -B ${{ inputs.build-dir }}"
 | 
				
			||||||
        BUILD_ARGS="--build ${{ inputs.build-dir }}"
 | 
					        BUILD_ARGS="--build ${{ inputs.build-dir }}"
 | 
				
			||||||
 | 
					        if [ -n '${{ inputs.args }}' ]; then
 | 
				
			||||||
 | 
					          CMAKE_CONFIGURE_ARGS="$CMAKE_CONFIGURE_ARGS ${{ inputs.args }}"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
        echo "CMAKE_CONFIGURE_ARGS=$CONFIGURE_ARGS" >> $GITHUB_ENV
 | 
					        echo "CMAKE_CONFIGURE_ARGS=$CONFIGURE_ARGS" >> $GITHUB_ENV
 | 
				
			||||||
        echo "CMAKE_BUILD_ARGS=$BUILD_ARGS" >> $GITHUB_ENV
 | 
					        echo "CMAKE_BUILD_ARGS=$BUILD_ARGS" >> $GITHUB_ENV
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user