summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-26 17:24:26 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-26 17:24:26 (GMT)
commit74a45ce6476c47ac568df984fa25be11f52c57a5 (patch)
tree326e75aab92e3a71e6d753af635072a14ff0e94b
parent7e92f047be6b516f8f9fa733b02f8865b67cc9f2 (diff)
parentd97606477118ba186f49753b5630e4ddb24a6cd2 (diff)
downloadCMake-74a45ce6476c47ac568df984fa25be11f52c57a5.zip
CMake-74a45ce6476c47ac568df984fa25be11f52c57a5.tar.gz
CMake-74a45ce6476c47ac568df984fa25be11f52c57a5.tar.bz2
Merge topic 'UseSWIG-revert-bad-fix-0010080'
d9760647 Revert "UseSWIG: Name extra generated files after module name (#10080)"
-rw-r--r--Modules/UseSWIG.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 4ae6f81..11ca205 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -85,6 +85,9 @@ macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
set(${outfiles} "")
get_source_file_property(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename
${infile} SWIG_MODULE_NAME)
+ if(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND")
+ get_filename_component(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE)
+ endif()
foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION})
set(${outfiles} ${${outfiles}}
"${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}")
@@ -100,10 +103,6 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
get_source_file_property(swig_source_file_generated ${infile} GENERATED)
get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS)
get_source_file_property(swig_source_file_flags ${infile} SWIG_FLAGS)
- get_source_file_property(_SWIG_MODULE_NAME ${infile} SWIG_MODULE_NAME)
- if ( NOT _SWIG_MODULE_NAME )
- set_source_files_properties(${infile} PROPERTIES SWIG_MODULE_NAME ${name})
- endif ()
if("${swig_source_file_flags}" STREQUAL "NOTFOUND")
set(swig_source_file_flags "")
endif()