VM Maker: CMakeVMMakerSqueak-tty.99.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: CMakeVMMakerSqueak-tty.99.mcz

commits-2
 
Timothy M uploaded a new version of CMakeVMMakerSqueak to project VM Maker:
http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.99.mcz

==================== Summary ====================

Name: CMakeVMMakerSqueak-tty.99
Author: tty
Time: 7 December 2014, 12:06:45.248 pm
UUID: 54f0685d-07a7-4701-b0f1-6f0539702cac
Ancestors: CMakeVMMakerSqueak-tty.98

Plugins can now render their CMake files using the CMakeTemplate wrappers .

Linux64x86w32BitSqueakCogV3Config builds and runs for the #build buildType.

Flagged a potential issue in Templates that stream a collection asString. bears keeping an eye on.

Tests pass.

Next up:
port the Windows stack to templates.
remove the 'generate' methods in favor of 'generateByTemplate' methods.

=============== Diff against CMakeVMMakerSqueak-tty.98 ===============

Item was changed:
  ----- Method: CMakeAddCompileOptions>>options (in category 'accessing') -----
  options
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
  ^ String streamContents: [:stream | options asStringOn: stream delimiter: ' ' ]
  !

Item was changed:
  ----- Method: CMakeAddCustomCommandOutput>>commandsandargs (in category 'accessing') -----
  commandsandargs
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
    ^ String streamContents: [:stream | commandsandargs asStringOn: stream delimiter: ' ' ]!

Item was changed:
  ----- Method: CMakeAddDefinitions>>definitions (in category 'accessing') -----
  definitions
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
  ^ String streamContents: [:stream | definitions asStringOn: stream delimiter: ' ' ]
  !

Item was changed:
  ----- Method: CMakeAddExecutableNameOptionSource>>sources (in category 'accessing') -----
  sources
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
  ^ String streamContents: [:stream | sources asStringOn: stream delimiter: ' ' ]
  !

Item was changed:
  ----- Method: CMakeAddLibrary>>sources (in category 'accessing') -----
  sources
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
  ^ String streamContents: [:stream | sources asStringOn: stream delimiter: ' ' ]
  !

Item was changed:
  ----- Method: CMakeIncludeDirectories>>dirs (in category 'accessing') -----
  dirs
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
  ^ String streamContents: [:stream | dirs asStringOn: stream delimiter: ' ' ]
  !

Item was changed:
  ----- Method: CMakeListAppend>>elements (in category 'accessing') -----
  elements
+ | e |
+ self flag:'tty'.  "see Note 1 below"
+ e := elements inject: '' into: [:res :each | res , ' "' , each, '"' ].  "quote each element"
+ ^ e
+
+
+ "
+ This breaks my convention in other Templates of using
+
+ ^ String streamContents: [:stream | dirs asStringOn: stream delimiter: ' ' ].  
+
+ This bears watching.
+
+
+
+ "!
- ^ String streamContents: [:stream | elements asStringOn: stream delimiter: ' ' ]
- !

Item was changed:
  ----- Method: CMakeListAppend>>list:elements: (in category 'accessing') -----
  list: aString elements: anObject
  list:=aString.
  elements := anObject.
+ self content:'  list( APPEND ', list, ' ' , self elements,  ')'
- self content:'  list( APPEND ', list, ' "' , self elements,  '")'
  !

Item was changed:
  ----- Method: CMakeSetProperty>>values (in category 'accessing') -----
  values
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
    ^ String streamContents: [:stream | values asStringOn: stream delimiter: ' ' ]!

Item was changed:
  ----- Method: CMakeSetSourceFilesProperties>>files (in category 'accessing') -----
  files
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
  ^ String streamContents: [:stream | files asStringOn: stream delimiter: ' ' ]
  !

Item was changed:
  ----- Method: CMakeSetTargetProperties>>propertiesandvalues (in category 'accessing') -----
  propertiesandvalues
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
    ^ String streamContents: [:stream | propertiesandvalues asStringOn: stream delimiter: ' ' ]!

Item was changed:
  ----- Method: CMakeTargetLinkLibraries>>items (in category 'accessing') -----
  items
+ self flag:'tty'. "see CMakeListAppend>>elements for inject method to use If I have doublequotes are needed. "
+   ^ String streamContents: [:stream | items asStringOn: stream delimiter: ' ' ]
+
+ !
-   ^ String streamContents: [:stream | items asStringOn: stream delimiter: ' ' ]!

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>configureByTemplateBitBltSimulation: (in category 'plugin extra rules') -----
  configureByTemplateBitBltSimulation: aMaker
  aMaker templates
  addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${pluginCross}'));
+ addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginCross}/BitBltGeneric.c'));
+ addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginCross}/BitBltDispatch.c'))
- addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '$(pluginCross)/BitBltGeneric.c'));
- addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '$(pluginCross)/BitBltDispatch.c'))
 
  !

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>configureByTemplateCroquetPlugin: (in category 'plugin extra rules') -----
  configureByTemplateCroquetPlugin: aMaker
  aMaker templates
+ addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginCross}/TriBoxStub.c'))
- addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '$(pluginCross)/TriBoxStub.c'))
  !

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>configureByTemplateFilePlugin: (in category 'plugin extra rules') -----
  configureByTemplateFilePlugin: aMaker
  aMaker templates
+ addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginCross}/sqFilePluginBasicPrims.c'))
- addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '$(pluginCross)/sqFilePluginBasicPrims.c'))
 
 
 
  !

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>configureByTemplateFloatMathPlugin: (in category 'plugin extra rules') -----
  configureByTemplateFloatMathPlugin: aMaker
        |cfiles pfiles|
  cfiles:= #(
  'acos.c' 'acosh.c' 'asin.c' 'asinh.c' 'atan.c' 'atan2.c' 'atanh.c'
  'copysign.c' 'cos.c' 'cosh.c' 'exp.c' 'expm1.c' 'finite.c' 'fmod.c'
  'hypot.c' 'isnan.c' 'k_cos.c' 'k_rem_pio2.c' 'k_sin.c' 'k_tan.c' 'ldexp.c'
  'log.c' 'log10.c' 'log1p.c' 'modf.c' 'pow.c' 'rem_pio2.c' 'rint.c'
  'scalb.c' 'scalbn.c' 'sin.c' 'sinh.c' 'sqrt.c' 'tan.c' 'tanh.c' ).
  pfiles:=OrderedCollection new.  "Anybody who knows how to do this elegantly, please change this"
+ cfiles do:[:each | pfiles addLast:('${pluginCross}/', each)].
- cfiles do:[:each | pfiles addLast:('$(pluginCross)/', each)].
  aMaker templates
  addLast:((CMakeListAppend new) list:'sources' elements: pfiles);
  addLast:((CMakeAddDefinitions new) definitions: (OrderedCollection with: '-O0')).  "See Note 1."
  self isLittleEndian
  ifTrue: [
  aMaker templates
  addLast:((CMakeAddDefinitions new) definitions: (OrderedCollection with:'-D__LITTLE_ENDIAN=1' ))].  "See Note 2."
 
  aMaker templates "See Note 3."
  addLast:((CMakeIfAddDefinitionsElseAddDefinitions new)
  condition:'${WIN32}'
  ifdefinitions:'-Werror-implicit-function-declaration'
  elsedefinitions:'-DNO_ISNAN')
 
  "
  Note 1. according to http://www.netlib.org/fdlibm/readme        it should be compiled with no optimizations
 
  Note 2. compile with -D__LITTLE_ENDIAN This macro is set automatically in fdlibm.h when compiled ith -m32 but
  not when compiled with -m64 (Nicolas Cellier)
 
  Note 3. It may be better to push these down to SqueakMacintoshConfig, SqueakUnixConfig, SqueakWindowsConfig.
  I think it is clearer here.
 
  In the mean time this template outputs the following:
 
  if (${WIN32})
  add_definitions(-Werror-implicit-function-declaration) <---push down to SqueakWindowsConfig
  else(${WIN32})
  add_definitions(-DNO_ISNAN)                                        <---push down to SqueakUnix/MacConfigs
  endif (${WIN32})'.
 
  "!

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>configureByTemplateMpeg3Plugin: (in category 'plugin extra rules') -----
  configureByTemplateMpeg3Plugin: aMaker
        |cfiles pfiles|
  cfiles:=#( 'libmpeg/bitstream.c' 'libmpeg/changesForSqueak.c' 'libmpeg/audio/dct.c'
       'libmpeg/video/getpicture.c' 'libmpeg/audio/header.c' 'libmpeg/video/headers.c'
       'libmpeg/video/idct.c' 'libmpeg/audio/layer1.c' 'libmpeg/audio/layer2.c'
       'libmpeg/audio/layer3.c' 'libmpeg/libmpeg3.c' 'libmpeg/video/macroblocks.c'
       'libmpeg/video/mmxtest.c' 'libmpeg/video/motion.c' 'libmpeg/mpeg3atrack.c'
       'libmpeg/audio/mpeg3audio.c' 'libmpeg/mpeg3demux.c' 'libmpeg/mpeg3io.c'
       'libmpeg/mpeg3title.c' 'libmpeg/video/mpeg3video.c' 'libmpeg/mpeg3vtrack.c'
       'libmpeg/video/output.c' 'libmpeg/audio/pcm.c' 'libmpeg/video/reconstruct.c'
       'libmpeg/video/seek.c' 'libmpeg/video/slice.c' 'libmpeg/audio/synthesizers.c'
       'libmpeg/audio/tables.c' 'libmpeg/video/vlc.c' ).
  pfiles:=OrderedCollection new.  "Anybody who knows how to do this elegantly, please change this"
+ cfiles do:[:each | pfiles addLast:('${pluginCross}/', each)].
- cfiles do:[:each | pfiles addLast:('$(pluginCross)/', each)].
  aMaker templates
  addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${pluginCross}/libmpeg ${pluginCross}/libmpeg/audio ${pluginCross}/libmpeg/video'));
  addLast:((CMakeListAppend new) list:'sources' elements: pfiles).
 
 
 
  !

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>configureByTemplateSoundCodecPlugin: (in category 'plugin extra rules') -----
  configureByTemplateSoundCodecPlugin: aMaker
  aMaker templates
  addLast:((CMakeListAppend new)
  list:'sources'
+ elements: (OrderedCollection with: '${pluginCross}/sqSoundCodecPluginBasicPrims.c')).
- elements: (OrderedCollection with: '$(pluginCross)/sqSoundCodecPluginBasicPrims.c')).
 
  !

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>configureByTemplateSurfacePlugin: (in category 'plugin extra rules') -----
  configureByTemplateSurfacePlugin: aMaker
  aMaker templates
  addLast:((CMakeSet new) variable: #sources value: '');"remove default source file"
+ addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginCross}/SurfacePlugin.c')).
- addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '$(pluginCross)/SurfacePlugin.c')).
 
  !