use doctest_discover_tests to find individual tests (#7)
This commit is contained in:
		
							parent
							
								
									adf2801be6
								
							
						
					
					
						commit
						4c756a78f3
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		|  | @ -16,8 +16,7 @@ include(../cmake/CPM.cmake) | ||||||
| CPMAddPackage( | CPMAddPackage( | ||||||
|   NAME doctest |   NAME doctest | ||||||
|   GITHUB_REPOSITORY onqtam/doctest |   GITHUB_REPOSITORY onqtam/doctest | ||||||
|   VERSION 2.3.2 |   GIT_TAG 2.3.7 | ||||||
|   GIT_TAG 2.3.2 |  | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| if (TEST_INSTALLED_VERSION) | if (TEST_INSTALLED_VERSION) | ||||||
|  | @ -50,7 +49,13 @@ endif() | ||||||
| # ---- Add GreeterTests ---- | # ---- Add GreeterTests ---- | ||||||
| 
 | 
 | ||||||
| ENABLE_TESTING()  | ENABLE_TESTING()  | ||||||
| ADD_TEST(GreeterTests GreeterTests) | 
 | ||||||
|  | # use doctest_discover_tests for better CTest support | ||||||
|  | include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) | ||||||
|  | doctest_discover_tests(GreeterTests) | ||||||
|  | 
 | ||||||
|  | # Note: for general testing frameworks use: | ||||||
|  | # ADD_TEST(GreeterTests GreeterTests) | ||||||
| 
 | 
 | ||||||
| # ---- code coverage ---- | # ---- code coverage ---- | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue