Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Build fails when using cmake #4706

Closed
wzdev-ci opened this issue Jan 14, 2018 · 5 comments
Closed

Build fails when using cmake #4706

wzdev-ci opened this issue Jan 14, 2018 · 5 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_patch (an actual patch, not a request for one) | by Marc0


Builds fail when cmake copies files from a RCS source directory (here ../warzone2100-github) to a build directory:

    $ cmake ../warzone2100-github
    $ make -j9
    ...
    [ 53%] Generating moc_qtscriptdebug.cpp
    error: No repo or cache detected.
    make[2]: *** [src/autorevision.h] Error 1
    make[2]: *** Deleting file `src/autorevision.h'
    make[2]: *** Waiting for unfinished jobs....
    make[1]: *** [src/CMakeFiles/warzone2100.dir/all] Error 2
    make: *** [all] Error 2

Without changing directory to $CMAKE_SOURCE_DIR the autorevision script is executed within the src directory of the build directory. This fails silently as there is no RCS information available. Both src/autorevision.cache and src/autorevision.h are missing during build.

See this (part of the) diff, warzone2100-build-alt without patch, warzone2100-build-neu contains the patch, /tmp/warzone2100-github is the source directory:

    diff -ruw warzone2100-build-alt/src/CMakeFiles/warzone2100.dir/build.make warzone2100-build-neu/src/CMakeFiles/warzone2100.dir/build.make
    --- warzone2100-build-alt/src/CMakeFiles/warzone2100.dir/build.make     2018-01-14 16:37:34.000000000 +0100
    +++ warzone2100-build-neu/src/CMakeFiles/warzone2100.dir/build.make     2018-01-14 16:37:52.000000000 +0100
    @@ -46,7 +46,7 @@

     ...

     src/autorevision.h:
    -       @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/tmp/warzone2100-build-alt/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Generating autorevision.h"
    -       cd /tmp/warzone2100-build-alt/src && /tmp/warzone2100-github/build_tools/autorevision -t h -o /tmp/warzone2100-build-alt/src/autorevision.cache > /tmp/warzone2100-build-alt/src/autorevision.h
    +       @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/tmp/warzone2100-build-neu/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Generating autorevision.h"
    +       cd /tmp/warzone2100-github && /tmp/warzone2100-github/build_tools/autorevision -t h -o /tmp/warzone2100-build-neu/src/autorevision.cache > /tmp/warzone2100-build-neu/src/autorevision.h

Issue migrated from trac:4706 at 2022-04-16 12:59:53 -0700

@wzdev-ci
Copy link
Contributor Author

Marc0 uploaded file cmake-autorevision-fix.patch (0.8 KiB)

Patch for src/CMakeLists.txt

@wzdev-ci
Copy link
Contributor Author

Per changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Per changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Per changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Per changed blockedby which not transferred by tractive

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant