cmake if(COMMAND) examples

ornladios/ADIOS2 scripts/dashboard/common.cmake :355

if(COMMAND dashboard_hook_init)

ornladios/ADIOS2 scripts/dashboard/common.cmake :376

if(COMMAND dashboard_hook_start)

ornladios/ADIOS2 scripts/dashboard/common.cmake :458

if(COMMAND dashboard_hook_test)

ornladios/ADIOS2 scripts/dashboard/common.cmake :476

if(COMMAND dashboard_hook_coverage)

ornladios/ADIOS2 scripts/dashboard/common.cmake :489

if(COMMAND dashboard_hook_memcheck)

ornladios/ADIOS2 thirdparty/atl/atl/scripts/dashboard/common.cmake :375

if(COMMAND dashboard_hook_start)

ornladios/ADIOS2 thirdparty/atl/atl/scripts/dashboard/common.cmake :465

if(COMMAND dashboard_hook_test)

ornladios/ADIOS2 thirdparty/atl/atl/scripts/dashboard/common.cmake :498

if(COMMAND dashboard_hook_memcheck)

ornladios/ADIOS2 thirdparty/atl/atl/scripts/dashboard/common.cmake :513

if(COMMAND dashboard_hook_end)

ornladios/ADIOS2 thirdparty/dill/dill/scripts/dashboard/common.cmake :355

if(COMMAND dashboard_hook_init)

ornladios/ADIOS2 thirdparty/dill/dill/scripts/dashboard/common.cmake :384

if(COMMAND dashboard_hook_started)

ornladios/ADIOS2 thirdparty/dill/dill/scripts/dashboard/common.cmake :449

if(COMMAND dashboard_hook_build)

ornladios/ADIOS2 thirdparty/dill/dill/scripts/dashboard/common.cmake :498

if(COMMAND dashboard_hook_memcheck)

ornladios/ADIOS2 thirdparty/dill/dill/scripts/dashboard/common.cmake :513

if(COMMAND dashboard_hook_end)

ornladios/ADIOS2 thirdparty/EVPath/EVPath/scripts/dashboard/common.cmake :355

if(COMMAND dashboard_hook_init)

ornladios/ADIOS2 thirdparty/EVPath/EVPath/scripts/dashboard/common.cmake :395

if(COMMAND dashboard_hook_update)

ornladios/ADIOS2 thirdparty/EVPath/EVPath/scripts/dashboard/common.cmake :449

if(COMMAND dashboard_hook_build)

ornladios/ADIOS2 thirdparty/EVPath/EVPath/scripts/dashboard/common.cmake :484

if(COMMAND dashboard_hook_coverage)

ornladios/ADIOS2 thirdparty/ffs/ffs/scripts/dashboard/common.cmake :375

if(COMMAND dashboard_hook_start)

ornladios/ADIOS2 thirdparty/ffs/ffs/scripts/dashboard/common.cmake :384

if(COMMAND dashboard_hook_started)

ornladios/ADIOS2 thirdparty/ffs/ffs/scripts/dashboard/common.cmake :424

if(COMMAND dashboard_hook_configure)

ornladios/ADIOS2 thirdparty/ffs/ffs/scripts/dashboard/common.cmake :484

if(COMMAND dashboard_hook_coverage)

ornladios/ADIOS2 thirdparty/ffs/ffs/scripts/dashboard/common.cmake :498

if(COMMAND dashboard_hook_memcheck)

ornladios/ADIOS2 thirdparty/GTest/googletest/googlemock/CMakeLists.txt :23

if (COMMAND pre_project_set_up_hermetic_build)

ornladios/ADIOS2 thirdparty/KWSys/adios2sys/CMakeLists.txt :871

if(COMMAND TARGET_INCLUDE_DIRECTORIES)

assimp/assimp contrib/googletest/googlemock/CMakeLists.txt :23

if (COMMAND pre_project_set_up_hermetic_build)

assimp/assimp contrib/googletest/googlemock/CMakeLists.txt :42

if (COMMAND set_up_hermetic_build)

assimp/assimp contrib/googletest/googletest/CMakeLists.txt :52

if (COMMAND set_up_hermetic_build)

bulletphysics/bullet3 CMakeLists.txt :304

IF(COMMAND cmake_policy)

davisking/dlib dlib/CMakeLists.txt :53

if (COMMAND pybind11_add_module AND MSVC)

davisking/dlib dlib/CMakeLists.txt :68

if (COMMAND pybind11_add_module)

davisking/dlib dlib/CMakeLists.txt :684

if (COMMAND pybind11_add_module)

embree/embree tutorials/minimal/CMakeLists.txt :21

IF (COMMAND SIGN_TARGET)

embree/embree tutorials/minimal/CMakeLists.txt :36

IF (COMMAND SIGN_TARGET)

google/flatbuffers CMakeLists.txt :318

if(COMMAND target_precompile_headers)

fontforge/fontforge cmake/backports/3.15.7/FindPython3.cmake :217

if (COMMAND __Python3_add_library)

InsightSoftwareConsortium/ITK Modules/Bridge/VtkGlue/CMakeLists.txt :75

if(NOT COMMAND vtk_module_config)

InsightSoftwareConsortium/ITK Modules/Bridge/VtkGlue/CMakeLists.txt :132

if(NOT COMMAND vtk_module_config)

InsightSoftwareConsortium/ITK Modules/Bridge/VtkGlue/itk-module-init.cmake :39

if(NOT COMMAND vtk_module_config)

InsightSoftwareConsortium/ITK Modules/ThirdParty/NIFTI/src/nifti/cmake/nifti_common.cmake :385

if(COMMAND dashboard_hook_start)

InsightSoftwareConsortium/ITK Modules/ThirdParty/NIFTI/src/nifti/cmake/nifti_common.cmake :393

if(COMMAND dashboard_hook_started)

InsightSoftwareConsortium/ITK Modules/ThirdParty/NIFTI/src/nifti/cmake/nifti_common.cmake :417

if(COMMAND dashboard_hook_build)

InsightSoftwareConsortium/ITK Modules/ThirdParty/NIFTI/src/nifti/cmake/nifti_common.cmake :431

if(COMMAND dashboard_hook_coverage)

InsightSoftwareConsortium/ITK Modules/ThirdParty/NIFTI/src/nifti/cmake/nifti_common.cmake :442

if(COMMAND dashboard_hook_submit)

InsightSoftwareConsortium/ITK Modules/ThirdParty/ZLIB/src/itkzlib-ng/cmake/fallback-macros.cmake :14

if(NOT COMMAND add_link_options)

intrepidcs/libicsneo third-party/googletest-master/googletest/CMakeLists.txt :32

if (COMMAND pre_project_set_up_hermetic_build)

libspatialindex/libspatialindex test/gtest/gtest-1.14.0/CMakeLists.txt :52

if (COMMAND set_up_hermetic_build)

intel/libvpl libvpl/test/ext/googletest/googlemock/CMakeLists.txt :43

if (COMMAND set_up_hermetic_build)

rui314/mold third-party/tbb/cmake/utils.cmake :68

if (COMMAND target_link_options)

rui314/mold third-party/tbb/cmake/compilers/GNU.cmake :77

if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)

rui314/mold third-party/tbb/examples/common/gui/CMakeLists.txt :57

if (COMMAND target_link_options)

rui314/mold third-party/tbb/python/rml/CMakeLists.txt :49

if (COMMAND target_link_options)

rui314/mold third-party/tbb/src/tbb/CMakeLists.txt :108

if (COMMAND target_link_options)

rui314/mold third-party/tbb/src/tbbmalloc/CMakeLists.txt :91

if (COMMAND target_link_options)

rui314/mold third-party/tbb/src/tbbmalloc_proxy/CMakeLists.txt :71

if (COMMAND target_link_options)

rui314/mold third-party/tbb/test/CMakeLists.txt :673

if (COMMAND target_link_options)

YosysHQ/nextpnr 3rdparty/googletest/googlemock/CMakeLists.txt :24

if (COMMAND pre_project_set_up_hermetic_build)

YosysHQ/nextpnr 3rdparty/googletest/googletest/CMakeLists.txt :33

if (COMMAND pre_project_set_up_hermetic_build)

uxlfoundation/oneTBB cmake/compilers/Clang.cmake :56

if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)

uxlfoundation/oneTBB examples/common/gui/CMakeLists.txt :57

if (COMMAND target_link_options)

uxlfoundation/oneTBB python/rml/CMakeLists.txt :49

if (COMMAND target_link_options)

uxlfoundation/oneTBB src/tbb/CMakeLists.txt :222

if (COMMAND tbb_gen_vars)

uxlfoundation/oneTBB test/CMakeLists.txt :73

if (COMMAND target_link_options)

uxlfoundation/oneTBB test/CMakeLists.txt :88

if (COMMAND _tbb_run_memcheck)

uxlfoundation/oneTBB test/CMakeLists.txt :168

if (COMMAND target_link_options)

uxlfoundation/oneTBB test/CMakeLists.txt :700

if (COMMAND target_link_options)

BYVoid/OpenCC deps/googletest-1.15.0/googletest/CMakeLists.txt :32

if (COMMAND pre_project_set_up_hermetic_build)

opencv/opencv cmake/OpenCVCompilerOptions.cmake :343

if(COMMAND ocv_compiler_optimization_options)

opencv/opencv cmake/OpenCVFindProtobuf.cmake :90

if(HAVE_PROTOBUF AND PROTOBUF_UPDATE_FILES AND NOT COMMAND PROTOBUF_GENERATE_CPP)

opencv/opencv cmake/OpenCVUtils.cmake :1

if(COMMAND ocv_cmake_dump_vars)  # include guard

opencv/opencv cmake/OpenCVUtils.cmake :62

if(COMMAND "${__hook}")

opencv/opencv cmake/OpenCVUtils.cmake :142

if(NOT COMMAND find_host_package)

opencv/opencv platforms/linux/arm.toolchain.cmake :1

if(COMMAND toolchain_save_config)

opencv/opencv platforms/linux/arm.toolchain.cmake :61

if(COMMAND ocv_set_platform_flags)

opencv/opencv platforms/linux/riscv-gnu.toolchain.cmake :1

if(COMMAND toolchain_save_config)

opencv/opencv platforms/linux/riscv64-clang.toolchain.cmake :21

if(COMMAND ocv_set_platform_flags)

opencv/opencv platforms/linux/riscv64-gcc.toolchain.cmake :6

if(COMMAND ocv_set_platform_flags)

opencv/opencv samples/sycl/CMakeLists.txt :77

if(COMMAND add_sycl_to_target)  # ComputeCpp

qtwebkit/qtwebkit Source/ThirdParty/libwebrtc/Source/third_party/boringssl/src/third_party/googletest/CMakeLists.txt :61

if (COMMAND set_up_hermetic_build)

sandialabs/seacas cmake/tribits/examples/TribitsExampleProject2/packages/package1/test/CMakeLists.txt :1

if ((NOT COMMAND tribits_project)  OR  Package1_USE_RAW_CMAKE)

pothosware/SoapySDR swig/python/cmake/FindPython2.cmake :261

if (COMMAND __Python2_add_library)

pothosware/SoapySDR swig/python/cmake/FindPython3.cmake :302

if (COMMAND __Python3_add_library)

spglib/spglib fortran/CMakeLists.txt :9

if (NOT COMMAND dynamic_version)

sqlitebrowser/sqlitebrowser config/translations.cmake :30

if(COMMAND qt_add_translation)

fnc12/sqlite_orm cmake/ucm.cmake :22

if(COMMAND cotire AND "1.7.9" VERSION_LESS "${COTIRE_CMAKE_MODULE_VERSION}")

xiaoyeli/superlu_dist cmake/XSDKDefaults.cmake :75

IF (NOT COMMAND PRINT_VAR)

SuperTux/supertux CMakeLists.txt :43

if(COMMAND cmake_policy)

trilinos/Trilinos cmake/tribits/examples/TribitsExampleProject2/packages/package1/cmake/raw/GeneratePackageConfigFileForBuildDir.cmake :1

if (COMMAND tribits_package)

trilinos/Trilinos cmake/tribits/examples/TribitsExampleProject2/packages/package1/test/CMakeLists.txt :1

if ((NOT COMMAND tribits_project)  OR  Package1_USE_RAW_CMAKE)

trilinos/Trilinos packages/kokkos-kernels/CMakeLists.txt :1

IF(COMMAND TRIBITS_PACKAGE_DECL)

trilinos/Trilinos packages/krino/CMakeLists.txt :3

IF(COMMAND TRIBITS_PACKAGE_DECL)

trilinos/Trilinos packages/sacado/test/GTestSuite/googletest/googlemock/CMakeLists.txt :23

if (COMMAND pre_project_set_up_hermetic_build)

trilinos/Trilinos packages/sacado/test/GTestSuite/googletest/googletest/CMakeLists.txt :32

if (COMMAND pre_project_set_up_hermetic_build)

trilinos/Trilinos packages/sacado/test/GTestSuite/googletest/googletest/CMakeLists.txt :52

if (COMMAND set_up_hermetic_build)

EttusResearch/uhd host/cmake/Modules/CMakeRC.cmake :65

if(COMMAND cmrc_add_resource_library)

microsoft/vcpkg ports/skia/unofficial-skia-config.cmake :1

if(NOT COMMAND z_vcpkg_@PORT@_get_link_libraries)

Viskores/viskores CMake/ViskoresDeviceAdapters.cmake :37

  if("${_data}" MATCHES "INPUT \\(([^(]+)\\)")
    #extract out the so name from REGEX MATCh command
    set(_proper_so_name "${CMAKE_MATCH_1}")

    #construct path to the real .so which is presumed to be in the same directory
    #as the input file
    get_filename_component(_so_dir "${library}" DIRECTORY)
    set(${real_library} "${_so_dir}/${_proper_so_name}" PARENT_SCOPE)
  else()
    #unable to determine what this library is so just hope everything works
    #add pass it unmodified.
    set(${real_library} "${library}" PARENT_SCOPE)
  endif()
endfunction()

if(Viskores_ENABLE_TBB AND NOT (TARGET viskores_tbb OR TARGET viskores::tbb))
  # Skip find_package(TBB) if we already have it
  if (NOT TARGET TBB::tbb)
    find_package(TBB REQUIRED)
  endif()

  add_library(viskores_tbb INTERFACE)
  target_link_libraries(viskores_tbb INTERFACE TBB::tbb)
  target_compile_definitions(viskores_tbb INTERFACE "TBB_VERSION_MAJOR=${TBB_VERSION_MAJOR}")
  set_target_properties(viskores_tbb PROPERTIES EXPORT_NAME tbb)
  install(TARGETS viskores_tbb EXPORT ${Viskores_EXPORT_NAME})
endif()

if(Viskores_ENABLE_OPENMP AND NOT (TARGET viskores_openmp OR TARGET viskores::openmp))
  find_package(OpenMP 4.0 REQUIRED COMPONENTS CXX QUIET)

  add_library(viskores_openmp INTERFACE)
  target_link_libraries(viskores_openmp INTERFACE OpenMP::OpenMP_CXX)
  target_compile_options(viskores_openmp INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${OpenMP_CXX_FLAGS}>)
  if(Viskores_ENABLE_CUDA)
    string(REPLACE ";" "," openmp_cuda_flags "-Xcompiler=${OpenMP_CXX_FLAGS}")
    target_compile_options(viskores_openmp INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:${openmp_cuda_flags}>)
  endif()
  set_target_properties(viskores_openmp PROPERTIES EXPORT_NAME openmp)
  install(TARGETS viskores_openmp EXPORT ${Viskores_EXPORT_NAME})
endif()

if(Viskores_ENABLE_CUDA)
  cmake_minimum_required(VERSION 3.13...3.15 FATAL_ERROR)
  enable_language(CUDA)

  if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND
    CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.2)
    message(FATAL_ERROR "Viskores CUDA support requires version 9.2+")
  endif()

  if(NOT (TARGET viskores_cuda OR TARGET viskores::cuda))
    add_library(viskores_cuda INTERFACE)
    set_target_properties(viskores_cuda PROPERTIES EXPORT_NAME cuda)

    install(TARGETS viskores_cuda EXPORT ${Viskores_EXPORT_NAME})
    # Reserve `requires_static_builds` to potential work around issues
    # where Viskores doesn't work when building shared as virtual functions fail
    # inside device code. We don't want to force BUILD_SHARED_LIBS to a specific
    # value as that could impact other projects that embed Viskores. Instead what
    # we do is make sure that libraries built by viskores_library() are static
    # if they use CUDA
    #
    # This needs to be lower-case for the property to be properly exported
    # CMake 3.15 we can add `requires_static_builds` to the EXPORT_PROPERTIES
    # target property to have this automatically exported for us
    set_target_properties(viskores_cuda PROPERTIES
      requires_static_builds TRUE
    )

    target_compile_options(viskores_cuda INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>)

    if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND
      CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
      # CUDA 11+ deprecated C++11 support
      target_compile_features(viskores_cuda INTERFACE cxx_std_14)
    endif()

    # If we have specified CMAKE_CUDA_ARCHITECTURES and CMake >= 3.18 we are
    # done setting up viskores_cuda.
    if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES OR CMAKE_VERSION VERSION_LESS 3.18)

      # Recommend user to use CMAKE_CUDA_ARCHITECTURES instead
      if(DEFINED Viskores_CUDA_Architecture AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
        message(DEPRECATION "Viskores_CUDA_Architecture used, use CMAKE_CUDA_ARCHITECTURES instead in CMake >= 3.18")
      endif()

      # We disable CMAKE_CUDA_ARCHITECTURES since we add the arch manually
      set(CMAKE_CUDA_ARCHITECTURES OFF)

      # add the -gencode flags so that all cuda code
      # way compiled properly

      #---------------------------------------------------------------------------
      # When using CMAKE >= 3.18 use instead CMAKE_CUDA_ARCHITECTURES since it
      # is the canonical way to specify archs in modern CMAKE.
      #
      # Populates CMAKE_CUDA_FLAGS with the best set of flags to compile for a
      # given GPU architecture. The majority of developers should leave the
      # option at the default of 'native' which uses system introspection to
      # determine the smallest numerous of virtual and real architectures it
      # should target.
      #
      # The option of 'all' is provided for people generating libraries that
      # will deployed to any number of machines, it will compile all CUDA code
      # for all major virtual architectures, guaranteeing that the code will run
      # anywhere.
      #
      # The option 'none' is provided so that when being built as part of another
      # project, its own custom flags can be used.
      #
      # 1 - native
      #   - Uses system introspection to determine compile flags
      # 2 - fermi
      #   - Uses: --generate-code=arch=compute_20,code=sm_20
      # 3 - kepler
      #   - Uses: --generate-code=arch=compute_30,code=sm_30
      #   - Uses: --generate-code=arch=compute_35,code=sm_35
      # 4 - maxwell
      #   - Uses: --generate-code=arch=compute_50,code=sm_50
      # 5 - pascal
      #   - Uses: --generate-code=arch=compute_60,code=sm_60
      # 6 - volta
      #   - Uses: --generate-code=arch=compute_70,code=sm_70
      # 7 - turing
      #   - Uses: --generate-code=arch=compute_75,code=sm_75
      # 8 - ampere
      #   - Uses: --generate-code=arch=compute_80,code=sm_80
      #   - Uses: --generate-code=arch=compute_86,code=sm_86
      # 8 - all
      #   - Uses: --generate-code=arch=compute_30,code=sm_30
      #   - Uses: --generate-code=arch=compute_35,code=sm_35
      #   - Uses: --generate-code=arch=compute_50,code=sm_50
      #   - Uses: --generate-code=arch=compute_60,code=sm_60
      #   - Uses: --generate-code=arch=compute_70,code=sm_70
      #   - Uses: --generate-code=arch=compute_75,code=sm_75
      #   - Uses: --generate-code=arch=compute_80,code=sm_80
      #   - Uses: --generate-code=arch=compute_86,code=sm_86
      # 8 - none
      #

      #specify the property
      set(Viskores_CUDA_Architecture "native" CACHE STRING "Which GPU Architecture(s) to compile for")
      set_property(CACHE Viskores_CUDA_Architecture PROPERTY STRINGS native fermi kepler maxwell pascal volta turing ampere all none)

      #detect what the property is set too
      if(Viskores_CUDA_Architecture STREQUAL "native")

        if(VISKORES_CUDA_NATIVE_EXE_PROCESS_RAN_OUTPUT)
          #Use the cached value
          set(arch_flags ${VISKORES_CUDA_NATIVE_EXE_PROCESS_RAN_OUTPUT})
        else()

          #run execute_process to do auto_detection
          if(CMAKE_GENERATOR MATCHES "Visual Studio")
            set(args "-ccbin" "${CMAKE_CXX_COMPILER}" "--run" "${Viskores_CMAKE_MODULE_PATH}/ViskoresDetectCUDAVersion.cu")
          elseif(CUDA_HOST_COMPILER)
            set(args "-ccbin" "${CUDA_HOST_COMPILER}" "--run" "${Viskores_CMAKE_MODULE_PATH}/ViskoresDetectCUDAVersion.cu")
          else()
            set(args "--run" "${Viskores_CMAKE_MODULE_PATH}/ViskoresDetectCUDAVersion.cu")
          endif()

          execute_process(
                  COMMAND ${CMAKE_CUDA_COMPILER} ${args}
                  RESULT_VARIABLE ran_properly
                  OUTPUT_VARIABLE run_output
                  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

          if(ran_properly EQUAL 0)
            #find the position of the "--generate-code" output. With some compilers such as
            #msvc we get compile output plus run output. So we need to strip out just the
            #run output
            string(FIND "${run_output}" "--generate-code" position)
            string(SUBSTRING "${run_output}" ${position} -1 run_output)

            set(arch_flags ${run_output})
            set(VISKORES_CUDA_NATIVE_EXE_PROCESS_RAN_OUTPUT ${run_output} CACHE INTERNAL
                    "device type(s) for cuda[native]")
          else()
            message(FATAL_ERROR "Error detecting architecture flags for CUDA. Please set Viskores_CUDA_Architecture manually.")
          endif()
        endif()
      endif()

      if(Viskores_CUDA_Architecture STREQUAL "fermi")
        set(arch_flags --generate-code=arch=compute_20,code=sm_20)
      elseif(Viskores_CUDA_Architecture STREQUAL "kepler")
        set(arch_flags --generate-code=arch=compute_30,code=sm_30
                       --generate-code=arch=compute_35,code=sm_35)
      elseif(Viskores_CUDA_Architecture STREQUAL "maxwell")
        set(arch_flags --generate-code=arch=compute_50,code=sm_50)
      elseif(Viskores_CUDA_Architecture STREQUAL "pascal")
        set(arch_flags --generate-code=arch=compute_60,code=sm_60
                       --generate-code=arch=compute_61,code=sm_61)
      elseif(Viskores_CUDA_Architecture STREQUAL "volta")
        set(arch_flags --generate-code=arch=compute_70,code=sm_70)
      elseif(Viskores_CUDA_Architecture STREQUAL "turing")
        set(arch_flags --generate-code=arch=compute_75,code=sm_75)
      elseif(Viskores_CUDA_Architecture STREQUAL "ampere")
        set(arch_flags --generate-code=arch=compute_80,code=sm_80
                       --generate-code=arch=compute_86,code=sm_86)
      elseif(Viskores_CUDA_Architecture STREQUAL "all")
        set(arch_flags --generate-code=arch=compute_30,code=sm_30
                       --generate-code=arch=compute_35,code=sm_35
                       --generate-code=arch=compute_50,code=sm_50
                       --generate-code=arch=compute_60,code=sm_60
                       --generate-code=arch=compute_70,code=sm_70
                       --generate-code=arch=compute_75,code=sm_75
                       --generate-code=arch=compute_80,code=sm_80
                       --generate-code=arch=compute_86,code=sm_86)
      endif()

      string(REPLACE ";" " " arch_flags "${arch_flags}")

      if(POLICY CMP0105)
        cmake_policy(GET CMP0105 policy_105_enabled)
      endif()

      if(policy_105_enabled STREQUAL "NEW")
        target_compile_options(viskores_cuda INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:${arch_flags}>)
        target_link_options(viskores_cuda INTERFACE $<DEVICE_LINK:${arch_flags}>)
      else()
        # Before 3.18 we had to use CMAKE_CUDA_FLAGS as we had no way
        # to propagate flags to the device link step
        set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${arch_flags}")
      endif()

      # This needs to be lower-case for the property to be properly exported
      # CMake 3.15 we can add `cuda_architecture_flags` to the EXPORT_PROPERTIES
      # target property to have this automatically exported for us
      set(Viskores_CUDA_Architecture_Flags "${arch_flags}")
      set_target_properties(viskores_cuda PROPERTIES cuda_architecture_flags "${arch_flags}")
      unset(arch_flags)
    endif()
  endif()
endif()

#-----------------------------------------------------------------------------
# Kokkos with its Cuda backend enabled, expects everything to be compiled using its
# `nvcc-wrapper` as the CXX compiler. As the name suggests, nvcc-wrapper is a wrapper around
# Cuda's nvcc compiler. Kokkos targets have all of the flags meant for the nvcc compiler set as the
# CXX compiler flags. This function changes all such flags to be CUDA flags so that we can use
# CMake and viskores's existing infrastructure to compile for Cuda and Host separately. Without this
# all of the files will be compiled using nvcc which can be very time consuming. It can also have
# issues with calling host functions from device functions when compiling code for other backends.
function(kokkos_fix_compile_options)
  set(targets Kokkos::kokkos)
  set(seen_targets)
  set(cuda_arch)

  while(targets)
    list(GET targets 0 target_name)
    list(REMOVE_AT targets 0)

    get_target_property(link_libraries ${target_name} INTERFACE_LINK_LIBRARIES)
    foreach(lib_target IN LISTS link_libraries)
      if (TARGET ${lib_target})
        if (lib_target IN_LIST seen_targets)
          continue()
        endif()

        list(APPEND seen_targets ${lib_target})
        list(APPEND targets ${lib_target})
        get_target_property(compile_options ${lib_target} INTERFACE_COMPILE_OPTIONS)
        if (compile_options)
          string(REGEX MATCH "[$]<[$]<COMPILE_LANGUAGE:CXX>:-Xcompiler;.*>" cxx_compile_options "${compile_options}")
          string(REGEX MATCH "-arch=sm_[0-9][0-9]" cuda_arch "${compile_options}")
          string(REPLACE "-Xcompiler;" "" cxx_compile_options "${cxx_compile_options}")
          list(TRANSFORM compile_options REPLACE "--relocatable-device-code=true" "") #We use CMake for this flag
          list(TRANSFORM compile_options REPLACE "COMPILE_LANGUAGE:CXX" "COMPILE_LANGUAGE:CUDA")
          list(APPEND compile_options "${cxx_compile_options}")
          set_property(TARGET ${lib_target} PROPERTY INTERFACE_COMPILE_OPTIONS ${compile_options})
        endif()

        set_property(TARGET ${lib_target} PROPERTY INTERFACE_LINK_OPTIONS "")
      endif()
    endforeach()
  endwhile()

  set_property(TARGET viskores_kokkos PROPERTY INTERFACE_LINK_OPTIONS "$<DEVICE_LINK:${cuda_arch}>")
  if (OPENMP IN_LIST Kokkos_DEVICES)
    set_property(TARGET viskores_kokkos PROPERTY INTERFACE_LINK_OPTIONS "$<HOST_LINK:-fopenmp>")
  endif()
endfunction()

if(Viskores_ENABLE_KOKKOS AND NOT TARGET viskores_kokkos)
  cmake_minimum_required(VERSION 3.13 FATAL_ERROR)

  find_package(Kokkos 3.7 REQUIRED)

  # We must empty this property for every kokkos backend device since it
  # contains a generator expresion which breaks some of our users builds.
  set_property(TARGET Kokkos::kokkoscore PROPERTY INTERFACE_COMPILE_DEFINITIONS "")

  if (CUDA IN_LIST Kokkos_DEVICES)
    cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
    enable_language(CUDA)

    if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND
       CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "10.0" AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "11.0" AND
       CMAKE_BUILD_TYPE STREQUAL "Release")
      message(WARNING "There is a known issue with Cuda 10 and -O3 optimization. Switching to -O2. Please refer to issue #555.")
      string(REPLACE "-O3" "-O2" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
      string(REPLACE "-O3" "-O2" CMAKE_CUDA_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
    endif()

    string(REGEX MATCH "[0-9][0-9]$" cuda_arch ${Kokkos_ARCH})
    set(CMAKE_CUDA_ARCHITECTURES ${cuda_arch})
    message(STATUS "Detected Cuda arch from Kokkos: ${cuda_arch}")

    add_library(viskores_kokkos_cuda INTERFACE)
    set_property(TARGET viskores_kokkos_cuda PROPERTY EXPORT_NAME kokkos_cuda)
    install(TARGETS viskores_kokkos_cuda EXPORT ${Viskores_EXPORT_NAME})
  elseif(HIP IN_LIST Kokkos_DEVICES)
    cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
    enable_language(HIP)

    set_target_properties(Kokkos::kokkoscore PROPERTIES
      INTERFACE_COMPILE_OPTIONS ""
      INTERFACE_LINK_OPTIONS ""
      )
    add_library(viskores_kokkos_hip INTERFACE)
    set_property(TARGET viskores_kokkos_hip PROPERTY EXPORT_NAME kokkos_hip)
    install(TARGETS viskores_kokkos_hip EXPORT ${Viskores_EXPORT_NAME})
  endif()

  add_library(viskores_kokkos INTERFACE IMPORTED GLOBAL)
  set_target_properties(viskores_kokkos PROPERTIES INTERFACE_LINK_LIBRARIES "Kokkos::kokkos")

  if (TARGET viskores_kokkos_cuda)
    kokkos_fix_compile_options()
  endif()
endif()

if(NOT TARGET Threads::Threads)
  set(THREADS_PREFER_PTHREAD_FLAG ON)
  find_package(Threads REQUIRED)
endif()

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/googletest/googletest/CMakeLists.txt :33

if (COMMAND pre_project_set_up_hermetic_build)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/googletest/googletest/CMakeLists.txt :50

if (COMMAND set_up_hermetic_build)

movableink/webkit Source/ThirdParty/libwebrtc/Source/third_party/yasm/CMakeLists.txt :3

if (COMMAND cmake_policy)