6Minimum working example for PyXMake.
8@note: Compile a project using CMAKE on windows.
12----------------------------------------------------------------------------------------------
19@author: garb_ma [DLR-FA,STM Braunschweig]
20----------------------------------------------------------------------------------------------
28 sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
30 from PyXMake
import VTL
36 from PyCODAC.Tools.Utility
import GetPyCODACPath
38 __mcd_core_path = os.path.join(GetPyCODACPath(),
"Core")
50 source=os.path.join(__mcd_core_path,
"config"),
53 scratch=VTL.Scratch, verbosity=2,
57 Main function to execute the script.
62 with Generator(scratch):
63 Make = CMake(BuildID,
"CMakeLists.txt", scratch=os.getcwd(), verbose=verbosity, **kwargs)
64 Make.SourcePath(source)
65 if output: Make.OutputPath(output)
68if __name__ ==
"__main__":
73 CMake.run(foss=Utility.GetExecutable(
"choco")
or Utility.GetPlatform()
in [
"linux"])
75 print(
'==================================')
77 print(
'==================================')
Create a make object to define the building environment.
main(BuildID, source=os.path.join(__mcd_core_path,"config"), output=None, scratch=VTL.Scratch, verbosity=2, **kwargs)