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( | ||||
|   NAME doctest | ||||
|   GITHUB_REPOSITORY onqtam/doctest | ||||
|   VERSION 2.3.2 | ||||
|   GIT_TAG 2.3.2 | ||||
|   GIT_TAG 2.3.7 | ||||
| ) | ||||
| 
 | ||||
| if (TEST_INSTALLED_VERSION) | ||||
|  | @ -50,7 +49,13 @@ endif() | |||
| # ---- Add GreeterTests ---- | ||||
| 
 | ||||
| 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 ---- | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue