diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-05-24 15:27:51 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-05-24 15:27:51 (GMT) |
commit | 7d7aba292c09170fc9f145d68644e1ff6d158eec (patch) | |
tree | 6b50a27fb13d788c4b977ea199c6311ceea04854 /Source/cmTryCompileCommand.h | |
parent | 8fb8a44f5f1de4c659cc4b4cfe060e91b1e48b9c (diff) | |
download | CMake-7d7aba292c09170fc9f145d68644e1ff6d158eec.zip CMake-7d7aba292c09170fc9f145d68644e1ff6d158eec.tar.gz CMake-7d7aba292c09170fc9f145d68644e1ff6d158eec.tar.bz2 |
ENH: add two simple tests for TRY_RUN()
STYLE: create a new base class cmCoreTryCompile, from which
cmTryCompileCommand and cmTryRunCommand are derived, so there are no public
static functions with lots of arguments anymore
Alex
Diffstat (limited to 'Source/cmTryCompileCommand.h')
-rw-r--r-- | Source/cmTryCompileCommand.h | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index 25fbea5..38230d4 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -17,14 +17,14 @@ #ifndef cmTryCompileCommand_h #define cmTryCompileCommand_h -#include "cmCommand.h" +#include "cmCoreTryCompile.h" /** \class cmTryCompileCommand * \brief Specifies where to install some files * * cmTryCompileCommand is used to test if soucre code can be compiled */ -class cmTryCompileCommand : public cmCommand +class cmTryCompileCommand : public cmCoreTryCompile { public: /** @@ -55,32 +55,6 @@ public: } /** - * This is the core code for try compile. It is here so that other - * commands, such as TryRun can access the same logic without - * duplication. - */ - static int CoreTryCompileCode(cmMakefile *mf, - std::vector<std::string> const& argv, - bool clean, - const char* cmakeCommand, - std::string& outputFile); - - /** - * This deletes all the files created by TRY_COMPILE or TRY_RUN - * code. This way we do not have to rely on the timing and - * dependencies of makefiles. - */ - static void CleanupFiles(const char* binDir); - - /** - * This tries to find the (executable) file created by TRY_COMPILE or - * TRY_RUN. If nothing is found an empty string will be returned. - */ - static const char* GetOutputFile(cmMakefile* mf, const char* binaryDirectory, - const char* targetName, const char* cmakeCommand, - std::string& errorMessage); - - /** * More documentation. */ virtual const char* GetFullDocumentation() { @@ -125,7 +99,7 @@ public: ""; } - cmTypeMacro(cmTryCompileCommand, cmCommand); + cmTypeMacro(cmTryCompileCommand, cmCoreTryCompile); }; |