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_RELEASECMAKE_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
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
