mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
detect PCH support ( not doing anything more than detection yet )
svn path=/branches/xmlbuildsystem/; revision=13878
This commit is contained in:
@@ -26,6 +26,8 @@ MingwBackend::MingwBackend ( Project& project )
|
||||
void
|
||||
MingwBackend::Process ()
|
||||
{
|
||||
DetectPCHSupport();
|
||||
|
||||
CreateMakefile ();
|
||||
GenerateHeader ();
|
||||
GenerateGlobalVariables ();
|
||||
@@ -323,3 +325,24 @@ FixupTargetFilename ( const string& targetFilename )
|
||||
{
|
||||
return string("$(ROS_INTERMEDIATE)") + NormalizeFilename ( targetFilename );
|
||||
}
|
||||
|
||||
void
|
||||
MingwBackend::DetectPCHSupport()
|
||||
{
|
||||
string path = "tools" SSEP "rbuild" SSEP "backend" SSEP "mingw" SSEP "pch_detection.h";
|
||||
system ( ssprintf("gcc -c %s", path.c_str()).c_str() );
|
||||
path += ".gch";
|
||||
{
|
||||
FILE* f = fopen ( path.c_str(), "rb" );
|
||||
if ( f )
|
||||
{
|
||||
use_pch = true;
|
||||
fclose(f);
|
||||
unlink ( path.c_str() );
|
||||
}
|
||||
else
|
||||
use_pch = false;
|
||||
}
|
||||
// TODO FIXME - eventually check for ROS_USE_PCH env var and
|
||||
// allow that to override use_pch if true
|
||||
}
|
||||
|
||||
@@ -32,7 +32,10 @@ private:
|
||||
void GenerateInitTarget () const;
|
||||
void GenerateXmlBuildFilesMacro() const;
|
||||
void CheckAutomaticDependencies ();
|
||||
void DetectPCHSupport();
|
||||
|
||||
FILE* fMakefile;
|
||||
bool use_pch;
|
||||
};
|
||||
|
||||
std::string FixupTargetFilename ( const std::string& targetFilename );
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
// this file is intentionally left empty
|
||||
Reference in New Issue
Block a user