예제 #1
0
    def __CreateCMakeSection_Sources(self, cmakeUIHInputVar,
                                     cmakeUICppInputVar, cmakeMocInputVar):
        """ Add sources to the target in the CMakeLists.txt """
        sources = self.project.GetSources()
        if not self.__HasCompilableFiles():
            sources.append(csnUtility.GetDummyCppFilename())
        if self.project.type == "executable":
            self.file.write(
                "ADD_EXECUTABLE(%s %s %s %s %s)\n" %
                (self.project.name, cmakeUIHInputVar, cmakeUICppInputVar,
                 cmakeMocInputVar, csnUtility.Join(sources, _addQuotes=1)))

        elif self.project.type == "library":
            self.file.write(
                "ADD_LIBRARY(%s STATIC %s %s %s %s)\n" %
                (self.project.name, cmakeUIHInputVar, cmakeUICppInputVar,
                 cmakeMocInputVar, csnUtility.Join(sources, _addQuotes=1)))

        elif self.project.type == "dll":
            self.file.write(
                "ADD_LIBRARY(%s SHARED %s %s %s %s)\n" %
                (self.project.name, cmakeUIHInputVar, cmakeUICppInputVar,
                 cmakeMocInputVar, csnUtility.Join(sources, _addQuotes=1)))

        elif self.project.type == "container":
            self.file.write("# Container project\n")

        else:
            raise NameError, "Unknown project type %s" % self.project.type
예제 #2
0
 def GetCompileManager(self):
     if len(self.__compileManagerUpdates) > 0:
         for function, parameters in self.__compileManagerUpdates:
             function(**parameters)
         self.__compileManagerUpdates = list()
         if (len(self.__compileManager.sources) == 0):
             dummySource = csnUtility.GetDummyCppFilename()
             self.__compileManager.AddSources([dummySource])
     return self.__compileManager
예제 #3
0
# Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu.
# This software is distributed WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#  Used to build all MeshLib applications

import csnBuild
import csnCilab
import csnUtility
from csnToolkitOpen import *

meshLibApps = csnCilab.CilabModuleProject("MeshLibApps", "library")
meshLibApps.AddSources([csnUtility.GetDummyCppFilename()])
meshLibApps.AddProjects([meshLib])
meshLibApps.AddApplications(
    ["meAppTools", "meAppPolyline", "meAppSegValidationTools"],
    _holderName="MeshLibApplications")
예제 #4
0
# Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu.
# This software is distributed WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# 
#  Used to build all DcmAPI applications

import csnBuild
import csnCilab
import csnUtility
from csnToolkitOpen import *

dcmAPIApps = csnCilab.CilabModuleProject("DcmAPIApps", "library")
dcmAPIApps.AddSources( [csnUtility.GetDummyCppFilename()] )
dcmAPIApps.AddProjects( [dcmAPI] )
dcmAPIApps.AddApplications([
    "viewer"
    ], _holderName="dcmapps")
dcmAPIApps.AddDefinitions(["/bigobj"], _WIN32 = 1) 
예제 #5
0
 def GetDummyCppFilename(self):
     """ Returns the filename of an empty cpp file. """
     return csnUtility.GetDummyCppFilename()
예제 #6
0
import csnBuild
import csnCilab
import csnUtility
from csnGIMIASDef import *

csnGMDataHandlingApps = csnCilab.CilabModuleProject("csnGMDataHandlingApps",
                                                    "library")
csnGMDataHandlingApps.AddSources([csnUtility.GetDummyCppFilename()])
csnGMDataHandlingApps.AddProjects([gmDataHandling])