On the master branch @ f79f46c70386c693ff4e7aef0b9e7923ba284e56, setting SECP256K1_APPEND_*FLAGS
when using IDE build tool generators, such as “Visual Studio” and “Xcode”, has no effect because these generators do not utilise low-level rule variables when creating project files.
This PR disables SECP256K1_APPEND_*FLAGS
options in such scenarios. CMake will issue a warning if any of them are set.
Additionally, this PR fixes a bug with the clang-cl compiler (see #1647):
0> cmake -B build -G Ninja -DCMAKE_C_COMPILER=clang-cl -DSECP256K1_APPEND_CFLAGS=/W4
1> cmake --build build
2...
3clang-cl: error: no such file or directory: '/W4'
4...
The last change is beneficial in its own right, as it makes the compile invocation string more natural by ensuring that flags do not follow source files.