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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22