I'm trying to write a test to check if a gcc compiler options is supported.

I can't quite work out how to get the test code to compile with the flag I 
need check. I've tried doing this:

TRY_COMPILE(CMAKE_GCC_VISIBILITY
        ${CMAKE_BINARY_DIR}
        ${CMAKE_BINARY_DIR}/CMakeTmp/testGCCvisibility.c
        CMAKE_FLAGS -DCMAKE_C_FLAGS:STRING=-fvisibility=hidden
        OUTPUT_VARIABLE OUTPUT
        )

But when the test code is executed the flag I've specified 
(-fvisibility=hidden) isn't passed to the compiler. I suspect that I'm doing 
something wrong, but I can't see it myself :-(

Any help/ideas appreciated.

-- 
David Somers
typographer/programmer/whatever
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to