Commit Graph

59 Commits

Author SHA1 Message Date
Stephen Kelly ea78935f62 GenerateExportHeader: Reformat docs. 2014-01-04 11:28:57 +01:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Stephen Kelly f973737305 GenerateExportHeader: Port to use message(DEPRECATION) 2013-10-08 18:23:42 +02:00
Stephen Kelly 0f3a66673f GenerateExportHeader: Deprecate add_compiler_export_flags function.
This is made obsolete by the CXX_VISIBILITY_PRESET and
VISIBILITY_INLINES_HIDDEN target properties.
2013-09-02 10:57:55 +02:00
Brad King 6aba976427 Merge topic 'geh-cleanup-identifiers'
7e24997 GenerateExportHeader: Generate only C identifiers as defines
2013-05-24 09:20:20 -04:00
Stephen Kelly 7e24997fed GenerateExportHeader: Generate only C identifiers as defines
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.
2013-05-24 09:09:43 -04:00
Stephen Kelly 7ffef5024a GenerateExportHeader: Allow use of of this macro with MODULEs.
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.
2013-05-23 19:24:34 +02:00
Brad King 20d0b37f4a Merge topic 'generate-export-header-warnings'
1e0891e Removed GenerateExportHeader warnings about old compilers
2013-02-25 13:11:29 -05:00
Marcus D. Hanwell 1e0891e28a Removed GenerateExportHeader warnings about old compilers
These warnings tend to flood the dashboard submissions, and it is doing
what it should (degrade gracefully with older compilers).
2013-02-20 11:48:12 -05:00
Stephen Kelly 0ebf332199 Fix GenerateExportHeader documentation #13936
There is no CMAKE_CURRENT_BUILD_DIR. CMAKE_CURRENT_BINARY_DIR is
the correct variable here.
2013-02-20 09:27:48 +01:00
David Cole ccd502ad44 Merge topic 'improve-generateexportheader'
c28e276 GenerateExportHeader: improve compiler identification
4412fc0 GenerateExportHeader: remove unneeded code
2012-03-02 11:44:58 -05:00
Rolf Eike Beer c28e276948 GenerateExportHeader: improve compiler identification
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.
2012-02-24 17:48:02 +01:00
Rolf Eike Beer 4412fc0890 GenerateExportHeader: remove unneeded code
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.
2012-02-24 17:13:22 +01:00
Stephen Kelly 40efa4db74 Fix documented function signature to match reality.
The function description is already correct.
2012-02-21 23:54:01 +01:00
Alex Neundorf 54e1f6f5a5 GenerateExportHeader: use double quotes around _gcc_version
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
2012-02-18 20:58:19 +01:00
Michael Wild 9f92cdf24d GenerateExportHeader: Fix wrong use of IS_ABSOLUTE (#12645)
Test content of _GEH_EXPORT_FILE_NAME, not variable name.

Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
2012-01-02 13:27:07 -05:00
Marcus D. Hanwell 41e2b1d824 Make add_compiler_export_flags a function again.
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.
2011-09-20 00:16:16 -04:00
Marcus D. Hanwell 6a10deb670 Made ADD_COMPILER_EXPORT_FLAGS into a macro.
It adds to the CMAKE_CXX_FLAGS (as before), or populates the supplied
optional argument with the CXX_FLAGS for symbol import/export.
2011-09-19 16:42:42 -04:00
Marcus D. Hanwell 2d1acfe359 Don't warn when nothing to do in visibility function. 2011-09-19 14:55:19 -04:00
Marcus D. Hanwell d6795685ae Just code style changes. 2011-09-19 14:04:42 -04:00
David Faure 6a6393c905 Don't use a variable name that might be used in other files.
myDir is also used in the Grantlee config file, so if Grantlee
was found, this call failed.
2011-08-27 09:44:52 +02:00
Stephen Kelly 5ca8c565bc Fix up verbatim code sections of the dox. 2011-08-25 20:39:01 +02:00
Stephen Kelly 75596e62f9 Don't start a line with a dash(-)
That is a special character in cmake dox.
2011-08-25 20:39:00 +02:00
Stephen Kelly 826374a45a Remove blank line at the start of the file.
A blank line excludes the file from documentation processing.
2011-08-25 20:39:00 +02:00
Stephen Kelly 8b9b8e1676 Add documentation about the prefix and no_deprecated options. 2011-08-25 18:56:13 +02:00
Stephen Kelly 51bc63a7cb Fix the feature of using a specific prefix for macros. 2011-08-25 18:51:37 +02:00
Stephen Kelly 3449f6b88c Add quotes in case cmake is installed in a prefix with a space. 2011-08-25 18:30:26 +02:00
Stephen Kelly e0cc024dc9 Add missing NO_EXPORT macro variant. 2011-08-23 23:26:43 +02:00
Stephen Kelly 1b031d1a3f More consistency in the macro options. 2011-08-23 23:21:29 +02:00
Stephen Kelly 03d60c7d81 Try to make the macros do almost nothing for Watcom. 2011-08-23 20:07:42 +02:00
Stephen Kelly 32eff0caec Test for too-old-intel compilers. 2011-08-23 19:49:39 +02:00
Stephen Kelly 1ae3365e9f Exclude PGI from exports and deprecated. 2011-08-16 01:21:59 +02:00
Stephen Kelly f426496055 Exclude cygwin from the hidden visibility feature. 2011-08-16 01:19:37 +02:00
Stephen Kelly f84c7db592 Don't enable deprecated on old GCC
Hopefully a fix for
http://www.cdash.org/CDash/testDetails.php?test=109688480&build=1432057
2011-08-16 01:17:26 +02:00
Stephen Kelly 9672b332b1 Don't enable deprecated on HP. 2011-08-16 01:13:10 +02:00
Stephen Kelly 97392a7dd3 Fixup forgotten part of aed84517c9 2011-08-14 15:37:24 +02:00
Stephen Kelly 2aeab4f973 Borland can't do deprecated. 2011-08-13 23:49:17 +02:00
Stephen Kelly aed84517c9 Test for deprecated attribute before declspec.
The attribute seems more common, and some compilers seem to silently
ignore the declspec.
2011-08-13 22:58:15 +02:00
Stephen Kelly df4615e338 Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant
_check_cxx_compiler_attribute does it in the alternative.
2011-08-12 00:23:00 +02:00
Stephen Kelly 78a6e1c122 Exclude the XL compiler from the hidden-visibility test. 2011-08-12 00:18:43 +02:00
Stephen Kelly e1f7ee3de7 Test for compiler features, instead of for specific platforms. 2011-08-11 19:06:23 +02:00
Stephen Kelly 9554e1013e Split the deprecated available check from setting macro values. 2011-08-11 18:17:12 +02:00
Stephen Kelly 750b67c5a1 Don't use hidden visibility on non-mingw windows either. 2011-08-11 10:53:58 +02:00
Stephen Kelly 1f3be45048 Make sure the hidden visibility variables never get set on MINGW. 2011-08-11 10:39:51 +02:00
Stephen Kelly 399f415b15 Only set the deprecated attribute if hidden visibilty is enabled.
This is what is tested in the unit test. If it makes sense, another
option can be added later.
2011-08-11 10:28:50 +02:00
Stephen Kelly 7fa559232e Add some debug output to narrow down deprecation test issues
Particularly Borland and VS7.0 seem to still be failing.
2011-08-10 23:57:04 +02:00
Stephen Kelly 7924c1d6a8 Another attempt at fixing Borland.
Apparently it still needs to be exported, but only declspec(deprecated)
does not work.
2011-08-10 22:19:39 +02:00
Stephen Kelly 50460ea9de Fix off-by-not in test for Borland. 2011-08-10 21:53:58 +02:00
Stephen Kelly fc3772edc9 Another attempt to fix the tests on Borland. 2011-08-10 21:43:16 +02:00
Stephen Kelly bab4a22036 Disable all export macros on Borland. 2011-08-10 21:28:42 +02:00