Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-1209

C++11 support needs some work

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: sconsUtils
    • Labels:
      None
    • Team:
      Alert Production

      Description

      sconsUtils has nominal support for C++11 but it needs some work including:

      • It should set CXXFLAGS not CCFLAGS when it sees --c++11
      • It should check gcc version number and specify -std accordingly. In gcc 4.7 -std=c+0x triggers C14 support, but gcc 4.4 does not support -std=c+11.

        Attachments

          Activity

          Hide
          jbosch Jim Bosch added a comment -

          I'm afraid I don't. I may have done it in the past, but I've mostly forgotten everything I ever knew about advanced SCons usage. You might be able to find an example of that in sconsUtils, though just googling is probably better to try first.

          Show
          jbosch Jim Bosch added a comment - I'm afraid I don't. I may have done it in the past, but I've mostly forgotten everything I ever knew about advanced SCons usage. You might be able to find an example of that in sconsUtils, though just googling is probably better to try first.
          Hide
          rowen Russell Owen added a comment -

          I already tried a google search and reading the Scons documentation before I posted the question here. This is why I went with subprocess. I'll hunt some more, but if I don't find an answer I'm going to push back on using subprocess; although I am a bit nervous about using it, it seems to work and I have not thought of any concrete reasons why it would fail.

          Show
          rowen Russell Owen added a comment - I already tried a google search and reading the Scons documentation before I posted the question here. This is why I went with subprocess. I'll hunt some more, but if I don't find an answer I'm going to push back on using subprocess; although I am a bit nervous about using it, it seems to work and I have not thought of any concrete reasons why it would fail.
          Hide
          jbosch Jim Bosch added a comment -

          Looks like TryAction is supposed to return the output, at least if the command succeeds:

          http://www.scons.org/doc/2.3.1/HTML/scons-api/SCons.SConf-pysrc.html#SConfBase.TryAction

          Show
          jbosch Jim Bosch added a comment - Looks like TryAction is supposed to return the output, at least if the command succeeds: http://www.scons.org/doc/2.3.1/HTML/scons-api/SCons.SConf-pysrc.html#SConfBase.TryAction
          Hide
          rowen Russell Owen added a comment -

          Thanks, Jim. That did the trick. I switched back (and fixed the test for gcc 4.6) and will run a buildbot test run and then merge.

          Show
          rowen Russell Owen added a comment - Thanks, Jim. That did the trick. I switched back (and fixed the test for gcc 4.6) and will run a buildbot test run and then merge.
          Hide
          rowen Russell Owen added a comment -

          For the record, I asked about this on the scons mailing list and two people told me that it is fine to use subprocess.

          Show
          rowen Russell Owen added a comment - For the record, I asked about this on the scons mailing list and two people told me that it is fine to use subprocess.

            People

            • Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Jim Bosch
              Watchers:
              Jim Bosch, Kian-Tat Lim, Russell Owen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel