Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#31171: depends: Specify CMake generator explicitly
Browse files Browse the repository at this point in the history
e2ba823 depends: Specify CMake generator explicitly (Hennadii Stepanov)

Pull request description:

  Building packages in depends implies using GNU Make. However, this assumption can be wrong in environments where the [`CMAKE_GENERATOR`](https://cmake.org/cmake/help/latest/envvar/CMAKE_GENERATOR.html) variable is set.

  This change explicitly makes CMake use the "Unix Makefiles" generator.

  Can be tested as follows:
  ```
  $ env CMAKE_GENERATOR=Ninja make -C depends
  ```

ACKs for top commit:
  fanquake:
    ACK e2ba823 - Going forward I think we should look at making this work without having to hard code anything.

Tree-SHA512: e14ed1cec192434fe089d36a83e1e150727a3b299fada80a61fa5b44b0c50e014a774ef1e6cd6df189e25f7a13042a20d4f9605f6ccd32e7782f10adaf5e788f
  • Loading branch information
fanquake committed Nov 7, 2024
2 parents c9e67e2 + e2ba823 commit 3a5f602
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
CXX="$$($(1)_cxx)" \
CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
LDFLAGS="$$($(1)_ldflags)" \
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \
cmake -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \
-DCMAKE_AR=`which $$($(1)_ar)` \
-DCMAKE_NM=`which $$($(1)_nm)` \
-DCMAKE_RANLIB=`which $$($(1)_ranlib)` \
Expand Down

0 comments on commit 3a5f602

Please sign in to comment.