File: vtkcompiletools-config.cmake.in

package info (click to toggle)
paraview 5.11.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 497,236 kB
  • sloc: cpp: 3,171,290; ansic: 1,315,072; python: 134,290; xml: 103,324; sql: 65,887; sh: 5,286; javascript: 4,901; yacc: 4,383; java: 3,977; perl: 2,363; lex: 1,909; f90: 1,255; objc: 143; makefile: 119; tcl: 59; pascal: 50; fortran: 29
file content (62 lines) | stat: -rw-r--r-- 2,278 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#[==[.md
# vtkcompiletools-config.cmake

This file is used by CMake when finding VTK's compile tools.
#]==]

cmake_policy(PUSH)
cmake_policy(VERSION 3.8...3.12)

set("${CMAKE_FIND_PACKAGE_NAME}_VERSION" "@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@.@VTK_BUILD_VERSION@")

set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 1)
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_BINARY_DIR}/CMakeFiles/${CMAKE_FIND_PACKAGE_NAME}_empty.h")
set(_compile_tools_output_file "${CMAKE_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
    -o "${_compile_tools_output_file}"
    "${_compile_tools_empty_input_file}")
else ()
  if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
    message(WARNING
      "The detected C++ compiler (${CMAKE_CXX_COMPILER_ID}) is unsupported for "
      "correct builds under cross-compilation. Please file an issue with VTK "
      "for this configuration.")
  endif ()
endif ()

if (_compile_tools_command)
  if (NOT TARGET "${CMAKE_FIND_PACKAGE_NAME}_macros")
    # Generate the input file.
    file(GENERATE
      OUTPUT  "${_compile_tools_empty_input_file}"
      CONTENT "")

    separate_arguments(_compile_tools_flags NATIVE_COMMAND "${CMAKE_CXX_FLAGS}")

    # Add a custom command and target to generate the macro headers.
    add_custom_command(
      OUTPUT  "${_compile_tools_output_file}"
      COMMAND "${CMAKE_CXX_COMPILER}"
              ${_compile_tools_flags}
              ${_compile_tools_command}
      DEPENDS "${CMAKE_CXX_COMPILER}"
              "${_compile_tools_empty_input_file}"
      COMMENT "Detecting builtin compiler preprocessor defines for ${CMAKE_FIND_PACKAGE_NAME}")
    add_custom_target("${CMAKE_FIND_PACKAGE_NAME}_macros"
      DEPENDS
        "${_compile_tools_output_file}")
    unset(_compile_tools_flags)
  endif ()
  set("_${CMAKE_FIND_PACKAGE_NAME}_macros_file" "${_compile_tools_output_file}")
endif ()
unset(_compile_tools_command)
unset(_compile_tools_output_file)
unset(_compile_tools_empty_input_file)

cmake_policy(POP)