https://github.com/Kitware/CMake
Revision 2509c7678feb2efab79a384fd0b0b35cee8d02b0 authored by Stephen Kelly on 13 January 2014, 12:04:03 UTC, committed by Stephen Kelly on 13 January 2014, 14:53:00 UTC
Commit 5bb53f6b (cmTarget: Deprecate COMPILE_DEFINITIONS_ properties
with a policy., 2013-12-30) deprecated the config-specific
COMPILE_DEFINITIONS_* properties in favour of using generator
expressions.

Set the directory property in UseQt4.cmake to match the
INTERFACE_COMPILE_DEFINITIONS on the Qt4::QtCore and Qt5::Core
IMPORTED targets.  Setting QT_NO_DEBUG is sufficient because qglobal.h
sets the corresponding QT_DEBUG definition if required.
1 parent 325ca1f
Raw File
Tip revision: 2509c7678feb2efab79a384fd0b0b35cee8d02b0 authored by Stephen Kelly on 13 January 2014, 12:04:03 UTC
Qt4: Use generator expression in COMPILE_DEFINITIONS (#14692)
Tip revision: 2509c76
cmTargetCompileDefinitionsCommand.h
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2013 Stephen Kelly <steveire@gmail.com>

  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.

  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/

#ifndef cmTargetCompileDefinitionsCommand_h
#define cmTargetCompileDefinitionsCommand_h

#include "cmTargetPropCommandBase.h"

class cmTargetCompileDefinitionsCommand : public cmTargetPropCommandBase
{
public:
  /**
   * This is a virtual constructor for the command.
   */
  virtual cmCommand* Clone()
    {
    return new cmTargetCompileDefinitionsCommand;
    }

  /**
   * This is called when the command is first encountered in
   * the CMakeLists.txt file.
   */
  virtual bool InitialPass(std::vector<std::string> const& args,
                           cmExecutionStatus &status);

  /**
   * The name of the command as specified in CMakeList.txt.
   */
  virtual const char* GetName() const { return "target_compile_definitions";}

  cmTypeMacro(cmTargetCompileDefinitionsCommand, cmTargetPropCommandBase);

private:
  virtual void HandleImportedTarget(const std::string &tgt);
  virtual void HandleMissingTarget(const std::string &name);

  virtual void HandleDirectContent(cmTarget *tgt,
                                   const std::vector<std::string> &content,
                                   bool prepend, bool system);
  virtual std::string Join(const std::vector<std::string> &content);
};

#endif
back to top