Adding a compile option to the latest llvm/clang build

It was previously possible to add a compiler option to the build of llvm/clang using CMake. Yet when I tried the cmake-gui program against the latest llvm/clang updates the cmake setting to add compiler optons when building llvm/clang was no longer there. How do I do this with the latest version of llvm/clang ?

Can you be more specific as to what you are trying to do, and what it actually does? An example would be great!

Can you be more specific as to what you are trying to do, and what it
actually does? An example would be great!

I build clang from source with gcc-6.3, using CMake and ninja. I need to make sure a particular gcc command line compiler option is added as part of the build that is generated by CMake. How do I do that with the latest clang source ? Previously the CMake gui program listed a particular CMake field for changing the command line option, but I forget what the name of that CMake field was. It is no longer showing in the CMake gui program with the latest llvm/clang source.

Can you be more specific as to what you are trying to do, and what it
actually does? An example would be great!

I see that this is a change to the CMake gui problem, not a change to clang. The CMake gui program no longer lists common CMake variables. The one I needed was CMAKE_CXX_FLAGS. I had to manually add it.

When configuring I use:

  -DCMAKE_CXX_FLAGS:STRING=<my-custom-flags>

for instance:

  -DCMAKE_CXX_FLAGS:STRING=-DENABLE_MY_EXPERIMENTAL_CHANGES

This works fine for '-D' etc., but I haven't tried it for other options.

  MartinO