A patch for refine the cmake system. Also rmoved file iterator.cmake and DataTypes.cmake

Anyway, because msvc doesn't support flag -fPIC, so I disable it.
And must update configure, but I didn't do that, because I don't get the env.
But I update configure.ac, from my point's of view. but don't even have a try.

I got two patch, but the one of them is little complex more because I
add #ifdef in config.h
and another one is clearer, but I don't know if the clearer one is
safe enough:)

cmake-delete-iterator-_datatypes-clearer.patch (27.7 KB)

cmake-delete-iterator-_datatypes.patch (28.1 KB)

"罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com> writes:

Anyway, because msvc doesn't support flag -fPIC, so I disable it. And
must update configure, but I didn't do that, because I don't get the
env. But I update configure.ac, from my point's of view. but don't
even have a try.

I got two patch, but the one of them is little complex more because I
add #ifdef in config.h
and another one is clearer, but I don't know if the clearer one is
safe enough:)

In your patch there are several interesting things (the detection for
iterators, for instance).

However, it contains serious flaws:

include/llvm/Support/DataTypes.h does not exist on the LLVM sources. It
is created by configure or cmake. For avoiding this kind of mistakes
always use a directory outside the llvm sourcers hierarchy for building.

Do not mix in the same patch changes for cmake and configure.

Reduce the patch to the minimum required. This includes avoiding
whitespace changes.