[CMake] pg compilers on the Cary XT4
Will Dicharry
wdicharry at stellarscience.com
Thu Aug 20 10:58:39 EDT 2009
John R. Cary wrote:
> which is basically Linux.
>
> Building a project with pgcc/pgCC.
>
>
> All flags are empty:
>
> CMAKE_CXX_COMPILER
> /opt/pgi/8.0.4/linux86-64/8.0-4/bin/pgCC
> CMAKE_CXX_FLAGS
>
> CMAKE_CXX_FLAGS_DEBUG
>
> CMAKE_CXX_FLAGS_MINSIZEREL
>
> CMAKE_CXX_FLAGS_RELEASE
>
> CMAKE_CXX_FLAGS_RELWITHDEBINFO
> Where should I add these?
Hi John,
I use CMake to build software on Cray XT3, 4, and 5 machines. I started
on an XT3 with a Catamount backend, so a cross compile was actually
necessary and I set the above options in a toolchain file and passed the
file into cmake with -DCMAKE_TOOLCHAIN_FILE.
For the XT4, the CNL backend no longer requires a cross compile. We had
a discussion on the list about this last month, and for setting the
compilers I believe the consensus was to either:
1. Set them as environment variables. CMake will check the value of
the environment variables CC, CXX, and FC for the names of the C, C++,
and Fortran compilers respectively.
2. Use cmake -C to pass an initial cache containing CMAKE_C_COMPILER,
CMAKE_CXX_COMPILER, etc.
>
>
> Another question: The default builds seem to be DEBUG,
> MINSIZEREL, RELEASE, RELWITHDEBINFO. Suppose I wanted
> to define a new kind of build, e.g., PERFORMANCE.
> How can I go about doing this?
When using the makefile generator, you can define a new build type by
setting it in the CMAKE_BUILD_TYPE variable and defining language flags
for that type, so you could do something like:
set( CMAKE_BUILD_TYPE PERFORMANCE )
set( CMAKE_C_FLAGS_PERFORMANCE "-O3" )
set( CMAKE_CXX_FLAGS_PERFORMANCE "-O3" )
take a look at http://www.cmake.org/Wiki/CMake_Useful_Variables in the
CMAKE_BUILD_TYPE section.
Hope this helps,
Will
>
> Thanks....John Cary
>
>
>
>
--
Will Dicharry
Software Developer
Stellar Science Ltd Co
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3344 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090820/17023ca4/attachment-0001.bin>
More information about the CMake
mailing list