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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10127 - (show annotations) (download) (as text)
Fri Jul 31 11:54:19 2009 UTC (8 years, 2 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 24986 byte(s)
BUG: catch possible error for older versions of mac OSX that don't have system_profiler command
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 ::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.5.dylib
244 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
245 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
246 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/numpy/core/numeric.pyc
247 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/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.5.so
280 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
281 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
282 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/numpy/core/numeric.pyc
283 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/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/bin/python.exe
320 #set ::PYTHON_LIB $::PYTHON_BIN_DIR/Libs/python25.lib
321 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/PCbuild/python.exe
322 set ::PYTHON_LIB $::PYTHON_BIN_DIR/PCbuild/python25.lib
323
324 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
325
326 set ::NETLIB_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/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.5/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 } else {
368 set ::env(CC) gcc
369 set ::env(CXX) g++
370 set ::COMPILER_PATH "/usr/sfw/bin"
371 set ::COMPILER "g++"
372 set ::FORTRAN_COMPILER "g77"
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 set ::env(CFLAGS) -m64
386 set ::env(CXXFLAGS) -m64
387 set ::env(LDFLAGS) -m64
388 } else {
389 set ::env(CFLAGS) ""
390 set ::env(CXXFLAGS) ""
391 set ::env(LDFLAGS) ""
392 }
393 puts "slicer_variables.tcl: GENLIB(bitness): $::GENLIB(bitness) GETBUILDTEST(bitness): $::GETBUILDTEST(bitness)"
394 set ::CMAKE $::CMAKE_PATH/bin/cmake
395 set numCPUs [lindex [exec /usr/sbin/psrinfo | grep on-line | wc -l | tr -d ''] 0]
396 set ::MAKE "gmake -j[expr $numCPUs]"
397 set ::SERIAL_MAKE "gmake"
398 }
399 "Linux" {
400 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
401 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
402 set ::GENERATOR "Unix Makefiles"
403 set ::COMPILER_PATH "/usr/bin"
404 set ::COMPILER "g++"
405 set ::FORTRAN_COMPILER "gfortran"
406 set ::CMAKE $::CMAKE_PATH/bin/cmake
407 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
408 set ::MAKE "make -j [expr $numCPUs]"
409 set ::SERIAL_MAKE "make"
410 }
411 "Darwin" {
412 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
413 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
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 1
420 catch { set numCPUs [lindex [exec /usr/sbin/system_profiler | grep "Total Number Of Cores"] end] }
421 set ::MAKE "make -j [expr (2 * $numCPUs) - 1]"
422 set ::SERIAL_MAKE make
423 }
424 default {
425 # different windows machines say different things, so assume
426 # that if it doesn't match above it must be windows
427 # (VC7 is Visual C++ 7.0, also known as the .NET version)
428
429
430 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
431 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
432
433 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
434
435 set MSVC6 0
436 #
437 ## match this to the version of the compiler you have:
438 #
439
440 ## for Visual Studio 6:
441 #set ::GENERATOR "Visual Studio 6"
442 #set ::MAKE "msdev"
443 #set ::COMPILER_PATH ""
444 #set MSVC6 1
445
446 if {[info exists ::env(MSVC6)]} {
447 set ::MSVC6 $::env(MSVC6)
448 } else {
449 }
450
451 ## for Visual Studio 7:
452 if {[info exists ::env(GENERATOR)]} {
453 set ::GENERATOR $::env(GENERATOR)
454 } else {
455 set ::GENERATOR "Visual Studio 7"
456 }
457
458 if {[info exists ::env(MAKE)]} {
459 set ::MAKE $::env(MAKE)
460 } else {
461 # The following line set a default value, hoping that it will be
462 # overriden later on as the script tries for different flavors
463 # of visual studio. Let's try a little harder by checking
464 # some environment variable (ultimately we should try poking
465 # in the Win32 registry).
466 if {[info exists ::env(VSINSTALLDIR)]} {
467 set ::MAKE [file join $::env(VSINSTALLDIR) "Common7/IDE/devenv.exe"]
468 } else {
469 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv.exe"
470 }
471 }
472
473 if {[info exists ::env(COMPILER_PATH)]} {
474 set ::COMPILER_PATH $::env(COMPILER_PATH)
475 } else {
476 if {[info exists ::env(VSINSTALLDIR)]} {
477 set ::COMPILER_PATH [file join $::env(VSINSTALLDIR) "Common7/Vc7/bin"]
478 } else {
479 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
480 }
481 }
482
483 if {[info exists ::env(MSSDK_PATH)]} {
484 set ::MSSDK_PATH $::env(MSSDK_PATH)
485 } else {
486 if {[info exists ::env(WindowsSdkDir)]} {
487 set ::MSSDK_PATH [file normalize $::env(WindowsSdkDir)]
488 } else {
489 set ::MSSDK_PATH "C:/Program\ Files/Microsoft\ SDKs/Windows/v6.0A"
490 }
491 }
492
493 #
494 ## for Visual Studio 7.1:
495 # - automatically use newer if available
496 #
497 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
498 set ::GENERATOR "Visual Studio 7 .NET 2003"
499 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv.exe"
500 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
501 set ::MSSDK_PATH "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK"
502 }
503
504 #
505 ## for Visual Studio 8
506 # - automatically use newest if available
507 # - use full if available, otherwise express
508 # - use the 64 bit version if available
509 #
510 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
511 set ::GENERATOR "Visual Studio 8 2005"
512 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
513 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
514 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
515 }
516
517
518 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
519 set ::GENERATOR "Visual Studio 8 2005"
520 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
521 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
522 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
523 }
524
525 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
526 #set ::GENERATOR "Visual Studio 8 2005 Win64"
527 set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
528 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
529 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
530 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."
531 }
532 #
533 ## for Visual Studio 9
534 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
535 set ::GENERATOR "Visual Studio 9 2008"
536 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
537 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
538 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
539 }
540
541 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
542 set ::GENERATOR "Visual Studio 9 2008"
543 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
544 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
545 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
546 }
547
548
549 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
550 set ::GENERATOR "Visual Studio 9 2008"
551 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
552 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
553 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
554 }
555
556 set ::COMPILER "cl"
557 set ::SERIAL_MAKE $::MAKE
558 }
559 }
560
561
562

  ViewVC Help
Powered by ViewVC 1.1.22