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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22