[Cmake-commits] CMake branch, master, updated. v3.11.0-462-g952d72b
Kitware Robot
kwrobot at kitware.com
Wed Apr 11 08:05:06 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 952d72b79da982d8c099052ac474e04ab507cd17 (commit)
via 963837cf173fac75ffdabfa0ba754775968b5547 (commit)
from bb1d1f160fd91d4e5d510fbbefd3d4a9efc1241a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=952d72b79da982d8c099052ac474e04ab507cd17
commit 952d72b79da982d8c099052ac474e04ab507cd17
Merge: bb1d1f1 963837c
Author: Craig Scott <craig.scott at crascit.com>
AuthorDate: Wed Apr 11 12:00:39 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Apr 11 08:01:00 2018 -0400
Merge topic 'UseSWIG-bugfixes'
963837cf17 UseSWIG: fix erroneous generator expressions
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1947
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=963837cf173fac75ffdabfa0ba754775968b5547
commit 963837cf173fac75ffdabfa0ba754775968b5547
Author: Marc Chevrier <marc.chevrier at sap.com>
AuthorDate: Tue Apr 10 10:54:01 2018 +0200
Commit: Marc Chevrier <marc.chevrier at sap.com>
CommitDate: Tue Apr 10 11:28:32 2018 +0200
UseSWIG: fix erroneous generator expressions
Add note regarding multi-config generators
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 5f9afc1..8713cd8 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -28,7 +28,11 @@ Defines the following command for use with ``SWIG``:
those targets can be used with any command expecting a target (e.g.
:command:`target_link_libraries`).
- The arguments are:
+ .. note::
+
+ For multi-config generators, this module does not support
+ configuration-specific files generated by ``SWIG``. All build
+ configurations must result in the same generated source file.
``TYPE``
``SHARED``, ``MODULE`` and ``STATIC`` have the same semantic as for the
@@ -297,7 +301,7 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
# handle various swig compile flags properties
get_source_file_property (include_directories "${infile}" INCLUDE_DIRECTORIES)
if (include_directories)
- list (APPEND swig_source_file_flags "-I$<JOIN:${include_directories},$<SEMICOLON>-I>")
+ list (APPEND swig_source_file_flags "$<$<BOOL:${include_directories}>:-I$<JOIN:${include_directories},$<SEMICOLON>-I>>")
endif()
set (property "$<TARGET_PROPERTY:${name},SWIG_INCLUDE_DIRECTORIES>")
list (APPEND swig_source_file_flags "$<$<BOOL:${property}>:-I$<JOIN:${property},$<SEMICOLON>-I>>")
@@ -306,7 +310,7 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
list (APPEND swig_source_file_flags "$<$<BOOL:${property}>:-D$<JOIN:${property},$<SEMICOLON>-D>>")
get_source_file_property (compile_definitions "${infile}" COMPILE_DEFINITIONS)
if (compile_definitions)
- list (APPEND swig_source_file_flags "-D$<JOIN:${compile_definitions},$<SEMICOLON>-D>")
+ list (APPEND swig_source_file_flags "$<$<BOOL:${compile_definitions}>:-D$<JOIN:${compile_definitions},$<SEMICOLON>-D>>")
endif()
list (APPEND swig_source_file_flags "$<TARGET_PROPERTY:${name},SWIG_COMPILE_OPTIONS>")
@@ -348,7 +352,7 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
list (REMOVE_DUPLICATES cmake_include_directories)
set (swig_include_dirs)
if (cmake_include_directories)
- set (swig_include_dirs "-I$<JOIN:${cmake_include_directories},$<SEMICOLON>-I>")
+ set (swig_include_dirs "$<$<BOOL:${cmake_include_directories}>:-I$<JOIN:${cmake_include_directories},$<SEMICOLON>-I>>")
endif()
set(swig_special_flags)
@@ -374,7 +378,7 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
list (APPEND swig_dependencies ${file_depends})
endif()
- if (UseSWIG_MODULE_VERSION VERSION_EQUAL 2)
+ if (UseSWIG_MODULE_VERSION VERSION_GREATER 1)
# as part of custom command, start by removing old generated files
# to ensure obsolete files do not stay
set (swig_cleanup_command COMMAND "${CMAKE_COMMAND}" -E remove_directory "${outdir}")
@@ -501,7 +505,7 @@ function(SWIG_ADD_LIBRARY name)
if (CMAKE_SWIG_OUTDIR)
set (outputdir "${CMAKE_SWIG_OUTDIR}")
else()
- if (UseSWIG_MODULE_VERSION VERSION_EQUAL 2)
+ if (UseSWIG_MODULE_VERSION VERSION_GREATER 1)
set (outputdir "${workingdir}/${_SAM_LANGUAGE}.files")
else()
set (outputdir "${CMAKE_CURRENT_BINARY_DIR}")
@@ -550,7 +554,7 @@ function(SWIG_ADD_LIBRARY name)
endforeach()
set_property (DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES ${swig_generated_sources} ${swig_generated_timestamps})
- if (UseSWIG_MODULE_VERSION VERSION_EQUAL 2)
+ if (UseSWIG_MODULE_VERSION VERSION_GREATER 1)
set_property (DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${outputdir}")
endif()
-----------------------------------------------------------------------
Summary of changes:
Modules/UseSWIG.cmake | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list