cmTry{Compile,Run}Command: Port away from legacy cmCommand

Convert the command entry points to free functions.
This commit is contained in:
Brad King
2022-06-15 15:07:06 -04:00
parent 7ba3a3290f
commit e73c8eaff2
6 changed files with 89 additions and 116 deletions
+9 -3
View File
@@ -7,19 +7,24 @@
#include <string>
#include <vector>
#include "cmCommand.h"
#include "cmStateTypes.h"
class cmMakefile;
/** \class cmCoreTryCompile
* \brief Base class for cmTryCompileCommand and cmTryRunCommand
*
* cmCoreTryCompile implements the functionality to build a program.
* It is the base class for cmTryCompileCommand and cmTryRunCommand.
*/
class cmCoreTryCompile : public cmCommand
class cmCoreTryCompile
{
public:
protected:
cmCoreTryCompile(cmMakefile* mf)
: Makefile(mf)
{
}
/**
* This is the core code for try compile. It is here so that other
* commands, such as TryRun can access the same logic without
@@ -46,4 +51,5 @@ protected:
std::string OutputFile;
std::string FindErrorMessage;
bool SrcFileSignature = false;
cmMakefile* Makefile;
};