ENH: check in almost building VMS stuff with VMSBuild directory since the bootstrap...
[cmake.git] / Source / cmCoreTryCompile.h
blob1271821852b365b1552a4deff07f93c307fb1709
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCoreTryCompile.h,v $
5 Language: C++
6 Date: $Date: 2007-05-24 15:27:51 $
7 Version: $Revision: 1.1 $
9 Copyright (c) 2007 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmCoreTryCompile_h
18 #define cmCoreTryCompile_h
20 #include "cmCommand.h"
22 /** \class cmCoreTryCompile
23 * \brief Base class for cmTryCompileCommand and cmTryRunCommand
25 * cmCoreTryCompile implements the functionality to build a program.
26 * It is the base class for cmTryCompileCommand and cmTryRunCommand.
28 class cmCoreTryCompile : public cmCommand
30 public:
32 protected:
33 /**
34 * This is the core code for try compile. It is here so that other
35 * commands, such as TryRun can access the same logic without
36 * duplication.
38 int TryCompileCode(std::vector<std::string> const& argv);
40 /**
41 * This deletes all the files created by TryCompileCode.
42 * This way we do not have to rely on the timing and
43 * dependencies of makefiles.
45 void CleanupFiles(const char* binDir);
47 /**
48 * This tries to find the (executable) file created by
49 TryCompileCode. The result is stored in OutputFile. If nothing is found,
50 the error message is stored in FindErrorMessage.
52 void FindOutputFile(const char* targetName);
55 cmTypeMacro(cmCoreTryCompile, cmCommand);
57 std::string BinaryDirectory;
58 std::string OutputFile;
59 std::string FindErrorMessage;
60 bool SrcFileSignature;
65 #endif