Skip to content

Commit

Permalink
Merge #248: cmake: Fix build with -DENABLE_HARDENING=OFF
Browse files Browse the repository at this point in the history
0537ae7 cmake: Fix build with `-DENABLE_HARDENING=OFF` (Hennadii Stepanov)

Pull request description:

  On the staging branch @ a7cc7d8:
  ```
  $ cmake -B build -DENABLE_HARDENING=OFF
  $ cmake --build build
  ...
  /usr/bin/ld: cannot find -lhardening_interface: No such file or directory
  ...
  ```

  This PR fixes this issue.

ACKs for top commit:
  TheCharlatan:
    lgtm ACK 0537ae7

Tree-SHA512: 17e621f57853d8f7a14bffc2436b4227bd044d61bfe8e93de5724d71550be58f35184cb11cd0e88ee2f9c3b086bf0d6425be6ee2572337916cbfc59808222af3
  • Loading branch information
hebasto committed Jul 1, 2024
2 parents 6afc48f + 0537ae7 commit 9794bdd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/crc32c.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ target_compile_definitions(crc32c_common INTERFACE
)
target_link_libraries(crc32c_common INTERFACE
core_base_interface
hardening_interface
$<TARGET_NAME_IF_EXISTS:hardening_interface>
)

add_library(crc32c STATIC EXCLUDE_FROM_ALL
Expand Down
2 changes: 1 addition & 1 deletion cmake/leveldb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ endif()

target_link_libraries(leveldb PRIVATE
core_base_interface
hardening_interface
$<TARGET_NAME_IF_EXISTS:hardening_interface>
nowarn_leveldb_interface
crc32c
)
Expand Down
4 changes: 2 additions & 2 deletions cmake/minisketch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if(HAVE_CLMUL)
target_link_libraries(minisketch_clmul
PRIVATE
core_base_interface
hardening_interface
$<TARGET_NAME_IF_EXISTS:hardening_interface>
minisketch_common
)
set_target_properties(minisketch_clmul PROPERTIES
Expand Down Expand Up @@ -83,7 +83,7 @@ target_include_directories(minisketch
target_link_libraries(minisketch
PRIVATE
core_base_interface
hardening_interface
$<TARGET_NAME_IF_EXISTS:hardening_interface>
minisketch_common
$<TARGET_NAME_IF_EXISTS:minisketch_clmul>
)
Expand Down

0 comments on commit 9794bdd

Please sign in to comment.