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
cmMarkAsAdvancedCommand.cxx
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium

  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.
============================================================================*/
#include "cmMarkAsAdvancedCommand.h"

// cmMarkAsAdvancedCommand
bool cmMarkAsAdvancedCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
  if(args.size() < 1 )
    {
    this->SetError("called with incorrect number of arguments");
    return false;
    }

  unsigned int i =0;
  const char* value = "1";
  bool overwrite = false;
  if(args[0] == "CLEAR" || args[0] == "FORCE")
    {
    overwrite = true;
    if(args[0] == "CLEAR")
      {
      value = "0";
      }
    i = 1;
    }
  for(; i < args.size(); ++i)
    {
    std::string variable = args[i];
    cmCacheManager* manager = this->Makefile->GetCacheManager();
    cmCacheManager::CacheIterator it =
      manager->GetCacheIterator(variable.c_str());
    if ( it.IsAtEnd() )
      {
      this->Makefile->GetCacheManager()
        ->AddCacheEntry(variable.c_str(), 0, 0,
          cmCacheManager::UNINITIALIZED);
      overwrite = true;
      }
    it.Find(variable.c_str());
    if ( it.IsAtEnd() )
      {
      cmSystemTools::Error("This should never happen...");
      return false;
      }
    if ( !it.PropertyExists("ADVANCED") || overwrite )
      {
      it.SetProperty("ADVANCED", value);
      }
    }
  return true;
}

back to top