Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#27 CMake build puts binaries in source

closed-fixed
nobody
None
5
2013-01-16
2013-01-08
kiri
No

Building with CMake puts binaries in source directory tree even when using a separate build directory outside of the source directory tree.

Release version 3.7.1 from TAr.

Discussion

  • kiri
    kiri
    2013-01-08

    To test, make the source directories read only and try building.

     
  • Mark Vejvoda
    Mark Vejvoda
    2013-01-09

    please give more details than this, such as extact command line used and parameters etc. and also expected vs actual result

     
  • kiri
    kiri
    2013-01-14

    Let us say the source is in a directory named 'MegaMlest'
    and you wish to compile in a directory 'Compile';
    both are under a common directory 'Common'.
    Like:
    /Common/MegaGlest
    /Common/Compile

    When the current directory of the shell is /Common/Compile , run
    cmake ../MegaGlest
    which will generate the 'Makefile' for the build.
    Then run 'make'.
    All resulting output of that command should be under '/Common/Compile'.
    Nothing should be written to directory 'MegaGlest'.
    It should succeed if directory MegaGlest is read only, such as done by
    chmod -R a-w /Common/MegaGlest

    What actually happens and should not is that some files, at least executable binaries,
    are written into the Compile directory.

     
  • Mark Vejvoda
    Mark Vejvoda
    2013-01-15

    Currently our binaries all have something like this:

    IF(UNIX AND NOT APPLE)
    SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/mk/linux)
    ELSE()
    SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/data/glest_game)
    ENDIF()

    This is the normal default that all current builds (for debian etc) are expecting. What would you like for your build?

     
  • Mark Vejvoda
    Mark Vejvoda
    2013-01-16

    Fixed now in svn

     
  • Mark Vejvoda
    Mark Vejvoda
    2013-01-16

    • status: open --> closed-fixed