Commit 15610bb5 authored by Daniele E. Domenichelli's avatar Daniele E. Domenichelli Committed by Brad King

Drop use of configure_file IMMEDIATE option

Since commit 7d47c693 (Drop compatibility with CMake < 2.4, 2013-10-08)
we no longer need to use the configure_file IMMEDIATE option to support
compatibility modes less than 2.0.
parent 706aab04
......@@ -167,7 +167,7 @@ set(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
${CMAKE_PLATFORM_INFO_DIR}/CMakeASM${ASM_DIALECT}Compiler.cmake @ONLY)
set(_CMAKE_ASM_COMPILER)
set(_CMAKE_ASM_COMPILER_ARG1)
......
......@@ -186,6 +186,6 @@ endif()
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
@ONLY
)
set(CMAKE_C_COMPILER_ENV_VAR "CC")
......@@ -185,7 +185,7 @@ endif()
# configure all variables set in this file
configure_file(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
@ONLY
)
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
......@@ -164,7 +164,7 @@ Id flags: ${testflags}
set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
get_filename_component(id_src "${src}" NAME)
configure_file(${CMAKE_ROOT}/Modules/CompilerId/VS-${v}.${ext}.in
${id_dir}/CompilerId${lang}.${ext} @ONLY IMMEDIATE)
${id_dir}/CompilerId${lang}.${ext} @ONLY)
execute_process(
COMMAND ${CMAKE_MAKE_PROGRAM} CompilerId${lang}.${ext} ${build}
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
......@@ -202,7 +202,7 @@ Id flags: ${testflags}
set(ext xcode)
endif()
configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-${v}.pbxproj.in
${id_dir}/CompilerId${lang}.${ext}/project.pbxproj @ONLY IMMEDIATE)
${id_dir}/CompilerId${lang}.${ext}/project.pbxproj @ONLY)
unset(_ENV_MACOSX_DEPLOYMENT_TARGET)
if(DEFINED ENV{MACOSX_DEPLOYMENT_TARGET})
set(_ENV_MACOSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}")
......
......@@ -222,6 +222,6 @@ endif()
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeFortranCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
@ONLY
)
set(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
......@@ -100,5 +100,5 @@ mark_as_advanced(CMAKE_Java_COMPILER)
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
${CMAKE_PLATFORM_INFO_DIR}/CMakeJavaCompiler.cmake @ONLY)
set(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")
......@@ -63,5 +63,5 @@ endif()
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeRCCompiler.cmake IMMEDIATE)
${CMAKE_PLATFORM_INFO_DIR}/CMakeRCCompiler.cmake)
set(CMAKE_RC_COMPILER_ENV_VAR "RC")
......@@ -181,6 +181,6 @@ if(CMAKE_BINARY_DIR)
# configure variables set in this file for fast reload, the template file is defined at the top of this file
configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeSystem.cmake
IMMEDIATE @ONLY)
@ONLY)
endif()
......@@ -29,7 +29,7 @@ endif()
macro(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE)
if(${SETTINGS_FILE} MATCHES ".+")
configure_file(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in
${SETTINGS_FILE} @ONLY IMMEDIATE)
${SETTINGS_FILE} @ONLY)
else()
message(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.")
endif()
......
......@@ -78,7 +78,7 @@ else()
configure_file(
${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
@ONLY
)
include(${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake)
......
......@@ -71,7 +71,7 @@ else()
configure_file(
${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
@ONLY
)
include(${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake)
......
......@@ -98,7 +98,7 @@ else()
configure_file(
${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeFortranCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
@ONLY
)
include(${CMAKE_PLATFORM_INFO_DIR}/CMakeFortranCompiler.cmake)
......
......@@ -558,7 +558,7 @@ set(CPACK_COMPONENT_UNSPECIFIED_HIDDEN TRUE)
set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED TRUE)
cpack_encode_variables()
configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)
configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY)
# Generate source file
cpack_set_if_not_set(CPACK_SOURCE_INSTALLED_DIRECTORIES
......@@ -578,4 +578,4 @@ set(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
cpack_encode_variables()
configure_file("${cpack_source_input_file}"
"${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)
"${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY)
......@@ -48,7 +48,7 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
set(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c)
message(STATUS "Looking for ${INCLUDE}")
if(${ARGC} EQUAL 3)
set(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS})
......
......@@ -52,7 +52,7 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
set(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)
message(STATUS "Looking for C++ include ${INCLUDE}")
if(${ARGC} EQUAL 3)
set(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
......
......@@ -54,7 +54,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n")
configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c" @ONLY IMMEDIATE)
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c" @ONLY)
set(_INCLUDE ${INCLUDE}) # remove empty elements
if("${_INCLUDE}" MATCHES "^([^;]+);.+;([^;]+)$")
......
......@@ -72,7 +72,7 @@ macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main(int argc, char** argv)\n{\n (void)argv;\n#ifndef ${SYMBOL}\n return ((int*)(&${SYMBOL}))[argc];\n#else\n (void)argc;\n return 0;\n#endif\n}\n")
configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${SOURCEFILE}" @ONLY IMMEDIATE)
"${SOURCEFILE}" @ONLY)
message(STATUS "Looking for ${SYMBOL}")
try_compile(${VARIABLE}
......
......@@ -58,7 +58,7 @@ macro(TEST_BIG_ENDIAN VARIABLE)
configure_file("${CMAKE_ROOT}/Modules/TestEndianess.c.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
IMMEDIATE @ONLY)
@ONLY)
file(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
TEST_ENDIANESS_FILE_CONTENT)
......
......@@ -2535,7 +2535,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
configure_file(
${CMake_SOURCE_DIR}/Tests/TestInstall.sh.in
${CMake_BINARY_DIR}/Tests/TestShellInstall/TestInstall.sh
@ONLY IMMEDIATE
@ONLY
)
add_test(ShellInstall /bin/sh ${CMake_BINARY_DIR}/Tests/TestShellInstall/TestShellInstall.sh)
endif()
......
......@@ -3,7 +3,7 @@ set(CMAKE_EXECUTABLE "${CMake_BIN_DIR}/cmake")
macro(AddCMakeTest TestName PreArgs)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${TestName}Test.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" @ONLY IMMEDIATE)
"${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" @ONLY)
add_test(NAME CMake.${TestName}
COMMAND ${CMAKE_EXECUTABLE} ${PreArgs}
-P "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" ${ARGN})
......
......@@ -198,14 +198,14 @@ make_directory("${Complex_BINARY_DIR}/make_dir")
configure_file(
${Complex_SOURCE_DIR}/Library/dummy
${Complex_BINARY_DIR}/Library/dummylib.lib
COPYONLY IMMEDIATE)
COPYONLY)
foreach (ext ${CMAKE_SHLIB_SUFFIX};.so;.a;.sl
${CMAKE_SHARED_LIBRARY_SUFFIX}.2
${CMAKE_STATIC_LIBRARY_SUFFIX}.2)
configure_file(
${Complex_SOURCE_DIR}/Library/dummy
${Complex_BINARY_DIR}/Library/libdummylib${ext}
COPYONLY IMMEDIATE)
COPYONLY)
endforeach ()
find_library(FIND_DUMMY_LIB
......@@ -281,7 +281,7 @@ if (WIN32)
configure_file(
${Complex_SOURCE_DIR}/Library/dummy
"${dir}/${file}"
COPYONLY IMMEDIATE)
COPYONLY)
exec_program(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"")
find_path(REGISTRY_TEST_PATH
${file}
......
......@@ -198,12 +198,12 @@ make_directory("${Complex_BINARY_DIR}/make_dir")
configure_file(
${Complex_SOURCE_DIR}/Library/dummy
${Complex_BINARY_DIR}/Library/dummylib.lib
COPYONLY IMMEDIATE)
COPYONLY)
foreach (ext ${CMAKE_SHLIB_SUFFIX};.so;.a;.sl)
configure_file(
${Complex_SOURCE_DIR}/Library/dummy
${Complex_BINARY_DIR}/Library/libdummylib${ext}
COPYONLY IMMEDIATE)
COPYONLY)
endforeach ()
find_library(FIND_DUMMY_LIB
......@@ -251,7 +251,7 @@ if (WIN32)
configure_file(
${Complex_SOURCE_DIR}/Library/dummy
"${dir}/${file}"
COPYONLY IMMEDIATE)
COPYONLY)
exec_program(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"")
find_path(REGISTRY_TEST_PATH
${file}
......
......@@ -170,7 +170,7 @@ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/not_included.h
configure_file(
${PROJECT_SOURCE_DIR}/config.h.in
${PROJECT_BINARY_DIR}/config.h
@ONLY IMMEDIATE
@ONLY
)
# add the executable
......@@ -375,7 +375,7 @@ foreach(arg ${CHECK_ARGS} "")
endforeach()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/check_command_line.c.in
${CMAKE_CURRENT_BINARY_DIR}/check_command_line.c
@ONLY IMMEDIATE)
@ONLY)
add_executable(check_command_line
${CMAKE_CURRENT_BINARY_DIR}/check_command_line.c)
set(output_name "check_command_line")
......
......@@ -37,7 +37,7 @@ foreach(f ${TOCLEAN_FILES})
set(CHECK_FILES "${CHECK_FILES} \"${f}\",\n")
endforeach()
configure_file(${MakeClean_SOURCE_DIR}/check_clean.c.in
${MakeClean_BINARY_DIR}/check_clean.c @ONLY IMMEDIATE)
${MakeClean_BINARY_DIR}/check_clean.c @ONLY)
add_executable(check_clean ${MakeClean_BINARY_DIR}/check_clean.c)
# After the executable builds, clean the files.
......
......@@ -40,4 +40,4 @@ list(APPEND TOCLEAN_FILES "${ToClean_BINARY_DIR}/toclean_copy${CMAKE_EXECUTABLE_
# Configure a file listing these build-time-generated files.
configure_file(${ToClean_SOURCE_DIR}/ToCleanFiles.cmake.in
${ToClean_BINARY_DIR}/ToCleanFiles.cmake @ONLY IMMEDIATE)
${ToClean_BINARY_DIR}/ToCleanFiles.cmake @ONLY)
......@@ -22,8 +22,8 @@ set(ccIn ${RunCMake_SOURCE_DIR}/cc.sh.in)
set(cc1 ${RunCMake_BINARY_DIR}/cc1.sh)
set(cc2 ${RunCMake_BINARY_DIR}/cc2.sh)
set(cc3 CMAKE_C_COMPILER-NOTFOUND)
configure_file(${ccIn} ${cc1} @ONLY IMMEDIATE)
configure_file(${ccIn} ${cc2} @ONLY IMMEDIATE)
configure_file(${ccIn} ${cc1} @ONLY)
configure_file(${ccIn} ${cc2} @ONLY)
# Use a single build tree for remaining tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ChangeCompiler-build)
......
......@@ -54,7 +54,7 @@ if (QT_FOUND AND QT_WRAP_UI)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/foo.ui.in
${CMAKE_CURRENT_BINARY_DIR}/foo.ui IMMEDIATE)
${CMAKE_CURRENT_BINARY_DIR}/foo.ui)
set (QT_WRAP_UI "On")
set (QT_UIC_EXE "${QT_UIC_EXECUTABLE}")
......@@ -102,6 +102,6 @@ add_dependencies(fakefluid Wrap)
configure_file(
${Wrapping_SOURCE_DIR}/dummy
${Wrapping_BINARY_DIR}/gl.h
COPYONLY IMMEDIATE)
COPYONLY)
use_mangled_mesa (${Wrapping_BINARY_DIR} ${Wrapping_BINARY_DIR}/mangled_mesa)
......@@ -45,8 +45,7 @@ MACRO(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
IMMEDIATE)
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c")
MESSAGE(STATUS "Performing Test ${message}")
TRY_COMPILE(${VAR}
${CMAKE_BINARY_DIR}
......
......@@ -45,8 +45,7 @@ MACRO(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
IMMEDIATE)
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c")
MESSAGE(STATUS "Performing Test ${message}")
TRY_RUN(${VAR} ${VAR}_COMPILED
${CMAKE_BINARY_DIR}
......
......@@ -31,7 +31,7 @@ MACRO (CHECK_FUNCTION_EXISTS_GLIBC _FUNC _FUNCVAR)
SET(CHECK_STUB_FUNC_1 "__stub_${_FUNC}")
SET(CHECK_STUB_FUNC_2 "__stub___${_FUNC}")
CONFIGURE_FILE( ${_selfdir_CheckFunctionExistsGlibc}/CheckFuncs_stub.c.in
${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c IMMEDIATE)
${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c)
TRY_COMPILE(__stub
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment