Skip to content
Snippets Groups Projects
Commit e1628701 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

vtkcompiletools-config: write a depfile for macro detection

parent 4216244d
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,14 @@ include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-properties.cmake")
set(_compile_tools_empty_input_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${CMAKE_FIND_PACKAGE_NAME}_empty.h")
set(_compile_tools_depfile "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${CMAKE_FIND_PACKAGE_NAME}_macros.d")
set(_compile_tools_output_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${CMAKE_FIND_PACKAGE_NAME}_macros.h")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(_compile_tools_command
-dM -E
-MD -MF "${_compile_tools_depfile}"
-MT "${_compile_tools_output_file}"
-o "${_compile_tools_output_file}"
"${_compile_tools_empty_input_file}")
else ()
......@@ -47,6 +50,7 @@ if (_compile_tools_command)
${_compile_tools_command}
DEPENDS "${CMAKE_CXX_COMPILER}"
"${_compile_tools_empty_input_file}"
DEPFILE "${_compile_tools_depfile}"
WORKING_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Detecting builtin compiler preprocessor defines for ${CMAKE_FIND_PACKAGE_NAME}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment