[CMake] SS12 and -xcode=pic32

George Neill georgen at neillnet.com
Mon Oct 27 16:46:44 EDT 2008


On Mon, Oct 27, 2008 at 3:33 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> George Neill wrote:
>>
>> Alan,
>>
>> On Mon, Oct 27, 2008 at 3:10 PM, Alan W. Irwin
>> <irwin at beluga.phys.uvic.ca> 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)

I believe this is my issue, I am setting the variable before I issue
the PROJECT command.  I have created my own CMAKE_BUILD_TYPE's and I
do all of my "compiler" (flags, etc...) assignments before the PROJECT
command, is there a better way to do this?

Thanks much,
George.


More information about the CMake mailing list