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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22