1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
# =========================================================================
#
# Program: Insight Segmentation & Registration Toolkit
# Module: BuildHeaderTest.tcl
# Language: Tcl
# Date: $Date$
# Version: $Revision$
#
# Copyright (c) Insight Software Consortium. All rights reserved.
# See ITKCopyright.txt or http://www.itk.org/HTML/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.
#
#
# =========================================================================
set Header {/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Language: C++
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/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.
=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include <iostream>
#include <cstdlib>
// This file has been generated by BuildHeaderTest.tcl
// Test to include each header file for Insight
}
set Trailer "
int main ( int , char* [] )
{
return EXIT_SUCCESS;
}
"
set D [lsort [glob -nocomplain Code/*]]
set Directories ""
foreach d $D \
{
if { [file tail $d] != "CVS" && [file isdirectory $d]} \
{
lappend Directories [file tail $d]
}
}
foreach Directory $Directories \
{
if { ![file exists [file join Testing Code $Directory]] } \
{
continue
}
set f [open [file join Testing Code $Directory itk${Directory}HeaderTest.cxx] w]
puts $f $Header
foreach File [lsort [glob -nocomplain [file join Code $Directory *.h]]] \
{
if {[file tail $File] == "itkTestMain.h"} {
continue;
}
if {[file tail $File] == "itkWindows.h"} {
continue;
}
if {[file tail $File] == "itkWin32Header.h"} {
continue;
}
if {[file tail $File] == "itkWin32OutputWindow.h"} {
continue;
}
if {[file tail $File] == "itkImageViewerWindow.h"} {
continue;
}
#
# include the .h if there is no .txx
# otherwise include the .txx
#
set txxFile "[file rootname $File].txx"
if {[file tail $txxFile] == "itkImageViewer.txx"} {
continue;
}
if { [file exists $txxFile] } {
puts $f "#include \"[file tail $txxFile]\""
} else {
puts $f "#include \"[file tail $File]\""
}
}
puts $f $Trailer
close $f
}
|