summaryrefslogtreecommitdiffstats
path: root/Modules/FortranCInterface.cmake
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-07-27 22:41:13 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-07-27 22:41:13 (GMT)
commit5d0d980d9949daf596e10715d686adc95c1c232b (patch)
tree45ec5b1fd21b10dc996083f5fe5657d8b07c3232 /Modules/FortranCInterface.cmake
parent73c618be7036c693cbff764b3765de1bf4626cfb (diff)
downloadCMake-5d0d980d9949daf596e10715d686adc95c1c232b.zip
CMake-5d0d980d9949daf596e10715d686adc95c1c232b.tar.gz
CMake-5d0d980d9949daf596e10715d686adc95c1c232b.tar.bz2
Use string(APPEND) in Modules
Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
Diffstat (limited to 'Modules/FortranCInterface.cmake')
-rw-r--r--Modules/FortranCInterface.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index c12dd4c..ae01541 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -270,7 +270,7 @@ function(FortranCInterface_HEADER file)
set(_desc_MODULE_ "/* Mangling for Fortran module symbols with underscores. */")
foreach(macro GLOBAL GLOBAL_ MODULE MODULE_)
if(FortranCInterface_${macro}_MACRO)
- set(HEADER_CONTENT "${HEADER_CONTENT}
+ string(APPEND HEADER_CONTENT "
${_desc_${macro}}
#define ${MACRO_NAMESPACE}${macro}${FortranCInterface_${macro}_MACRO}
")
@@ -279,7 +279,7 @@ ${_desc_${macro}}
# Generate symbol mangling definitions.
if(SYMBOLS)
- set(HEADER_CONTENT "${HEADER_CONTENT}
+ string(APPEND HEADER_CONTENT "
/*--------------------------------------------------------------------------*/
/* Mangle some symbols automatically. */
")
@@ -300,7 +300,7 @@ ${_desc_${macro}}
set(form "")
endif()
if(FortranCInterface_MODULE${form}_MACRO)
- set(HEADER_CONTENT "${HEADER_CONTENT}#define ${SYMBOL_NAMESPACE}${module}_${function} ${MACRO_NAMESPACE}MODULE${form}(${m_lower},${f_lower}, ${m_upper},${f_upper})\n")
+ string(APPEND HEADER_CONTENT "#define ${SYMBOL_NAMESPACE}${module}_${function} ${MACRO_NAMESPACE}MODULE${form}(${m_lower},${f_lower}, ${m_upper},${f_upper})\n")
else()
message(AUTHOR_WARNING "No FortranCInterface mangling known for ${f}")
endif()
@@ -314,7 +314,7 @@ ${_desc_${macro}}
string(TOUPPER "${f}" f_upper)
string(TOLOWER "${f}" f_lower)
if(FortranCInterface_GLOBAL${form}_MACRO)
- set(HEADER_CONTENT "${HEADER_CONTENT}#define ${SYMBOL_NAMESPACE}${f} ${MACRO_NAMESPACE}GLOBAL${form}(${f_lower}, ${f_upper})\n")
+ string(APPEND HEADER_CONTENT "#define ${SYMBOL_NAMESPACE}${f} ${MACRO_NAMESPACE}GLOBAL${form}(${f_lower}, ${f_upper})\n")
else()
message(AUTHOR_WARNING "No FortranCInterface mangling known for ${f}")
endif()