mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 02:01:33 +01:00 
			
		
		
		
	Merge branch 'master' into feature/modernize-cmake
This commit is contained in:
		
						commit
						d25ad76019
					
				
					 12 changed files with 128 additions and 84 deletions
				
			
		|  | @ -48,6 +48,7 @@ parse: | ||||||
|       kwargs: |       kwargs: | ||||||
|         NAME: 1 |         NAME: 1 | ||||||
|         VERSION: 1 |         VERSION: 1 | ||||||
|  |         NAMESPACE: 1 | ||||||
|         INCLUDE_DIR: 1 |         INCLUDE_DIR: 1 | ||||||
|         INCLUDE_DESTINATION: 1 |         INCLUDE_DESTINATION: 1 | ||||||
|         BINARY_DIR: 1 |         BINARY_DIR: 1 | ||||||
|  |  | ||||||
							
								
								
									
										14
									
								
								.github/workflows/documentation.yaml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/documentation.yaml
									
										
									
									
										vendored
									
									
								
							|  | @ -3,14 +3,22 @@ name: Documentation | ||||||
| on: | on: | ||||||
|   push: |   push: | ||||||
|     tags: |     tags: | ||||||
|       - '*' |       - "*" | ||||||
|  | 
 | ||||||
|  | env: | ||||||
|  |   CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
|     name: Build and publish documentation |     name: Build and publish documentation | ||||||
|     runs-on: macos-latest |     runs-on: macos-latest | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v1 |       - uses: actions/checkout@v2 | ||||||
|  | 
 | ||||||
|  |       - uses: actions/cache@v2 | ||||||
|  |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
| 
 | 
 | ||||||
|       - name: Install dependencies |       - name: Install dependencies | ||||||
|         run: | |         run: | | ||||||
|  | @ -19,7 +27,7 @@ jobs: | ||||||
| 
 | 
 | ||||||
|       - name: Build |       - name: Build | ||||||
|         run: | |         run: | | ||||||
|           cmake -Hdocumentation -Bbuild |           cmake -Sdocumentation -Bbuild | ||||||
|           cmake --build build --target GenerateDocs |           cmake --build build --target GenerateDocs | ||||||
| 
 | 
 | ||||||
|       - name: Publish |       - name: Publish | ||||||
|  |  | ||||||
							
								
								
									
										35
									
								
								.github/workflows/install.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										35
									
								
								.github/workflows/install.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -10,28 +10,33 @@ on: | ||||||
| 
 | 
 | ||||||
| env: | env: | ||||||
|   CTEST_OUTPUT_ON_FAILURE: 1 |   CTEST_OUTPUT_ON_FAILURE: 1 | ||||||
|  |   CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v1 |       - uses: actions/checkout@v2 | ||||||
| 
 | 
 | ||||||
|     - name: build and install library |       - uses: actions/cache@v2 | ||||||
|       run: | |         with: | ||||||
|         cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release |           path: "**/cpm_modules" | ||||||
|         sudo cmake --build build --target install |           key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
|         rm -rf build |  | ||||||
| 
 | 
 | ||||||
|     - name: configure |       - name: build and install library | ||||||
|       run: cmake -Htest -Bbuild -DTEST_INSTALLED_VERSION=1 |         run: | | ||||||
|  |           cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release | ||||||
|  |           sudo cmake --build build --target install | ||||||
|  |           rm -rf build | ||||||
| 
 | 
 | ||||||
|     - name: build |       - name: configure | ||||||
|       run: cmake --build build --config Debug -j4 |         run: cmake -Stest -Bbuild -DTEST_INSTALLED_VERSION=1 | ||||||
| 
 | 
 | ||||||
|     - name: test |       - name: build | ||||||
|       run: | |         run: cmake --build build --config Debug -j4 | ||||||
|         cd build | 
 | ||||||
|         ctest --build-config Debug |       - name: test | ||||||
|  |         run: | | ||||||
|  |           cd build | ||||||
|  |           ctest --build-config Debug | ||||||
|  |  | ||||||
							
								
								
									
										25
									
								
								.github/workflows/macos.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/macos.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -10,22 +10,27 @@ on: | ||||||
| 
 | 
 | ||||||
| env: | env: | ||||||
|   CTEST_OUTPUT_ON_FAILURE: 1 |   CTEST_OUTPUT_ON_FAILURE: 1 | ||||||
|  |   CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: macos-latest |     runs-on: macos-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v1 |       - uses: actions/checkout@v2 | ||||||
| 
 | 
 | ||||||
|     - name: configure |       - uses: actions/cache@v2 | ||||||
|       run: cmake -Htest -Bbuild |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
| 
 | 
 | ||||||
|     - name: build |       - name: configure | ||||||
|       run: cmake --build build --config Debug -j4 |         run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=Debug | ||||||
| 
 | 
 | ||||||
|     - name: test |       - name: build | ||||||
|       run: | |         run: cmake --build build -j4 | ||||||
|         cd build | 
 | ||||||
|         ctest --build-config Debug |       - name: test | ||||||
|  |         run: | | ||||||
|  |           cd build | ||||||
|  |           ctest --build-config Debug | ||||||
|  |  | ||||||
							
								
								
									
										23
									
								
								.github/workflows/standalone.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/standalone.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -8,19 +8,26 @@ on: | ||||||
|     branches: |     branches: | ||||||
|       - master |       - master | ||||||
| 
 | 
 | ||||||
|  | env: | ||||||
|  |   CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|  | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v1 |       - uses: actions/checkout@v2 | ||||||
| 
 | 
 | ||||||
|     - name: configure |       - uses: actions/cache@v2 | ||||||
|       run: cmake -Hstandalone -Bbuild |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
| 
 | 
 | ||||||
|     - name: build |       - name: configure | ||||||
|       run: cmake --build build -j4 |         run: cmake -Sstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug | ||||||
| 
 | 
 | ||||||
|     - name: run |       - name: build | ||||||
|       run: ./build/Greeter |         run: cmake --build build -j4 | ||||||
|  | 
 | ||||||
|  |       - name: run | ||||||
|  |         run: ./build/Greeter | ||||||
|  |  | ||||||
							
								
								
									
										27
									
								
								.github/workflows/style.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/style.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -8,21 +8,28 @@ on: | ||||||
|     branches: |     branches: | ||||||
|       - master |       - master | ||||||
| 
 | 
 | ||||||
|  | env: | ||||||
|  |   CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|  | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: macos-latest |     runs-on: macos-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v1 |       - uses: actions/checkout@v2 | ||||||
| 
 | 
 | ||||||
|     - name: Install format dependencies |       - uses: actions/cache@v2 | ||||||
|       run: | |         with: | ||||||
|         brew install clang-format |           path: "**/cpm_modules" | ||||||
|         pip3 install cmake_format==0.6.11 pyyaml |           key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
| 
 | 
 | ||||||
|     - name: configure |       - name: Install format dependencies | ||||||
|       run: cmake -Htest -Bbuild |         run: | | ||||||
|  |           brew install clang-format | ||||||
|  |           pip3 install cmake_format==0.6.11 pyyaml | ||||||
| 
 | 
 | ||||||
|     - name: check style |       - name: configure | ||||||
|       run: cmake --build build --target check-format |         run: cmake -Stest -Bbuild | ||||||
|  | 
 | ||||||
|  |       - name: check style | ||||||
|  |         run: cmake --build build --target check-format | ||||||
|  |  | ||||||
							
								
								
									
										29
									
								
								.github/workflows/ubuntu.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								.github/workflows/ubuntu.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -11,25 +11,30 @@ on: | ||||||
| env: | env: | ||||||
|   CTEST_OUTPUT_ON_FAILURE: 1 |   CTEST_OUTPUT_ON_FAILURE: 1 | ||||||
|   CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |   CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||||||
|  |   CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v1 |       - uses: actions/checkout@v2 | ||||||
| 
 | 
 | ||||||
|     - name: configure |       - uses: actions/cache@v2 | ||||||
|       run: cmake -Htest -Bbuild -DENABLE_TEST_COVERAGE=1 |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
| 
 | 
 | ||||||
|     - name: build |       - name: configure | ||||||
|       run: cmake --build build --config Debug -j4 |         run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug | ||||||
| 
 | 
 | ||||||
|     - name: test |       - name: build | ||||||
|       run: | |         run: cmake --build build -j4 | ||||||
|         cd build |  | ||||||
|         ctest --build-config Debug |  | ||||||
| 
 | 
 | ||||||
|     - name: collect code coverage |       - name: test | ||||||
|       run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" |         run: | | ||||||
|  |           cd build | ||||||
|  |           ctest --build-config Debug | ||||||
|  | 
 | ||||||
|  |       - name: collect code coverage | ||||||
|  |         run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" | ||||||
|  |  | ||||||
							
								
								
									
										25
									
								
								.github/workflows/windows.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/windows.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -10,22 +10,27 @@ on: | ||||||
| 
 | 
 | ||||||
| env: | env: | ||||||
|   CTEST_OUTPUT_ON_FAILURE: 1 |   CTEST_OUTPUT_ON_FAILURE: 1 | ||||||
|  |   CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: windows-latest |     runs-on: windows-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v1 |       - uses: actions/checkout@v2 | ||||||
| 
 | 
 | ||||||
|     - name: configure |       - uses: actions/cache@v2 | ||||||
|       run: cmake -Htest -Bbuild |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
| 
 | 
 | ||||||
|     - name: build |       - name: configure | ||||||
|       run: cmake --build build --config Debug -j4 |         run: cmake -Stest -Bbuild | ||||||
| 
 | 
 | ||||||
|     - name: test |       - name: build | ||||||
|       run: | |         run: cmake --build build --config Debug -j4 | ||||||
|         cd build | 
 | ||||||
|         ctest --build-config Debug |       - name: test | ||||||
|  |         run: | | ||||||
|  |           cd build | ||||||
|  |           ctest --build-config Debug | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -1,3 +1,4 @@ | ||||||
| /build* | /build* | ||||||
| /.vscode | /.vscode | ||||||
|  | /cpm_modules | ||||||
| .DS_Store | .DS_Store | ||||||
|  | @ -84,6 +84,7 @@ string(TOLOWER ${PROJECT_NAME}/version.h VERSION_HEADER_LOCATION) | ||||||
| packageProject( | packageProject( | ||||||
|   NAME ${PROJECT_NAME} |   NAME ${PROJECT_NAME} | ||||||
|   VERSION ${PROJECT_VERSION} |   VERSION ${PROJECT_VERSION} | ||||||
|  |   NAMESPACE ${PROJECT_NAME} | ||||||
|   BINARY_DIR ${PROJECT_BINARY_DIR} |   BINARY_DIR ${PROJECT_BINARY_DIR} | ||||||
|   INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include |   INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include | ||||||
|   INCLUDE_DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION} |   INCLUDE_DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION} | ||||||
|  |  | ||||||
|  | @ -11,9 +11,8 @@ CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) | ||||||
| CPMAddPackage( | CPMAddPackage( | ||||||
|   NAME MCSS |   NAME MCSS | ||||||
|   DOWNLOAD_ONLY YES |   DOWNLOAD_ONLY YES | ||||||
|   # TODO: patched version until https://github.com/mosra/m.css/pull/171 is resolved |   GITHUB_REPOSITORY mosra/m.css | ||||||
|   GITHUB_REPOSITORY TheLartians/m.css |   GIT_TAG 42d4a9a48f31f5df6e246c948403b54b50574a2a | ||||||
|   GIT_TAG 1bf162b96d5bfefc9967a80cef138f1270ffa415 |  | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| # ---- Doxygen variables ---- | # ---- Doxygen variables ---- | ||||||
|  |  | ||||||
|  | @ -27,4 +27,4 @@ add_executable(GreeterStandalone ${sources}) | ||||||
| 
 | 
 | ||||||
| set_target_properties(GreeterStandalone PROPERTIES CXX_STANDARD 17 OUTPUT_NAME "Greeter") | set_target_properties(GreeterStandalone PROPERTIES CXX_STANDARD 17 OUTPUT_NAME "Greeter") | ||||||
| 
 | 
 | ||||||
| target_link_libraries(GreeterStandalone Greeter cxxopts) | target_link_libraries(GreeterStandalone Greeter::Greeter cxxopts) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue