Commit 1f965eec authored by Brian Helba's avatar Brian Helba

ENH: Remove superfluous IMMEDIATE option from CMake CONFIGURE_FILE

In CMake 2.0 and higher (since 2005), the IMMEDIATE option to
CONFIGURE_FILE is implicit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9cc368a

Change-Id: I60e48f767d33e0a364dfc9cafd9821836b2f3f43
parent 004944f0
......@@ -77,7 +77,7 @@ function(vtk_add_executable_with_forwarding2
configure_file(
${VTK_CMAKE_DIR}/vtk-forward.c.in
${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c
@ONLY IMMEDIATE)
@ONLY)
add_executable(${exe_name}${VTK_EXE_SUFFIX}
${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c)
set_target_properties(${exe_name}${VTK_EXE_SUFFIX} PROPERTIES
......
......@@ -143,13 +143,11 @@ MACRO(VTK_MAKE_INSTANTIATOR3 className outSourceList SOURCES EXPORT_MACRO HEADER
${VTK_CMAKE_DIR}/vtkMakeInstantiator.h.in
${HEADER_LOCATION}/${className}.h
COPY_ONLY
IMMEDIATE
)
CONFIGURE_FILE(
${VTK_CMAKE_DIR}/vtkMakeInstantiator.cxx.in
${CMAKE_CURRENT_BINARY_DIR}/${className}.cxx
COPY_ONLY
IMMEDIATE
)
ENDMACRO(VTK_MAKE_INSTANTIATOR3)
# Check the severity of EOF bugs in the streams library.
SET(VTK_TEST_STREAM_EOF_CXX ${VTK_CMAKE_DIR}/vtkTestStreamEOF.cxx.in)
CONFIGURE_FILE(${VTK_CMAKE_DIR}/vtkTestStreamEOF.cxx.in
${VTK_BINARY_DIR}/CMake/vtkTestStreamEOF.cxx @ONLY IMMEDIATE)
${VTK_BINARY_DIR}/CMake/vtkTestStreamEOF.cxx @ONLY)
IF("VTK_ANSI_STREAM_EOF_RESULT" MATCHES "^VTK_ANSI_STREAM_EOF_RESULT$")
MESSAGE(STATUS "Checking ANSI streams end-of-file bug level")
TRY_RUN(VTK_ANSI_STREAM_EOF_RESULT VTK_ANSI_STREAM_EOF_COMPILED
......@@ -18,7 +18,7 @@ SET(VTK_STREAM_EOF_SEVERITY ${VTK_ANSI_STREAM_EOF_RESULT})
IF(VTK_SIZEOF_LONG_LONG)
CONFIGURE_FILE(${VTK_CMAKE_DIR}/vtkTestStreamLongLong.cxx.in
${VTK_BINARY_DIR}/CMake/vtkTestStreamLongLong.cxx @ONLY IMMEDIATE)
${VTK_BINARY_DIR}/CMake/vtkTestStreamLongLong.cxx @ONLY)
IF("VTK_OSTREAM_SUPPORTS_LONG_LONG" MATCHES "^VTK_OSTREAM_SUPPORTS_LONG_LONG$")
MESSAGE(STATUS "Checking if ostream supports long long")
TRY_COMPILE(VTK_OSTREAM_SUPPORTS_LONG_LONG
......
......@@ -102,7 +102,6 @@ macro(VTK_WRAP_HIERARCHY TARGET OUTPUT_DIR SOURCES)
${VTK_CMAKE_DIR}/vtkWrapperInit.data.in
${vtk-module}Hierarchy.data
COPY_ONLY
IMMEDIATE
)
# search through the deps to find modules we depend on
......
......@@ -160,7 +160,7 @@ macro(vtk_wrap_java3 TARGET SRC_LIST_NAME SOURCES)
SET(dir ${VTK_WRAP_JAVA3_INIT_DIR})
ENDIF(VTK_WRAP_JAVA3_INIT_DIR)
CONFIGURE_FILE("${dir}/JavaDependencies.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/JavaDependencies.cmake" IMMEDIATE @ONLY)
"${CMAKE_CURRENT_BINARY_DIR}/JavaDependencies.cmake" @ONLY)
endmacro()
# VS 6 does not like needing to run a huge number of custom commands
......
......@@ -139,7 +139,6 @@ macro(VTK_WRAP_PYTHON3 TARGET SRC_LIST_NAME SOURCES)
${VTK_CMAKE_DIR}/vtkWrapperInit.data.in
${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Init.data
COPY_ONLY
IMMEDIATE
)
add_custom_command(
......@@ -340,7 +339,6 @@ macro(vtk_wrap_python TARGET SRC_LIST_NAME module)
${VTK_CMAKE_DIR}/vtkWrapperInit.data.in
${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Init.data
COPY_ONLY
IMMEDIATE
)
add_custom_command(
......
......@@ -177,7 +177,6 @@ MACRO(VTK_WRAP_TCL3 TARGET SRC_LIST_NAME SOURCES COMMANDS)
${VTK_CMAKE_DIR}/vtkWrapperInit.data.in
${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Init.data
COPY_ONLY
IMMEDIATE
)
ADD_CUSTOM_COMMAND(
......
......@@ -302,10 +302,10 @@ foreach(t Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64)
if(VTK_TYPE_NATIVE)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkTypedArray.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkType${t}Array.h
@ONLY IMMEDIATE)
@ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkTypedArray.cxx.in
${CMAKE_CURRENT_BINARY_DIR}/vtkType${t}Array.cxx
@ONLY IMMEDIATE)
@ONLY)
set(Module_SRCS ${Module_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/vtkType${t}Array.cxx)
endif()
endforeach()
......
......@@ -26,7 +26,7 @@ set_source_files_properties(
# Generate configured header file
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/vtkChemistryConfigure.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/vtkChemistryConfigure.h" IMMEDIATE)
"${CMAKE_CURRENT_BINARY_DIR}/vtkChemistryConfigure.h")
set(${vtk-module}_NO_HeaderTest 1) # TODO: Fix headers and enable test.
vtk_module_library(${vtk-module} ${Module_SRCS})
......@@ -10,4 +10,4 @@ IF(VTK_USE_QVTK_QTOPENGL)
ENDIF(VTK_USE_QVTK_QTOPENGL)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.ctest.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest" @ONLY IMMEDIATE)
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest" @ONLY)
......@@ -165,11 +165,11 @@ if(BUILD_SHARED_LIBS)
# main install prefix. Attach the script as a post-install script.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PluginInstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/PluginInstall.cmake
@ONLY IMMEDIATE)
@ONLY)
set_target_properties(${vtk-module} PROPERTIES POST_INSTALL_SCRIPT
${CMAKE_CURRENT_BINARY_DIR}/PluginInstall.cmake)
endif()
endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.ctest.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest" @ONLY IMMEDIATE)
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest" @ONLY)
......@@ -128,7 +128,7 @@ set(TEST_FBO_IMPLEMENTATION_EXE
TestFBOImplementation)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/TestFBOInclude.h.in
${CMAKE_CURRENT_BINARY_DIR}/TestFBOInclude.h
@ONLY IMMEDIATE ESCAPE_QUOTES)
@ONLY ESCAPE_QUOTES)
# This is used by TestFBO. Using a separate processes makes is possible to
# avoid issues to OpenGL implementations segfaulting etc. from affecting the
......
......@@ -23,7 +23,7 @@ IF(VTK_FOUND)
SET(VIT_FORWARD_EXE_INSTALL "\"vit${VIT_EXE_SUFFIX}\"")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/vit-forward.c.in
${CMAKE_CURRENT_BINARY_DIR}/vit-forward.c
@ONLY IMMEDIATE)
@ONLY)
ADD_EXECUTABLE(vit
${CMAKE_CURRENT_BINARY_DIR}/vit-forward.c)
INSTALL(TARGETS vit DESTINATION bin)
......
......@@ -69,7 +69,7 @@ MACRO(COPY_FILES_TO_DIR src_dir target_dir)
ENDFOREACH(subdir)
# Now configure the file over.
CONFIGURE_FILE(${src_file} "${path}/${filename}" COPYONLY IMMEDIATE)
CONFIGURE_FILE(${src_file} "${path}/${filename}" COPYONLY)
ENDFOREACH (src_file)
ENDMACRO(COPY_FILES_TO_DIR)
......
......@@ -171,9 +171,9 @@ if(PYTHON_EXECUTABLE)
unset(VTK_PYTHON_IMPORT_ALL)
foreach(module ${VTK_PYTHON_MODULES})
set(VTK_PYTHON_IMPORT_ALL "${VTK_PYTHON_IMPORT_ALL}from ${module} import *\n")
configure_file(vtk/module.py.in vtk/${module}.py @ONLY IMMEDIATE)
configure_file(vtk/module.py.in vtk/${module}.py @ONLY)
endforeach()
configure_file(vtk/__init__.py.in vtk/__init__.py @ONLY IMMEDIATE)
configure_file(vtk/__init__.py.in vtk/__init__.py @ONLY)
# vtk.util package
list(APPEND VTK_PYTHON_FILES
......@@ -251,7 +251,7 @@ if(PYTHON_EXECUTABLE)
# Byte compile the Python files.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/compile_all_vtk.py.in
${CMAKE_CURRENT_BINARY_DIR}/compile_all_vtk.py
@ONLY IMMEDIATE)
@ONLY)
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/compile_all_vtk.py
DEPENDS ${VTK_PYTHON_SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/compile_all_vtk.py
......@@ -345,7 +345,7 @@ if(PYTHON_EXECUTABLE)
# Configure the post-install script to run python on setup.py.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PythonInstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/PythonInstall.cmake
@ONLY IMMEDIATE)
@ONLY)
install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/PythonInstall.cmake
COMPONENT RuntimeLibraries)
......@@ -370,7 +370,7 @@ else()
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
${CMAKE_CURRENT_BINARY_DIR}/setup.py @ONLY IMMEDIATE)
${CMAKE_CURRENT_BINARY_DIR}/setup.py @ONLY)
if(NOT VTK_INSTALL_NO_RUNTIME AND NOT VTK_INSTALL_NO_PYTHON)
install(TARGETS vtkpython ${VTKPYTHON_EXECUTABLE}
......
......@@ -19,7 +19,7 @@
CONFIGURE_FILE(
${VTK_SOURCE_DIR}/Wrapping/Tcl/vtkTkAppInitConfigure.h.in
${VTK_BINARY_DIR}/Wrapping/Tcl/vtkTkAppInitConfigure.h
@ONLY IMMEDIATE
@ONLY
)
get_property(VTK_TCL_WRAPPED GLOBAL PROPERTY VTK_TCL_WRAPPED)
......@@ -195,19 +195,19 @@ if(VTK_TCL_CONFIGURATION_TYPES)
set(VTK_TCL_LIBRARY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${config}")
configure_file(${VTK_SOURCE_DIR}/Wrapping/Tcl/pkgIndex.tcl.in
${VTK_BINARY_DIR}/Wrapping/Tcl/${config}/pkgIndex.tcl
@ONLY IMMEDIATE)
@ONLY)
endforeach()
else()
set(VTK_TCL_LIBRARY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
configure_file(${VTK_SOURCE_DIR}/Wrapping/Tcl/pkgIndex.tcl.in
${VTK_BINARY_DIR}/Wrapping/Tcl/pkgIndex.tcl
@ONLY IMMEDIATE)
@ONLY)
endif()
# A few hand coded bits of Tcl to glue things together.
macro(configure_tcl_files)
foreach(file ${ARGN})
configure_file(${file}.tcl.in "${VTK_TCL_HOME}/${file}.tcl" @ONLY IMMEDIATE)
configure_file(${file}.tcl.in "${VTK_TCL_HOME}/${file}.tcl" @ONLY)
endforeach()
endmacro()
......@@ -247,7 +247,7 @@ foreach(mod ${VTK_TCL_WRAPPED})
set(module "${${mod}_TCL_NAME}")
string(TOLOWER ${module} module_lc)
configure_file(vtkmodule.tcl.in
"${VTK_TCL_HOME}/${module_lc}/${module_lc}.tcl" @ONLY IMMEDIATE)
"${VTK_TCL_HOME}/${module_lc}/${module_lc}.tcl" @ONLY)
if(NOT VTK_INSTALL_NO_RUNTIME)
install(FILES
"${VTK_TCL_HOME}/${module_lc}/${module_lc}.tcl"
......@@ -266,7 +266,7 @@ ELSE(UNIX)
ENDIF(UNIX)
configure_file(${VTK_SOURCE_DIR}/Wrapping/Tcl/pkgIndex.tcl.in
${VTK_BINARY_DIR}/Wrapping/Tcl/Install/Hide/pkgIndex.tcl
@ONLY IMMEDIATE)
@ONLY)
IF(NOT VTK_INSTALL_NO_RUNTIME)
INSTALL(FILES
${VTK_BINARY_DIR}/Wrapping/Tcl/Install/Hide/pkgIndex.tcl
......
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