mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 04:07:10 +01:00 
			
		
		
		
	Let users of amalgamated distribution override the default main
Closes #2324
This commit is contained in:
		| @@ -18,6 +18,9 @@ namespace Catch { | ||||
|     CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION | ||||
| } | ||||
|  | ||||
| // Allow users of amalgamated .cpp file to remove our main and provide their own. | ||||
| #if !defined(CATCH_AMALGAMATED_CUSTOM_MAIN) | ||||
|  | ||||
| #if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) | ||||
| // Standard C/C++ Win32 Unicode wmain entry point | ||||
| extern "C" int __cdecl wmain (int argc, wchar_t * argv[], wchar_t * []) { | ||||
| @@ -32,3 +35,5 @@ int main (int argc, char * argv[]) { | ||||
|  | ||||
|     return Catch::Session().run( argc, argv ); | ||||
| } | ||||
|  | ||||
| #endif // !defined(CATCH_AMALGAMATED_CUSTOM_MAIN | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský