diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 8f44b977e6..af18b7e9c5 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -125,9 +125,12 @@ function (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target set(targetincludes) set(targetdefines) else() - set(CMAKE_CONFIGURABLE_FILE_CONTENT "${_moc_parameters}") - configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" - "${_moc_parameters_file}" @ONLY) + file( + CONFIGURE + OUTPUT "${_moc_parameters_file}" + CONTENT "${_moc_parameters}\n" + @ONLY + ) endif() set(_moc_extra_parameters_file @${_moc_parameters_file}) diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake index c7498e3855..b79d8d2e80 100644 --- a/Modules/UseJava.cmake +++ b/Modules/UseJava.cmake @@ -883,10 +883,12 @@ function(add_jar _TARGET_NAME) # Create the list of files to compile. set(_JAVA_SOURCES_FILE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_sources) string(REPLACE ";" "\"\n\"" _JAVA_COMPILE_STRING "\"${_JAVA_COMPILE_FILES}\"") - set(CMAKE_CONFIGURABLE_FILE_CONTENT "${_JAVA_COMPILE_STRING}") - configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" - "${_JAVA_SOURCES_FILE}" @ONLY) - unset(CMAKE_CONFIGURABLE_FILE_CONTENT) + file( + CONFIGURE + OUTPUT "${_JAVA_SOURCES_FILE}" + CONTENT "${_JAVA_COMPILE_STRING}\n" + @ONLY + ) list (APPEND _JAVA_SOURCES_FILELISTS "@${_JAVA_SOURCES_FILE}") endif() if (_JAVA_COMPILE_FILELISTS) diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake index 10a3c525d6..d752b01be5 100644 --- a/Modules/WriteCompilerDetectionHeader.cmake +++ b/Modules/WriteCompilerDetectionHeader.cmake @@ -831,14 +831,13 @@ template<> struct ${prefix_arg}StaticAssert{}; foreach(compiler ${_WCD_COMPILERS}) foreach(_lang ${_langs}) if(compiler_file_content_${compiler}_${_lang}) - set(CMAKE_CONFIGURABLE_FILE_CONTENT "${compiler_file_content_}") - string(APPEND CMAKE_CONFIGURABLE_FILE_CONTENT "${compiler_file_content_${compiler}_${_lang}}") - set(compile_file_name "${_WCD_OUTPUT_DIR}${prefix_arg}_COMPILER_INFO_${compiler}_${_lang}.h") set(full_path "${main_file_dir}/${compile_file_name}") list(APPEND ${_WCD_OUTPUT_FILES_VAR} ${full_path}) - configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" - "${full_path}" + file( + CONFIGURE + OUTPUT "${full_path}" + CONTENT "${compiler_file_content_}${compiler_file_content_${compiler}_${_lang}}\n" @ONLY ) endif() @@ -852,9 +851,5 @@ template<> struct ${prefix_arg}StaticAssert{}; endif() string(APPEND file_content "\n#endif") - set(CMAKE_CONFIGURABLE_FILE_CONTENT ${file_content}) - configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" - "${file_arg}" - @ONLY - ) + file(CONFIGURE OUTPUT "${file_arg}" CONTENT "${file_content}\n" @ONLY) endfunction()