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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22