/[Slicer3]/oldtrunk/slicer_variables.tcl
ViewVC logotype

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1414 - (show annotations) (download) (as text)
Thu Oct 5 16:50:19 2006 UTC (11 years ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 12021 byte(s)
ENH: make RelWithDebInfo the default build type
1
2 #
3 # Note: this local vars file overrides sets the default environment for :
4 # Scripts/genlib.tcl -- make all the support libs
5 # Scripts/cmaker.tcl -- makes slicer code
6 # launch.tcl -- sets up the runtime env and starts slicer
7 # Scripts/tarup.tcl -- makes a tar.gz files with all the support files
8 #
9 # - use this file to set your local environment and then your change won't
10 # be overwritten when those files are updated through CVS
11 #
12
13
14 ## variables that are the same for all systems
15 set ::SLICER_DATA_ROOT ""
16
17 if {[info exists ::env(SLICER_HOME)]} {
18 # already set by the launcher
19 set ::SLICER_HOME $::env(SLICER_HOME)
20 } else {
21 # if sourcing this into cmaker, SLICER_HOME may not be set
22 # set the SLICER_HOME directory to the one in which this script resides
23 set cwd [pwd]
24 cd [file dirname [info script]]
25 set ::SLICER_HOME [pwd]
26 set ::env(SLICER_HOME) $::SLICER_HOME
27 cd $cwd
28 }
29
30 # set up variables for the OS Builds, to facilitate the move to solaris9
31 # - solaris can be solaris8 or solaris9
32 set ::SOLARIS "solaris8"
33 set ::LINUX "linux-x86"
34 set ::LINUX_64 "linux-x86_64"
35 set ::DARWIN "darwin-ppc"
36 set ::WINDOWS "win32"
37
38 #
39 # set the default locations for the main components
40 #
41 switch $::tcl_platform(os) {
42 "SunOS" { set ::env(BUILD) $::SOLARIS }
43 "Linux" {
44 if {$::tcl_platform(machine) == "x86_64"} {
45 set ::env(BUILD) $::LINUX_64
46 } else {
47 set ::env(BUILD) $::LINUX
48 }
49 }
50 "Darwin" { set ::env(BUILD) $::DARWIN }
51 default {
52 set ::env(BUILD) $::WINDOWS
53 set ::SLICER_HOME [file attributes $::SLICER_HOME -shortname]
54 set ::env(SLICER_HOME) $::SLICER_HOME
55 }
56 }
57
58 puts stderr "SLICER_HOME is $::SLICER_HOME"
59
60 # Choose which library versions you want to compile against. These
61 # shouldn't be changed between releases except for testing purposes.
62 # If you change them and Slicer breaks, you get to keep both pieces.
63 #
64 # When modifying these variables, make sure to make appropriate
65 # changes in the "Files to test if library has already been built"
66 # section below, or genlib will happily build the library again.
67
68 set ::CMAKE_TAG "CMake-2-4-2"
69 set ::TEEM_TAG "Teem-1-9-0-patches"
70 set ::KWWidgets_TAG "HEAD"
71 set ::VTK_TAG "VTK-5-0"
72 set ::ITK_TAG "ITK-2-8"
73 set ::TCL_TAG "core-8-4-6"
74 set ::TK_TAG "core-8-4-6"
75 set ::ITCL_TAG "itcl-3-2-1"
76 set ::IWIDGETS_TAG "iwidgets-4-0-1"
77 set ::BLT_TAG "blt24z"
78 set ::SANDBOX_TAG "http://svn.na-mic.org:8000/svn/NAMICSandBox/branches/Slicer-2-6"
79
80 # Set library, binary, etc. paths...
81
82 # if SLICER_LIB and SLICER_BUILD haven't been set,
83 # then assume they are in the 'standard' places next to the source tree
84 # (as created by getbuildtest.tcl
85 if { ![info exists ::SLICER_LIB] } {
86 set wd [pwd]
87 cd $::SLICER_HOME/../Slicer3-lib
88 set ::SLICER_LIB [pwd]
89 cd $wd
90 }
91 if { ![info exists ::SLICER_BUILD] } {
92 set wd [pwd]
93 cd $::SLICER_HOME/../Slicer3-build
94 set ::SLICER_BUILD [pwd]
95 cd $wd
96 }
97
98 set ::TEEM_SRC_DIR $::SLICER_LIB/teem
99 set ::TEEM_BUILD_DIR $::SLICER_LIB/teem-build
100 set ::VTK_DIR $::SLICER_LIB/VTK-build
101 set ::VTK_SRC_DIR $::SLICER_LIB/VTK
102 set ::VTK_BUILD_TYPE "RelWithDebInfo"
103 set ::VTK_BUILD_SUBDIR ""
104 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
105 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
106 set ::KWWIDGETS_DIR $::SLICER_LIB/KWWidgets
107 set ::ITK_BINARY_PATH $::SLICER_LIB/Insight-build
108 set ::SANDBOX_BIN_DIR $::SLICER_LIB/NAMICSandBox-build/bin
109 set ::TCL_BIN_DIR $::SLICER_LIB/tcl-build/bin
110 set ::TCL_LIB_DIR $::SLICER_LIB/tcl-build/lib
111 set ::TCL_INCLUDE_DIR $::SLICER_LIB/tcl-build/include
112 set ::CMAKE_PATH $::SLICER_LIB/CMake-build
113 set ::SOV_BINARY_DIR ""
114 set ::XVNC_EXECUTABLE " "
115
116
117 # Files to test if library has already been built by genlib.tcl.
118
119 switch $::tcl_platform(os) {
120 "SunOS" -
121 "Linux" {
122 set shared_lib_ext "so"
123 }
124 "Darwin" {
125 set shared_lib_ext "dylib"
126 }
127 "Windows NT" {
128 set shared_lib_ext "dll"
129 }
130 }
131
132 # TODO: identify files for each platform
133
134 switch $::tcl_platform(os) {
135 "SunOS" -
136 "Darwin" {
137 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
138
139 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
140 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
141 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
142 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
143 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
144 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
145 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
146 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
147 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
148 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
149 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
150 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
151 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
152 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
153 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
154 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
155 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
156 }
157 "Linux" {
158 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
159
160 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
161 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
162 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
163 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
164 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
165 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
166 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
167 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
168 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
169 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
170 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
171 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
172 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
173 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
174 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
175 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
176 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
177 }
178 "Windows NT" {
179 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
180
181 #
182 ### Set your peferred build type:
183 #
184 #set ::VTK_BUILD_TYPE RelWithDebInfo ;# good if you have the full (expensive) compiler
185 #set ::VTK_BUILD_TYPE Release ;# faster, but no debugging
186 #set ::VTK_BUILD_TYPE Debug ;# a good default
187 set ::VTK_BUILD_TYPE RelWithDebInfo ;# a good default
188 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
189 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
190
191 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
192 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
193 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
194 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
195 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
196 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
197 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
198 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
199 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
200 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
201 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
202 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
203 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
204 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
205 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
206
207 }
208 default {
209 puts stderr "Could not match platform \"$::tcl_platform(os)\"."
210 exit
211 }
212 }
213
214 # System dependent variables
215
216 switch $::tcl_platform(os) {
217 "SunOS" {
218 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
219 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
220 set ::GENERATOR "Unix Makefiles"
221 set ::COMPILER_PATH "/local/os/bin"
222 set ::COMPILER "g++"
223 set ::CMAKE $::CMAKE_PATH/bin/cmake
224 set ::MAKE "gmake"
225 set ::SERIAL_MAKE "gmake"
226 }
227 "Linux" {
228 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
229 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
230 set ::GENERATOR "Unix Makefiles"
231 set ::COMPILER_PATH "/usr/bin"
232 set ::COMPILER "g++"
233 set ::CMAKE $::CMAKE_PATH/bin/cmake
234 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
235 set ::MAKE "make -j [expr $numCPUs * 2]"
236 puts "making with $::MAKE"
237 set ::SERIAL_MAKE "make"
238 }
239 "Darwin" {
240 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
241 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
242 set ::GENERATOR "Unix Makefiles"
243 set ::COMPILER_PATH "/usr/bin"
244 set ::COMPILER "g++"
245 set ::CMAKE $::CMAKE_PATH/bin/cmake
246 set ::MAKE make
247 set ::SERIAL_MAKE make
248 }
249 default {
250 # different windows machines say different things, so assume
251 # that if it doesn't match above it must be windows
252 # (VC7 is Visual C++ 7.0, also known as the .NET version)
253
254
255 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
256 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
257
258 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
259
260 set MSVC6 0
261 #
262 ## match this to the version of the compiler you have:
263 #
264
265 ## for Visual Studio 6:
266 #set ::GENERATOR "Visual Studio 6"
267 #set ::MAKE "msdev"
268 #set ::COMPILER_PATH ""
269 #set MSVC6 1
270
271 if {[info exists ::env(MSVC6)]} {
272 set ::MSVC6 $::env(MSVC6)
273 } else {
274 }
275
276 ## for Visual Studio 7:
277 if {[info exists ::env(GENERATOR)]} {
278 set ::GENERATOR $::env(GENERATOR)
279 } else {
280 set ::GENERATOR "Visual Studio 7"
281 }
282
283 if {[info exists ::env(MAKE)]} {
284 set ::MAKE $::env(MAKE)
285 } else {
286 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
287 }
288
289 if {[info exists ::env(COMPILER_PATH)]} {
290 set ::COMPILER_PATH $::env(COMPILER_PATH)
291 } else {
292 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
293 }
294
295 #
296 ## for Visual Studio 7.1:
297 # - automatically use newer if available
298 #
299 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
300 set ::GENERATOR "Visual Studio 7 .NET 2003"
301 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
302 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
303 }
304
305 #
306 ## for Visual Studio 8
307 # - automatically use newest if available
308 #
309 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
310 set ::GENERATOR "Visual Studio 8 2005"
311
312 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
313 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
314 }
315
316 set ::COMPILER "cl"
317 set ::SERIAL_MAKE $::MAKE
318
319 }
320 }
321
322

  ViewVC Help
Powered by ViewVC 1.1.22