Brad King wrote: > On 10/7/2011 7:21 AM, Stephen Kelly wrote: >> I have a check for the Wl,--no-undefined flag in the test, and on some >> platforms the check passes (it seems), but the test fails later. > > Many linkers simply warn about an unused flag and ignore it. > It's hard to test for them. Unfortunately I don't have time > now to dig into this to be of further help. >
My test shows that check_cxx_compiler_flag (which creates an executable) doesn't even cause the compiler to issue a warning when the unrecognized compiler flag is used: http://www.cdash.org/CDash/testDetails.php?test=118342963&build=1604891 However, when compiling a shared library it fails directly: http://www.cdash.org/CDash/testDetails.php?test=118193330&build=1601576 Would it break anything if we changed check_cxx_compiler_flag to build a shared library instead of an executable? Maybe that will make the try_compile fail as expected. (I'll try add a test for that now) -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers