Commit Graph

133 Commits

Author SHA1 Message Date
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
Marc Chevrier
a3a0c3aa71 UseSWIG: add policy to manage target naming strategy. 2018-07-25 18:00:52 +02:00
Brad King
018c373f35 Merge topic 'UseSWIG-csharp-conditional'
ed289e0577 UseSWIG: Use CSharp language only if it is enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ram-Z <me@rmz.io>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !2219
2018-07-19 07:08:31 -04:00
Brad King
ed289e0577 UseSWIG: Use CSharp language only if it is enabled
In commit v3.12.0-rc1~2^2 (UseSWIG: Add CSHARP variant for wrapper
files, 2018-06-08) we explicitly marked swig-generated `.cs` files as
`LANGUAGE` CSharp so that the resulting sources can be compiled.
However, this works only when the CSharp language has been enabled.

Fixes: #18184
2018-07-18 08:53:32 -04:00
Brad King
8f2b483c06 Merge branch 'backport-UseSWIG-legacy-targets' into UseSWIG-legacy-targets
Resolve conflicts by integrating changes from both sides.
2018-07-03 12:48:02 -04:00
Marc Chevrier
38ffcedd26 UseSWIG: reintroduce legacy target name management
Fixes: #18140
2018-07-03 12:46:59 -04:00
Marc Chevrier
08f2a2408d UseSWIG: add support of target property INCLUDE_DIRECTORIES consumption
Fixes: #18003
2018-06-13 17:46:16 +02:00
Brad King
93fe9fc1a2 Merge branch 'UseSWIG-csharp-variant' into release-3.12
Merge-request: !2137
2018-06-13 10:51:49 -04:00
Brad King
0247f6836c Merge topic 'UseSWIG-csharp-variant'
0c2fb4c896 UseSWIG: Add CSHARP variant for wrapper files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2137
2018-06-13 10:48:51 -04:00
Brad King
b7b4ace2be Merge topic 'UseSWIG-fix-genex'
88dd5dc9ff UseSWIG: add support for generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2143
2018-06-13 10:48:04 -04:00
Rishi Theivendran
0c2fb4c896 UseSWIG: Add CSHARP variant for wrapper files
Issue: #18065
Fixes: #18066
2018-06-12 11:34:58 -04:00
Brad King
f024f4f8a0 Merge branch 'UseSWIG-fix-genex' into release-3.12
Merge-request: !2143
2018-06-12 10:08:36 -04:00
Marc Chevrier
88dd5dc9ff UseSWIG: add support for generator expressions 2018-06-12 10:07:24 -04:00
Felix Schwitzer
156138d5f1 UseSWIG: Fix handling of SWIG_MODULE_NAME source file property
Fix a typo from commit 0bef9eb410 (UseSWIG: modernize module,
2018-01-29) that caused `UseSWIG` to ignore an eventually set property
`SWIG_MODLUE_NAME`.

Building multiple python modules using the mentioned property as
described in the docs could lead to an invalid, or even worse,
inconsistent `build.ninja` file.  The reason is that the generated list
of support files was not unique.  For each module the support file was
always named the same, namely `path/to/builddir/MODULENAME.py`.
2018-06-12 09:55:53 -04:00
Marc Chevrier
963837cf17 UseSWIG: fix erroneous generator expressions
Add note regarding multi-config generators
2018-04-10 11:28:32 +02:00
Marc Chevrier
8ab4e38373 UseSWIG: Add new behavior for better support files management
fixes: #17840
2018-04-03 12:44:55 +02:00
Marc Chevrier
51b642679b UseSWIG: fix prefix library for Java on Windows
Fixes: #17836
2018-03-22 11:18:17 -04:00
Marc Chevrier
0bef9eb410 UseSWIG: modernize module 2018-02-14 08:35:04 +01:00