mirror of
				https://github.com/threeal/cmake-action.git
				synced 2025-11-03 21:33:42 +00:00 
			
		
		
		
	add compiler flags inputs option
This commit is contained in:
		
							parent
							
								
									dd78821b58
								
							
						
					
					
						commit
						75b1d343ef
					
				
							
								
								
									
										12
									
								
								action.yml
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								action.yml
									
									
									
									
									
								
							@ -25,6 +25,12 @@ inputs:
 | 
				
			|||||||
  cxx-compiler:
 | 
					  cxx-compiler:
 | 
				
			||||||
    description: Preferred executable for compiling CXX language files
 | 
					    description: Preferred executable for compiling CXX language files
 | 
				
			||||||
    required: false
 | 
					    required: false
 | 
				
			||||||
 | 
					  c-flags:
 | 
				
			||||||
 | 
					    description: Additional flags passed when compiling C language files
 | 
				
			||||||
 | 
					    required: false
 | 
				
			||||||
 | 
					  cxx-flags:
 | 
				
			||||||
 | 
					    description: Additional flags passed when compiling C++ language files
 | 
				
			||||||
 | 
					    required: false
 | 
				
			||||||
  args:
 | 
					  args:
 | 
				
			||||||
    description: Additional arguments passed during the CMake configuration
 | 
					    description: Additional arguments passed during the CMake configuration
 | 
				
			||||||
    required: false
 | 
					    required: false
 | 
				
			||||||
@ -49,6 +55,12 @@ runs:
 | 
				
			|||||||
        if [ -n '${{ inputs.cxx-compiler }}' ]; then
 | 
					        if [ -n '${{ inputs.cxx-compiler }}' ]; then
 | 
				
			||||||
          ARGS="$ARGS -D CMAKE_CXX_COMPILER=${{ inputs.cxx-compiler }}"
 | 
					          ARGS="$ARGS -D CMAKE_CXX_COMPILER=${{ inputs.cxx-compiler }}"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
 | 
					        if [ -n '${{ inputs.c-flags }}' ]; then
 | 
				
			||||||
 | 
					          ARGS="$ARGS -D CMAKE_C_FLAGS=${{ inputs.c-flags }}"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					        if [ -n '${{ inputs.cxx-flags }}' ]; then
 | 
				
			||||||
 | 
					          ARGS="$ARGS -D CMAKE_CXX_FLAGS=${{ inputs.cxx-flags }}"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
        if [ -n '${{ inputs.args }}' ]; then
 | 
					        if [ -n '${{ inputs.args }}' ]; then
 | 
				
			||||||
          ARGS="$ARGS ${{ inputs.args }}"
 | 
					          ARGS="$ARGS ${{ inputs.args }}"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user