Closed GoogleCodeExporter closed 9 years ago
On Mac OS X after removing 'dl' from CMakeLists.txt IWYU is built and linked
fine. Both in-tree and out-of-tree (for 3.4) configurations.
What if bring 'dl' in 'Platform dependencies' block? For example,
if WIN32:
shlwapi
else:
if LINUX:
dl
pthread
curses
I am not sure if it's better, just an idea.
Original comment by vsap...@gmail.com
on 29 May 2014 at 4:45
Sorry, I don't understand what you're saying...?
I thought this is what the patch does, but you seem to mean something else.
Original comment by kim.gras...@gmail.com
on 29 May 2014 at 7:16
You are right, my mistake. I somehow understood your patch as "if(LINUX)" part
is after "if(WIN32)else()endif()".
Original comment by vsap...@gmail.com
on 29 May 2014 at 7:22
Ah, I see.
It's a shame the platform checks are so inconsistent, I'll look into using the
same CMake mechanism for checking both of them, maybe it becomes clearer.
There's no LINUX symbol defined, so it looks like the most consistent is to use
CMAKE_SYSTEM_NAME.
Original comment by kim.gras...@gmail.com
on 29 May 2014 at 7:27
Fixed in r548.
Original comment by kim.gras...@gmail.com
on 29 May 2014 at 7:57
I forgot to mention that we require no changes in Makefile. I prefer to state
it explicitly to avoid impression that we've just forgotten about Makefile.
'dl' in CMakeLists.txt is needed because we use add_executable instead of
add_clang_executable. And we use add_executable to support out-of-tree build.
Such build isn't supported by Makefile, so no worries about 'dl' in Makefile.
Original comment by vsap...@gmail.com
on 29 May 2014 at 10:44
Original issue reported on code.google.com by
kim.gras...@gmail.com
on 27 May 2014 at 8:31Attachments: