~ubuntu-branches/ubuntu/lucid/cmake/lucid

« back to all changes in this revision

Viewing changes to Source/cmComputeTargetDepends.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2009-12-16 11:11:54 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091216111154-6accvv6yq86h2hkc
Tags: 2.8.0-5ubuntu1
* Merge from debian testing (LP: #497349). Remaining changes:
  - Keep the Replaces: on cmake-data to cover the Kubuntu version from
    Jaunty in case someone decides to do an (unsupported) Jaunty->Lucid
    upgrade.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*=========================================================================
2
 
 
3
 
  Program:   CMake - Cross-Platform Makefile Generator
4
 
  Module:    $RCSfile: cmComputeTargetDepends.cxx,v $
5
 
  Language:  C++
6
 
  Date:      $Date: 2008-09-03 13:43:17 $
7
 
  Version:   $Revision: 1.2.2.1 $
8
 
 
9
 
  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
10
 
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
11
 
 
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.
15
 
 
16
 
=========================================================================*/
 
1
/*============================================================================
 
2
  CMake - Cross Platform Makefile Generator
 
3
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
 
4
 
 
5
  Distributed under the OSI-approved BSD License (the "License");
 
6
  see accompanying file Copyright.txt for details.
 
7
 
 
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
============================================================================*/
17
12
#include "cmComputeTargetDepends.h"
18
13
 
19
14
#include "cmComputeComponentGraph.h"
103
98
  this->GlobalGenerator = gg;
104
99
  cmake* cm = this->GlobalGenerator->GetCMakeInstance();
105
100
  this->DebugMode = cm->GetPropertyAsBool("GLOBAL_DEPENDS_DEBUG_MODE");
 
101
  this->NoCycles = cm->GetPropertyAsBool("GLOBAL_DEPENDS_NO_CYCLES");
106
102
}
107
103
 
108
104
//----------------------------------------------------------------------------
344
340
      continue;
345
341
      }
346
342
 
 
343
    // Immediately complain if no cycles are allowed at all.
 
344
    if(this->NoCycles)
 
345
      {
 
346
      this->ComplainAboutBadComponent(ccg, c);
 
347
      return false;
 
348
      }
 
349
 
347
350
    // Make sure the component is all STATIC_LIBRARY targets.
348
351
    for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
349
352
      {
391
394
        }
392
395
      }
393
396
    }
394
 
  e << "At least one of these targets is not a STATIC_LIBRARY.  "
395
 
    << "Cyclic dependencies are allowed only among static libraries.";
 
397
  if(this->NoCycles)
 
398
    {
 
399
    e << "The GLOBAL_DEPENDS_NO_CYCLES global property is enabled, so "
 
400
      << "cyclic dependencies are not allowed even among static libraries.";
 
401
    }
 
402
  else
 
403
    {
 
404
    e << "At least one of these targets is not a STATIC_LIBRARY.  "
 
405
      << "Cyclic dependencies are allowed only among static libraries.";
 
406
    }
396
407
  cmSystemTools::Error(e.str().c_str());
397
408
}
398
409