Since the flags for executables are almost always the same as those for
shared libraries each language information file just uses the latter for
the former by default. This reduces duplication in the compiler and
platform flag information files.
Move RPATH flags out of Platform/AIX.cmake into platform-specific
compiler information files Platform/AIX-XL and Platform/AIX-GNU.
The flags need to be set for each compiler of each language.
CMAKE_ASM_COMPILE_OBJECT is now so that it fits for GNU, Intel, HP and Sun
ASM_ATT had to be adjusted. Also adjusted the default
CMAKE_ASM_LINK_EXECUTABLE
Alex
Commit 6a61a8a5 (Honor module .def files with MinGW tools, 2011-02-21)
set CMAKE_LINK_DEF_FILE_FLAG to "-Wl," to enable passing .def files to
the linker on MinGW. However, older GNU tools in the MSYS shell do not
know how to translate "-Wl,/c/..." to "c:/..." and complain that the
file does not exist. Instead set the flag to just "" which tells CMake
it can pass the file through the front-end with no special flag.
7a1027a When checking find_package() components, special case qtmain.
4c1c358 FindQt4: Include builtin FindPackageHandleStandardArgs directly
43cb9b8 Change to use fphsa to check required variables and version.
Since commit 024d05ad (Fix use of module .def files for MS tools,
2009-09-29) module .def files work for any platform that sets
CMAKE_LINK_DEF_FILE_FLAG correctly. Set it in the Windows-GNU platform
information file to enable support with MinGW tools. Also enable the
test added by commit 0db2c850 (Test use of module .def files for MS
tools, 2009-09-29) for MinGW and MSYS generators.
When initializing CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS from LDFLAGS
and CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS_INIT quote the whole string
in case both are set.
Reported-by: Daniel R. Gomez <gomez@teragram.com>
Clients may define CTEST_TEST_TARGET_ALIAS in a project's
initial cache to get a target of another name that executes
the same underlying command as "make test"
When running
$ mpif77 -c example.f -o example.f.o
mpif77 recognizes -o and produces example.f.o, but when running
$ mpif77 -o example.f.o -c example.f
the -o option is ignored and the object file is example.o. Performing
the same experiment on the underlying compiler tool or with the mpicc
and mpiCC wrappers does not exhibit this behavior, so the issue appears
to be specific to mpif77.
Reported-by: Zhen Wang <zwang26@emory.edu>
This commit changes the way how the assembler support works in cmake.
The language "ASM" now always uses the C/Cxx compiler instead
of the assembler directly. This fixes#8392, assembler files are
not preprocessed.
If one wants to use the assembler directly, the specific
assembler "dialect" has to be enabled. I.e. to get as/gas,
you have to use now ASM-ATT, the same way for ASM_MASM and ASM_NASM.
Implemented this now for gcc.
SunStudio, IBM, HP and Intel still todo.
Alex
dd2f814 Merge branch 'dev/add_test-working-directory' into dev/strict-mode
949d32c Unwatch manual variables upon removal in cmake-gui
3939032 Unwatch manual variables upon removal in ccmake
8354413 Add method to unwatch a manual variable
8ed3c85 Give a better message for unused variables
729db48 Fix ArgumentExpansion test expected results
89c2544 Checking for a definition is a usage
5625dee Don't output to stderr in the GUI
ad25a96 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
c128abe Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode
9bcaff0 Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
544d0c3 Fix expected output for WarnUninitialized test
4e3bea4 Update expected messages to new format
8e8c9e4 Don't check at destruction for usage
668e005 Use cmake::IssueMessage for warnings
88cd4c1 Use 'CMake Warning' versus 'warning' for CDash
3c3b98d Initialize the class before setting warn flags
cf8b15a Ignore files under the CMakeFiles directory
fd50f06 Don't check for unused vars at configure time
447a04c Don't warn during configure when doing everything
b97ee21 Check for unused variables at the end of generate
c18c977 When checking for variables, specify a reason
3f1121f Use a long int since Line is a long as well
2507f93 Change the failure case string to 'Unexpected'
fe390a2 Add 'ArgumentExpansion' test
8dbb209 Wrong boolean value for CLI warnings
d4ee998 Hard-code the --no-warn-unused-cli flag
a267b99 Fix line lengths
82ed104 Flag that the directories have been set
5aa535b Add argument to arg parsing to not set directories
367e5c3 Revert "Revert "When calling CMake, set the args and the cache""
ab5d4e4 Revert "When calling CMake, set the args and the cache"
9b90040 When calling CMake, set the args and the cache
fe56002 Fix long lines for KWStyle
5d30cfc Set a watch on variables added through the gui
33c63b1 Add a method to put a watch for variables
535253f Initialize the warning variables earlier
cbb286c Fix the path detection to work for top-level
62be1f7 Initialize the usage stack earlier
c6e7fab Factor out the checks for unused variables
5e41ba8 When using the API, check for Add vs. Remove
dee1976 Fix typo in VariableUnusedViaUnset test
f231ce5 Remove old false positive avoidance code
a117e02 Revert "Add test for unused warnings at the end of scope"
2c82f2b Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage
6d7d449 Ignore CLI warnings for ABI determination
7740a73 Only return local keys that are defined
bef3aee Use the API so that warnings can be tracked
05cb0f4 Check for unused variables in the dtor
91c4c99 Add test for unused warnings at the end of scope
ca90f67 Fix detection of unused variables when setting
f7438ca Add test for unused detection via setting it
995cfb0 Don't warn if the variable wasn't defined
aefc91d Add test for usage checks via unset
a8e97f8 Remove VarRemoved code since it's been superceded
59463ef Rework CheckVariableForUnused usage
f117423 Fix line lengths to be no more than 78
e49a935 Improve unused warning logic
e01e40c Mark ARGC, ARGV*, and ARGN as used
a17aff7 Ignore CMAKE_MATCH_* variables for usage
02a114d Add method to allow variables to be marked as used
a0b0d23 CMAKE_DO_TRY_COMPILE is no longer used
ae3eff3 Fix the path used for ignoring system warnings
056b441 Fix missing case for usage of a variable
980e048 Factor out checks for unused variables
83acb0a Remove now unused variables
3801463 Use built-ins for readability and maintainability
8b52015 Push the initialize and unused states when copying
439877f Be consistent with single and double quotes
4cf1706 Add documentation for check-system-vars
b74777f Fix the spelling of the flag for warn-unused-vars
b948120 Change logic of flag to turn off cli unused checks
f047a17 Add test for uninitialized variables
75bda38 Add tests for unused command line variables
300fc15 Fix detection of system files
d784e6a Run the unused variables check on the final pass
9efc057 VariableWatch is not available when bootstrapping
2e78224 Add a missing comma to the warning message
7499700 Add a flag to warn about system files
fff9f6d Rename flags again and use variablewatch for cli
786e269 Add warn-unused to the Qt interface
636e6c4 Default to marking things as used
4ff0340 Rename find-unused to warn-unused
d7999e9 Rename strict-mode to warn-uninitialized
e141bc9 Detect unused variables
d3e8eb5 Add flags to detect unused variables
f332e14 Complete strict-mode checks for uninitialized vars
52f9637 Add method to get the local scope variables
f794d58 Make --strict-mode option, and integrate with cmake-gui
48b5b85 Add a warning when variables are used uninitialized.
cd626ea For macros make sure the FilePath points to a valid pointer in the args.
The FindPackageHandleStandardArgs module was originally created outside
of CMake. It was added for CMake 2.6.0 by commit e118a627 (add a macro
FIND_PACKAGE_HANDLE_STANDARD_ARGS..., 2007-07-18). However, it also
proliferated into a number of other projects that at the time required
only CMake 2.4 and thus could not depend on CMake to provide the module.
CMake's own find modules started using the module in commit b5f656e0
(use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS in some of the FindXXX
modules..., 2007-07-18).
Then commit d358cf5c (add 2nd, more powerful mode to
find_package_handle_standard_args, 2010-07-29) added a new feature to
the interface of the module that was fully optional and backward
compatible with all existing users of the module. Later commit 5f183caa
(FindZLIB: use the FPHSA version mode, 2010-08-04) and others shortly
thereafter started using the new interface in CMake's own find modules.
This change was also backward compatible because it was only an
implementation detail within each module.
Unforutnately these changes introduced a problem for projects that still
have an old copy of FindPackageHandleStandardArgs in CMAKE_MODULE_PATH.
When any such project uses one of CMake's builtin find modules the line
include(FindPackageHandleStandardArgs)
loads the copy from the project which does not have the new interface!
Then the including find module tries to use the new interface with the
old module and fails.
Whether this breakage can be considered a backward incompatible change
in CMake is debatable. The situation is analagous to copying a standard
library header from one version of a compiler into a project and then
observing problems when the next version of the compiler reports errors
in its other headers that depend on its new version of the original
header. Nevertheless it is a change to CMake that causes problems for
projects that worked with previous versions.
This problem was discovered during the 2.8.3 release candidate cycle.
It is an instance of a more general problem with projects that provide
their own versions of CMake modules when other CMake modules depend on
them. At the time we resolved this instance of the problem with commit
b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake
everywhere, 2010-09-28) for the 2.8.3 release.
In order to address the more general problem we introduced policy
CMP0017 in commit db44848f (Prefer files from CMAKE_ROOT when including
from CMAKE_ROOT, 2010-11-17). That change was followed by commit
ce28737c (Remove usage of CMAKE_CURRENT_LIST_DIR now that we have
CMP0017, 2010-12-20) which reverted the original workaround in favor of
using the policy. However, existing project releases do not set the
policy behavior to NEW and therefore still exhibit the problem.
We introduced in commit a364daf1 (Allow users to specify defaults for
unset policies, 2011-01-03) an option for users to build existing
projects by adding -DCMAKE_POLICY_DEFAULT_CMP0017=NEW to the command
line. Unfortunately this solution still does not allow such projects to
build out of the box, and there is no good way to suggest the use of the
new option.
The only remaining solution to keep existing projects that exhibit this
problem building is to restore the change originally made in commit
b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake
everywhere, 2010-09-28). This also avoids policy CMP0017 warnings for
this particular instance of the problem the policy addresses.
In commit 295b5b60 (Honor CMAKE_USER_MAKE_RULES_OVERRIDE in try_compile,
2010-06-29) we started passing the value of this variable when building
a try_compile project. If the variable contains a relative path it must
be treated with respect to the file where it is first used. Ensure that
the value is converted to a full path so that it is correctly referenced
in the try_compile projects.
The module header was being placed in the source tree before. Thanks to
Marcel Loose for the patch, this ensures the file is written to the
build tree.
The parent commit added a warning message whenever a required file
does not exist.
As it turns out, the "required" files never exist when built with
Visual Studio Express editions. Add a variable to suppress these
warning messages because only packagers or naive includers of
this file will care to see such warning messages.
We want to warn about this condition by default so that people who
are using InstallRequiredSystemLibraries without understanding it
fully will have a chance of understanding why it's not working in
the event of missing required files.
But we also want to give projects the ability to suppress this warning
(by "project's choice default") so that they can encourage users who
are restricted to using an Express edition to build their project.
Packagers should explicitly use...
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=OFF
...when building releases. That way, their release build process will warn
them about any missing files, but only if their project CMakeLists files
use a construct similar to CMake's:
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
ENDIF()
Thanks to "J Decker" on the CMake mailing list for pointing out
that one of the MSVC10_CRT_DIR settings was using "VC90" instead
of "VC100".
After fixing that, I added the code to generate a CMake warning
if one of the files we think is "required" does not exist.
Then, with VS10, there were several other problems that the
warning revealed:
- MSVC10_REDIST_DIR needed more PATHS to be found correctly
- the 64-bit directory is named "x64" now, not "amd64" as in
previous VS versions
- manifest files no longer exist as separate files in the
redist subdirectories (they must be built-in as resources
to the dlls...?)
The check works for macros, functions, and variables, but not for types
or enumeration values. Clearly describe the behavior of the check with
respect to each symbol type.
ce28737 Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017
7db8db5 Improve documentation and messages for the new CMP0017
db44848 Prefer files from CMAKE_ROOT when including from CMAKE_ROOT
1e69c6f Merge branch 'user-policy-defaults' into policy-CMP0017
65a0a2a Merge branch 'include-command-whitespace' into policy-CMP0017
Control the root directory of the default directory presented to
the end user of an NSIS installer by a CPack variable.
Previously, the value used in the NSIS script was $PROGRAMFILES,
which is equivalent to the "ProgramFiles" environment variable.
That default value is still the same, but now a project may
override the value by setting this new variable.
Introduced an additional variable, Python_ADDITIONAL_VERSIONS, to both
FindPythonLibs and FindPythonInterp. Changed FindPythonInterp to loop
over versions rather than hardcoding all versions (more like libs).
Commit aaa88d33 (Build large archives incrementally, 2008-08-04)
hard-coded rules to create static archives incrementally in each
language information file. Set each rule conditionally to allow
compiler and platform information files to override the language
default rules.
Inspired-by: Harald Pohl <pohl.h@eppendorf.de>
Unset VS_UNICODE_OUTPUT when executing a command whose output
is being logged to a file. Previously, running Microsoft tools
in sub-processes of Visual Studio would send their output to
the Visual Studio output pipe named by this environment variable.
Unsetting it forces the output back to the normal stdout and stderr
channels where cmake can intercept it and direct it to the
appropriate log files.
MUI_FINISHPAGE_RUN is frequently used with NSIS and provides a checkbox
on the finish page of an installer which specifies whether the specified
executable should be run when the installer exits. This commit adds support
for this setting in CPack.
NSIS installers default to assuming the executables exist in a
directory named "bin" under the installation directory. As this
isn't usual for Windows programs, the addition of this variable
allows the customization of this directory and links still to be
created correctly.
Add support to InstallRequiredSystemLibraries to only install
debug libraries when both debug and release versions are available.
This is as if you are building a debug package then only the debug
versions are needed but not the release.
InstallRequiredSystemLibraries currently defaults to installing to
bin on WIN32 and lib otherwise. This patch allows you to configure
this by using the variable CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION.
It also switches the logic to use a single INSTALL(PROGRAMS) command
rather than two deprecated uses of the INSTALL_PROGRAMS command.
In InstallRequiredSystemLibraries the documentation details the
variable CMAKE_SKIP_INSTALL_RULES to skip installation. This
actually doesn't do anything, the variable required is named
CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP. This commit amends the
documentation to point to the correct variable.
971692c Build enable_language command during bootstrap
960ace1 Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
060d6e8 Add support for windres to cygwin.
b2f308c Add support for windows resources with mingw/msys.
This puts the new search behaviour for included files in action, i.e.
now when a file from Modules/ include()s another file, it also gets the
one from Modules/ included, i.e. the one it expects.
Alex
Since commit 70c2dc8a (Make compiler id detection more robust,
2008-03-10) we store compiler identification strings in test binaries
using the form
char* info = "info";
Use the const-correct
char const* info = "info";
form instead. This allows the C++ compiler identification to work with
"-Werror -Wall" or equivalent flags if the compiler would warn about
const-to-non-const conversion.
The TI DSP compiler predefines "__TI_COMPILER_VERSION__". Use this to
identify the C and C++ compilers. For assembler language the C compiler
executable is used:
$ cl6x -h
TMS320C6x C/C++ Compiler v6.1.11
Tools Copyright (c) 1996-2009 Texas Instruments Incorporated
Use this command-line option and output to recognize the assembler.
The Mac linker defines flag -headerpad_max_install_names but not all
front-ends recognize the flag and pass it through (many did in the past,
such as the Apple port of GCC). Use the -Wl, option prefix to tell
front-ends to pass it through without trying to interpret it.
One of Cygwin's goals is to build projects using the POSIX API with no
Windows awareness. Many CMake-built projects have been written to test
for UNIX and WIN32 but not CYGWIN. The preferred behavior under Cygwin
in such projects is to take the UNIX path but not the WIN32 path.
Unfortunately this change is BACKWARDS INCOMPATIBLE for Cygwin-aware
CMake projects! Some projects that previously built under Cygwin and
are Cygwin-aware when they test for WIN32 may now behave differently.
Eventually these projects will need to be updated, but to help users
build them in the meantime we print a warning about the change in
behavior. Furthermore, one may set CMAKE_LEGACY_CYGWIN_WIN32 to request
old behavior during the transition.
Normally we avoid backwards incompatible changes, but we make an
exception in this case for a few reasons:
(1) This behavior is preferred by Cygwin's design goals.
(2) A warning provides a clear path forward for everyone who may see
incompatible behavior, and CMAKE_LEGACY_CYGWIN_WIN32 provides a
compatibility option. The warning and compatibility option both
disappear when the minimum required version of CMake in a project is
sufficiently new, so this issue will simply go away over time as
projects are updated to account for the change.
(3) The fixes required to update projects are fairly insignificant.
Furthermore, the Cygwin distribution has no releases itself so project
versions that predate said fixes tend to be difficult to build anyway.
(4) This change enables many CMake-built projects that did not
previously build under Cygwin to work out-of-the-box. From bug #10122:
"I have built over 120 different source packages with (my patched)
CMake, including most of KDE4, and have found that NOT defining
WIN32 on Cygwin is much more accurate." -- Yaakov Selkowitz
A fully compatible change would require patches on top of these project
releases for Cygwin even though they otherwise need not be aware of it.
(5) Yaakov has been maintaining a fork of CMake with this change for the
Cygwin Ports distribution. It works well in practice. By accepting the
change in upstream CMake we avoid confusion between the versions.
CMake itself builds without WIN32 defined on Cygwin. Simply disable
CMAKE_LEGACY_CYGWIN_WIN32 explicitly in our own CMakeLists.txt file.
09d1c10 FortranCInterface: Recognize NAG Fortran module symbols
af2ad90 Add NAG Fortran compiler information files
24cc3d4 Recognize the NAG Fortran compiler
83892c4 Allow Fortran platform files to set empty values
fe3f878 Detect object files in implicit link information
Use "int main(void)" instead of just "int main()" so that compiling with
"gcc -Werror=strict-prototypes" works. Test this check using the flags
"-Werror -Wstrict-prototypes" to work with old GCC versions.
Since commit aff31479 (Modernize GNU compiler info on Windows,
2009-12-02) the file Modules/Platform/Windows-g++.cmake has been unused.
It just includes the non-existent Modules/Platform/Windows-gcc.cmake so
remove it outright.
This moves Intel compiler info on Windows into new-style modules
Platform/Windows-Intel-<lang>.cmake
using language-independent helper module
Platform/Windows-Intel.cmake
to define macros consolidating the information.
Commit 4430bccc (Change the way 32/64 bit compiles are detected with
MSVC and intel, 2009-11-19) added detection of the target processor to C
and CXX language builds with MS and Intel tools. Do the same for Intel
Fortran for Windows (ifort). Use /machine:<arch> to link executables.
3bc828d Fixed bug where last entry would be lost.
b316087 Escape file write expansion, and build up lists.
68cd3fe Added CMAKE_CACHE_ARGS to ExternalProject.
27ee50a Add ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT as a ADVANCED cache variable (#9631)
50d21d4 Add cache var CMAKE_ECLIPSE_MAKE_ARGUMENTS when using the Eclipse generator
This variable can be set to command line arguments which will be passed
to make when eclipse invokes make, e.g. you can enter "-j8" to get
8 parallel builds (#9930)
Alex
Escaped the @var@ in the file writes - this was being expanded at file
write and so not causing a reconfigure at the right time. I also took
care of build up lists of lists in the variables, especially important
for things like MPI_EXTRA_LIBRARY. Added some error checking, and use
the tmp_dir for initial cache file.
On Windows the limit for command line arguments is 8192 characters, and
this was limiting longer paths with some of our more nested projects
such as Library. Placing the -D arguments into CMAKE_CACHE_ARGS will
write out an initial cache file, that will be passed to CMake with a -C
argument as the initial cache.
By forcing the cache variables we preserve the existing behavior with
-D, to change the values of cache variables in our inner projects.
On Linux the NAG Fortran compiler uses gcc under the hood to link. Use
"-Wl,-v" to pass "-v" to the underlying gcc compiler to get verbose link
output. Detect the NAG Fortran directory (using -dryrun) and then honor
object files in the directory referenced in the implicit link line.
Pass real linker options with "-Wl,-Xlinker,". The -Wl, gets through
the NAG front-end and the -Xlinker gets through the gcc front-end.
The Numerical Algorithms Group (NAG) Fortran compiler does not document
a preprocessor macro to identify it. Check for identifying output using
the -V option.
Teach CMakeFortranInformation to use default flags only for variables
that have not been set at all, rather then not set or empty. This will
allow platform or compiler-specific information files to set empty
values without getting the defaults.
The NAG Fortran compiler implicitly passes object files by full path to
the linker. Teach CMakeParseImplicitLinkInfo to parse object files that
match some tool-specific regular expression.
FindTCL.cmake switched variables in the FIND_LIBRARY invocation. The
FIND_LIBRARY() statement for TCL used the TK variables and vice versa.
This patch reverses that into the right usage.
Closes debian issue 600245.
Also, improve the documentation of the fixup_bundle and fixup_bundle_item
functions to clarify that plugin type "libs" need to be copied into
the bundle *before* calling fixup_bundle.
Commit e93a4b4d34 changed the way that
the libs parameter to fixup_bundle is interpreted. Before the commit,
the libs were copied into the bundle first and then fixed up. After
the commit, the copy was skipped, assuming the libs were in the bundle
in the first place, and then the fixups occurred as before.
However, before the commit, it was possible to name a lib from outside
the bundle, and have it copied in and then fixed up. Its resolved
embedded name was always inside the bundle before. After, its resolved
embedded name was just the same as its resolved name, which is in its
original location, and not necessarily inside the bundle.
This manifested itself as a problem with the ParaView call to
fixup_bundle and its many plugins. Previously, ParaView had simply
passed in the list of plugin file names as they existed in the build
tree, and left the copying into the bundle up to the fixup_bundle
function. When built with CMake 2.8.3 (the first version to contain
the above named commit) the fixup_bundle call would inadventently
fixup libraries in the build tree, not libraries that were in the
bundle. Furthermore, the plugins would not be in the final bundle.
This points out the fact that the fix for the bugs made by the above
commit was a backwards-incompatible change in behavior.
This commit makes it an error to try to fixup an item that is not
already inside the bundle to make the change in behavior apparent
to folks who were depending on the prior copy-in behavior: now,
they should get an error, and hopefully, reading the new and
improved documentation, should be able to resolve it in their
projects by adding code to install or copy in such libraries prior
to calling fixup_bundle.
Whew.
e0b6016 Some more fixes for nasm support, from Etienne (#10069)
d25c2eb Use CMAKE_ASM_NASM_FLAGS for nasm instead of FLAGS
e614e9b Add support for yasm, a nasm compatible assembler
79dd9be We already have 2010, fix copyright year.
ffeca06 Add missing copyright headers
7b337ac Improve misleading comments.
e1fc9b9 Add support for nasm assembler, patch by Peter Collingbourne (see #10069)
Use the Config mode of find_package to search for ITKConfig. This makes
FindITK a thin-wrapper around a standard find_package, bringing benefits
like searching lib64 paths when appropriate. This does for FindITK what
commit 2c1a01dc (Modernize FindVTK module, 2009-10-07) did for FindVTK.
The Mac linker defines -headerpad_max_install_names and the GCC
front-end passes this flag through. The PGI compiler does not know
about this flag, so we must use -Wl,-headerpad_max_install_names to pass
it to the linker instead.
CMakeDetermineASMCompiler.cmake relied on that somebody else (usually
during enabling C or CXX) already included that file, and broke if that
was not the case.
Thanks to Louis for the patch
Alex
The Cray Fortran compiler needs "-em" to enable module output and also
"-J." to place the .mod files in the current working directory (instead
of next to the .o file).