CMake process broken when CMAKE_INSTALL_PREFIX is defined

Issue #314 resolved
Stefan Ritt created an issue

Following commands break in my case:

$ cmake -DCMAKE_INSTALL_PREFIX=/some/path ..
$ make
...
[ 32%] Building CXX object manalyzer/CMakeFiles/manalyzer.dir/manalyzer.cxx.o
/midas/progs/mlogger.cxx:14:10: fatal error: 'midas.h' file not found
#include "midas.h"
         ^~~~~~~~~
...

Comments (4)

  1. dd1

    confirmed. everything under “progs” cannot find midas.h & co.

    daq00:midas$ mkdir xbuild
    daq00:midas$ cd xbuild/
    daq00:xbuild$ cmake .. -DCMAKE_INSTALL_PREFIX=/some/path
    ...
    daq00:xbuild$ make -j
    ... bombs!
    

  2. dd1

    it takes me 7 days to fix any minor cmake problem and then 7 days of swearing at people who invented cmake and imposed it on the world. what a piece of junk.

  3. Stefan Ritt reporter

    Why don’t you keep your fingers off cmake and simply use and maintain your old make, and leave the cmake business to other people.

  4. Stefan Ritt reporter

    Finally had some time to look into that. Fixed by adding missing include files like

    target_include_directories(midas PUBLIC $<BUILD_INTERFACE:${BUILD_INC_DIR}>)
    

    Now midas compiles even if cmake is called with -DCMAKE_INSTALL_PREFIX=...

  5. Log in to comment