Commit 4a9f16ec authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: move changes from main tree

parent a002ea78
......@@ -7,7 +7,7 @@ SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 8)
# for an actual release this should not be defined
SET(CMake_VERSION_RC 5)
SET(CMake_VERSION_RC 6)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
......
Changes in CMake 2.4.8 RC 6
* Fix for bug 6006 INSTALL DIRECTORY signature problem
* Update FindQt4 from CVS Head for many bug fixes
* Fix bug 5638 CMAKE_INSTALL_PREFIX not working on SunOS with CC
* Fix bug 6117 FindPkgConfig can run twice now
* Fix bug 6124 touch.exe was required for fortran
Changes in CMake 2.4.8 RC 5
* Fix bug 6106 FindPerlLibs.cmake missing escaped $
* Allow NODEFAULTLIBS to have more than one value
* Allow NODEFAULTLIBS to have more than one value bug 5455
* Suppress regeneration of makefiles during try compile avoid infinite
loop in trycompile with some vs 2005 builds.
* Rest of Fix for fix 5363, removes warning on vs 6
......
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES VCExpress devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS;EnvironmentDirectory]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup;Dbghelp_path]
"$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio 9/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio9/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 9/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio9/Common7/IDE"
"/Program Files/Microsoft Visual Studio 9/Common7/IDE/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC90 1)
SET(MSVC_VERSION 1500)
......@@ -328,7 +328,7 @@ endmacro(pkg_check_modules)
###
macro(pkg_search_module _prefix _module0)
# check cached value
if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION})
if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
set(_pkg_modules_found 0)
_pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required "${_module0}" ${ARGN})
......@@ -352,7 +352,7 @@ macro(pkg_search_module _prefix _module0)
endif(NOT ${_prefix}_FOUND)
_pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION})
endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
endmacro(pkg_search_module)
### Local Variables:
......
......@@ -281,7 +281,7 @@ IF(QT_FOUND)
ENDIF(QT_FOUND)
EXEC_PROGRAM(${QT_MOC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE QTVERSION_MOC)
EXEC_PROGRAM(${QT_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UI)
EXEC_PROGRAM(${QT_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UIC)
SET(_QT_UIC_VERSION_3 FALSE)
IF("${QTVERSION_UIC}" MATCHES ".* 3..*")
......
This diff is collapsed.
......@@ -6,6 +6,17 @@
ADD_DEFINITIONS(${QT_DEFINITIONS})
# check that QT_NO_DEBUG is defined for release configurations
MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
IF(NOT ${VAR} MATCHES "${FLAG}")
SET(${VAR} "${${VAR}} ${FLAG}"
CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE)
ENDIF(NOT ${VAR} MATCHES "${FLAG}")
ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR)
QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info")
QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release")
QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize")
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
SET(QT_LIBRARIES "")
......@@ -21,8 +32,7 @@ MACRO(QT_MODULE_SETUP module)
IF (QT_QT${module}_FOUND)
ADD_DEFINITIONS(-DQT_${module}_LIB)
INCLUDE_DIRECTORIES(${QT_QT${module}_INCLUDE_DIR})
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT${module}_LIBRARY})
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})
SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT${module}_LIBRARY} ${QT_${module}_LIB_DEPENDENCIES})
ELSE (QT_QT${module}_FOUND)
MESSAGE("Qt ${module} library not found.")
ENDIF (QT_QT${module}_FOUND)
......@@ -33,7 +43,7 @@ ENDMACRO(QT_MODULE_SETUP)
IF (QT_USE_QT3SUPPORT)
QT_MODULE_SETUP(3SUPPORT)
ADD_DEFINITIONS(-DQT3_SUPPORT)
ADD_DEFINITIONS(-DQT3_SUPPORT)
ENDIF (QT_USE_QT3SUPPORT)
IF (QT_USE_QTOPENGL)
......@@ -56,6 +66,10 @@ IF (QT_USE_QTNSPLUGIN)
QT_MODULE_SETUP(NSPLUGIN)
ENDIF (QT_USE_QTNSPLUGIN)
IF (QT_USE_QTSCRIPT)
QT_MODULE_SETUP(SCRIPT)
ENDIF (QT_USE_QTSCRIPT)
IF (QT_USE_QTSVG)
QT_MODULE_SETUP(SVG)
ENDIF (QT_USE_QTSVG)
......@@ -84,6 +98,10 @@ IF (QT_USE_QTNETWORK)
QT_MODULE_SETUP(NETWORK)
ENDIF (QT_USE_QTNETWORK)
IF (QT_USE_QTDBUS)
QT_MODULE_SETUP(DBUS)
ENDIF (QT_USE_QTDBUS)
IF (NOT QT_DONT_USE_QTCORE)
QT_MODULE_SETUP(CORE)
ENDIF (NOT QT_DONT_USE_QTCORE)
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
......@@ -173,7 +173,8 @@ bool cmDependsFortran::WriteDependencies(const char *src, const char *obj,
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod "
<< i->c_str() << " " << m.c_str() << ".mod.stamp\n";
}
makeDepends << "\t@touch " << obj << ".provides.build\n";
makeDepends << "\t$(CMAKE_COMMAND) -E touch " << obj
<< ".provides.build\n";
}
/*
......
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "windows.h" // this must be first to define GetCurrentDirectory
#include "cmGlobalVisualStudio9Generator.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
#include "cmake.h"
cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator()
{
this->FindMakeProgramFile = "CMakeVS9FindMake.cmake";
}
void cmGlobalVisualStudio9Generator::WriteSLNHeader(std::ostream& fout)
{
fout << "Microsoft Visual Studio Solution File, Format Version 10.00\n";
fout << "# Visual Studio 2008\n";
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator()
{
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
lg->SetVersion9();
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
lg->SetGlobalGenerator(this);
return lg;
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio9Generator
::GetDocumentation(cmDocumentationEntry& entry) const
{
entry.Name = this->GetName();
entry.Brief = "Generates Visual Studio 9 2008 project files.";
entry.Full = "";
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio9Generator
::EnableLanguage(std::vector<std::string>const & lang,
cmMakefile *mf, bool optional)
{
cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional);
}
//----------------------------------------------------------------------------
std::string cmGlobalVisualStudio9Generator::GetUserMacrosDirectory()
{
std::string base;
std::string path;
// base begins with the VisualStudioProjectsLocation reg value...
if (cmSystemTools::ReadRegistryValue(
"HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\9.0;"
"VisualStudioProjectsLocation",
base))
{
cmSystemTools::ConvertToUnixSlashes(base);
// 9.0 macros folder:
path = base + "/VSMacros80";
// *NOT* a typo; right now in Visual Studio 2008 beta the macros
// folder is VSMacros80... They may change it to 90 before final
// release of 2008 or they may not... we'll have to keep our eyes
// on it
}
// path is (correctly) still empty if we did not read the base value from
// the Registry value
return path;
}
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef cmGlobalVisualStudio9Generator_h
#define cmGlobalVisualStudio9Generator_h
#include "cmGlobalVisualStudio8Generator.h"
/** \class cmGlobalVisualStudio9Generator
* \brief Write a Unix makefiles.
*
* cmGlobalVisualStudio9Generator manages UNIX build process for a tree
*/
class cmGlobalVisualStudio9Generator :
public cmGlobalVisualStudio8Generator
{
public:
cmGlobalVisualStudio9Generator();
static cmGlobalGenerator* New() {
return new cmGlobalVisualStudio9Generator; }
///! Get the name for the generator.
virtual const char* GetName() const {
return cmGlobalVisualStudio9Generator::GetActualName();}
static const char* GetActualName() {return "Visual Studio 9 2008";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
/**
* Try to determine system infomation such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);
virtual void WriteSLNHeader(std::ostream& fout);
/**
* Where does this version of Visual Studio look for macros for the
* current user? Returns the empty string if this version of Visual
* Studio does not implement support for VB macros.
*/
virtual std::string GetUserMacrosDirectory();
};
#endif
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "cmGlobalVisualStudio9Win64Generator.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator()
{
this->PlatformName = "x64";
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio9Win64Generator::CreateLocalGenerator()
{
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
lg->SetVersion9();
lg->SetPlatformName(this->PlatformName.c_str());
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
lg->SetGlobalGenerator(this);
return lg;
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio9Win64Generator
::GetDocumentation(cmDocumentationEntry& entry) const
{
entry.Name = this->GetName();
entry.Brief = "Generates Visual Studio 9 2008 Win64 project files.";
entry.Full = "";
}
void cmGlobalVisualStudio9Win64Generator
::EnableLanguage(std::vector<std::string>const & lang,
cmMakefile *mf, bool optional)
{
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
cmGlobalVisualStudio9Generator::EnableLanguage(lang, mf, optional);
}
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef cmGlobalVisualStudio9Win64Generator_h
#define cmGlobalVisualStudio9Win64Generator_h
#include "cmGlobalVisualStudio9Generator.h"
/** \class cmGlobalVisualStudio8Win64Generator
* \brief Write a Unix makefiles.
*
* cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree
*/
class cmGlobalVisualStudio9Win64Generator :
public cmGlobalVisualStudio9Generator
{
public:
cmGlobalVisualStudio9Win64Generator();
static cmGlobalGenerator* New() {
return new cmGlobalVisualStudio9Win64Generator; }
///! Get the name for the generator.
virtual const char* GetName() const {
return cmGlobalVisualStudio9Win64Generator::GetActualName();}
static const char* GetActualName() {return "Visual Studio 9 2008 Win64";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
/**
* Try to determine system infomation such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);
};
#endif
......@@ -958,7 +958,8 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
}
// Make sure the name is a directory.
if(!cmSystemTools::FileIsDirectory(dir.c_str()))
if(cmSystemTools::FileExists(dir.c_str()) &&
!cmSystemTools::FileIsDirectory(dir.c_str()))
{
cmOStringStream e;
e << args[0] << " given non-directory \""
......
......@@ -1251,7 +1251,17 @@ void cmMakefile::AddCacheDefinition(const char* name, const char* value,
}
}
std::string saveValue;
if(val)
{
saveValue = val;
}
// make ivalidate the const char*
this->GetCacheManager()->AddCacheEntry(name, val, doc, type);
if(val)
{
val = saveValue.c_str();
}
this->AddDefinition(name, val);
}
......
......@@ -795,6 +795,8 @@ void CMakeCommandUsage(const char* program)
"it\n"
<< " tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar.\n"
<< " time command [args] ... - run command and return elapsed time\n"
<< " touch file - touch a file.\n"
<< " touch_nocreate file - touch a file but do not create it.\n"
#if defined(_WIN32) && !defined(__CYGWIN__)
<< " write_regv key value - write registry value\n"
<< " delete_regv key - delete registry value\n"
......@@ -939,6 +941,34 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
}
return 0;
}
// Touch file
else if (args[1] == "touch" && args.size() > 2)
{
for (std::string::size_type cc = 2; cc < args.size(); cc ++)
{
// Complain if the file could not be removed, still exists,
// and the -f option was not given.
if(!cmSystemTools::Touch(args[cc].c_str(), true))
{
return 1;
}
}
return 0;
}
// Touch file
else if (args[1] == "touch_nocreate" && args.size() > 2)
{
for (std::string::size_type cc = 2; cc < args.size(); cc ++)
{
// Complain if the file could not be removed, still exists,
// and the -f option was not given.
if(!cmSystemTools::Touch(args[cc].c_str(), false))
{
return 1;
}
}
return 0;
}
// Clock command
else if (args[1] == "time" && args.size() > 2)
......
......@@ -64,6 +64,11 @@
# include <windows.h>
#endif
#ifdef _MSC_VER
#include <sys/utime.h>
#else
#include <utime.h>
#endif
// This is a hack to prevent warnings about these functions being
// declared but not referenced.
#if defined(__sgi) && !defined(__GNUC__)
......@@ -769,6 +774,36 @@ bool SystemTools::FileExists(const char* filename)
}
}
bool SystemTools::Touch(const char* filename, bool create)
{
if(create && !SystemTools::FileExists(filename))
{
FILE* file = fopen(filename, "a+b");
if(file)
{
fclose(file);
return true;
}
return false;
}
#ifdef _MSC_VER
#define utime _utime
#define utimbuf _utimbuf
#endif
struct stat fromStat;
if(stat(filename, &fromStat) < 0)
{
return false;
}
struct utimbuf buf;
buf.actime = fromStat.st_atime;
buf.modtime = static_cast<time_t>(SystemTools::GetTime());
if(utime(filename, &buf) < 0)
{
return false;
}
return true;
}
bool SystemTools::FileTimeCompare(const char* f1, const char* f2,
int* result)
......
......@@ -279,6 +279,11 @@ public:
*/
static unsigned long FileLength(const char *filename);
/**
Change the modification time or create a file
*/
static bool Touch(const char* filename, bool create);
/**
* Compare file modification times.
* Return true for successful comparison and false for error.
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment