Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-10709

need some persistent per-checkout way of customising flags in "cmake world"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • feature-backlog
    • 3.0
    • None
    • Security Level: Public
    • None
    • Untriaged
    • Unknown
    • Build Sprint 5: 4/21 - 5/09

    Description

      Today we have .repo/Makefile.extra that's sourced into top-level makefile and there's all kinds of hooks in terms of <target>_EXTRA_OPTIONS.

      They allow for per-repo-checkout customisations.

      Particularly here's how my repo30 makefile extra looks now:

      1. Mode: makefile
      1. memcached_EXTRA_OPTIONS = --enable-tcmalloc
      1. CFLAGS := -march=core2 -O0 -fno-inline -ggdb3 -fno-omit-frame-pointer
        CFLAGS := -march=core2 -O2 -ggdb3 -fno-omit-frame-pointer
        CXXFLAGS := $(CFLAGS)
      1. export CC=gcc-4.7
      2. export CXX=g++-4.7

      export CFLAGS
      export CXXFLAGS

      PATH := /usr/lib/ccache:$(PATH)
      export PATH

      superclean:
      $(MAKE) clean-xfd || true
      rm -rf install
      repo forall -c 'git clean -dfx'
      rm -fr cmake/CMakeCache.txt cmake/CMakeFiles dependencies/
      cd cmake/ && (ruby -e 'puts Dir["*"].select

      {|n| File.file?(n)}

      ' | xargs rm)
      cp -f tlm/CMakeLists.txt cmake/
      cp -f tlm/Makefile.top ./Makefile

      You can see how I'm enabling ccache just for this project. Or how I'm able to pick specific compiler just for this project (recall our not so recent history of regularly failing compiles on newest gcc versions due to -Werror and most folks running super-old gcc). Or how I'm able to set specific debug-ness of CFLAGS. Or how I'm able to control options.

      It looks like cmake transition is taking this away from me. And some official replacement is going to be needed sooner or later.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            trond Trond Norbye
            alkondratenko Aleksey Kondratenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty