diff options
author | fanquake <fanquake@gmail.com> | 2024-04-04 12:05:16 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2024-04-04 12:05:16 +0100 |
commit | 4654cc32248d788ac1160ca320ea68d31357d0c9 (patch) | |
tree | cd6a9d7a793e98bf7f6c53387169032a15cfccb8 /src/secp256k1/cmake | |
parent | 71c51c161d476cc495afdb7864283fdb84d2dc0c (diff) | |
parent | 53eec53dca1cb677d11564b055d3b8581ddd6747 (diff) | |
download | bitcoin-4654cc32248d788ac1160ca320ea68d31357d0c9.tar.xz |
Update secp256k1 subtree to latest master
Diffstat (limited to 'src/secp256k1/cmake')
-rw-r--r-- | src/secp256k1/cmake/AllTargetsCompileOptions.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/secp256k1/cmake/AllTargetsCompileOptions.cmake b/src/secp256k1/cmake/AllTargetsCompileOptions.cmake new file mode 100644 index 0000000000..6e420e0fde --- /dev/null +++ b/src/secp256k1/cmake/AllTargetsCompileOptions.cmake @@ -0,0 +1,12 @@ +# Add compile options to all targets added in the subdirectory. +function(all_targets_compile_options dir options) + get_directory_property(targets DIRECTORY ${dir} BUILDSYSTEM_TARGETS) + separate_arguments(options) + set(compiled_target_types STATIC_LIBRARY SHARED_LIBRARY OBJECT_LIBRARY EXECUTABLE) + foreach(target ${targets}) + get_target_property(type ${target} TYPE) + if(type IN_LIST compiled_target_types) + target_compile_options(${target} PRIVATE ${options}) + endif() + endforeach() +endfunction() |