mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-17 03:02:24 +01:00
Make buildable with default main() function for Qt5 under Windows
This commit is contained in:
parent
84d1c080d6
commit
6cf8f3af1c
@ -8,17 +8,29 @@
|
|||||||
#ifndef TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED
|
#ifndef TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED
|
||||||
#define TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED
|
#define TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "catch_platform.h"
|
||||||
|
|
||||||
|
#ifndef CATCH_PLATFORM_WINDOWS
|
||||||
|
#ifndef CATCH_CONFIG_MAIN_ARGV_TYPE
|
||||||
|
#define CATCH_CONFIG_MAIN_ARGV_TYPE char * const
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifndef CATCH_CONFIG_MAIN_ARGV_TYPE
|
||||||
|
#define CATCH_CONFIG_MAIN_ARGV_TYPE char *
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __OBJC__
|
#ifndef __OBJC__
|
||||||
|
|
||||||
// Standard C/C++ main entry point
|
// Standard C/C++ main entry point
|
||||||
int main (int argc, char * const argv[]) {
|
int main (int argc, CATCH_CONFIG_MAIN_ARGV_TYPE argv[]) {
|
||||||
return Catch::Session().run( argc, argv );
|
return Catch::Session().run( argc, argv );
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // __OBJC__
|
#else // __OBJC__
|
||||||
|
|
||||||
// Objective-C entry point
|
// Objective-C entry point
|
||||||
int main (int argc, char * const argv[]) {
|
int main (int argc, CATCH_CONFIG_MAIN_ARGV_TYPE argv[]) {
|
||||||
#if !CATCH_ARC_ENABLED
|
#if !CATCH_ARC_ENABLED
|
||||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user