summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranInformation.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Fix CMAKE_(C|CXX|Fortran)_STANDARD_LIBRARIES helpstrings (#14622)Brad King2013-12-031-1/+1
| | | | | | s/defalut/default/ Reported-by: Stephan Tolksdorf <st@quanttec.com>
* Make CMAKE_(C|CXX|Fortran)_<CONFIG> help strings more consistent (#14606)Brad King2013-12-021-2/+2
| | | | | Use consistent capitalization and write all words out in the cache entry descriptions.
* Fix CMAKE_(C|CXX|Fortran)_RELEASE helpstrings (#14606)Brad King2013-12-021-1/+1
| | | | | Remove the platform-specific description from the cache entry help strings for these variables.
* Quote ${CMAKE_<LANG>_COMPILER} while enabling a languageBrad King2013-10-221-1/+1
| | | | | | | | | | | | Even though this variable gets set to CMAKE_<LANG>_COMPILER-NOTFOUND when the compiler is not found, CMake<LANG>Compiler.cmake gets removed by cmGlobalGenerator::EnableLanguage so in try compiles the value is empty. Quote references to the variable in Modules/CMake(C|CXX|Fortran)Information.cmake Modules/CMakeDetermineCompilerId.cmake to avoid dropping arguments from commands that expect them.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-19/+19
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-134/+134
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-4/+4
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Add platform variable for flags specific to shared librariesStephen Kelly2012-06-121-0/+4
| | | | | | Store in CMAKE_${lang}_COMPILE_OPTIONS_DLL flags from CMAKE_SHARED_LIBRARY_${lang}_FLAGS that are truly exclusive to shared libraries.
* Add platform variables for position independent code flagsStephen Kelly2012-06-121-0/+8
| | | | | | | | | | | | | | | | | | | | Store in new platform variables CMAKE_${lang}_COMPILE_OPTIONS_PIC CMAKE_${lang}_COMPILE_OPTIONS_PIE flags for position independent code generation. In almost all cases, this means duplication of the CMAKE_SHARED_LIBRARY_${lang}_FLAGS for the _PIC case and using the assumed pie equivalent for the _PIE case. Note that the GNU compiler has supported -fPIE since 3.4 and that there is no -fPIC on GNU for Windows or Cygwin. There is a possibility that the _PIE variables are not correct. However, as there is no backwards compatibility to be concerned about (as the POSITION_INDEPENDENT_CODE property is not used anywhere yet), the current state suffices.
* Support building shared libraries or modules without soname (#13155)Modestas Vainius2012-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean target property NO_SONAME which may be used to disable soname for the specified shared library or module even if the platform supports it. This property should be useful for private shared libraries or various plugins which live in private directories and have not been designed to be found or loaded globally. Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and hard-coded -install_name flags with a conditional <SONAME_FLAG> which is expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG definition as long as soname supports is enabled for the target in question. Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in rules in case third party projects still use it. Such projects would not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be expanded. Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well. Since -install_name is soname on OS X, this should not be a problem if this variable is expanded only if soname is enabled. The Ninja generator performs rule variable substitution only once globally per rule to put its own placeholders. Final substitution is performed by ninja at build time. Therefore we cannot conditionally replace the soname placeholders on a per-target basis. Rather than omitting $SONAME from rules.ninja, simply do not write its contents for targets which have NO_SONAME. Since 3 variables are affected by NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if soname is enabled.
* Fix CXX/Fortran MODULE flags when enabled before C (#12929)Brad King2012-02-031-0/+8
| | | | | | | | | | | | | | | If CXX or Fortran is enabled before C then the values of CMAKE_SHARED_MODULE_C_FLAGS CMAKE_SHARED_MODULE_CREATE_C_FLAGS may not be available. On platforms where MODULE library (plugin) creation is the same as SHARED library creation initialize the MODULE creation flags from the SHARED creation flags of the matching language instead of assuming that C has been enabled first. Teach the COnly and CxxOnly tests to build MODULE libraries. The latter covers this specific case.
* Load platform files that need to know the ABI when possibleBrad King2011-12-051-0/+6
| | | | | | | | Load platform files named in CMAKE_<lang>_ABI_FILES for each language once the ABI sizeof(void*) is known. During the first configuration this is after the test for working compiler and ABI detection checks. During later configurations the ABI information is immediately available because it has been saved in CMake<lang>Compiler.cmake.
* Merge topic 'mpif77-workaround-o-c-order'Brad King2011-02-221-1/+2
|\ | | | | | | | | 93f230e Pass -o after -c for Fortran to avoid mpif77 ordering bug
| * Pass -o after -c for Fortran to avoid mpif77 ordering bugBrad King2011-01-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge topic 'relative-CMAKE_USER_MAKE_RULES_OVERRIDE'Brad King2011-01-261-5/+9
|\ \ | | | | | | | | | | | | a146e03 Fix relative CMAKE_USER_MAKE_RULES_OVERRIDE (#11725)
| * | Fix relative CMAKE_USER_MAKE_RULES_OVERRIDE (#11725)Brad King2011-01-191-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Allow platform files to set large archive rules (#11674)Brad King2011-01-101-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Allow Fortran platform files to set empty valuesBrad King2010-12-091-21/+21
| |/ |/| | | | | | | | | | | 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.
* | Reset platform/compiler info status for each languageBrad King2010-09-281-0/+2
| | | | | | | | | | | | | | | | | | | | In each CMake<lang>Information.cmake file we use an _INCLUDED_FILE variable to track whether a compiler information file has been loaded. Reset this variable for each language. This fixes Fortran under VS generators with the Intel plugin. Previously the variable would be left set true from C and C++ and then Fortran would not load old-style files like Platform/Windows-ifort.
* | Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|/
* Reduce duplication in Platform/<os>.cmake filesBrad King2009-12-021-0/+8
| | | | | | | | | | | | | Several platform-wide linker flag variables are defined in Modules/Platform/<os>.cmake files for C and then copied by the Modules/CMake<lang>Information.cmake file for each language. We now use this approach for the variables CMAKE_EXE_EXPORTS_${lang}_FLAG CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS to avoid duplication for multiple languages in each platform file.
* Remove CMAKE_SHARED_MODULE_RUNTIME_${lang}_FLAGBrad King2009-12-021-8/+0
| | | | | This platform configuration variable is unused. Modules are built using the value of CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG.
* Use work-around from bug 4772 for C++ and FortranBrad King2009-10-061-6/+13
| | | | | | | | | | | | | | The commit "fix for bug 4772" added a work-around to CMakeCInformation for platform config files that put compiler information in the system file (like SunOS flags for GCC). This commit adds the same work-around for CXX and Fortran. It is necessary to support enabling these languages separately from C in other subdirectories. The commit "Avoid (Unix|Windows)Paths.cmake multiple include" added include blockers that prevent the files from multiple inclusion, so it is safe to include the system information files from every language. See issue #4772 and issue #9656.
* Convert CMake non-find modules to BSD LicenseBrad King2009-09-281-0/+13
| | | | | | | This adds copyright/license notification blocks CMake's non-find modules. Most of the modules had no notices at all. Some had notices referring to the BSD license already. This commit normalizes existing notices and adds missing notices.
* ENH: Load platform-independent per-compiler filesBrad King2009-07-231-0/+5
| | | | | | | This teaches the language configuration modules to load per-compiler information for each language using the compiler id but no system name. They look for modules named "Compiler/<id>-<lang>.cmake". Such modules may specify compiler flags that do not depend on the platform.
* ENH: fix problem where rc language recursively included itself because ↵Bill Hoffman2008-10-141-0/+1
| | | | CMAKE_BASE_NAME was used from c compiler, do the same fix for other uses of CMAKE_BASE_NAME
* ENH: Build large archives incrementallyBrad King2008-08-041-7/+5
| | | | | | Creation of archive libraries with the unix 'ar' tool should be done incrementally when the number of object files is large. This avoids problems with the command line getting too many arguments.
* ENH: fix FFFLAGS to be FLAGSBill Hoffman2008-04-221-1/+1
|
* ENH: fix init flags getting stuffed into the compile line by force.Bill Hoffman2008-04-211-6/+6
|
* ENH: Pass dependent library search path to linker on some platforms.Brad King2008-02-011-0/+8
| | | | | | | | | | | | | | | | - Move runtime path ordering out of cmComputeLinkInformation into its own class cmOrderRuntimeDirectories. - Create an instance of cmOrderRuntimeDirectories for runtime path ordering and another instance for dependent library path ordering. - Replace CMAKE_DEPENDENT_SHARED_LIBRARY_MODE with explicit CMAKE_LINK_DEPENDENT_LIBRARY_FILES boolean. - Create CMAKE_LINK_DEPENDENT_LIBRARY_DIRS boolean. - Create variables to specify -rpath-link flags: CMAKE_SHARED_LIBRARY_RPATH_LINK_<LANG>_FLAG CMAKE_EXECUTABLE_RPATH_LINK_<LANG>_FLAG - Enable -rpath-link flag on Linux and QNX. - Documentation and error message updates
* ENH: Implement linking with paths to library files instead of -L and -l ↵Brad King2008-01-221-0/+12
| | | | | | | | | | | | | | | | | separation. See bug #3832 - This is purely an implementation improvement. No interface has changed. - Create cmComputeLinkInformation class - Move and re-implement logic from: cmLocalGenerator::ComputeLinkInformation cmOrderLinkDirectories - Link libraries to targets with their full path (if it is known) - Dirs specified with link_directories command still added with -L - Make link type specific to library names without paths (name libfoo.a without path becomes -Wl,-Bstatic -lfoo) - Make directory ordering specific to a runtime path computation feature (look for conflicting SONAMEs instead of library names) - Implement proper rpath support on HP-UX and AIX.
* ENH: Enable use of COMPILE_DEFINITIONS property for Fortran sources.Brad King2008-01-181-1/+1
|
* BUG: fix for bug 6167 get rid of extra space in flagsBill Hoffman2007-12-171-1/+4
|
* ENH: Merging CompilerId updates from branch CMake-Modules-CompilerId to the ↵Brad King2007-05-031-2/+7
| | | | main tree. Changes between CMake-Modules-CompilerId-mp1 and CMake-Modules-CompilerId-mp2 are included.
* STYLE: Removing unused platform variable ↵Brad King2006-09-151-4/+0
| | | | CMAKE_SHARED_MODULE_LINK_Fortran_FLAGS. It does not make sense because nothing links to shared modules.
* ENH: Split CMAKE_STANDARD_LIBRARIES into per-language variables ↵Brad King2006-04-111-0/+5
| | | | CMAKE_<lang>_STANDARD_LIBRARIES. This is needed to get programmable language support working with Visual Studio generators. It makes sense anyway.
* ENH: add support for language flags at rule expansion timeBill Hoffman2006-03-061-1/+1
|
* ENH: fix for bug 2921, move _OVERRIDE variable to a better position to allow ↵Bill Hoffman2006-03-021-0/+15
| | | | changing _INIT variables
* ENH: fix spelling errorsBill Hoffman2006-02-271-1/+1
|
* ENH: add working directory supportBill Hoffman2006-02-081-0/+11
|
* ENH: add documentation support for modulesBill Hoffman2005-12-141-0/+1
|
* ENH: add a fix for VTK on the mac and a way to fix some projects with a ↵Bill Hoffman2005-09-071-5/+0
| | | | single file in the cmake modules directory
* ENH: make sure flags set in CC or CXX environment variables stay with the ↵Bill Hoffman2005-07-201-1/+1
| | | | compiler
* ENH: added requires flagKen Martin2005-05-241-0/+3
|
* BUG: LINK_FLAGS are now all LINK_(LANG)_FLAGSBill Hoffman2004-09-241-1/+1
|
* ENH: major changes to support addition of languages from cmake modules ↵Bill Hoffman2004-09-221-5/+13
| | | | directory.
* ENH: more uniform approach to enable language, one step closer to being able ↵Bill Hoffman2004-08-261-0/+120
to enable a language without modifing cmake source code