mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 10:11:34 +01:00 
			
		
		
		
	- Add CMake Workflow Presets
- Upgrade to gitup workflow action v3 - Prepare use of git-flow - Use CMake v3.21 variable PROJECT_IS_TOP_LEVEL - Use CMAKE_DEBUG_POSTFIX to prevent name clashes - Add more config files
This commit is contained in:
		
							parent
							
								
									fcbedfe9d8
								
							
						
					
					
						commit
						d81a42450c
					
				
					 22 changed files with 540 additions and 31 deletions
				
			
		|  | @ -1,7 +1,7 @@ | |||
| # this script adds all subprojects to a single build to allow IDEs understand the full project | ||||
| # structure. | ||||
| 
 | ||||
| cmake_minimum_required(VERSION 3.14...3.27) | ||||
| cmake_minimum_required(VERSION 3.21...3.27) | ||||
| 
 | ||||
| project(BuildAll LANGUAGES CXX) | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										103
									
								
								all/CMakePresets.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								all/CMakePresets.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,103 @@ | |||
| { | ||||
|   "version": 6, | ||||
|   "cmakeMinimumRequired": { | ||||
|     "major": 3, | ||||
|     "minor": 23, | ||||
|     "patch": 0 | ||||
|   }, | ||||
|   "configurePresets": [ | ||||
|     { | ||||
|       "name": "default", | ||||
|       "displayName": "Default develop all Config", | ||||
|       "description": "Default build using Ninja generator", | ||||
|       "generator": "Ninja", | ||||
|       "binaryDir": "${sourceParentDir}/build/all", | ||||
|       "installDir": "${sourceParentDir}/stagedir", | ||||
|       "cacheVariables": { | ||||
|         "CMAKE_PREFIX_PATH": { | ||||
|           "type": "path", | ||||
|           "value": "${sourceParentDir}/stagedir" | ||||
|         }, | ||||
|         "CMAKE_CXX_STANDARD": "20", | ||||
|         "CMAKE_BUILD_TYPE": "Debug", | ||||
|         "CMAKE_DEBUG_POSTFIX": "D", | ||||
|         "CPM_USE_LOCAL_PACKAGES": "NO", | ||||
|         "BUILD_SHARED_LIBS": "YES", | ||||
|         "ENABLE_TEST_COVERAGE": "YES" | ||||
|       }, | ||||
|       "environment": { | ||||
|         "CPM_USE_LOCAL_PACKAGES": "YES", | ||||
|         "PATH": "$env{HOME}/.local/bin${pathListSep}$penv{PATH}" | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       "name": "ninja-multi", | ||||
|       "inherits": "default", | ||||
|       "displayName": "Ninja Multi-Config", | ||||
|       "description": "Default build using Ninja Multi-Config generator", | ||||
|       "generator": "Ninja Multi-Config" | ||||
|     }, | ||||
|     { | ||||
|       "name": "windows-only", | ||||
|       "inherits": "default", | ||||
|       "displayName": "Windows-only configuration", | ||||
|       "description": "This build is only available on Windows", | ||||
|       "condition": { | ||||
|         "type": "equals", | ||||
|         "lhs": "${hostSystemName}", | ||||
|         "rhs": "Windows" | ||||
|       } | ||||
|     } | ||||
|   ], | ||||
|   "buildPresets": [ | ||||
|     { | ||||
|       "name": "default", | ||||
|       "configurePreset": "default" | ||||
|     }, | ||||
|     { | ||||
|       "name": "format", | ||||
|       "configurePreset": "default", | ||||
|       "targets": ["fix-clang-format", "check-cmake-format"] | ||||
|     } | ||||
|   ], | ||||
|   "testPresets": [ | ||||
|     { | ||||
|       "name": "default", | ||||
|       "configurePreset": "default", | ||||
|       "output": {"outputOnFailure": true}, | ||||
|       "execution": {"noTestsAction": "error", "stopOnFailure": true} | ||||
|     } | ||||
|   ], | ||||
|   "packagePresets": [ | ||||
|     { | ||||
|       "name": "default", | ||||
|       "configurePreset": "default", | ||||
|       "generators": [ | ||||
|         "TGZ" | ||||
|       ] | ||||
|     } | ||||
|   ], | ||||
|   "workflowPresets": [ | ||||
|     { | ||||
|       "name": "default", | ||||
|       "steps": [ | ||||
|         { | ||||
|           "type": "configure", | ||||
|           "name": "default" | ||||
|         }, | ||||
|         { | ||||
|           "type": "build", | ||||
|           "name": "default" | ||||
|         }, | ||||
|         { | ||||
|           "type": "build", | ||||
|           "name": "format" | ||||
|         }, | ||||
|         { | ||||
|           "type": "test", | ||||
|           "name": "default" | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   ] | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue