cmTryCompileCommand.cxx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmTryCompileCommand.h"
  11. // cmTryCompileCommand
  12. bool cmTryCompileCommand
  13. ::InitialPass(std::vector<std::string> const& argv, cmExecutionStatus &)
  14. {
  15. if(argv.size() < 3)
  16. {
  17. return false;
  18. }
  19. this->TryCompileCode(argv);
  20. // if They specified clean then we clean up what we can
  21. if (this->SrcFileSignature)
  22. {
  23. if(!this->Makefile->GetCMakeInstance()->GetDebugTryCompile())
  24. {
  25. this->CleanupFiles(this->BinaryDirectory.c_str());
  26. }
  27. }
  28. return true;
  29. }