PGI on Windows should use the Visual C++ linker and librarian and not
the ar provided for legacy reasons. The compiler parameters themselves
are the same as their Linux parameters and not compatible to MSVC
however.
PGI demands -Bdynamic (/MD equivalent) for linking together dynamic
libraries, so we should make it our default mirroring the settings of
e.g. Visual C++ and Intel C++.
Since PGI does not write linker directives into objects, the necessary
libraries have to be parsed from commandline. PGI does however link the
Visual C++ runtime libraries, so they have to be filtered out to ensure
no collision with settings of other languages can occur.
I encountered an issue where not all prerequisites would be listed by
`get_prerequisites` since some of the prerequisites cannot be resolved
and are added to the list of unseen prerequisites. This has the side
effect of clearing the list of `prerequisites_var` and thus removes some
prerequisites from the list. Fix it.
By using only -F, SunPro does not process files that don't have a .F or
.F90 extension. This means that the preprocess rules don't quite work as
expected, for instance breaking the Ninja generator's behavior during
cmake_ninja_depends.
Follow up commit e17b179184 (Features: On SunPro link with language
standard compiler flag, 2017-04-28) to apply the same fix to the feature
checks. The `try_compile` used for these is intentionally not using
`CXX_STANDARD`-based logic so that it can test the individual flags.
93f119ed FortranCInterface: Add support for PGI on Windows
2cfea104 FortranCInt: Pass CONFIG flags to try_compile
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !802
d47190ba NAG: Detect compiler version of NAG Fortran
d52a4256 NAG: Extend compiler tool selection with NAG Fortran
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: Tom <tom.clune@nasa.gov>
Merge-request: !809
This change ensures that Intel Fortran's /libs: in
CMAKE_Fortran_FLAGS and Visual C++'s /MT or /MD in the
CMAKE_C_FLAGS_RELEASE do not conflict with each other.
Ensure that PGI on Linux keeps its
CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS empty, especially of -rdynamic.
In CMakeFortranInformation a lot of flags will be copied from their C
equivalents if they're not defined. By using a combination of GCC and
PGFortran, this will lead to -rdynamic ending up in the PGI flags and
none of the PGI compilers understand that flag, crashing with a fatal
error.
The change in commit b888104e44 (FindOpenCL: add AMDAPPSDKROOT into
paths for OpenCL library, 2017-05-03) accidentally left out the `PATHS`
keyword. Without it properly installed AMD APP SDK (OpenCL) cannot be
detected. Tested on Ubuntu 16.04.
OpenJDK 9 early access builds use a version string of "9-ea", and
locally built installations use "9-internal", neither of which is
currently accepted by the FindJava macro. Map those versions to "1.9".
If the final released version is "9.0" the version interpretation could
be changed to match at that time.
d9089876 AppleClang: Use common compiler macros for language standard default
174c02e1 SunPro: Use common compiler macros for language standard default
08fa2ba8 Clang: Use common compiler macros for language standard default
0198502f Intel: Use common compiler macros for language standard default
d1aa2b3f GNU: Use common compiler macros for language standard default
87b9d6d9 XL: Use common compiler macros for language standard default
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !787
9b97cb55 PGI: Add language standards for PGI
daae564d Cray: Add language standards for the Cray compiler
25e83ce5 CompileFeatures: Let STD compile options be a list
1de70845 Compilers: Add common macros to be used by various compilers
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !784
e17b1791 Features: On SunPro link with language standard compiler flag
d037be12 cmLocalGenerator: Add a hook for compiler flags used at link time
b115bc49 Features: Refactor <LANG>_STANDARD update
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !783