View Single Post
  #6   (View Single Post)  
Old 6th March 2009
bforest bforest is offline
Port Guard
 
Join Date: Aug 2008
Location: East Coast, USA
Posts: 32
Default

GCC is here but I don't know how to get it to show its version.

Oh! found it..

Code:
root@pcbsd# gcc -dumpversion
4.2.1
So.. in this file ./source/linden/indra/develop.py there is this section which lists the compiler version and seems to indicate I could set this in the environment with $CXX or should I just modify it in here?

Code:
    def cmake_commandline(self, src_dir, build_dir, opts, simple):
        args = dict(
            dir=src_dir,
            generator=self.generator,
            opts=quote(opts),
            standalone=self.standalone,
            unattended=self.unattended,
            type=self.build_type.upper()
            )
        if not self.is_internal_tree():
            args.update({'cxx':'g++-4.1', 'server':'FALSE', 'viewer':'TRUE'})
        else:
            if self.distcc:
                distcc = self.find_in_path('distcc')
                baseonly = True
            else:
                distcc = []
                baseonly = False
            if 'server' in build_dir:
                gcc33 = distcc + self.find_in_path('g++-3.3', 'g++', baseonly)
                args.update({'cxx':' '.join(gcc33), 'server':'TRUE',
                             'viewer':'FALSE'})
            else:
                gcc41 = distcc + self.find_in_path('g++-4.1', 'g++', baseonly)
                args.update({'cxx': ' '.join(gcc41), 'server':'FALSE',
                             'viewer':'TRUE'})
        #if simple:
        #    return (('cmake %(opts)s '
        #             '-DSERVER:BOOL=%(server)s '
        #             '-DVIEWER:BOOL=%(viewer)s '
        #             '%(dir)r') % args)
        cmd = (('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s '
                '-G %(generator)r -DSERVER:BOOL=%(server)s '
                '-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s '
                '-DUNATTENDED:BOOL=%(unattended)s '
                '%(opts)s %(dir)r')
               % args)
        if 'CXX' not in os.environ:
            args.update({'cmd':cmd})
            cmd = ('CXX=%(cxx)r %(cmd)s' % args)
        return cmd
Reply With Quote