mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 10:11:34 +01:00 
			
		
		
		
	DOCTEST_CONFIG_USE_STD_HEADERS in MSVC++ (#30)
* replace <sstream> with <ostream> * Use provided by doctest macro instead of explicit include (#1) * dEfine `DOCTEST_CONFIG_USE_STD_HEADERS` globally
This commit is contained in:
		
							parent
							
								
									956c2f09b6
								
							
						
					
					
						commit
						cefd3fb80e
					
				
					 2 changed files with 1 additions and 5 deletions
				
			
		|  | @ -48,6 +48,7 @@ if (NOT TEST_INSTALLED_VERSION) | ||||||
|     target_compile_options(Greeter PUBLIC -Wall -pedantic -Wextra -Werror) |     target_compile_options(Greeter PUBLIC -Wall -pedantic -Wextra -Werror) | ||||||
|   elseif(MSVC) |   elseif(MSVC) | ||||||
|     target_compile_options(Greeter PUBLIC /W4 /WX) |     target_compile_options(Greeter PUBLIC /W4 /WX) | ||||||
|  |     target_compile_definitions(GreeterTests PUBLIC DOCTEST_CONFIG_USE_STD_HEADERS) | ||||||
|   endif() |   endif() | ||||||
| endif() | endif() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,11 +1,6 @@ | ||||||
| #include <doctest/doctest.h> | #include <doctest/doctest.h> | ||||||
| #include <greeter.h> | #include <greeter.h> | ||||||
| 
 | 
 | ||||||
| #if defined(_WIN32) || defined(WIN32) |  | ||||||
| // apparently this is required to compile in MSVC++
 |  | ||||||
| #  include <sstream> |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| TEST_CASE("Greeter") { | TEST_CASE("Greeter") { | ||||||
|   using namespace greeter; |   using namespace greeter; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue