[Vm-dev] VM Maker: CMakeVMMakerSqueak-tty.113.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun May 29 12:50:03 UTC 2016
Timothy M uploaded a new version of CMakeVMMakerSqueak to project VM Maker:
http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.113.mcz
==================== Summary ====================
Name: CMakeVMMakerSqueak-tty.113
Author: tty
Time: 7 February 2016, 3:09:26.476102 pm
UUID: 51e9d217-aa32-4b31-92cf-231c78a72f73
Ancestors: CMakeVMMakerSqueak-tty.112
Reviewing, editing Help after a loing time away.
As I create a new Linux64x86w32BitSqueakCogSpurConfig I want the Example Workflow HelpTopic for a new configuration to accurately reflect the work to reproduce a CMake Configuration.
Modest progress made. I blame my new cold. (:.
=============== Diff against CMakeVMMakerSqueak-tty.112 ===============
Item was changed:
----- Method: CMakeVMMakerSqueakBuildersHelp class>>buildTypes (in category 'pages') -----
buildTypes
^HelpTopic
title:'Build types'
contents:
'N.B. This query is dependent on the developer taking the time to maintain his Configuration correctly. If they do not, then invalid information will be conveyed.
- For example, at the time of this writing, tty has completely dropped the ball on this. (:
+ Configurations are built over time. There is a possibility that a particulare build type is not available for a given Configuration simply because a developer has not gotten around to the task.
- Configurations are built over time. There is a possibility that a particulare build type is not available for a given Configuration.
For example, at the time of this writing, Linux64x86w32BitSqueakCogV3Config only has buildType #build available.
+ Since builds are sometimes not available and/or under development a developer *should* restrict what build types are avaiable for a configurations Builder by modifying the configuration''s "availableBuilds" method.
- Since builds are sometimes not available and/or under development a developer may wish to restrict what build types are avaiable for a configurations Builder by modifying the configuration''s "availableBuilds" method.
The purpose of this method is to present the end user with the avaiable buildTypes for a configuration category. when they invoke a Builder like so:
SqueakLinux64x86w32CompatBuilder availableBuildTypesFor: #Linux64x86w32BitSqueakCogV3Config
+ The default is all buildTypes:
- The default is all buildTypes:
^SqueakCMakeVMMakerAbstractBuilder default allBuildConfigurations
+ (NOTE: Why? Shouldn''t default be no build types? tty.)
+
You can display no buildTypes with:
^SqueakCMakeVMMakerAbstractBuilder default noBuildConfigurations.
or you can customize it like so:
^(SqueakCMakeVMMakerAbstractBuilder default allBuildConfigurations
copyWithoutAll: #( #assertWithHeartbeatTimer #debugWithHeartbeatTimer debugMultiThreadedFFI.....etc))
'!
Item was changed:
----- Method: CMakeVMMakerSqueakBuildersHelp class>>builders (in category 'pages') -----
builders
^HelpTopic
+ title: 'Overview'
- title: 'Builders'
contents:
+ 'A CMakeVMakerSqueak Builder is both a ''query'' tool and a ''build'' tool.
- '
- CMakeVMakerSqueak Builders provide a facade to CMakeVMmakerSqueak Configurations.
+ Builders provide a facade to CMakeVMmakerSqueak Configurations.
- A Builder is both a ''query'' tool and a ''build'' tool.
With a Builder, you can
query its configurationsCategory''s Configurations
+ invoke a Configuration to generate CMake files or...
+ invoke a Configuration to generateSources which...
- invoke a Configuration to generate CMake files or
- invoke a Configuration to generateSources which
invokes VMMaker.oscog to generate source
Builders are concrete instances of the Abstract Base Class:SqueakCMakeVMMakerAbstractBuilder
View SqueakCMakeVMMakerAbstractBuilder''s class comments for an overview of this tool.
SqueakCMakeVMMakerAbstractBuilder browseHierarchy.
+
Information on creating your own is available via HelpBrowser openOn: CMakeVMMakerSqueakDeveloperHelp
'!
Item was changed:
----- Method: CMakeVMMakerSqueakBuildersHelp class>>generatingCMakeBuilds (in category 'pages') -----
generatingCMakeBuilds
^HelpTopic
title: 'Generating CMake Builds'
contents:
+ 'CMake Builds require CMake files.
- '
- SqueakLinux64x86w32CompatBuilder configurationsCategory
- SqueakLinux64x86w32CompatBuilder buildDirectory
- SqueakLinux64x86w32CompatBuilder availableBuilds
- SqueakLinux64x86w32CompatBuilder availableBuildTypesFor:(SqueakLinux64x86w32CompatBuilder availableBuilds at:1)
- SqueakLinux64x86w32CompatBuilder sourceDirectoryFor:(SqueakLinux64x86w32CompatBuilder availableBuilds at:1)
+ We generate those files using a Builder.
+
+ In the following message sends we are asking Builder to instruct a Configuration to...
+ configure itself for a specific build type
+ debug trace messages in its output.
+ output itself as CMake.
+
+ SqueakLinux64x86w32CompatBuilder
+ configureA: #Linux64x86w32BitSqueakCogV3Config forBuildType:#build;
+ enableMessageTracking: true;
+ generateByTemplate.
+
+
+
'!
Item was added:
+ ----- Method: CMakeVMMakerSqueakBuildersHelp class>>overview (in category 'pages') -----
+ overview
+ ^HelpTopic
+ title: 'Overview'
+ contents:
+ 'A CMakeVMakerSqueak Builder is both a ''query'' tool and a ''build'' tool.
+
+ Builders provide a facade to CMakeVMmakerSqueak Configurations.
+
+ With a Builder, you can
+ query its configurationsCategory''s Configurations
+ invoke a Configuration to generate CMake files or...
+ invoke a Configuration to generateSources which...
+ invokes VMMaker.oscog to generate source
+
+ Builders are concrete instances of the Abstract Base Class:SqueakCMakeVMMakerAbstractBuilder
+ Browse its class comment an heirarchy to get a feel for it.
+
+ HelpBrowser openOn: SqueakCMakeVMMakerAbstractBuilder
+ SqueakCMakeVMMakerAbstractBuilder browseHierarchy.
+
+ Information on creating your own is available via HelpBrowser openOn: CMakeVMMakerSqueakDeveloperHelp
+ TODO: Fix above sentence to point to something useful.
+
+ '!
Item was changed:
----- Method: CMakeVMMakerSqueakBuildersHelp class>>pages (in category 'accessing') -----
pages
+ ^#(overview queryingBuilders buildTypes generatingCMakeBuilds)
+
+ "#(overview queryingBuilders buildTypes generatingCMakeBuilds scratch)"!
- ^#(builders queryingBuilders buildTypes generatingCMakeBuilds scratch)!
Item was changed:
----- Method: CMakeVMMakerSqueakBuildersHelp class>>queryingBuilders (in category 'pages') -----
queryingBuilders
^HelpTopic
title: 'Querying Builders'
contents:
+ 'You can query Builders for Configuration information for a specific platform.
- '
- You query Builders for Configuration information for a specifi platform.
+ SqueakCMakeVMMakerAbstractBuilder availableBuildConfigurationsFor: ''CMakeVMMakerSqueak-Linux32x86''.
+ SqueakCMakeVMMakerAbstractBuilder availableBuildConfigurationsFor: ''CMakeVMMakerSqueak-MacOSX32x86''.
+ SqueakCMakeVMMakerAbstractBuilder allBuildTypes
- SqueakLinux64x86w32CompatBuilder configurationsCategory
- SqueakLinux64x86w32CompatBuilder buildDirectory
- SqueakLinux64x86w32CompatBuilder availableBuilds
- SqueakLinux64x86w32CompatBuilder availableBuildTypesFor:(SqueakLinux64x86w32CompatBuilder availableBuilds at:1)
- SqueakLinux64x86w32CompatBuilder sourceDirectoryFor:(SqueakLinux64x86w32CompatBuilder availableBuilds at:1)
+ SqueakLinux64x86w32CompatBuilder configurationsCategory.
+ SqueakLinux64x86w32CompatBuilder buildDirectory.
+ SqueakLinux64x86w32CompatBuilder availableBuildConfigurations a SortedCollection(#Linux64x86w32BitSqueakCogV3Config).
+ SqueakLinux64x86w32CompatBuilder availableBuildTypesFor:(SqueakLinux64x86w32CompatBuilder availableBuildConfigurations at:1).
+ SqueakLinux64x86w32CompatBuilder sourceDirectoryFor:(SqueakLinux64x86w32CompatBuilder availableBuildConfigurations at:1).
+
+
+ The hope is that an app like Seaside would autogenerate build configurations while intelligently selecting/de-selecting based on the systems built-in configuration.
+
+ ToolSet browseMessageCategory: ''queries'' inClass: SqueakCMakeVMMakerAbstractBuilder'!
- '!
Item was changed:
----- Method: CMakeVMMakerSqueakConfigurationsHelp class>>overview (in category 'pages') -----
overview
^HelpTopic
title:'Overview'
contents:
+ 'CMakeVMMakerSqueak Configurations. encapsulate CMake output.
- ' CMakeVMMakerSqueak Configurations. encapsulate CMake output.
+ To get a sense of what the CMake output file looks like, open a Transcript and evaluate the following:
+
+ Transcript clear.
+ Transcript show: ((Linux64x86w32BitSqueakCogV3Config new) configureForBuildType: #build) contentForVmConfigCmake
+
+
The CMake encapsulation is eased by storing CMakeTemplates--small wrapper classes that encapsulate CMake constructs.
+ CMakeTemplate browseHierarchy.
Configurations Are organized by Platform in specific Class Categories. Example: CMakeVMMakerSqueak-MacOSPowerPC contains all the configurations for that platform.
Configurations should adhere to a naming convention that mirror Eliot Miranda''s Autotools build system layout:
[Platform][Language][VM][Memory Model][Foo]Config.
Examples:
Plan9NewspeakSistaSpurConfig
MacOSXSqueakCogSpurConfig
Windows32SqueakStackV2JoesPersonalTotallyAweseomeConfig
Configurations can support the available build types: #build, #buildDebug, #buildAssert...etc.
+ Configurations can exclude themselves from being built.
+ Configurations can exclude themselves from supporting particular build types.
- Configurations can exclude themselves from being built by Builders.
- Configurations can exclude themselves from supporting particular buildTypes.
For each buildType, a Configuration encapsulates CMake configuration parameters for that buildType..
+ To use a Configuration, we tell it to configure itself for a particular build type and then generate its output.
-
'!
Item was added:
+ ----- Method: CMakeVMMakerSqueakDesignPatternsHelp class>>priority (in category 'accessing') -----
+ priority
+
+ ^ 8!
Item was changed:
----- Method: CMakeVMMakerSqueakDeveloperHelp class>>pages (in category 'pages') -----
pages
+ ^#( CMakeVMMakerSqueakOverviewHelp CMakeVMMakerSqueakBuildersHelp CMakeVMMakerSqueakConfigurationsHelp CMakeVMMakerSqueakGeneratorsHelp CMakeVMMakerSqueakTemplatesHelp CMakeVMMakerSqueakDesignPatternsHelp CMakeVMMakerSqueakHistoryHelp )
+
+
+ "#(CMakeVMMakerSqueakHistoryHelp CMakeVMMakerSqueakConfigurationsHelp CMakeVMMakerSqueakOverviewHelp CMakeVMMakerSqueakGeneratorsHelp CMakeVMMakerSqueakTemplatesHelp CMakeVMMakerSqueakBuildersHelp CMakeVMMakerSqueakDesignPatternsHelp configDotCmake looseEnds plugins pthreads templates tests )"!
- ^#(CMakeVMMakerSqueakHistoryHelp CMakeVMMakerSqueakOverviewHelp CMakeVMMakerSqueakConfigurationsHelp CMakeVMMakerSqueakTemplatesHelp CMakeVMMakerSqueakGeneratorsHelp CMakeVMMakerSqueakBuildersHelp CMakeVMMakerSqueakDesignPatternsHelp configDotCmake looseEnds plugins pthreads templates tests )!
Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>priority (in category 'accessing') -----
+ priority
+
+ ^ 2!
Item was changed:
----- Method: CMakeVMMakerSqueakExampleWorkflowHelp class>>bookName (in category 'accessing') -----
bookName
+ ^'Example Workflow: End User'!
- ^'Example Workflow'!
Item was changed:
----- Method: CMakeVMMakerSqueakExampleWorkflowHelp class>>examiningOutput (in category 'pages') -----
examiningOutput
+ "This method was automatically generated. Edit it using:"
+ "a HelpBrowser edit: #examiningOutput"
^HelpTopic
title: 'Examining Output'
+ contents:
+ 'TODO: tty fix apperent but in build directory as it is outputing to DO THIS NEXT /cmake.build.linux64x86w32BitCompatibility/squeak.cog.v3/build/
- contents:
- 'TODO: tty fix apperent but in build directory as it is outputing to /cmake.build.linux64x86w32BitCompatibility/squeak.cog.v3/build/
and not cmake.build.linux32_64x86
Examining the output requires two queries (both intuitive, via the intention revealing names of the Builder and Configuration)
First, we ask the builder where it has its Configurations put their output:
SqueakLinux64x86w32CompatBuilder buildDirectory
--> ''cmake.build.linux32_64x86''
The Linux32x86SqueakCogV3Config writes itself to a directory that matches its [cmake.Platform]/[Language].[VM].[MemoryModel]/[BuildType]
On my system that is:
~./..../cogVMMaker/oscogvm/cmake.[Platform]/[Language].[VM].[MemoryModel]/build
i.e.
~./..../cogVMMaker/oscogvm/cmake.build.linux32_64x86/squeak.cog.v3/build
I open a terminal and navigate to that directory:
cd ~./..../cogVMMaker/oscogvm/cmake.build.linux32_64x86/squeak.cog.v3/build
and list the contents
bash-4.2$ ls
ADPCMCodecPlugin LICENSE.txt SurfacePlugin
AsynchFilePlugin LargeIntegers Utils.cmake
B2DPlugin LocalePlugin ZipPlugin
BMPReadWriterPlugin MIDIPlugin build.cmake
BitBltPlugin Matrix2x3Plugin build.sh
CMakeLists.txt MiscPrimitivePlugin config.cmake
CroquetPlugin Mpeg3Plugin config.in
DSAPrims PLUGINS.txt directories.cmake
DropPlugin Plugins.cmake sqNamedPrims.h
FFTPlugin SecurityPlugin testDoubleWordAlignment.c
FileCopyPlugin SerialPlugin testDoubleWordOrder.c
FilePlugin SocketPlugin testLanginfoCodeset.c
FloatArrayPlugin SoundCodecPrims vm-display-X11
FloatMathPlugin SoundGenerationPlugin vm-display-null
JoystickTabletPlugin SoundPlugin vm-sound-ALSA
Klatt StarSqueakPlugin vm-sound-null
....
(NOTE TODO tty: build a query to have a configuration return its build directory path.)
+ !!' readStream nextChunkText!
- '
-
-
- !
Item was added:
+ ----- Method: CMakeVMMakerSqueakExampleWorkflowHelp class>>priority (in category 'pages') -----
+ priority
+
+ ^ 3!
Item was changed:
----- Method: CMakeVMMakerSqueakExampleWorkflowHelp class>>selectConfiguration (in category 'pages') -----
selectConfiguration
^HelpTopic
title: 'Select a Configuration'
contents:
'The Configuration Linux64x86w32BitSqueakCogV3Config is available for my platform. (i.e. a developer has done the work of encapsulating the custom CMake for us).
As stated before, I can view what Configurations are available for a platform by asking the platform Builder what it has available:
SqueakLinux64x86w32CompatBuilder
availableBuildConfigurations.
+ As of this writing the Linux64x86w32BitSqueakCogV3Config is available and I decide to use it.
- As of this writing the Linux64x86w32BitSqueakCogV3Config is available and I decide on it.
Note that the class name of the Configuration is intention-revealing. It is a Configuration for the Linux 64 platform with 32 Bit compatibility libs that encapsulates the CMake required to build the Squeak Cog V3 virtual machine. From this convention, The organization of configurations is straight-forward:
CPlatformConfigForSqueak browseHierarchy
Linux64x86w32BitSqueakCogV3Config browseHierarchy
'
!
Item was added:
+ ----- Method: CMakeVMMakerSqueakHistoryHelp class>>priority (in category 'pages') -----
+ priority
+
+ ^ 7!
Item was changed:
----- Method: CMakeVMMakerSqueakOverviewHelp class>>namingConventions (in category 'pages') -----
namingConventions
+ "This method was automatically generated. Edit it using:"
+ "a HelpBrowser edit: #namingConventions"
^HelpTopic
+ title: 'Naming Conventions'
+ contents:
- title:'Naming Conventions'
- contents:
'[PLATFORM][Language][VM][Memory Manager][BuildType][foo] IS the naming convention for CMakeVMMakerSqueak
The convention is a bottom-up design starting with Eliot Miranda''s Cog layout at
http://www.squeakvm.org/svn/squeak/branches/Cog/
In the Cog directory tree are build directories. Taking the build.linux32x86 directory as an example, we have a directory tree that looks like this:
build.linux32x86/
|-- newspeak.cog.spur
| |-- build
| |-- build.assert
| |-- build.assert.itimerheartbeat
| |-- build.debug
| |-- build.debug.itimerheartbeat
| `-- build.itimerheartbeat
|-- newspeak.cog.v3
| |-- build
......etc... .
The FORM of this layout is :
build.[PLATFORM]/
|-- [Language].[VM].[Memory Manager]/
| |-- [BuildType]
It is this form that drives a parallel naming convention and directory structure in CMakeVMMakerSqueak.
The parallel directory structure simply prefixes a ''cmake." to the directory name.
cmake.build.[PLATFORM]/
|-- [Language].[VM].[Memory Manager]
| |-- [BuildType]
Builders have the form: Squeak[Platform]Builder.
Example: SqueakBSD32x86Builder
AbstractBaseClass Configurations have the form: [Optional Prefix][Platform]Config.
Example: Linux32x86Config
+ Concrete Configurations have the form: [Optional Prefix]][Platform] [Language] [VM] [MemoryManager] [Optional Suffix] Config
- Concrete Configurations have the form: [Optional ]Prefix][PLATFORM].[Language].[VM].[Memory Manager][Suffix][Optional Foo]
Linux32x86SqueakCogV3Config
When the Linux32x86SqueakCogV3Config is configured for the buildType #build.debug it will map its output to cmake.build.linux32x86/squeak.cog.v3/build.debug/
The naming convention for Configurations takes the following form:
[Optional Prefix]][Platform] [Language] [VM] [MemoryManager] [Optional Suffix] Config.
As of 2014.12.09 the possible combinatons are:
[Prefix][Platform][Newspeak | Squeak][Cog | Sista | Stack][V3 | Spur][Foo]Config.
+ !!' readStream nextChunkText!
- '!
Item was changed:
----- Method: CMakeVMMakerSqueakOverviewHelp class>>overview (in category 'pages') -----
overview
^HelpTopic
title:'Overview'
contents:
'"CMake drives development."
Keeping the above statement in mind is the key to this package.
What we are looking for is a CMake system that correctly builds a virtual machine on a given platform.
We then encapsulate that CMake system state in CMakeVMMakerSqueak Configurations. The end user can then reproduce that CMake system on their platform.
Hopefully this package makes the above process predictable and somewhat sane.
Towards that end, this system does the following :
Stores CMake configuration in concrete subclasses of CPlatformConfigForSqueak in a predicatable manner.
Provides methods for extracting the CMake configuration from those classes.
Provides a (hopefully) newbie friendly Facade for extracting the CMake configuration via Builders (Concrete subclasses of SqueakCMakeVMMakerAbstractBuilder)
Provides (for the configuration developer) CMake command wrapper code in subclasses of CMakeTemplate.
Proves to be scriptable such that generating the CMake output can be automated (or extracted from a Seaside website).
As the SqueakVM community gains experience with CMake, I expect the quality of the generated CMake output to improve considerably. CMake is a BIG system with LOTS of stuff in it. Storing the knowledge we gain in our Squeak classes should make things a lot easier on us.
The heart of the package is CMakeGeneratorForSqueak and its two subclasses CMakeVMGeneratorForSqueak and CMakePluginGeneratorForSqueak.
CMakeVMGeneratorForSqueak collects information from subclasses of CPlatformConfigForSqueak, CMThirdpartyLibrary and InterpreterPlugins and writes it out to CMake files and associated directories.
From there, the user invokes cmake and make using a generated build.sh script.
The programmer directs the flow of the generator by coding a subclass of CPlatformConf, setting it up correctly and asking it to generate itself.
The configuration then invokes the CMakeGeneratorForSqueak passing itself as an argument.
+ The VMGeneratator extracts the information and utilizes VMPluginGenerator to generate plugin stuff, the CPlatformConf to generate other stuff and CMThirdPartyLibrary''s to generate other stuff. (TODO: tighten up this language)
- The VMGeneratator extracts the information and utilizes VMPluginGenerator to generate plugin stuff, the CPlatformConf to generate other stuff and CMThirdPartyLibrary''s to generate other stuff.
The end result is a CMake evironment that is set up to correctly build a VM
Concrete implementations of SqueakCMakeVMMakerAbstractBuilder provide an invokation facade and configuration query capabilities.
'!
Item was changed:
----- Method: CMakeVMMakerSqueakOverviewHelp class>>prerequisites (in category 'pages') -----
prerequisites
^HelpTopic
title:'Prerequisites'
contents:
+ 'As of 2016.02.06 CMakeVMMakerSqueak depends on CMakeVMMaker (a pharo implementation). This dependency will be broken in due course.
+ TODO: Break this dependency TTY
- 'The CMakeVMMakerSqueak depends on CMakeVMMaker (a pharo implementation)
CMake from http://www.cmake.org/ is required to process the output of this package.
This package was written using cmake version 2.8.12
'!
Item was changed:
----- Method: CMakeVMMakerSqueakStartHereHelp class>>nextSteps (in category 'pages') -----
nextSteps
^HelpTopic
title: 'Next Steps'
contents:
+ 'The Help Topic entitled "Example Workflow: End User" will walk you through an example workflow as executed on a GNU Linux system with the standard development tools. Macintosh and Windows dev tools will differ (N.B. tty The primary difference is that they have not been written yet (: ).
- 'The next Help Topic entitled "Example Workflow" will walk you through an example workflow as executed on a GNU Linux system with the standard development tools. Macintosh and Windows dev tools will differ (N.B. tty The primary difference is that they have not been written yet (: ).
+
The Help Topic entitled "Developer Guide" will explain the design of and how to add and modify the components of the CMakeVMMakerSqueak system.
'!
Item was changed:
----- Method: CMakeVMMakerSqueakStartHereHelp class>>overview (in category 'pages') -----
overview
^HelpTopic
title: 'Overview'
contents:
'CMakeVMMakerSqueak is a collection of tools for generating CMake files. The high-level workflow is:
1. Instruct CMakeVMMakerSqueak to generate CMake build directories and CMake configuration files.
2. Invoke the ''cmake'' command at the top level of the generated cmake build tree
+
-
3. CMake configures and outputs the build system files for that platform.
4. The user invokes the native build system.
+ 5. The native build system compiles a VM.
- 5. A VM is produced under a ~/...../''cmake.platforms'' subdirectory.
+ The ''Example Workflow: End User'' page in this Help book provides an example of the above workflow with minimal explanation.
- The ''Example Workflow'' page in this Help book provides an example of the above workflow with minimal explanation.
+
In-depth explanations of the system(s), tools and how to use them, see the ''CMakeVMMaker Developer Guide'''!
Item was added:
+ ----- Method: CMakeVMMakerSqueakStartHereHelp class>>priority (in category 'pages') -----
+ priority
+
+ ^ 1!
Item was changed:
----- Method: CMakeVMMakerSqueakStartHereHelp class>>requirements (in category 'pages') -----
requirements
+ "This method was automatically generated. Edit it using:"
+ "a HelpBrowser edit: #requirements"
^HelpTopic
title: 'Requirements'
+ contents:
+ 'CMakeVMakerSqueak (as of 2014.12.09) depends on the Pharo package CMakeVMMaker. This dependency will be broken in a future release.
+ A (possibly out-of-sync) Monticello version is available at:
- contents:
- 'CMakeVMakerSqueak (as of 2014.12.09) depends on the Pharo package CMakeVMMaker. A (possibly out-of-sync) Monticello version is available at:
MCHttpRepository
location: ''http://source.squeak.org/VMMaker''
user: ''''
password: ''''
CMakeVMMakerSqueak is available at:
MCHttpRepository
location: ''http://source.squeak.org/VMMaker''
user: ''''
password: ''''
+
CMake is available from http://www.cmake.org. The version of CMake used as of 2014.12.09 is 2.8.12
CMake provides a cmake_minimum_required(..) command, so newer versions should be ok.
- The next Help Topic entitled "Example Workflow" will walk you through an example workflow is presented on a GNU Linux system with the standard development tools. Macintosh and Windows dev tools will differ.
+
+ !!' readStream nextChunkText!
- '!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>createTheConfiguration (in category 'pages') -----
createTheConfiguration
^HelpTopic
title:'Create the Configuration'
contents:
'Our new Concrete Configuration must be created as a subclass of our Platform''s Abstract Base Class.
+ SInce I am creating a Squeak Cog Spur config for the CMakeVMMakerSqueak-Linux64X86-32BitCompatibility Platform I choose the name:
- SInce I am creating a Squeak Cog V3 config for the Linux32x86 Platform I choose the name:
+ Linux64x86w32BitSqueakCogSpurConfig.
- Linux32x86SqueakCogV3Config.
(For a discussion on naming conventions evaluate:
HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp
)
+ To create it, I must subclass the Abstract Base Class for my Platform like so:
- To create it, I subclass the Abstract Base Class for my Platform like so:
+ Linux64x86w32BitConfigUsrLib subclass: #Linux64x86w32BitSqueakCogSpurConfig
- Linux32x86Config subclass: #Linux32x86SqueakCogV3Config
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: ''CMakeVMMakerSqueak-Linux64X86-32BitCompatibility''
- category: ''CMakeVMMakerSqueak-Linux32x86''
However, being lazy, I am going to copy an existing Configuration that is similar to what I want.
Today I choose Linux64x86w32BitSqueakCogV3Config from the CMakeVMMakerSqueak-Linux64X86-32BitCompatibility Platform category
+ I copy the class and then change its name, parent and class category to get:
- I copy the class and then change its parent and class category to get:
+ Linux64x86w32BitConfigUsrLib subclass: #Linux64x86w32BitSqueakCogSpurConfig
- Linux32x86Config subclass: #Linux32x86SqueakCogV3Config
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: ''CMakeVMMakerSqueak-Linux64X86-32BitCompatibility''
- category: ''CMakeVMMakerSqueak-Linux32x86''
- At this point I re-run all my Tests. For me, all tests pass.
-
I then query by Builder to see if it sees the new Configuration in the platform:
+ SqueakLinux64x86w32CompatBuilder configurationsCategory
+ --> ''CMakeVMMakerSqueak-Linux64X86-32BitCompatibility''
- SqueakLinux32x86Builder configurationsCategory
- --> ''CMakeVMMakerSqueak-Linux32x86''
+ SqueakLinux64x86w32CompatBuilder availableBuildConfigurations
+ --> a SortedCollection(#Linux64x86w32BitSqueakCogSpurConfig #Linux64x86w32BitSqueakCogV3Config)
+ "Here we see our new Configuration is visible to the Builder"
- SqueakLinux32x86Builder availableBuildConfigurations
- --> a SortedCollection(#Linux32x86SqueakCogV3Config) "Here we see our new Configuration is visible to the Builder"
+ SqueakLinux64x86w32CompatBuilder unAvailableBuildConfigurations
+ --> a SortedCollection(#Linux64x86w32BitConfigUsrLib #Linux64x86w32BitConfigUsrLib32) "Our Abstract Base Classes are not available to be built"
- SqueakLinux32x86Builder unAvailableBuildConfigurations
- --> a SortedCollection(#Linux32x86Config) "The Abstract Base Class is not available to be built"
+ SqueakLinux64x86w32CompatBuilder availableBuildTypesFor: #Linux64x86w32BitSqueakCogSpurConfig
+ --> an OrderedCollection(#build #buildAssert) "The Configuration I copied has two Build Types coded and available."
- SqueakLinux32x86Builder availableBuildTypesFor: #Linux32x86SqueakCogV3Config
- --> an OrderedCollection(#build) "The Configuration I copied has one Build Type coded/available."
+ SqueakLinux64x86w32CompatBuilder sourceDirectoryFor:#Linux64x86w32BitSqueakCogSpurConfig
+ --> "src" "Where the vm source code is located (we will be changing this)"
- SqueakLinux32x86Builder sourceDirectoryFor:#Linux32x86SqueakCogV3Config
- --> "src" "Where the vm source code is located"
My new configuration is correctly named and in the correct place.
+ At this point I re-run all my Tests.
+ TestRunner open
+ For me, all tests pass.
+
+ In the next topic we cover how to hide our new Configuration from a builder.
+
'
!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>excludingConfigFromBuilds (in category 'pages') -----
excludingConfigFromBuilds
^HelpTopic
title:'Excluding a Config From Builds'
contents:
'Configurations can hide themselves from , or make themselves visible to Builders via their ''excludeFromBuild'' method.
excludeFromBuild
^false "build this configuration"
" ^true do not build this configuration"
+ In our case, the Builder shows us that Linux32x86SqueakCogSpurConfig is capable of being built (I had copied an existing, working Configuration):
- This functionality is included with an eye towards easing automated builds for all platforms and configurations.
+ SqueakLinux64x86w32CompatBuilder availableBuildConfigurations
+ --> a SortedCollection(#Linux64x86w32BitSqueakCogSpurConfig #Linux64x86w32BitSqueakCogV3Config)
- In our case, the Builder shows us that Linux32x86SqueakCogV3Config is capable of being built (I had copied an existing, working Configuration):
- SqueakLinux32x86Builder availableBuildConfigurations
- --> an OrderedCollection(#Linux32x86SqueakCogV3Config)
To exclude it, override (or alter) the Configurations ''excludeFromBuild'' method
+ Linux64x86w32BitSqueakCogSpurConfig >>excludeFromBuild
- Linux32x86SqueakCogV3Config >>excludeFromBuild
"over-ride to exclude yourself from a build"
^true
And the Configuration is hidden from the Builder...
+ SqueakLinux64x86w32CompatBuilder availableBuildConfigurations
+ --> a SortedCollection(#Linux64x86w32BitSqueakCogV3Config)
- SqueakLinux32x86Builder availableBuildConfigurations
- --> an OrderedCollection()
However, since I am developing locally, I need it to be visible to the Builder , so I set it as so:
+ Linux64x86w32BitSqueakCogSpurConfig >>excludeFromBuild
- Linux32x86SqueakCogV3Config >>excludeFromBuild
"over-ride to exclude yourself from a build"
^false
And my Builder can see it again...
+ SqueakLinux64x86w32CompatBuilder availableBuildConfigurations
+ --> a SortedCollection(#Linux64x86w32BitSqueakCogSpurConfig #Linux64x86w32BitSqueakCogV3Config)
- SqueakLinux32x86Builder availableBuildConfigurations
- an OrderedCollection(#Linux32x86SqueakCogV3Config)
N.B. tty. My opinion is that this is a weak way of doing this, but I have not thought through how to do this elegantly.
+ This functionality is included with an eye towards easing automated builds for all platforms and configurations.'!
-
-
-
-
-
-
- '!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>identifyBuilder (in category 'pages') -----
identifyBuilder
^HelpTopic
title:'Identify Builder'
contents:
'My new Configuration will be managed by a Builder.
Builders are located in the CMakeVMMakerSqueak-Builder class category.
Builders are subclasses of SqueakCMakeVMMakerAbstractBuilder.
+ SqueakCMakeVMMakerAbstractBuilder browseHierarchy
Builders are named according to the Platform they manage.
(For a discussion on naming conventions evaluate:
HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp
)
Builders manage configurations for one Platform in one class category.
- My platform is Linux 32x86.
+ My platform is Linux Linux64x86 with 32 bit compatability libs stored in /usr/lib (other linux use /usr/lib32 for this.)
- I suspect that the SqueakLinux32x86Builder as the Builder that will manage my new configuration.
+ I suspect that the SqueakLinux64x86w32CompatBuilder as the Builder that will manage my new configuration.
+
I confirm this by sending it the ''configurationsCategory'' message as shown below:
+ SqueakLinux64x86w32CompatBuilder configurationsCategory
+ -->''CMakeVMMakerSqueak-Linux64X86-32BitCompatibility'' <---this is the correct class category for my Platform.
- SqueakLinux32x86Builder configurationsCategory
- -->''CMakeVMMakerSqueak-Linux32x86'' <---this is the correct class category for my Platform.
This is correct Builder for my new Configuration.
I can query the Builder for some more information:
+ SqueakLinux64x86w32CompatBuilder availableBuildConfigurations
+ a SortedCollection(#Linux64x86w32BitSqueakCogV3Config) <--A Cog V3 configuration exists.
- SqueakLinux32x86Builder availableBuildConfigurations
- a SortedCollection() <--there are no concrete configurations in place as of this writing.
+ SqueakLinux64x86w32CompatBuilder unAvailableBuildConfigurations
+ --> a SortedCollection(#Linux64x86w32BitConfigUsrLib #Linux64x86w32BitConfigUsrLib32)
+ <--these are platform specific Abstract Base Classes. Abstract Base Classes cannot be built, hence they are unavailable.
- SqueakLinux32x86Builder unAvailableBuildConfigurations
- a SortedCollection(#Linux32x86Config) <--this is my Abstract Base Class. Abstract Base Classes cannot be built, hence they are unavailable.
+ SqueakLinux64x86w32CompatBuilder buildDirectory
+ -->''cmake.build.linux64x86w32BitCompatibility'' <--this matches my platform
- SqueakLinux32x86Builder buildDirectory
- -->''cmake.build.linux32x86'' <--this matches my platform
+ We will be using the SqueakLinux64x86w32CompatBuilder in tandem with Tests during Configuration development.'
- We will be using the SqueakLinux32x86Builder in tandem with Tests during Configuration development.'
!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>identifyPlatform (in category 'pages') -----
identifyPlatform
^HelpTopic
title:'Identify Platform'
contents:
+ 'My target platform is 64 bit Linux on X86 with 32 bit compatibility libraries stored in /usr/lib.
- 'My target platform is Linux 32 bit x86.
I identify my Platform in the existing CMakeVMMakerSqueak-xyz class categories.
- I choose the CMakeVMMakerSqueak-Linux32x86 as the location for my new Configuration.
If I wanted a configuration for MacOSX32x86, I would place my configuration in CMakeVMMakerSqueak-MacOSX32x86.
If SunOSx3x86 then CMakeVMMakerSqueak-SunOS32x86.
+ etc.
- etc, etc.
+ For a discussion on naming conventions evaluate:
-
- (For a discussion on naming conventions evaluate:
HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp
- )
-
-
'!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>identifyPlatformAbstractBaseClass (in category 'pages') -----
identifyPlatformAbstractBaseClass
^HelpTopic
title:'Identify Abstract Base Class '
contents:
'My new configuration must be a subclass of my Platform''s Abstract Base Class.
+ A Platform Abstract Base Class encapsulates common platform information.
- In class category CMakeVMMakerSqueak-Linux32x86 the Abstract Base Class is Linux32x86Config
+ In CMakeVMMakerSqueak-Linux64X86-32BitCompatibility class category I see two Abstract Base Classes (typically there is only one). They are:
- Examples of Abstract Base Classes in other class categories (category->Abstract Base Class) include:
+ Linux64x86w32BitConfigUsrLib
+ Linux64x86w32BitConfigUsrLib32
+
+ The Suffixes ''UsrLib'' and ''UsrLib32'' refer to the location of the 32 bit compatablity libs.
+ On my system they are in /usr/lib, so I choose Linux64x86w32BitConfigUsrLib as my Abstract Base Class
+
+ Examples of Abstract Base Classes in other class categories include:
+
CMakeVMMakerSqueak-BSD32x86 -> SqueakBSD32x86Config
CMakeVMMakerSqueak-IA32-Bochs -> SqueakIA32BochsConfig
CMakeVMMakerSqueak-IOS -> SqueakIOSConfig
CMakeVMMakerSqueak-IOS -> SqueakIOSConfig
CMakeVMMakerSqueak-Linux32ARMv6 -> Linux32ARMv6Config
+ CMakeVMMakerSqueak-Linux64x64 -> Linux64x64Config
- CMakeVMMakerSqueak-Linux64X86-32BitCompatibility -> Linux64x86w32BitConfig
- CMakeVMMakerSqueak-LinuxX86-64 -> Linux64Config
CMakeVMMakerSqueak-MacOSPowerPC -> SqueakMacOSXPowerPCConfig
CMakeVMMakerSqueak-MacOSX32x86 -> SqueakMacOSX32x86Config
CMakeVMMakerSqueak-SunOS32x86 -> SqueakSunOS32x86Config
CMakeVMMakerSqueak-Win32x86 -> SqueakWin32x86Config
I can identify the Abstract Base Class in several ways
+ 1. It is a topmost class in the class heirarchy for that platform/class category
- 1. It is the topmost class in the class category for that platform
2. It is named after its platform
3. It answers #true to the message isAbstractBaseClass
+ Linux64x86w32BitConfigUsrLib isAbstractBaseClass
- Linux32x86Config isAbstractBaseClass
--> true
- 4. Its class initialize method sets its isAbstractBaseClass class instance variable to #true
- 5. It is the only Abstract Base Class in its immediate class heirarchy.
+ In this workflow example I ideduce that the AbstractBaseClass for my Platform is Linux64x86w32BitConfigUsrLib'!
- My new configurations will be a subclass of the AbstractBaseClass for my platform.
-
- In this workflow example the AbstractBaseClass for my Platform is Linux32x86Config
-
- '!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>overview (in category 'pages') -----
overview
^HelpTopic
title:'Overview'
contents:
+ 'This Help Topic presents the workflow the author used in creating the Squeak, Cog, Spur CMake configuration for a 64 bit Slackware 14.1 system.with 32 bit compatability libs in /usr/lib
- 'This Help Topic presents the workflow the author used in creating the Squeak, Cog, V3 CMake configuration for a pure 32 bit Slackware 14.1 system.
-
The steps involved should be the same for any platform.'!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>setAvailableBuildTypes (in category 'pages') -----
setAvailableBuildTypes
^HelpTopic
title:'Setting Available Build Types'
contents:
+ 'Configurations inform Builders what BuildTypes they support. via the availableBuildTypes method
- 'Configurations inform Builders what BuildTypes they support. via the availableBuildTypes method*
Here is my Builder asking my new Configuration what build types it supports (remember, this Configuration was copied, so it has been configured already)
+ SqueakLinux64x86w32CompatBuilder availableBuildTypesFor: #Linux64x86w32BitSqueakCogSpurConfig
+ --> an OrderedCollection(#build #buildAssert)
- SqueakLinux32x86Builder availableBuildTypesFor: #Linux32x86SqueakCogV3Config
- -->an OrderedCollection(#build)
- In our Abstract Base Class (Which, you recall cannot be buil)for our Platform, we default to all build types.
+ In our Abstract Base Class (Which, you recall cannot be buil)for our Platform, we default to no build types.
- Linux32x86Config>>availableBuildTypes
- ^SqueakCMakeVMMakerAbstractBuilder default allBuildTypes
+ Linux64x86w32BitConfigUsrLib>>availableBuildTypes
+ ^SqueakCMakeVMMakerAbstractBuilder default noBuildTypes
- Evaluating the return gives us:
+
+ To get an idea of what buildTypes are available system wide evaluate
SqueakCMakeVMMakerAbstractBuilder default allBuildTypes
-->an OrderedCollection(#build #buildAssert #buildAssertITimerHeartbeat #buildDebug #buildDebugITimerHeartbeat #buildITimerHeartbeat #buildMultiThreaded #buildMultiThreadedAssert #buildMultiThreadedDebug #buildNone)
To set the available build types for a Concrete Configurations we override the AbstactBaseClass''s method and SUBTRACT OUT what we do not want. Like so:
+ Since I am starting simple, I want my configuration to build a vanilla build. To do this I remove all but #build buildType like so
+
+ Linux64x86w32BitSqueakCogSpurConfig >> availableBuildTypes
- Linux32x86SqueakCogV3Config >> availableBuildTypes
^SqueakCMakeVMMakerAbstractBuilder default allBuildTypes copyWithoutAll: #( #buildAssert #buildAssertITimerHeartbeat #buildDebug #buildDebugITimerHeartbeat #buildITimerHeartbeat #buildMultiThreaded #buildMultiThreadedAssert #buildMultiThreadedDebug #buildNone)
+ As I code more build types in my configuration, I subtract out
- Here I show what happens when I subtract more from the available pool. Here I set my Configuration to only omit 2 build types:
Linux32x86SqueakCogV3Config >> availableBuildTypes
^SqueakCMakeVMMakerAbstractBuilder default allBuildTypes copyWithoutAll: #( #buildMultiThreadedDebug #buildNone)
With the result that my Builder shows the removed items as Available Build Types:
SqueakLinux32x86Builder availableBuildTypesFor: #Linux32x86SqueakCogV3Config
--> an OrderedCollection(#build #buildAssert #buildAssertITimerHeartbeat #buildDebug #buildDebugITimerHeartbeat #buildITimerHeartbeat #buildMultiThreaded #buildMultiThreadedAssert)
Since I will only be developing the #build buildType for now, I put it as so:
Linux32x86SqueakCogV3Config>>availableBuildTypes
^SqueakCMakeVMMakerAbstractBuilder default allBuildTypes copyWithoutAll: #( #buildAssert #buildAssertITimerHeartbeat #buildDebug #buildDebugITimerHeartbeat #buildITimerHeartbeat #buildMultiThreaded #buildMultiThreadedAssert #buildMultiThreadedDebug #buildNone)
and verify it is correct:
SqueakLinux32x86Builder availableBuildTypesFor: #Linux32x86SqueakCogV3Config
-->an OrderedCollection(#build)
*N.B. tty. In my opinion, this is a weak design on my part. as it relies on the developr to set it up. If there is an elegant way to do this , I am for it.
'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirARMv6 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirARMv6 (in category 'cmake directory ') -----
dirARMv6
^'cmake.build.arm.v6'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirAndroid (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirAndroid (in category 'cmake directory ') -----
dirAndroid
^'Do Not Build. See Class Comment'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBSD32x86 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBSD32x86 (in category 'cmake directory ') -----
dirBSD32x86
^'cmake.build.bsd32x86'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuild (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuild (in category 'cmake directory ') -----
dirBuild
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #build!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildAssert (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildAssert (in category 'cmake directory ') -----
dirBuildAssert
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #buildAssert!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildAssertITimerHeartbeat (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildAssertITimerHeartbeat (in category 'cmake directory ') -----
dirBuildAssertITimerHeartbeat
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #buildAssertITimerHeartbeat!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildDebug (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildDebug (in category 'cmake directory ') -----
dirBuildDebug
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #debug!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildDebugITimerHeartbeat (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildDebugITimerHeartbeat (in category 'cmake directory ') -----
dirBuildDebugITimerHeartbeat
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #debugITimerHeartbeat!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildDebugMultiThreaded (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildDebugMultiThreaded (in category 'cmake directory ') -----
dirBuildDebugMultiThreaded
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #debugMultiThreaded!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildITimerHeartbeat (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildITimerHeartbeat (in category 'cmake directory ') -----
dirBuildITimerHeartbeat
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #buildITimerHeartbeat!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildLanguageVMMM (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildLanguageVMMM (in category 'cmake directory ') -----
dirBuildLanguageVMMM
"the directory under buildPlatformDir example: newspeak.cog.spur. use squeak.cog.v3 as default"
self subclassResponsibility!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildMultiThreaded (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildMultiThreaded (in category 'cmake directory ') -----
dirBuildMultiThreaded
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #buildMultiThreaded!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildMultiThreadedAssert (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildMultiThreadedAssert (in category 'cmake directory ') -----
dirBuildMultiThreadedAssert
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #buildMultiThreadedAssert!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildMultiThreadedDebug (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildMultiThreadedDebug (in category 'cmake directory ') -----
dirBuildMultiThreadedDebug
^SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo at: #buildMultiThreadedDebug!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirBuildPlatform (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirBuildPlatform (in category 'cmake directory ') -----
dirBuildPlatform
"the directory for the platform. example: build.linux32x86"
self subclassResponsibility!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirIA32Bochs (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirIA32Bochs (in category 'cmake directory ') -----
dirIA32Bochs
^'cmake.build.ia32bochs'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirIOS (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirIOS (in category 'cmake directory ') -----
dirIOS
^'cmake.build.ios'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirInstall (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirInstall (in category 'cmake directory ') -----
dirInstall
"the directory of the finished product.. the place where 'make install' puts stuff.
SystemNavigation default browseMethodsWhoseNamesContain: 'outputDir'
"
self subclassResponsibility
!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirLinux32Armv6 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirLinux32Armv6 (in category 'cmake directory ') -----
dirLinux32Armv6
^'cmake.build.linux32armv6'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirLinux32x86 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirLinux32x86 (in category 'cmake directory ') -----
dirLinux32x86
^'cmake.build.linux32x86'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirLinux64x64 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirLinux64x64 (in category 'cmake directory ') -----
dirLinux64x64
^'cmake.build.linux64x64'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirLinux64x86w32BitCompatibility (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirLinux64x86w32BitCompatibility (in category 'cmake directory ') -----
dirLinux64x86w32BitCompatibility
^'cmake.build.linux64x86w32BitCompatibility'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirMacOS (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirMacOS (in category 'cmake directory ') -----
dirMacOS
^'cmake.build.macos'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirMacOSPowerPC (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirMacOSPowerPC (in category 'cmake directory ') -----
dirMacOSPowerPC
^'cmake.build.macospowerpc'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirMacOSX32x86 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirMacOSX32x86 (in category 'cmake directory ') -----
dirMacOSX32x86
^'cmake.build.macosx32x86'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirOutput (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirOutput (in category 'cmake directory ') -----
dirOutput
^'cmake.products'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirSource (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirSource (in category 'cmake directory ') -----
dirSource
^'src'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirSunOS32x86 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirSunOS32x86 (in category 'cmake directory ') -----
dirSunOS32x86
^'cmake.build.sunos32x86'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>dirWin32x86 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>dirWin32x86 (in category 'cmake directory ') -----
dirWin32x86
^'cmake.build.win32x86'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>externalModulesDir (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>externalModulesDir (in category 'cmake directory ') -----
externalModulesDir
"answer the location in VM bundle, where plugins and rest of dynamic libs will be copied,
"
self subclassResponsibility!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>newspeakCogSpur (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>newspeakCogSpur (in category 'cmake directory ') -----
newspeakCogSpur
^'newspeak.cog.spur'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>newspeakCogV3 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>newspeakCogV3 (in category 'cmake directory ') -----
newspeakCogV3
^'newspeak.cog.v3'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>newspeakSistaSpur (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>newspeakSistaSpur (in category 'cmake directory ') -----
newspeakSistaSpur
^'newspeak.sista.Spur'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>newspeakSistaV3 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>newspeakSistaV3 (in category 'cmake directory ') -----
newspeakSistaV3
^'newspeak.sista.v3'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>newspeakStackSpur (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>newspeakStackSpur (in category 'cmake directory ') -----
newspeakStackSpur
^'newspeak.stack.spur'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>newspeakStackV3 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>newspeakStackV3 (in category 'cmake directory ') -----
newspeakStackV3
^'newspeak.stack.v3'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>oscogvm (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>oscogvm (in category 'cmake directory ') -----
oscogvm
^'oscogvm'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>outputDirName (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>outputDirName (in category 'cmake directory ') -----
outputDirName
^ 'products'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>squeakCogSpur (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>squeakCogSpur (in category 'cmake directory ') -----
squeakCogSpur
^'squeak.cog.spur'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>squeakCogV3 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>squeakCogV3 (in category 'cmake directory ') -----
squeakCogV3
^'squeak.cog.v3'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>squeakSistaSpur (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>squeakSistaSpur (in category 'cmake directory ') -----
squeakSistaSpur
^'squeak.sista.Spur'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>squeakSistaV3 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>squeakSistaV3 (in category 'cmake directory ') -----
squeakSistaV3
^'squeak.sista.v3'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>squeakStackSpur (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>squeakStackSpur (in category 'cmake directory ') -----
squeakStackSpur
^'squeak.stack.spur'!
Item was changed:
+ ----- Method: CPlatformConfigForSqueak>>squeakStackV3 (in category 'cmake directory') -----
- ----- Method: CPlatformConfigForSqueak>>squeakStackV3 (in category 'cmake directory ') -----
squeakStackV3
^'squeak.stack.v3'!
Item was added:
+ Linux64x86w32BitConfigUsrLib subclass: #Linux64x86w32BitSqueakCogSpurConfig
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'CMakeVMMakerSqueak-Linux64X86-32BitCompatibility'!
+
+ !Linux64x86w32BitSqueakCogSpurConfig commentStamp: '<historical>' prior: 0!
+ I am a configuration for 64 bit Linux with 32 Bit compatability libraries.
+ I have been tested with Slackware64 14.1 which uses /usr/lib for 32 bit compatability libs and /usr/lib64 for normal libs.
+
+ If you have a machine which uses /usr/lib for 64 bit libs and /usr/lib32 for 32 bit compat libs then subclass me and modify (at least) the following methods:
+
+ compilerFlags
+ externalLibraries
+ linkFlagsBuild
+ linkerFlags
+
+
+ SqueakLinux64x86w32CompatBuilder
+ configureABuildFor: #Linux64x86w32BitSqueakCogV3Config withBuildType: #build;
+ enableMessageTracking: true;
+ generateByTemplate.
+
+ HelpBrowser openOn: CMakeVMMakerSqueakDeveloperHelp
+
+
+ Getting the UUIDPlugin to compile (not work, unfortunately, but compile) required modifying oscogvm/platforms/unix/plugins/acinclude.m4.
+ to read: (my Slackware system has <uuid> and uuidgen. then setting the
+
+ # -*- sh -*-
+
+ AC_MSG_CHECKING([for UUID support])
+ AC_TRY_COMPILE([#include <sys/uuid.h>],[uuid_generatorxyz;],[
+ AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(uuid, uuid_generator_xyz,LIB_UUID="-luuid" )
+ ],[
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING([for UUID support uuid/uuid.h] and uuid_generate)
+ AC_TRY_COMPILE([#include <uuid/uuid.h>],[uuid_generate;],[
+ AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(uuid, uuid_generate, LIB_UUID="-luuid")],[
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING([for UUID support uuid and uuidgen] )
+ AC_TRY_COMPILE([#include <uuid.h>],[uuidgen;],[
+ AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(uuid, uuidgen, LIB_UUID="-luuid" )],[
+ AC_MSG_RESULT(no)
+ AC_PLUGIN_DISABLE
+ ])
+ ])
+ ])
+
+
+
+
+ #define HAVE_UUID_H 1
+ #define HAVE_UUIDGEN 1
+
+ fl;ags in my configH method
+
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig class>>isAbstractBaseClass (in category 'as yet unclassified') -----
+ isAbstractBaseClass
+ ^false
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>availableBuildTypes (in category 'as yet unclassified') -----
+ availableBuildTypes
+ "2.14.12.09 only buildType implemented is #build so I remove #build from the below OrderedCollection."
+ ^SqueakCMakeVMMakerAbstractBuilder default allBuildTypes copyWithoutAll: #( #buildAssertITimerHeartbeat #buildDebug #buildDebugITimerHeartbeat #buildITimerHeartbeat #buildMultiThreaded #buildMultiThreadedAssert #buildMultiThreadedDebug #buildNone)!
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>cmakeAddDefinitionsBuild (in category 'cmake buildType redirects') -----
+ cmakeAddDefinitionsBuild
+ |definitions|
+ definitions:=#(
+ '-DNDEBUG'
+ '-DDEBUGVM=0'
+ ' -DLSB_FIRST=1'
+ '-D_GNU_SOURCE'
+ '-D_FILE_OFFSET_BITS=64'
+ " '-DUSE_GLOBAL_STRUCT=0'"
+ '-DCOGMTVM=0') .
+
+ (enabledebugmessages)
+ ifTrue:[ templates
+ addLast:((CMakeMessage new) message: (self class name) , 'cmakeAddDefinitionsBuild')
+ ] .
+ templates
+ addLast:((CMakeAddDefinitions new) definitions: definitions).
+
+ " templates
+ addLast:((CMakeAddDefinitions new) definitions: (self compilerDefinitions asOrderedCollection)). <--this was the old pharo deprecated legacy code approach that is unsuitable for the multiple buildTypes each Configuration must support"
+
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>cmakeAddDefinitionsBuildAssert (in category 'cmake buildType redirects') -----
+ cmakeAddDefinitionsBuildAssert
+ |definitions|
+ "copy-n-paste from /build.linux32x86/squeak.cog.v3/build.assert/mvm file"
+ definitions:=#(
+ '-DDEBUGVM=0'
+ '-D_GNU_SOURCE'
+ '-D_FILE_OFFSET_BITS=64'
+ '-DCOGMTVM=0'
+ ) .
+
+ (enabledebugmessages)
+ ifTrue:[ templates
+ addLast:((CMakeMessage new) message: (self class name) , 'cmakeAddDefinitionsBuildAssert')
+ ] .
+ templates
+ addLast:((CMakeAddDefinitions new) definitions: definitions).
+
+ " templates
+ addLast:((CMakeAddDefinitions new) definitions: (self compilerDefinitions asOrderedCollection)). <--this was the old pharo deprecated legacy code approach that is unsuitable for the multiple buildTypes each Configuration must support"
+
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>cmakeCFlagsBuild (in category 'cmake buildType redirects') -----
+ cmakeCFlagsBuild
+ |cflags|
+ self flag:'tty'. "#build should have -O2"
+ cflags:= String streamContents: [:stream | (self compilerFlags) asStringOn: stream delimiter: ' ' ].
+ cflags:='"', cflags, '"'.
+ (enabledebugmessages)
+ ifTrue:[ templates
+ addLast:((CMakeMessage new) message: (self class name) , 'cmakeCFlagsBuild')
+ ] .
+ templates
+ addLast:((CMakeSet new) variable:'CMAKE_C_FLAGS' value: '${CMAKE_C_FLAGS} ', cflags );
+ addLast:((CMakeSet new) variable:'CMAKE_C_FLAGS_RELEASE' value: '${CMAKE_CXX_FLAGS_RELEASE} ', cflags );
+ addLast:((CMakeSet new) variable:'CMAKE_C_FLAGS_DEBUG' value: '${CMAKE_CXX_FLAGS_DEBUG} ',cflags);
+ addLast:((CMakeSet new) variable:'CMAKE_CXX_FLAGS' value: '${CMAKE_CXX_FLAGS} ', cflags );
+ addLast:((CMakeSet new) variable:'CMAKE_CXX_FLAGS_RELEASE' value: '${CMAKE_CXX_FLAGS_RELEASE} ', cflags );
+ addLast:((CMakeSet new) variable:'CMAKE_CXX_FLAGS_DEBUG' value: '${CMAKE_CXX_FLAGS_DEBUG} ', cflags ).
+
+ (enabledebugmessages) "take a peek at em"
+ ifTrue:[ templates
+ addLast:((CMakeMessage new) message: 'CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}');
+ addLast:((CMakeMessage new) message: 'CMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}');
+ addLast:((CMakeMessage new) message: 'CMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}');
+ addLast:((CMakeMessage new) message: 'CMAKE_C_FLAGS=${CMAKE_C_FLAGS}');
+ addLast:((CMakeMessage new) message: 'CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}');
+ addLast:((CMakeMessage new) message: 'CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}')
+ ] .
+
+
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>cmakeSetSourceFilesPropertiesBuild (in category 'cmake buildType redirects') -----
+ cmakeSetSourceFilesPropertiesBuild
+ |cflags|
+ cflags:=String streamContents: [:stream | (self compilerFlags) asStringOn: stream
+ delimiter: ' ' ].
+ cflags := '"' , cflags , '"'.
+ (enabledebugmessages)
+ ifTrue:[ templates
+ addLast:((CMakeMessage new) message: (self class name) , 'cmakeSetSourceFilesPropertiesBuild')
+ ] .
+ templates
+ addLast:((CMakeSetSourceFilesProperties new)
+ files: (OrderedCollection with: '${srcVMDir}/cogit.c')
+ propertiesandvalues:{'COMPILE_FLAGS' . cflags});
+ addLast:((CMakeSetSourceFilesProperties new)
+ files: (OrderedCollection with: '${targetPlatform}/vm/sqUnixHeartbeat.c')
+ propertiesandvalues:{'COMPILE_FLAGS' . cflags}).!
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>cogitClass (in category 'source generation') -----
+ cogitClass
+ ^ StackToRegisterMappingCogit
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>compilerDefinitions (in category 'compiling') -----
+ compilerDefinitions
+
+ self deprecated: 'Legacy method from pharo approach. We need different definitions for each buildType'.
+
+ ^#(
+ '-DNDEBUG'
+ '-DDEBUGVM=0'
+ ' -DLSB_FIRST=1'
+ '-D_GNU_SOURCE'
+ '-D_FILE_OFFSET_BITS=64'
+ " '-DUSE_GLOBAL_STRUCT=0'"
+ '-DCOGMTVM=0')
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>compilerFlags (in category 'compiling') -----
+ compilerFlags
+ ^#("'-Wall'"
+ '-w'
+ '-m32'
+ '-msse2'
+ " '-g3' extra debugging info"
+ '-O1'
+ " '-fno-caller-saves'
+ '-fno-tree-pre'")
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>defaultExternalPlugins (in category 'plugins') -----
+ defaultExternalPlugins
+ ""
+ ^#()!
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>dirBuildLanguageVMMM (in category 'cmake') -----
+ dirBuildLanguageVMMM
+ ^self squeakCogV3!
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>dirInstall (in category 'cmake') -----
+ dirInstall
+ "the directory of the finished product.. the place where 'make install' puts stuff.
+ SystemNavigation default browseMethodsWhoseNamesContain: 'outputDir'
+ "
+ ^self squeakCogV3!
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>excludeFromBuild (in category 'cmake') -----
+ excludeFromBuild
+ ^false "build this configuration"
+ " ^true" "do not build this configuration"
+
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>executableName (in category 'cmake') -----
+ executableName
+ ^ self vmCogExecutableName!
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>externalLibsBuild (in category 'cmake buildType redirects') -----
+ externalLibsBuild
+ ^self externalLibraries asOrderedCollection.
+ !
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>interpreterClass (in category 'source generation') -----
+ interpreterClass
+ ^ CoInterpreter!
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>linkerFlags (in category 'compiling') -----
+ linkerFlags
+ ^#( '-Wl'
+ '-z'
+ 'now'
+ )
+ !
Item was changed:
Object subclass: #SqueakCMakeVMMakerAbstractBuilder
instanceVariableNames: 'buildTypeAndDirectoryInfo config'
classVariableNames: ''
poolDictionaries: ''
category: 'CMakeVMMakerSqueak-Builder'!
SqueakCMakeVMMakerAbstractBuilder class
instanceVariableNames: 'default'!
+ !SqueakCMakeVMMakerAbstractBuilder commentStamp: 'tty 2/7/2016 08:51' prior: 0!
- !SqueakCMakeVMMakerAbstractBuilder commentStamp: 'tty 12/9/2014 12:41' prior: 0!
I am an abstract base class for various CMakeVMMakerSqueak builders.
I am a singleton.
I am a facade to the various Squeak[Platform][WordSize][VM][MemoryManager]Config classes
I provide facilities to query my configurations.
I use the Visitor pattern in collecting information about my configurations.
+ HelpBrowser openOn: CMakeVMMakerSqueakDeveloperHelp.
- HelpBrowser openOn: CMakeVMMakerSqueakHelp.
+
!
SqueakCMakeVMMakerAbstractBuilder class
instanceVariableNames: 'default'!
More information about the Vm-dev
mailing list