COMP: Adding work-around for CMake dependency scanning limitation. Any configured header included by KWSYS_HEADER() in a .c or .cxx file in kwsys itself must use this hack to get dependencies.

This commit is contained in:
Brad King 2005-04-13 16:46:09 -04:00
parent 826405a1b6
commit caf54b2093
13 changed files with 111 additions and 1 deletions

View File

@ -15,6 +15,12 @@
#include "kwsysPrivate.h"
#include KWSYS_HEADER(Base64.h)
/* Work-around CMake dependency scanning limitation. This must
duplicate the above list of headers. */
#if 0
# include "Base64.h.in"
#endif
/*--------------------------------------------------------------------------*/
static const unsigned char kwsysBase64EncodeTable[65] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"

View File

@ -22,6 +22,16 @@
#include KWSYS_HEADER(ios/sstream)
#include KWSYS_HEADER(ios/iostream)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "CommandLineArguments.hxx.in"
# include "Configure.hxx.in"
# include "kwsys_stl.hxx.in"
# include "kwsys_ios_sstream.h.in"
# include "kwsys_ios_iostream.h.in"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -19,6 +19,15 @@
#include KWSYS_HEADER(stl/string)
#include KWSYS_HEADER(stl/vector)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "Directory.hxx.in"
# include "Configure.hxx.in"
# include "kwsys_stl.hxx.in"
# include "kwsys_stl_string.hxx.in"
#endif
namespace KWSYS_NAMESPACE
{

View File

@ -14,6 +14,12 @@
#include "kwsysPrivate.h"
#include KWSYS_HEADER(Process.h)
/* Work-around CMake dependency scanning limitation. This must
duplicate the above list of headers. */
#if 0
# include "Process.h.in"
#endif
/*
Implementation for UNIX

View File

@ -14,6 +14,12 @@
#include "kwsysPrivate.h"
#include KWSYS_HEADER(Process.h)
/* Work-around CMake dependency scanning limitation. This must
duplicate the above list of headers. */
#if 0
# include "Process.h.in"
#endif
/*
Implementation for Windows

View File

@ -33,6 +33,12 @@
#include "kwsysPrivate.h"
#include KWSYS_HEADER(RegularExpression.hxx)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "RegularExpression.hxx.in"
#endif
#include <stdio.h>
#include <string.h>

View File

@ -19,6 +19,16 @@
#include KWSYS_HEADER(ios/fstream)
#include KWSYS_HEADER(ios/sstream)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "SystemTools.hxx.in"
# include "Directory.hxx.in"
# include "kwsys_ios_iostream.h.in"
# include "kwsys_ios_fstream.h.in"
# include "kwsys_ios_sstream.h.in"
#endif
#ifdef _MSC_VER
# pragma warning (disable: 4786)
#endif

View File

@ -16,6 +16,14 @@
#include KWSYS_HEADER(Process.h)
#include KWSYS_HEADER(ios/iostream)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "Directory.hxx.in"
# include "Process.h.in"
# include "kwsys_ios_iostream.h.in"
#endif
int main()
{
kwsys::Directory();

View File

@ -12,10 +12,16 @@
=========================================================================*/
#include "kwsysPrivate.h"
#include KWSYS_HEADER(CommandLineArguments.hxx)
#include KWSYS_HEADER(ios/iostream)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "CommandLineArguments.hxx.in"
# include "kwsys_ios_iostream.h.in"
#endif
void* random_ptr = (void*)0x123;
int argument(const char* arg, const char* value, void* call_data)

View File

@ -3,6 +3,14 @@
#include KWSYS_HEADER(ios/sstream)
#include KWSYS_HEADER(ios/iostream)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "kwsys_stl_vector.h.in"
# include "kwsys_ios_sstream.h.in"
# include "kwsys_ios_iostream.h.in"
#endif
int main()
{
kwsys_ios::ostringstream ostr;

View File

@ -13,6 +13,13 @@
=========================================================================*/
#include "kwsysPrivate.h"
#include KWSYS_HEADER(Process.h)
/* Work-around CMake dependency scanning limitation. This must
duplicate the above list of headers. */
#if 0
# include "Process.h.in"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -15,6 +15,13 @@
#include KWSYS_HEADER(SystemTools.hxx)
#include KWSYS_HEADER(ios/iostream)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "SystemTools.hxx.in"
# include "kwsys_ios_iostream.h.in"
#endif
const char* toUnixPaths[][2] =
{
{ "/usr/local/bin/passwd", "/usr/local/bin/passwd" },

View File

@ -1,8 +1,29 @@
/*=========================================================================
Program: KWSys - Kitware System Library
Module: $RCSfile$
Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm 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 "kwsysPrivate.h"
#include KWSYS_HEADER(hash_map.hxx)
#include KWSYS_HEADER(hash_set.hxx)
#include KWSYS_HEADER(ios/iostream)
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.
#if 0
# include "hash_map.hxx.in"
# include "hash_set.hxx.in"
# include "kwsys_ios_iostream.h.in"
#endif
#if defined(_MSC_VER)
# pragma warning (disable:4786)
#endif