Matthew Woehlke
763cfbcac8
Diagnostics: "Fix" policy warnings in modules
...
Introduce a mechanism (via the private and undocumented `ISSUE_WARNING`
option to the `cmake_policy` command) to allow built-in modules to issue
policy warnings. Update modules to use this.
This allows modules to issue policy warnings with the `CMD_POLICY`
diagnostic type, which is consistent with internally issued diagnostics.
This also tends to simplify the logic for issuing such warnings in much
the way the helpers introduced in the previous commit did for the C++
code.
2026-05-20 15:32:57 -04:00
Andrej730
6eae783add
UseSWIG: Issue swig_link_libraries deprecation warning if CMP0078 is NEW
2025-10-24 20:58:23 +05:00
Marc Chevrier
2d4f3d6a6d
UseSWIG: Add POSTFIX management
...
Fixes : #27185
2025-09-23 16:01:59 +02:00
Peter Kokot
1d0b46111e
Help: Add remaining intro code blocks to modules
...
This is a follow-up to add intro code blocks to all remaining utility
and find modules.
Fixes : #26555
2025-08-18 11:52:56 +02:00
Kitware Robot
1772622772
LICENSE: Replace references to Copyright.txt with LICENSE.rst
...
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
while IFS= read -r -d $'\0' f ; do
sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
s/Copyright.txt/LICENSE.rst/
}' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Nikita Nemkin
9890cfc4ec
Help: More syntax highlighting for literal blocks
...
Covers almost all blocks containing actual code, except:
* Parsed-literal blocks can't be highlighted, including many command
summaries and substitution-heavy docs like find_... commands.
This is a Sphinx limitation.
* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
tutorial, bracket arguments/comments in cmake-language.7 and
cmake-developer.7.
* FindQt4 module, which needs reformatting.
2025-01-29 16:48:53 -05:00
Brad King
c283aafe62
CMP0057: Remove support for OLD behavior
2025-01-22 10:40:53 -05:00
Brad King
98a59ba8ad
CMP0012: Remove support for OLD behavior
2025-01-17 09:28:36 -05:00
Brad King
241f923a6f
Drop Visual Studio 12 2013 generator
...
This generator has been deprecated since CMake 3.28. Remove it.
2024-08-28 14:13:05 -04:00
Brad King
1ad39a9cf8
UseSWIG: Simplify test for Visual Studio generators
...
Since commit 03c31b0395 (Drop Visual Studio 9 2008 generator,
2024-05-06, v3.30.0-rc1~134^2), the test does not need to be
version-dependent.
2024-08-28 14:12:41 -04:00
Juan Ramos
3cd64287fe
Modules: Fix CMP0159 warnings in modules when tracing
...
Closes : #25829
2024-03-29 13:51:59 -07:00
Marc Chevrier
342b1b8a69
UseSWIG: ensure generated CSharp source code is portable.
...
Fixes : #25405
2023-11-14 17:10:03 +01:00
Brad King
536c1de1d4
Drop Visual Studio 11 2012 generator
...
This generator has been deprecated since CMake 3.25. Remove it.
2023-06-13 14:20:48 -04:00
FeRD (Frank Dana)
87778d2da5
Help: Enhance UseSWIG module documentation
...
* Add section headings
* Add TOC (HTML only)
* Move `swig_link_libraries()` to "Deprecated commands"
section at end of docs, document as deprecated in favor of
`target_link_libraries()` in all cases.
2022-12-22 06:10:22 -05:00
Marc Chevrier
989b469f1c
UseSWIG: Add support of perl5 language
2022-10-14 16:46:42 +02:00
Mario Emmenlauer
6b14de6bc5
UseSWIG: Change the library suffix to 'dylib' for C# on macOS
...
When testing on macOS, the command `swig_add_library("mytarget")`
creates a library `libmytarget.so` instead of `libmytarget.dylib`.
Subsequently, the library is not found by `dotnet` and the
swig-generated `DllImport` statements.
Fixes : #23967
2022-09-23 09:24:15 -04:00
Thomas Weißschuh
5156eb5613
UseSWIG: track generated Perl module files
...
This makes sure the generated file is cleaned properly and allows to
create dependencies on it.
2022-09-08 14:55:46 +02:00
Brad King
97ea8d30ed
Merge topic 'UseSWIG-create-workingdir'
...
7224eb5185 UseSWIG: ensure directory for depfile exists
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !6750
2021-11-22 11:10:15 -05:00
Marc Chevrier
7224eb5185
UseSWIG: ensure directory for depfile exists
...
When `Visual Studio` and `Xcode` generators are used, directory for depfile
is not implicitely created by CMake when OUTFILE_DIR option is used.
Fixes : #22932
2021-11-19 17:50:52 +01:00
Marc Chevrier
d1bece92d5
UseSWIG: Use swig generated dependencies for Visual Studio
2021-07-09 17:31:20 +02:00
Seth R Johnson
d2296cdaab
UseSWIG: remove duplicate target includes
2021-05-02 09:17:57 -04:00
Marc Chevrier
e3e005dbd8
UseSWIG: use swig dependencies for Xcode generator
2021-04-23 17:09:12 +02:00
Brad King
05881c1cbe
Merge branch 'backport-UseSWIG-policies' into UseSWIG-policies
2021-04-05 14:38:27 -04:00
Brad King
c3d0b25514
UseSWIG: Transform swig depfile to match Ninja generator paths
...
Since commit 89b01b04fa (UseSWIG: use swig tool to generate
dependencies, 2021-01-12, v3.20.0-rc1~120^2) we use a tool-provided
depfile to extract dependencies under the Ninja generator. Enable
`CMP0116` to ensure depfile paths are translated to match what the Ninja
generator writes to the build manfiest.
Fixes : #22029
2021-04-05 14:36:34 -04:00
Marc Chevrier
8c525d7e16
UseSWIG: Run using policy settings from includer
...
Backport commit de7f0aa6c0 (UseSWIG: avoid spurious policy warnings,
2021-02-11) to the 3.20 release branch. Projects need to be able to
control policies.
Issue: #22029
2021-04-05 14:00:03 -04:00
Marc Chevrier
1d8e3a1e77
UseSWIG: Use standard library name conventions for csharp language
...
Fixes : #21542
2021-03-26 16:27:18 +01:00
Marc Chevrier
de7f0aa6c0
UseSWIG: avoid spurious policy warnings
2021-02-11 17:17:10 +01:00
Marc Chevrier
89b01b04fa
UseSWIG: use swig tool to generate dependencies
...
add_custom_command() supports option DEPFILE when generator is
Makefiles or Ninja. And swig tool is able to generate a dependencies
file which is compatible with DEPFILE option.
2021-01-21 19:29:04 +01:00
Nikita Nemkin
8fea95319b
Help: Add .. versionadded directives to module docs
...
Issue: #19715
2020-12-02 21:00:30 +05:00
Marc Chevrier
4a81a0ce3d
UseSWIG: Add OUTPUT_DIR and OUTFILE_DIR source file properties
...
These properties enable to manage output directories on
per source file basis.
Fixes : #21250
2020-09-30 19:19:14 +02:00
Brad King
ec0d621e36
Merge topic 'UseSWIG-interface-option'
...
d264685bee UseSWIG: Update option -interface usage
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !5172
2020-09-01 09:08:06 -04:00
Marc Chevrier
d264685bee
UseSWIG: Update option -interface usage
...
Option -interface must not be used if multiple SWIG files are part
of the same library.
Fixes : #21134
2020-08-31 12:33:57 +02:00
Jean-Christophe Fillion-Robin
207373802e
Fix typos identified using codespell
...
See https://github.com/codespell-project/codespell#readme
The following command was used:
```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
2020-07-22 12:44:47 -04:00
Ben Boeckel
1f543b23a8
UseSWIG: note dependency behavior for Make generators
...
See: #20067
2020-06-01 10:09:56 -04:00
Seth R Johnson
a1909e26ac
UseSWIG: Enable SWIG Fortran target language
2020-02-24 12:15:48 -05:00
Sebastian Holtermann
eda3963615
UseSWIG: Use ADDITIONAL_CLEAN_FILES for cleaning
...
Replace use of the deprecated `ADDITIONAL_MAKE_CLEAN_FILES` directory property
with the new `ADDITIONAL_CLEAN_FILES` directory property.
2019-05-15 15:31:05 +02:00
Marc Chevrier
e3919bae17
UseSWIG: Manage alternate library name
...
Manage alternate library name by passing -interface <library_name>
for python language or -dllimport <library_name> for CSharp language
to the SWIG compiler.
Fixes : #18771
2019-05-03 18:20:17 +02:00
Thirumal Venkat
9816748847
SWIG: Add support for custom Swig source file extensions
2019-01-03 09:36:15 +05:30
Marc Chevrier
dff28141dc
UseSWIG: add management of SWIG option -module
...
When file property SWIG_MODULE_NAME is specified, provide option -module
to SWIG compiler.
Fixes : #18374
2018-12-07 18:51:57 +01:00
Brad King
4c669a0a34
Merge topic 'UseSWIG-typos'
...
2fc43415ef UseSWIG: Add target language and input file in command description
20fd16e756 UseSWIG: Typo, add missing letter
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2542
2018-10-30 10:57:45 -04:00
Brad King
263afbad64
Merge topic 'UseSWIG-multi-input'
...
bb57cb80eb UseSWIG: multiple input files must be supported in version 2
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2539
2018-10-30 10:56:55 -04:00
Sylvain Joubert
2fc43415ef
UseSWIG: Add target language and input file in command description
2018-10-29 17:09:48 +01:00
Marc Chevrier
bb57cb80eb
UseSWIG: multiple input files must be supported in version 2
...
Fixes : #18506
2018-10-29 16:39:03 +01:00
Sylvain Joubert
20fd16e756
UseSWIG: Typo, add missing letter
2018-10-29 15:00:11 +01:00
Kyle Edwards
0d988f98e5
cmake_policy: Add undocumented GET_WARNING command
...
This command is intended for modules that issue policy warnings so
they can get the warning string from CMake in a uniform manner,
rather than duplicating the string. Several modules been updated
to include an example of the usage of this new command.
2018-10-10 10:56:00 -04:00
Brad King
fcb47f4331
Merge topic 'UseSWIG-php-regression'
...
ecd0fec40b UseSWIG: fix regression for PHP language
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !2448
2018-10-08 11:10:59 -04:00
Brad King
c780f5eea7
Merge branch 'UseSWIG-php-regression' into release-3.13
...
Merge-request: !2448
2018-10-08 11:09:18 -04:00
Marc Chevrier
ecd0fec40b
UseSWIG: fix regression for PHP language
...
Refactoring in commit v3.12.0-rc1~481^2 (UseSWIG: modernize module,
2018-01-29) accidentally regressed support for PHP. Fix it.
Fixes : #18421
2018-10-05 13:11:17 -04:00
Brad King
24ff152aa0
Merge topic 'UseSWIG-legacy-user-flags'
...
2f88c177d0 UseSWIG: restore legacy behavior for SWIG_MODULE_<name>_EXTRA_FLAGS
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: Julien Schueller <schueller@phimeca.com >
Merge-request: !2245
2018-08-01 07:21:34 -04:00
Marc Chevrier
2f88c177d0
UseSWIG: restore legacy behavior for SWIG_MODULE_<name>_EXTRA_FLAGS
...
Fixes : #18226
2018-07-31 19:33:35 +02:00