~ubuntu-branches/ubuntu/trusty/cmake3/trusty-updates

« back to all changes in this revision

Viewing changes to Source/cmTargetLinkLibrariesCommand.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2017-02-23 17:55:24 UTC
  • Revision ID: package-import@ubuntu.com-20170223175524-5nh7s4pu97fsa0t7
Tags: upstream-3.5.1
ImportĀ upstreamĀ versionĀ 3.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
============================================================================*/
 
12
#ifndef cmTargetLinkLibrariesCommand_h
 
13
#define cmTargetLinkLibrariesCommand_h
 
14
 
 
15
#include "cmCommand.h"
 
16
 
 
17
/** \class cmTargetLinkLibrariesCommand
 
18
 * \brief Specify a list of libraries to link into executables.
 
19
 *
 
20
 * cmTargetLinkLibrariesCommand is used to specify a list of libraries to link
 
21
 * into executable(s) or shared objects. The names of the libraries
 
22
 * should be those defined by the LIBRARY(library) command(s).
 
23
 */
 
24
class cmTargetLinkLibrariesCommand : public cmCommand
 
25
{
 
26
public:
 
27
  /**
 
28
   * This is a virtual constructor for the command.
 
29
   */
 
30
  virtual cmCommand* Clone()
 
31
    {
 
32
    return new cmTargetLinkLibrariesCommand;
 
33
    }
 
34
 
 
35
  /**
 
36
   * This is called when the command is first encountered in
 
37
   * the CMakeLists.txt file.
 
38
   */
 
39
  virtual bool InitialPass(std::vector<std::string> const& args,
 
40
                           cmExecutionStatus &status);
 
41
 
 
42
  /**
 
43
   * The name of the command as specified in CMakeList.txt.
 
44
   */
 
45
  virtual std::string GetName() const { return "target_link_libraries";}
 
46
 
 
47
  cmTypeMacro(cmTargetLinkLibrariesCommand, cmCommand);
 
48
private:
 
49
  void LinkLibraryTypeSpecifierWarning(int left, int right);
 
50
  static const char* LinkLibraryTypeNames[3];
 
51
 
 
52
  cmTarget* Target;
 
53
  enum ProcessingState {
 
54
    ProcessingLinkLibraries,
 
55
    ProcessingPlainLinkInterface,
 
56
    ProcessingKeywordLinkInterface,
 
57
    ProcessingPlainPublicInterface,
 
58
    ProcessingKeywordPublicInterface,
 
59
    ProcessingPlainPrivateInterface,
 
60
    ProcessingKeywordPrivateInterface
 
61
  };
 
62
 
 
63
  ProcessingState CurrentProcessingState;
 
64
 
 
65
  bool HandleLibrary(const std::string& lib, cmTargetLinkLibraryType llt);
 
66
};
 
67
 
 
68
 
 
69
 
 
70
#endif