Windows build: OpenMP optimizations

For the new module negadoctor, the author @aurelienpierre had to disable some of the OpenMP optimizations when building for Windows, in order to avoid some linker (?) errors.

See the discussion here and here

The same happened with other modules in the past.
Doing so we have some performance degradation for Windows users, like me.

Investigating, I noticed that I can build without patches in debug mode (-DCMAKE_BUILD_TYPE=Debug), but not in release mode (-DCMAKE_BUILD_TYPE=Release).

Does this only means that in debug mode optimizations are disabled anyway, or perhaps it is a hint for a possible solution ? I’m not so expert to answer myself.

Any clue ?

Debug builds always disable optimizations. See the -O0 option in the doc of your compiler.

1 Like

Does it make sense to use GCC under Cygwin, rather than MingW? It makes the installation a bit more complicated in that the user needs to install Cygwin as a prerequisite, but it may reduce some of these (in)compatibility issues…