Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Disable EXPORT_COMPILE_COMMANDS for all subtree targets #206

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmake/crc32c.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ target_include_directories(crc32c
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/crc32c/include>
)
target_link_libraries(crc32c PRIVATE crc32c_common)
set_target_properties(crc32c PROPERTIES EXPORT_COMPILE_COMMANDS OFF)

if(HAVE_SSE42)
add_library(crc32c_sse42 STATIC EXCLUDE_FROM_ALL
Expand All @@ -104,6 +105,7 @@ if(HAVE_SSE42)
target_compile_definitions(crc32c_sse42 PUBLIC HAVE_SSE42=1)
target_compile_options(crc32c_sse42 PRIVATE ${SSE42_CXXFLAGS})
target_link_libraries(crc32c_sse42 PRIVATE crc32c_common)
set_target_properties(crc32c_sse42 PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
target_link_libraries(crc32c PRIVATE crc32c_sse42)
endif()

Expand All @@ -114,5 +116,6 @@ if(HAVE_ARM64_CRC32C)
target_compile_definitions(crc32c_arm64 PUBLIC HAVE_ARM64_CRC32C=1)
target_compile_options(crc32c_arm64 PRIVATE ${ARM64_CRC_CXXFLAGS})
target_link_libraries(crc32c_arm64 PRIVATE crc32c_common)
set_target_properties(crc32c_arm64 PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
target_link_libraries(crc32c PRIVATE crc32c_arm64)
endif()
1 change: 1 addition & 0 deletions cmake/secp256k1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ if(MSVC)
endif()

target_link_libraries(secp256k1 PRIVATE core_base_interface)
set_target_properties(secp256k1 PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will happen here when we switch to using secp's CMake build?

Copy link
Owner Author

@hebasto hebasto May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will happen here when we switch to using secp's CMake build?

I can see two options.

  1. We keep setting the target property externally as we currently do.

Or

  1. Upstream secp build system can force this property disabled when being a subproject.

Loading