You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmake: Enable APPEND_*FLAGS only for command-line generators
Command-line build tool generators are the only ones that support
low-level rule variables. IDE build tool generators, such as "Visual
Studio" and "Xcode", do not utilize these variables when creating
project files.
This change ensures that CMake warns users if any of the
`SECP256K1_APPEND_*FLAGS` options are set while using an unsupported
generator.
set(SECP256K1_APPEND_CFLAGS ""CACHESTRING"Compiler flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")
284
-
if(SECP256K1_APPEND_CFLAGS)
285
-
# Appending to this low-level rule variable is the only way to
283
+
if(CMAKE_GENERATORMATCHES"Make|Ninja")
284
+
# Only command-line build tool generators support low-level rule
285
+
# variables.
286
+
# Appending to the low-level rule variables is the only way to
286
287
# guarantee that the flags appear at the end of the command line.
set(SECP256K1_APPEND_CFLAGS ""CACHESTRING"Compiler flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")
set(SECP256K1_APPEND_LDFLAGS ""CACHESTRING"Linker flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")
291
-
if(SECP256K1_APPEND_LDFLAGS)
292
-
# Appending to this low-level rule variable is the only way to
293
-
# guarantee that the flags appear at the end of the command line.
set(SECP256K1_APPEND_LDFLAGS ""CACHESTRING"Linker flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")
0 commit comments