summaryrefslogtreecommitdiffstats
path: root/Modules/GenerateExportHeader.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Restore unnecessary inclusions for compatibilityBrad King2023-06-121-0/+5
| | | | | | | | | | | Since commit 03c6ebf2b5 (Modules:Check,GenerateExportHeader: include only what's needed, 2023-03-09, v3.27.0-rc1~327^2) some existing projects broke because they were accidentally relying on indirect inclusion of some check modules. For now, restore the unnecessary includes for compatibility. They can be removed with a policy later. Fixes: #24991 Issue: #24994
* Modules:Check,GenerateExportHeader: include only what's neededscivision2023-03-131-9/+9
| | | | | | GenerateExportHeader had a hidden state requirement that other modules were included first. Considering include_guard, Modules should include all they actually use.
* GenerateExportHeader: Fix Clang support on WindowsCorentin Damman2023-02-231-1/+1
| | | | | | | | | | When using Clang with Visual Studio, the GenerateExportHeader function generates the DEPRECATED definition "__attribute__ ((__deprecated__))", because Clang can compile such instruction. However, if a user wants to compile the library with this generated header with MSVC, the declaration is not valid. We suggest to always use the DEPRECATED definition "__declspec(deprecated)" on Windows, which is valid for both Clang and MSVC.
* IBMClang: Add support for IBM Open XL C/C++Aaron Liu2022-01-271-1/+1
| | | | Fixes: #22929
* GenerateExportHeader: Recognize Intel < 12 more strictlyWilliam R. Dieter2021-01-281-1/+1
| | | | | | Match exactly the `Intel` compiler id. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* GenerateExportHeader: Add support for NVHPC compilerBrad King2021-01-271-2/+2
| | | | Treat it just like PGI.
* Help: Add `.. versionadded` directives to module docsNikita Nemkin2020-12-021-5/+17
| | | | Issue: #19715
* Modules: Update documentation formattingBartosz Kosiorek2019-04-081-1/+1
|
* Help: Convert remaining modules to block-style commentsKitware Robot2018-10-221-183/+184
|
* GenerateExportHeader: Add support for C projectsArnaud Gelas2018-03-081-10/+37
| | | | | | Previously only C++ projects were supported. Fixes: #16967
* GenerateExportHeader: add INCLUDE_GUARD_NAME optionKyle Edwards2018-01-231-2/+7
| | | | Fixes #16968.
* GenerateExportHeader: always fill in _EXPORT macrosBen Boeckel2017-03-161-4/+4
| | | | | | | | | | The `_EXPORT` and `_NO_EXPORT` macros should always be made properly because the `<LANG>_VISIBILITY_PRESET` properties are controlled independently of this module. One case where this breaks compatibility is where a project was setting `USE_COMPILER_HIDDEN_VISIBILITY=OFF` and then marking a symbol used outside of the library with `_NO_EXPORT` which is a contridiction.
* Don't include CMakeParseArgumentsDaniel Pfeifer2017-01-111-1/+0
| | | | | | | | | | | | The cmake_parse_arguments command is builtin with version 3.5. The CMakeParseArguments module is empty and exists for backwards compatibility with CMake 3.4 and lower. Remove the includes of CMakeParseArguments from CMake's modules. The modules are always used with the current version of CMake. Leave the includes in the tests, as the tests may be run with an older version of CMake.
* Simplify CMake per-source license noticesBrad King2016-09-271-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Modules: Fix typos in name of `CMAKE_COMPILER_IS_GNUCC` variableBrad King2016-09-141-1/+1
| | | | | | It is not called `CMAKE_COMPILER_IS_GNUC` (without last `C`). Closes: #16297
* GenerateExportHeader: Fix add_compiler_export_flags regressionBrad King2016-09-011-1/+2
| | | | | | | | | The mechanical conversion in commit 5d0d980d (Use string(APPEND) in Modules, 2016-07-28) accidentally introduced use of string(APPEND ... PARENT_SCOPE) Split that into the string(APPEND) and set(PARENT_SCOPE) pieces.
* Use string(APPEND) in ModulesDaniel Pfeifer2016-07-271-1/+1
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* Fix typos.Felix Geyer2016-07-101-1/+1
|
* GenerateExportHeader: Add option to specify custom contentBrad King2016-06-281-3/+14
|
* GenerateExportHeader: Do not define DEFINE_NO_DEPRECATED (#16022)Andreas Schuh2016-03-171-1/+3
| | | | | | Previously we allowed this definition to persist outside our header. This would cause conflicts across multiple such headers because the name was always the same. Fix this by avoiding the definition altogether.
* Embarcadero: Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID.James Johnston2015-12-031-0/+4
| | | | | | | | The CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID variables are set to "Borland" for older versions of the compiler. Newer CodeGear/Embarcadero compilers will have those variables set to "Embarcadero". Search for lines of code referencing both the variable name and Borland to be sure that they also refer to Embarcadero.
* GenerateExportHeader: Use dllexport/dllimport on CygwinTony Kelman2015-08-271-1/+1
| | | | | | | Cygwin sits on top of Windows and so can use explicit symbol export and import markup too. Co-Author: Yaakov Selkowitz <yselkowitz@cygwin.com>
* Modules: Check for ARGC before using ARGV#Daniele E. Domenichelli2015-02-271-1/+1
| | | | ARGV# could be defined from a parent scope.
* GenerateExportHeader: Avoid if() quoted auto-dereferenceBrad King2014-09-291-7/+7
| | | | | | When testing CMAKE_CXX_COMPILER_ID values with if(MATCHES), do not explicitly dereference or quote CMAKE_CXX_COMPILER_ID. We want if() to auto-dereference the variable and not its value.
* GenerateExportHeader: support exporting from OBJECT librariesBen Boeckel2014-07-031-0/+1
|
* Update CDash server URLBrad King2014-06-241-1/+0
| | | | It is now at open.cdash.org and does not start in "/CDash".
* GenerateExportHeader: Reformat docs.Stephen Kelly2014-01-041-64/+51
|
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-98/+150
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* GenerateExportHeader: Port to use message(DEPRECATION)Stephen Kelly2013-10-081-9/+1
|
* GenerateExportHeader: Deprecate add_compiler_export_flags function.Stephen Kelly2013-09-021-13/+34
| | | | | This is made obsolete by the CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target properties.
* Merge topic 'geh-cleanup-identifiers'Brad King2013-05-241-0/+6
|\ | | | | | | | | 7e24997 GenerateExportHeader: Generate only C identifiers as defines
| * GenerateExportHeader: Generate only C identifiers as definesStephen Kelly2013-05-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variables in this module are used to configure a header file with defines whose name depends on the name of the target. As valid names of targets may be invalid for use as defines, convert the names of the defines used to C identifiers first. This is already done in C++ code for the DEFINE_SYMBOL property. This is not as simple as ensuring that the BASE_NAME is a C identifier, because most of the define names are configurable, and because use of a BASE_NAME which is not a C identifier, such as 4square can become a C identifier by specifying a prefix in the generate_export_header macro.
* | GenerateExportHeader: Allow use of of this macro with MODULEs.Stephen Kelly2013-05-231-5/+3
|/ | | | | | | | | | | The significant issue with MODULEs is that on Windows, the exported symbols must be dllexported and they are not imported. In other export macro implementations this is done by defining an export macro outside of any ifdef which depends on definitions set on the command line. However, with cmake we already expect the DEFINE_SYMBOL to be defined, so the regular EXPORT macro can be used by such plugins.
* Merge topic 'generate-export-header-warnings'Brad King2013-02-251-4/+0
|\ | | | | | | | | 1e0891e Removed GenerateExportHeader warnings about old compilers
| * Removed GenerateExportHeader warnings about old compilersMarcus D. Hanwell2013-02-201-4/+0
| | | | | | | | | | These warnings tend to flood the dashboard submissions, and it is doing what it should (degrade gracefully with older compilers).
* | Fix GenerateExportHeader documentation #13936Stephen Kelly2013-02-201-1/+1
|/ | | | | There is no CMAKE_CURRENT_BUILD_DIR. CMAKE_CURRENT_BINARY_DIR is the correct variable here.
* Merge topic 'improve-generateexportheader'David Cole2012-03-021-35/+9
|\ | | | | | | | | | | c28e276 GenerateExportHeader: improve compiler identification 4412fc0 GenerateExportHeader: remove unneeded code
| * GenerateExportHeader: improve compiler identificationRolf Eike Beer2012-02-241-28/+9
| | | | | | | | | | | | Use CMAKE_<LANG>_COMPILER_VERSION instead of calling the compiler. This macro predates those useful variables. This also fixes the issue that g++ version detection was not working if C language was not enabled.
| * GenerateExportHeader: remove unneeded codeRolf Eike Beer2012-02-241-7/+0
| | | | | | | | | | These expressions check for command line arguments unsupported by the compiler. We don't pass any custom flags here anyway so this isn't needed.
* | Fix documented function signature to match reality.Stephen Kelly2012-02-211-1/+1
|/ | | | The function description is already correct.
* GenerateExportHeader: use double quotes around _gcc_versionAlex Neundorf2012-02-181-1/+1
| | | | | | | | | | | The GenerateExportHeaders test was failing on one machine, the version could not be determined there, so the _gcc_version was empty, so the first argument to if() was empty, so it complained: http://open.cdash.org/testDetails.php?test=135623436&build=2016288 Use double quotes to turn the non-existant first argument into an empty string. Alex
* GenerateExportHeader: Fix wrong use of IS_ABSOLUTE (#12645)Michael Wild2012-01-021-1/+1
| | | | | | Test content of _GEH_EXPORT_FILE_NAME, not variable name. Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
* Make add_compiler_export_flags a function again.Marcus D. Hanwell2011-09-201-6/+6
| | | | | | Making this a macro had unintended issues on (among others) Windows compilers. Moving it back to being a function using PARENT_SCOPE still satisfies the use case where we simply want to obtain the extra flags.
* Made ADD_COMPILER_EXPORT_FLAGS into a macro.Marcus D. Hanwell2011-09-191-7/+18
| | | | | It adds to the CMAKE_CXX_FLAGS (as before), or populates the supplied optional argument with the CXX_FLAGS for symbol import/export.
* Don't warn when nothing to do in visibility function.Marcus D. Hanwell2011-09-191-1/+1
|
* Just code style changes.Marcus D. Hanwell2011-09-191-30/+50
|
* Don't use a variable name that might be used in other files.David Faure2011-08-271-3/+3
| | | | | myDir is also used in the Grantlee config file, so if Grantlee was found, this call failed.
* Fix up verbatim code sections of the dox.Stephen Kelly2011-08-251-17/+1
|
* Don't start a line with a dash(-)Stephen Kelly2011-08-251-2/+2
| | | | That is a special character in cmake dox.
* Remove blank line at the start of the file.Stephen Kelly2011-08-251-2/+0
| | | | A blank line excludes the file from documentation processing.