From 88dd5dc9ff405ee5bd63b15ea1e5219e5d029e12 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Sat, 9 Jun 2018 15:11:38 +0200 Subject: UseSWIG: add support for generator expressions --- Modules/UseSWIG.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 8713cd8..8139be9 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -182,7 +182,7 @@ as well as ``SWIG``: #]=======================================================================] -cmake_policy (VERSION 3.11) +cmake_policy (VERSION 3.12) set(SWIG_CXX_EXTENSION "cxx") set(SWIG_EXTRA_LIBRARIES "") @@ -304,16 +304,16 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) list (APPEND swig_source_file_flags "$<$:-I$-I>>") endif() set (property "$") - list (APPEND swig_source_file_flags "$<$:-I$-I>>") + list (APPEND swig_source_file_flags "$<$:-I$,$-I>>") set (property "$") - list (APPEND swig_source_file_flags "$<$:-D$-D>>") + list (APPEND swig_source_file_flags "$<$:-D$,$-D>>") get_source_file_property (compile_definitions "${infile}" COMPILE_DEFINITIONS) if (compile_definitions) list (APPEND swig_source_file_flags "$<$:-D$-D>>") endif() - list (APPEND swig_source_file_flags "$") + list (APPEND swig_source_file_flags "$>") get_source_file_property (compile_options "${infile}" COMPILE_OPTIONS) if (compile_options) list (APPEND swig_source_file_flags ${compile_options}) @@ -429,13 +429,13 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) ## add all properties for generated file to various properties get_property (include_directories SOURCE "${infile}" PROPERTY GENERATED_INCLUDE_DIRECTORIES) - set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY INCLUDE_DIRECTORIES ${include_directories} $) + set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY INCLUDE_DIRECTORIES ${include_directories} $>) get_property (compile_definitions SOURCE "${infile}" PROPERTY GENERATED_COMPILE_DEFINITIONS) - set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY COMPILE_DEFINITIONS $ ${compile_definitions}) + set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY COMPILE_DEFINITIONS $> ${compile_definitions}) get_property (compile_options SOURCE "${infile}" PROPERTY GENERATED_COMPILE_OPTIONS) - set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY COMPILE_OPTIONS $ ${compile_options}) + set_property (SOURCE "${swig_generated_file_fullname}" PROPERTY COMPILE_OPTIONS $> ${compile_options}) set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files} PARENT_SCOPE) -- cgit v0.12