Commit Graph

4 Commits

Author SHA1 Message Date
Chuck Cranor
d59159afdb Cray: clean up CrayPrgEnv and CrayLinuxEnvironment modules
CrayPrgEnv:
  - add a new function __cmake_craype_linktype() that determines what
    link mode the Cray compiler wrapper will use in a more sophisticated
    way than just MATCHing for static/dynamic on the command line.

  - add a new function __cmake_craype_setupenv() that does a
    once-per-cmake-run setup that does the following:
       1. does a basic check of the wrapper's configuration.  Running
          cmake and then changing module and/or linktype configuration
          may cause build problems (since the data in the cmake cache
          may no longer be correct after the change).  We look for this
          and warn the user about it.
       2. uses the "module" provided PKG_CONFIG_PATH environment variable
          to add additional prefixes to the system prefix path.  This
          function used to be done by CrayLinuxEnvironment using the
          compiler implicit include/link paths but that is intended
          only for cross-compiling on Cray front-end nodes.  Since
          CrayPrgEnv runs on both front-end and compute nodes, we
          migrate this function here.

CrayLinuxEnvironment:
  - No need to set variables like CMAKE_SHARED_LIBRARY_PREFIX to values
    that have already been properly established by CMakeGenericSystem.cmake.
    Remove redundant sets of CMAKE_SHARED_LIBRARY_PREFIX,
    CMAKE_SHARED_LIBRARY_SUFFIX, CMAKE_STATIC_LIBRARY_PREFIX,
    CMAKE_STATIC_LIBRARY_SUFFIX, CMAKE_FIND_LIBRARY_PREFIXES, and
    CMAKE_DL_LIBS.

  - No need to add $ENV{SYSROOT_DIR}/usr/include to CMAKE_SYSTEM_INCLUDE_PATH
    when we already added $ENV{SYSROOT_DIR}/usr to CMAKE_SYSTEM_PREFIX_PATH.

  - Remove __cray_list_intersect(), __list_clean_dupes(), and buggy
    code that adds compiler implicit includes/libs to
    CMAKE_SYSTEM_INCLUDE_PATH and CMAKE_SYSTEM_LIBRARY_PATH.  This
    function has migrated to CrayPrgEnv.cmake, as noted above.

See discussion in issue #17413 for additional details.
2019-02-19 06:50:22 -07:00
Chuck Atkins
e52302d6cb CrayLinuxEnvironment: Add alternative methods to get version info
Closes: #16229
2016-08-05 09:01:43 -04:00
Chuck Atkins
a7ef02253b Cray: Refactor the Cray platform files to use compiler wrapper checks
This is an extensive refactoring of the Cray compiler wrapper usage.
Using the new compiler wrapper checks, the CrayPrgEnv info files have
been moved from Platform/ to Compiler/.  The adjusted naming convention
allows the compiler-wrapper information files to be loaded for both the
CrayLinuxEnvironment platform when cross-compiling and the Linux
platform if building natively on the Cray compute nodes.  It also
creates a separation of common arguments for compiler id and language
information used to perform the appropriate introspection of implicit
arguments and libraries used by the compiler wrappers based on the
loaded module environment.
2015-12-09 08:35:19 -05:00
Chuck Atkins
c54a621b55 Cray: New platform file for Cray Linux Environment and PrgEnv 2015-11-14 11:34:32 -05:00