This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via c3181e513d998593ac6c3d8a0baba5257302e32f (commit) via de6472a9aeb36c16414062f858fd34bb01efd652 (commit) via 66d8ec9dd1c936873ba89ac40cabe1b75b7230ed (commit) from 3be554f2cbc3cfa45458df87d0f25e50927c6006 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3181e513d998593ac6c3d8a0baba5257302e32f commit c3181e513d998593ac6c3d8a0baba5257302e32f Merge: 3be554f de6472a Author: Chuck Atkins <chuck.atk...@kitware.com> AuthorDate: Fri Nov 13 14:39:58 2015 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Nov 13 14:39:58 2015 -0500 Merge topic 'add-cray-linux-platform' into next de6472a9 Cray: Added documentation for cross compiling on a Cray 66d8ec9d Cray: Give better error messages https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de6472a9aeb36c16414062f858fd34bb01efd652 commit de6472a9aeb36c16414062f858fd34bb01efd652 Author: Chuck Atkins <chuck.atk...@kitware.com> AuthorDate: Fri Nov 13 14:37:56 2015 -0500 Commit: Chuck Atkins <chuck.atk...@kitware.com> CommitDate: Fri Nov 13 14:37:56 2015 -0500 Cray: Added documentation for cross compiling on a Cray diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst index 492fcac..3d1973e 100644 --- a/Help/manual/cmake-toolchains.7.rst +++ b/Help/manual/cmake-toolchains.7.rst @@ -151,6 +151,34 @@ target system prefixes, whereas executables which must be run as part of the bui should be found only on the host and not on the target. This is the purpose of the ``CMAKE_FIND_ROOT_PATH_MODE_*`` variables. +Cross Compiling for the Cray Linux Environment +---------------------------------------------- + +Cross compiling for compute nodes in the Cray Linux Environment can be done +without needing a seperate toolchain file. Specifying +``-DCMAKE_SYSTEM_NAME=CrayLinuxEnvironment`` on the CMake comamnd line will +ensure that the appropriate build settings and search paths are configured. +The platform will pull its configuration from the current environment +variables and will configure a project to use the compiler wrappers from the +Cray Programming Environment's ``PrgEnv-*`` modules if present and loaded. + +The default configuration of the Cray Programming Environment is to only +support static libraries. This can be overridden and shared libraries +enabled by setting the ``CRAYPE_LINK_TYPE`` environment variable to +``dynamic``. + +Running CMake without specifying :variable:`CMAKE_SYSTEM_NAME` will +run the configure step in host mode assuming a standard Linux environment. +If not overriden, the ``PrgEnv-*`` compiler wrappers will end up getting used, +which if targeting the either the login node or compute node, is likely not the +desired behavior. The exception to this would be if you are building directly +on a NID instead of cross-compiling from a login node. If trying to build +software for a login node, you will need to either first unload the +currently loaded ``PrgEnv-*`` module or explicitly tell CMake to use the +system compilers in ``/usr/bin`` instead of the Cray wrappers. If instead +targeting a compute node is desired, just specify the +:variable:`CMAKE_SYSTEM_NAME` as mentioned above. + Cross Compiling using Clang --------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66d8ec9dd1c936873ba89ac40cabe1b75b7230ed commit 66d8ec9dd1c936873ba89ac40cabe1b75b7230ed Author: Chuck Atkins <chuck.atk...@kitware.com> AuthorDate: Fri Nov 13 14:09:01 2015 -0500 Commit: Chuck Atkins <chuck.atk...@kitware.com> CommitDate: Fri Nov 13 14:09:01 2015 -0500 Cray: Give better error messages diff --git a/Modules/Platform/CrayLinuxEnvironment.cmake b/Modules/Platform/CrayLinuxEnvironment.cmake index 404dad9..406b03a 100644 --- a/Modules/Platform/CrayLinuxEnvironment.cmake +++ b/Modules/Platform/CrayLinuxEnvironment.cmake @@ -15,11 +15,12 @@ if(DEFINED ENV{CRAYOS_VERSION}) elseif(DEFINED ENV{XTOS_VERSION}) set(CMAKE_SYSTEM_VERSION "$ENV{XTOS_VERSION}") else() - message(FATAL_ERROR "Neither the CRAYXC or CRAYXT CMake variables are defined. Thjis platform file should not be used directly but instead only from the CrayPrgEnv toolchain file") + message(FATAL_ERROR "Neither the CRAYOS_VERSION or XTOS_VERSION environment variables are defined. This platform file should be used inside the Cray Linux Environment for targeting compute nodes (NIDs)") endif() message(STATUS "Cray Linux Environment ${CMAKE_SYSTEM_VERSION}") # All cray systems are x86 CPUs and have been for quite some time +# Note: this may need to change in the future with 64-bit ARM set(CMAKE_SYSTEM_PROCESSOR "x86_64") set(CMAKE_SHARED_LIBRARY_PREFIX "lib") @@ -42,7 +43,7 @@ get_filename_component(__cmake_install_dir "${CMAKE_ROOT}" PATH) get_filename_component(__cmake_install_dir "${__cmake_install_dir}" PATH) -# Note: Some cray's have the SYSROOT_DIR variable defined, pointing to a copy +# Note: Some Cray's have the SYSROOT_DIR variable defined, pointing to a copy # of the NIDs userland. If so, then we'll use it. Otherwise, just assume # the userland from the login node is ok @@ -106,5 +107,5 @@ if(_CRAYPE_ROOT AND ((CMAKE_C_COMPILER MATCHES "${_CRAYPE_ROOT}") OR (CMAKE_CXX_COMPILER MATCHES "${_CRAYPE_ROOT}") OR (CMAKE_Fortran_COMPILER MATCHES "${_CRAYPE_ROOT}"))) - include(Platform/CrayPrgEnv-ToolChain) + include(Platform/CrayPrgEnv) endif() diff --git a/Modules/Platform/CrayPrgEnv-ToolChain.cmake b/Modules/Platform/CrayPrgEnv.cmake similarity index 100% rename from Modules/Platform/CrayPrgEnv-ToolChain.cmake rename to Modules/Platform/CrayPrgEnv.cmake ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-toolchains.7.rst | 28 ++++++++++++++++++++ Modules/Platform/CrayLinuxEnvironment.cmake | 7 ++--- ...CrayPrgEnv-ToolChain.cmake => CrayPrgEnv.cmake} | 0 3 files changed, 32 insertions(+), 3 deletions(-) rename Modules/Platform/{CrayPrgEnv-ToolChain.cmake => CrayPrgEnv.cmake} (100%) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits