Followups for #1325

- Fix git tag detection
- Fix changelog entry position
- Update/clean up docs some
develop
lethosor 2018-07-17 00:58:49 -04:00
parent 1d6c3dc871
commit 3b44c18576
3 changed files with 29 additions and 18 deletions

@ -68,6 +68,24 @@ and more, please see `contributing-code`.
Build settings Build settings
============== ==============
Generator
---------
The ``Ninja`` CMake build generator is the prefered build method on Linux and
macOS, instead of ``Unix Makefiles``, which is the default. You can select Ninja
by passing ``-G Ninja`` to CMake. Incremental builds using Unix Makefiles can be
much slower than Ninja builds.
::
cmake .. -G Ninja
.. warning::
Most other CMake settings can be changed by running ``cmake`` again, but the
generator cannot be changed after ``cmake`` has been run without creating a
new build folder. Do not forget to specify this option.
Build type Build type
---------- ----------
@ -75,7 +93,7 @@ Build type
cmake .. -DCMAKE_BUILD_TYPE:string=BUILD_TYPE cmake .. -DCMAKE_BUILD_TYPE:string=BUILD_TYPE
Valid and useful build types include 'Release' and 'RelWithDebInfo'. Default Valid and useful build types include 'Release' and 'RelWithDebInfo'. The default
build type is 'Release'. build type is 'Release'.
Target architecture (32-bit vs. 64-bit) Target architecture (32-bit vs. 64-bit)
@ -97,17 +115,6 @@ change, so specifying it explicitly is a good idea.
Note that the scripts in the "build" folder on Windows will set the architecture Note that the scripts in the "build" folder on Windows will set the architecture
automatically. automatically.
Generator
---------
``Ninja`` cmake build generator is prefered build method instead of default
``Unix Makefiles``. You can select Ninja build using ``-G`` option. Incremental
builds using Unix Makefiles can be much slower than Ninja builds.
::
cmake .. -G Ninja
Other settings Other settings
-------------- --------------
There are a variety of other settings which you can find in CMakeCache.txt in There are a variety of other settings which you can find in CMakeCache.txt in
@ -182,7 +189,7 @@ empty folder in the DFHack directory to use instead) and start the build like th
cd build cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTALL_PREFIX=<path to DF> cmake .. -G Ninja -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTALL_PREFIX=<path to DF>
ninja install ninja install # or ninja -jX install to specify the number of cores (X) to use
<path to DF> should be a path to a copy of Dwarf Fortress, of the appropriate <path to DF> should be a path to a copy of Dwarf Fortress, of the appropriate
version for the DFHack you are building. This will build the library along version for the DFHack you are building. This will build the library along
@ -357,7 +364,7 @@ Building
mkdir build-osx mkdir build-osx
cd build-osx cd build-osx
cmake .. -G Ninja -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTALL_PREFIX=<path to DF> cmake .. -G Ninja -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTALL_PREFIX=<path to DF>
ninja install ninja install # or ninja -jX install to specify the number of cores (X) to use
<path to DF> should be a path to a copy of Dwarf Fortress, of the appropriate <path to DF> should be a path to a copy of Dwarf Fortress, of the appropriate
version for the DFHack you are building. version for the DFHack you are building.

@ -39,6 +39,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Internals ## Internals
- Core: various thread safety and memory management improvements - Core: various thread safety and memory management improvements
- Fixed cmake build dependencies for generated header files
================================================================================ ================================================================================
# 0.44.12-r1 # 0.44.12-r1
@ -111,9 +112,6 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
-@ macOS: fixed ``renderer`` vtable address on x64 (fixes `rendermax`) -@ macOS: fixed ``renderer`` vtable address on x64 (fixes `rendermax`)
- `stonesense`: fixed ``PLANT:DESERT_LIME:LEAF`` typo - `stonesense`: fixed ``PLANT:DESERT_LIME:LEAF`` typo
## Internals
- Fixed cmake build dependencies for generated headers files
## API ## API
- Added C++-style linked list interface for DF linked lists - Added C++-style linked list interface for DF linked lists

@ -11,7 +11,7 @@ execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=8 --exact-match execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=8 --exact-match
WORKING_DIRECTORY "${dfhack_SOURCE_DIR}" WORKING_DIRECTORY "${dfhack_SOURCE_DIR}"
RESULT_VARIABLE DFHACK_GIT_TAGGED RESULT_VARIABLE DFHACK_GIT_TAGGED_RESULT
OUTPUT_QUIET ERROR_QUIET) OUTPUT_QUIET ERROR_QUIET)
# Check library/xml for matching commits # Check library/xml for matching commits
@ -24,6 +24,12 @@ execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
OUTPUT_VARIABLE DFHACK_GIT_XML_COMMIT OUTPUT_VARIABLE DFHACK_GIT_XML_COMMIT
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${DFHACK_GIT_TAGGED_RESULT} EQUAL 0)
set(DFHACK_GIT_TAGGED TRUE)
else()
set(DFHACK_GIT_TAGGED FALSE)
endif()
if(${DFHACK_GIT_XML_COMMIT} STREQUAL ${DFHACK_GIT_XML_EXPECTED_COMMIT}) if(${DFHACK_GIT_XML_COMMIT} STREQUAL ${DFHACK_GIT_XML_EXPECTED_COMMIT})
set(DFHACK_GIT_XML_MATCH TRUE) set(DFHACK_GIT_XML_MATCH TRUE)
else() else()