Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  28 May 2019, Stefan Ritt, Info, MIDAS switching to Cmake 
    Reply  28 May 2019, Konstantin Olchanski, Info, MIDAS switching to Cmake 
       Reply  28 May 2019, Stefan Ritt, Info, MIDAS switching to Cmake 
          Reply  29 May 2019, Stefan Ritt, Info, MIDAS switching to Cmake 
       Reply  03 Jun 2019, Konstantin Olchanski, Info, MIDAS switching to Cmake 
          Reply  05 Jun 2019, Konstantin Olchanski, Info, MIDAS switching to Cmake 
             Reply  17 Jun 2019, Konstantin Olchanski, Info, MIDAS switching to Cmake 
                Reply  17 Jun 2019, Konstantin Olchanski, Info, MIDAS switching to Cmake 
                Reply  17 Jun 2019, Stefan Ritt, Info, MIDAS switching to Cmake 
                   Reply  18 Jun 2019, Konstantin Olchanski, Info, MIDAS switching to Cmake 
Message ID: 1535     Entry time: 29 May 2019     In reply to: 1534
Author: Stefan Ritt 
Topic: Info 
Subject: MIDAS switching to Cmake 
> 
> > > - After successful compilation, all programs and libraries are in the "build" directory
> > > 
> > 
> > The old "linux", "darwin", etc subdirectories go away. Makefiles for frontends and analyzers become simplified
> > and can refer to MIDAS in a standard way:
> > 
> > header files: -I$(MIDASSYS)/include
> > libraries and object files: -L$(MIDASSYS)/build/lib -lmidas
> > executables: PATH += $(MIDASSYS)/build/bin
> 
> Actually the library and executables go directly into the build directory (without "lib" and "bin"), so we need
> 
> header files: -I$(MIDASSYS)/include
> libraries and object files: -L$(MIDASSYS)/build -lmidas
> executables: PATH += $(MIDASSYS)/build
> 
> Or course that can be changed in the Cmake file, but not sure if that would be necessary/useful.

Actually I like the proposed separation between the library and the binaries, so I reworked it again. Now we have

header files: -I$(MIDASSYS)/include
libraries and object files: -L$(MIDASSYS)/lib -lmidas
executables: PATH += $(MIDASSYS)/bin

When issuing a "cmake .." followed by a "make" in the build directory, everything ends up in the build directory. To 
move things to the lib and bin directories, do a "make install". Seems to me like this is the standard way for
many packages so we should follow it.

Furthermore, I followed a proposal from KO to separate the code in the "src" directory between library source code
and programs. I moved all programs now to a separate "progs" directory, and left only code for the midas library in
the "src" directory. New CMakeLists.txt have been written for the "progs" and "utils" directories.

Care has been taken so that even when source files were moved around, their revision history is kept to "git annotate"
still works.

This is quite a change so sorry if this breaks some existing installations, but it will make things much easier in the future.

Stefan
ELOG V3.1.4-2e1708b5