cython/cython — pull request #146 by cgohlke (2012-08-30 20:39:34+00:00)
Title: Add '/openmp' flag when compiling Cpp code with msvc compilers

This fixes a test failure in Cython-0.17b3 and b4 on Windows as discussed on the mailing list http://mail.python.org/pipermail/cython-devel/2012-August/003068.html. The problems is that runtests.py does not add the '/openmp' flag when compiling Cpp files with Visual Studio compilers. The failing test is:

```
======================================================================
FAIL: test_num_threads (line 33) (parallel.__test__)
Doctest: parallel.__test__.test_num_threads (line 33)
----------------------------------------------------------------------
Traceback (most recent call last):
File "X:\Python27\lib\doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for parallel.__test__.test_num_threads (line 33)
File "\Cython-0.17b3\BUILD\run\cpp\parallel\parallel.pyd", line unknown line number, in test_num_threads (line 33)

----------------------------------------------------------------------
File "\Cython-0.17b3\BUILD\run\cpp\parallel\parallel.pyd", line ?, in parallel.__test__.test_num_threads (line 33)
Failed example:
test_num_threads()
Expected:
1
get_num_threads called
3
get_num_threads called
3
Got:
1
get_num_threads called
1
get_num_threads called
1
```