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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14211 - (show annotations) (download) (as text)
Sun Jul 18 22:46:34 2010 UTC (7 years, 3 months ago) by fedorov
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 27220 byte(s)
ENH: upgrade ITK tag to 3.20

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 ::Slicer3_DATA_ROOT ""
16
17 # If ::LAUNCHER_REPORT_VTK_ERRORS is set to ON, then the launched
18 # process returns with error if VTK errors are found
19 # (this stricter checking is useful for test execution)
20 set ::LAUNCHER_REPORT_VTK_ERRORS "OFF"
21
22 if {[info exists ::env(Slicer3_HOME)]} {
23 # already set by the launcher
24 set ::Slicer3_HOME $::env(Slicer3_HOME)
25 } else {
26 # if sourcing this into cmaker, Slicer3_HOME may not be set
27 # set the Slicer3_HOME directory to the one in which this script resides
28 set cwd [pwd]
29 cd [file dirname [info script]]
30 set ::Slicer3_HOME [pwd]
31 set ::env(Slicer3_HOME) $::Slicer3_HOME
32 cd $cwd
33 }
34
35 # set up variables for the OS Builds, to facilitate the move to solaris9
36 # - solaris can be solaris8 or solaris9
37 set ::SOLARIS "solaris8"
38 set ::LINUX "linux-x86"
39 set ::LINUX_64 "linux-x86_64"
40 set ::DARWIN "darwin-ppc"
41 set ::DARWIN_X86 "darwin-x86"
42 set ::WINDOWS "win32"
43
44 #
45 # set the default locations for the main components
46 #
47 switch $::tcl_platform(os) {
48 "SunOS" { set ::env(BUILD) $::SOLARIS }
49 "Linux" {
50 if {$::tcl_platform(machine) == "x86_64"} {
51 set ::env(BUILD) $::LINUX_64
52 } else {
53 set ::env(BUILD) $::LINUX
54 }
55 }
56 "Darwin" {
57 if {$::tcl_platform(machine) == "i386"} {
58 set ::env(BUILD) $::DARWIN_X86
59 } else {
60 set ::env(BUILD) $::DARWIN
61 }
62 }
63 default {
64 set ::env(BUILD) $::WINDOWS
65 set ::Slicer3_HOME [file attributes $::Slicer3_HOME -shortname]
66 set ::env(Slicer3_HOME) $::Slicer3_HOME
67 }
68 }
69
70 puts "Slicer3_HOME is $::Slicer3_HOME"
71
72 # Choose which library versions you want to compile against. These
73 # shouldn't be changed between releases except for testing purposes.
74 # If you change them and Slicer breaks, you get to keep both pieces.
75 #
76 # When modifying these variables, make sure to make appropriate
77 # changes in the "Files to test if library has already been built"
78 # section below, or genlib will happily build the library again.
79
80 set ::Slicer3_TAG "http://svn.slicer.org/Slicer3/trunk"
81 set ::CMAKE_TAG "CMake-2-8-0"
82 set ::Teem_TAG http://teem.svn.sourceforge.net/svnroot/teem/teem/branches/Teem-1.11
83 set ::KWWidgets_TAG "Slicer-3-6"
84 set ::VTK_TAG "http://svn.github.com/pieper/SlicerVTK.git" ;# slicer's patched vtk 5.6
85 set ::ITK_TAG ITK-3-20
86 set ::PYTHON_TAG "http://svn.python.org/projects/python/branches/release26-maint"
87 set ::PYTHON_REVISION 76651 ;# avoid windows manifest "fix"
88 set ::BLAS_TAG http://svn.slicer.org/Slicer3-lib-mirrors/trunk/netlib/BLAS
89 set ::LAPACK_TAG http://svn.slicer.org/Slicer3-lib-mirrors/trunk/netlib/lapack-3.1.1
90 set ::NUMPY_TAG "http://svn.scipy.org/svn/numpy/branches/1.3.x"
91 set ::SCIPY_TAG "http://svn.scipy.org/svn/scipy/branches/0.7.x"
92 #set ::BatchMake_TAG "BatchMake-1-2"
93 set ::BatchMake_TAG "HEAD"
94 set ::SLICERLIBCURL_TAG "HEAD"
95 set ::OpenIGTLink_TAG "http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink"
96 #set ::OpenCV_TAG http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.1/OpenCV-2.1.0.tar.bz2/download
97 set ::OpenCV_TAG https://code.ros.org/svn/opencv/tags/2.1/opencv
98
99 # set TCL_VERSION to "tcl" to get 8.4, otherwise use tcl85 get 8.5
100 # set 8.5 for Solaris explicitly, because 8.4 complains
101 # when built 64 bit with gcc. Suncc/CC is fine, however.
102 if {$tcl_platform(os) == "SunOS"} {
103 set ::TCL_VERSION tcl85
104 set ::TCL_MINOR_VERSION 5
105 } else {
106 set ::TCL_VERSION tcl
107 set ::TCL_MINOR_VERSION 4
108 }
109
110 # Set library, binary, etc. paths...
111
112 # if Slicer3_LIB and Slicer3_BUILD haven't been set, first check
113 # enviornment variables, then assume they are in the 'standard' places
114 # next to the source tree (as created by getbuildtest.tcl
115 if { ![info exists ::Slicer3_LIB] } {
116 if { [info exists ::env(Slicer3_LIB)] } {
117 set ::Slicer3_LIB $::env(Slicer3_LIB)
118 } else {
119 set wd [pwd]
120 cd $::Slicer3_HOME/../Slicer3-lib
121 set ::Slicer3_LIB [pwd]
122 cd $wd
123 }
124 }
125 if { ![info exists ::Slicer3_BUILD] } {
126 if { [info exists ::env(Slicer3_BUILD)] } {
127 set ::Slicer3_BUILD $::env(Slicer3_BUILD)
128 } else {
129 set wd [pwd]
130 cd $::Slicer3_HOME/../Slicer3-build
131 set ::Slicer3_BUILD [pwd]
132 cd $wd
133 }
134 }
135
136 set ::Teem_SRC_DIR $::Slicer3_LIB/teem
137 set ::Teem_BUILD_DIR $::Slicer3_LIB/teem-build
138 set ::VTK_DIR $::Slicer3_LIB/VTK-build
139 set ::VTK_SRC_DIR $::Slicer3_LIB/VTK
140 if { ![info exists ::VTK_BUILD_TYPE] } {
141 # set a default if it hasn't already been specified
142 set ::VTK_BUILD_TYPE "Debug" ;# options: Release, RelWithDebInfo, Debug
143 }
144 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
145 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
146 set ::KWWidgets_BUILD_DIR $::Slicer3_LIB/KWWidgets-build
147 set ::KWWIDGETS_DIR $::Slicer3_LIB/KWWidgets
148 set ::ITK_BINARY_PATH $::Slicer3_LIB/Insight-build
149 set ::TCL_BIN_DIR $::Slicer3_LIB/tcl-build/bin
150 set ::TCL_LIB_DIR $::Slicer3_LIB/tcl-build/lib
151 set ::TCL_INCLUDE_DIR $::Slicer3_LIB/tcl-build/include
152 set ::PYTHON_BIN_DIR $::Slicer3_LIB/python-build
153 set ::CMAKE_PATH $::Slicer3_LIB/CMake-build
154 set ::SOV_BINARY_DIR ""
155 set ::XVNC_EXECUTABLE " "
156 set ::OpenIGTLink_DIR $::Slicer3_LIB/OpenIGTLink-build
157 set ::OpenCV_DIR $::Slicer3_LIB/OpenCV-build
158 set ::BatchMake_SRC_DIR $::Slicer3_LIB/BatchMake
159 set ::BatchMake_BUILD_DIR $::Slicer3_LIB/BatchMake-build
160 set ::SLICERLIBCURL_SRC_DIR $::Slicer3_LIB/cmcurl
161 set ::SLICERLIBCURL_BUILD_DIR $::Slicer3_LIB/cmcurl-build
162
163
164 # getbuildtest Option for build using system Python, should be "true" or "false"
165 set ::USE_SYSTEM_PYTHON "false"
166 # CMake option for Python, must be "OFF" on "ON", default is "ON"
167 # - note: as of python 2.6 this can only be used on windows with VS 2008 professional
168 # (this variable is forced to off later in this file if non-VS 2008 compiler is selected or non-XP version of windows is detected)
169 set ::USE_PYTHON "ON"
170
171 # CMake option for numerical Python, only matters if Python is on
172 set ::USE_NUMPY "ON"
173 # getbuildtest option for SCIPY - also build support libraries (blas and lapack) needed for scipy
174 # - should be off except for experimentation (does not work on all plaftorms - requires fortran)
175 # - should be "true" or "false"
176 set ::USE_SCIPY "false"
177 # CMake Option for using OpenIGTLink library. Must be "OFF" or "ON", default is "OFF"
178 set ::USE_OPENIGTLINK "ON"
179 # CMake Option for using OpenCV library. Must be "OFF" or "ON", default is "OFF"
180 set ::USE_OPENCV "OFF"
181
182 switch $::tcl_platform(os) {
183 "SunOS" {
184 set shared_lib_ext "so"
185 }
186 "Linux" {
187 set shared_lib_ext "so"
188 }
189 "Darwin" {
190 set shared_lib_ext "dylib"
191 }
192 "Windows NT" {
193 set shared_lib_ext "dll"
194 }
195 }
196
197 # TODO: identify files for each platform
198
199 switch $::tcl_platform(os) {
200 "SunOS" {
201 set ::VTK_BUILD_SUBDIR ""
202 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
203
204 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
205 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
206
207 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.5
208 if { $::USE_SYSTEM_PYTHON } {
209 error "need to define system python path for $::tcl_platform(os)"
210 }
211 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
212 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.6.so
213 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
214 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
215 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
216 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
217 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.5
218 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.4/libitcl3.4.so
219 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
220 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
221 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
222 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.so
223 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.5.$shared_lib_ext
224 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.5.$shared_lib_ext
225 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.5
226 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
227 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
228 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
229 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
230 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
231 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.$shared_lib_ext
232 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
233 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish30
234
235 # We need a workaround here, because gcc does not pick up libraries in /lib
236 # on Solaris.
237 # The bug, and it's resolution can be found here:
238 # http://bugs.opensolaris.org/view_bug.do?bug_id=6619485
239 set ::env(LDFLAGS) -L/lib
240 }
241 "Darwin" {
242 set ::VTK_BUILD_SUBDIR ""
243 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
244
245 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.$::TCL_MINOR_VERSION
246 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.$::TCL_MINOR_VERSION
247 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.dylib
248 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.dylib
249 if { $::USE_SYSTEM_PYTHON } {
250 set ::PYTHON_BIN_DIR /usr
251 }
252 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
253 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.6.dylib
254 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
255 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
256 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
257 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
258 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
259 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
260 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
261 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
262 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
263 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
264 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.$shared_lib_ext
265 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.$::TCL_MINOR_VERSION.$shared_lib_ext
266 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.$::TCL_MINOR_VERSION.$shared_lib_ext
267 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.$::TCL_MINOR_VERSION
268 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
269 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
270 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
271 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
272 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
273 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
274
275 }
276 "Linux" {
277 set ::VTK_BUILD_SUBDIR ""
278 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
279
280 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
281 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
282 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
283 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
284 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
285 if { $::USE_SYSTEM_PYTHON } {
286 error "need to define system python path for $::tcl_platform(os)"
287 }
288 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
289 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.6.so
290 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
291 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
292 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
293 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
294 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
295 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
296 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
297 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
298 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
299 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.so
300 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
301 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
302 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
303 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
304 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
305 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
306 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
307 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
308 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
309
310 }
311 "Windows NT" {
312 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
313
314 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
315 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin/$::VTK_BUILD_TYPE
316
317 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
318 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
319 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
320 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itclConfig.sh
321 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/itcl3.2/itcl32.lib
322 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/itk3.2/itk32.lib
323 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
324 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
325 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu.exe
326 if { $::USE_SYSTEM_PYTHON } {
327 error "need to define system python path for $::tcl_platform(os)"
328 }
329 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/PCbuild/python.exe
330 set ::PYTHON_LIB $::PYTHON_BIN_DIR/PCbuild/python26.lib
331
332 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
333
334 set ::NETLIB_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
335 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/site-packages/numpy/core/numeric.pyc
336 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
337 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
338 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
339 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/$::VTK_BUILD_TYPE/CV.lib
340 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
341 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
342 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
343 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
344 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/$::VTK_BUILD_TYPE/OpenIGTLink.lib
345 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/$::VTK_BUILD_TYPE/BatchMake.lib
346 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
347 }
348 default {
349 puts stderr "Could not match platform \"$::tcl_platform(os)\"."
350 exit
351 }
352 }
353
354 # System dependent variables
355
356 switch $::tcl_platform(os) {
357 "SunOS" {
358 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
359 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
360 set ::GENERATOR "Unix Makefiles"
361 set have_compiler [info exists GETBUILDTEST(compiler)]
362 puts "have_compiler from GETBUILDTEST value: $have_compiler"
363 if {$have_compiler == 1} {
364 set GENLIB(compiler) $GETBUILDTEST(compiler)
365 } else {
366 set GETBUILDTEST(compiler) $GENLIB(compiler)
367 }
368 puts "slicer_variables.tcl: GENLIB(compiler): $::GENLIB(compiler) GETBUILDTEST(compiler): $::GETBUILDTEST(compiler)"
369 if {$GETBUILDTEST(compiler) == "suncc" || $GENLIB(compiler) == "suncc"} {
370 set ::COMPILER_PATH "/opt/SUNWspro/bin"
371 set ::COMPILER "CC"
372 set ::env(CC) cc
373 set ::env(CXX) CC
374 set ::FORTRAN_COMPILER "f90"
375 set ::env(CXXFLAGS) "-library=stlport4"
376 } else {
377 set ::env(CC) gcc
378 set ::env(CXX) g++
379 set ::COMPILER_PATH "/usr/sfw/bin"
380 set ::COMPILER "g++"
381 set ::FORTRAN_COMPILER "g77"
382 set ::env(CXXFLAGS) ""
383 }
384 # NOTE: the bellow flags will only work with gcc, and Studio 12 or newer.
385 # Earlier Studio versions do not accept the -m64 flag.
386 # If you're not using one of the two, you should check
387 # your compiler's manual for the existence of a similar flag.
388 set have_bitness [info exists GETBUILDTEST(bitness)]
389 if {$have_bitness == 1} {
390 set GENLIB(bitness) $GETBUILDTEST(bitness)
391 } else {
392 set GETBUILDTEST(bitness) $GENLIB(bitness)
393 }
394 if {$::GETBUILDTEST(bitness) == "64" || $::GENLIB(bitness) == "64"} {
395
396 # Due to bug 6223255 on Solaris 10 we need to explicitly set the runtime path
397 # for shared objects, because the linker will not find the 64 bit lib automatically.
398 # See the bellow link for more details:
399 # http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6223255
400 if {$tcl_platform(osVersion) == "5.10" && ($::GETBUILDTEST(bitness) == "64" || $::GENLIB(bitness) == "64")} {
401 set ::env(CFLAGS) -m64
402 set ::env(CXXFLAGS) "$::env(CXXFLAGS) -m64"
403 set ::env(LDFLAGS) "-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64"
404
405 } else {
406 set ::env(CFLAGS) -m64
407 set ::env(CXXFLAGS) "$::env(CXXFLAGS) -m64"
408 set ::env(LDFLAGS) -m64
409 }
410 } else {
411 set ::env(CFLAGS) ""
412 set ::env(CXXFLAGS) $::env(CXXFLAGS)
413 set ::env(LDFLAGS) ""
414 }
415 puts "slicer_variables.tcl: GENLIB(bitness): $::GENLIB(bitness) GETBUILDTEST(bitness): $::GETBUILDTEST(bitness)"
416 set ::CMAKE $::CMAKE_PATH/bin/cmake
417 set numCPUs [lindex [exec /usr/sbin/psrinfo | grep on-line | wc -l | tr -d ''] 0]
418 set ::MAKE "gmake -j[expr $numCPUs]"
419 set ::SERIAL_MAKE "gmake"
420 }
421 "Linux" {
422 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
423 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
424 set ::GENERATOR "Unix Makefiles"
425 set ::COMPILER_PATH "/usr/bin"
426 set ::COMPILER "g++"
427 set ::FORTRAN_COMPILER "gfortran"
428 set ::CMAKE $::CMAKE_PATH/bin/cmake
429 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
430 set ::MAKE "make -j [expr $numCPUs]"
431 set ::SERIAL_MAKE "make"
432 }
433 "Darwin" {
434 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
435 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
436 set ::GENERATOR "Unix Makefiles"
437 set ::COMPILER_PATH "/usr/bin"
438 set ::COMPILER "g++"
439 set ::FORTRAN_COMPILER "gfortran"
440 set ::CMAKE $::CMAKE_PATH/bin/cmake
441 set numCPUs 1
442 catch { set numCPUs [lindex [exec /usr/sbin/system_profiler | grep "Total Number Of Cores"] end] }
443 set ::MAKE "make -j [expr $numCPUs]"
444 set ::SERIAL_MAKE make
445 }
446 default {
447 # different windows machines say different things, so assume
448 # that if it doesn't match above it must be windows
449 # (VC7 is Visual C++ 7.0, also known as the .NET version)
450
451
452 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
453 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
454
455 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
456
457 set MSVC6 0
458 #
459 ## match this to the version of the compiler you have:
460 #
461
462 ## for Visual Studio 6:
463 #set ::GENERATOR "Visual Studio 6"
464 #set ::MAKE "msdev"
465 #set ::COMPILER_PATH ""
466 #set MSVC6 1
467
468 if {[info exists ::env(MSVC6)]} {
469 set ::MSVC6 $::env(MSVC6)
470 } else {
471 }
472
473 ## for Visual Studio 7:
474 if {[info exists ::env(GENERATOR)]} {
475 set ::GENERATOR $::env(GENERATOR)
476 } else {
477 set ::GENERATOR "Visual Studio 7"
478 }
479
480 if {[info exists ::env(MAKE)]} {
481 set ::MAKE $::env(MAKE)
482 } else {
483 # The following line set a default value, hoping that it will be
484 # overriden later on as the script tries for different flavors
485 # of visual studio. Let's try a little harder by checking
486 # some environment variable (ultimately we should try poking
487 # in the Win32 registry).
488 if {[info exists ::env(VSINSTALLDIR)]} {
489 set ::MAKE [file join $::env(VSINSTALLDIR) "Common7/IDE/devenv.exe"]
490 } else {
491 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv.exe"
492 }
493 }
494
495 if {[info exists ::env(COMPILER_PATH)]} {
496 set ::COMPILER_PATH $::env(COMPILER_PATH)
497 } else {
498 if {[info exists ::env(VSINSTALLDIR)]} {
499 set ::COMPILER_PATH [file join $::env(VSINSTALLDIR) "Common7/Vc7/bin"]
500 } else {
501 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
502 }
503 }
504
505 if {[info exists ::env(MSSDK_PATH)]} {
506 set ::MSSDK_PATH $::env(MSSDK_PATH)
507 } else {
508 if {[info exists ::env(WindowsSdkDir)]} {
509 set ::MSSDK_PATH [file normalize $::env(WindowsSdkDir)]
510 } else {
511 set ::MSSDK_PATH "C:/Program\ Files/Microsoft\ SDKs/Windows/v6.0A"
512 }
513 }
514
515 #
516 ## for Visual Studio 7.1:
517 # - automatically use newer if available
518 #
519 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
520 set ::GENERATOR "Visual Studio 7 .NET 2003"
521 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv.exe"
522 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
523 set ::MSSDK_PATH "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK"
524 }
525
526 #
527 ## for Visual Studio 8
528 # - automatically use newest if available
529 # - use full if available, otherwise express
530 # - use the 64 bit version if available
531 #
532 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
533 set ::GENERATOR "Visual Studio 8 2005"
534 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
535 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
536 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
537 }
538
539
540 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
541 set ::GENERATOR "Visual Studio 8 2005"
542 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
543 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
544 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
545 }
546
547 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
548 #set ::GENERATOR "Visual Studio 8 2005 Win64"
549 set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
550 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
551 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
552 set ::MSSDK_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/SDK/v2.0"
553 }
554 #
555 ## for Visual Studio 9
556 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
557 set ::GENERATOR "Visual Studio 9 2008"
558 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
559 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
560 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
561 }
562
563 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
564 set ::GENERATOR "Visual Studio 9 2008"
565 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
566 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
567 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
568 }
569
570 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
571 set ::GENERATOR "Visual Studio 9 2008"
572 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
573 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
574 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
575 }
576
577
578 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
579 set ::GENERATOR "Visual Studio 9 2008"
580 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
581 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
582 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
583 }
584
585 set ::COMPILER "cl"
586 set ::SERIAL_MAKE $::MAKE
587
588 set windowsNotXP 0
589 if { $::tcl_platform(os) == "Windows NT" } {
590 if { [string index $::tcl_platform(osVersion) 0] != "5" } {
591 set windowsNotXP 1
592 }
593 }
594 if { ![string match "Visual Studio 9*" $::GENERATOR] ||
595 [string match "*Express*" $::MAKE] || $windowsNotXP } {
596 if { $::USE_PYTHON == "ON" } {
597 puts "\n\n\nWarning: Python can only be built on windows XP with Visual Studio 9 (2008) Professional for windows.\n\nSlicer will be built with Python turned off\n\n"
598 set ::USE_PYTHON "OFF"
599 }
600 }
601 }
602 }
603
604
605

  ViewVC Help
Powered by ViewVC 1.1.22