[CMake] bug or feature with SET_SOURCE_FILES_PROPERTIES?
Prakash Punnoor
lists at punnoor.de
Tue Nov 22 12:52:10 EST 2005
Brad King schrieb:
> Prakash Punnoor wrote:
>>Brad King schrieb:
>>>Prakash Punnoor wrote:
>>>
>>>> SET(TEST_SRC test/test${TEST}.c)
>>>> SET_SOURCE_FILES_PROPERTIES(${TEST_SRC} PROPERTIES COMPILE_FLAGS
>>>>"-Wno-unused")
>>>
>>>[snip]
>>>> SET_SOURCE_FILES_PROPERTIES(test/testcpp.cc PROPERTIES COMPILE_FLAGS
>>>>"-Wno-unused")
> If it is not a typo please try unrolling the loop for a couple of the .c
> tests and make sure it works outside the FOREACH.
Forget it, my fault - partially. cmake does put in the flag (I wrongly
looked at the linker command line - looked quite alike...) but what is
sub-optimal is the fact that cmake puts the flag at the beginning -
before the other cflags. Usually if I want to explicitly use above I
want to override some default flags - but the exact opposite is the
case. As the flag is at the beginning it possibly get overridden by
others. :-/
So is there a special reason for this? If not I'd like to have the flags
placed at the very end if I specify them to be sure that they get
respected. (An idea for improvement would probably be if the user could
select where the flags goes - beginning or end.)
Cheers,
Prakash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20051122/9d64eaaf/signature.pgp
More information about the CMake
mailing list