[Vm-dev] VM Maker: CMakeVMMakerSqueak-tty.126.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jun 18 23:28:36 UTC 2016
Timothy M uploaded a new version of CMakeVMMakerSqueak to project VM Maker:
http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.126.mcz
==================== Summary ====================
Name: CMakeVMMakerSqueak-tty.126
Author: tty
Time: 18 June 2016, 6:34:38.29686 pm
UUID: 14b88b21-e134-49d5-9710-83d1f1204b71
Ancestors: CMakeVMMakerSqueak-tty.125
fixed path naming issue in directories.cmake generation involving platforms directory
I need to get a repeatable pattern for topdir, srcdir platformsdir vs the dirXYZ name holders.
This is a step in that direction.
cmake outputs and builds w/o error.
=============== Diff against CMakeVMMakerSqueak-tty.125 ===============
Item was changed:
----- Method: CMakeVMGeneratorForSqueak>>generateByTemplate (in category 'code generation') -----
generateByTemplate
"The bulk of CMake generation happens here.
See CPlatformConfigForSqueak>>initialize for CMake output. that occurs prior to this method. (This may change on refactoring)
Think Seaside renderOn composition.
"
| extPlugins intPlugins |
self flag: 'tty'. "refactor so that the cascade reflects CMake terminilogy"
output := String new writeStream.
config templates: OrderedCollection new.
config
setGlobalOptions: self;
cmakePrefixPath;
cmakeIncludePath;
cmakeLibraryPath;
cmakeIncludeModules;
cmakeCFlags;
cmakeAddDefinitions;
cmakeWriteDirectoriesDotCmake: self;
cmakeIncludeDirectories: self; "<---"
preferredIncludes; "<---why 3 of em?"
standardIncludes; "<---"
setGlobalOptionsAfterDetermineSystem: self;
extraVMSettings: self; "<--catch-all method. os/platform specific"
setCoreSources: self;
setPlatformSources: self;
setCrossSources: self;
setExtraSources;
cmakeSetSourceFilesProperties;
cmakeListAppend:'LINKLIBS' elements: (config externalLibs);
cmakeAddExecutableNameOptionSource: self;
setExecutableOutputPath;
addVMPlugins: self.
config templates do: [:each | self puts: each content].
config templates: OrderedCollection new.
extPlugins := self generatePluginConfigs: config internalPlugins internal: true.
intPlugins := self generatePluginConfigs: config externalPlugins internal: false.
self flag:'tty: pharo code would download and install libraries. I think detection belongs in CMake and user should set up their own system for squeak. '.
" self processThirdpartyLibraries. "
self processPlugins: intPlugins, extPlugins.
self config templates addLast:((CMakeCommand new) command:'target_link_libraries' params:(self moduleName , ' ${LINKLIBS}')).
" self cmd: 'target_link_libraries'
params: self moduleName , ' ${LINKLIBS}'."
config postBuildActions: self..
config templates do: [:each | self puts: each content].
self saveFile.
self generateBuildScript!
Item was added:
+ ----- Method: CPlatformConfigForSqueak>>platformsDir (in category 'cmake directory') -----
+ platformsDir
+ ^ (self topDir directoryNamed: (self dirPlatforms) )
+ !
Item was changed:
----- Method: SqueakUnixConfig>>cmakeWriteDirectoriesDotCmake: (in category 'cmake') -----
cmakeWriteDirectoriesDotCmake: aMaker
|temp o|
"We could put these inline, but other components include the directories.cmake file. So, we continue that convention"
o := String new writeStream.
temp := OrderedCollection new.
temp
addLast: ((CMakeSet new) variable: 'topDir' quotedValue: (self topDir fullName));
addLast: ((CMakeSet new) variable: 'buildDir' quotedValue: (self buildDir ifNil: ['${topDir}/build'] ifNotNil: [self buildDir fullName]));
addLast: ((CMakeSet new) variable: 'thirdpartyDir' quotedValue: '${buildDir}/thirdParty');
+ addLast: ((CMakeSet new) variable: 'platformsDir' quotedValue: (self platformsDir pathName));
- addLast: ((CMakeSet new) variable: 'platformsDir' quotedValue: (self dirPlatforms));
addLast: ((CMakeSet new) variable: 'srcDir' quotedValue: (self dirSource pathName)); "where the vm source directory lives"
addLast: ((CMakeSet new) variable: 'cogDir' quotedValue: (self cogDir pathName)); "oscogvm/src for historical reasons"
+ addLast: ((CMakeSet new) variable: 'srcPluginsDir' quotedValue: '${cogDir}/plugins' ); "plugin source directory only in oscogvm/src/plugins"
- addLast: ((CMakeSet new) variable: 'srcPluginsDir' quotedValue: (pluginsDir ifNil: [ '${cogDir}/plugins' ])); "plugin source directory only in oscogvm/src/plugins"
addLast: ((CMakeSet new) variable: 'srcVMDir' quotedValue: '${srcDir}/vm');
addLast: ((CMakeSet new) variable: 'platformName' quotedValue: (self platformName));
addLast: ((CMakeSet new) variable: 'targetPlatform' quotedValue: '${platformsDir}/${platformName}');
addLast: ((CMakeSet new) variable: 'crossDir' quotedValue: '${platformsDir}/Cross');
addLast: ((CMakeSet new) variable: 'platformVMDir' quotedValue: '${targetPlatform}/vm}');
addLast: ((CMakeSet new) variable: 'outputDir' quotedValue: (self outputDir fullName));
addLast: ((CMakeSet new) variable: 'externalModulesDir' quotedValue: (self externalModulesDir)).
temp do: [:each | o nextPutAll: (each content); cr].
self write: (o contents) toFile: 'directories.cmake'.
(enabledebugmessages)
ifTrue:[
templates
addLast:((CMakeMessage new) message: (self class name), ' setDirectories: aMaker' )
].
templates addLast: ((CMakeInclude new) file: 'directories.cmake').
!
More information about the Vm-dev
mailing list