1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #include "cmTryCompileCommand.h"
14 // cmTryCompileCommand
15 bool cmTryCompileCommand
16 ::InitialPass(std::vector<std::string> const& argv, cmExecutionStatus &)
23 if(this->Makefile->GetCMakeInstance()->GetWorkingMode() ==
24 cmake::FIND_PACKAGE_MODE)
26 this->Makefile->IssueMessage(cmake::FATAL_ERROR,
27 "The TRY_COMPILE() command is not supported in --find-package mode.");
31 this->TryCompileCode(argv);
33 // if They specified clean then we clean up what we can
34 if (this->SrcFileSignature)
36 if(!this->Makefile->GetCMakeInstance()->GetDebugTryCompile())
38 this->CleanupFiles(this->BinaryDirectory.c_str());