[CMake] cmake on the BGP

John R. Cary cary at txcorp.com
Tue Sep 1 09:31:06 EDT 2009


Mathieu Malaterre wrote:
> On Tue, Sep 1, 2009 at 2:49 PM, Mathieu
> Malaterre<mathieu.malaterre at gmail.com> wrote:
>   
>> On Tue, Sep 1, 2009 at 2:41 PM, Brad King<brad.king at kitware.com> wrote:
>>     
>>> Mathieu Malaterre wrote:
>>>       
>>>> [  4%] Built target cmsys
>>>> Linking C shared module libcmsysTestDynload.so
>>>> /usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib/crt1.o:(.rodata+0x4):
>>>> undefined reference to `main'
>>>>         
>>> What does "make VERBOSE=1" say?  Clearly this linker
>>> line is missing the flag to make it a shared library
>>> instead of an executable.
>>>       
>
> Copying from Darwin-xlC I get now:
>
>   
>> cat Linux-XL-CXX.cmake
>>     
> SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
> SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
> SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
> SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
> SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
>   


I can verify that this made all work on intrepid.alcf.anl.gov.

BTW - should a 'CXX.cmake' file include *_C_FLAGS?

Curious about how these work.  I assume that cmake does
a mapping from the OS and compiler to a Platform file, but
then there are also Compiler files.   Could one put
the above into Modules/Compiler/XL-CXX.cmake and have
it work for all platforms?

Thanks......John Cary



-- 
Tech-X Corp., 5621 Arapahoe Ave, Suite A, Boulder CO 80303
cary at txcorp.com, p 303-448-0727, f 303-448-7756, NEW CELL 303-881-8572



More information about the CMake mailing list