George Neill wrote:
Alan,

On Mon, Oct 27, 2008 at 3:10 PM, Alan W. Irwin
<[EMAIL PROTECTED]> wrote:
On 2008-10-27 12:54-0500 George Neill wrote:

Hi All,

I am using cmake 2.4.8 and Sun Studio 12.

I am trying to overwrite these default cmake compiler settings from
Modules/Platorm/SunOS.cmake

 SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC")
 SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC")

to

 SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-xcode=pic32")
 SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-xcode=pic32")


Setting these in the right place should work.

project(foo)
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-xcode=pic32")
add_library(foo SHARED  foo.c)

If I try the above on a linux box I get:


gcc: language code=pic32 not recognized
gcc: language code=pic32 not recognized
gcc: /home/hoffman/test/foo.c: linker input file unused because linking not done
Linking C shared library libfoo.so
/home/hoffman/CMake-build/bin/cmake -E cmake_link_script CMakeFiles/foo.dir/link.txt --verbose=1 /usr/bin/gcc -xcode=pic32 -shared -Wl,-soname,libfoo.so -o libfoo.so CMakeFiles/foo.dir/foo.c.o


-Bill
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to