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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10689 - (show annotations) (download) (as text)
Mon Oct 19 16:58:58 2009 UTC (8 years ago) by fedorov
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 25737 byte(s)
ENH: use the latest ITK 3.16

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

  ViewVC Help
Powered by ViewVC 1.1.22