[cfe-dev] Windows patches

John Thompson john.thompson.jtsoftware at gmail.com
Mon Oct 12 13:10:26 PDT 2009


Mike,

After reading some cmake docs, tutorials, and experimenting, here's the best
I could come up with.

There is a set_source_file_properties option, but unfortunately it doesn't
seem to let me undo the /Za option set in the macro via
set_target_properties, though it does let me add additional options.
Therefore, I have it re-call set_target_properties again, with the /Za
option edited out, thus affecting the whole library, which I hope won't be a
problem down the road.

There was a fixme comment about using AddGnuCPlusPlusIncludePaths, but MinGW
is not using the same directory structure.  Therefore, I added a helper
function specific to MinGW.  The MinGW64 stuff I guessed at, as I don't have
it installed, but I'll get it shortly and revise if needed.
If this is acceptable, should this be my test check-in?  Or should I try
something smaller first?

I'll move to cfe-commits after this.

-John
On Fri, Oct 9, 2009 at 2:55 PM, Mike Stump <mrs at apple.com> wrote:

> On Oct 9, 2009, at 1:12 PM, John Thompson wrote:
>
>> Here's another crack at the windows include paths patch
>>
>
> -/// RemoveDuplicates - If there are duplicate directory entries in the
> specified
> -/// search list, remove the later (dead) ones.
> +/// RemoveDuplicates - If there are duplicate directory entries in the
> +/// specified search list, remove the later (dead) ones.
>
> No, this was fine before.  Be sure to set your reflow column to be 80.
>
>
> +bool getSystemRegistryString(const char *keyPath, const char *valueName,
> +                       char *value, size_t maxLength) {
> +  (void)keyPath;
> +  (void)valueName;
> +  (void)value;
> +  (void)maxLength;
> +  return(false);
> +}
>
> No, just omit the parameter name in the definition instead of cast to
> (void).
>
>
> About the CMakeLists.txt change, ick.  Too much cut-n-paste programming.
>  If there is a way to say add this flag for this translation unit, that'd be
> best, second best would be to say, remove this flag for just this unit.  I
> was hoping there'd be a way to do that in just a few lines (like two,
> something like remove_flag(InitHeaderSearch.cpp, /Za)) or some such.  I'h
> hoping a cmake person can suggest something better.  Barring that, can you
> set a flag, check that in that flag in add_clang_library, and omit adding
> the /Za option?
>



-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091012/b690220a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: windows_include_paths_4.patch
Type: application/octet-stream
Size: 11765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091012/b690220a/attachment.obj>


More information about the cfe-dev mailing list