[
  {
    "path": "CleanDirectoryList.cmake",
    "content": "# - Removes duplicate entries and non-directories from a provided list\n#\n#  clean_directory_list(<listvar> [<additional list items>...])\n#\n# Requires CMake 2.6 or newer (uses the 'function' command)\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nif(__clean_directory_list)\n    return()\nendif()\nset(__clean_directory_list YES)\n\nfunction(clean_directory_list _var)\n    # combine variable's current value with additional list items\n    set(_in ${${_var}} ${ARGN})\n\n    if(_in)\n        # Initial list cleaning\n        list(REMOVE_DUPLICATES _in)\n\n        # Grab the absolute path of each actual directory\n        set(_out)\n        foreach(_dir ${_in})\n            if(IS_DIRECTORY \"${_dir}\")\n                get_filename_component(_dir \"${_dir}\" ABSOLUTE)\n                file(TO_CMAKE_PATH \"${_dir}\" _dir)\n                list(APPEND _out \"${_dir}\")\n            endif()\n        endforeach()\n\n        if(_out)\n            # Clean up the output list now\n            list(REMOVE_DUPLICATES _out)\n        endif()\n\n        # return _out\n        set(${_var} \"${_out}\" PARENT_SCOPE)\n    endif()\nendfunction()\n"
  },
  {
    "path": "CodeCoverage.cmake",
    "content": "# Copyright (c) 2012 - 2017, Lars Bilke\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification,\n# are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice, this\n#    list of conditions and the following disclaimer.\n#\n# 2. Redistributions in binary form must reproduce the above copyright notice,\n#    this list of conditions and the following disclaimer in the documentation\n#    and/or other materials provided with the distribution.\n#\n# 3. Neither the name of the copyright holder nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without\n#    specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n# CHANGES:\n#\n# 2012-01-31, Lars Bilke\n# - Enable Code Coverage\n#\n# 2013-09-17, Joakim Söderberg\n# - Added support for Clang.\n# - Some additional usage instructions.\n#\n# 2016-02-03, Lars Bilke\n# - Refactored functions to use named parameters\n#\n# 2017-06-02, Lars Bilke\n# - Merged with modified version from github.com/ufz/ogs\n#\n# 2019-05-06, Anatolii Kurotych\n# - Remove unnecessary --coverage flag\n#\n# 2019-12-13, FeRD (Frank Dana)\n# - Deprecate COVERAGE_LCOVR_EXCLUDES and COVERAGE_GCOVR_EXCLUDES lists in favor\n#   of tool-agnostic COVERAGE_EXCLUDES variable, or EXCLUDE setup arguments.\n# - CMake 3.4+: All excludes can be specified relative to BASE_DIRECTORY\n# - All setup functions: accept BASE_DIRECTORY, EXCLUDE list\n# - Set lcov basedir with -b argument\n# - Add automatic --demangle-cpp in lcovr, if 'c++filt' is available (can be\n#   overridden with NO_DEMANGLE option in setup_target_for_coverage_lcovr().)\n# - Delete output dir, .info file on 'make clean'\n# - Remove Python detection, since version mismatches will break gcovr\n# - Minor cleanup (lowercase function names, update examples...)\n#\n# 2019-12-19, FeRD (Frank Dana)\n# - Rename Lcov outputs, make filtered file canonical, fix cleanup for targets\n#\n# 2020-01-19, Bob Apthorpe\n# - Added gfortran support\n#\n# 2020-02-17, FeRD (Frank Dana)\n# - Make all add_custom_target()s VERBATIM to auto-escape wildcard characters\n#   in EXCLUDEs, and remove manual escaping from gcovr targets\n#\n# 2021-01-19, Robin Mueller\n# - Add CODE_COVERAGE_VERBOSE option which will allow to print out commands which are run\n# - Added the option for users to set the GCOVR_ADDITIONAL_ARGS variable to supply additional\n#   flags to the gcovr command\n#\n# 2020-05-04, Mihchael Davis\n#     - Add -fprofile-abs-path to make gcno files contain absolute paths\n#     - Fix BASE_DIRECTORY not working when defined\n#     - Change BYPRODUCT from folder to index.html to stop ninja from complaining about double defines\n#\n# 2021-05-10, Martin Stump\n#     - Check if the generator is multi-config before warning about non-Debug builds\n#\n# 2022-02-22, Marko Wehle\n#     - Change gcovr output from -o <filename> for --xml <filename> and --html <filename> output respectively.\n#       This will allow for Multiple Output Formats at the same time by making use of GCOVR_ADDITIONAL_ARGS, e.g. GCOVR_ADDITIONAL_ARGS \"--txt\".\n#\n# 2022-09-28, Sebastian Mueller\n#     - fix append_coverage_compiler_flags_to_target to correctly add flags\n#     - replace \"-fprofile-arcs -ftest-coverage\" with \"--coverage\" (equivalent)\n#\n# 2026-01-20, Michał Sawicz\n#     - add `-fprofile-update=atomic` flag, if supported, for concurrent test runs\n#\n# USAGE:\n#\n# 1. Copy this file into your cmake modules path.\n#\n# 2. Add the following line to your CMakeLists.txt (best inside an if-condition\n#    using a CMake option() to enable it just optionally):\n#      include(CodeCoverage)\n#\n# 3. Append necessary compiler flags for all supported source files:\n#      append_coverage_compiler_flags()\n#    Or for specific target:\n#      append_coverage_compiler_flags_to_target(YOUR_TARGET_NAME)\n#\n# 3.a (OPTIONAL) Set appropriate optimization flags, e.g. -O0, -O1 or -Og\n#\n# 4. If you need to exclude additional directories from the report, specify them\n#    using full paths in the COVERAGE_EXCLUDES variable before calling\n#    setup_target_for_coverage_*().\n#    Example:\n#      set(COVERAGE_EXCLUDES\n#          '${PROJECT_SOURCE_DIR}/src/dir1/*'\n#          '/path/to/my/src/dir2/*')\n#    Or, use the EXCLUDE argument to setup_target_for_coverage_*().\n#    Example:\n#      setup_target_for_coverage_lcov(\n#          NAME coverage\n#          EXECUTABLE testrunner\n#          EXCLUDE \"${PROJECT_SOURCE_DIR}/src/dir1/*\" \"/path/to/my/src/dir2/*\")\n#\n# 4.a NOTE: With CMake 3.4+, COVERAGE_EXCLUDES or EXCLUDE can also be set\n#     relative to the BASE_DIRECTORY (default: PROJECT_SOURCE_DIR)\n#     Example:\n#       set(COVERAGE_EXCLUDES \"dir1/*\")\n#       setup_target_for_coverage_gcovr_html(\n#           NAME coverage\n#           EXECUTABLE testrunner\n#           BASE_DIRECTORY \"${PROJECT_SOURCE_DIR}/src\"\n#           EXCLUDE \"dir2/*\")\n#\n# 5. Use the functions described below to create a custom make target which\n#    runs your test executable and produces a code coverage report.\n#\n# 6. Build a Debug build:\n#      cmake -DCMAKE_BUILD_TYPE=Debug ..\n#      make\n#      make my_coverage_target\n#\n\ninclude(CMakeParseArguments)\n\noption(CODE_COVERAGE_VERBOSE \"Verbose information\" FALSE)\n\n# Check prereqs\nfind_program( GCOV_PATH NAMES gcov )\nfind_program( LCOV_PATH NAMES lcov lcov.bat lcov.exe lcov.perl )\nfind_program( FASTCOV_PATH NAMES fastcov fastcov.py )\nfind_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat )\nfind_program( GCOVR_PATH NAMES gcovr )\nfind_program( CPPFILT_PATH NAMES c++filt )\n\nif(NOT GCOV_PATH)\n    message(FATAL_ERROR \"gcov not found! Aborting...\")\nendif() # NOT GCOV_PATH\n\nif(LCOV_PATH)\n    set(lcov_message \"Found Lcov: ${LCOV_PATH}\")\n    execute_process(COMMAND ${LCOV_PATH} \"--version\" OUTPUT_VARIABLE LCOV_VERSION_OUTPUT)\n    if(\"${LCOV_VERSION_OUTPUT}\" MATCHES \"lcov: LCOV version ([0-9]+\\\\.[0-9]+(\\\\.[0-9]+)?)(-[0-9])?\\n\")\n        set(LCOV_VERSION \"${CMAKE_MATCH_1}\")\n        string(APPEND lcov_message \" (found version ${LCOV_VERSION})\")\n    endif()\n    message(STATUS \"${lcov_message}\")\nendif()\n\n# Check supported compiler (Clang, GNU and Flang)\nget_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)\nlist(REMOVE_ITEM LANGUAGES NONE)\nforeach(LANG ${LANGUAGES})\n  if(\"${CMAKE_${LANG}_COMPILER_ID}\" MATCHES \"(Apple)?[Cc]lang\")\n    if(\"${CMAKE_${LANG}_COMPILER_VERSION}\" VERSION_LESS 3)\n      message(FATAL_ERROR \"Clang version must be 3.0.0 or greater! Aborting...\")\n    endif()\n  elseif(NOT \"${CMAKE_${LANG}_COMPILER_ID}\" MATCHES \"GNU\"\n         AND NOT \"${CMAKE_${LANG}_COMPILER_ID}\" MATCHES \"(LLVM)?[Ff]lang\")\n    message(FATAL_ERROR \"Compiler is not GNU or Flang! Aborting...\")\n  endif()\nendforeach()\n\nset(COVERAGE_COMPILER_FLAGS \"-g --coverage\"\n    CACHE INTERNAL \"\")\n\n# This is necessary because older versions of ccache don't yet have these:\n# https://github.com/ccache/ccache/commit/2737d79e282de72d1b29128f437173e4892ced5e\n# https://github.com/ccache/ccache/pull/1408\nfunction(_coverage_atomic_update_flag out_var lang)\n    set(_atomic_update_flag \"-fprofile-update=atomic\")\n    set(_coverage_uses_ccache OFF)\n    foreach(_launcher IN LISTS CMAKE_${lang}_COMPILER_LAUNCHER)\n        if(_launcher MATCHES \"ccache(\\\\.exe)?$\")\n            # Check that ccache version is less than 4.10.\n            execute_process(COMMAND ${_launcher} --version OUTPUT_VARIABLE CACHE_VERSION_OUTPUT)\n            if(\"${CACHE_VERSION_OUTPUT}\" MATCHES \"ccache version ([0-9]+\\\\.[0-9]+\\\\.[0-9]+)\")\n                if(\"${CMAKE_MATCH_1}\" VERSION_LESS \"4.10.0\")\n                    set(_coverage_uses_ccache ON)\n                    break()\n                endif()\n            endif()\n        endif()\n    endforeach()\n    if(_coverage_uses_ccache)\n        set(_atomic_update_flag \"--ccache-skip -fprofile-update=atomic\")\n    endif()\n    set(${out_var} \"${_atomic_update_flag}\" PARENT_SCOPE)\nendfunction()\n\nset(COVERAGE_CXX_COMPILER_FLAGS ${COVERAGE_COMPILER_FLAGS})\nif(CMAKE_CXX_COMPILER_ID MATCHES \"(GNU|Clang)\")\n    include(CheckCXXCompilerFlag)\n    check_cxx_compiler_flag(-fprofile-abs-path HAVE_cxx_fprofile_abs_path)\n    if(HAVE_cxx_fprofile_abs_path)\n        set(COVERAGE_CXX_COMPILER_FLAGS \"${COVERAGE_CXX_COMPILER_FLAGS} -fprofile-abs-path\")\n    endif()\n    check_cxx_compiler_flag(-fprofile-update=atomic HAVE_cxx_fprofile_update_atomic)\n    if(HAVE_cxx_fprofile_update_atomic)\n        _coverage_atomic_update_flag(COVERAGE_ATOMIC_UPDATE_FLAG CXX)\n        set(COVERAGE_CXX_COMPILER_FLAGS \"${COVERAGE_CXX_COMPILER_FLAGS} ${COVERAGE_ATOMIC_UPDATE_FLAG}\")\n    endif()\nendif()\n\nset(COVERAGE_C_COMPILER_FLAGS ${COVERAGE_COMPILER_FLAGS})\nif(CMAKE_C_COMPILER_ID MATCHES \"(GNU|Clang)\")\n    include(CheckCCompilerFlag)\n    check_c_compiler_flag(-fprofile-abs-path HAVE_c_fprofile_abs_path)\n    if(HAVE_c_fprofile_abs_path)\n        set(COVERAGE_C_COMPILER_FLAGS \"${COVERAGE_C_COMPILER_FLAGS} -fprofile-abs-path\")\n    endif()\n    check_c_compiler_flag(-fprofile-update=atomic HAVE_c_fprofile_update_atomic)\n    if(HAVE_c_fprofile_update_atomic)\n        _coverage_atomic_update_flag(COVERAGE_ATOMIC_UPDATE_FLAG C)\n        set(COVERAGE_C_COMPILER_FLAGS \"${COVERAGE_C_COMPILER_FLAGS} ${COVERAGE_ATOMIC_UPDATE_FLAG}\")\n    endif()\nendif()\n\nset(COVERAGE_Fortran_COMPILER_FLAGS ${COVERAGE_COMPILER_FLAGS})\nif(CMAKE_Fortran_COMPILER_ID MATCHES \"(GNU|Clang)\")\n    include(CheckFortranCompilerFlag)\n    check_fortran_compiler_flag(-fprofile-abs-path HAVE_fortran_fprofile_abs_path)\n    if(HAVE_fortran_fprofile_abs_path)\n        set(COVERAGE_Fortran_COMPILER_FLAGS \"${COVERAGE_Fortran_COMPILER_FLAGS} -fprofile-abs-path\")\n    endif()\n    check_fortran_compiler_flag(-fprofile-update=atomic HAVE_fortran_fprofile_update_atomic)\n    if(HAVE_fortran_fprofile_update_atomic)\n        _coverage_atomic_update_flag(COVERAGE_ATOMIC_UPDATE_FLAG Fortran)\n        set(COVERAGE_Fortran_COMPILER_FLAGS \"${COVERAGE_Fortran_COMPILER_FLAGS} ${COVERAGE_ATOMIC_UPDATE_FLAG}\")\n    endif()\nendif()\n\nset(CMAKE_Fortran_FLAGS_COVERAGE\n    ${COVERAGE_Fortran_COMPILER_FLAGS}\n    CACHE STRING \"Flags used by the Fortran compiler during coverage builds.\"\n    FORCE )\nset(CMAKE_CXX_FLAGS_COVERAGE\n    ${COVERAGE_CXX_COMPILER_FLAGS}\n    CACHE STRING \"Flags used by the C++ compiler during coverage builds.\"\n    FORCE )\nset(CMAKE_C_FLAGS_COVERAGE\n    ${COVERAGE_C_COMPILER_FLAGS}\n    CACHE STRING \"Flags used by the C compiler during coverage builds.\"\n    FORCE )\nset(CMAKE_EXE_LINKER_FLAGS_COVERAGE\n    \"\"\n    CACHE STRING \"Flags used for linking binaries during coverage builds.\"\n    FORCE )\nset(CMAKE_SHARED_LINKER_FLAGS_COVERAGE\n    \"\"\n    CACHE STRING \"Flags used by the shared libraries linker during coverage builds.\"\n    FORCE )\nmark_as_advanced(\n    CMAKE_Fortran_FLAGS_COVERAGE\n    CMAKE_CXX_FLAGS_COVERAGE\n    CMAKE_C_FLAGS_COVERAGE\n    CMAKE_EXE_LINKER_FLAGS_COVERAGE\n    CMAKE_SHARED_LINKER_FLAGS_COVERAGE )\n\nget_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\nif(NOT (CMAKE_BUILD_TYPE STREQUAL \"Debug\" OR GENERATOR_IS_MULTI_CONFIG))\n    message(WARNING \"Code coverage results with an optimised (non-Debug) build may be misleading\")\nendif() # NOT (CMAKE_BUILD_TYPE STREQUAL \"Debug\" OR GENERATOR_IS_MULTI_CONFIG)\n\n# Defines a target for running and collection code coverage information\n# Builds dependencies, runs the given executable and outputs reports.\n# NOTE! The executable should always have a ZERO as exit code otherwise\n# the coverage generation will not complete.\n#\n# setup_target_for_coverage_lcov(\n#     NAME testrunner_coverage                    # New target name\n#     EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR\n#     DEPENDENCIES testrunner                     # Dependencies to build first\n#     BASE_DIRECTORY \"../\"                        # Base directory for report\n#                                                 #  (defaults to PROJECT_SOURCE_DIR)\n#     DATA_DIRECTORY \"./\"                         # Data directory\n#                                                 #  (defaults to PROJECT_BINARY_DIR)\n#     EXCLUDE \"src/dir1/*\" \"src/dir2/*\"           # Patterns to exclude (can be relative\n#                                                 #  to BASE_DIRECTORY, with CMake 3.4+)\n#     NO_DEMANGLE                                 # Don't demangle C++ symbols\n#                                                 #  even if c++filt is found\n# )\nfunction(setup_target_for_coverage_lcov)\n\n    set(options NO_DEMANGLE SONARQUBE)\n    set(oneValueArgs BASE_DIRECTORY DATA_DIRECTORY NAME)\n    set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES LCOV_ARGS GENHTML_ARGS)\n    cmake_parse_arguments(Coverage \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    if(NOT LCOV_PATH)\n        message(FATAL_ERROR \"lcov not found! Aborting...\")\n    endif() # NOT LCOV_PATH\n\n    if(NOT GENHTML_PATH)\n        message(FATAL_ERROR \"genhtml not found! Aborting...\")\n    endif() # NOT GENHTML_PATH\n\n    # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR\n    if(DEFINED Coverage_BASE_DIRECTORY)\n        get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)\n    else()\n        set(BASEDIR ${PROJECT_SOURCE_DIR})\n    endif()\n\n    # Collect excludes (CMake 3.4+: Also compute absolute paths)\n    set(LCOV_EXCLUDES \"\")\n    foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_LCOV_EXCLUDES})\n        if(CMAKE_VERSION VERSION_GREATER 3.4)\n            get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})\n        endif()\n        list(APPEND LCOV_EXCLUDES \"${EXCLUDE}\")\n    endforeach()\n    list(REMOVE_DUPLICATES LCOV_EXCLUDES)\n\n    # Conditional arguments\n    if(CPPFILT_PATH AND NOT ${Coverage_NO_DEMANGLE})\n        set(GENHTML_EXTRA_ARGS \"--demangle-cpp\")\n    endif()\n\n    if(DEFINED Coverage_DATA_DIRECTORY)\n        set(LCOV_DATA_DIRECTORY ${Coverage_DATA_DIRECTORY})\n    else()\n        set(LCOV_DATA_DIRECTORY ${PROJECT_BINARY_DIR})\n    endif()\n\n    # Setting up commands which will be run to generate coverage data.\n    # Cleanup lcov\n    set(LCOV_CLEAN_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --directory ${LCOV_DATA_DIRECTORY}\n        -b ${BASEDIR} --zerocounters\n    )\n    # Create baseline to make sure untouched files show up in the report\n    set(LCOV_BASELINE_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -c -i -d ${LCOV_DATA_DIRECTORY} -b\n        ${BASEDIR} -o ${Coverage_NAME}.base\n    )\n    # Run tests\n    set(LCOV_EXEC_TESTS_CMD\n        ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}\n    )\n    # Capturing lcov counters and generating report\n    set(LCOV_CAPTURE_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --directory ${LCOV_DATA_DIRECTORY} -b\n        ${BASEDIR} --capture --output-file ${Coverage_NAME}.capture\n    )\n    # add baseline counters\n    set(LCOV_BASELINE_COUNT_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -a ${Coverage_NAME}.base\n        -a ${Coverage_NAME}.capture --output-file ${Coverage_NAME}.total\n    )\n    # filter collected data to final coverage report\n    set(LCOV_FILTER_CMD\n        ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --remove\n        ${Coverage_NAME}.total ${LCOV_EXCLUDES} --output-file ${Coverage_NAME}.info\n    )\n    # Generate HTML output\n    set(LCOV_GEN_HTML_CMD\n        ${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS} -o\n        ${Coverage_NAME} ${Coverage_NAME}.info\n    )\n    if(${Coverage_SONARQUBE})\n        # Generate SonarQube output\n        set(GCOVR_XML_CMD\n            ${GCOVR_PATH} --sonarqube ${Coverage_NAME}_sonarqube.xml -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}\n            ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}\n        )\n        set(GCOVR_XML_CMD_COMMAND\n            COMMAND ${GCOVR_XML_CMD}\n        )\n        set(GCOVR_XML_CMD_BYPRODUCTS ${Coverage_NAME}_sonarqube.xml)\n        set(GCOVR_XML_CMD_COMMENT COMMENT \"SonarQube code coverage info report saved in ${Coverage_NAME}_sonarqube.xml.\")\n    endif()\n\n\n    if(CODE_COVERAGE_VERBOSE)\n        message(STATUS \"Executed command report\")\n        message(STATUS \"Command to clean up lcov: \")\n        string(REPLACE \";\" \" \" LCOV_CLEAN_CMD_SPACED \"${LCOV_CLEAN_CMD}\")\n        message(STATUS \"${LCOV_CLEAN_CMD_SPACED}\")\n\n        message(STATUS \"Command to create baseline: \")\n        string(REPLACE \";\" \" \" LCOV_BASELINE_CMD_SPACED \"${LCOV_BASELINE_CMD}\")\n        message(STATUS \"${LCOV_BASELINE_CMD_SPACED}\")\n\n        message(STATUS \"Command to run the tests: \")\n        string(REPLACE \";\" \" \" LCOV_EXEC_TESTS_CMD_SPACED \"${LCOV_EXEC_TESTS_CMD}\")\n        message(STATUS \"${LCOV_EXEC_TESTS_CMD_SPACED}\")\n\n        message(STATUS \"Command to capture counters and generate report: \")\n        string(REPLACE \";\" \" \" LCOV_CAPTURE_CMD_SPACED \"${LCOV_CAPTURE_CMD}\")\n        message(STATUS \"${LCOV_CAPTURE_CMD_SPACED}\")\n\n        message(STATUS \"Command to add baseline counters: \")\n        string(REPLACE \";\" \" \" LCOV_BASELINE_COUNT_CMD_SPACED \"${LCOV_BASELINE_COUNT_CMD}\")\n        message(STATUS \"${LCOV_BASELINE_COUNT_CMD_SPACED}\")\n\n        message(STATUS \"Command to filter collected data: \")\n        string(REPLACE \";\" \" \" LCOV_FILTER_CMD_SPACED \"${LCOV_FILTER_CMD}\")\n        message(STATUS \"${LCOV_FILTER_CMD_SPACED}\")\n\n        message(STATUS \"Command to generate lcov HTML output: \")\n        string(REPLACE \";\" \" \" LCOV_GEN_HTML_CMD_SPACED \"${LCOV_GEN_HTML_CMD}\")\n        message(STATUS \"${LCOV_GEN_HTML_CMD_SPACED}\")\n\n        if(${Coverage_SONARQUBE})\n            message(STATUS \"Command to generate SonarQube XML output: \")\n            string(REPLACE \";\" \" \" GCOVR_XML_CMD_SPACED \"${GCOVR_XML_CMD}\")\n            message(STATUS \"${GCOVR_XML_CMD_SPACED}\")\n        endif()\n    endif()\n\n    # Setup target\n    add_custom_target(${Coverage_NAME}\n        COMMAND ${LCOV_CLEAN_CMD}\n        COMMAND ${LCOV_BASELINE_CMD}\n        COMMAND ${LCOV_EXEC_TESTS_CMD}\n        COMMAND ${LCOV_CAPTURE_CMD}\n        COMMAND ${LCOV_BASELINE_COUNT_CMD}\n        COMMAND ${LCOV_FILTER_CMD}\n        COMMAND ${LCOV_GEN_HTML_CMD}\n        ${GCOVR_XML_CMD_COMMAND}\n\n        # Set output files as GENERATED (will be removed on 'make clean')\n        BYPRODUCTS\n            ${Coverage_NAME}.base\n            ${Coverage_NAME}.capture\n            ${Coverage_NAME}.total\n            ${Coverage_NAME}.info\n            ${GCOVR_XML_CMD_BYPRODUCTS}\n            ${Coverage_NAME}/index.html\n        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n        DEPENDS ${Coverage_DEPENDENCIES}\n        VERBATIM # Protect arguments to commands\n        COMMENT \"Resetting code coverage counters to zero. Processing code coverage counters and generating report.\"\n    )\n\n    # Show where to find the lcov info report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND true\n        COMMENT \"Lcov code coverage info report saved in ${Coverage_NAME}.info.\"\n        ${GCOVR_XML_CMD_COMMENT}\n    )\n\n    # Show info where to find the report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND true\n        COMMENT \"Open ./${Coverage_NAME}/index.html in your browser to view the coverage report.\"\n    )\n\nendfunction() # setup_target_for_coverage_lcov\n\n# Defines a target for running and collection code coverage information\n# Builds dependencies, runs the given executable and outputs reports.\n# NOTE! The executable should always have a ZERO as exit code otherwise\n# the coverage generation will not complete.\n#\n# setup_target_for_coverage_gcovr_xml(\n#     NAME ctest_coverage                    # New target name\n#     EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR\n#     DEPENDENCIES executable_target         # Dependencies to build first\n#     BASE_DIRECTORY \"../\"                   # Base directory for report\n#                                            #  (defaults to PROJECT_SOURCE_DIR)\n#     EXCLUDE \"src/dir1/*\" \"src/dir2/*\"      # Patterns to exclude (can be relative\n#                                            #  to BASE_DIRECTORY, with CMake 3.4+)\n# )\n# The user can set the variable GCOVR_ADDITIONAL_ARGS to supply additional flags to the\n# GCVOR command.\nfunction(setup_target_for_coverage_gcovr_xml)\n\n    set(options NONE)\n    set(oneValueArgs BASE_DIRECTORY NAME)\n    set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)\n    cmake_parse_arguments(Coverage \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    if(NOT GCOVR_PATH)\n        message(FATAL_ERROR \"gcovr not found! Aborting...\")\n    endif() # NOT GCOVR_PATH\n\n    # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR\n    if(DEFINED Coverage_BASE_DIRECTORY)\n        get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)\n    else()\n        set(BASEDIR ${PROJECT_SOURCE_DIR})\n    endif()\n\n    # Collect excludes (CMake 3.4+: Also compute absolute paths)\n    set(GCOVR_EXCLUDES \"\")\n    foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})\n        if(CMAKE_VERSION VERSION_GREATER 3.4)\n            get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})\n        endif()\n        list(APPEND GCOVR_EXCLUDES \"${EXCLUDE}\")\n    endforeach()\n    list(REMOVE_DUPLICATES GCOVR_EXCLUDES)\n\n    # Combine excludes to several -e arguments\n    set(GCOVR_EXCLUDE_ARGS \"\")\n    foreach(EXCLUDE ${GCOVR_EXCLUDES})\n        list(APPEND GCOVR_EXCLUDE_ARGS \"-e\")\n        list(APPEND GCOVR_EXCLUDE_ARGS \"${EXCLUDE}\")\n    endforeach()\n\n    # Set up commands which will be run to generate coverage data\n    # Run tests\n    set(GCOVR_XML_EXEC_TESTS_CMD\n        ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}\n    )\n    # Running gcovr\n    set(GCOVR_XML_CMD\n        ${GCOVR_PATH} --xml ${Coverage_NAME}.xml -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}\n        ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}\n    )\n\n    if(CODE_COVERAGE_VERBOSE)\n        message(STATUS \"Executed command report\")\n\n        message(STATUS \"Command to run tests: \")\n        string(REPLACE \";\" \" \" GCOVR_XML_EXEC_TESTS_CMD_SPACED \"${GCOVR_XML_EXEC_TESTS_CMD}\")\n        message(STATUS \"${GCOVR_XML_EXEC_TESTS_CMD_SPACED}\")\n\n        message(STATUS \"Command to generate gcovr XML coverage data: \")\n        string(REPLACE \";\" \" \" GCOVR_XML_CMD_SPACED \"${GCOVR_XML_CMD}\")\n        message(STATUS \"${GCOVR_XML_CMD_SPACED}\")\n    endif()\n\n    add_custom_target(${Coverage_NAME}\n        COMMAND ${GCOVR_XML_EXEC_TESTS_CMD}\n        COMMAND ${GCOVR_XML_CMD}\n\n        BYPRODUCTS ${Coverage_NAME}.xml\n        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n        DEPENDS ${Coverage_DEPENDENCIES}\n        VERBATIM # Protect arguments to commands\n        COMMENT \"Running gcovr to produce Cobertura code coverage report.\"\n    )\n\n    # Show info where to find the report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND true\n        COMMENT \"Cobertura code coverage report saved in ${Coverage_NAME}.xml.\"\n    )\nendfunction() # setup_target_for_coverage_gcovr_xml\n\n# Defines a target for running and collection code coverage information\n# Builds dependencies, runs the given executable and outputs reports.\n# NOTE! The executable should always have a ZERO as exit code otherwise\n# the coverage generation will not complete.\n#\n# setup_target_for_coverage_gcovr_html(\n#     NAME ctest_coverage                    # New target name\n#     EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR\n#     DEPENDENCIES executable_target         # Dependencies to build first\n#     BASE_DIRECTORY \"../\"                   # Base directory for report\n#                                            #  (defaults to PROJECT_SOURCE_DIR)\n#     EXCLUDE \"src/dir1/*\" \"src/dir2/*\"      # Patterns to exclude (can be relative\n#                                            #  to BASE_DIRECTORY, with CMake 3.4+)\n# )\n# The user can set the variable GCOVR_ADDITIONAL_ARGS to supply additional flags to the\n# GCVOR command.\nfunction(setup_target_for_coverage_gcovr_html)\n\n    set(options NONE)\n    set(oneValueArgs BASE_DIRECTORY NAME)\n    set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)\n    cmake_parse_arguments(Coverage \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    if(NOT GCOVR_PATH)\n        message(FATAL_ERROR \"gcovr not found! Aborting...\")\n    endif() # NOT GCOVR_PATH\n\n    # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR\n    if(DEFINED Coverage_BASE_DIRECTORY)\n        get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)\n    else()\n        set(BASEDIR ${PROJECT_SOURCE_DIR})\n    endif()\n\n    # Collect excludes (CMake 3.4+: Also compute absolute paths)\n    set(GCOVR_EXCLUDES \"\")\n    foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})\n        if(CMAKE_VERSION VERSION_GREATER 3.4)\n            get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})\n        endif()\n        list(APPEND GCOVR_EXCLUDES \"${EXCLUDE}\")\n    endforeach()\n    list(REMOVE_DUPLICATES GCOVR_EXCLUDES)\n\n    # Combine excludes to several -e arguments\n    set(GCOVR_EXCLUDE_ARGS \"\")\n    foreach(EXCLUDE ${GCOVR_EXCLUDES})\n        list(APPEND GCOVR_EXCLUDE_ARGS \"-e\")\n        list(APPEND GCOVR_EXCLUDE_ARGS \"${EXCLUDE}\")\n    endforeach()\n\n    # Set up commands which will be run to generate coverage data\n    # Run tests\n    set(GCOVR_HTML_EXEC_TESTS_CMD\n        ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}\n    )\n    # Create folder\n    set(GCOVR_HTML_FOLDER_CMD\n        ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/${Coverage_NAME}\n    )\n    # Running gcovr\n    set(GCOVR_HTML_CMD\n        ${GCOVR_PATH} --html ${Coverage_NAME}/index.html --html-details -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}\n        ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}\n    )\n\n    if(CODE_COVERAGE_VERBOSE)\n        message(STATUS \"Executed command report\")\n\n        message(STATUS \"Command to run tests: \")\n        string(REPLACE \";\" \" \" GCOVR_HTML_EXEC_TESTS_CMD_SPACED \"${GCOVR_HTML_EXEC_TESTS_CMD}\")\n        message(STATUS \"${GCOVR_HTML_EXEC_TESTS_CMD_SPACED}\")\n\n        message(STATUS \"Command to create a folder: \")\n        string(REPLACE \";\" \" \" GCOVR_HTML_FOLDER_CMD_SPACED \"${GCOVR_HTML_FOLDER_CMD}\")\n        message(STATUS \"${GCOVR_HTML_FOLDER_CMD_SPACED}\")\n\n        message(STATUS \"Command to generate gcovr HTML coverage data: \")\n        string(REPLACE \";\" \" \" GCOVR_HTML_CMD_SPACED \"${GCOVR_HTML_CMD}\")\n        message(STATUS \"${GCOVR_HTML_CMD_SPACED}\")\n    endif()\n\n    add_custom_target(${Coverage_NAME}\n        COMMAND ${GCOVR_HTML_EXEC_TESTS_CMD}\n        COMMAND ${GCOVR_HTML_FOLDER_CMD}\n        COMMAND ${GCOVR_HTML_CMD}\n\n        BYPRODUCTS ${PROJECT_BINARY_DIR}/${Coverage_NAME}/index.html  # report directory\n        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n        DEPENDS ${Coverage_DEPENDENCIES}\n        VERBATIM # Protect arguments to commands\n        COMMENT \"Running gcovr to produce HTML code coverage report.\"\n    )\n\n    # Show info where to find the report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND true\n        COMMENT \"Open ./${Coverage_NAME}/index.html in your browser to view the coverage report.\"\n    )\n\nendfunction() # setup_target_for_coverage_gcovr_html\n\n# Defines a target for running and collection code coverage information\n# Builds dependencies, runs the given executable and outputs reports.\n# NOTE! The executable should always have a ZERO as exit code otherwise\n# the coverage generation will not complete.\n#\n# setup_target_for_coverage_fastcov(\n#     NAME testrunner_coverage                    # New target name\n#     EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR\n#     DEPENDENCIES testrunner                     # Dependencies to build first\n#     BASE_DIRECTORY \"../\"                        # Base directory for report\n#                                                 #  (defaults to PROJECT_SOURCE_DIR)\n#     EXCLUDE \"src/dir1/\" \"src/dir2/\"             # Patterns to exclude.\n#     NO_DEMANGLE                                 # Don't demangle C++ symbols\n#                                                 #  even if c++filt is found\n#     SKIP_HTML                                   # Don't create html report\n#     POST_CMD perl -i -pe s!${PROJECT_SOURCE_DIR}/!!g ctest_coverage.json  # E.g. for stripping source dir from file paths\n# )\nfunction(setup_target_for_coverage_fastcov)\n\n    set(options NO_DEMANGLE SKIP_HTML)\n    set(oneValueArgs BASE_DIRECTORY NAME)\n    set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES FASTCOV_ARGS GENHTML_ARGS POST_CMD)\n    cmake_parse_arguments(Coverage \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    if(NOT FASTCOV_PATH)\n        message(FATAL_ERROR \"fastcov not found! Aborting...\")\n    endif()\n\n    if(NOT Coverage_SKIP_HTML AND NOT GENHTML_PATH)\n        message(FATAL_ERROR \"genhtml not found! Aborting...\")\n    endif()\n\n    # Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR\n    if(Coverage_BASE_DIRECTORY)\n        get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)\n    else()\n        set(BASEDIR ${PROJECT_SOURCE_DIR})\n    endif()\n\n    # Collect excludes (Patterns, not paths, for fastcov)\n    set(FASTCOV_EXCLUDES \"\")\n    foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_FASTCOV_EXCLUDES})\n        list(APPEND FASTCOV_EXCLUDES \"${EXCLUDE}\")\n    endforeach()\n    list(REMOVE_DUPLICATES FASTCOV_EXCLUDES)\n\n    # Conditional arguments\n    if(CPPFILT_PATH AND NOT ${Coverage_NO_DEMANGLE})\n        set(GENHTML_EXTRA_ARGS \"--demangle-cpp\")\n    endif()\n\n    # Set up commands which will be run to generate coverage data\n    set(FASTCOV_EXEC_TESTS_CMD ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS})\n\n    set(FASTCOV_CAPTURE_CMD ${FASTCOV_PATH} ${Coverage_FASTCOV_ARGS} --gcov ${GCOV_PATH}\n        --search-directory ${BASEDIR}\n        --process-gcno\n        --output ${Coverage_NAME}.json\n        --exclude ${FASTCOV_EXCLUDES}\n    )\n\n    set(FASTCOV_CONVERT_CMD ${FASTCOV_PATH}\n        -C ${Coverage_NAME}.json --lcov --output ${Coverage_NAME}.info\n    )\n\n    if(Coverage_SKIP_HTML)\n        set(FASTCOV_HTML_CMD \";\")\n    else()\n        set(FASTCOV_HTML_CMD ${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS}\n            -o ${Coverage_NAME} ${Coverage_NAME}.info\n        )\n    endif()\n\n    set(FASTCOV_POST_CMD \";\")\n    if(Coverage_POST_CMD)\n        set(FASTCOV_POST_CMD ${Coverage_POST_CMD})\n    endif()\n\n    if(CODE_COVERAGE_VERBOSE)\n        message(STATUS \"Code coverage commands for target ${Coverage_NAME} (fastcov):\")\n\n        message(\"   Running tests:\")\n        string(REPLACE \";\" \" \" FASTCOV_EXEC_TESTS_CMD_SPACED \"${FASTCOV_EXEC_TESTS_CMD}\")\n        message(\"     ${FASTCOV_EXEC_TESTS_CMD_SPACED}\")\n\n        message(\"   Capturing fastcov counters and generating report:\")\n        string(REPLACE \";\" \" \" FASTCOV_CAPTURE_CMD_SPACED \"${FASTCOV_CAPTURE_CMD}\")\n        message(\"     ${FASTCOV_CAPTURE_CMD_SPACED}\")\n\n        message(\"   Converting fastcov .json to lcov .info:\")\n        string(REPLACE \";\" \" \" FASTCOV_CONVERT_CMD_SPACED \"${FASTCOV_CONVERT_CMD}\")\n        message(\"     ${FASTCOV_CONVERT_CMD_SPACED}\")\n\n        if(NOT Coverage_SKIP_HTML)\n            message(\"   Generating HTML report: \")\n            string(REPLACE \";\" \" \" FASTCOV_HTML_CMD_SPACED \"${FASTCOV_HTML_CMD}\")\n            message(\"     ${FASTCOV_HTML_CMD_SPACED}\")\n        endif()\n        if(Coverage_POST_CMD)\n            message(\"   Running post command: \")\n            string(REPLACE \";\" \" \" FASTCOV_POST_CMD_SPACED \"${FASTCOV_POST_CMD}\")\n            message(\"     ${FASTCOV_POST_CMD_SPACED}\")\n        endif()\n    endif()\n\n    # Setup target\n    add_custom_target(${Coverage_NAME}\n\n        # Cleanup fastcov\n        COMMAND ${FASTCOV_PATH} ${Coverage_FASTCOV_ARGS} --gcov ${GCOV_PATH}\n            --search-directory ${BASEDIR}\n            --zerocounters\n\n        COMMAND ${FASTCOV_EXEC_TESTS_CMD}\n        COMMAND ${FASTCOV_CAPTURE_CMD}\n        COMMAND ${FASTCOV_CONVERT_CMD}\n        COMMAND ${FASTCOV_HTML_CMD}\n        COMMAND ${FASTCOV_POST_CMD}\n\n        # Set output files as GENERATED (will be removed on 'make clean')\n        BYPRODUCTS\n             ${Coverage_NAME}.info\n             ${Coverage_NAME}.json\n             ${Coverage_NAME}/index.html  # report directory\n\n        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n        DEPENDS ${Coverage_DEPENDENCIES}\n        VERBATIM # Protect arguments to commands\n        COMMENT \"Resetting code coverage counters to zero. Processing code coverage counters and generating report.\"\n    )\n\n    set(INFO_MSG \"fastcov code coverage info report saved in ${Coverage_NAME}.info and ${Coverage_NAME}.json.\")\n    if(NOT Coverage_SKIP_HTML)\n        string(APPEND INFO_MSG \" Open ${PROJECT_BINARY_DIR}/${Coverage_NAME}/index.html in your browser to view the coverage report.\")\n    endif()\n    # Show where to find the fastcov info report\n    add_custom_command(TARGET ${Coverage_NAME} POST_BUILD\n        COMMAND ${CMAKE_COMMAND} -E echo ${INFO_MSG}\n    )\n\nendfunction() # setup_target_for_coverage_fastcov\n\nfunction(append_coverage_compiler_flags)\n    foreach(LANG ${LANGUAGES})\n        set(CMAKE_${LANG}_FLAGS \"${CMAKE_${LANG}_FLAGS} ${CMAKE_${LANG}_FLAGS_COVERAGE}\" PARENT_SCOPE)\n        message(STATUS \"Appending code coverage compiler flags for ${LANG}: ${CMAKE_${LANG}_FLAGS_COVERAGE}\")\n    endforeach()\n    if(CMAKE_C_COMPILER_ID STREQUAL \"GNU\" OR CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\" OR CMAKE_Fortran_COMPILER_ID STREQUAL \"GNU\")\n        link_libraries(gcov)\n    endif()\nendfunction() # append_coverage_compiler_flags\n\n# Setup coverage for specific library\nfunction(append_coverage_compiler_flags_to_target name)\n    foreach(LANG ${LANGUAGES})\n        separate_arguments(_flag_list NATIVE_COMMAND \"${CMAKE_${LANG}_FLAGS_COVERAGE}\")\n        target_compile_options(${name} PRIVATE $<$<COMPILE_LANGUAGE:${LANG}>:${_flag_list}>)\n    endforeach()\n    if(CMAKE_C_COMPILER_ID STREQUAL \"GNU\" OR CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\" OR CMAKE_Fortran_COMPILER_ID STREQUAL \"GNU\")\n        target_link_libraries(${name} PRIVATE gcov)\n    endif()\nendfunction()\n"
  },
  {
    "path": "CppcheckTargets.cmake",
    "content": "# - Run cppcheck on c++ source files as a custom target and a test\n#\n#  include(CppcheckTargets)\n#  add_cppcheck(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FAIL_ON_WARNINGS]) -\n#    Create a target to check a target's sources with cppcheck and the indicated options\n#  add_cppcheck_sources(<target-name> [UNUSED_FUNCTIONS] [STYLE] [POSSIBLE_ERROR] [FAIL_ON_WARNINGS]) -\n#    Create a target to check standalone sources with cppcheck and the indicated options\n#\n# Requires these CMake modules:\n#  Findcppcheck\n#\n# Requires CMake 2.6 or newer (uses the 'function' command)\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nif(__add_cppcheck)\n    return()\nendif()\nset(__add_cppcheck YES)\n\nif(NOT CPPCHECK_FOUND)\n    find_package(cppcheck QUIET)\nendif()\n\nif(CPPCHECK_FOUND)\n    if(NOT TARGET all_cppcheck)\n        add_custom_target(all_cppcheck)\n        set_target_properties(all_cppcheck PROPERTIES EXCLUDE_FROM_ALL TRUE)\n    endif()\nendif()\n\nfunction(add_cppcheck_sources _targetname)\n    if(CPPCHECK_FOUND)\n        set(_cppcheck_args)\n        set(_input ${ARGN})\n        list(FIND _input UNUSED_FUNCTIONS _unused_func)\n        if(\"${_unused_func}\" GREATER \"-1\")\n            list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG})\n            list(REMOVE_AT _input ${_unused_func})\n        endif()\n\n        list(FIND _input STYLE _style)\n        if(\"${_style}\" GREATER \"-1\")\n            list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG})\n            list(REMOVE_AT _input ${_style})\n        endif()\n\n        list(FIND _input POSSIBLE_ERROR _poss_err)\n        if(\"${_poss_err}\" GREATER \"-1\")\n            list(APPEND _cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG})\n            list(REMOVE_AT _input ${_poss_err})\n        endif()\n\n        list(FIND _input FAIL_ON_WARNINGS _fail_on_warn)\n        if(\"${_fail_on_warn}\" GREATER \"-1\")\n            list(APPEND\n                CPPCHECK_FAIL_REGULAR_EXPRESSION\n                ${CPPCHECK_WARN_REGULAR_EXPRESSION})\n            list(REMOVE_AT _input ${_fail_on_warn})\n        endif()\n\n        set(_files)\n        foreach(_source ${_input})\n            get_source_file_property(_cppcheck_loc \"${_source}\" LOCATION)\n            if(_cppcheck_loc)\n                # This file has a source file property, carry on.\n                get_source_file_property(_cppcheck_lang \"${_source}\" LANGUAGE)\n                if(\"${_cppcheck_lang}\" MATCHES \"CXX\")\n                    list(APPEND _files \"${_cppcheck_loc}\")\n                endif()\n            else()\n                # This file doesn't have source file properties - figure it out.\n                get_filename_component(_cppcheck_loc \"${_source}\" ABSOLUTE)\n                if(EXISTS \"${_cppcheck_loc}\")\n                    list(APPEND _files \"${_cppcheck_loc}\")\n                else()\n                    message(FATAL_ERROR\n                        \"Adding CPPCHECK for file target ${_targetname}: \"\n                        \"File ${_source} does not exist or needs a corrected path location \"\n                        \"since we think its absolute path is ${_cppcheck_loc}\")\n                endif()\n            endif()\n        endforeach()\n\n        if(\"1.${CMAKE_VERSION}\" VERSION_LESS \"1.2.8.0\")\n            # Older than CMake 2.8.0\n            add_test(${_targetname}_cppcheck_test\n                \"${CPPCHECK_EXECUTABLE}\"\n                ${CPPCHECK_TEMPLATE_ARG}\n                ${_cppcheck_args}\n                ${_files})\n        else()\n            # CMake 2.8.0 and newer\n            add_test(NAME\n                ${_targetname}_cppcheck_test\n                COMMAND\n                \"${CPPCHECK_EXECUTABLE}\"\n                ${CPPCHECK_TEMPLATE_ARG}\n                ${_cppcheck_args}\n                ${_files})\n        endif()\n\n        set_tests_properties(${_targetname}_cppcheck_test\n            PROPERTIES\n            FAIL_REGULAR_EXPRESSION\n            \"${CPPCHECK_FAIL_REGULAR_EXPRESSION}\")\n\n        add_custom_command(TARGET\n            all_cppcheck\n            PRE_BUILD\n            COMMAND\n            ${CPPCHECK_EXECUTABLE}\n            ${CPPCHECK_QUIET_ARG}\n            ${CPPCHECK_TEMPLATE_ARG}\n            ${_cppcheck_args}\n            ${_files}\n            WORKING_DIRECTORY\n            \"${CMAKE_CURRENT_SOURCE_DIR}\"\n            COMMENT\n            \"${_targetname}_cppcheck: Running cppcheck on target ${_targetname}...\"\n            VERBATIM)\n    endif()\nendfunction()\n\nfunction(add_cppcheck _name)\n    if(NOT TARGET ${_name})\n        message(FATAL_ERROR\n            \"add_cppcheck given a target name that does not exist: '${_name}' !\")\n    endif()\n    if(CPPCHECK_FOUND)\n        set(_cppcheck_args)\n\n        list(FIND ARGN UNUSED_FUNCTIONS _unused_func)\n        if(\"${_unused_func}\" GREATER \"-1\")\n            list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG})\n        endif()\n\n        list(FIND ARGN STYLE _style)\n        if(\"${_style}\" GREATER \"-1\")\n            list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG})\n        endif()\n\n        list(FIND ARGN POSSIBLE_ERROR _poss_err)\n        if(\"${_poss_err}\" GREATER \"-1\")\n            list(APPEND _cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG})\n        endif()\n\n        list(FIND _input FAIL_ON_WARNINGS _fail_on_warn)\n        if(\"${_fail_on_warn}\" GREATER \"-1\")\n            list(APPEND\n                CPPCHECK_FAIL_REGULAR_EXPRESSION\n                ${CPPCHECK_WARN_REGULAR_EXPRESSION})\n            list(REMOVE_AT _input ${_unused_func})\n        endif()\n\n        get_target_property(_cppcheck_sources \"${_name}\" SOURCES)\n        set(_files)\n        foreach(_source ${_cppcheck_sources})\n            get_source_file_property(_cppcheck_lang \"${_source}\" LANGUAGE)\n            get_source_file_property(_cppcheck_loc \"${_source}\" LOCATION)\n            if(\"${_cppcheck_lang}\" MATCHES \"CXX\")\n                list(APPEND _files \"${_cppcheck_loc}\")\n            endif()\n        endforeach()\n\n        if(\"1.${CMAKE_VERSION}\" VERSION_LESS \"1.2.8.0\")\n            # Older than CMake 2.8.0\n            add_test(${_name}_cppcheck_test\n                \"${CPPCHECK_EXECUTABLE}\"\n                ${CPPCHECK_TEMPLATE_ARG}\n                ${_cppcheck_args}\n                ${_files})\n        else()\n            # CMake 2.8.0 and newer\n            add_test(NAME\n                ${_name}_cppcheck_test\n                COMMAND\n                \"${CPPCHECK_EXECUTABLE}\"\n                ${CPPCHECK_TEMPLATE_ARG}\n                ${_cppcheck_args}\n                ${_files})\n        endif()\n\n        set_tests_properties(${_name}_cppcheck_test\n            PROPERTIES\n            FAIL_REGULAR_EXPRESSION\n            \"${CPPCHECK_FAIL_REGULAR_EXPRESSION}\")\n\n        add_custom_command(TARGET\n            all_cppcheck\n            PRE_BUILD\n            COMMAND\n            ${CPPCHECK_EXECUTABLE}\n            ${CPPCHECK_QUIET_ARG}\n            ${CPPCHECK_TEMPLATE_ARG}\n            ${_cppcheck_args}\n            ${_files}\n            WORKING_DIRECTORY\n            \"${CMAKE_CURRENT_SOURCE_DIR}\"\n            COMMENT\n            \"${_name}_cppcheck: Running cppcheck on target ${_name}...\"\n            VERBATIM)\n    endif()\n\nendfunction()\n"
  },
  {
    "path": "EnableProfiling.cmake",
    "content": "# - Add flags to compile with profiling support - currently only for GCC\n#\n#  enable_profiling(<targetname>)\n#  globally_enable_profiling() - to modify CMAKE_CXX_FLAGS, etc\n#    to change for all targets declared after the command, instead of per-command\n#\n#\n# Original Author:\n# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nif(__enable_profiling)\n    return()\nendif()\nset(__enable_profiling YES)\n\nmacro(_enable_profiling_flags)\n    set(_flags)\n    if(MSVC)\n        # TODO: what kind of flags are needed to profile on MSVC?\n        #set(_flags /W4)\n    elseif(CMAKE_COMPILER_IS_GNUCXX)\n        set(_flags \"-p\")\n    endif()\nendmacro()\n\nfunction(enable_profiling _target)\n    _enable_profiling_flags()\n    get_target_property(_origflags ${_target} COMPILE_FLAGS)\n    if(_origflags)\n        set_property(TARGET\n            ${_target}\n            PROPERTY\n            COMPILE_FLAGS\n            \"${_flags} ${_origflags}\")\n    else()\n        set_property(TARGET\n            ${_target}\n            PROPERTY\n            COMPILE_FLAGS\n            \"${_flags}\")\n    endif()\n\nendfunction()\n\nfunction(globally_enable_profiling)\n    _enable_profiling_flags()\n    set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} ${_flags}\" PARENT_SCOPE)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${_flags}\" PARENT_SCOPE)\nendfunction()\n"
  },
  {
    "path": "FindCVODE.cmake",
    "content": "# Tries to find Sundials CVODE.\n#\n# This module will define the following variables:\n#  CVODE_INCLUDE_DIRS - Location of the CVODE includes\n#  CVODE_FOUND - true if CVODE was found on the system\n#  CVODE_LIBRARIES - Required libraries for all requested components\n#\n# This module accepts the following environment or CMake vars\n#  CVODE_ROOT - Install location to search for\n\ninclude(FindPackageHandleStandardArgs)\n\nif(NOT \"$ENV{CVODE_ROOT}\" STREQUAL \"\" OR NOT \"${CVODE_ROOT}\" STREQUAL \"\")\n    list(APPEND CMAKE_INCLUDE_PATH \"$ENV{CVODE_ROOT}\" \"${CVODE_ROOT}\")\n    list(APPEND CMAKE_LIBRARY_PATH \"$ENV{CVODE_ROOT}\" \"${CVODE_ROOT}\")\nendif()\n\nfind_path(CVODE_INCLUDE_DIRS sundials/sundials_types.h\n    ENV CVODE_ROOT\n    PATH_SUFFIXES include\n)\n\nfind_library(CVODE_LIBRARY\n    NAMES sundials_cvode\n    ENV CVODE_ROOT\n    PATH_SUFFIXES lib Lib\n)\n\nfind_library(CVODE_NVECSERIAL\n    NAMES sundials_nvecserial\n    ENV CVODE_ROOT\n    PATH_SUFFIXES lib Lib\n)\n\nfind_library(CVODE_KLU klu)\n\nfind_package_handle_standard_args(CVODE DEFAULT_MSG\n    CVODE_LIBRARY\n    CVODE_NVECSERIAL\n    CVODE_INCLUDE_DIRS\n)\n\nif(CVODE_FOUND)\n    set(CVODE_LIBRARIES ${CVODE_LIBRARY} ${CVODE_NVECSERIAL} CACHE INTERNAL \"\")\n    if(CVODE_KLU)\n        set(CVODE_LIBRARIES ${CVODE_LIBRARIES} ${CVODE_KLU} CACHE INTERNAL \"\")\n    endif()\nendif()\n\nmark_as_advanced(CVODE_INCLUDE_DIRS CVODE_LIBRARY CVODE_NVECSERIAL)\n"
  },
  {
    "path": "FindFFTW.cmake",
    "content": "# - Find FFTW\n# Find the native FFTW includes and library\n#\n#  FFTW_INCLUDES    - where to find fftw3.h\n#  FFTW_LIBRARIES   - List of libraries when using FFTW.\n#  FFTW_FOUND       - True if FFTW found.\n\nif (FFTW_INCLUDES)\n  # Already in cache, be silent\n  set (FFTW_FIND_QUIETLY TRUE)\nendif (FFTW_INCLUDES)\n\nfind_path (FFTW_INCLUDES fftw3.h)\n\nfind_library (FFTW_LIBRARIES NAMES fftw3)\n\n# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if\n# all listed variables are TRUE\ninclude (FindPackageHandleStandardArgs)\nfind_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)\n\nmark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES)\n"
  },
  {
    "path": "FindGDB.cmake",
    "content": "# - Try to find GDB\n#\n# Once done, this will define:\n#  GDB_FOUND - system has GDB\n#  GDB_COMMAND - the command to run\n#  GDB_VERSION - version\n#  GDB_HAS_RETURN_CHILD_RESULT - if the --return-child-result flag is supported\n#\n# Useful configuration variables you might want to add to your cache:\n#  GDB_ROOT_DIR - A directory prefix to search\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\n\nset(GDB_ROOT_DIR\n    \"${GDB_ROOT_DIR}\"\n    CACHE\n    PATH\n    \"Directory to start our search in\")\n\nfind_program(GDB_COMMAND\n    NAMES\n    gdb\n    HINTS\n    \"${GDB_ROOT_DIR}\"\n    PATH_SUFFIXES\n    bin\n    libexec)\n\nif(GDB_COMMAND)\n    execute_process(COMMAND gdb --version\n        COMMAND head -n 1\n        OUTPUT_VARIABLE GDB_VERSION\n        OUTPUT_STRIP_TRAILING_WHITESPACE)\n    string(REGEX REPLACE \"[^0-9]*([0-9]+[0-9.]*).*\" \"\\\\1\" GDB_VERSION \"${GDB_VERSION}\")\nendif()\n\n# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if\n# all listed variables are TRUE\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(GDB DEFAULT_MSG GDB_COMMAND GDB_VERSION)\n\nif(GDB_FOUND)\n    mark_as_advanced(GDB_ROOT_DIR)\n    if(GDB_VERSION VERSION_LESS 6.4)\n        set(GDB_HAS_RETURN_CHILD_RESULT FALSE)\n    else()\n        set(GDB_HAS_RETURN_CHILD_RESULT TRUE)\n    endif()\nendif()\n\nmark_as_advanced(GDB_COMMAND)\n"
  },
  {
    "path": "FindGSL.cmake",
    "content": "# - Find GSL\n# Find the native GSL includes and library\n#\n#  GSL_INCLUDES    - where to find gsl/gsl_*.h, etc.\n#  GSL_LIBRARIES   - List of libraries when using GSL.\n#  GSL_FOUND       - True if GSL found.\n\n\nif (GSL_INCLUDES)\n  # Already in cache, be silent\n  set (GSL_FIND_QUIETLY TRUE)\nendif (GSL_INCLUDES)\n\nfind_path (GSL_INCLUDES gsl/gsl_math.h)\n\nfind_library (GSL_LIB NAMES gsl)\n\nset (GSL_CBLAS_LIB \"\" CACHE FILEPATH \"If your program fails to link\n(usually because GSL is not automatically linking a CBLAS and no other\ncomponent of your project provides a CBLAS) then you may need to point\nthis variable to a valid CBLAS.  Usually GSL is distributed with\nlibgslcblas.{a,so} (next to GSL_LIB) which you may use if an optimized\nCBLAS is unavailable.\")\n\nset (GSL_LIBRARIES \"${GSL_LIB}\" \"${GSL_CBLAS_LIB}\")\n\n# handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE if\n# all listed variables are TRUE\ninclude (FindPackageHandleStandardArgs)\nfind_package_handle_standard_args (GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDES)\n\nmark_as_advanced (GSL_LIB GSL_CBLAS_LIB GSL_INCLUDES)\n"
  },
  {
    "path": "FindGitHub.cmake",
    "content": "# - Find GitHub for Windows\n#\n#   GITHUB_FOUND    - Was GitHub for Windows found\n#   GITHUB_BIN_DIR  - Path to the bin-directory where useful bash tools can be found\n#\n# Example usage:\n#   find_package(GitHub)\n#   find_program(BASH_TOOL_PATH bash HINTS ${GITHUB_BIN_DIR} DOC \"The bash executable\")\n\nif(WIN32 AND NOT GITHUB_FOUND)\n\n    # Check install Path\n    find_path(\n        GITHUB_DIR\n        shell.ps1\n        PATHS $ENV{LOCALAPPDATA}/GitHub $ENV{GitHub_DIR}\n        NO_DEFAULT_PATH\n    )\n\n    if(GITHUB_DIR)\n\n        execute_process (\n            COMMAND cmd /c \"cd ${GITHUB_DIR}/PortableGit*/bin & cd\"\n            OUTPUT_VARIABLE PORTABLE_GIT_WIN_DIR\n        )\n\n        if(PORTABLE_GIT_WIN_DIR)\n            string(STRIP ${PORTABLE_GIT_WIN_DIR} PORTABLE_GIT_WIN_DIR)\n            file(TO_CMAKE_PATH ${PORTABLE_GIT_WIN_DIR} PORTABLE_GIT_WIN_DIR)\n            set(GITHUB_FOUND ON CACHE BOOL \"Was GitHub for Windows found?\")\n            set(GITHUB_BIN_DIR ${PORTABLE_GIT_WIN_DIR} CACHE PATH \"The path to the GitHub for Windows binaries.\" FORCE)\n            message(STATUS \"GitHub for Windows found.\")\n        endif()\n\n    endif()\nendif()\n"
  },
  {
    "path": "FindITAPS.cmake",
    "content": "# - Try to find ITAPS\n#\n# This will define\n#\n#  ITAPS_FOUND          - Requested components were found\n#  ITAPS_INCLUDES       - Includes for all available components\n#  ITAPS_LIBRARIES      - Libraries for all available components\n#\n#  ITAPS_MESH_FOUND     - System has iMesh\n#  ITAPS_MESH_INCLUDES  - The iMesh include directory\n#  ITAPS_MESH_LIBRARIES - Link these to use iMesh\n#\n#  ITAPS_GEOM_FOUND     - System has iGeom\n#  ITAPS_GEOM_INCLUDES  - The iGeom include directory\n#  ITAPS_GEOM_LIBRARIES - Link these to use iGeom\n#\n#  ITAPS_REL_FOUND      - System has iRel\n#  ITAPS_REL_INCLUDES   - The iRel include directory\n#  ITAPS_REL_LIBRARIES  - Link these to use iRel\n#\n# Setting this changes the behavior of the search\n#  ITAPS_MESH_DEFS_FILE - path to iMesh-Defs.inc\n#  ITAPS_GEOM_DEFS_FILE - path to iGeom-Defs.inc\n#  ITAPS_REL_DEFS_FILE  - path to iRel-Defs.inc\n#\n# If any of these variables are in your environment, they will be used as hints\n#  IMESH_DIR - directory in which iMesh resides\n#  IGEOM_DIR - directory in which iGeom resides\n#  IREL_DIR  - directory in which iRel resides\n#\n# Redistribution and use is allowed according to the terms of the BSD license.\n# For details see the accompanying COPYING-CMAKE-SCRIPTS file.\n#\n\ninclude (FindPackageMultipass)\ninclude (ResolveCompilerPaths)\ninclude (CheckCSourceRuns)\ninclude (FindPackageHandleStandardArgs)\n\nfind_program (MAKE_EXECUTABLE NAMES make gmake)\n\nmacro (ITAPS_PREPARE_COMPONENT component name)\n  find_file (ITAPS_${component}_DEFS_FILE ${name}-Defs.inc\n    HINTS ENV I${component}_DIR\n    PATH_SUFFIXES lib64 lib)\n  # If ITAPS_XXX_DEFS_FILE has changed, the library will be found again\n  find_package_multipass (ITAPS_${component} itaps_${component}_config_current\n    STATES DEFS_FILE\n    DEPENDENTS INCLUDES LIBRARIES EXECUTABLE_RUNS)\nendmacro ()\n\nmacro (ITAPS_GET_VARIABLE makefile name var)\n  set (${var} \"NOTFOUND\" CACHE INTERNAL \"Cleared\" FORCE)\n  execute_process (COMMAND ${MAKE_EXECUTABLE} -f ${${makefile}} show VARIABLE=${name}\n    OUTPUT_VARIABLE ${var}\n    RESULT_VARIABLE itaps_return)\nendmacro (ITAPS_GET_VARIABLE)\n\nmacro (ITAPS_TEST_RUNS component name includes libraries program runs)\n  # message (STATUS \"Starting run test: ${includes} ${libraries} ${runs}\")\n  multipass_c_source_runs (\"${includes}\" \"${libraries}\" \"${program}\" ${runs})\n  if (NOT ITAPS_${component}_EXECUTABLE_RUNS)\n    set (ITAPS_${component}_EXECUTABLE_RUNS \"${${runs}}\" CACHE BOOL\n      \"Can the system successfully run an ${name} executable?  This variable can be manually set to \\\"YES\\\" to force CMake to accept a given configuration, but this will almost always result in a broken build.\" FORCE)\n  endif ()\nendmacro (ITAPS_TEST_RUNS)\n\nmacro (ITAPS_REQUIRED_LIBS component name includes libraries_all program libraries_required)\n  # message (STATUS \"trying program: ${program}\")\n  resolve_libraries (_all_libraries \"${libraries_all}\")\n  list (GET _all_libraries 0 _first_library)\n  itaps_test_runs (${component} ${name} \"${includes}\" \"${_first_library};${itaps_rel_libs}\" \"${program}\" ${name}_works_minimal)\n  if (${name}_works_minimal)\n    set (${libraries_required} \"${_first_library}\")\n    message (STATUS \"${name} executable works when only linking to the interface lib, this probably means you have shared libs.\")\n  else ()\n    itaps_test_runs (${component} ${name} \"${includes}\" \"${_all_libraries};${itaps_rel_libs}\" \"${itaps_mesh_program}\" ${name}_works_extra)\n    if (${name}_works_extra)\n      set (${libraries_required} \"${_all_libraries}\")\n      message (STATUS \"${name} executable requires linking to extra libs, this probably means it's statically linked.\")\n    else ()\n      message (STATUS \"${name} could not be used, maybe the install is broken.\")\n    endif ()\n  endif ()\nendmacro ()\n\nmacro (ITAPS_HANDLE_COMPONENT component name program)\n  itaps_prepare_component (\"${component}\" \"${name}\")\n  if (ITAPS_${component}_DEFS_FILE AND NOT itaps_${component}_config_current)\n    # A temporary makefile to probe this ITAPS components's configuration\n    set (itaps_config_makefile \"${PROJECT_BINARY_DIR}/Makefile.${name}\")\n    file (WRITE ${itaps_config_makefile}\n      \"## This file was autogenerated by FindITAPS.cmake\ninclude ${ITAPS_${component}_DEFS_FILE}\nshow :\n\\t-@echo -n \\${\\${VARIABLE}}\")\n    itaps_get_variable (itaps_config_makefile I${component}_INCLUDEDIR   itaps_includedir)\n    itaps_get_variable (itaps_config_makefile I${component}_LIBS         itaps_libs)\n    file (REMOVE ${itaps_config_makefile})\n    find_path (itaps_include_tmp ${name}.h HINTS ${itaps_includedir} NO_DEFAULT_PATH)\n    set (ITAPS_${component}_INCLUDES \"${itaps_include_tmp}\" CACHE STRING \"Include directories for ${name}\")\n    set (itaps_include_tmp \"NOTFOUND\" CACHE INTERNAL \"Cleared\" FORCE)\n    itaps_required_libs (\"${component}\" \"${name}\" \"${ITAPS_${component}_INCLUDES}\" \"${itaps_libs}\" \"${program}\" itaps_${component}_required_libraries)\n    set (ITAPS_${component}_LIBRARIES \"${itaps_${component}_required_libraries}\" CACHE STRING \"Libraries for ${name}\")\n    mark_as_advanced (ITAPS_${component}_EXECUTABLE_RUNS ITAPS_${component}_LIBRARIES)\n  endif()\n  set (ITAPS_${component}_FOUND \"${ITAPS_${component}_EXECUTABLE_RUNS}\")\nendmacro()\n\nitaps_handle_component (MESH iMesh \"\n/* iMesh test program */\n#include <iMesh.h>\n#define CHK(err) if (err) return 1\nint main(int argc,char *argv[]) {\n  int err;\n  iMesh_Instance m;\n  iMesh_newMesh(\\\"\\\",&m,&err,0);CHK(err);\n  iMesh_dtor(m,&err);CHK(err);\n  return 0;\n}\n\")\nfind_path (imesh_include_tmp iMeshP.h HINTS ${ITAPS_MESH_INCLUDES} NO_DEFAULT_PATH)\nif (imesh_include_tmp)\n  set (ITAPS_MESH_HAS_PARALLEL \"YES\")\nelse ()\n  set (ITAPS_MESH_HAS_PARALLEL \"NO\")\nendif ()\nset (imesh_include_tmp \"NOTFOUND\" CACHE INTERNAL \"Cleared\" FORCE)\n\nset (itaps_rel_libs)       # Extra libraries which should only be set when linking with iRel\n\nitaps_handle_component (GEOM iGeom \"\n/* iGeom test program */\n#include <iGeom.h>\n#define CHK(err) if (err) return 1\nint main() {\n  int ierr;\n  iGeom_Instance g;\n  iGeom_newGeom(\\\"\\\",&g,&ierr,0);CHK(ierr);\n  iGeom_dtor(g,&ierr);CHK(ierr);\n  return 0;\n}\n\")\n\nif (ITAPS_MESH_FOUND AND ITAPS_GEOM_FOUND) # iRel only makes sense if iMesh and iGeom are found\n  set (itaps_rel_libs \"${ITAPS_MESH_LIBRARIES}\" \"${ITAPS_GEOM_LIBRARIES}\")\n  itaps_handle_component (REL iRel \"\n/* iRel test program */\n#include <iRel.h>\n#define CHK(err) if (err) return 1\nint main() {\n  int ierr;\n  iRel_Instance rel;\n  iRel_create(\\\"\\\",&rel,&ierr,0);CHK(ierr);\n  iRel_destroy(rel,&ierr);CHK(ierr);\n  return 0;\n}\n\")\nendif ()\n\nset (ITAPS_INCLUDES)\nset (ITAPS_LIBRARIES)\nforeach (component REL GEOM MESH)\n  if (ITAPS_${component}_INCLUDES)\n    list (APPEND ITAPS_INCLUDES \"${ITAPS_${component}_INCLUDES}\")\n  endif ()\n  if (ITAPS_${component}_LIBRARIES)\n    list (APPEND ITAPS_LIBRARIES \"${ITAPS_${component}_LIBRARIES}\")\n  endif ()\n  message (STATUS \"ITAPS_${component}: ${ITAPS_${component}_INCLUDES} ${ITAPS_${component}_LIBRARIES}\")\nendforeach()\nlist (REMOVE_DUPLICATES ITAPS_INCLUDES)\nlist (REMOVE_DUPLICATES ITAPS_LIBRARIES)\n\nset (ITAPS_FOUND_REQUIRED_COMPONENTS YES)\nif (ITAPS_FIND_REQUIRED)\n  foreach (component ${ITAPS_FIND_COMPONENTS})\n    if (NOT ITAPS_${component}_FOUND)\n      set (ITAPS_FOUND_REQUIRED_COMPONENTS NOTFOUND)\n    endif()\n  endforeach()\nendif()\n\nmessage (STATUS \"ITAPS: ${ITAPS_INCLUDES}  ${ITAPS_LIBRARIES}\")\n\nfind_package_handle_standard_args (ITAPS \"ITAPS not found, check environment variables I{MESH,GEOM,REL}_DIR\"\n  ITAPS_INCLUDES ITAPS_LIBRARIES ITAPS_FOUND_REQUIRED_COMPONENTS)\n"
  },
  {
    "path": "FindLAPACKLibs.cmake",
    "content": "# - Try to find LAPACK and BLAS libraries\n# Once done, this will define\n#  LAPACKLIBS_LIBRARIES, all libraries to link against\n#  LAPACKLIBS_FOUND, If false, do not try to use LAPACK library features.\n#\n# Users may wish to set:\n#  LAPACKLIBS_ROOT_DIR, location to start searching for LAPACK libraries\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nset(_check)\n\nset(LAPACKLIBS_ROOT_DIR\n\t\"${LAPACKLIBS_ROOT_DIR}\"\n\tCACHE\n\tPATH\n\t\"Directory to search for LAPACK libraries\")\n\nif(APPLE)\n\tfind_library(LAPACKLIBS_VECLIB_FRAMEWORK veclib)\n\tfind_library(LAPACKLIBS_ACCELERATE_FRAMEWORK accelerate)\n\tmark_as_advanced(LAPACKLIBS_VECLIB_FRAMEWORK\n\t\tLAPACKLIBS_ACCELERATE_FRAMEWORK)\n\n\tset(LAPACKLIBS_LIBRARIES\n\t\t\"${LAPACKLIBS_VECLIB_FRAMEWORK}\"\n\t\t\"${LAPACKLIBS_ACCELERATE_FRAMEWORK}\")\n\tlist(APPEND\n\t\t_check\n\t\tLAPACKLIBS_VECLIB_FRAMEWORK\n\t\tLAPACKLIBS_ACCELERATE_FRAMEWORK)\nelseif(WIN32)\n\t# Tested to work with the files from http://www.fi.muni.cz/~xsvobod2/misc/lapack/\n\t# You might also see http://icl.cs.utk.edu/lapack-for-windows/clapack/index.html for\n\t# the libraries and headers.\n\n\t# Good luck!\n\n\tfind_library(LAPACKLIBS_LAPACK_LIBRARY\n\t\tNAMES\n\t\tlapack_win32_MT\n\t\tlapack\n\t\tlapackd\n\t\tHINTS\n\t\t${LAPACKLIBS_ROOT_DIR}\n\t\tPATH_SUFFIXES\n\t\tlapack-MT-release\n\t\tlapack-MT-debug\n\t\tlib)\n\tfind_library(LAPACKLIBS_BLAS_LIBRARY\n\t\tNAMES\n\t\tblas_win32_MT\n\t\tblas\n\t\tblasd\n\t\tHINTS\n\t\t${LAPACKLIBS_ROOT_DIR}\n\t\tPATH_SUFFIXES\n\t\tlapack-MT-release\n\t\tlapack-MT-debug\n\t\tlib)\n\tset(LAPACKLIBS_LIBRARIES\n\t\t\"${LAPACKLIBS_LAPACK_LIBRARY}\"\n\t\t\"${LAPACKLIBS_BLAS_LIBRARY}\")\n\tlist(APPEND _check LAPACKLIBS_LAPACK_LIBRARY LAPACKLIBS_BLAS_LIBRARY)\nelseif(UNIX)\n\t# All other Linux/Unix should have lapack without a fuss\n\tlist(APPEND _check LAPACKLIBS_LAPACK_LIBRARY)\n\tfind_library(LAPACKLIBS_LAPACK_LIBRARY lapack)\n\tset(LAPACKLIBS_LIBRARIES \"${LAPACKLIBS_LAPACK_LIBRARY}\")\nendif()\n\n# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if\n# all listed variables are TRUE\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(LAPACKLibs\n\tDEFAULT_MSG\n\t${_check})\n\nif(LAPACKLIBS_FOUND)\n\tmark_as_advanced(LAPACKLIBS_ROOT_DIR\n\t\tLAPACKLIBS_LAPACK_LIBRARY\n\t\tLAPACKLIBS_BLAS_LIBRARY)\nendif()\n"
  },
  {
    "path": "FindLIS.cmake",
    "content": "# - Try to find LIS\n# Once done, this will define\n#\n#  LIS_FOUND\n#  LIS_INCLUDE_DIRS\n#  LIS_LIBRARIES\n#\n#  Environment variable LIS_ROOT_DIR can be set to give hints\n\nfind_path( LIS_INCLUDE_DIR lis.h\n    PATHS ENV LIS_ROOT_DIR\n    PATH_SUFFIXES include\n)\n\nfind_library(LIS_LIBRARY lis\n    PATHS ENV LIS_ROOT_DIR\n    PATH_SUFFIXES lib\n)\n\nset(LIS_LIBRARIES ${LIS_LIBRARY})\n\ninclude(FindPackageHandleStandardArgs)\nFIND_PACKAGE_HANDLE_STANDARD_ARGS(LIS DEFAULT_MSG LIS_LIBRARY LIS_INCLUDE_DIR)\n\n"
  },
  {
    "path": "FindMKL.cmake",
    "content": "# Find Intel Math Karnel Library (MKL)\n#\n# Options\n# - MKL_DIR      MKL root directory\n# - MKL_OPENMP   use OpenMP threading\n#\n# Results\n# - MKL_INCLUDE_DIR\n# - MKL_LIBRARIES\n#\n# Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)\n# Distributed under a Modified BSD License.\n# See accompanying file LICENSE.txt or\n# http://www.opengeosys.org/project/license\n\n# Lookg for MKL root dir\nif (NOT MKL_DIR)\n    find_path(MKL_DIR\n        include/mkl.h\n        PATHS\n        $ENV{MKL_DIR}\n        /opt/intel/mkl/\n        )\nendif()\nif(MKL_DIR)\n    message(STATUS \"MKL_DIR : ${MKL_DIR}\")\nendif()\n\n# Find MKL include dir\nfind_path(MKL_INCLUDE_DIR NAMES mkl.h\n    PATHS\n        ${MKL_DIR}/include\n    PATH_SUFFIXES\n        mkl\n)\n\n# Set the directory path storing MKL libraries\nif (NOT MKL_LIB_DIR)\n    if(APPLE)\n        set(MKL_LIB_DIR ${MKL_DIR}/lib)\n    else()\n        if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL \"x86_64\")\n            set(MKL_LIB_DIR ${MKL_DIR}/lib/intel64)\n        else()\n            set(MKL_LIB_DIR ${MKL_DIR}/lib/ia32)\n        endif()\n    endif()\nendif()\n\n# Find MKL libs\nfind_library(MKL_LIB_CORE mkl_core PATHS ${MKL_LIB_DIR})\n\nif (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL \"x86_64\")\n    set(MKL_INTEL_LIB_NAME mkl_intel_lp64)\nelse()\n    set(MKL_INTEL_LIB_NAME mkl_intel)\nendif()\n\nfind_library(MKL_LIB_INTEL ${MKL_INTEL_LIB_NAME} PATHS ${MKL_LIB_DIR})\n\nif(OPENMP_FOUND)\n    set(MKL_THREAD_LIB_NAME \"mkl_gnu_thread\")\nelse()\n    set(MKL_THREAD_LIB_NAME \"mkl_sequential\")\nendif()\nfind_library(MKL_LIB_THREAD ${MKL_THREAD_LIB_NAME} PATHS ${MKL_LIB_DIR})\n\n\nset(MKL_LIBRARIES \"${MKL_LIB_INTEL}\" \"${MKL_LIB_THREAD}\" \"${MKL_LIB_CORE}\")\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(MKL DEFAULT_MSG MKL_INCLUDE_DIR MKL_LIBRARIES)\nmark_as_advanced(MKL_INCLUDE_DIR MKL_LIBRARIES)\n"
  },
  {
    "path": "FindMsysGit.cmake",
    "content": "# The module defines the following variables:\n#   MSYSGIT_BIN_DIR - path to the tool binaries\n#   MSYSGIT_FOUND - true if the command line client was found\n# Example usage:\n#   find_package(MsysGit)\n#   if(MSYSGIT_FOUND)\n#     message(\"msysGit tools found in: ${MSYSGIT_BIN_DIR}\")\n#   endif()\n\nif(GIT_EXECUTABLE)\n    execute_process(COMMAND ${GIT_EXECUTABLE} --version\n                                    OUTPUT_VARIABLE git_version\n                                    ERROR_QUIET\n                                    OUTPUT_STRIP_TRAILING_WHITESPACE)\n    if (git_version MATCHES \"^git version [0-9]\")\n        string(REPLACE \"git version \" \"\" GIT_VERSION_STRING \"${git_version}\")\n        if (git_version MATCHES \"msysgit\")\n            set(GIT_IS_MSYSGIT TRUE)\n        else()\n            set(GIT_IS_MSYSGIT FALSE)\n        endif()\n    endif()\n    unset(git_version)\nendif()\n\nif(GIT_IS_MSYSGIT)\n    get_filename_component(MSYS_DIR ${GIT_EXECUTABLE} PATH)\n    find_path(MSYSGIT_BIN_DIR\n    NAMES date.exe grep.exe unzip.exe git.exe PATHS ${MSYS_DIR}/../bin NO_DEFAULT_PATH)\nelse()\n    find_path(MSYSGIT_BIN_DIR\n    NAMES date.exe grep.exe unzip.exe git.exe PATH_SUFFIXES Git/bin)\nendif()\n\n# Handle the QUIETLY and REQUIRED arguments and set MSYSGIT_FOUND to TRUE if\n# all listed variables are TRUE\n\ninclude(FindPackageHandleStandardArgs)\nFIND_PACKAGE_HANDLE_STANDARD_ARGS(MsysGit\n                                                                    REQUIRED_VARS MSYSGIT_BIN_DIR)\n"
  },
  {
    "path": "FindNetCDF.cmake",
    "content": "# - Find NetCDF\n# Find the native NetCDF includes and library\n\n# TODO:\n#       - Check for system netcdf\n#       - Make CXX a component\n\n# C\nfind_path(NETCDF_INCLUDES_C NAMES netcdf.h\n    HINTS ${NETCDF_ROOT} PATH_SUFFIXES include)\nfind_library(NETCDF_LIBRARIES_C NAMES netcdf\n    HINTS ${NETCDF_ROOT} PATH_SUFFIXES lib)\n\n# CXX\nfind_path(NETCDF_INCLUDES_CXX NAMES netcdf\n    HINTS ${NETCDF_CXX_ROOT} PATH_SUFFIXES include)\nfind_library(NETCDF_LIBRARIES_CXX NAMES netcdf_c++4 netcdf-cxx4\n    HINTS ${NETCDF_CXX_ROOT} PATH_SUFFIXES lib)\n\ninclude (FindPackageHandleStandardArgs)\nfind_package_handle_standard_args (NetCDF DEFAULT_MSG\n    NETCDF_LIBRARIES_C\n    NETCDF_LIBRARIES_CXX\n    NETCDF_INCLUDES_C\n    NETCDF_INCLUDES_CXX\n)\n\n"
  },
  {
    "path": "FindOpenSG.cmake",
    "content": "# Copyright (c) 2012 - 2015, Lars Bilke\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification,\n# are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice, this\n#    list of conditions and the following disclaimer.\n#\n# 2. Redistributions in binary form must reproduce the above copyright notice,\n#    this list of conditions and the following disclaimer in the documentation\n#    and/or other materials provided with the distribution.\n#\n# 3. Neither the name of the copyright holder nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without\n#    specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n#\n#\n# - Find OpenSG 1.8 libraries\n# Find the specified OpenSG 1.8 libraries and header files. Slightly modified\n# from the version for 2.0, see # 1.8 - comments\n#\n# Since OpenSG consists of a number of libraries you need to specify which\n# of those you want to use. To do so, pass a list of their names after\n# the COMPONENTS argument to FIND_PACKAGE. A typical call looks like this:\n# FIND_PACKAGE(OpenSG REQUIRED COMPONENTS OSGBase OSGSystem OSGDrawable)\n#\n# This module specifies the following variables:\n#  OpenSG_INCLUDE_DIRS\n#  OpenSG_LIBRARIES\n#  OpenSG_LIBRARY_DIRS\n#\n#  For each component COMP the capitalized name (e.g. OSGBASE, OSGSYSTEM):\n#  OpenSG_${COMP}_LIBRARY\n#  OpenSG_${COMP}_LIBRARY_RELEASE\n#  OpenSG_${COMP}_LIBRARY_DEBUG\n#\n#  You can control where this module attempts to locate libraries and headers:\n#  you can use the following input variables:\n#  OPENSG_ROOT          root of an installed OpenSG with include/OpenSG and lib below it\n#  OPENSG_INCLUDE_DIR   header directory\n#  OPENSG_LIBRARY_DIR   library directory\n#  OR\n#  OPENSG_INCLUDE_SEARCH_DIR\n#  OPENSG_LIBRARY_SEARCH_DIR\n\n# This macro sets the include path and libraries to link to.\n# On Windows this also sets some preprocessor definitions and disables some warnings.\nMACRO(USE_OPENSG targetName)\n\tIF (MSVC)\n\t\tADD_DEFINITIONS(\n\t\t\t-DOSG_BUILD_DLL\n\t\t\t-DOSG_HAVE_CONFIGURED_H_\n\t\t\t-DOSG_WITH_GIF\n\t\t\t-DOSG_WITH_TIF\n\t\t\t-DOSG_WITH_JPG\n\t\t)\n\t\tSET(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /wd4231 /wd4275\")\n\tENDIF (MSVC)\n\tIF(OpenSG_OSGWINDOWGLUT_LIBRARY)\n\t\tADD_DEFINITIONS(-DOSG_WITH_GLUT)\n\tENDIF()\n\tTARGET_LINK_LIBRARIES( ${targetName} ${OpenSG_LIBRARIES} )\n\tINCLUDE_DIRECTORIES( ${OpenSG_INCLUDE_DIRS} )\nENDMACRO()\n\nSET(__OpenSG_IN_CACHE TRUE)\nIF(OpenSG_INCLUDE_DIR)\n    FOREACH(COMPONENT ${OpenSG_FIND_COMPONENTS})\n        STRING(TOUPPER ${COMPONENT} COMPONENT)\n        IF(NOT OpenSG_${COMPONENT}_FOUND)\n            SET(__OpenSG_IN_CACHE FALSE)\n        ENDIF(NOT OpenSG_${COMPONENT}_FOUND)\n    ENDFOREACH(COMPONENT)\nELSE(OpenSG_INCLUDE_DIR)\n    SET(__OpenSG_IN_CACHE FALSE)\nENDIF(OpenSG_INCLUDE_DIR)\n\n\n# The reason that we failed to find OpenSG. This will be set to a\n# user-friendly message when we fail to find some necessary piece of\n# OpenSG.\nset(OpenSG_ERROR_REASON)\n\n############################################\n#\n# Check the existence of the libraries.\n#\n############################################\n# This macro is directly taken from FindBoost.cmake that comes with the cmake\n# distribution. It is NOT my work, only minor modifications have been made to\n# remove references to boost.\n#########################################################################\n\nMACRO(__OpenSG_ADJUST_LIB_VARS basename)\n    IF(OpenSG_INCLUDE_DIR)\n        IF(OpenSG_${basename}_LIBRARY_DEBUG AND OpenSG_${basename}_LIBRARY_RELEASE)\n        # if the generator supports configuration types then set\n        # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value\n            IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)\n                SET(OpenSG_${basename}_LIBRARY optimized ${OpenSG_${basename}_LIBRARY_RELEASE} debug ${OpenSG_${basename}_LIBRARY_DEBUG})\n            ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)\n                # if there are no configuration types and CMAKE_BUILD_TYPE has no value\n                # then just use the release libraries\n                SET(OpenSG_${basename}_LIBRARY ${OpenSG_${basename}_LIBRARY_RELEASE} )\n            ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)\n\n            SET(OpenSG_${basename}_LIBRARIES optimized ${OpenSG_${basename}_LIBRARY_RELEASE} debug ${OpenSG_${basename}_LIBRARY_DEBUG})\n        ENDIF(OpenSG_${basename}_LIBRARY_DEBUG AND OpenSG_${basename}_LIBRARY_RELEASE)\n\n        # if only the release version was found, set the debug variable also to the release version\n        IF(OpenSG_${basename}_LIBRARY_RELEASE AND NOT OpenSG_${basename}_LIBRARY_DEBUG)\n            SET(OpenSG_${basename}_LIBRARY_DEBUG ${OpenSG_${basename}_LIBRARY_RELEASE})\n            SET(OpenSG_${basename}_LIBRARY       ${OpenSG_${basename}_LIBRARY_RELEASE})\n            SET(OpenSG_${basename}_LIBRARIES     ${OpenSG_${basename}_LIBRARY_RELEASE})\n        ENDIF(OpenSG_${basename}_LIBRARY_RELEASE AND NOT OpenSG_${basename}_LIBRARY_DEBUG)\n\n        # if only the debug version was found, set the release variable also to the debug version\n        IF(OpenSG_${basename}_LIBRARY_DEBUG AND NOT OpenSG_${basename}_LIBRARY_RELEASE)\n            SET(OpenSG_${basename}_LIBRARY_RELEASE ${OpenSG_${basename}_LIBRARY_DEBUG})\n            SET(OpenSG_${basename}_LIBRARY         ${OpenSG_${basename}_LIBRARY_DEBUG})\n            SET(OpenSG_${basename}_LIBRARIES       ${OpenSG_${basename}_LIBRARY_DEBUG})\n        ENDIF(OpenSG_${basename}_LIBRARY_DEBUG AND NOT OpenSG_${basename}_LIBRARY_RELEASE)\n\n        IF(OpenSG_${basename}_LIBRARY)\n            SET(OpenSG_${basename}_LIBRARY ${OpenSG_${basename}_LIBRARY} CACHE FILEPATH \"The OpenSG ${basename} library\")\n            GET_FILENAME_COMPONENT(OpenSG_LIBRARY_DIRS \"${OpenSG_${basename}_LIBRARY}\" PATH)\n            SET(OpenSG_LIBRARY_DIRS ${OpenSG_LIBRARY_DIRS} CACHE FILEPATH \"OpenSG library directory\")\n            SET(OpenSG_${basename}_FOUND ON CACHE INTERNAL \"Whether the OpenSG ${basename} library found\")\n        ENDIF(OpenSG_${basename}_LIBRARY)\n\n    ENDIF(OpenSG_INCLUDE_DIR)\n\n    # Make variables changeble to the advanced user\n    MARK_AS_ADVANCED(\n        OpenSG_${basename}_LIBRARY\n        OpenSG_${basename}_LIBRARY_RELEASE\n        OpenSG_${basename}_LIBRARY_DEBUG\n    )\nENDMACRO(__OpenSG_ADJUST_LIB_VARS)\n\n#-------------------------------------------------------------------------------\n\n\nIF(__OpenSG_IN_CACHE)\n    # values are already in the cache\n\n    SET(OpenSG_FOUND TRUE)\n    FOREACH(COMPONENT ${OpenSG_FIND_COMPONENTS})\n        STRING(TOUPPER ${COMPONENT} COMPONENT)\n        __OpenSG_ADJUST_LIB_VARS(${COMPONENT})\n        SET(OpenSG_LIBRARIES ${OpenSG_LIBRARIES} ${OpenSG_${COMPONENT}_LIBRARY})\n    ENDFOREACH(COMPONENT)\n\n    SET(OpenSG_INCLUDE_DIRS \"${OpenSG_INCLUDE_DIR}\" \"${OpenSG_INCLUDE_DIR}/OpenSG\")\n\nELSE(__OpenSG_IN_CACHE)\n    # need to search for libs\n\n\t# Visual Studio x32\n\tif (VS32)\n\t  # Visual Studio x32\n\t  SET( __OpenSG_INCLUDE_SEARCH_DIRS\n\t    $ENV{OPENSG_ROOT}/include\n\t    ${OPENSG_ROOT}/include\n\t    ${LIBRARIES_DIR}/opensg/include\n\t    ${CMAKE_SOURCE_DIR}/../OpenSG/include )\n\t  SET( __OpenSG_LIBRARIES_SEARCH_DIRS\n\t    $ENV{OPENSG_ROOT}/lib\n\t    ${OPENSG_ROOT}/lib\n\t    ${LIBRARIES_DIR}/opensg/lib\n\t    ${CMAKE_SOURCE_DIR}/../opensg/lib )\n\telse (VS32)\n\t  if (VS64)\n\t    # Visual Studio x64\n\t\tSET( __OpenSG_INCLUDE_SEARCH_DIRS\n\t\t$ENV{OPENSG_ROOT}/include\n\t\t${OPENSG_ROOT}/include\n\t      ${LIBRARIES_DIR}/opensg_x64/include\n\t      ${CMAKE_SOURCE_DIR}/../opensg_x64/include )\n\t\tSET( __OpenSG_LIBRARIES_SEARCH_DIRS\n\t\t$ENV{OPENSG_ROOT}/lib\n\t\t${OPENSG_ROOT}/lib\n\t      ${LIBRARIES_DIR}/opensg_x64/lib\n\t      ${CMAKE_SOURCE_DIR}/../opensg_x64/lib )\n\t  else (VS64)\n\t    # Linux or Mac\n\t\tSET( __OpenSG_INCLUDE_SEARCH_DIRS\n          \"/usr/local\"\n\t      \"/usr/local/include\" )\n\t\tSET( __OpenSG_LIBRARIES_SEARCH_DIRS\n\t      \"/usr/local\"\n\t      \"/usr/local/lib\" )\n\t  endif(VS64)\n\tendif (VS32)\n\n\n    # handle input variable OPENSG_INCLUDE_DIR\n    IF(OPENSG_INCLUDE_DIR)\n        FILE(TO_CMAKE_PATH ${OPENSG_INCLUDE_DIR} OPENSG_INCLUDE_DIR)\n        SET(__OpenSG_INCLUDE_SEARCH_DIRS\n            ${OPENSG_INCLUDE_DIR} ${__OpenSG_INCLUDE_SEARCH_DIRS})\n    ENDIF(OPENSG_INCLUDE_DIR)\n\n    # handle input variable OPENSG_LIBRARY_DIR\n    IF(OPENSG_LIBRARY_DIR)\n        FILE(TO_CMAKE_PATH ${OPENSG_LIBRARY_DIR} OPENSG_LIBRARY_DIR)\n        SET(__OpenSG_LIBRARIES_SEARCH_DIRS\n            ${OPENSG_LIBRARY_DIR} ${__OpenSG_LIBRARIES_SEARCH_DIRS})\n    ENDIF(OPENSG_LIBRARY_DIR)\n\n    # handle input variable OPENSG_INCLUDE_SEARCH_DIR\n    IF(OPENSG_INCLUDE_SEARCH_DIR)\n        FILE(TO_CMAKE_PATH ${OPENSG_INCLUDE_SEARCH_DIR} OPENSG_INCLUDE_SEARCH_DIR)\n        SET(__OpenSG_INCLUDE_SEARCH_DIRS\n            ${OPENSG_INCLUDE_SEARCH_DIR} ${__OpenSG_INCLUDE_SEARCH_DIRS})\n    ENDIF(OPENSG_INCLUDE_SEARCH_DIR)\n\n    # handle input variable OPENSG_LIBRARY_SEARCH_DIR\n    IF(OPENSG_LIBRARY_SEARCH_DIR)\n        FILE(TO_CMAKE_PATH ${OPENSG_LIBRARY_SEARCH_DIR} OPENSG_LIBRARY_SEARCH_DIR)\n        SET(__OpenSG_LIBRARIES_SEARCH_DIRS\n            ${OPENSG_LIBRARY_SEARCH_DIR} ${__OpenSG_LIBRARIES_SEARCH_DIRS})\n    ENDIF(OPENSG_LIBRARY_SEARCH_DIR)\n\n    IF(NOT OpenSG_INCLUDE_DIR)\n        # try to find include dirrectory by searching for OSGConfigured.h\n        FIND_PATH(OpenSG_INCLUDE_DIR\n            NAMES         OpenSG/OSGConfigured.h\n            HINTS         ${__OpenSG_INCLUDE_SEARCH_DIRS})\n    ENDIF(NOT OpenSG_INCLUDE_DIR)\n\t#message(STATUS \"OpenSG_INCLUDE_DIR: \" ${OpenSG_INCLUDE_DIR})\n    # ------------------------------------------------------------------------\n    #  Begin finding OpenSG libraries\n    # ------------------------------------------------------------------------\n    FOREACH(COMPONENT ${OpenSG_FIND_COMPONENTS})\n        STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)\n        SET(OpenSG_${UPPERCOMPONENT}_LIBRARY \"OpenSG_${UPPERCOMPONENT}_LIBRARY-NOTFOUND\" )\n        SET(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE \"OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND\" )\n        SET(OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG \"OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND\")\n\n\tIF (WIN32)\n        FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE\n            NAMES  ${COMPONENT}\n            HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}\n        )\n\n\t\t#message(STATUS \"OpenSG Component: \" ${COMPONENT})\n\n        FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG\n\t    # 1.8 Added the \"D\" suffix\n            NAMES  ${COMPONENT}D\n            HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}\n            # 1.8 Removed next line\n\t    #PATH_SUFFIXES \"debug\"\n        )\n\tELSE (WIN32)\n\tFIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_RELEASE\n            NAMES  ${COMPONENT}\n            HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}\n\t    PATH_SUFFIXES \"/opt\"\n        )\n\n\t\t#message(STATUS \"OpenSG Component: \" ${COMPONENT})\n\n        FIND_LIBRARY(OpenSG_${UPPERCOMPONENT}_LIBRARY_DEBUG\n            NAMES  ${COMPONENT}\n            HINTS  ${__OpenSG_LIBRARIES_SEARCH_DIRS}\n\t    PATH_SUFFIXES \"/dbg\"\n        )\n\tENDIF(WIN32)\n\n        __OpenSG_ADJUST_LIB_VARS(${UPPERCOMPONENT})\n    ENDFOREACH(COMPONENT)\n    # ------------------------------------------------------------------------\n    #  End finding OpenSG libraries\n    # ------------------------------------------------------------------------\n\n    SET(OpenSG_INCLUDE_DIRS \"${OpenSG_INCLUDE_DIR}\" \"${OpenSG_INCLUDE_DIR}/OpenSG\")\n\n    SET(OpenSG_FOUND FALSE)\n\n    IF(OpenSG_INCLUDE_DIR)\n        SET(OpenSG_FOUND TRUE)\n\n        # check if all requested components were found\n        SET(__OpenSG_CHECKED_COMPONENT FALSE)\n        SET(__OpenSG_MISSING_COMPONENTS)\n\n        FOREACH(COMPONENT ${OpenSG_FIND_COMPONENTS})\n            STRING(TOUPPER ${COMPONENT} COMPONENT)\n            SET(__OpenSG_CHECKED_COMPONENT TRUE)\n\n            IF(NOT OpenSG_${COMPONENT}_FOUND)\n                STRING(TOLOWER ${COMPONENT} COMPONENT)\n                LIST(APPEND __OpenSG_MISSING_COMPONENTS ${COMPONENT})\n                SET(OpenSG_FOUND FALSE)\n            ENDIF(NOT OpenSG_${COMPONENT}_FOUND)\n        ENDFOREACH(COMPONENT)\n\n        IF(__OpenSG_MISSING_COMPONENTS)\n            # We were unable to find some libraries, so generate a sensible\n            # error message that lists the libraries we were unable to find.\n            SET(OpenSG_ERROR_REASON\n                \"${OpenSG_ERROR_REASON}\\nThe following OpenSG libraries could not be found:\\n\")\n            FOREACH(COMPONENT ${__OpenSG_MISSING_COMPONENTS})\n                SET(OpenSG_ERROR_REASON\n                    \"${OpenSG_ERROR_REASON}        ${COMPONENT}\\n\")\n            ENDFOREACH(COMPONENT)\n\n            LIST(LENGTH OpenSG_FIND_COMPONENTS __OpenSG_NUM_COMPONENTS_WANTED)\n            LIST(LENGTH __OpenSG_MISSING_COMPONENTS __OpenSG_NUM_MISSING_COMPONENTS)\n            IF(${__OpenSG_NUM_COMPONENTS_WANTED} EQUAL ${__OpenSG_NUM_MISSING_COMPONENTS})\n                SET(OpenSG_ERROR_REASON\n                \"${OpenSG_ERROR_REASON}No OpenSG libraries were found. You may need to set OPENSG_LIBRARY_DIR to the directory containing OpenSG libraries or OPENSG_ROOT to the location of OpenSG.\")\n            ELSE(${__OpenSG_NUM_COMPONENTS_WANTED} EQUAL ${__OpenSG_NUM_MISSING_COMPONENTS})\n                SET(OpenSG_ERROR_REASON\n                \"${OpenSG_ERROR_REASON}Some (but not all) of the required OpenSG libraries were found. You may need to install these additional OpenSG libraries. Alternatively, set OPENSG_LIBRARY_DIR to the directory containing OpenSG libraries or OPENSG_ROOT to the location of OpenSG.\")\n            ENDIF(${__OpenSG_NUM_COMPONENTS_WANTED} EQUAL ${__OpenSG_NUM_MISSING_COMPONENTS})\n        ENDIF(__OpenSG_MISSING_COMPONENTS)\n\n    ENDIF(OpenSG_INCLUDE_DIR)\n\n    IF(OpenSG_FOUND)\n        IF(NOT OpenSG_FIND_QUIETLY)\n            MESSAGE(STATUS \"OpenSG found.\")\n        ENDIF(NOT OpenSG_FIND_QUIETLY)\n\n        IF (NOT OpenSG_FIND_QUIETLY)\n            MESSAGE(STATUS \"Found the following OpenSG libraries:\")\n        ENDIF(NOT OpenSG_FIND_QUIETLY)\n\n        FOREACH(COMPONENT  ${OpenSG_FIND_COMPONENTS})\n            STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)\n            IF(OpenSG_${UPPERCOMPONENT}_FOUND)\n                IF(NOT OpenSG_FIND_QUIETLY)\n                    MESSAGE(STATUS \"  ${COMPONENT}\")\n                ENDIF(NOT OpenSG_FIND_QUIETLY)\n                SET(OpenSG_LIBRARIES ${OpenSG_LIBRARIES} ${OpenSG_${UPPERCOMPONENT}_LIBRARY})\n            ENDIF(OpenSG_${UPPERCOMPONENT}_FOUND)\n        ENDFOREACH(COMPONENT)\n\n    ELSE(OpenSG_FOUND)\n        IF(OpenSG_FIND_REQUIRED)\n            MESSAGE(SEND_ERROR \"Unable to find the requested OpenSG libraries.\\n${OpenSG_ERROR_REASON}\")\n        ENDIF(OpenSG_FIND_REQUIRED)\n    ENDIF(OpenSG_FOUND)\n\nENDIF(__OpenSG_IN_CACHE)\n"
  },
  {
    "path": "FindOpenSGSupportlibs.cmake",
    "content": "# - Try to find OpenSGSupportlibs\n# Once done, this will define\n#\n#  OpenSGSupportlibs_FOUND\n#  OpenSGSupportlibs_INCLUDE_DIRS\n#  OpenSGSupportlibs_LIBRARIES\n\nif (NOT OpenSGSupportlibs_FOUND)\n\n    include(LibFindMacros)\n\n    # Visual Studio x32\n    if (VS32)\n      # Visual Studio x32\n      find_path( OpenSGSupportlibs_INCLUDE_DIR\n        NAMES zlib.h\n        PATHS ${LIBRARIES_DIR}/supportlibs/include\n          ${CMAKE_SOURCE_DIR}/../supportlibs/include )\n\n      find_library(OpenSGSupportlibs_LIBRARY\n        NAMES glut32 libjpg libpng tif32 zlib\n        PATHS ${LIBRARIES_DIR}/supportlibs/lib\n          ${CMAKE_SOURCE_DIR}/../supportlibs/lib )\n    else ()\n      if (VS64)\n        # Visual Studio x64\n        find_path( OpenSGSupportlibs_INCLUDE_DIR\n        NAMES zlib.h\n        PATHS ${LIBRARIES_DIR}/supportlibs_x64/include\n          ${CMAKE_SOURCE_DIR}/../supportlibs_x64/include )\n\n      find_library(OpenSGSupportlibs_LIBRARY\n        NAMES glut32 libjpg libpng tif32 zlib\n        PATHS ${LIBRARIES_DIR}/supportlibs_x64/lib\n          ${CMAKE_SOURCE_DIR}/../supportlibs_x64/lib )\n      endif()\n    endif ()\n\n    # Set the include dir variables and the libraries and let libfind_process do the rest.\n    # NOTE: Singular variables for this library, plural for libraries this this lib depends on.\n    set(OpenSGSupportlibs_PROCESS_INCLUDES OpenSGSupportlibs_INCLUDE_DIR)\n    set(OpenSGSupportlibs_PROCESS_LIBS OpenSGSupportlibs_LIBRARY)\n    libfind_process(OpenSGSupportlibs)\n\nendif ()"
  },
  {
    "path": "FindShapelib.cmake",
    "content": "find_path(Shapelib_INCLUDE_DIR NAMES shapefil.h)\n\nif(MSVC)\n    set(Shapelib_LIBNAME shapelib)\nelse()\n    set(Shapelib_LIBNAME shp)\nendif()\n\nfind_library(Shapelib_LIBRARY NAMES ${Shapelib_LIBNAME})\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(Shapelib\n    FOUND_VAR Shapelib_FOUND\n    REQUIRED_VARS Shapelib_INCLUDE_DIR Shapelib_LIBRARY\n)\n\nset(Shapelib_INCLUDE_DIRS ${Shapelib_INCLUDE_DIR})\nset(Shapelib_LIBRARIES ${Shapelib_LIBRARY})\n\nmark_as_advanced(Shapelib_INCLUDE_DIR Shapelib_LIBRARY)\n"
  },
  {
    "path": "FindVRPN.cmake",
    "content": "# - try to find VRPN library\n#\n# Cache Variables:\n#  VRPN_LIBRARY\n#  VRPN_SERVER_LIBRARY\n#  VRPN_INCLUDE_DIR\n#\n# Non-cache variables you might use in your CMakeLists.txt:\n#  VRPN_FOUND\n#  VRPN_SERVER_LIBRARIES\n#  VRPN_LIBRARIES\n#  VRPN_INCLUDE_DIRS\n#\n# VRPN_ROOT_DIR is searched preferentially for these files\n#\n# Requires these CMake modules:\n#  FindPackageHandleStandardArgs (known included with CMake >=2.6.2)\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nset(VRPN_ROOT_DIR\n\t\"${VRPN_ROOT_DIR}\"\n\tCACHE\n\tPATH\n\t\"Root directory to search for VRPN\")\n\nif(\"${CMAKE_SIZEOF_VOID_P}\" MATCHES \"8\")\n\tset(_libsuffixes lib64 lib)\n\n\t# 64-bit dir: only set on win64\n\tfile(TO_CMAKE_PATH \"$ENV{ProgramW6432}\" _progfiles)\nelse()\n\tset(_libsuffixes lib)\n\tif(NOT \"$ENV{ProgramFiles(x86)}\" STREQUAL \"\")\n\t\t# 32-bit dir: only set on win64\n\t\tfile(TO_CMAKE_PATH \"$ENV{ProgramFiles(x86)}\" _progfiles)\n\telse()\n\t\t# 32-bit dir on win32, useless to us on win64\n\t\tfile(TO_CMAKE_PATH \"$ENV{ProgramFiles}\" _progfiles)\n\tendif()\nendif()\n\n###\n# Configure VRPN\n###\n\nfind_path(VRPN_INCLUDE_DIR\n\tNAMES\n\tvrpn_Connection.h\n\tPATH_SUFFIXES\n\tinclude\n\tinclude/vrpn\n\tHINTS\n\t\"${VRPN_ROOT_DIR}\"\n\tPATHS\n\t\"${_progfiles}/VRPN\")\n\nfind_library(VRPN_LIBRARY\n\tNAMES\n\tvrpn\n\tPATH_SUFFIXES\n\t${_libsuffixes}\n\tHINTS\n\t\"${VRPN_ROOT_DIR}\"\n\tPATHS\n\t\"${_progfiles}/VRPN\")\n\nfind_library(VRPN_SERVER_LIBRARY\n\tNAMES\n\tvrpnserver\n\tPATH_SUFFIXES\n\t${_libsuffixes}\n\tHINTS\n\t\"${VRPN_ROOT_DIR}\"\n\tPATHS\n\t\"${_progfiles}/VRPN\")\n\n###\n# Dependencies\n###\nset(_deps_libs)\nset(_deps_includes)\nset(_deps_check)\n\nfind_package(quatlib)\nlist(APPEND _deps_libs ${QUATLIB_LIBRARIES})\nlist(APPEND _deps_includes ${QUATLIB_INCLUDE_DIRS})\nlist(APPEND _deps_check QUATLIB_FOUND)\n\nif(NOT WIN32)\n\tfind_package(Threads)\n\tlist(APPEND _deps_libs ${CMAKE_THREAD_LIBS_INIT})\n\tlist(APPEND _deps_check CMAKE_HAVE_THREADS_LIBRARY)\nendif()\n\n\n# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if\n# all listed variables are TRUE\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(VRPN\n\tDEFAULT_MSG\n\tVRPN_LIBRARY\n\tVRPN_INCLUDE_DIR\n\t${_deps_check})\n\nif(VRPN_FOUND)\n\tset(VRPN_INCLUDE_DIRS \"${VRPN_INCLUDE_DIR}\" ${_deps_includes})\n\tset(VRPN_LIBRARIES \"${VRPN_LIBRARY}\" ${_deps_libs})\n\tset(VRPN_SERVER_LIBRARIES \"${VRPN_SERVER_LIBRARY}\" ${_deps_libs})\n\n\tmark_as_advanced(VRPN_ROOT_DIR)\nendif()\n\nmark_as_advanced(VRPN_LIBRARY\n\tVRPN_SERVER_LIBRARY\n\tVRPN_INCLUDE_DIR)\n"
  },
  {
    "path": "Findcppcheck.cmake",
    "content": "# - try to find cppcheck tool\n#\n# Cache Variables:\n#  CPPCHECK_EXECUTABLE\n#\n# Non-cache variables you might use in your CMakeLists.txt:\n#  CPPCHECK_FOUND\n#  CPPCHECK_POSSIBLEERROR_ARG\n#  CPPCHECK_UNUSEDFUNC_ARG\n#  CPPCHECK_STYLE_ARG\n#  CPPCHECK_QUIET_ARG\n#  CPPCHECK_INCLUDEPATH_ARG\n#  CPPCHECK_FAIL_REGULAR_EXPRESSION\n#  CPPCHECK_WARN_REGULAR_EXPRESSION\n#  CPPCHECK_MARK_AS_ADVANCED - whether to mark our vars as advanced even\n#    if we don't find this program.\n#\n# Requires these CMake modules:\n#  FindPackageHandleStandardArgs (known included with CMake >=2.6.2)\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nfile(TO_CMAKE_PATH \"${CPPCHECK_ROOT_DIR}\" CPPCHECK_ROOT_DIR)\nset(CPPCHECK_ROOT_DIR\n    \"${CPPCHECK_ROOT_DIR}\"\n    CACHE\n    PATH\n    \"Path to search for cppcheck\")\n\n# cppcheck app bundles on Mac OS X are GUI, we want command line only\nset(_oldappbundlesetting ${CMAKE_FIND_APPBUNDLE})\nset(CMAKE_FIND_APPBUNDLE NEVER)\n\nif(CPPCHECK_EXECUTABLE AND NOT EXISTS \"${CPPCHECK_EXECUTABLE}\")\n    set(CPPCHECK_EXECUTABLE \"notfound\" CACHE PATH FORCE \"\")\nendif()\n\n# If we have a custom path, look there first.\nif(CPPCHECK_ROOT_DIR)\n    find_program(CPPCHECK_EXECUTABLE\n        NAMES\n        cppcheck\n        cli\n        PATHS\n        \"${CPPCHECK_ROOT_DIR}\"\n        PATH_SUFFIXES\n        cli\n        NO_DEFAULT_PATH)\nendif()\n\nfind_program(CPPCHECK_EXECUTABLE NAMES cppcheck)\n\n# Restore original setting for appbundle finding\nset(CMAKE_FIND_APPBUNDLE ${_oldappbundlesetting})\n\n# Find out where our test file is\nget_filename_component(_cppcheckmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)\nset(_cppcheckdummyfile \"${_cppcheckmoddir}/Findcppcheck.cpp\")\n\nfunction(_cppcheck_test_arg _resultvar _arg)\n    if(NOT CPPCHECK_EXECUTABLE)\n        set(${_resultvar} NO)\n        return()\n    endif()\n    execute_process(COMMAND\n        \"${CPPCHECK_EXECUTABLE}\"\n        \"${_arg}\"\n        \"--quiet\"\n        \"${_cppcheckdummyfile}\"\n        RESULT_VARIABLE\n        _cppcheck_result\n        OUTPUT_QUIET\n        ERROR_QUIET)\n    if(\"${_cppcheck_result}\" EQUAL 0)\n        set(${_resultvar} YES PARENT_SCOPE)\n    else()\n        set(${_resultvar} NO PARENT_SCOPE)\n    endif()\nendfunction()\n\nfunction(_cppcheck_set_arg_var _argvar _arg)\n    if(\"${${_argvar}}\" STREQUAL \"\")\n        _cppcheck_test_arg(_cppcheck_arg \"${_arg}\")\n        if(_cppcheck_arg)\n            set(${_argvar} \"${_arg}\" PARENT_SCOPE)\n        endif()\n    endif()\nendfunction()\n\nif(CPPCHECK_EXECUTABLE)\n\n    # Check for the two types of command line arguments by just trying them\n    _cppcheck_set_arg_var(CPPCHECK_STYLE_ARG \"--enable=style\")\n    _cppcheck_set_arg_var(CPPCHECK_STYLE_ARG \"--style\")\n    if(\"${CPPCHECK_STYLE_ARG}\" STREQUAL \"--enable=style\")\n\n        _cppcheck_set_arg_var(CPPCHECK_UNUSEDFUNC_ARG \"--enable=unusedFunction\")\n        _cppcheck_set_arg_var(CPPCHECK_INFORMATION_ARG \"--enable=information\")\n        _cppcheck_set_arg_var(CPPCHECK_MISSINGINCLUDE_ARG \"--enable=missingInclude\")\n        _cppcheck_set_arg_var(CPPCHECK_POSIX_ARG \"--enable=posix\")\n        _cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG \"--enable=possibleError\")\n        _cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG \"--enable=all\")\n\n        if(MSVC)\n            set(CPPCHECK_TEMPLATE_ARG --template vs)\n            set(CPPCHECK_FAIL_REGULAR_EXPRESSION \"[(]error[)]\")\n            set(CPPCHECK_WARN_REGULAR_EXPRESSION \"[(]style[)]\")\n        elseif(CMAKE_COMPILER_IS_GNUCXX)\n            set(CPPCHECK_TEMPLATE_ARG --template gcc)\n            set(CPPCHECK_FAIL_REGULAR_EXPRESSION \" error: \")\n            set(CPPCHECK_WARN_REGULAR_EXPRESSION \" style: \")\n        else()\n            set(CPPCHECK_TEMPLATE_ARG --template gcc)\n            set(CPPCHECK_FAIL_REGULAR_EXPRESSION \" error: \")\n            set(CPPCHECK_WARN_REGULAR_EXPRESSION \" style: \")\n        endif()\n    elseif(\"${CPPCHECK_STYLE_ARG}\" STREQUAL \"--style\")\n        # Old arguments\n        _cppcheck_set_arg_var(CPPCHECK_UNUSEDFUNC_ARG \"--unused-functions\")\n        _cppcheck_set_arg_var(CPPCHECK_POSSIBLEERROR_ARG \"--all\")\n        set(CPPCHECK_FAIL_REGULAR_EXPRESSION \"error:\")\n        set(CPPCHECK_WARN_REGULAR_EXPRESSION \"[(]style[)]\")\n    else()\n        # No idea - some other issue must be getting in the way\n        message(STATUS\n            \"WARNING: Can't detect whether CPPCHECK wants new or old-style arguments!\")\n    endif()\n\n    set(CPPCHECK_QUIET_ARG \"--quiet\")\n    set(CPPCHECK_INCLUDEPATH_ARG \"-I\")\n\nendif()\n\nset(CPPCHECK_ALL\n    \"${CPPCHECK_EXECUTABLE} ${CPPCHECK_POSSIBLEERROR_ARG} ${CPPCHECK_UNUSEDFUNC_ARG} ${CPPCHECK_STYLE_ARG} ${CPPCHECK_QUIET_ARG} ${CPPCHECK_INCLUDEPATH_ARG} some/include/path\")\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(cppcheck\n    DEFAULT_MSG\n    CPPCHECK_ALL\n    CPPCHECK_EXECUTABLE\n    CPPCHECK_POSSIBLEERROR_ARG\n    CPPCHECK_UNUSEDFUNC_ARG\n    CPPCHECK_STYLE_ARG\n    CPPCHECK_INCLUDEPATH_ARG\n    CPPCHECK_QUIET_ARG)\n\nif(CPPCHECK_FOUND OR CPPCHECK_MARK_AS_ADVANCED)\n    mark_as_advanced(CPPCHECK_ROOT_DIR)\nendif()\n\nmark_as_advanced(CPPCHECK_EXECUTABLE)\n"
  },
  {
    "path": "Findcppcheck.cpp",
    "content": "/**\n * \\file Findcppcheck.cpp\n * \\brief Dummy C++ source file used by CMake module Findcppcheck.cmake\n *\n * \\author\n * Ryan Pavlik, 2009-2010\n * <rpavlik@iastate.edu>\n * http://academic.cleardefinition.com/\n *\n */\n\n\n\nint main(int argc, char* argv[]) {\n    return 0;\n}\n"
  },
  {
    "path": "Findquatlib.cmake",
    "content": "# - Find quatlib\n# Find the quatlib headers and libraries.\n#\n#  QUATLIB_INCLUDE_DIRS - where to find quat.h\n#  QUATLIB_LIBRARIES    - List of libraries when using quatlib.\n#  QUATLIB_FOUND        - True if quatlib found.\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nif(TARGET quat)\n\t# Look for the header file.\n\tfind_path(QUATLIB_INCLUDE_DIR NAMES quat.h\n\t\t\tPATHS ${quatlib_SOURCE_DIR})\n\n\tset(QUATLIB_LIBRARY \"quat\")\n\nelse()\n\tset(QUATLIB_ROOT_DIR\n\t\t\"${QUATLIB_ROOT_DIR}\"\n\t\tCACHE\n\t\tPATH\n\t\t\"Root directory to search for quatlib\")\n\tif(DEFINED VRPN_ROOT_DIR AND NOT QUATLIB_ROOT_DIR)\n\t\tset(QUATLIB_ROOT_DIR \"${VRPN_ROOT_DIR}\")\n\t\tmark_as_advanced(QUATLIB_ROOT_DIR)\n\tendif()\n\n\tif(\"${CMAKE_SIZEOF_VOID_P}\" MATCHES \"8\")\n\t\tset(_libsuffixes lib64 lib)\n\n\t\t# 64-bit dir: only set on win64\n\t\tfile(TO_CMAKE_PATH \"$ENV{ProgramW6432}\" _progfiles)\n\telse()\n\t\tset(_libsuffixes lib)\n\t\tif(NOT \"$ENV{ProgramFiles(x86)}\" STREQUAL \"\")\n\t\t\t# 32-bit dir: only set on win64\n\t\t\tfile(TO_CMAKE_PATH \"$ENV{ProgramFiles(x86)}\" _progfiles)\n\t\telse()\n\t\t\t# 32-bit dir on win32, useless to us on win64\n\t\t\tfile(TO_CMAKE_PATH \"$ENV{ProgramFiles}\" _progfiles)\n\t\tendif()\n\tendif()\n\n\t# Look for the header file.\n\tfind_path(QUATLIB_INCLUDE_DIR\n\t\tNAMES\n\t\tquat.h\n\t\tHINTS\n\t\t\"${QUATLIB_ROOT_DIR}\"\n\t\tPATH_SUFFIXES\n\t\tinclude\n\t\tPATHS\n\t\t\"${_progfiles}/VRPN\"\n\t\t\"${_progfiles}/quatlib\")\n\n\t# Look for the library.\n\tfind_library(QUATLIB_LIBRARY\n\t\tNAMES\n\t\tquat.lib\n\t\tlibquat.a\n\t\tHINTS\n\t\t\"${QUATLIB_ROOT_DIR}\"\n\t\tPATH_SUFFIXES\n\t\t${_libsuffixes}\n\t\tPATHS\n\t\t\"${_progfiles}/VRPN\"\n\t\t\"${_progfiles}/quatlib\")\nendif()\n\n# handle the QUIETLY and REQUIRED arguments and set QUATLIB_FOUND to TRUE if\n# all listed variables are TRUE\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(quatlib\n\tDEFAULT_MSG\n\tQUATLIB_LIBRARY\n\tQUATLIB_INCLUDE_DIR)\n\nif(QUATLIB_FOUND)\n\tset(QUATLIB_LIBRARIES ${QUATLIB_LIBRARY})\n\tif(NOT WIN32)\n\t\tlist(APPEND QUATLIB_LIBRARIES m)\n\tendif()\n\tset(QUATLIB_INCLUDE_DIRS ${QUATLIB_INCLUDE_DIR})\n\n\tmark_as_advanced(QUATLIB_ROOT_DIR)\nelse()\n\tset(QUATLIB_LIBRARIES)\n\tset(QUATLIB_INCLUDE_DIRS)\nendif()\n\nmark_as_advanced(QUATLIB_LIBRARY QUATLIB_INCLUDE_DIR)\n"
  },
  {
    "path": "GetCPUDetails.cmake",
    "content": "# - Set a number of variables to indicate things about the current CPU and OS\n#\n#  CPU_INTEL\n#  CPU_EXE_64BIT\n#  CPU_EXE_32BIT\n#  CPU_HAS_SSE\n#  CPU_HAS_SSE2\n#  CPU_HAS_SSE3\n#  CPU_HAS_SSSE3\n#  CPU_HAS_SSE4_1\n#  CPU_HAS_SSE4_2\n#\n# Requires these CMake modules:\n#  no additional modules required\n#\n# Original Author:\n# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n#\n\n\nif(__get_cpu_details)\n    return()\nendif()\nset(__get_cpu_details YES)\n\nfunction(get_cpu_details)\n    option(CPUDETAILS_VERBOSE\n        \"Should we display results of the CPU info check?\"\n        NO)\n    mark_as_advanced(CPUDETAILS_VERBOSE)\n\n    ###\n    # CPU_INTEL\n\n    if(\"${CMAKE_SYSTEM_PROCESSOR}\" MATCHES \"x86_64\" OR \"${CMAKE_SYSTEM_PROCESSOR}\" MATCHES \"i[3456]86\")\n        set(CPU_INTEL YES)\n    elseif(APPLE)\n        # Mac Intel boxes return i386 in 10.5 - so assume this is a PPC\n        set(CPU_INTEL NO)\n    else()\n        # TODO: Assuming yes in case of doubt - probably not a great idea\n        set(CPU_INTEL YES)\n    endif()\n\n    set(CPU_INTEL\n        ${CPU_INTEL}\n        CACHE\n        INTERNAL\n        \"Intel x86 or x86_64 architecture machine?\")\n\n    ###\n    # CPU_EXE_64BIT/32BIT\n    if(CMAKE_SIZEOF_VOID_P EQUAL 8)\n        set(CPU_EXE_64BIT ON)\n        set(CPU_EXE_32BIT OFF)\n    else()\n        set(CPU_EXE_64BIT OFF)\n        set(CPU_EXE_32BIT ON)\n    endif()\n\n    ###\n    # CPU_HAS_SSE/SSE2/SSE3/SSSE3/SSE4.1/SSE4.2\n    if(CPU_INTEL)\n        if(CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n            # Use /proc/cpuinfo to find this out.\n            file(STRINGS \"/proc/cpuinfo\" _cpuinfo)\n            if(_cpuinfo MATCHES \"(sse)|(xmm)\")\n                set(CPU_HAS_SSE YES)\n            else()\n                set(CPU_HAS_SSE NO)\n            endif()\n\n            if(_cpuinfo MATCHES \"(sse2)|(xmm2)\")\n                set(CPU_HAS_SSE2 YES)\n            else()\n                set(CPU_HAS_SSE2 NO)\n            endif()\n\n            if(_cpuinfo MATCHES \"(sse3)|(xmm3)\")\n                set(CPU_HAS_SSE3 YES)\n            else()\n                set(CPU_HAS_SSE3 NO)\n            endif()\n\n            if(_cpuinfo MATCHES \"ssse3\")\n                set(CPU_HAS_SSSE3 YES)\n            else()\n                set(CPU_HAS_SSSE3 NO)\n            endif()\n\n            if(_cpuinfo MATCHES \"(sse4_1)|(xmm4_1)\")\n                set(CPU_HAS_SSE4_1 YES)\n            else()\n                set(CPU_HAS_SSE4_1 NO)\n            endif()\n\n            if(_cpuinfo MATCHES \"(sse4_2)|(xmm4_2)\")\n                set(CPU_HAS_SSE4_2 YES)\n            else()\n                set(CPU_HAS_SSE4_2 NO)\n            endif()\n\n        elseif(APPLE)\n            # Mac OS X Intel requires SSE3\n            set(CPU_HAS_SSE YES)\n            set(CPU_HAS_SSE2 YES)\n            set(CPU_HAS_SSE3 YES)\n            set(CPU_HAS_SSSE3 NO)\n            set(CPU_HAS_SSE4_1 NO)\n            set(CPU_HAS_SSE4_2 NO)\n        elseif(WIN32)\n            if(CPU_EXE_64BIT)\n                #TODO: Assume only common-denominator for 64-bit machines,\n                # since I don't know how to check.\n                set(CPU_HAS_SSE YES)\n                set(CPU_HAS_SSE2 YES)\n                set(CPU_HAS_SSE3 NO)\n                set(CPU_HAS_SSSE3 NO)\n                set(CPU_HAS_SSE4_1 NO)\n                set(CPU_HAS_SSE4_2 NO)\n            else()\n                #TODO:  Assume no SSE, since I don't know how to check.\n                set(CPU_HAS_SSE NO)\n                set(CPU_HAS_SSE2 NO)\n                set(CPU_HAS_SSE3 NO)\n                set(CPU_HAS_SSSE3 NO)\n                set(CPU_HAS_SSE4_1 NO)\n                set(CPU_HAS_SSE4_2 NO)\n            endif()\n        endif()\n    endif()\n\n    set(CPU_INTEL\n        ${CPU_INTEL}\n        CACHE\n        INTERNAL\n        \"Intel x86 or x86_64 architecture machine?\")\n\n    foreach(_var\n        CPU_EXE_64BIT\n        CPU_EXE_32BIT\n        CPU_HAS_SSE\n        CPU_HAS_SSE2\n        CPU_HAS_SSE3\n        CPU_HAS_SSSE3\n        CPU_HAS_SSE4_1\n        CPU_HAS_SSE4_2)\n        set(${_var} ${${_var}} CACHE INTERNAL \"\")\n    endforeach()\n\n    if(CPUDETAILS_VERBOSE)\n        foreach(_var\n            CPU_INTEL\n            CPU_EXE_64BIT\n            CPU_EXE_32BIT\n            CPU_HAS_SSE\n            CPU_HAS_SSE2\n            CPU_HAS_SSE3\n            CPU_HAS_SSSE3\n            CPU_HAS_SSE4_1\n            CPU_HAS_SSE4_2)\n            get_property(_help CACHE ${_var} PROPERTY HELPSTRING)\n            message(STATUS \"[get_cpu_details] ${_var} (${_help}): ${${_var}}\")\n        endforeach()\n    endif()\nendfunction()\n"
  },
  {
    "path": "GetGitRevisionDescription.cmake",
    "content": "# - Returns a version string from Git\n#\n# These functions force a re-configure on each git commit so that you can\n# trust the values of the variables in your build system.\n#\n#  get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])\n#\n# Returns the refspec and sha hash of the current head revision\n#\n#  git_describe(<var> [<additional arguments to git describe> ...])\n#\n# Returns the results of git describe on the source tree, and adjusting\n# the output so that it tests false if an error occurs.\n#\n#  git_get_exact_tag(<var> [<additional arguments to git describe> ...])\n#\n# Returns the results of git describe --exact-match on the source tree,\n# and adjusting the output so that it tests false if there was no exact\n# matching tag.\n#\n# Requires CMake 2.6 or newer (uses the 'function' command)\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nif(__get_git_revision_description)\n    return()\nendif()\nset(__get_git_revision_description YES)\n\n# We must run the following at \"include\" time, not at function call time,\n# to find the path to this module rather than the path to a calling list file\nget_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)\n\nfunction(get_git_head_revision _refspecvar _hashvar)\n    set(GIT_PARENT_DIR \"${CMAKE_CURRENT_SOURCE_DIR}\")\n    set(GIT_DIR \"${GIT_PARENT_DIR}/.git\")\n    while(NOT EXISTS \"${GIT_DIR}\")    # .git dir not found, search parent directories\n        set(GIT_PREVIOUS_PARENT \"${GIT_PARENT_DIR}\")\n        get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)\n        if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)\n            # We have reached the root directory, we are not in git\n            set(${_refspecvar} \"GITDIR-NOTFOUND\" PARENT_SCOPE)\n            set(${_hashvar} \"GITDIR-NOTFOUND\" PARENT_SCOPE)\n            return()\n        endif()\n        set(GIT_DIR \"${GIT_PARENT_DIR}/.git\")\n    endwhile()\n    # check if this is a submodule\n    if(NOT IS_DIRECTORY ${GIT_DIR})\n        file(READ ${GIT_DIR} submodule)\n        string(REGEX REPLACE \"gitdir: (.*)\\n$\" \"\\\\1\" GIT_DIR_RELATIVE ${submodule})\n        get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)\n\n        if (IS_ABSOLUTE ${GIT_DIR_RELATIVE})\n            set(GIT_DIR ${GIT_DIR_RELATIVE})\n        else()\n            get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)\n        endif()\n\n    endif()\n    set(GIT_DATA \"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data\")\n    if(NOT EXISTS \"${GIT_DATA}\")\n        file(MAKE_DIRECTORY \"${GIT_DATA}\")\n    endif()\n\n    if(NOT EXISTS \"${GIT_DIR}/HEAD\")\n        return()\n    endif()\n    set(HEAD_FILE \"${GIT_DATA}/HEAD\")\n    configure_file(\"${GIT_DIR}/HEAD\" \"${HEAD_FILE}\" COPYONLY)\n\n    configure_file(\"${_gitdescmoddir}/GetGitRevisionDescription.cmake.in\"\n        \"${GIT_DATA}/grabRef.cmake\"\n        @ONLY)\n    include(\"${GIT_DATA}/grabRef.cmake\")\n\n    set(${_refspecvar} \"${HEAD_REF}\" PARENT_SCOPE)\n    set(${_hashvar} \"${HEAD_HASH}\" PARENT_SCOPE)\nendfunction()\n\nfunction(git_describe _var)\n    if(NOT GIT_FOUND)\n        find_package(Git QUIET)\n    endif()\n    get_git_head_revision(refspec hash)\n    if(NOT GIT_FOUND)\n        set(${_var} \"GIT-NOTFOUND\" PARENT_SCOPE)\n        return()\n    endif()\n    if(NOT hash)\n        set(${_var} \"HEAD-HASH-NOTFOUND\" PARENT_SCOPE)\n        return()\n    endif()\n\n    # TODO sanitize\n    #if((${ARGN}\" MATCHES \"&&\") OR\n    #    (ARGN MATCHES \"||\") OR\n    #    (ARGN MATCHES \"\\\\;\"))\n    #    message(\"Please report the following error to the project!\")\n    #    message(FATAL_ERROR \"Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}\")\n    #endif()\n\n    #message(STATUS \"Arguments to execute_process: ${ARGN}\")\n\n    execute_process(COMMAND\n        ${GIT_EXECUTABLE}\n        describe\n        ${hash}\n        ${ARGN}\n        WORKING_DIRECTORY\n        \"${CMAKE_SOURCE_DIR}\"\n        RESULT_VARIABLE\n        res\n        OUTPUT_VARIABLE\n        out\n        ERROR_QUIET\n        OUTPUT_STRIP_TRAILING_WHITESPACE)\n    if(NOT res EQUAL 0)\n        set(out \"${out}-${res}-NOTFOUND\")\n    endif()\n\n    set(${_var} \"${out}\" PARENT_SCOPE)\nendfunction()\n\nfunction(git_get_exact_tag _var)\n    git_describe(out --exact-match ${ARGN})\n    set(${_var} \"${out}\" PARENT_SCOPE)\nendfunction()\n\nfunction(git_get_tag _var)\n    git_describe(out --tags ${ARGN})\n    set(${_var} \"${out}\" PARENT_SCOPE)\nendfunction()\n"
  },
  {
    "path": "GetGitRevisionDescription.cmake.in",
    "content": "# \n# Internal file for GetGitRevisionDescription.cmake\n#\n# Requires CMake 2.6 or newer (uses the 'function' command)\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nset(HEAD_HASH)\n\nfile(READ \"@HEAD_FILE@\" HEAD_CONTENTS LIMIT 1024)\n\nstring(STRIP \"${HEAD_CONTENTS}\" HEAD_CONTENTS)\nif(HEAD_CONTENTS MATCHES \"ref\")\n\t# named branch\n\tstring(REPLACE \"ref: \" \"\" HEAD_REF \"${HEAD_CONTENTS}\")\n\tif(EXISTS \"@GIT_DIR@/${HEAD_REF}\")\n\tconfigure_file(\"@GIT_DIR@/${HEAD_REF}\" \"@GIT_DATA@/head-ref\" COPYONLY)\n\telseif(EXISTS \"@GIT_DIR@/logs/${HEAD_REF}\")\n\t\tconfigure_file(\"@GIT_DIR@/logs/${HEAD_REF}\" \"@GIT_DATA@/head-ref\" COPYONLY)\n\t\tset(HEAD_HASH \"${HEAD_REF}\")\n\tendif()\nelse()\n\t# detached HEAD\n\tconfigure_file(\"@GIT_DIR@/HEAD\" \"@GIT_DATA@/head-ref\" COPYONLY)\nendif()\n\nif(NOT HEAD_HASH)\nfile(READ \"@GIT_DATA@/head-ref\" HEAD_HASH LIMIT 1024)\nstring(STRIP \"${HEAD_HASH}\" HEAD_HASH)\nendif()\n"
  },
  {
    "path": "LICENSE_1_0.txt",
    "content": "Boost Software License - Version 1.0 - August 17th, 2003\n\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "ListAllCMakeVariableValues.cmake",
    "content": "# From http://www.kitware.com/blog/home/post/300\n#\n# Usage:\n#\n#  include(ListAllCMakeVariableValues)\n#  list_all_cmake_variable_values()\n\nfunction(list_all_cmake_variable_values)\n  message(STATUS \"\")\n  get_cmake_property(vs VARIABLES)\n  foreach(v ${vs})\n    message(STATUS \"${v}='${${v}}'\")\n  endforeach()\n  message(STATUS \"\")\nendfunction()\n"
  },
  {
    "path": "OptionRequires.cmake",
    "content": "# - Add an option that depends on one or more variables being true.\n#\n#  option_requires(<option_name> <description> <variable_name> [<variable_name>...])\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nfunction(option_requires name desc)\n    set(args ${ARGN})\n\n    set(OFF_BY_DEFAULT true)\n    list(FIND args \"OFF_BY_DEFAULT\" _off_found)\n    if(NOT _off_found EQUAL -1)\n        list(REMOVE_AT args ${_off_found})\n        set(OFF_BY_DEFAULT true)\n    endif()\n\n    set(found)\n    set(missing)\n    foreach(var ${args})\n        if(${var})\n            list(APPEND found ${var})\n        else()\n            list(APPEND missing ${var})\n        endif()\n    endforeach()\n\n    if(NOT missing)\n        set(OK TRUE)\n    else()\n        set(OK FALSE)\n    endif()\n\n    set(default ${OK})\n    if(OFF_BY_DEFAULT)\n        set(default OFF)\n    endif()\n\n    option(${name} \"${desc}\" ${default})\n\n    if(${name} AND (NOT OK))\n        message(FATAL_ERROR \"${name} enabled but these dependencies were not valid: ${missing}\")\n    endif()\n\nendfunction()\n"
  },
  {
    "path": "PrintVariables.cmake",
    "content": "# ------------------------- Begin Generic CMake Variable Logging ------------------\n\n# /*    C++ comment style not allowed    */\n\n\n# if you are building in-source, this is the same as CMAKE_SOURCE_DIR, otherwise \n# this is the top level directory of your build tree \nmessage( STATUS \"CMAKE_BINARY_DIR:         \" ${CMAKE_BINARY_DIR} )\n\n# if you are building in-source, this is the same as CMAKE_CURRENT_SOURCE_DIR, otherwise this \n# is the directory where the compiled or generated files from the current CMakeLists.txt will go to \nmessage( STATUS \"CMAKE_CURRENT_BINARY_DIR: \" ${CMAKE_CURRENT_BINARY_DIR} )\n\n# this is the directory, from which cmake was started, i.e. the top level source directory \nmessage( STATUS \"CMAKE_SOURCE_DIR:         \" ${CMAKE_SOURCE_DIR} )\n\n# this is the directory where the currently processed CMakeLists.txt is located in \nmessage( STATUS \"CMAKE_CURRENT_SOURCE_DIR: \" ${CMAKE_CURRENT_SOURCE_DIR} )\n\n# contains the full path to the top level directory of your build tree \nmessage( STATUS \"PROJECT_BINARY_DIR: \" ${PROJECT_BINARY_DIR} )\n\n# contains the full path to the root of your project source directory,\n# i.e. to the nearest directory where CMakeLists.txt contains the project() command \nmessage( STATUS \"PROJECT_SOURCE_DIR: \" ${PROJECT_SOURCE_DIR} )\n\n# set this variable to specify a common place where CMake should put all executable files\n# (instead of CMAKE_CURRENT_BINARY_DIR)\nmessage( STATUS \"EXECUTABLE_OUTPUT_PATH: \" ${EXECUTABLE_OUTPUT_PATH} )\n\n# set this variable to specify a common place where CMake should put all libraries \n# (instead of CMAKE_CURRENT_BINARY_DIR)\nmessage( STATUS \"LIBRARY_OUTPUT_PATH:     \" ${LIBRARY_OUTPUT_PATH} )\n\n# tell CMake to search first in directories listed in CMAKE_MODULE_PATH\n# when you use find_package() or include()\nmessage( STATUS \"CMAKE_MODULE_PATH: \" ${CMAKE_MODULE_PATH} )\n\n# this is the complete path of the cmake which runs currently (e.g. /usr/local/bin/cmake) \nmessage( STATUS \"CMAKE_COMMAND: \" ${CMAKE_COMMAND} )\n\n# this is the CMake installation directory \nmessage( STATUS \"CMAKE_ROOT: \" ${CMAKE_ROOT} )\n\n# this is the filename including the complete path of the file where this variable is used. \nmessage( STATUS \"CMAKE_CURRENT_LIST_FILE: \" ${CMAKE_CURRENT_LIST_FILE} )\n\n# this is linenumber where the variable is used\nmessage( STATUS \"CMAKE_CURRENT_LIST_LINE: \" ${CMAKE_CURRENT_LIST_LINE} )\n\n# this is used when searching for include files e.g. using the find_path() command.\nmessage( STATUS \"CMAKE_INCLUDE_PATH: \" ${CMAKE_INCLUDE_PATH} )\n\n# this is used when searching for libraries e.g. using the find_library() command.\nmessage( STATUS \"CMAKE_LIBRARY_PATH: \" ${CMAKE_LIBRARY_PATH} )\n\n# the complete system name, e.g. \"Linux-2.4.22\", \"FreeBSD-5.4-RELEASE\" or \"Windows 5.1\" \nmessage( STATUS \"CMAKE_SYSTEM: \" ${CMAKE_SYSTEM} )\n\n# the short system name, e.g. \"Linux\", \"FreeBSD\" or \"Windows\"\nmessage( STATUS \"CMAKE_SYSTEM_NAME: \" ${CMAKE_SYSTEM_NAME} )\n\n# only the version part of CMAKE_SYSTEM \nmessage( STATUS \"CMAKE_SYSTEM_VERSION: \" ${CMAKE_SYSTEM_VERSION} )\n\n# the processor name (e.g. \"Intel(R) Pentium(R) M processor 2.00GHz\") \nmessage( STATUS \"CMAKE_SYSTEM_PROCESSOR: \" ${CMAKE_SYSTEM_PROCESSOR} )\n\n# is TRUE on all UNIX-like OS's, including Apple OS X and CygWin\nmessage( STATUS \"UNIX: \" ${UNIX} )\n\n# is TRUE on Windows, including CygWin \nmessage( STATUS \"WIN32: \" ${WIN32} )\n\n# is TRUE on Apple OS X\nmessage( STATUS \"APPLE: \" ${APPLE} )\n\n# is TRUE when using the MinGW compiler in Windows\nmessage( STATUS \"MINGW: \" ${MINGW} )\n\n# is TRUE on Windows when using the CygWin version of cmake\nmessage( STATUS \"CYGWIN: \" ${CYGWIN} )\n\n# is TRUE on Windows when using a Borland compiler \nmessage( STATUS \"BORLAND: \" ${BORLAND} )\n\n# Microsoft compiler \nmessage( STATUS \"MSVC: \" ${MSVC} )\nmessage( STATUS \"MSVC_IDE: \" ${MSVC_IDE} )\nmessage( STATUS \"MSVC60: \" ${MSVC60} )\nmessage( STATUS \"MSVC70: \" ${MSVC70} )\nmessage( STATUS \"MSVC71: \" ${MSVC71} )\nmessage( STATUS \"MSVC80: \" ${MSVC80} )\nmessage( STATUS \"CMAKE_COMPILER_2005: \" ${CMAKE_COMPILER_2005} )\n\n\n# set this to true if you don't want to rebuild the object files if the rules have changed, \n# but not the actual source files or headers (e.g. if you changed the some compiler switches) \nmessage( STATUS \"CMAKE_SKIP_RULE_DEPENDENCY: \" ${CMAKE_SKIP_RULE_DEPENDENCY} )\n\n# since CMake 2.1 the install rule depends on all, i.e. everything will be built before installing. \n# If you don't like this, set this one to true.\nmessage( STATUS \"CMAKE_SKIP_INSTALL_ALL_DEPENDENCY: \" ${CMAKE_SKIP_INSTALL_ALL_DEPENDENCY} )\n\n# If set, runtime paths are not added when using shared libraries. Default it is set to OFF\nmessage( STATUS \"CMAKE_SKIP_RPATH: \" ${CMAKE_SKIP_RPATH} )\n\n# set this to true if you are using makefiles and want to see the full compile and link \n# commands instead of only the shortened ones \nmessage( STATUS \"CMAKE_VERBOSE_MAKEFILE: \" ${CMAKE_VERBOSE_MAKEFILE} )\n\n# this will cause CMake to not put in the rules that re-run CMake. This might be useful if \n# you want to use the generated build files on another machine. \nmessage( STATUS \"CMAKE_SUPPRESS_REGENERATION: \" ${CMAKE_SUPPRESS_REGENERATION} )\n\n\n# A simple way to get switches to the compiler is to use add_definitions(). \n# But there are also two variables exactly for this purpose: \n\n# the compiler flags for compiling C sources \nmessage( STATUS \"CMAKE_C_FLAGS: \" ${CMAKE_C_FLAGS} )\n\n# the compiler flags for compiling C++ sources \nmessage( STATUS \"CMAKE_CXX_FLAGS: \" ${CMAKE_CXX_FLAGS} )\n\n\n# Choose the type of build.  Example: set(CMAKE_BUILD_TYPE Debug) \nmessage( STATUS \"CMAKE_BUILD_TYPE: \" ${CMAKE_BUILD_TYPE} )\n\n# if this is set to ON, then all libraries are built as shared libraries by default.\nmessage( STATUS \"BUILD_SHARED_LIBS: \" ${BUILD_SHARED_LIBS} )\n\n# the compiler used for C files \nmessage( STATUS \"CMAKE_C_COMPILER: \" ${CMAKE_C_COMPILER} )\n\n# the compiler used for C++ files \nmessage( STATUS \"CMAKE_CXX_COMPILER: \" ${CMAKE_CXX_COMPILER} )\n\n# if the compiler is a variant of gcc, this should be set to 1 \nmessage( STATUS \"CMAKE_COMPILER_IS_GNUCC: \" ${CMAKE_COMPILER_IS_GNUCC} )\n\n# if the compiler is a variant of g++, this should be set to 1 \nmessage( STATUS \"CMAKE_COMPILER_IS_GNUCXX : \" ${CMAKE_COMPILER_IS_GNUCXX} )\n\n# the tools for creating libraries \nmessage( STATUS \"CMAKE_AR: \" ${CMAKE_AR} )\nmessage( STATUS \"CMAKE_RANLIB: \" ${CMAKE_RANLIB} )\n\n#\n#message( STATUS \": \" ${} )\n\n# ------------------------- End of Generic CMake Variable Logging ------------------\n"
  },
  {
    "path": "ProcessorCount.cmake",
    "content": "# - ProcessorCount(var)\n# Determine the number of processors/cores and save value in ${var}\n#\n# Sets the variable named ${var} to the number of physical cores available on\n# the machine if the information can be determined. Otherwise it is set to 0.\n# Currently this functionality is implemented for AIX, cygwin, FreeBSD, HPUX,\n# IRIX, Linux, Mac OS X, QNX, Sun and Windows.\n#\n# This function is guaranteed to return a positive integer (>=1) if it\n# succeeds. It returns 0 if there's a problem determining the processor count.\n#\n# Example use, in a ctest -S dashboard script:\n#\n#   include(ProcessorCount)\n#   ProcessorCount(N)\n#   if(NOT N EQUAL 0)\n#     set(CTEST_BUILD_FLAGS -j${N})\n#     set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})\n#   endif()\n#\n# This function is intended to offer an approximation of the value of the\n# number of compute cores available on the current machine, such that you\n# may use that value for parallel building and parallel testing. It is meant\n# to help utilize as much of the machine as seems reasonable. Of course,\n# knowledge of what else might be running on the machine simultaneously\n# should be used when deciding whether to request a machine's full capacity\n# all for yourself.\n\n# A more reliable way might be to compile a small C program that uses the CPUID\n# instruction, but that again requires compiler support or compiling assembler\n# code.\n\n#=============================================================================\n# Copyright 2010-2011 Kitware, Inc.\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of CMake, substitute the full\n#  License text for the above reference.)\n\nfunction(ProcessorCount var)\n  # Unknown:\n  set(count 0)\n\n  if(WIN32)\n    # Windows:\n    set(count \"$ENV{NUMBER_OF_PROCESSORS}\")\n    #message(\"ProcessorCount: WIN32, trying environment variable\")\n  endif()\n\n  if(NOT count)\n    # Mac, FreeBSD, OpenBSD (systems with sysctl):\n    find_program(ProcessorCount_cmd_sysctl sysctl\n      PATHS /usr/sbin /sbin)\n    if(ProcessorCount_cmd_sysctl)\n      execute_process(COMMAND ${ProcessorCount_cmd_sysctl} -n hw.ncpu\n        ERROR_QUIET\n        OUTPUT_STRIP_TRAILING_WHITESPACE\n        OUTPUT_VARIABLE count)\n      #message(\"ProcessorCount: trying sysctl '${ProcessorCount_cmd_sysctl}'\")\n    endif()\n  endif()\n\n  if(NOT count)\n    # Linux (systems with getconf):\n    find_program(ProcessorCount_cmd_getconf getconf)\n    if(ProcessorCount_cmd_getconf)\n      execute_process(COMMAND ${ProcessorCount_cmd_getconf} _NPROCESSORS_ONLN\n        ERROR_QUIET\n        OUTPUT_STRIP_TRAILING_WHITESPACE\n        OUTPUT_VARIABLE count)\n      #message(\"ProcessorCount: trying getconf '${ProcessorCount_cmd_getconf}'\")\n    endif()\n  endif()\n\n  if(NOT count)\n    # HPUX (systems with machinfo):\n    find_program(ProcessorCount_cmd_machinfo machinfo\n      PATHS /usr/contrib/bin)\n    if(ProcessorCount_cmd_machinfo)\n      execute_process(COMMAND ${ProcessorCount_cmd_machinfo}\n        ERROR_QUIET\n        OUTPUT_STRIP_TRAILING_WHITESPACE\n        OUTPUT_VARIABLE machinfo_output)\n      string(REGEX MATCHALL \"Number of CPUs = ([0-9]+)\" procs \"${machinfo_output}\")\n      set(count \"${CMAKE_MATCH_1}\")\n      #message(\"ProcessorCount: trying machinfo '${ProcessorCount_cmd_machinfo}'\")\n    endif()\n  endif()\n\n  if(NOT count)\n    # IRIX (systems with hinv):\n    find_program(ProcessorCount_cmd_hinv hinv\n      PATHS /sbin)\n    if(ProcessorCount_cmd_hinv)\n      execute_process(COMMAND ${ProcessorCount_cmd_hinv}\n        ERROR_QUIET\n        OUTPUT_STRIP_TRAILING_WHITESPACE\n        OUTPUT_VARIABLE hinv_output)\n      string(REGEX MATCHALL \"([0-9]+) .* Processors\" procs \"${hinv_output}\")\n      set(count \"${CMAKE_MATCH_1}\")\n      #message(\"ProcessorCount: trying hinv '${ProcessorCount_cmd_hinv}'\")\n    endif()\n  endif()\n\n  if(NOT count)\n    # AIX (systems with lsconf):\n    find_program(ProcessorCount_cmd_lsconf lsconf\n      PATHS /usr/sbin)\n    if(ProcessorCount_cmd_lsconf)\n      execute_process(COMMAND ${ProcessorCount_cmd_lsconf}\n        ERROR_QUIET\n        OUTPUT_STRIP_TRAILING_WHITESPACE\n        OUTPUT_VARIABLE lsconf_output)\n      string(REGEX MATCHALL \"Number Of Processors: ([0-9]+)\" procs \"${lsconf_output}\")\n      set(count \"${CMAKE_MATCH_1}\")\n      #message(\"ProcessorCount: trying lsconf '${ProcessorCount_cmd_lsconf}'\")\n    endif()\n  endif()\n\n  if(NOT count)\n    # QNX (systems with pidin):\n    find_program(ProcessorCount_cmd_pidin pidin)\n    if(ProcessorCount_cmd_pidin)\n      execute_process(COMMAND ${ProcessorCount_cmd_pidin} info\n        ERROR_QUIET\n        OUTPUT_STRIP_TRAILING_WHITESPACE\n        OUTPUT_VARIABLE pidin_output)\n      string(REGEX MATCHALL \"Processor[0-9]+: \" procs \"${pidin_output}\")\n      list(LENGTH procs count)\n      #message(\"ProcessorCount: trying pidin '${ProcessorCount_cmd_pidin}'\")\n    endif()\n  endif()\n\n  if(NOT count)\n    # Sun (systems where uname -X emits \"NumCPU\" in its output):\n    find_program(ProcessorCount_cmd_uname uname)\n    if(ProcessorCount_cmd_uname)\n      execute_process(COMMAND ${ProcessorCount_cmd_uname} -X\n        ERROR_QUIET\n        OUTPUT_STRIP_TRAILING_WHITESPACE\n        OUTPUT_VARIABLE uname_X_output)\n      string(REGEX MATCHALL \"NumCPU = ([0-9]+)\" procs \"${uname_X_output}\")\n      set(count \"${CMAKE_MATCH_1}\")\n      #message(\"ProcessorCount: trying uname -X '${ProcessorCount_cmd_uname}'\")\n    endif()\n  endif()\n\n  # Execute this code when all previously attempted methods return empty\n  # output:\n  #\n  if(NOT count)\n    # Systems with /proc/cpuinfo:\n    set(cpuinfo_file /proc/cpuinfo)\n    if(EXISTS \"${cpuinfo_file}\")\n      file(STRINGS \"${cpuinfo_file}\" procs REGEX \"^processor.: [0-9]+$\")\n      list(LENGTH procs count)\n      #message(\"ProcessorCount: trying cpuinfo '${cpuinfo_file}'\")\n    endif()\n  endif()\n\n  # Since cygwin builds of CMake do not define WIN32 anymore, but they still\n  # run on Windows, and will still have this env var defined:\n  #\n  if(NOT count)\n    set(count \"$ENV{NUMBER_OF_PROCESSORS}\")\n    #message(\"ProcessorCount: last fallback, trying environment variable\")\n  endif()\n\n  # Ensure an integer return (avoid inadvertently returning an empty string\n  # or an error string)... If it's not a decimal integer, return 0:\n  #\n  if(NOT count MATCHES \"^[0-9]+$\")\n    set(count 0)\n  endif()\n\n  set(${var} ${count} PARENT_SCOPE)\nendfunction()"
  },
  {
    "path": "README.md",
    "content": "Additional CMake Modules\n========================\n\nIntroduction\n------------\n\nThis is a collection of additional CMake modules.\nMost of them are from Ryan Pavlik (<http://academic.cleardefinition.com>).\n\nHow to Integrate\n----------------\n\nThese modules are probably best placed wholesale into a \"cmake\" subdirectory\nof your project source.\n\nIf you use Git, try installing [git-subtree][1],\nso you can easily use this repository for subtree merges, updating simply.\n\nFor the initial checkout:\n\n\tcd projectdir\n\n\tgit subtree add --squash --prefix=cmake git@github.com:bilke/cmake-modules.git master\n\nFor updates:\n\n\tcd projectdir\n\n\tgit subtree pull --squash --prefix=cmake git@github.com:bilke/cmake-modules.git master\n\nFor pushing to upstream:\n\n\tcd projectdir\n\n\tgit subtree push --prefix=cmake git@github.com:bilke/cmake-modules.git master\n\n\nHow to Use\n----------\n\nAt the minimum, all you have to do is add a line like this near the top\nof your root CMakeLists.txt file (but not before your project() call):\n\n\tlist(APPEND CMAKE_MODULE_PATH \"${CMAKE_SOURCE_DIR}/cmake\")\n\n\nLicenses\n--------\n\nThe modules that are written by Ryan Pavlik are all subject to this license:\n\n> Copyright Iowa State University 2009-2011\n>\n> Distributed under the Boost Software License, Version 1.0.\n>\n> (See accompanying file `LICENSE_1_0.txt` or copy at\n> <http://www.boost.org/LICENSE_1_0.txt>)\n\nModules based on those included with CMake as well as modules added by me (Lars\nBilke) are under the OSI-approved **BSD** license, which is included in each of\nthose modules. A few other modules are modified from other sources - when in\ndoubt, look at the .cmake.\n\nImportant License Note!\n-----------------------\n\nIf you find this file inside of another project, rather at the top-level\ndirectory, you're in a separate project that is making use of these modules.\nThat separate project can (and probably does) have its own license specifics.\n\n\n[1]: http://github.com/apenwarr/git-subtree  \"Git Subtree master\"\n"
  },
  {
    "path": "ResetConfigurations.cmake",
    "content": "# - Re-set the available configurations to just RelWithDebInfo, Release, and Debug\n#\n# Requires these CMake modules:\n#  no additional modules required\n#\n# Original Author:\n# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n#\n\n\nif(__reset_configurations)\n    return()\nendif()\nset(__reset_configurations YES)\n\nif(CMAKE_CONFIGURATION_TYPES)\n    set(CMAKE_CONFIGURATION_TYPES \"RelWithDebInfo;Release;Debug\")\n    set(CMAKE_CONFIGURATION_TYPES\n        \"${CMAKE_CONFIGURATION_TYPES}\"\n        CACHE\n        STRING\n        \"Reset the configurations to what we need\"\n        FORCE)\nendif()\n"
  },
  {
    "path": "SetDefaultBuildType.cmake",
    "content": "# - Set a developer-chosen default build type\n#\n# Requires these CMake modules:\n#  no additional modules required\n#\n# Original Author:\n# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n#\n\n\nif(__set_default_build_type)\n    return()\nendif()\nset(__set_default_build_type YES)\n\nfunction(set_default_build_type _type)\n    #if(DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE)\n    if((\"${CMAKE_GENERATOR}\" MATCHES \"Makefiles\" OR \"${CMAKE_GENERATOR}\" MATCHES \"Ninja\") AND NOT CMAKE_BUILD_TYPE)\n        if(NOT __DEFAULT_BUILD_TYPE_SET)\n            set(CMAKE_BUILD_TYPE \"${_type}\" CACHE STRING \"\" FORCE)\n            set(__DEFAULT_BUILD_TYPE_SET YES CACHE INTERNAL \"\")\n        endif()\n    endif()\nendfunction()\n"
  },
  {
    "path": "cotire-license",
    "content": "Copyright (c) 2012-2016 Sascha Kratky\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "cotire.cmake",
    "content": "# - cotire (compile time reducer)\n#\n# See the cotire manual for usage hints.\n#\n#=============================================================================\n# Copyright 2012-2018 Sascha Kratky\n#\n# Permission is hereby granted, free of charge, to any person\n# obtaining a copy of this software and associated documentation\n# files (the \"Software\"), to deal in the Software without\n# restriction, including without limitation the rights to use,\n# copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the\n# Software is furnished to do so, subject to the following\n# conditions:\n#\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n#=============================================================================\n\nif(__COTIRE_INCLUDED)\n\treturn()\nendif()\nset(__COTIRE_INCLUDED TRUE)\n\n# call cmake_minimum_required, but prevent modification of the CMake policy stack in include mode\n# cmake_minimum_required also sets the policy version as a side effect, which we have to avoid\nif (NOT CMAKE_SCRIPT_MODE_FILE)\n\tcmake_policy(PUSH)\nendif()\ncmake_minimum_required(VERSION 2.8.12)\nif (NOT CMAKE_SCRIPT_MODE_FILE)\n\tcmake_policy(POP)\nendif()\n\nset (COTIRE_CMAKE_MODULE_FILE \"${CMAKE_CURRENT_LIST_FILE}\")\nset (COTIRE_CMAKE_MODULE_VERSION \"1.8.0\")\n\n# activate select policies\nif (POLICY CMP0025)\n\t# Compiler id for Apple Clang is now AppleClang\n\tcmake_policy(SET CMP0025 NEW)\nendif()\n\nif (POLICY CMP0026)\n\t# disallow use of the LOCATION target property\n\tcmake_policy(SET CMP0026 NEW)\nendif()\n\nif (POLICY CMP0038)\n\t# targets may not link directly to themselves\n\tcmake_policy(SET CMP0038 NEW)\nendif()\n\nif (POLICY CMP0039)\n\t# utility targets may not have link dependencies\n\tcmake_policy(SET CMP0039 NEW)\nendif()\n\nif (POLICY CMP0040)\n\t# target in the TARGET signature of add_custom_command() must exist\n\tcmake_policy(SET CMP0040 NEW)\nendif()\n\nif (POLICY CMP0045)\n\t# error on non-existent target in get_target_property\n\tcmake_policy(SET CMP0045 NEW)\nendif()\n\nif (POLICY CMP0046)\n\t# error on non-existent dependency in add_dependencies\n\tcmake_policy(SET CMP0046 NEW)\nendif()\n\nif (POLICY CMP0049)\n\t# do not expand variables in target source entries\n\tcmake_policy(SET CMP0049 NEW)\nendif()\n\nif (POLICY CMP0050)\n\t# disallow add_custom_command SOURCE signatures\n\tcmake_policy(SET CMP0050 NEW)\nendif()\n\nif (POLICY CMP0051)\n\t# include TARGET_OBJECTS expressions in a target's SOURCES property\n\tcmake_policy(SET CMP0051 NEW)\nendif()\n\nif (POLICY CMP0053)\n\t# simplify variable reference and escape sequence evaluation\n\tcmake_policy(SET CMP0053 NEW)\nendif()\n\nif (POLICY CMP0054)\n\t# only interpret if() arguments as variables or keywords when unquoted\n\tcmake_policy(SET CMP0054 NEW)\nendif()\n\nif (POLICY CMP0055)\n\t# strict checking for break() command\n\tcmake_policy(SET CMP0055 NEW)\nendif()\n\ninclude(CMakeParseArguments)\ninclude(ProcessorCount)\n\nfunction (cotire_get_configuration_types _configsVar)\n\tset (_configs \"\")\n\tif (CMAKE_CONFIGURATION_TYPES)\n\t\tlist (APPEND _configs ${CMAKE_CONFIGURATION_TYPES})\n\tendif()\n\tif (CMAKE_BUILD_TYPE)\n\t\tlist (APPEND _configs \"${CMAKE_BUILD_TYPE}\")\n\tendif()\n\tif (_configs)\n\t\tlist (REMOVE_DUPLICATES _configs)\n\t\tset (${_configsVar} ${_configs} PARENT_SCOPE)\n\telse()\n\t\tset (${_configsVar} \"None\" PARENT_SCOPE)\n\tendif()\nendfunction()\n\nfunction (cotire_get_source_file_extension _sourceFile _extVar)\n\t# get_filename_component returns extension from first occurrence of . in file name\n\t# this function computes the extension from last occurrence of . in file name\n\tstring (FIND \"${_sourceFile}\" \".\" _index REVERSE)\n\tif (_index GREATER -1)\n\t\tmath (EXPR _index \"${_index} + 1\")\n\t\tstring (SUBSTRING \"${_sourceFile}\" ${_index} -1 _sourceExt)\n\telse()\n\t\tset (_sourceExt \"\")\n\tendif()\n\tset (${_extVar} \"${_sourceExt}\" PARENT_SCOPE)\nendfunction()\n\nmacro (cotire_check_is_path_relative_to _path _isRelativeVar)\n\tset (${_isRelativeVar} FALSE)\n\tif (IS_ABSOLUTE \"${_path}\")\n\t\tforeach (_dir ${ARGN})\n\t\t\tfile (RELATIVE_PATH _relPath \"${_dir}\" \"${_path}\")\n\t\t\tif (NOT _relPath OR (NOT IS_ABSOLUTE \"${_relPath}\" AND NOT \"${_relPath}\" MATCHES \"^\\\\.\\\\.\"))\n\t\t\t\tset (${_isRelativeVar} TRUE)\n\t\t\t\tbreak()\n\t\t\tendif()\n\t\tendforeach()\n\tendif()\nendmacro()\n\nfunction (cotire_filter_language_source_files _language _target _sourceFilesVar _excludedSourceFilesVar _cotiredSourceFilesVar)\n\tif (CMAKE_${_language}_SOURCE_FILE_EXTENSIONS)\n\t\tset (_languageExtensions \"${CMAKE_${_language}_SOURCE_FILE_EXTENSIONS}\")\n\telse()\n\t\tset (_languageExtensions \"\")\n\tendif()\n\tif (CMAKE_${_language}_IGNORE_EXTENSIONS)\n\t\tset (_ignoreExtensions \"${CMAKE_${_language}_IGNORE_EXTENSIONS}\")\n\telse()\n\t\tset (_ignoreExtensions \"\")\n\tendif()\n\tif (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS)\n\t\tset (_excludeExtensions \"${COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS}\")\n\telse()\n\t\tset (_excludeExtensions \"\")\n\tendif()\n\tif (COTIRE_DEBUG AND _languageExtensions)\n\t\tmessage (STATUS \"${_language} source file extensions: ${_languageExtensions}\")\n\tendif()\n\tif (COTIRE_DEBUG AND _ignoreExtensions)\n\t\tmessage (STATUS \"${_language} ignore extensions: ${_ignoreExtensions}\")\n\tendif()\n\tif (COTIRE_DEBUG AND _excludeExtensions)\n\t\tmessage (STATUS \"${_language} exclude extensions: ${_excludeExtensions}\")\n\tendif()\n\tif (CMAKE_VERSION VERSION_LESS \"3.1.0\")\n\t\tset (_allSourceFiles ${ARGN})\n\telse()\n\t\t# as of CMake 3.1 target sources may contain generator expressions\n\t\t# since we cannot obtain required property information about source files added\n\t\t# through generator expressions at configure time, we filter them out\n\t\tstring (GENEX_STRIP \"${ARGN}\" _allSourceFiles)\n\tendif()\n\tset (_filteredSourceFiles \"\")\n\tset (_excludedSourceFiles \"\")\n\tforeach (_sourceFile ${_allSourceFiles})\n\t\tget_source_file_property(_sourceIsHeaderOnly \"${_sourceFile}\" HEADER_FILE_ONLY)\n\t\tget_source_file_property(_sourceIsExternal \"${_sourceFile}\" EXTERNAL_OBJECT)\n\t\tget_source_file_property(_sourceIsSymbolic \"${_sourceFile}\" SYMBOLIC)\n\t\tif (NOT _sourceIsHeaderOnly AND NOT _sourceIsExternal AND NOT _sourceIsSymbolic)\n\t\t\tcotire_get_source_file_extension(\"${_sourceFile}\" _sourceExt)\n\t\t\tif (_sourceExt)\n\t\t\t\tlist (FIND _ignoreExtensions \"${_sourceExt}\" _ignoreIndex)\n\t\t\t\tif (_ignoreIndex LESS 0)\n\t\t\t\t\tlist (FIND _excludeExtensions \"${_sourceExt}\" _excludeIndex)\n\t\t\t\t\tif (_excludeIndex GREATER -1)\n\t\t\t\t\t\tlist (APPEND _excludedSourceFiles \"${_sourceFile}\")\n\t\t\t\t\telse()\n\t\t\t\t\t\tlist (FIND _languageExtensions \"${_sourceExt}\" _sourceIndex)\n\t\t\t\t\t\tif (_sourceIndex GREATER -1)\n\t\t\t\t\t\t\t# consider source file unless it is excluded explicitly\n\t\t\t\t\t\t\tget_source_file_property(_sourceIsExcluded \"${_sourceFile}\" COTIRE_EXCLUDED)\n\t\t\t\t\t\t\tif (_sourceIsExcluded)\n\t\t\t\t\t\t\t\tlist (APPEND _excludedSourceFiles \"${_sourceFile}\")\n\t\t\t\t\t\t\telse()\n\t\t\t\t\t\t\t\tlist (APPEND _filteredSourceFiles \"${_sourceFile}\")\n\t\t\t\t\t\t\tendif()\n\t\t\t\t\t\telse()\n\t\t\t\t\t\t\tget_source_file_property(_sourceLanguage \"${_sourceFile}\" LANGUAGE)\n\t\t\t\t\t\t\tif (\"${_sourceLanguage}\" STREQUAL \"${_language}\")\n\t\t\t\t\t\t\t\t# add to excluded sources, if file is not ignored and has correct language without having the correct extension\n\t\t\t\t\t\t\t\tlist (APPEND _excludedSourceFiles \"${_sourceFile}\")\n\t\t\t\t\t\t\tendif()\n\t\t\t\t\t\tendif()\n\t\t\t\t\tendif()\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\tendforeach()\n\t# separate filtered source files from already cotired ones\n\t# the COTIRE_TARGET property of a source file may be set while a target is being processed by cotire\n\tset (_sourceFiles \"\")\n\tset (_cotiredSourceFiles \"\")\n\tforeach (_sourceFile ${_filteredSourceFiles})\n\t\tget_source_file_property(_sourceIsCotired \"${_sourceFile}\" COTIRE_TARGET)\n\t\tif (_sourceIsCotired)\n\t\t\tlist (APPEND _cotiredSourceFiles \"${_sourceFile}\")\n\t\telse()\n\t\t\tget_source_file_property(_sourceCompileFlags \"${_sourceFile}\" COMPILE_FLAGS)\n\t\t\tif (_sourceCompileFlags)\n\t\t\t\t# add to excluded sources, if file has custom compile flags\n\t\t\t\tlist (APPEND _excludedSourceFiles \"${_sourceFile}\")\n\t\t\telse()\n\t\t\t\tget_source_file_property(_sourceCompileOptions \"${_sourceFile}\" COMPILE_OPTIONS)\n\t\t\t\tif (_sourceCompileOptions)\n\t\t\t\t\t# add to excluded sources, if file has list of custom compile options\n\t\t\t\t\tlist (APPEND _excludedSourceFiles \"${_sourceFile}\")\n\t\t\t\telse()\n\t\t\t\t\tlist (APPEND _sourceFiles \"${_sourceFile}\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\tendforeach()\n\tif (COTIRE_DEBUG)\n\t\tif (_sourceFiles)\n\t\t\tmessage (STATUS \"Filtered ${_target} ${_language} sources: ${_sourceFiles}\")\n\t\tendif()\n\t\tif (_excludedSourceFiles)\n\t\t\tmessage (STATUS \"Excluded ${_target} ${_language} sources: ${_excludedSourceFiles}\")\n\t\tendif()\n\t\tif (_cotiredSourceFiles)\n\t\t\tmessage (STATUS \"Cotired ${_target} ${_language} sources: ${_cotiredSourceFiles}\")\n\t\tendif()\n\tendif()\n\tset (${_sourceFilesVar} ${_sourceFiles} PARENT_SCOPE)\n\tset (${_excludedSourceFilesVar} ${_excludedSourceFiles} PARENT_SCOPE)\n\tset (${_cotiredSourceFilesVar} ${_cotiredSourceFiles} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_objects_with_property_on _filteredObjectsVar _property _type)\n\tset (_filteredObjects \"\")\n\tforeach (_object ${ARGN})\n\t\tget_property(_isSet ${_type} \"${_object}\" PROPERTY ${_property} SET)\n\t\tif (_isSet)\n\t\t\tget_property(_propertyValue ${_type} \"${_object}\" PROPERTY ${_property})\n\t\t\tif (_propertyValue)\n\t\t\t\tlist (APPEND _filteredObjects \"${_object}\")\n\t\t\tendif()\n\t\tendif()\n\tendforeach()\n\tset (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_objects_with_property_off _filteredObjectsVar _property _type)\n\tset (_filteredObjects \"\")\n\tforeach (_object ${ARGN})\n\t\tget_property(_isSet ${_type} \"${_object}\" PROPERTY ${_property} SET)\n\t\tif (_isSet)\n\t\t\tget_property(_propertyValue ${_type} \"${_object}\" PROPERTY ${_property})\n\t\t\tif (NOT _propertyValue)\n\t\t\t\tlist (APPEND _filteredObjects \"${_object}\")\n\t\t\tendif()\n\t\tendif()\n\tendforeach()\n\tset (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_source_file_property_values _valuesVar _property)\n\tset (_values \"\")\n\tforeach (_sourceFile ${ARGN})\n\t\tget_source_file_property(_propertyValue \"${_sourceFile}\" ${_property})\n\t\tif (_propertyValue)\n\t\t\tlist (APPEND _values \"${_propertyValue}\")\n\t\tendif()\n\tendforeach()\n\tset (${_valuesVar} ${_values} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_resolve_config_properties _configurations _propertiesVar)\n\tset (_properties \"\")\n\tforeach (_property ${ARGN})\n\t\tif (\"${_property}\" MATCHES \"<CONFIG>\")\n\t\t\tforeach (_config ${_configurations})\n\t\t\t\tstring (TOUPPER \"${_config}\" _upperConfig)\n\t\t\t\tstring (REPLACE \"<CONFIG>\" \"${_upperConfig}\" _configProperty \"${_property}\")\n\t\t\t\tlist (APPEND _properties ${_configProperty})\n\t\t\tendforeach()\n\t\telse()\n\t\t\tlist (APPEND _properties ${_property})\n\t\tendif()\n\tendforeach()\n\tset (${_propertiesVar} ${_properties} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_copy_set_properties _configurations _type _source _target)\n\tcotire_resolve_config_properties(\"${_configurations}\" _properties ${ARGN})\n\tforeach (_property ${_properties})\n\t\tget_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET)\n\t\tif (_isSet)\n\t\t\tget_property(_propertyValue ${_type} ${_source} PROPERTY ${_property})\n\t\t\tset_property(${_type} ${_target} PROPERTY ${_property} \"${_propertyValue}\")\n\t\tendif()\n\tendforeach()\nendfunction()\n\nfunction (cotire_get_target_usage_requirements _target _config _targetRequirementsVar)\n\tset (_targetRequirements \"\")\n\tget_target_property(_librariesToProcess ${_target} LINK_LIBRARIES)\n\twhile (_librariesToProcess)\n\t\t# remove from head\n\t\tlist (GET _librariesToProcess 0 _library)\n\t\tlist (REMOVE_AT _librariesToProcess 0)\n\t\tif (_library MATCHES \"^\\\\$<\\\\$<CONFIG:${_config}>:([A-Za-z0-9_:-]+)>$\")\n\t\t\tset (_library \"${CMAKE_MATCH_1}\")\n\t\telseif (_config STREQUAL \"None\" AND _library MATCHES \"^\\\\$<\\\\$<CONFIG:>:([A-Za-z0-9_:-]+)>$\")\n\t\t\tset (_library \"${CMAKE_MATCH_1}\")\n\t\tendif()\n\t\tif (TARGET ${_library})\n\t\t\tlist (FIND _targetRequirements ${_library} _index)\n\t\t\tif (_index LESS 0)\n\t\t\t\tlist (APPEND _targetRequirements ${_library})\n\t\t\t\t# BFS traversal of transitive libraries\n\t\t\t\tget_target_property(_libraries ${_library} INTERFACE_LINK_LIBRARIES)\n\t\t\t\tif (_libraries)\n\t\t\t\t\tlist (APPEND _librariesToProcess ${_libraries})\n\t\t\t\t\tlist (REMOVE_DUPLICATES _librariesToProcess)\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\tendwhile()\n\tset (${_targetRequirementsVar} ${_targetRequirements} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_filter_compile_flags _language _flagFilter _matchedOptionsVar _unmatchedOptionsVar)\n\tif (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC|Intel\")\n\t\tset (_flagPrefix \"[/-]\")\n\telse()\n\t\tset (_flagPrefix \"--?\")\n\tendif()\n\tset (_optionFlag \"\")\n\tset (_matchedOptions \"\")\n\tset (_unmatchedOptions \"\")\n\tforeach (_compileFlag ${ARGN})\n\t\tif (_compileFlag)\n\t\t\tif (_optionFlag AND NOT \"${_compileFlag}\" MATCHES \"^${_flagPrefix}\")\n\t\t\t\t# option with separate argument\n\t\t\t\tlist (APPEND _matchedOptions \"${_compileFlag}\")\n\t\t\t\tset (_optionFlag \"\")\n\t\t\telseif (\"${_compileFlag}\" MATCHES \"^(${_flagPrefix})(${_flagFilter})$\")\n\t\t\t\t# remember option\n\t\t\t\tset (_optionFlag \"${CMAKE_MATCH_2}\")\n\t\t\telseif (\"${_compileFlag}\" MATCHES \"^(${_flagPrefix})(${_flagFilter})(.+)$\")\n\t\t\t\t# option with joined argument\n\t\t\t\tlist (APPEND _matchedOptions \"${CMAKE_MATCH_3}\")\n\t\t\t\tset (_optionFlag \"\")\n\t\t\telse()\n\t\t\t\t# flush remembered option\n\t\t\t\tif (_optionFlag)\n\t\t\t\t\tlist (APPEND _matchedOptions \"${_optionFlag}\")\n\t\t\t\t\tset (_optionFlag \"\")\n\t\t\t\tendif()\n\t\t\t\t# add to unfiltered options\n\t\t\t\tlist (APPEND _unmatchedOptions \"${_compileFlag}\")\n\t\t\tendif()\n\t\tendif()\n\tendforeach()\n\tif (_optionFlag)\n\t\tlist (APPEND _matchedOptions \"${_optionFlag}\")\n\tendif()\n\tif (COTIRE_DEBUG AND _matchedOptions)\n\t\tmessage (STATUS \"Filter ${_flagFilter} matched: ${_matchedOptions}\")\n\tendif()\n\tif (COTIRE_DEBUG AND _unmatchedOptions)\n\t\tmessage (STATUS \"Filter ${_flagFilter} unmatched: ${_unmatchedOptions}\")\n\tendif()\n\tset (${_matchedOptionsVar} ${_matchedOptions} PARENT_SCOPE)\n\tset (${_unmatchedOptionsVar} ${_unmatchedOptions} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_is_target_supported _target _isSupportedVar)\n\tif (NOT TARGET \"${_target}\")\n\t\tset (${_isSupportedVar} FALSE PARENT_SCOPE)\n\t\treturn()\n\tendif()\n\tget_target_property(_imported ${_target} IMPORTED)\n\tif (_imported)\n\t\tset (${_isSupportedVar} FALSE PARENT_SCOPE)\n\t\treturn()\n\tendif()\n\tget_target_property(_targetType ${_target} TYPE)\n\tif (NOT _targetType MATCHES \"EXECUTABLE|(STATIC|SHARED|MODULE|OBJECT)_LIBRARY\")\n\t\tset (${_isSupportedVar} FALSE PARENT_SCOPE)\n\t\treturn()\n\tendif()\n\tset (${_isSupportedVar} TRUE PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_target_compile_flags _config _language _target _flagsVar)\n\tstring (TOUPPER \"${_config}\" _upperConfig)\n\t# collect options from CMake language variables\n\tset (_compileFlags \"\")\n\tif (CMAKE_${_language}_FLAGS)\n\t\tset (_compileFlags \"${_compileFlags} ${CMAKE_${_language}_FLAGS}\")\n\tendif()\n\tif (CMAKE_${_language}_FLAGS_${_upperConfig})\n\t\tset (_compileFlags \"${_compileFlags} ${CMAKE_${_language}_FLAGS_${_upperConfig}}\")\n\tendif()\n\tif (_target)\n\t\t# add target compile flags\n\t\tget_target_property(_targetflags ${_target} COMPILE_FLAGS)\n\t\tif (_targetflags)\n\t\t\tset (_compileFlags \"${_compileFlags} ${_targetflags}\")\n\t\tendif()\n\tendif()\n\tif (UNIX)\n\t\tseparate_arguments(_compileFlags UNIX_COMMAND \"${_compileFlags}\")\n\telseif(WIN32)\n\t\tseparate_arguments(_compileFlags WINDOWS_COMMAND \"${_compileFlags}\")\n\telse()\n\t\tseparate_arguments(_compileFlags)\n\tendif()\n\t# target compile options\n\tif (_target)\n\t\tget_target_property(_targetOptions ${_target} COMPILE_OPTIONS)\n\t\tif (_targetOptions)\n\t\t\tlist (APPEND _compileFlags ${_targetOptions})\n\t\tendif()\n\tendif()\n\t# interface compile options from linked library targets\n\tif (_target)\n\t\tset (_linkedTargets \"\")\n\t\tcotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)\n\t\tforeach (_linkedTarget ${_linkedTargets})\n\t\t\tget_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS)\n\t\t\tif (_targetOptions)\n\t\t\t\tlist (APPEND _compileFlags ${_targetOptions})\n\t\t\tendif()\n\t\tendforeach()\n\tendif()\n\t# handle language standard properties\n\tif (CMAKE_${_language}_STANDARD_DEFAULT)\n\t\t# used compiler supports language standard levels\n\t\tif (_target)\n\t\t\tget_target_property(_targetLanguageStandard ${_target} ${_language}_STANDARD)\n\t\t\tif (_targetLanguageStandard)\n\t\t\t\tset (_type \"EXTENSION\")\n\t\t\t\tget_property(_isSet TARGET ${_target} PROPERTY ${_language}_EXTENSIONS SET)\n\t\t\t\tif (_isSet)\n\t\t\t\t\tget_target_property(_targetUseLanguageExtensions ${_target} ${_language}_EXTENSIONS)\n\t\t\t\t\tif (NOT _targetUseLanguageExtensions)\n\t\t\t\t\t\tset (_type \"STANDARD\")\n\t\t\t\t\tendif()\n\t\t\t\tendif()\n\t\t\t\tif (CMAKE_${_language}${_targetLanguageStandard}_${_type}_COMPILE_OPTION)\n\t\t\t\t\tlist (APPEND _compileFlags \"${CMAKE_${_language}${_targetLanguageStandard}_${_type}_COMPILE_OPTION}\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\tendif()\n\t# handle the POSITION_INDEPENDENT_CODE target property\n\tif (_target)\n\t\tget_target_property(_targetPIC ${_target} POSITION_INDEPENDENT_CODE)\n\t\tif (_targetPIC)\n\t\t\tget_target_property(_targetType ${_target} TYPE)\n\t\t\tif (_targetType STREQUAL \"EXECUTABLE\" AND CMAKE_${_language}_COMPILE_OPTIONS_PIE)\n\t\t\t\tlist (APPEND _compileFlags \"${CMAKE_${_language}_COMPILE_OPTIONS_PIE}\")\n\t\t\telseif (CMAKE_${_language}_COMPILE_OPTIONS_PIC)\n\t\t\t\tlist (APPEND _compileFlags \"${CMAKE_${_language}_COMPILE_OPTIONS_PIC}\")\n\t\t\tendif()\n\t\tendif()\n\tendif()\n\t# handle visibility target properties\n\tif (_target)\n\t\tget_target_property(_targetVisibility ${_target} ${_language}_VISIBILITY_PRESET)\n\t\tif (_targetVisibility AND CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY)\n\t\t\tlist (APPEND _compileFlags \"${CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY}${_targetVisibility}\")\n\t\tendif()\n\t\tget_target_property(_targetVisibilityInlines ${_target} VISIBILITY_INLINES_HIDDEN)\n\t\tif (_targetVisibilityInlines AND CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN)\n\t\t\tlist (APPEND _compileFlags \"${CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN}\")\n\t\tendif()\n\tendif()\n\t# platform specific flags\n\tif (APPLE)\n\t\tget_target_property(_architectures ${_target} OSX_ARCHITECTURES_${_upperConfig})\n\t\tif (NOT _architectures)\n\t\t\tget_target_property(_architectures ${_target} OSX_ARCHITECTURES)\n\t\tendif()\n\t\tif (_architectures)\n\t\t\tforeach (_arch ${_architectures})\n\t\t\t\tlist (APPEND _compileFlags \"-arch\" \"${_arch}\")\n\t\t\tendforeach()\n\t\tendif()\n\t\tif (CMAKE_OSX_SYSROOT)\n\t\t\tif (CMAKE_${_language}_SYSROOT_FLAG)\n\t\t\t\tlist (APPEND _compileFlags \"${CMAKE_${_language}_SYSROOT_FLAG}\" \"${CMAKE_OSX_SYSROOT}\")\n\t\t\telse()\n\t\t\t\tlist (APPEND _compileFlags \"-isysroot\" \"${CMAKE_OSX_SYSROOT}\")\n\t\t\tendif()\n\t\tendif()\n\t\tif (CMAKE_OSX_DEPLOYMENT_TARGET)\n\t\t\tif (CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG)\n\t\t\t\tlist (APPEND _compileFlags \"${CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}\")\n\t\t\telse()\n\t\t\t\tlist (APPEND _compileFlags \"-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}\")\n\t\t\tendif()\n\t\tendif()\n\tendif()\n\tif (COTIRE_DEBUG AND _compileFlags)\n\t\tmessage (STATUS \"Target ${_target} compile flags: ${_compileFlags}\")\n\tendif()\n\tset (${_flagsVar} ${_compileFlags} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_target_include_directories _config _language _target _includeDirsVar _systemIncludeDirsVar)\n\tset (_includeDirs \"\")\n\tset (_systemIncludeDirs \"\")\n\t# default include dirs\n\tif (CMAKE_INCLUDE_CURRENT_DIR)\n\t\tlist (APPEND _includeDirs \"${CMAKE_CURRENT_BINARY_DIR}\")\n\t\tlist (APPEND _includeDirs \"${CMAKE_CURRENT_SOURCE_DIR}\")\n\tendif()\n\tset (_targetFlags \"\")\n\tcotire_get_target_compile_flags(\"${_config}\" \"${_language}\" \"${_target}\" _targetFlags)\n\t# parse additional include directories from target compile flags\n\tif (CMAKE_INCLUDE_FLAG_${_language})\n\t\tstring (STRIP \"${CMAKE_INCLUDE_FLAG_${_language}}\" _includeFlag)\n\t\tstring (REGEX REPLACE \"^[-/]+\" \"\" _includeFlag \"${_includeFlag}\")\n\t\tif (_includeFlag)\n\t\t\tset (_dirs \"\")\n\t\t\tcotire_filter_compile_flags(\"${_language}\" \"${_includeFlag}\" _dirs _ignore ${_targetFlags})\n\t\t\tif (_dirs)\n\t\t\t\tlist (APPEND _includeDirs ${_dirs})\n\t\t\tendif()\n\t\tendif()\n\tendif()\n\t# parse additional system include directories from target compile flags\n\tif (CMAKE_INCLUDE_SYSTEM_FLAG_${_language})\n\t\tstring (STRIP \"${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}\" _includeFlag)\n\t\tstring (REGEX REPLACE \"^[-/]+\" \"\" _includeFlag \"${_includeFlag}\")\n\t\tif (_includeFlag)\n\t\t\tset (_dirs \"\")\n\t\t\tcotire_filter_compile_flags(\"${_language}\" \"${_includeFlag}\" _dirs _ignore ${_targetFlags})\n\t\t\tif (_dirs)\n\t\t\t\tlist (APPEND _systemIncludeDirs ${_dirs})\n\t\t\tendif()\n\t\tendif()\n\tendif()\n\t# target include directories\n\tget_directory_property(_dirs DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\" INCLUDE_DIRECTORIES)\n\tif (_target)\n\t\tget_target_property(_targetDirs ${_target} INCLUDE_DIRECTORIES)\n\t\tif (_targetDirs)\n\t\t\tlist (APPEND _dirs ${_targetDirs})\n\t\tendif()\n\t\tget_target_property(_targetDirs ${_target} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)\n\t\tif (_targetDirs)\n\t\t\tlist (APPEND _systemIncludeDirs ${_targetDirs})\n\t\tendif()\n\tendif()\n\t# interface include directories from linked library targets\n\tif (_target)\n\t\tset (_linkedTargets \"\")\n\t\tcotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)\n\t\tforeach (_linkedTarget ${_linkedTargets})\n\t\t\tget_target_property(_linkedTargetType ${_linkedTarget} TYPE)\n\t\t\tif (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE AND NOT CMAKE_VERSION VERSION_LESS \"3.4.0\" AND\n\t\t\t\t_linkedTargetType MATCHES \"(STATIC|SHARED|MODULE|OBJECT)_LIBRARY\")\n\t\t\t\t# CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE refers to CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR\n\t\t\t\t# at the time, when the target was created. These correspond to the target properties BINARY_DIR and SOURCE_DIR\n\t\t\t\t# which are only available with CMake 3.4 or later.\n\t\t\t\tget_target_property(_targetDirs ${_linkedTarget} BINARY_DIR)\n\t\t\t\tif (_targetDirs)\n\t\t\t\t\tlist (APPEND _dirs ${_targetDirs})\n\t\t\t\tendif()\n\t\t\t\tget_target_property(_targetDirs ${_linkedTarget} SOURCE_DIR)\n\t\t\t\tif (_targetDirs)\n\t\t\t\t\tlist (APPEND _dirs ${_targetDirs})\n\t\t\t\tendif()\n\t\t\tendif()\n\t\t\tget_target_property(_targetDirs ${_linkedTarget} INTERFACE_INCLUDE_DIRECTORIES)\n\t\t\tif (_targetDirs)\n\t\t\t\tlist (APPEND _dirs ${_targetDirs})\n\t\t\tendif()\n\t\t\tget_target_property(_targetDirs ${_linkedTarget} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)\n\t\t\tif (_targetDirs)\n\t\t\t\tlist (APPEND _systemIncludeDirs ${_targetDirs})\n\t\t\tendif()\n\t\tendforeach()\n\tendif()\n\tif (dirs)\n\t\tlist (REMOVE_DUPLICATES _dirs)\n\tendif()\n\tlist (LENGTH _includeDirs _projectInsertIndex)\n\tforeach (_dir ${_dirs})\n\t\tif (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE)\n\t\t\tcotire_check_is_path_relative_to(\"${_dir}\" _isRelative \"${CMAKE_SOURCE_DIR}\" \"${CMAKE_BINARY_DIR}\")\n\t\t\tif (_isRelative)\n\t\t\t\tlist (LENGTH _includeDirs _len)\n\t\t\t\tif (_len EQUAL _projectInsertIndex)\n\t\t\t\t\tlist (APPEND _includeDirs \"${_dir}\")\n\t\t\t\telse()\n\t\t\t\t\tlist (INSERT _includeDirs _projectInsertIndex \"${_dir}\")\n\t\t\t\tendif()\n\t\t\t\tmath (EXPR _projectInsertIndex \"${_projectInsertIndex} + 1\")\n\t\t\telse()\n\t\t\t\tlist (APPEND _includeDirs \"${_dir}\")\n\t\t\tendif()\n\t\telse()\n\t\t\tlist (APPEND _includeDirs \"${_dir}\")\n\t\tendif()\n\tendforeach()\n\tlist (REMOVE_DUPLICATES _includeDirs)\n\tlist (REMOVE_DUPLICATES _systemIncludeDirs)\n\tif (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)\n\t\tlist (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})\n\tendif()\n\tif (WIN32 AND NOT MINGW)\n\t\t# convert Windows paths in include directories to CMake paths\n\t\tif (_includeDirs)\n\t\t\tset (_paths \"\")\n\t\t\tforeach (_dir ${_includeDirs})\n\t\t\t\tfile (TO_CMAKE_PATH \"${_dir}\" _path)\n\t\t\t\tlist (APPEND _paths \"${_path}\")\n\t\t\tendforeach()\n\t\t\tset (_includeDirs ${_paths})\n\t\tendif()\n\t\tif (_systemIncludeDirs)\n\t\t\tset (_paths \"\")\n\t\t\tforeach (_dir ${_systemIncludeDirs})\n\t\t\t\tfile (TO_CMAKE_PATH \"${_dir}\" _path)\n\t\t\t\tlist (APPEND _paths \"${_path}\")\n\t\t\tendforeach()\n\t\t\tset (_systemIncludeDirs ${_paths})\n\t\tendif()\n\tendif()\n\tif (COTIRE_DEBUG AND _includeDirs)\n\t\tmessage (STATUS \"Target ${_target} include dirs: ${_includeDirs}\")\n\tendif()\n\tset (${_includeDirsVar} ${_includeDirs} PARENT_SCOPE)\n\tif (COTIRE_DEBUG AND _systemIncludeDirs)\n\t\tmessage (STATUS \"Target ${_target} system include dirs: ${_systemIncludeDirs}\")\n\tendif()\n\tset (${_systemIncludeDirsVar} ${_systemIncludeDirs} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_target_export_symbol _target _exportSymbolVar)\n\tset (_exportSymbol \"\")\n\tget_target_property(_targetType ${_target} TYPE)\n\tget_target_property(_enableExports ${_target} ENABLE_EXPORTS)\n\tif (_targetType MATCHES \"(SHARED|MODULE)_LIBRARY\" OR\n\t\t(_targetType STREQUAL \"EXECUTABLE\" AND _enableExports))\n\t\tget_target_property(_exportSymbol ${_target} DEFINE_SYMBOL)\n\t\tif (NOT _exportSymbol)\n\t\t\tset (_exportSymbol \"${_target}_EXPORTS\")\n\t\tendif()\n\t\tstring (MAKE_C_IDENTIFIER \"${_exportSymbol}\" _exportSymbol)\n\tendif()\n\tset (${_exportSymbolVar} ${_exportSymbol} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_target_compile_definitions _config _language _target _definitionsVar)\n\tstring (TOUPPER \"${_config}\" _upperConfig)\n\tset (_configDefinitions \"\")\n\t# CMAKE_INTDIR for multi-configuration build systems\n\tif (NOT \"${CMAKE_CFG_INTDIR}\" STREQUAL \".\")\n\t\tlist (APPEND _configDefinitions \"CMAKE_INTDIR=\\\"${_config}\\\"\")\n\tendif()\n\t# target export define symbol\n\tcotire_get_target_export_symbol(\"${_target}\" _defineSymbol)\n\tif (_defineSymbol)\n\t\tlist (APPEND _configDefinitions \"${_defineSymbol}\")\n\tendif()\n\t# directory compile definitions\n\tget_directory_property(_definitions DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\" COMPILE_DEFINITIONS)\n\tif (_definitions)\n\t\tlist (APPEND _configDefinitions ${_definitions})\n\tendif()\n\tget_directory_property(_definitions DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\" COMPILE_DEFINITIONS_${_upperConfig})\n\tif (_definitions)\n\t\tlist (APPEND _configDefinitions ${_definitions})\n\tendif()\n\t# target compile definitions\n\tget_target_property(_definitions ${_target} COMPILE_DEFINITIONS)\n\tif (_definitions)\n\t\tlist (APPEND _configDefinitions ${_definitions})\n\tendif()\n\tget_target_property(_definitions ${_target} COMPILE_DEFINITIONS_${_upperConfig})\n\tif (_definitions)\n\t\tlist (APPEND _configDefinitions ${_definitions})\n\tendif()\n\t# interface compile definitions from linked library targets\n\tset (_linkedTargets \"\")\n\tcotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)\n\tforeach (_linkedTarget ${_linkedTargets})\n\t\tget_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS)\n\t\tif (_definitions)\n\t\t\tlist (APPEND _configDefinitions ${_definitions})\n\t\tendif()\n\tendforeach()\n\t# parse additional compile definitions from target compile flags\n\t# and do not look at directory compile definitions, which we already handled\n\tset (_targetFlags \"\")\n\tcotire_get_target_compile_flags(\"${_config}\" \"${_language}\" \"${_target}\" _targetFlags)\n\tcotire_filter_compile_flags(\"${_language}\" \"D\" _definitions _ignore ${_targetFlags})\n\tif (_definitions)\n\t\tlist (APPEND _configDefinitions ${_definitions})\n\tendif()\n\tlist (REMOVE_DUPLICATES _configDefinitions)\n\tif (COTIRE_DEBUG AND _configDefinitions)\n\t\tmessage (STATUS \"Target ${_target} compile definitions: ${_configDefinitions}\")\n\tendif()\n\tset (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_target_compiler_flags _config _language _target _compilerFlagsVar)\n\t# parse target compile flags omitting compile definitions and include directives\n\tset (_targetFlags \"\")\n\tcotire_get_target_compile_flags(\"${_config}\" \"${_language}\" \"${_target}\" _targetFlags)\n\tset (_flagFilter \"D\")\n\tif (CMAKE_INCLUDE_FLAG_${_language})\n\t\tstring (STRIP \"${CMAKE_INCLUDE_FLAG_${_language}}\" _includeFlag)\n\t\tstring (REGEX REPLACE \"^[-/]+\" \"\" _includeFlag \"${_includeFlag}\")\n\t\tif (_includeFlag)\n\t\t\tset (_flagFilter \"${_flagFilter}|${_includeFlag}\")\n\t\tendif()\n\tendif()\n\tif (CMAKE_INCLUDE_SYSTEM_FLAG_${_language})\n\t\tstring (STRIP \"${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}\" _includeFlag)\n\t\tstring (REGEX REPLACE \"^[-/]+\" \"\" _includeFlag \"${_includeFlag}\")\n\t\tif (_includeFlag)\n\t\t\tset (_flagFilter \"${_flagFilter}|${_includeFlag}\")\n\t\tendif()\n\tendif()\n\tset (_compilerFlags \"\")\n\tcotire_filter_compile_flags(\"${_language}\" \"${_flagFilter}\" _ignore _compilerFlags ${_targetFlags})\n\tif (COTIRE_DEBUG AND _compilerFlags)\n\t\tmessage (STATUS \"Target ${_target} compiler flags: ${_compilerFlags}\")\n\tendif()\n\tset (${_compilerFlagsVar} ${_compilerFlags} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_add_sys_root_paths _pathsVar)\n\tif (APPLE)\n\t\tif (CMAKE_OSX_SYSROOT AND CMAKE_${_language}_HAS_ISYSROOT)\n\t\t\tforeach (_path IN LISTS ${_pathsVar})\n\t\t\t\tif (IS_ABSOLUTE \"${_path}\")\n\t\t\t\t\tget_filename_component(_path \"${CMAKE_OSX_SYSROOT}/${_path}\" ABSOLUTE)\n\t\t\t\t\tif (EXISTS \"${_path}\")\n\t\t\t\t\t\tlist (APPEND ${_pathsVar} \"${_path}\")\n\t\t\t\t\tendif()\n\t\t\t\tendif()\n\t\t\tendforeach()\n\t\tendif()\n\tendif()\n\tset (${_pathsVar} ${${_pathsVar}} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_source_extra_properties _sourceFile _pattern _resultVar)\n\tset (_extraProperties ${ARGN})\n\tset (_result \"\")\n\tif (_extraProperties)\n\t\tlist (FIND _extraProperties \"${_sourceFile}\" _index)\n\t\tif (_index GREATER -1)\n\t\t\tmath (EXPR _index \"${_index} + 1\")\n\t\t\tlist (LENGTH _extraProperties _len)\n\t\t\tmath (EXPR _len \"${_len} - 1\")\n\t\t\tforeach (_index RANGE ${_index} ${_len})\n\t\t\t\tlist (GET _extraProperties ${_index} _value)\n\t\t\t\tif (_value MATCHES \"${_pattern}\")\n\t\t\t\t\tlist (APPEND _result \"${_value}\")\n\t\t\t\telse()\n\t\t\t\t\tbreak()\n\t\t\t\tendif()\n\t\t\tendforeach()\n\t\tendif()\n\tendif()\n\tset (${_resultVar} ${_result} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_source_compile_definitions _config _language _sourceFile _definitionsVar)\n\tset (_compileDefinitions \"\")\n\tif (NOT CMAKE_SCRIPT_MODE_FILE)\n\t\tstring (TOUPPER \"${_config}\" _upperConfig)\n\t\tget_source_file_property(_definitions \"${_sourceFile}\" COMPILE_DEFINITIONS)\n\t\tif (_definitions)\n\t\t\tlist (APPEND _compileDefinitions ${_definitions})\n\t\tendif()\n\t\tget_source_file_property(_definitions \"${_sourceFile}\" COMPILE_DEFINITIONS_${_upperConfig})\n\t\tif (_definitions)\n\t\t\tlist (APPEND _compileDefinitions ${_definitions})\n\t\tendif()\n\tendif()\n\tcotire_get_source_extra_properties(\"${_sourceFile}\" \"^[a-zA-Z0-9_]+(=.*)?$\" _definitions ${ARGN})\n\tif (_definitions)\n\t\tlist (APPEND _compileDefinitions ${_definitions})\n\tendif()\n\tif (COTIRE_DEBUG AND _compileDefinitions)\n\t\tmessage (STATUS \"Source ${_sourceFile} compile definitions: ${_compileDefinitions}\")\n\tendif()\n\tset (${_definitionsVar} ${_compileDefinitions} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_source_files_compile_definitions _config _language _definitionsVar)\n\tset (_configDefinitions \"\")\n\tforeach (_sourceFile ${ARGN})\n\t\tcotire_get_source_compile_definitions(\"${_config}\" \"${_language}\" \"${_sourceFile}\" _sourceDefinitions)\n\t\tif (_sourceDefinitions)\n\t\t\tlist (APPEND _configDefinitions \"${_sourceFile}\" ${_sourceDefinitions} \"-\")\n\t\tendif()\n\tendforeach()\n\tset (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_source_undefs _sourceFile _property _sourceUndefsVar)\n\tset (_sourceUndefs \"\")\n\tif (NOT CMAKE_SCRIPT_MODE_FILE)\n\t\tget_source_file_property(_undefs \"${_sourceFile}\" ${_property})\n\t\tif (_undefs)\n\t\t\tlist (APPEND _sourceUndefs ${_undefs})\n\t\tendif()\n\tendif()\n\tcotire_get_source_extra_properties(\"${_sourceFile}\" \"^[a-zA-Z0-9_]+$\" _undefs ${ARGN})\n\tif (_undefs)\n\t\tlist (APPEND _sourceUndefs ${_undefs})\n\tendif()\n\tif (COTIRE_DEBUG AND _sourceUndefs)\n\t\tmessage (STATUS \"Source ${_sourceFile} ${_property} undefs: ${_sourceUndefs}\")\n\tendif()\n\tset (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_source_files_undefs _property _sourceUndefsVar)\n\tset (_sourceUndefs \"\")\n\tforeach (_sourceFile ${ARGN})\n\t\tcotire_get_source_undefs(\"${_sourceFile}\" ${_property} _undefs)\n\t\tif (_undefs)\n\t\t\tlist (APPEND _sourceUndefs \"${_sourceFile}\" ${_undefs} \"-\")\n\t\tendif()\n\tendforeach()\n\tset (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE)\nendfunction()\n\nmacro (cotire_set_cmd_to_prologue _cmdVar)\n\tset (${_cmdVar} \"${CMAKE_COMMAND}\")\n\tif (COTIRE_DEBUG)\n\t\tlist (APPEND ${_cmdVar} \"--warn-uninitialized\")\n\tendif()\n\tlist (APPEND ${_cmdVar} \"-DCOTIRE_BUILD_TYPE:STRING=$<CONFIGURATION>\")\n\tif (XCODE)\n\t\tlist (APPEND ${_cmdVar} \"-DXCODE:BOOL=TRUE\")\n\tendif()\n\tif (COTIRE_VERBOSE)\n\t\tlist (APPEND ${_cmdVar} \"-DCOTIRE_VERBOSE:BOOL=ON\")\n\telseif(\"${CMAKE_GENERATOR}\" MATCHES \"Makefiles\")\n\t\tlist (APPEND ${_cmdVar} \"-DCOTIRE_VERBOSE:BOOL=$(VERBOSE)\")\n\tendif()\nendmacro()\n\nfunction (cotire_init_compile_cmd _cmdVar _language _compilerLauncher _compilerExe _compilerArg1)\n\tif (NOT _compilerLauncher)\n\t\tset (_compilerLauncher ${CMAKE_${_language}_COMPILER_LAUNCHER})\n\tendif()\n\tif (NOT _compilerExe)\n\t\tset (_compilerExe \"${CMAKE_${_language}_COMPILER}\")\n\tendif()\n\tif (NOT _compilerArg1)\n\t\tset (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1})\n\tendif()\n\tif (WIN32)\n\t\tfile (TO_NATIVE_PATH \"${_compilerExe}\" _compilerExe)\n\tendif()\n\tstring (STRIP \"${_compilerArg1}\" _compilerArg1)\n\tif (\"${CMAKE_GENERATOR}\" MATCHES \"Make|Ninja\")\n\t\t# compiler launcher is only supported for Makefile and Ninja\n\t\tset (${_cmdVar} ${_compilerLauncher} \"${_compilerExe}\" ${_compilerArg1} PARENT_SCOPE)\n\telse()\n\t\tset (${_cmdVar} \"${_compilerExe}\" ${_compilerArg1} PARENT_SCOPE)\n\tendif()\nendfunction()\n\nmacro (cotire_add_definitions_to_cmd _cmdVar _language)\n\tforeach (_definition ${ARGN})\n\t\tif (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC|Intel\")\n\t\t\tlist (APPEND ${_cmdVar} \"/D${_definition}\")\n\t\telse()\n\t\t\tlist (APPEND ${_cmdVar} \"-D${_definition}\")\n\t\tendif()\n\tendforeach()\nendmacro()\n\nfunction (cotire_add_includes_to_cmd _cmdVar _language _includesVar _systemIncludesVar)\n\tset (_includeDirs ${${_includesVar}} ${${_systemIncludesVar}})\n\tif (_includeDirs)\n\t\tlist (REMOVE_DUPLICATES _includeDirs)\n\t\tforeach (_include ${_includeDirs})\n\t\t\tif (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC|Intel\")\n\t\t\t\tfile (TO_NATIVE_PATH \"${_include}\" _include)\n\t\t\t\tlist (APPEND ${_cmdVar} \"${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}\")\n\t\t\telse()\n\t\t\t\tset (_index -1)\n\t\t\t\tif (\"${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}\" MATCHES \".+\")\n\t\t\t\t\tlist (FIND ${_systemIncludesVar} \"${_include}\" _index)\n\t\t\t\tendif()\n\t\t\t\tif (_index GREATER -1)\n\t\t\t\t\tlist (APPEND ${_cmdVar} \"${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}\")\n\t\t\t\telse()\n\t\t\t\t\tlist (APPEND ${_cmdVar} \"${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendforeach()\n\tendif()\n\tset (${_cmdVar} ${${_cmdVar}} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_add_frameworks_to_cmd _cmdVar _language _includesVar _systemIncludesVar)\n\tif (APPLE)\n\t\tset (_frameworkDirs \"\")\n\t\tforeach (_include ${${_includesVar}})\n\t\t\tif (IS_ABSOLUTE \"${_include}\" AND _include MATCHES \"\\\\.framework$\")\n\t\t\t\tget_filename_component(_frameworkDir \"${_include}\" DIRECTORY)\n\t\t\t\tlist (APPEND _frameworkDirs \"${_frameworkDir}\")\n\t\t\tendif()\n\t\tendforeach()\n\t\tset (_systemFrameworkDirs \"\")\n\t\tforeach (_include ${${_systemIncludesVar}})\n\t\t\tif (IS_ABSOLUTE \"${_include}\" AND _include MATCHES \"\\\\.framework$\")\n\t\t\t\tget_filename_component(_frameworkDir \"${_include}\" DIRECTORY)\n\t\t\t\tlist (APPEND _systemFrameworkDirs \"${_frameworkDir}\")\n\t\t\tendif()\n\t\tendforeach()\n\t\tif (_systemFrameworkDirs)\n\t\t\tlist (APPEND _frameworkDirs ${_systemFrameworkDirs})\n\t\tendif()\n\t\tif (_frameworkDirs)\n\t\t\tlist (REMOVE_DUPLICATES _frameworkDirs)\n\t\t\tforeach (_frameworkDir ${_frameworkDirs})\n\t\t\t\tset (_index -1)\n\t\t\t\tif (\"${CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG}\" MATCHES \".+\")\n\t\t\t\t\tlist (FIND _systemFrameworkDirs \"${_frameworkDir}\" _index)\n\t\t\t\tendif()\n\t\t\t\tif (_index GREATER -1)\n\t\t\t\t\tlist (APPEND ${_cmdVar} \"${CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG}${_frameworkDir}\")\n\t\t\t\telse()\n\t\t\t\t\tlist (APPEND ${_cmdVar} \"${CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG}${_frameworkDir}\")\n\t\t\t\tendif()\n\t\t\tendforeach()\n\t\tendif()\n\tendif()\n\tset (${_cmdVar} ${${_cmdVar}} PARENT_SCOPE)\nendfunction()\n\nmacro (cotire_add_compile_flags_to_cmd _cmdVar)\n\tforeach (_flag ${ARGN})\n\t\tlist (APPEND ${_cmdVar} \"${_flag}\")\n\tendforeach()\nendmacro()\n\nfunction (cotire_check_file_up_to_date _fileIsUpToDateVar _file)\n\tif (EXISTS \"${_file}\")\n\t\tset (_triggerFile \"\")\n\t\tforeach (_dependencyFile ${ARGN})\n\t\t\tif (EXISTS \"${_dependencyFile}\")\n\t\t\t\t# IS_NEWER_THAN returns TRUE if both files have the same timestamp\n\t\t\t\t# thus we do the comparison in both directions to exclude ties\n\t\t\t\tif (\"${_dependencyFile}\" IS_NEWER_THAN \"${_file}\" AND\n\t\t\t\t\tNOT \"${_file}\" IS_NEWER_THAN \"${_dependencyFile}\")\n\t\t\t\t\tset (_triggerFile \"${_dependencyFile}\")\n\t\t\t\t\tbreak()\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendforeach()\n\t\tif (_triggerFile)\n\t\t\tif (COTIRE_VERBOSE)\n\t\t\t\tget_filename_component(_fileName \"${_file}\" NAME)\n\t\t\t\tmessage (STATUS \"${_fileName} update triggered by ${_triggerFile} change.\")\n\t\t\tendif()\n\t\t\tset (${_fileIsUpToDateVar} FALSE PARENT_SCOPE)\n\t\telse()\n\t\t\tif (COTIRE_VERBOSE)\n\t\t\t\tget_filename_component(_fileName \"${_file}\" NAME)\n\t\t\t\tmessage (STATUS \"${_fileName} is up-to-date.\")\n\t\t\tendif()\n\t\t\tset (${_fileIsUpToDateVar} TRUE PARENT_SCOPE)\n\t\tendif()\n\telse()\n\t\tif (COTIRE_VERBOSE)\n\t\t\tget_filename_component(_fileName \"${_file}\" NAME)\n\t\t\tmessage (STATUS \"${_fileName} does not exist yet.\")\n\t\tendif()\n\t\tset (${_fileIsUpToDateVar} FALSE PARENT_SCOPE)\n\tendif()\nendfunction()\n\nmacro (cotire_find_closest_relative_path _headerFile _includeDirs _relPathVar)\n\tset (${_relPathVar} \"\")\n\tforeach (_includeDir ${_includeDirs})\n\t\tif (IS_DIRECTORY \"${_includeDir}\")\n\t\t\tfile (RELATIVE_PATH _relPath \"${_includeDir}\" \"${_headerFile}\")\n\t\t\tif (NOT IS_ABSOLUTE \"${_relPath}\" AND NOT \"${_relPath}\" MATCHES \"^\\\\.\\\\.\")\n\t\t\t\tstring (LENGTH \"${${_relPathVar}}\" _closestLen)\n\t\t\t\tstring (LENGTH \"${_relPath}\" _relLen)\n\t\t\t\tif (_closestLen EQUAL 0 OR _relLen LESS _closestLen)\n\t\t\t\t\tset (${_relPathVar} \"${_relPath}\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\telseif (\"${_includeDir}\" STREQUAL \"${_headerFile}\")\n\t\t\t# if path matches exactly, return short non-empty string\n\t\t\tset (${_relPathVar} \"1\")\n\t\t\tbreak()\n\t\tendif()\n\tendforeach()\nendmacro()\n\nmacro (cotire_check_header_file_location _headerFile _insideIncludeDirs _outsideIncludeDirs _headerIsInside)\n\t# check header path against ignored and honored include directories\n\tcotire_find_closest_relative_path(\"${_headerFile}\" \"${_insideIncludeDirs}\" _insideRelPath)\n\tif (_insideRelPath)\n\t\t# header is inside, but could be become outside if there is a shorter outside match\n\t\tcotire_find_closest_relative_path(\"${_headerFile}\" \"${_outsideIncludeDirs}\" _outsideRelPath)\n\t\tif (_outsideRelPath)\n\t\t\tstring (LENGTH \"${_insideRelPath}\" _insideRelPathLen)\n\t\t\tstring (LENGTH \"${_outsideRelPath}\" _outsideRelPathLen)\n\t\t\tif (_outsideRelPathLen LESS _insideRelPathLen)\n\t\t\t\tset (${_headerIsInside} FALSE)\n\t\t\telse()\n\t\t\t\tset (${_headerIsInside} TRUE)\n\t\t\tendif()\n\t\telse()\n\t\t\tset (${_headerIsInside} TRUE)\n\t\tendif()\n\telse()\n\t\t# header is outside\n\t\tset (${_headerIsInside} FALSE)\n\tendif()\nendmacro()\n\nmacro (cotire_check_ignore_header_file_path _headerFile _headerIsIgnoredVar)\n\tif (NOT EXISTS \"${_headerFile}\")\n\t\tset (${_headerIsIgnoredVar} TRUE)\n\telseif (IS_DIRECTORY \"${_headerFile}\")\n\t\tset (${_headerIsIgnoredVar} TRUE)\n\telseif (\"${_headerFile}\" MATCHES \"\\\\.\\\\.|[_-]fixed\" AND \"${_headerFile}\" MATCHES \"\\\\.h$\")\n\t\t# heuristic: ignore C headers with embedded parent directory references or \"-fixed\" or \"_fixed\" in path\n\t\t# these often stem from using GCC #include_next tricks, which may break the precompiled header compilation\n\t\t# with the error message \"error: no include path in which to search for header.h\"\n\t\tset (${_headerIsIgnoredVar} TRUE)\n\telse()\n\t\tset (${_headerIsIgnoredVar} FALSE)\n\tendif()\nendmacro()\n\nmacro (cotire_check_ignore_header_file_ext _headerFile _ignoreExtensionsVar _headerIsIgnoredVar)\n\t# check header file extension\n\tcotire_get_source_file_extension(\"${_headerFile}\" _headerFileExt)\n\tset (${_headerIsIgnoredVar} FALSE)\n\tif (_headerFileExt)\n\t\tlist (FIND ${_ignoreExtensionsVar} \"${_headerFileExt}\" _index)\n\t\tif (_index GREATER -1)\n\t\t\tset (${_headerIsIgnoredVar} TRUE)\n\t\tendif()\n\tendif()\nendmacro()\n\nmacro (cotire_parse_line _line _headerFileVar _headerDepthVar)\n\tif (MSVC)\n\t\t# cl.exe /showIncludes produces different output, depending on the language pack used, e.g.:\n\t\t# English: \"Note: including file:   C:\\directory\\file\"\n\t\t# German: \"Hinweis: Einlesen der Datei:   C:\\directory\\file\"\n\t\t# We use a very general regular expression, relying on the presence of the : characters\n\t\tif (_line MATCHES \"( +)([a-zA-Z]:[^:]+)$\")\n\t\t\tstring (LENGTH \"${CMAKE_MATCH_1}\" ${_headerDepthVar})\n\t\t\tget_filename_component(${_headerFileVar} \"${CMAKE_MATCH_2}\" ABSOLUTE)\n\t\telse()\n\t\t\tset (${_headerFileVar} \"\")\n\t\t\tset (${_headerDepthVar} 0)\n\t\tendif()\n\telse()\n\t\tif (_line MATCHES \"^(\\\\.+) (.*)$\")\n\t\t\t# GCC like output\n\t\t\tstring (LENGTH \"${CMAKE_MATCH_1}\" ${_headerDepthVar})\n\t\t\tif (IS_ABSOLUTE \"${CMAKE_MATCH_2}\")\n\t\t\t\tset (${_headerFileVar} \"${CMAKE_MATCH_2}\")\n\t\t\telse()\n\t\t\t\tget_filename_component(${_headerFileVar} \"${CMAKE_MATCH_2}\" REALPATH)\n\t\t\tendif()\n\t\telse()\n\t\t\tset (${_headerFileVar} \"\")\n\t\t\tset (${_headerDepthVar} 0)\n\t\tendif()\n\tendif()\nendmacro()\n\nfunction (cotire_parse_includes _language _scanOutput _ignoredIncludeDirs _honoredIncludeDirs _ignoredExtensions _selectedIncludesVar _unparsedLinesVar)\n\tif (WIN32)\n\t\t# prevent CMake macro invocation errors due to backslash characters in Windows paths\n\t\tstring (REPLACE \"\\\\\" \"/\" _scanOutput \"${_scanOutput}\")\n\tendif()\n\t# canonize slashes\n\tstring (REPLACE \"//\" \"/\" _scanOutput \"${_scanOutput}\")\n\t# prevent semicolon from being interpreted as a line separator\n\tstring (REPLACE \";\" \"\\\\;\" _scanOutput \"${_scanOutput}\")\n\t# then separate lines\n\tstring (REGEX REPLACE \"\\n\" \";\" _scanOutput \"${_scanOutput}\")\n\tlist (LENGTH _scanOutput _len)\n\t# remove duplicate lines to speed up parsing\n\tlist (REMOVE_DUPLICATES _scanOutput)\n\tlist (LENGTH _scanOutput _uniqueLen)\n\tif (COTIRE_VERBOSE OR COTIRE_DEBUG)\n\t\tmessage (STATUS \"Scanning ${_uniqueLen} unique lines of ${_len} for includes\")\n\t\tif (_ignoredExtensions)\n\t\t\tmessage (STATUS \"Ignored extensions: ${_ignoredExtensions}\")\n\t\tendif()\n\t\tif (_ignoredIncludeDirs)\n\t\t\tmessage (STATUS \"Ignored paths: ${_ignoredIncludeDirs}\")\n\t\tendif()\n\t\tif (_honoredIncludeDirs)\n\t\t\tmessage (STATUS \"Included paths: ${_honoredIncludeDirs}\")\n\t\tendif()\n\tendif()\n\tset (_sourceFiles ${ARGN})\n\tset (_selectedIncludes \"\")\n\tset (_unparsedLines \"\")\n\t# stack keeps track of inside/outside project status of processed header files\n\tset (_headerIsInsideStack \"\")\n\tforeach (_line IN LISTS _scanOutput)\n\t\tif (_line)\n\t\t\tcotire_parse_line(\"${_line}\" _headerFile _headerDepth)\n\t\t\tif (_headerFile)\n\t\t\t\tcotire_check_header_file_location(\"${_headerFile}\" \"${_ignoredIncludeDirs}\" \"${_honoredIncludeDirs}\" _headerIsInside)\n\t\t\t\tif (COTIRE_DEBUG)\n\t\t\t\t\tmessage (STATUS \"${_headerDepth}: ${_headerFile} ${_headerIsInside}\")\n\t\t\t\tendif()\n\t\t\t\t# update stack\n\t\t\t\tlist (LENGTH _headerIsInsideStack _stackLen)\n\t\t\t\tif (_headerDepth GREATER _stackLen)\n\t\t\t\t\tmath (EXPR _stackLen \"${_stackLen} + 1\")\n\t\t\t\t\tforeach (_index RANGE ${_stackLen} ${_headerDepth})\n\t\t\t\t\t\tlist (APPEND _headerIsInsideStack ${_headerIsInside})\n\t\t\t\t\tendforeach()\n\t\t\t\telse()\n\t\t\t\t\tforeach (_index RANGE ${_headerDepth} ${_stackLen})\n\t\t\t\t\t\tlist (REMOVE_AT _headerIsInsideStack -1)\n\t\t\t\t\tendforeach()\n\t\t\t\t\tlist (APPEND _headerIsInsideStack ${_headerIsInside})\n\t\t\t\tendif()\n\t\t\t\tif (COTIRE_DEBUG)\n\t\t\t\t\tmessage (STATUS \"${_headerIsInsideStack}\")\n\t\t\t\tendif()\n\t\t\t\t# header is a candidate if it is outside project\n\t\t\t\tif (NOT _headerIsInside)\n\t\t\t\t\t# get parent header file's inside/outside status\n\t\t\t\t\tif (_headerDepth GREATER 1)\n\t\t\t\t\t\tmath (EXPR _index \"${_headerDepth} - 2\")\n\t\t\t\t\t\tlist (GET _headerIsInsideStack ${_index} _parentHeaderIsInside)\n\t\t\t\t\telse()\n\t\t\t\t\t\tset (_parentHeaderIsInside TRUE)\n\t\t\t\t\tendif()\n\t\t\t\t\t# select header file if parent header file is inside project\n\t\t\t\t\t# (e.g., a project header file that includes a standard header file)\n\t\t\t\t\tif (_parentHeaderIsInside)\n\t\t\t\t\t\tcotire_check_ignore_header_file_path(\"${_headerFile}\" _headerIsIgnored)\n\t\t\t\t\t\tif (NOT _headerIsIgnored)\n\t\t\t\t\t\t\tcotire_check_ignore_header_file_ext(\"${_headerFile}\" _ignoredExtensions _headerIsIgnored)\n\t\t\t\t\t\t\tif (NOT _headerIsIgnored)\n\t\t\t\t\t\t\t\tlist (APPEND _selectedIncludes \"${_headerFile}\")\n\t\t\t\t\t\t\telse()\n\t\t\t\t\t\t\t\t# fix header's inside status on stack, it is ignored by extension now\n\t\t\t\t\t\t\t\tlist (REMOVE_AT _headerIsInsideStack -1)\n\t\t\t\t\t\t\t\tlist (APPEND _headerIsInsideStack TRUE)\n\t\t\t\t\t\t\tendif()\n\t\t\t\t\t\tendif()\n\t\t\t\t\t\tif (COTIRE_DEBUG)\n\t\t\t\t\t\t\tmessage (STATUS \"${_headerFile} ${_ignoredExtensions} ${_headerIsIgnored}\")\n\t\t\t\t\t\tendif()\n\t\t\t\t\tendif()\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\tif (MSVC)\n\t\t\t\t\t# for cl.exe do not keep unparsed lines which solely consist of a source file name\n\t\t\t\t\tstring (FIND \"${_sourceFiles}\" \"${_line}\" _index)\n\t\t\t\t\tif (_index LESS 0)\n\t\t\t\t\t\tlist (APPEND _unparsedLines \"${_line}\")\n\t\t\t\t\tendif()\n\t\t\t\telse()\n\t\t\t\t\tlist (APPEND _unparsedLines \"${_line}\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\tendforeach()\n\tlist (REMOVE_DUPLICATES _selectedIncludes)\n\tset (${_selectedIncludesVar} ${_selectedIncludes} PARENT_SCOPE)\n\tset (${_unparsedLinesVar} ${_unparsedLines} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_scan_includes _includesVar)\n\tset(_options \"\")\n\tset(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_VERSION LANGUAGE UNPARSED_LINES SCAN_RESULT)\n\tset(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES\n\t\tIGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER)\n\tcmake_parse_arguments(_option \"${_options}\" \"${_oneValueArgs}\" \"${_multiValueArgs}\" ${ARGN})\n\tset (_sourceFiles ${_option_UNPARSED_ARGUMENTS})\n\tif (NOT _option_LANGUAGE)\n\t\tset (_option_LANGUAGE \"CXX\")\n\tendif()\n\tif (NOT _option_COMPILER_ID)\n\t\tset (_option_COMPILER_ID \"${CMAKE_${_option_LANGUAGE}_ID}\")\n\tendif()\n\tif (NOT _option_COMPILER_VERSION)\n\t\tset (_option_COMPILER_VERSION \"${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}\")\n\tendif()\n\tcotire_init_compile_cmd(_cmd \"${_option_LANGUAGE}\" \"${_option_COMPILER_LAUNCHER}\" \"${_option_COMPILER_EXECUTABLE}\" \"${_option_COMPILER_ARG1}\")\n\tcotire_add_definitions_to_cmd(_cmd \"${_option_LANGUAGE}\" ${_option_COMPILE_DEFINITIONS})\n\tcotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS})\n\tcotire_add_includes_to_cmd(_cmd \"${_option_LANGUAGE}\" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)\n\tcotire_add_frameworks_to_cmd(_cmd \"${_option_LANGUAGE}\" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)\n\tcotire_add_makedep_flags(\"${_option_LANGUAGE}\" \"${_option_COMPILER_ID}\" \"${_option_COMPILER_VERSION}\" _cmd)\n\t# only consider existing source files for scanning\n\tset (_existingSourceFiles \"\")\n\tforeach (_sourceFile ${_sourceFiles})\n\t\tif (EXISTS \"${_sourceFile}\")\n\t\t\tlist (APPEND _existingSourceFiles \"${_sourceFile}\")\n\t\tendif()\n\tendforeach()\n\tif (NOT _existingSourceFiles)\n\t\tset (${_includesVar} \"\" PARENT_SCOPE)\n\t\treturn()\n\tendif()\n\t# add source files to be scanned\n\tif (WIN32)\n\t\tforeach (_sourceFile ${_existingSourceFiles})\n\t\t\tfile (TO_NATIVE_PATH \"${_sourceFile}\" _sourceFileNative)\n\t\t\tlist (APPEND _cmd \"${_sourceFileNative}\")\n\t\tendforeach()\n\telse()\n\t\tlist (APPEND _cmd ${_existingSourceFiles})\n\tendif()\n\tif (COTIRE_VERBOSE)\n\t\tmessage (STATUS \"execute_process: ${_cmd}\")\n\tendif()\n\tif (MSVC_IDE OR _option_COMPILER_ID MATCHES \"MSVC\")\n\t\t# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared\n\t\tunset (ENV{VS_UNICODE_OUTPUT})\n\tendif()\n\texecute_process(\n\t\tCOMMAND ${_cmd}\n\t\tWORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"\n\t\tRESULT_VARIABLE _result\n\t\tOUTPUT_QUIET\n\t\tERROR_VARIABLE _output)\n\tif (_result)\n\t\tmessage (STATUS \"Result ${_result} scanning includes of ${_existingSourceFiles}.\")\n\tendif()\n\tcotire_parse_includes(\n\t\t\"${_option_LANGUAGE}\" \"${_output}\"\n\t\t\"${_option_IGNORE_PATH}\" \"${_option_INCLUDE_PATH}\"\n\t\t\"${_option_IGNORE_EXTENSIONS}\"\n\t\t_includes _unparsedLines\n\t\t${_sourceFiles})\n\tif (_option_INCLUDE_PRIORITY_PATH)\n\t\tset (_sortedIncludes \"\")\n\t\tforeach (_priorityPath ${_option_INCLUDE_PRIORITY_PATH})\n\t\t\tforeach (_include ${_includes})\n\t\t\t\tstring (FIND ${_include} ${_priorityPath} _position)\n\t\t\t\tif (_position GREATER -1)\n\t\t\t\t\tlist (APPEND _sortedIncludes ${_include})\n\t\t\t\tendif()\n\t\t\tendforeach()\n\t\tendforeach()\n\t\tif (_sortedIncludes)\n\t\t\tlist (INSERT _includes 0 ${_sortedIncludes})\n\t\t\tlist (REMOVE_DUPLICATES _includes)\n\t\tendif()\n\tendif()\n\tset (${_includesVar} ${_includes} PARENT_SCOPE)\n\tif (_option_UNPARSED_LINES)\n\t\tset (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE)\n\tendif()\n\tif (_option_SCAN_RESULT)\n\t\tset (${_option_SCAN_RESULT} ${_result} PARENT_SCOPE)\n\tendif()\nendfunction()\n\nmacro (cotire_append_undefs _contentsVar)\n\tset (_undefs ${ARGN})\n\tif (_undefs)\n\t\tlist (REMOVE_DUPLICATES _undefs)\n\t\tforeach (_definition ${_undefs})\n\t\t\tlist (APPEND ${_contentsVar} \"#undef ${_definition}\")\n\t\tendforeach()\n\tendif()\nendmacro()\n\nmacro (cotire_comment_str _language _commentText _commentVar)\n\tif (\"${_language}\" STREQUAL \"CMAKE\")\n\t\tset (${_commentVar} \"# ${_commentText}\")\n\telse()\n\t\tset (${_commentVar} \"/* ${_commentText} */\")\n\tendif()\nendmacro()\n\nfunction (cotire_write_file _language _file _contents _force)\n\tget_filename_component(_moduleName \"${COTIRE_CMAKE_MODULE_FILE}\" NAME)\n\tcotire_comment_str(\"${_language}\" \"${_moduleName} ${COTIRE_CMAKE_MODULE_VERSION} generated file\" _header1)\n\tcotire_comment_str(\"${_language}\" \"${_file}\" _header2)\n\tset (_contents \"${_header1}\\n${_header2}\\n${_contents}\")\n\tif (COTIRE_DEBUG)\n\t\tmessage (STATUS \"${_contents}\")\n\tendif()\n\tif (_force OR NOT EXISTS \"${_file}\")\n\t\tfile (WRITE \"${_file}\" \"${_contents}\")\n\telse()\n\t\tfile (READ \"${_file}\" _oldContents)\n\t\tif (NOT \"${_oldContents}\" STREQUAL \"${_contents}\")\n\t\t\tfile (WRITE \"${_file}\" \"${_contents}\")\n\t\telse()\n\t\t\tif (COTIRE_DEBUG)\n\t\t\t\tmessage (STATUS \"${_file} unchanged\")\n\t\t\tendif()\n\t\tendif()\n\tendif()\nendfunction()\n\nfunction (cotire_generate_unity_source _unityFile)\n\tset(_options \"\")\n\tset(_oneValueArgs LANGUAGE)\n\tset(_multiValueArgs\n\t\tDEPENDS SOURCES_COMPILE_DEFINITIONS\n\t\tPRE_UNDEFS SOURCES_PRE_UNDEFS POST_UNDEFS SOURCES_POST_UNDEFS PROLOGUE EPILOGUE)\n\tcmake_parse_arguments(_option \"${_options}\" \"${_oneValueArgs}\" \"${_multiValueArgs}\" ${ARGN})\n\tif (_option_DEPENDS)\n\t\tcotire_check_file_up_to_date(_unityFileIsUpToDate \"${_unityFile}\" ${_option_DEPENDS})\n\t\tif (_unityFileIsUpToDate)\n\t\t\treturn()\n\t\tendif()\n\tendif()\n\tset (_sourceFiles ${_option_UNPARSED_ARGUMENTS})\n\tif (NOT _option_PRE_UNDEFS)\n\t\tset (_option_PRE_UNDEFS \"\")\n\tendif()\n\tif (NOT _option_SOURCES_PRE_UNDEFS)\n\t\tset (_option_SOURCES_PRE_UNDEFS \"\")\n\tendif()\n\tif (NOT _option_POST_UNDEFS)\n\t\tset (_option_POST_UNDEFS \"\")\n\tendif()\n\tif (NOT _option_SOURCES_POST_UNDEFS)\n\t\tset (_option_SOURCES_POST_UNDEFS \"\")\n\tendif()\n\tset (_contents \"\")\n\tif (_option_PROLOGUE)\n\t\tlist (APPEND _contents ${_option_PROLOGUE})\n\tendif()\n\tif (_option_LANGUAGE AND _sourceFiles)\n\t\tif (\"${_option_LANGUAGE}\" STREQUAL \"CXX\")\n\t\t\tlist (APPEND _contents \"#ifdef __cplusplus\")\n\t\telseif (\"${_option_LANGUAGE}\" STREQUAL \"C\")\n\t\t\tlist (APPEND _contents \"#ifndef __cplusplus\")\n\t\tendif()\n\tendif()\n\tset (_compileUndefinitions \"\")\n\tforeach (_sourceFile ${_sourceFiles})\n\t\tcotire_get_source_compile_definitions(\n\t\t\t\"${_option_CONFIGURATION}\" \"${_option_LANGUAGE}\" \"${_sourceFile}\" _compileDefinitions\n\t\t\t${_option_SOURCES_COMPILE_DEFINITIONS})\n\t\tcotire_get_source_undefs(\"${_sourceFile}\" COTIRE_UNITY_SOURCE_PRE_UNDEFS _sourcePreUndefs ${_option_SOURCES_PRE_UNDEFS})\n\t\tcotire_get_source_undefs(\"${_sourceFile}\" COTIRE_UNITY_SOURCE_POST_UNDEFS _sourcePostUndefs ${_option_SOURCES_POST_UNDEFS})\n\t\tif (_option_PRE_UNDEFS)\n\t\t\tlist (APPEND _compileUndefinitions ${_option_PRE_UNDEFS})\n\t\tendif()\n\t\tif (_sourcePreUndefs)\n\t\t\tlist (APPEND _compileUndefinitions ${_sourcePreUndefs})\n\t\tendif()\n\t\tif (_compileUndefinitions)\n\t\t\tcotire_append_undefs(_contents ${_compileUndefinitions})\n\t\t\tset (_compileUndefinitions \"\")\n\t\tendif()\n\t\tif (_sourcePostUndefs)\n\t\t\tlist (APPEND _compileUndefinitions ${_sourcePostUndefs})\n\t\tendif()\n\t\tif (_option_POST_UNDEFS)\n\t\t\tlist (APPEND _compileUndefinitions ${_option_POST_UNDEFS})\n\t\tendif()\n\t\tforeach (_definition ${_compileDefinitions})\n\t\t\tif (_definition MATCHES \"^([a-zA-Z0-9_]+)=(.+)$\")\n\t\t\t\tlist (APPEND _contents \"#define ${CMAKE_MATCH_1} ${CMAKE_MATCH_2}\")\n\t\t\t\tlist (INSERT _compileUndefinitions 0 \"${CMAKE_MATCH_1}\")\n\t\t\telse()\n\t\t\t\tlist (APPEND _contents \"#define ${_definition}\")\n\t\t\t\tlist (INSERT _compileUndefinitions 0 \"${_definition}\")\n\t\t\tendif()\n\t\tendforeach()\n\t\t# use absolute path as source file location\n\t\tget_filename_component(_sourceFileLocation \"${_sourceFile}\" ABSOLUTE)\n\t\tif (WIN32)\n\t\t\tfile (TO_NATIVE_PATH \"${_sourceFileLocation}\" _sourceFileLocation)\n\t\tendif()\n\t\tlist (APPEND _contents \"#include \\\"${_sourceFileLocation}\\\"\")\n\tendforeach()\n\tif (_compileUndefinitions)\n\t\tcotire_append_undefs(_contents ${_compileUndefinitions})\n\t\tset (_compileUndefinitions \"\")\n\tendif()\n\tif (_option_LANGUAGE AND _sourceFiles)\n\t\tlist (APPEND _contents \"#endif\")\n\tendif()\n\tif (_option_EPILOGUE)\n\t\tlist (APPEND _contents ${_option_EPILOGUE})\n\tendif()\n\tlist (APPEND _contents \"\")\n\tstring (REPLACE \";\" \"\\n\" _contents \"${_contents}\")\n\tif (COTIRE_VERBOSE)\n\t\tmessage (\"${_contents}\")\n\tendif()\n\tcotire_write_file(\"${_option_LANGUAGE}\" \"${_unityFile}\" \"${_contents}\" TRUE)\nendfunction()\n\nfunction (cotire_generate_prefix_header _prefixFile)\n\tset(_options \"\")\n\tset(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_ID COMPILER_VERSION)\n\tset(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS\n\t\tINCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH\n\t\tIGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER)\n\tcmake_parse_arguments(_option \"${_options}\" \"${_oneValueArgs}\" \"${_multiValueArgs}\" ${ARGN})\n\tif (NOT _option_COMPILER_ID)\n\t\tset (_option_COMPILER_ID \"${CMAKE_${_option_LANGUAGE}_ID}\")\n\tendif()\n\tif (NOT _option_COMPILER_VERSION)\n\t\tset (_option_COMPILER_VERSION \"${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}\")\n\tendif()\n\tif (_option_DEPENDS)\n\t\tcotire_check_file_up_to_date(_prefixFileIsUpToDate \"${_prefixFile}\" ${_option_DEPENDS})\n\t\tif (_prefixFileIsUpToDate)\n\t\t\t# create empty log file\n\t\t\tset (_unparsedLinesFile \"${_prefixFile}.log\")\n\t\t\tfile (WRITE \"${_unparsedLinesFile}\" \"\")\n\t\t\treturn()\n\t\tendif()\n\tendif()\n\tset (_prologue \"\")\n\tset (_epilogue \"\")\n\tif (_option_COMPILER_ID MATCHES \"Clang\")\n\t\tset (_prologue \"#pragma clang system_header\")\n\telseif (_option_COMPILER_ID MATCHES \"GNU\")\n\t\tset (_prologue \"#pragma GCC system_header\")\n\telseif (_option_COMPILER_ID MATCHES \"MSVC\")\n\t\tset (_prologue \"#pragma warning(push, 0)\")\n\t\tset (_epilogue \"#pragma warning(pop)\")\n\telseif (_option_COMPILER_ID MATCHES \"Intel\")\n\t\t# Intel compiler requires hdrstop pragma to stop generating PCH file\n\t\tset (_epilogue \"#pragma hdrstop\")\n\tendif()\n\tset (_sourceFiles ${_option_UNPARSED_ARGUMENTS})\n\tcotire_scan_includes(_selectedHeaders ${_sourceFiles}\n\t\tLANGUAGE \"${_option_LANGUAGE}\"\n\t\tCOMPILER_LAUNCHER \"${_option_COMPILER_LAUNCHER}\"\n\t\tCOMPILER_EXECUTABLE \"${_option_COMPILER_EXECUTABLE}\"\n\t\tCOMPILER_ARG1 \"${_option_COMPILER_ARG1}\"\n\t\tCOMPILER_ID \"${_option_COMPILER_ID}\"\n\t\tCOMPILER_VERSION \"${_option_COMPILER_VERSION}\"\n\t\tCOMPILE_DEFINITIONS ${_option_COMPILE_DEFINITIONS}\n\t\tCOMPILE_FLAGS ${_option_COMPILE_FLAGS}\n\t\tINCLUDE_DIRECTORIES ${_option_INCLUDE_DIRECTORIES}\n\t\tSYSTEM_INCLUDE_DIRECTORIES ${_option_SYSTEM_INCLUDE_DIRECTORIES}\n\t\tIGNORE_PATH ${_option_IGNORE_PATH}\n\t\tINCLUDE_PATH ${_option_INCLUDE_PATH}\n\t\tIGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS}\n\t\tINCLUDE_PRIORITY_PATH ${_option_INCLUDE_PRIORITY_PATH}\n\t\tUNPARSED_LINES _unparsedLines\n\t\tSCAN_RESULT _scanResult)\n\tcotire_generate_unity_source(\"${_prefixFile}\"\n\t\tPROLOGUE ${_prologue} EPILOGUE ${_epilogue} LANGUAGE \"${_option_LANGUAGE}\" ${_selectedHeaders})\n\tset (_unparsedLinesFile \"${_prefixFile}.log\")\n\tif (_unparsedLines)\n\t\tif (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders)\n\t\t\tlist (LENGTH _unparsedLines _skippedLineCount)\n\t\t\tif (WIN32)\n\t\t\t\tfile (TO_NATIVE_PATH \"${_unparsedLinesFile}\" _unparsedLinesLogPath)\n\t\t\telse()\n\t\t\t\tset (_unparsedLinesLogPath \"${_unparsedLinesFile}\")\n\t\t\tendif()\n\t\t\tmessage (STATUS \"${_skippedLineCount} line(s) skipped, see ${_unparsedLinesLogPath}\")\n\t\tendif()\n\t\tstring (REPLACE \";\" \"\\n\" _unparsedLines \"${_unparsedLines}\")\n\tendif()\n\tfile (WRITE \"${_unparsedLinesFile}\" \"${_unparsedLines}\\n\")\nendfunction()\n\nfunction (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar)\n\tset (_flags ${${_flagsVar}})\n\tif (_compilerID MATCHES \"MSVC\")\n\t\t# cl.exe options used\n\t\t# /nologo suppresses display of sign-on banner\n\t\t# /TC treat all files named on the command line as C source files\n\t\t# /TP treat all files named on the command line as C++ source files\n\t\t# /EP preprocess to stdout without #line directives\n\t\t# /showIncludes list include files\n\t\tset (_sourceFileTypeC \"/TC\")\n\t\tset (_sourceFileTypeCXX \"/TP\")\n\t\tif (_flags)\n\t\t\t# append to list\n\t\t\tlist (APPEND _flags /nologo \"${_sourceFileType${_language}}\" /EP /showIncludes)\n\t\telse()\n\t\t\t# return as a flag string\n\t\t\tset (_flags \"${_sourceFileType${_language}} /EP /showIncludes\")\n\t\tendif()\n\telseif (_compilerID MATCHES \"GNU\")\n\t\t# GCC options used\n\t\t# -H print the name of each header file used\n\t\t# -E invoke preprocessor\n\t\t# -fdirectives-only do not expand macros, requires GCC >= 4.3\n\t\tif (_flags)\n\t\t\t# append to list\n\t\t\tlist (APPEND _flags -H -E)\n\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"4.3.0\")\n\t\t\t\tlist (APPEND _flags -fdirectives-only)\n\t\t\tendif()\n\t\telse()\n\t\t\t# return as a flag string\n\t\t\tset (_flags \"-H -E\")\n\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"4.3.0\")\n\t\t\t\tset (_flags \"${_flags} -fdirectives-only\")\n\t\t\tendif()\n\t\tendif()\n\telseif (_compilerID MATCHES \"Clang\")\n\t\tif (UNIX)\n\t\t\t# Clang options used\n\t\t\t# -H print the name of each header file used\n\t\t\t# -E invoke preprocessor\n\t\t\t# -fno-color-diagnostics do not print diagnostics in color\n\t\t\t# -Eonly just run preprocessor, no output\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags -H -E -fno-color-diagnostics -Xclang -Eonly)\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"-H -E -fno-color-diagnostics -Xclang -Eonly\")\n\t\t\tendif()\n\t\telseif (WIN32)\n\t\t\t# Clang-cl.exe options used\n\t\t\t# /TC treat all files named on the command line as C source files\n\t\t\t# /TP treat all files named on the command line as C++ source files\n\t\t\t# /EP preprocess to stdout without #line directives\n\t\t\t# -H print the name of each header file used\n\t\t\t# -fno-color-diagnostics do not print diagnostics in color\n\t\t\t# -Eonly just run preprocessor, no output\n\t\t\tset (_sourceFileTypeC \"/TC\")\n\t\t\tset (_sourceFileTypeCXX \"/TP\")\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags \"${_sourceFileType${_language}}\" /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly)\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"${_sourceFileType${_language}} /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly\")\n\t\t\tendif()\n\t\tendif()\n\telseif (_compilerID MATCHES \"Intel\")\n\t\tif (WIN32)\n\t\t\t# Windows Intel options used\n\t\t\t# /nologo do not display compiler version information\n\t\t\t# /QH display the include file order\n\t\t\t# /EP preprocess to stdout, omitting #line directives\n\t\t\t# /TC process all source or unrecognized file types as C source files\n\t\t\t# /TP process all source or unrecognized file types as C++ source files\n\t\t\tset (_sourceFileTypeC \"/TC\")\n\t\t\tset (_sourceFileTypeCXX \"/TP\")\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags /nologo \"${_sourceFileType${_language}}\" /EP /QH)\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"${_sourceFileType${_language}} /EP /QH\")\n\t\t\tendif()\n\t\telse()\n\t\t\t# Linux / Mac OS X Intel options used\n\t\t\t# -H print the name of each header file used\n\t\t\t# -EP preprocess to stdout, omitting #line directives\n\t\t\t# -Kc++ process all source or unrecognized file types as C++ source files\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tif (\"${_language}\" STREQUAL \"CXX\")\n\t\t\t\t\tlist (APPEND _flags -Kc++)\n\t\t\t\tendif()\n\t\t\t\tlist (APPEND _flags -H -EP)\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tif (\"${_language}\" STREQUAL \"CXX\")\n\t\t\t\t\tset (_flags \"-Kc++ \")\n\t\t\t\tendif()\n\t\t\t\tset (_flags \"${_flags}-H -EP\")\n\t\t\tendif()\n\t\tendif()\n\telse()\n\t\tmessage (FATAL_ERROR \"cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.\")\n\tendif()\n\tset (${_flagsVar} ${_flags} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_add_pch_compilation_flags _language _compilerID _compilerVersion _prefixFile _pchFile _hostFile _flagsVar)\n\tset (_flags ${${_flagsVar}})\n\tif (_compilerID MATCHES \"MSVC\")\n\t\tfile (TO_NATIVE_PATH \"${_prefixFile}\" _prefixFileNative)\n\t\tfile (TO_NATIVE_PATH \"${_pchFile}\" _pchFileNative)\n\t\tfile (TO_NATIVE_PATH \"${_hostFile}\" _hostFileNative)\n\t\t# cl.exe options used\n\t\t# /Yc creates a precompiled header file\n\t\t# /Fp specifies precompiled header binary file name\n\t\t# /FI forces inclusion of file\n\t\t# /TC treat all files named on the command line as C source files\n\t\t# /TP treat all files named on the command line as C++ source files\n\t\t# /Zs syntax check only\n\t\t# /Zm precompiled header memory allocation scaling factor\n\t\tset (_sourceFileTypeC \"/TC\")\n\t\tset (_sourceFileTypeCXX \"/TP\")\n\t\tif (_flags)\n\t\t\t# append to list\n\t\t\tlist (APPEND _flags /nologo \"${_sourceFileType${_language}}\"\n\t\t\t\t\"/Yc${_prefixFileNative}\" \"/Fp${_pchFileNative}\" \"/FI${_prefixFileNative}\" /Zs \"${_hostFileNative}\")\n\t\t\tif (COTIRE_PCH_MEMORY_SCALING_FACTOR)\n\t\t\t\tlist (APPEND _flags \"/Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}\")\n\t\t\tendif()\n\t\telse()\n\t\t\t# return as a flag string\n\t\t\tset (_flags \"/Yc\\\"${_prefixFileNative}\\\" /Fp\\\"${_pchFileNative}\\\" /FI\\\"${_prefixFileNative}\\\"\")\n\t\t\tif (COTIRE_PCH_MEMORY_SCALING_FACTOR)\n\t\t\t\tset (_flags \"${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}\")\n\t\t\tendif()\n\t\tendif()\n\telseif (_compilerID MATCHES \"GNU\")\n\t\t# GCC options used\n\t\t# -x specify the source language\n\t\t# -c compile but do not link\n\t\t# -o place output in file\n\t\t# note that we cannot use -w to suppress all warnings upon pre-compiling, because turning off a warning may\n\t\t# alter compile flags as a side effect (e.g., -Wwrite-string implies -fconst-strings)\n\t\tset (_xLanguage_C \"c-header\")\n\t\tset (_xLanguage_CXX \"c++-header\")\n\t\tif (_flags)\n\t\t\t# append to list\n\t\t\tlist (APPEND _flags -x \"${_xLanguage_${_language}}\" -c \"${_prefixFile}\" -o \"${_pchFile}\")\n\t\telse()\n\t\t\t# return as a flag string\n\t\t\tset (_flags \"-x ${_xLanguage_${_language}} -c \\\"${_prefixFile}\\\" -o \\\"${_pchFile}\\\"\")\n\t\tendif()\n\telseif (_compilerID MATCHES \"Clang\")\n\t\tif (UNIX)\n\t\t\t# Clang options used\n\t\t\t# -x specify the source language\n\t\t\t# -c compile but do not link\n\t\t\t# -o place output in file\n\t\t\t# -fno-pch-timestamp disable inclusion of timestamp in precompiled headers (clang 4.0.0+)\n\t\t\tset (_xLanguage_C \"c-header\")\n\t\t\tset (_xLanguage_CXX \"c++-header\")\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags -x \"${_xLanguage_${_language}}\" -c \"${_prefixFile}\" -o \"${_pchFile}\")\n\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"4.0.0\")\n\t\t\t\t\tlist (APPEND _flags -Xclang -fno-pch-timestamp)\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"-x ${_xLanguage_${_language}} -c \\\"${_prefixFile}\\\" -o \\\"${_pchFile}\\\"\")\n\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"4.0.0\")\n\t\t\t\t\tset (_flags \"${_flags} -Xclang -fno-pch-timestamp\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\telseif (WIN32)\n\t\t\t# Clang-cl.exe options used\n\t\t\t# /Yc creates a precompiled header file\n\t\t\t# /Fp specifies precompiled header binary file name\n\t\t\t# /FI forces inclusion of file\n\t\t\t# /Zs syntax check only\n\t\t\t# /TC treat all files named on the command line as C source files\n\t\t\t# /TP treat all files named on the command line as C++ source files\n\t\t\tset (_sourceFileTypeC \"/TC\")\n\t\t\tset (_sourceFileTypeCXX \"/TP\")\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags \"${_sourceFileType${_language}}\"\n\t\t\t\t\t\t\"/Yc${_prefixFile}\" \"/Fp${_pchFile}\" \"/FI${_prefixFile}\" /Zs \"${_hostFile}\")\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"/Yc\\\"${_prefixFile}\\\" /Fp\\\"${_pchFile}\\\" /FI\\\"${_prefixFile}\\\"\")\n\t\t\tendif()\n\t\tendif()\n\telseif (_compilerID MATCHES \"Intel\")\n\t\tif (WIN32)\n\t\t\tfile (TO_NATIVE_PATH \"${_prefixFile}\" _prefixFileNative)\n\t\t\tfile (TO_NATIVE_PATH \"${_pchFile}\" _pchFileNative)\n\t\t\tfile (TO_NATIVE_PATH \"${_hostFile}\" _hostFileNative)\n\t\t\t# Windows Intel options used\n\t\t\t# /nologo do not display compiler version information\n\t\t\t# /Yc create a precompiled header (PCH) file\n\t\t\t# /Fp specify a path or file name for precompiled header files\n\t\t\t# /FI tells the preprocessor to include a specified file name as the header file\n\t\t\t# /TC process all source or unrecognized file types as C source files\n\t\t\t# /TP process all source or unrecognized file types as C++ source files\n\t\t\t# /Zs syntax check only\n\t\t\t# /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)\n\t\t\tset (_sourceFileTypeC \"/TC\")\n\t\t\tset (_sourceFileTypeCXX \"/TP\")\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags /nologo \"${_sourceFileType${_language}}\"\n\t\t\t\t\t\"/Yc\" \"/Fp${_pchFileNative}\" \"/FI${_prefixFileNative}\" /Zs \"${_hostFileNative}\")\n\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"13.1.0\")\n\t\t\t\t\tlist (APPEND _flags \"/Wpch-messages\")\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"/Yc /Fp\\\"${_pchFileNative}\\\" /FI\\\"${_prefixFileNative}\\\"\")\n\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"13.1.0\")\n\t\t\t\t\tset (_flags \"${_flags} /Wpch-messages\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\telse()\n\t\t\t# Linux / Mac OS X Intel options used\n\t\t\t# -pch-dir location for precompiled header files\n\t\t\t# -pch-create name of the precompiled header (PCH) to create\n\t\t\t# -Kc++ process all source or unrecognized file types as C++ source files\n\t\t\t# -fsyntax-only check only for correct syntax\n\t\t\t# -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)\n\t\t\tget_filename_component(_pchDir \"${_pchFile}\" DIRECTORY)\n\t\t\tget_filename_component(_pchName \"${_pchFile}\" NAME)\n\t\t\tset (_xLanguage_C \"c-header\")\n\t\t\tset (_xLanguage_CXX \"c++-header\")\n\t\t\tset (_pchSuppressMessages FALSE)\n\t\t\tif (\"${CMAKE_${_language}_FLAGS}\" MATCHES \".*-Wno-pch-messages.*\")\n\t\t\t\tset(_pchSuppressMessages TRUE)\n\t\t\tendif()\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tif (\"${_language}\" STREQUAL \"CXX\")\n\t\t\t\t\tlist (APPEND _flags -Kc++)\n\t\t\t\tendif()\n\t\t\t\tlist (APPEND _flags -include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\" -fsyntax-only \"${_hostFile}\")\n\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"13.1.0\")\n\t\t\t\t\tif (NOT _pchSuppressMessages)\n\t\t\t\t\t\tlist (APPEND _flags -Wpch-messages)\n\t\t\t\t\tendif()\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"-include \\\"${_prefixFile}\\\" -pch-dir \\\"${_pchDir}\\\" -pch-create \\\"${_pchName}\\\"\")\n\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"13.1.0\")\n\t\t\t\t\tif (NOT _pchSuppressMessages)\n\t\t\t\t\t\tset (_flags \"${_flags} -Wpch-messages\")\n\t\t\t\t\tendif()\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\telse()\n\t\tmessage (FATAL_ERROR \"cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.\")\n\tendif()\n\tset (${_flagsVar} ${_flags} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerVersion _prefixFile _pchFile _flagsVar)\n\tset (_flags ${${_flagsVar}})\n\tif (_compilerID MATCHES \"MSVC\")\n\t\tfile (TO_NATIVE_PATH \"${_prefixFile}\" _prefixFileNative)\n\t\t# cl.exe options used\n\t\t# /Yu uses a precompiled header file during build\n\t\t# /Fp specifies precompiled header binary file name\n\t\t# /FI forces inclusion of file\n\t\t# /Zm precompiled header memory allocation scaling factor\n\t\tif (_pchFile)\n\t\t\tfile (TO_NATIVE_PATH \"${_pchFile}\" _pchFileNative)\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags \"/Yu${_prefixFileNative}\" \"/Fp${_pchFileNative}\" \"/FI${_prefixFileNative}\")\n\t\t\t\tif (COTIRE_PCH_MEMORY_SCALING_FACTOR)\n\t\t\t\t\tlist (APPEND _flags \"/Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}\")\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"/Yu\\\"${_prefixFileNative}\\\" /Fp\\\"${_pchFileNative}\\\" /FI\\\"${_prefixFileNative}\\\"\")\n\t\t\t\tif (COTIRE_PCH_MEMORY_SCALING_FACTOR)\n\t\t\t\t\tset (_flags \"${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\telse()\n\t\t\t# no precompiled header, force inclusion of prefix header\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags \"/FI${_prefixFileNative}\")\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"/FI\\\"${_prefixFileNative}\\\"\")\n\t\t\tendif()\n\t\tendif()\n\telseif (_compilerID MATCHES \"GNU\")\n\t\t# GCC options used\n\t\t# -include process include file as the first line of the primary source file\n\t\t# -Winvalid-pch warns if precompiled header is found but cannot be used\n\t\t# note: ccache requires the -include flag to be used in order to process precompiled header correctly\n\t\tif (_flags)\n\t\t\t# append to list\n\t\t\tlist (APPEND _flags -Winvalid-pch -include \"${_prefixFile}\")\n\t\telse()\n\t\t\t# return as a flag string\n\t\t\tset (_flags \"-Winvalid-pch -include \\\"${_prefixFile}\\\"\")\n\t\tendif()\n\telseif (_compilerID MATCHES \"Clang\")\n\t\tif (UNIX)\n\t\t\t# Clang options used\n\t\t\t# -include process include file as the first line of the primary source file\n\t\t\t# note: ccache requires the -include flag to be used in order to process precompiled header correctly\n\t\t\tif (_flags)\n\t\t\t\t# append to list\n\t\t\t\tlist (APPEND _flags -include \"${_prefixFile}\")\n\t\t\telse()\n\t\t\t\t# return as a flag string\n\t\t\t\tset (_flags \"-include \\\"${_prefixFile}\\\"\")\n\t\t\tendif()\n\t\telseif (WIN32)\n\t\t\t# Clang-cl.exe options used\n\t\t\t# /Yu uses a precompiled header file during build\n\t\t\t# /Fp specifies precompiled header binary file name\n\t\t\t# /FI forces inclusion of file\n\t\t\tif (_pchFile)\n\t\t\t\tif (_flags)\n\t\t\t\t\t# append to list\n\t\t\t\t\tlist (APPEND _flags \"/Yu${_prefixFile}\" \"/Fp${_pchFile}\" \"/FI${_prefixFile}\")\n\t\t\t\telse()\n\t\t\t\t\t# return as a flag string\n\t\t\t\t\tset (_flags \"/Yu\\\"${_prefixFile}\\\" /Fp\\\"${_pchFile}\\\" /FI\\\"${_prefixFile}\\\"\")\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\t# no precompiled header, force inclusion of prefix header\n\t\t\t\tif (_flags)\n\t\t\t\t\t# append to list\n\t\t\t\t\tlist (APPEND _flags \"/FI${_prefixFile}\")\n\t\t\t\telse()\n\t\t\t\t\t# return as a flag string\n\t\t\t\t\tset (_flags \"/FI\\\"${_prefixFile}\\\"\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\telseif (_compilerID MATCHES \"Intel\")\n\t\tif (WIN32)\n\t\t\tfile (TO_NATIVE_PATH \"${_prefixFile}\" _prefixFileNative)\n\t\t\t# Windows Intel options used\n\t\t\t# /Yu use a precompiled header (PCH) file\n\t\t\t# /Fp specify a path or file name for precompiled header files\n\t\t\t# /FI tells the preprocessor to include a specified file name as the header file\n\t\t\t# /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)\n\t\t\tif (_pchFile)\n\t\t\t\tfile (TO_NATIVE_PATH \"${_pchFile}\" _pchFileNative)\n\t\t\t\tif (_flags)\n\t\t\t\t\t# append to list\n\t\t\t\t\tlist (APPEND _flags \"/Yu\" \"/Fp${_pchFileNative}\" \"/FI${_prefixFileNative}\")\n\t\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"13.1.0\")\n\t\t\t\t\t\tlist (APPEND _flags \"/Wpch-messages\")\n\t\t\t\t\tendif()\n\t\t\t\telse()\n\t\t\t\t\t# return as a flag string\n\t\t\t\t\tset (_flags \"/Yu /Fp\\\"${_pchFileNative}\\\" /FI\\\"${_prefixFileNative}\\\"\")\n\t\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"13.1.0\")\n\t\t\t\t\t\tset (_flags \"${_flags} /Wpch-messages\")\n\t\t\t\t\tendif()\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\t# no precompiled header, force inclusion of prefix header\n\t\t\t\tif (_flags)\n\t\t\t\t\t# append to list\n\t\t\t\t\tlist (APPEND _flags \"/FI${_prefixFileNative}\")\n\t\t\t\telse()\n\t\t\t\t\t# return as a flag string\n\t\t\t\t\tset (_flags \"/FI\\\"${_prefixFileNative}\\\"\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\telse()\n\t\t\t# Linux / Mac OS X Intel options used\n\t\t\t# -pch-dir location for precompiled header files\n\t\t\t# -pch-use name of the precompiled header (PCH) to use\n\t\t\t# -include process include file as the first line of the primary source file\n\t\t\t# -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)\n\t\t\tif (_pchFile)\n\t\t\t\tget_filename_component(_pchDir \"${_pchFile}\" DIRECTORY)\n\t\t\t\tget_filename_component(_pchName \"${_pchFile}\" NAME)\n\t\t\t\tset (_pchSuppressMessages FALSE)\n\t\t\t\tif (\"${CMAKE_${_language}_FLAGS}\" MATCHES \".*-Wno-pch-messages.*\")\n\t\t\t\t\tset(_pchSuppressMessages TRUE)\n\t\t\t\tendif()\n\t\t\t\tif (_flags)\n\t\t\t\t\t# append to list\n\t\t\t\t\tlist (APPEND _flags -include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\")\n\t\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"13.1.0\")\n\t\t\t\t\t\tif (NOT _pchSuppressMessages)\n\t\t\t\t\t\t\tlist (APPEND _flags -Wpch-messages)\n\t\t\t\t\t\tendif()\n\t\t\t\t\tendif()\n\t\t\t\telse()\n\t\t\t\t\t# return as a flag string\n\t\t\t\t\tset (_flags \"-include \\\"${_prefixFile}\\\" -pch-dir \\\"${_pchDir}\\\" -pch-use \\\"${_pchName}\\\"\")\n\t\t\t\t\tif (NOT \"${_compilerVersion}\" VERSION_LESS \"13.1.0\")\n\t\t\t\t\t\tif (NOT _pchSuppressMessages)\n\t\t\t\t\t\t\tset (_flags \"${_flags} -Wpch-messages\")\n\t\t\t\t\t\tendif()\n\t\t\t\t\tendif()\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\t# no precompiled header, force inclusion of prefix header\n\t\t\t\tif (_flags)\n\t\t\t\t\t# append to list\n\t\t\t\t\tlist (APPEND _flags -include \"${_prefixFile}\")\n\t\t\t\telse()\n\t\t\t\t\t# return as a flag string\n\t\t\t\t\tset (_flags \"-include \\\"${_prefixFile}\\\"\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\telse()\n\t\tmessage (FATAL_ERROR \"cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.\")\n\tendif()\n\tset (${_flagsVar} ${_flags} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile)\n\tset(_options \"\")\n\tset(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_ID COMPILER_VERSION LANGUAGE)\n\tset(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS COMPILER_LAUNCHER)\n\tcmake_parse_arguments(_option \"${_options}\" \"${_oneValueArgs}\" \"${_multiValueArgs}\" ${ARGN})\n\tif (NOT _option_LANGUAGE)\n\t\tset (_option_LANGUAGE \"CXX\")\n\tendif()\n\tif (NOT _option_COMPILER_ID)\n\t\tset (_option_COMPILER_ID \"${CMAKE_${_option_LANGUAGE}_ID}\")\n\tendif()\n\tif (NOT _option_COMPILER_VERSION)\n\t\tset (_option_COMPILER_VERSION \"${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}\")\n\tendif()\n\tcotire_init_compile_cmd(_cmd \"${_option_LANGUAGE}\" \"${_option_COMPILER_LAUNCHER}\" \"${_option_COMPILER_EXECUTABLE}\" \"${_option_COMPILER_ARG1}\")\n\tcotire_add_definitions_to_cmd(_cmd \"${_option_LANGUAGE}\" ${_option_COMPILE_DEFINITIONS})\n\tcotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS})\n\tcotire_add_includes_to_cmd(_cmd \"${_option_LANGUAGE}\" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)\n\tcotire_add_frameworks_to_cmd(_cmd \"${_option_LANGUAGE}\" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)\n\tcotire_add_pch_compilation_flags(\n\t\t\"${_option_LANGUAGE}\" \"${_option_COMPILER_ID}\" \"${_option_COMPILER_VERSION}\"\n\t\t\"${_prefixFile}\" \"${_pchFile}\" \"${_hostFile}\" _cmd)\n\tif (COTIRE_VERBOSE)\n\t\tmessage (STATUS \"execute_process: ${_cmd}\")\n\tendif()\n\tif (MSVC_IDE OR _option_COMPILER_ID MATCHES \"MSVC\")\n\t\t# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared\n\t\tunset (ENV{VS_UNICODE_OUTPUT})\n\telseif (_option_COMPILER_ID MATCHES \"Clang\" AND _option_COMPILER_VERSION VERSION_LESS \"4.0.0\")\n\t\tif (_option_COMPILER_LAUNCHER MATCHES \"ccache\" OR\n\t\t\t_option_COMPILER_EXECUTABLE MATCHES \"ccache\")\n\t\t\t# Newer versions of Clang embed a compilation timestamp into the precompiled header binary,\n\t\t\t# which results in \"file has been modified since the precompiled header was built\" errors if ccache is used.\n\t\t\t# We work around the problem by disabling ccache upon pre-compiling the prefix header.\n\t\t\tset (ENV{CCACHE_DISABLE} \"true\")\n\t\tendif()\n\tendif()\n\texecute_process(\n\t\tCOMMAND ${_cmd}\n\t\tWORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"\n\t\tRESULT_VARIABLE _result)\n\tif (_result)\n\t\tmessage (FATAL_ERROR \"cotire: error ${_result} precompiling ${_prefixFile}.\")\n\tendif()\nendfunction()\n\nfunction (cotire_check_precompiled_header_support _language _target _msgVar)\n\tset (_unsupportedCompiler\n\t\t\"Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}\")\n\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC\")\n\t\t# PCH supported since Visual Studio C++ 6.0\n\t\t# and CMake does not support an earlier version\n\t\tset (${_msgVar} \"\" PARENT_SCOPE)\n\telseif (CMAKE_${_language}_COMPILER_ID MATCHES \"GNU\")\n\t\t# GCC PCH support requires version >= 3.4\n\t\tif (\"${CMAKE_${_language}_COMPILER_VERSION}\" VERSION_LESS \"3.4.0\")\n\t\t\tset (${_msgVar} \"${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}.\" PARENT_SCOPE)\n\t\telse()\n\t\t\tset (${_msgVar} \"\" PARENT_SCOPE)\n\t\tendif()\n\telseif (CMAKE_${_language}_COMPILER_ID MATCHES \"Clang\")\n\t\tif (UNIX)\n\t\t\t# all Unix Clang versions have PCH support\n\t\t\tset (${_msgVar} \"\" PARENT_SCOPE)\n\t\telseif (WIN32)\n\t\t\t# only clang-cl is supported under Windows\n\t\t\tget_filename_component(_compilerName \"${CMAKE_${_language}_COMPILER}\" NAME_WE)\n\t\t\tif (NOT _compilerName MATCHES \"cl$\")\n\t\t\t\tset (${_msgVar} \"${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}. Use clang-cl instead.\" PARENT_SCOPE)\n\t\t\tendif()\n\t\tendif()\n\telseif (CMAKE_${_language}_COMPILER_ID MATCHES \"Intel\")\n\t\t# Intel PCH support requires version >= 8.0.0\n\t\tif (\"${CMAKE_${_language}_COMPILER_VERSION}\" VERSION_LESS \"8.0.0\")\n\t\t\tset (${_msgVar} \"${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}.\" PARENT_SCOPE)\n\t\telse()\n\t\t\tset (${_msgVar} \"\" PARENT_SCOPE)\n\t\tendif()\n\telse()\n\t\tset (${_msgVar} \"${_unsupportedCompiler}.\" PARENT_SCOPE)\n\tendif()\n\t# check if ccache is used as a compiler launcher\n\tget_target_property(_launcher ${_target} ${_language}_COMPILER_LAUNCHER)\n\tget_filename_component(_realCompilerExe \"${CMAKE_${_language}_COMPILER}\" REALPATH)\n\tif (_realCompilerExe MATCHES \"ccache\" OR _launcher MATCHES \"ccache\")\n\t\t# verify that ccache configuration is compatible with precompiled headers\n\t\t# always check environment variable CCACHE_SLOPPINESS, because earlier versions of ccache\n\t\t# do not report the \"sloppiness\" setting correctly upon printing ccache configuration\n\t\tif (DEFINED ENV{CCACHE_SLOPPINESS})\n\t\t\tif (NOT \"$ENV{CCACHE_SLOPPINESS}\" MATCHES \"pch_defines\" OR\n\t\t\t\tNOT \"$ENV{CCACHE_SLOPPINESS}\" MATCHES \"time_macros\")\n\t\t\t\tset (${_msgVar}\n\t\t\t\t\t\"ccache requires the environment variable CCACHE_SLOPPINESS to be set to \\\"pch_defines,time_macros\\\".\"\n\t\t\t\t\tPARENT_SCOPE)\n\t\t\tendif()\n\t\telse()\n\t\t\tif (_realCompilerExe MATCHES \"ccache\")\n\t\t\t\tset (_ccacheExe \"${_realCompilerExe}\")\n\t\t\telse()\n\t\t\t\tset (_ccacheExe \"${_launcher}\")\n\t\t\tendif()\n\t\t\texecute_process(\n\t\t\t\tCOMMAND \"${_ccacheExe}\" \"--print-config\"\n\t\t\t\tWORKING_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}\"\n\t\t\t\tRESULT_VARIABLE _result\n\t\t\t\tOUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t\t\tERROR_QUIET)\n\t\t\tif (_result)\n\t\t\t\tset (${_msgVar} \"ccache configuration cannot be determined.\" PARENT_SCOPE)\n\t\t\telseif (NOT _ccacheConfig MATCHES \"sloppiness.*=.*time_macros\" OR\n\t\t\t\tNOT _ccacheConfig MATCHES \"sloppiness.*=.*pch_defines\")\n\t\t\t\tset (${_msgVar}\n\t\t\t\t\t\"ccache requires configuration setting \\\"sloppiness\\\" to be set to \\\"pch_defines,time_macros\\\".\"\n\t\t\t\t\tPARENT_SCOPE)\n\t\t\tendif()\n\t\tendif()\n\tendif()\n\tif (APPLE)\n\t\t# PCH compilation not supported by GCC / Clang for multi-architecture builds (e.g., i386, x86_64)\n\t\tcotire_get_configuration_types(_configs)\n\t\tforeach (_config ${_configs})\n\t\t\tset (_targetFlags \"\")\n\t\t\tcotire_get_target_compile_flags(\"${_config}\" \"${_language}\" \"${_target}\" _targetFlags)\n\t\t\tcotire_filter_compile_flags(\"${_language}\" \"arch\" _architectures _ignore ${_targetFlags})\n\t\t\tlist (LENGTH _architectures _numberOfArchitectures)\n\t\t\tif (_numberOfArchitectures GREATER 1)\n\t\t\t\tstring (REPLACE \";\" \", \" _architectureStr \"${_architectures}\")\n\t\t\t\tset (${_msgVar}\n\t\t\t\t\t\"Precompiled headers not supported on Darwin for multi-architecture builds (${_architectureStr}).\"\n\t\t\t\t\tPARENT_SCOPE)\n\t\t\t\tbreak()\n\t\t\tendif()\n\t\tendforeach()\n\tendif()\nendfunction()\n\nmacro (cotire_get_intermediate_dir _cotireDir)\n\t# ${CMAKE_CFG_INTDIR} may reference a build-time variable when using a generator which supports configuration types\n\tget_filename_component(${_cotireDir} \"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${COTIRE_INTDIR}\" ABSOLUTE)\nendmacro()\n\nmacro (cotire_setup_file_extension_variables)\n\tset (_unityFileExt_C \".c\")\n\tset (_unityFileExt_CXX \".cxx\")\n\tset (_prefixFileExt_C \".h\")\n\tset (_prefixFileExt_CXX \".hxx\")\n\tset (_prefixSourceFileExt_C \".c\")\n\tset (_prefixSourceFileExt_CXX \".cxx\")\nendmacro()\n\nfunction (cotire_make_single_unity_source_file_path _language _target _unityFileVar)\n\tcotire_setup_file_extension_variables()\n\tif (NOT DEFINED _unityFileExt_${_language})\n\t\tset (${_unityFileVar} \"\" PARENT_SCOPE)\n\t\treturn()\n\tendif()\n\tset (_unityFileBaseName \"${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}\")\n\tset (_unityFileName \"${_unityFileBaseName}${_unityFileExt_${_language}}\")\n\tcotire_get_intermediate_dir(_baseDir)\n\tset (_unityFile \"${_baseDir}/${_unityFileName}\")\n\tset (${_unityFileVar} \"${_unityFile}\" PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_make_unity_source_file_paths _language _target _maxIncludes _unityFilesVar)\n\tcotire_setup_file_extension_variables()\n\tif (NOT DEFINED _unityFileExt_${_language})\n\t\tset (${_unityFileVar} \"\" PARENT_SCOPE)\n\t\treturn()\n\tendif()\n\tset (_unityFileBaseName \"${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}\")\n\tcotire_get_intermediate_dir(_baseDir)\n\tset (_startIndex 0)\n\tset (_index 0)\n\tset (_unityFiles \"\")\n\tset (_sourceFiles ${ARGN})\n\tforeach (_sourceFile ${_sourceFiles})\n\t\tget_source_file_property(_startNew \"${_sourceFile}\" COTIRE_START_NEW_UNITY_SOURCE)\n\t\tmath (EXPR _unityFileCount \"${_index} - ${_startIndex}\")\n\t\tif (_startNew OR (_maxIncludes GREATER 0 AND NOT _unityFileCount LESS _maxIncludes))\n\t\t\tif (_index GREATER 0)\n\t\t\t\t# start new unity file segment\n\t\t\t\tmath (EXPR _endIndex \"${_index} - 1\")\n\t\t\t\tset (_unityFileName \"${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}\")\n\t\t\t\tlist (APPEND _unityFiles \"${_baseDir}/${_unityFileName}\")\n\t\t\tendif()\n\t\t\tset (_startIndex ${_index})\n\t\tendif()\n\t\tmath (EXPR _index \"${_index} + 1\")\n\tendforeach()\n\tlist (LENGTH _sourceFiles _numberOfSources)\n\tif (_startIndex EQUAL 0)\n\t\t# there is only a single unity file\n\t\tcotire_make_single_unity_source_file_path(${_language} ${_target} _unityFiles)\n\telseif (_startIndex LESS _numberOfSources)\n\t\t# end with final unity file segment\n\t\tmath (EXPR _endIndex \"${_index} - 1\")\n\t\tset (_unityFileName \"${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}\")\n\t\tlist (APPEND _unityFiles \"${_baseDir}/${_unityFileName}\")\n\tendif()\n\tset (${_unityFilesVar} ${_unityFiles} PARENT_SCOPE)\n\tif (COTIRE_DEBUG AND _unityFiles)\n\t\tmessage (STATUS \"unity files: ${_unityFiles}\")\n\tendif()\nendfunction()\n\nfunction (cotire_unity_to_prefix_file_path _language _target _unityFile _prefixFileVar)\n\tcotire_setup_file_extension_variables()\n\tif (NOT DEFINED _unityFileExt_${_language})\n\t\tset (${_prefixFileVar} \"\" PARENT_SCOPE)\n\t\treturn()\n\tendif()\n\tset (_unityFileBaseName \"${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}\")\n\tset (_prefixFileBaseName \"${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}\")\n\tstring (REPLACE \"${_unityFileBaseName}\" \"${_prefixFileBaseName}\" _prefixFile \"${_unityFile}\")\n\tstring (REGEX REPLACE \"${_unityFileExt_${_language}}$\" \"${_prefixFileExt_${_language}}\" _prefixFile \"${_prefixFile}\")\n\tset (${_prefixFileVar} \"${_prefixFile}\" PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_prefix_header_to_source_file_path _language _prefixHeaderFile _prefixSourceFileVar)\n\tcotire_setup_file_extension_variables()\n\tif (NOT DEFINED _prefixSourceFileExt_${_language})\n\t\tset (${_prefixSourceFileVar} \"\" PARENT_SCOPE)\n\t\treturn()\n\tendif()\n\tstring (REGEX REPLACE \"${_prefixFileExt_${_language}}$\" \"${_prefixSourceFileExt_${_language}}\" _prefixSourceFile \"${_prefixHeaderFile}\")\n\tset (${_prefixSourceFileVar} \"${_prefixSourceFile}\" PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_make_prefix_file_name _language _target _prefixFileBaseNameVar _prefixFileNameVar)\n\tcotire_setup_file_extension_variables()\n\tif (NOT _language)\n\t\tset (_prefixFileBaseName \"${_target}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}\")\n\t\tset (_prefixFileName \"${_prefixFileBaseName}${_prefixFileExt_C}\")\n\telseif (DEFINED _prefixFileExt_${_language})\n\t\tset (_prefixFileBaseName \"${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}\")\n\t\tset (_prefixFileName \"${_prefixFileBaseName}${_prefixFileExt_${_language}}\")\n\telse()\n\t\tset (_prefixFileBaseName \"\")\n\t\tset (_prefixFileName \"\")\n\tendif()\n\tset (${_prefixFileBaseNameVar} \"${_prefixFileBaseName}\" PARENT_SCOPE)\n\tset (${_prefixFileNameVar} \"${_prefixFileName}\" PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_make_prefix_file_path _language _target _prefixFileVar)\n\tcotire_make_prefix_file_name(\"${_language}\" \"${_target}\" _prefixFileBaseName _prefixFileName)\n\tset (${_prefixFileVar} \"\" PARENT_SCOPE)\n\tif (_prefixFileName)\n\t\tif (NOT _language)\n\t\t\tset (_language \"C\")\n\t\tendif()\n\t\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"GNU|Clang|Intel|MSVC\")\n\t\t\tcotire_get_intermediate_dir(_baseDir)\n\t\t\tset (${_prefixFileVar} \"${_baseDir}/${_prefixFileName}\" PARENT_SCOPE)\n\t\tendif()\n\tendif()\nendfunction()\n\nfunction (cotire_make_pch_file_path _language _target _pchFileVar)\n\tcotire_make_prefix_file_name(\"${_language}\" \"${_target}\" _prefixFileBaseName _prefixFileName)\n\tset (${_pchFileVar} \"\" PARENT_SCOPE)\n\tif (_prefixFileBaseName AND _prefixFileName)\n\t\tcotire_check_precompiled_header_support(\"${_language}\" \"${_target}\" _msg)\n\t\tif (NOT _msg)\n\t\t\tif (XCODE)\n\t\t\t\t# For Xcode, we completely hand off the compilation of the prefix header to the IDE\n\t\t\t\treturn()\n\t\t\tendif()\n\t\t\tcotire_get_intermediate_dir(_baseDir)\n\t\t\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC\")\n\t\t\t\t# MSVC uses the extension .pch added to the prefix header base name\n\t\t\t\tset (${_pchFileVar} \"${_baseDir}/${_prefixFileBaseName}.pch\" PARENT_SCOPE)\n\t\t\telseif (CMAKE_${_language}_COMPILER_ID MATCHES \"Clang\")\n\t\t\t\t# Clang looks for a precompiled header corresponding to the prefix header with the extension .pch appended\n\t\t\t\tset (${_pchFileVar} \"${_baseDir}/${_prefixFileName}.pch\" PARENT_SCOPE)\n\t\t\telseif (CMAKE_${_language}_COMPILER_ID MATCHES \"GNU\")\n\t\t\t\t# GCC looks for a precompiled header corresponding to the prefix header with the extension .gch appended\n\t\t\t\tset (${_pchFileVar} \"${_baseDir}/${_prefixFileName}.gch\" PARENT_SCOPE)\n\t\t\telseif (CMAKE_${_language}_COMPILER_ID MATCHES \"Intel\")\n\t\t\t\t# Intel uses the extension .pchi added to the prefix header base name\n\t\t\t\tset (${_pchFileVar} \"${_baseDir}/${_prefixFileBaseName}.pchi\" PARENT_SCOPE)\n\t\t\tendif()\n\t\tendif()\n\tendif()\nendfunction()\n\nfunction (cotire_select_unity_source_files _unityFile _sourcesVar)\n\tset (_sourceFiles ${ARGN})\n\tif (_sourceFiles AND \"${_unityFile}\" MATCHES \"${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}_([0-9]+)_([0-9]+)\")\n\t\tset (_startIndex ${CMAKE_MATCH_1})\n\t\tset (_endIndex ${CMAKE_MATCH_2})\n\t\tlist (LENGTH _sourceFiles _numberOfSources)\n\t\tif (NOT _startIndex LESS _numberOfSources)\n\t\t\tmath (EXPR _startIndex \"${_numberOfSources} - 1\")\n\t\tendif()\n\t\tif (NOT _endIndex LESS _numberOfSources)\n\t\t\tmath (EXPR _endIndex \"${_numberOfSources} - 1\")\n\t\tendif()\n\t\tset (_files \"\")\n\t\tforeach (_index RANGE ${_startIndex} ${_endIndex})\n\t\t\tlist (GET _sourceFiles ${_index} _file)\n\t\t\tlist (APPEND _files \"${_file}\")\n\t\tendforeach()\n\telse()\n\t\tset (_files ${_sourceFiles})\n\tendif()\n\tset (${_sourcesVar} ${_files} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_unity_source_dependencies _language _target _dependencySourcesVar)\n\tset (_dependencySources \"\")\n\t# depend on target's generated source files\n\tget_target_property(_targetSourceFiles ${_target} SOURCES)\n\tcotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles})\n\tif (_generatedSources)\n\t\t# but omit all generated source files that have the COTIRE_EXCLUDED property set to true\n\t\tcotire_get_objects_with_property_on(_excludedGeneratedSources COTIRE_EXCLUDED SOURCE ${_generatedSources})\n\t\tif (_excludedGeneratedSources)\n\t\t\tlist (REMOVE_ITEM _generatedSources ${_excludedGeneratedSources})\n\t\tendif()\n\t\t# and omit all generated source files that have the COTIRE_DEPENDENCY property set to false explicitly\n\t\tcotire_get_objects_with_property_off(_excludedNonDependencySources COTIRE_DEPENDENCY SOURCE ${_generatedSources})\n\t\tif (_excludedNonDependencySources)\n\t\t\tlist (REMOVE_ITEM _generatedSources ${_excludedNonDependencySources})\n\t\tendif()\n\t\tif (_generatedSources)\n\t\t\tlist (APPEND _dependencySources ${_generatedSources})\n\t\tendif()\n\tendif()\n\tif (COTIRE_DEBUG AND _dependencySources)\n\t\tmessage (STATUS \"${_language} ${_target} unity source dependencies: ${_dependencySources}\")\n\tendif()\n\tset (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_get_prefix_header_dependencies _language _target _dependencySourcesVar)\n\tset (_dependencySources \"\")\n\t# depend on target source files marked with custom COTIRE_DEPENDENCY property\n\tget_target_property(_targetSourceFiles ${_target} SOURCES)\n\tcotire_get_objects_with_property_on(_dependencySources COTIRE_DEPENDENCY SOURCE ${_targetSourceFiles})\n\tif (COTIRE_DEBUG AND _dependencySources)\n\t\tmessage (STATUS \"${_language} ${_target} prefix header dependencies: ${_dependencySources}\")\n\tendif()\n\tset (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_generate_target_script _language _configurations _target _targetScriptVar _targetConfigScriptVar)\n\tset (_targetSources ${ARGN})\n\tcotire_get_prefix_header_dependencies(${_language} ${_target} COTIRE_TARGET_PREFIX_DEPENDS ${_targetSources})\n\tcotire_get_unity_source_dependencies(${_language} ${_target} COTIRE_TARGET_UNITY_DEPENDS ${_targetSources})\n\t# set up variables to be configured\n\tset (COTIRE_TARGET_LANGUAGE \"${_language}\")\n\tget_target_property(COTIRE_TARGET_IGNORE_PATH ${_target} COTIRE_PREFIX_HEADER_IGNORE_PATH)\n\tcotire_add_sys_root_paths(COTIRE_TARGET_IGNORE_PATH)\n\tget_target_property(COTIRE_TARGET_INCLUDE_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PATH)\n\tcotire_add_sys_root_paths(COTIRE_TARGET_INCLUDE_PATH)\n\tget_target_property(COTIRE_TARGET_PRE_UNDEFS ${_target} COTIRE_UNITY_SOURCE_PRE_UNDEFS)\n\tget_target_property(COTIRE_TARGET_POST_UNDEFS ${_target} COTIRE_UNITY_SOURCE_POST_UNDEFS)\n\tget_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)\n\tget_target_property(COTIRE_TARGET_INCLUDE_PRIORITY_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH)\n\tcotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${_targetSources})\n\tcotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${_targetSources})\n\tset (COTIRE_TARGET_CONFIGURATION_TYPES \"${_configurations}\")\n\tforeach (_config ${_configurations})\n\t\tstring (TOUPPER \"${_config}\" _upperConfig)\n\t\tcotire_get_target_include_directories(\n\t\t\t\"${_config}\" \"${_language}\" \"${_target}\" COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig} COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig})\n\t\tcotire_get_target_compile_definitions(\n\t\t\t\"${_config}\" \"${_language}\" \"${_target}\" COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig})\n\t\tcotire_get_target_compiler_flags(\n\t\t\t\"${_config}\" \"${_language}\" \"${_target}\" COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig})\n\t\tcotire_get_source_files_compile_definitions(\n\t\t\t\"${_config}\" \"${_language}\" COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig} ${_targetSources})\n\tendforeach()\n\tget_target_property(COTIRE_TARGET_${_language}_COMPILER_LAUNCHER ${_target} ${_language}_COMPILER_LAUNCHER)\n\t# set up COTIRE_TARGET_SOURCES\n\tset (COTIRE_TARGET_SOURCES \"\")\n\tforeach (_sourceFile ${_targetSources})\n\t\tget_source_file_property(_generated \"${_sourceFile}\" GENERATED)\n\t\tif (_generated)\n\t\t\t# use absolute paths for generated files only, retrieving the LOCATION property is an expensive operation\n\t\t\tget_source_file_property(_sourceLocation \"${_sourceFile}\" LOCATION)\n\t\t\tlist (APPEND COTIRE_TARGET_SOURCES \"${_sourceLocation}\")\n\t\telse()\n\t\t\tlist (APPEND COTIRE_TARGET_SOURCES \"${_sourceFile}\")\n\t\tendif()\n\tendforeach()\n\t# copy variable definitions to cotire target script\n\tget_cmake_property(_vars VARIABLES)\n\tstring (REGEX MATCHALL \"COTIRE_[A-Za-z0-9_]+\" _matchVars \"${_vars}\")\n\t# omit COTIRE_*_INIT variables\n\tstring (REGEX MATCHALL \"COTIRE_[A-Za-z0-9_]+_INIT\" _initVars \"${_matchVars}\")\n\tif (_initVars)\n\t\tlist (REMOVE_ITEM _matchVars ${_initVars})\n\tendif()\n\t# omit COTIRE_VERBOSE which is passed as a CMake define on command line\n\tlist (REMOVE_ITEM _matchVars COTIRE_VERBOSE)\n\tset (_contents \"\")\n\tset (_contentsHasGeneratorExpressions FALSE)\n\tforeach (_var IN LISTS _matchVars ITEMS\n\t\tXCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES\n\t\tCMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION\n\t\tCMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1\n\t\tCMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_SEP_${_language}\n\t\tCMAKE_INCLUDE_SYSTEM_FLAG_${_language}\n\t\tCMAKE_${_language}_FRAMEWORK_SEARCH_FLAG\n\t\tCMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG\n\t\tCMAKE_${_language}_SOURCE_FILE_EXTENSIONS)\n\t\tif (DEFINED ${_var})\n\t\t\tstring (REPLACE \"\\\"\" \"\\\\\\\"\" _value \"${${_var}}\")\n\n\t\t\tif (\"${_value}\" MATCHES \"\\\\$<.*>\")\n\t\t\t\t# We have to evaluate generator expressions\n\t\t\t\tif (NOT _contentsHasGeneratorExpressions)\n\t\t\t\t\tset (_contentsHasGeneratorExpressions TRUE)\n\t\t\t\tendif()\n\n\t\t\t\t# Expand various generator expressions which can only be evaluated on binary targets manually\n\t\t\t\tforeach(_currentReplacedGeneratorExpression \"C_COMPILER_ID\" \"CXX_COMPILER_ID\")\n\t\t\t\t\tset(_currentReplacement ${CMAKE_${_currentReplacedGeneratorExpression}})\n\n\t\t\t\t\tstring (REGEX REPLACE \"\\\\$<${_currentReplacedGeneratorExpression}:([a-zA-Z0-9]*)>\" \"$<STREQUAL:\\\\\\\\\\\"${_currentReplacement}\\\\\\\\\\\",\\\\\\\\\\\"\\\\1\\\\\\\\\\\">\" _value \"${_value}\")\n\t\t\t\tendforeach(_currentReplacedGeneratorExpression)\n\t\t\tendif()\n\n\t\t\tset (_contents \"${_contents}set (${_var} \\\"${_value}\\\")\\n\")\n\t\tendif()\n\tendforeach()\n\t# generate target script file\n\tget_filename_component(_moduleName \"${COTIRE_CMAKE_MODULE_FILE}\" NAME)\n\tset (_targetCotireScript \"${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_moduleName}\")\n\tcotire_write_file(\"CMAKE\" \"${_targetCotireScript}\" \"${_contents}\" FALSE)\n\tif (_contentsHasGeneratorExpressions)\n\t\t# use file(GENERATE ...) to expand generator expressions in the target script at CMake generate-time\n\t\tset (_configNameOrNoneGeneratorExpression \"$<$<CONFIG:>:None>$<$<NOT:$<CONFIG:>>:$<CONFIGURATION>>\")\n\t\tset (_targetCotireConfigScript \"${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_configNameOrNoneGeneratorExpression}_${_moduleName}\")\n\t\tfile (GENERATE OUTPUT \"${_targetCotireConfigScript}\" INPUT \"${_targetCotireScript}\")\n\telse()\n\t\tset (_targetCotireConfigScript \"${_targetCotireScript}\")\n\tendif()\n\tset (${_targetScriptVar} \"${_targetCotireScript}\" PARENT_SCOPE)\n\tset (${_targetConfigScriptVar} \"${_targetCotireConfigScript}\" PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile)\n\tset (_sourceFiles ${ARGN})\n\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC|Intel\" OR\n\t\t(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES \"Clang\"))\n\t\t# for MSVC, Intel and Clang-cl, we attach the precompiled header compilation to the host file\n\t\t# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion\n\t\tif (_sourceFiles)\n\t\t\tset (_flags \"\")\n\t\t\tcotire_add_pch_compilation_flags(\n\t\t\t\t\"${_language}\" \"${CMAKE_${_language}_COMPILER_ID}\" \"${CMAKE_${_language}_COMPILER_VERSION}\"\n\t\t\t\t\"${_prefixFile}\" \"${_pchFile}\" \"${_hostFile}\" _flags)\n\t\t\tset_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS \" ${_flags} \")\n\t\t\tset_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS \"${_pchFile}\")\n\t\t\t# make object file generated from host file depend on prefix header\n\t\t\tset_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS \"${_prefixFile}\")\n\t\t\t# mark host file as cotired to prevent it from being used in another cotired target\n\t\t\tset_property (SOURCE ${_hostFile} PROPERTY COTIRE_TARGET \"${_target}\")\n\t\tendif()\n\telseif (\"${CMAKE_GENERATOR}\" MATCHES \"Make|Ninja\")\n\t\t# for makefile based generator, we add a custom command to precompile the prefix header\n\t\tif (_targetScript)\n\t\t\tcotire_set_cmd_to_prologue(_cmds)\n\t\t\tlist (APPEND _cmds -P \"${COTIRE_CMAKE_MODULE_FILE}\" \"precompile\" \"${_targetScript}\" \"${_prefixFile}\" \"${_pchFile}\" \"${_hostFile}\")\n\t\t\tif (MSVC_IDE)\n\t\t\t\tfile (TO_NATIVE_PATH \"${_pchFile}\" _pchFileLogPath)\n\t\t\telse()\n\t\t\t\tfile (RELATIVE_PATH _pchFileLogPath \"${CMAKE_BINARY_DIR}\" \"${_pchFile}\")\n\t\t\tendif()\n\t\t\t# make precompiled header compilation depend on the actual compiler executable used to force\n\t\t\t# re-compilation when the compiler executable is updated. This prevents \"created by a different GCC executable\"\n\t\t\t# warnings when the precompiled header is included.\n\t\t\tget_filename_component(_realCompilerExe \"${CMAKE_${_language}_COMPILER}\" ABSOLUTE)\n\t\t\tif (COTIRE_DEBUG)\n\t\t\t\tmessage (STATUS \"add_custom_command: OUTPUT ${_pchFile} ${_cmds} DEPENDS ${_prefixFile} ${_realCompilerExe} IMPLICIT_DEPENDS ${_language} ${_prefixFile}\")\n\t\t\tendif()\n\t\t\tset_property (SOURCE \"${_pchFile}\" PROPERTY GENERATED TRUE)\n\t\t\tadd_custom_command(\n\t\t\t\tOUTPUT \"${_pchFile}\"\n\t\t\t\tCOMMAND ${_cmds}\n\t\t\t\tDEPENDS \"${_prefixFile}\" \"${_realCompilerExe}\"\n\t\t\t\tIMPLICIT_DEPENDS ${_language} \"${_prefixFile}\"\n\t\t\t\tWORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"\n\t\t\t\tCOMMENT \"Building ${_language} precompiled header ${_pchFileLogPath}\"\n\t\t\t\tVERBATIM)\n\t\tendif()\n\tendif()\nendfunction()\n\nfunction (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile)\n\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC|Intel\" OR\n\t\t(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES \"Clang\"))\n\t\t# for MSVC, Intel and clang-cl, we include the precompiled header in all but the host file\n\t\t# the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation\n\t\tset (_sourceFiles ${ARGN})\n\t\tlist (LENGTH _sourceFiles _numberOfSourceFiles)\n\t\tif (_numberOfSourceFiles GREATER 0)\n\t\t\t# mark sources as cotired to prevent them from being used in another cotired target\n\t\t\tset_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET \"${_target}\")\n\t\t\tset (_flags \"\")\n\t\t\tcotire_add_prefix_pch_inclusion_flags(\n\t\t\t\t\"${_language}\" \"${CMAKE_${_language}_COMPILER_ID}\" \"${CMAKE_${_language}_COMPILER_VERSION}\"\n\t\t\t\t\"${_prefixFile}\" \"${_pchFile}\" _flags)\n\t\t\tset_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS \" ${_flags} \")\n\t\t\t# make object files generated from source files depend on precompiled header\n\t\t\tset_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS \"${_pchFile}\")\n\t\tendif()\n\telseif (\"${CMAKE_GENERATOR}\" MATCHES \"Make|Ninja\")\n\t\tset (_sourceFiles ${_hostFile} ${ARGN})\n\t\tif (NOT _wholeTarget)\n\t\t\t# for makefile based generator, we force the inclusion of the prefix header for a subset\n\t\t\t# of the source files, if this is a multi-language target or has excluded files\n\t\t\tset (_flags \"\")\n\t\t\tcotire_add_prefix_pch_inclusion_flags(\n\t\t\t\t\"${_language}\" \"${CMAKE_${_language}_COMPILER_ID}\" \"${CMAKE_${_language}_COMPILER_VERSION}\"\n\t\t\t\t\"${_prefixFile}\" \"${_pchFile}\" _flags)\n\t\t\tset_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS \" ${_flags} \")\n\t\t\t# mark sources as cotired to prevent them from being used in another cotired target\n\t\t\tset_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET \"${_target}\")\n\t\tendif()\n\t\t# make object files generated from source files depend on precompiled header\n\t\tset_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS \"${_pchFile}\")\n\tendif()\nendfunction()\n\nfunction (cotire_setup_prefix_file_inclusion _language _target _prefixFile)\n\tset (_sourceFiles ${ARGN})\n\t# force the inclusion of the prefix header for the given source files\n\tset (_flags \"\")\n\tset (_pchFile \"\")\n\tcotire_add_prefix_pch_inclusion_flags(\n\t\t\"${_language}\" \"${CMAKE_${_language}_COMPILER_ID}\" \"${CMAKE_${_language}_COMPILER_VERSION}\"\n\t\t\"${_prefixFile}\" \"${_pchFile}\" _flags)\n\tset_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS \" ${_flags} \")\n\t# mark sources as cotired to prevent them from being used in another cotired target\n\tset_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET \"${_target}\")\n\t# make object files generated from source files depend on prefix header\n\tset_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS \"${_prefixFile}\")\nendfunction()\n\nfunction (cotire_get_first_set_property_value _propertyValueVar _type _object)\n\tset (_properties ${ARGN})\n\tforeach (_property ${_properties})\n\t\tget_property(_propertyValue ${_type} \"${_object}\" PROPERTY ${_property})\n\t\tif (_propertyValue)\n\t\t\tset (${_propertyValueVar} ${_propertyValue} PARENT_SCOPE)\n\t\t\treturn()\n\t\tendif()\n\tendforeach()\n\tset (${_propertyValueVar} \"\" PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_setup_combine_command _language _targetScript _joinedFile _cmdsVar)\n\tset (_files ${ARGN})\n\tset (_filesPaths \"\")\n\tforeach (_file ${_files})\n\t\tget_filename_component(_filePath \"${_file}\" ABSOLUTE)\n\t\tlist (APPEND _filesPaths \"${_filePath}\")\n\tendforeach()\n\tcotire_set_cmd_to_prologue(_prefixCmd)\n\tlist (APPEND _prefixCmd -P \"${COTIRE_CMAKE_MODULE_FILE}\" \"combine\")\n\tif (_targetScript)\n\t\tlist (APPEND _prefixCmd \"${_targetScript}\")\n\tendif()\n\tlist (APPEND _prefixCmd \"${_joinedFile}\" ${_filesPaths})\n\tif (COTIRE_DEBUG)\n\t\tmessage (STATUS \"add_custom_command: OUTPUT ${_joinedFile} COMMAND ${_prefixCmd} DEPENDS ${_files}\")\n\tendif()\n\tset_property (SOURCE \"${_joinedFile}\" PROPERTY GENERATED TRUE)\n\tif (MSVC_IDE)\n\t\tfile (TO_NATIVE_PATH \"${_joinedFile}\" _joinedFileLogPath)\n\telse()\n\t\tfile (RELATIVE_PATH _joinedFileLogPath \"${CMAKE_BINARY_DIR}\" \"${_joinedFile}\")\n\tendif()\n\tget_filename_component(_joinedFileBaseName \"${_joinedFile}\" NAME_WE)\n\tget_filename_component(_joinedFileExt \"${_joinedFile}\" EXT)\n\tif (_language AND _joinedFileBaseName MATCHES \"${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}$\")\n\t\tset (_comment \"Generating ${_language} unity source ${_joinedFileLogPath}\")\n\telseif (_language AND _joinedFileBaseName MATCHES \"${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}$\")\n\t\tif (_joinedFileExt MATCHES \"^\\\\.c\")\n\t\t\tset (_comment \"Generating ${_language} prefix source ${_joinedFileLogPath}\")\n\t\telse()\n\t\t\tset (_comment \"Generating ${_language} prefix header ${_joinedFileLogPath}\")\n\t\tendif()\n\telse()\n\t\tset (_comment \"Generating ${_joinedFileLogPath}\")\n\tendif()\n\tadd_custom_command(\n\t\tOUTPUT \"${_joinedFile}\"\n\t\tCOMMAND ${_prefixCmd}\n\t\tDEPENDS ${_files}\n\t\tCOMMENT \"${_comment}\"\n\t\tWORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\"\n\t\tVERBATIM)\n\tlist (APPEND ${_cmdsVar} COMMAND ${_prefixCmd})\n\tset (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_setup_target_pch_usage _languages _target _wholeTarget)\n\tif (XCODE)\n\t\t# for Xcode, we attach a pre-build action to generate the unity sources and prefix headers\n\t\tset (_prefixFiles \"\")\n\t\tforeach (_language ${_languages})\n\t\t\tget_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)\n\t\t\tif (_prefixFile)\n\t\t\t\tlist (APPEND _prefixFiles \"${_prefixFile}\")\n\t\t\tendif()\n\t\tendforeach()\n\t\tset (_cmds ${ARGN})\n\t\tlist (LENGTH _prefixFiles _numberOfPrefixFiles)\n\t\tif (_numberOfPrefixFiles GREATER 1)\n\t\t\t# we also generate a generic, single prefix header which includes all language specific prefix headers\n\t\t\tset (_language \"\")\n\t\t\tset (_targetScript \"\")\n\t\t\tcotire_make_prefix_file_path(\"${_language}\" ${_target} _prefixHeader)\n\t\t\tcotire_setup_combine_command(\"${_language}\" \"${_targetScript}\" \"${_prefixHeader}\" _cmds ${_prefixFiles})\n\t\telse()\n\t\t\tset (_prefixHeader \"${_prefixFiles}\")\n\t\tendif()\n\t\tif (COTIRE_DEBUG)\n\t\t\tmessage (STATUS \"add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}\")\n\t\tendif()\n\t\t# because CMake PRE_BUILD command does not support dependencies,\n\t\t# we check dependencies explicity in cotire script mode when the pre-build action is run\n\t\tadd_custom_command(\n\t\t\tTARGET \"${_target}\"\n\t\t\tPRE_BUILD ${_cmds}\n\t\t\tWORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"\n\t\t\tCOMMENT \"Updating target ${_target} prefix headers\"\n\t\t\tVERBATIM)\n\t\t# make Xcode precompile the generated prefix header with ProcessPCH and ProcessPCH++\n\t\tset_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER \"YES\")\n\t\tset_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER \"${_prefixHeader}\")\n\telseif (\"${CMAKE_GENERATOR}\" MATCHES \"Make|Ninja\")\n\t\t# for makefile based generator, we force inclusion of the prefix header for all target source files\n\t\t# if this is a single-language target without any excluded files\n\t\tif (_wholeTarget)\n\t\t\tset (_language \"${_languages}\")\n\t\t\t# for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level\n\t\t\t# see cotire_setup_pch_file_inclusion\n\t\t\tif (NOT CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC|Intel\" AND NOT\n\t\t\t\t(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES \"Clang\"))\n\t\t\t\tget_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)\n\t\t\t\tif (_prefixFile)\n\t\t\t\t\tget_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER)\n\t\t\t\t\tset (_options COMPILE_OPTIONS)\n\t\t\t\t\tcotire_add_prefix_pch_inclusion_flags(\n\t\t\t\t\t\t\"${_language}\" \"${CMAKE_${_language}_COMPILER_ID}\" \"${CMAKE_${_language}_COMPILER_VERSION}\"\n\t\t\t\t\t\t\"${_prefixFile}\" \"${_pchFile}\" _options)\n\t\t\t\t\tset_property(TARGET ${_target} APPEND PROPERTY ${_options})\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\tendif()\nendfunction()\n\nfunction (cotire_setup_unity_generation_commands _language _target _targetScript _targetConfigScript _unityFiles _cmdsVar)\n\tset (_dependencySources \"\")\n\tcotire_get_unity_source_dependencies(${_language} ${_target} _dependencySources ${ARGN})\n\tforeach (_unityFile ${_unityFiles})\n\t\tset_property (SOURCE \"${_unityFile}\" PROPERTY GENERATED TRUE)\n\t\t# set up compiled unity source dependencies via OBJECT_DEPENDS\n\t\t# this ensures that missing source files are generated before the unity file is compiled\n\t\tif (COTIRE_DEBUG AND _dependencySources)\n\t\t\tmessage (STATUS \"${_unityFile} OBJECT_DEPENDS ${_dependencySources}\")\n\t\tendif()\n\t\tif (_dependencySources)\n\t\t\t# the OBJECT_DEPENDS property requires a list of full paths\n\t\t\tset (_objectDependsPaths \"\")\n\t\t\tforeach (_sourceFile ${_dependencySources})\n\t\t\t\tget_source_file_property(_sourceLocation \"${_sourceFile}\" LOCATION)\n\t\t\t\tlist (APPEND _objectDependsPaths \"${_sourceLocation}\")\n\t\t\tendforeach()\n\t\t\tset_property (SOURCE \"${_unityFile}\" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths})\n\t\tendif()\n\t\tif (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC|Intel\")\n\t\t\t# unity file compilation results in potentially huge object file,\n\t\t\t# thus use /bigobj by default unter cl.exe and Windows Intel\n\t\t\tset_property (SOURCE \"${_unityFile}\" APPEND_STRING PROPERTY COMPILE_FLAGS \"/bigobj\")\n\t\tendif()\n\t\tcotire_set_cmd_to_prologue(_unityCmd)\n\t\tlist (APPEND _unityCmd -P \"${COTIRE_CMAKE_MODULE_FILE}\" \"unity\" \"${_targetConfigScript}\" \"${_unityFile}\")\n\t\tif (CMAKE_VERSION VERSION_LESS \"3.1.0\")\n\t\t\tset (_unityCmdDepends \"${_targetScript}\")\n\t\telse()\n\t\t\t# CMake 3.1.0 supports generator expressions in arguments to DEPENDS\n\t\t\tset (_unityCmdDepends \"${_targetConfigScript}\")\n\t\tendif()\n\t\tif (MSVC_IDE)\n\t\t\tfile (TO_NATIVE_PATH \"${_unityFile}\" _unityFileLogPath)\n\t\telse()\n\t\t\tfile (RELATIVE_PATH _unityFileLogPath \"${CMAKE_BINARY_DIR}\" \"${_unityFile}\")\n\t\tendif()\n\t\tif (COTIRE_DEBUG)\n\t\t\tmessage (STATUS \"add_custom_command: OUTPUT ${_unityFile} COMMAND ${_unityCmd} DEPENDS ${_unityCmdDepends}\")\n\t\tendif()\n\t\tadd_custom_command(\n\t\t\tOUTPUT \"${_unityFile}\"\n\t\t\tCOMMAND ${_unityCmd}\n\t\t\tDEPENDS ${_unityCmdDepends}\n\t\t\tCOMMENT \"Generating ${_language} unity source ${_unityFileLogPath}\"\n\t\t\tWORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"\n\t\t\tVERBATIM)\n\t\tlist (APPEND ${_cmdsVar} COMMAND ${_unityCmd})\n\tendforeach()\n\tset (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_setup_prefix_generation_command _language _target _targetScript _prefixFile _unityFiles _cmdsVar)\n\tset (_sourceFiles ${ARGN})\n\tset (_dependencySources \"\")\n\tcotire_get_prefix_header_dependencies(${_language} ${_target} _dependencySources ${_sourceFiles})\n\tcotire_set_cmd_to_prologue(_prefixCmd)\n\tlist (APPEND _prefixCmd -P \"${COTIRE_CMAKE_MODULE_FILE}\" \"prefix\" \"${_targetScript}\" \"${_prefixFile}\" ${_unityFiles})\n\tset_property (SOURCE \"${_prefixFile}\" PROPERTY GENERATED TRUE)\n\t# make prefix header generation depend on the actual compiler executable used to force\n\t# re-generation when the compiler executable is updated. This prevents \"file not found\"\n\t# errors for compiler version specific system header files.\n\tget_filename_component(_realCompilerExe \"${CMAKE_${_language}_COMPILER}\" ABSOLUTE)\n\tif (COTIRE_DEBUG)\n\t\tmessage (STATUS \"add_custom_command: OUTPUT ${_prefixFile} COMMAND ${_prefixCmd} DEPENDS ${_unityFile} ${_dependencySources} ${_realCompilerExe}\")\n\tendif()\n\tif (MSVC_IDE)\n\t\tfile (TO_NATIVE_PATH \"${_prefixFile}\" _prefixFileLogPath)\n\telse()\n\t\tfile (RELATIVE_PATH _prefixFileLogPath \"${CMAKE_BINARY_DIR}\" \"${_prefixFile}\")\n\tendif()\n\tget_filename_component(_prefixFileExt \"${_prefixFile}\" EXT)\n\tif (_prefixFileExt MATCHES \"^\\\\.c\")\n\t\tset (_comment \"Generating ${_language} prefix source ${_prefixFileLogPath}\")\n\telse()\n\t\tset (_comment \"Generating ${_language} prefix header ${_prefixFileLogPath}\")\n\tendif()\n\t# prevent pre-processing errors upon generating the prefix header when a target's generated include file does not yet exist\n\t# we do not add a file-level dependency for the target's generated files though, because we only want to depend on their existence\n\t# thus we make the prefix header generation depend on a custom helper target which triggers the generation of the files\n\tset (_preTargetName \"${_target}${COTIRE_PCH_TARGET_SUFFIX}_pre\")\n\tif (TARGET ${_preTargetName})\n\t\t# custom helper target has already been generated while processing a different language\n\t\tlist (APPEND _dependencySources ${_preTargetName})\n\telse()\n\t\tget_target_property(_targetSourceFiles ${_target} SOURCES)\n\t\tcotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles})\n\t\tif (_generatedSources)\n\t\t\tadd_custom_target(\"${_preTargetName}\" DEPENDS ${_generatedSources})\n\t\t\tcotire_init_target(\"${_preTargetName}\")\n\t\t\tlist (APPEND _dependencySources ${_preTargetName})\n\t\tendif()\n\tendif()\n\tadd_custom_command(\n\t\tOUTPUT \"${_prefixFile}\" \"${_prefixFile}.log\"\n\t\tCOMMAND ${_prefixCmd}\n\t\tDEPENDS ${_unityFiles} ${_dependencySources} \"${_realCompilerExe}\"\n\t\tCOMMENT \"${_comment}\"\n\t\tWORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"\n\t\tVERBATIM)\n\tlist (APPEND ${_cmdsVar} COMMAND ${_prefixCmd})\n\tset (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_setup_prefix_generation_from_unity_command _language _target _targetScript _prefixFile _unityFiles _cmdsVar)\n\tset (_sourceFiles ${ARGN})\n\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"GNU|Clang\")\n\t\t# GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma\n\t\tcotire_prefix_header_to_source_file_path(${_language} \"${_prefixFile}\" _prefixSourceFile)\n\telse()\n\t\tset (_prefixSourceFile \"${_prefixFile}\")\n\tendif()\n\tcotire_setup_prefix_generation_command(\n\t\t${_language} ${_target} \"${_targetScript}\"\n\t\t\"${_prefixSourceFile}\" \"${_unityFiles}\" ${_cmdsVar} ${_sourceFiles})\n\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"GNU|Clang\")\n\t\t# set up generation of a prefix source file which includes the prefix header\n\t\tcotire_setup_combine_command(${_language} \"${_targetScript}\" \"${_prefixFile}\" _cmds ${_prefixSourceFile})\n\tendif()\n\tset (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_setup_prefix_generation_from_provided_command _language _target _targetScript _prefixFile _cmdsVar)\n\tset (_prefixHeaderFiles ${ARGN})\n\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"GNU|Clang\")\n\t\t# GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma\n\t\tcotire_prefix_header_to_source_file_path(${_language} \"${_prefixFile}\" _prefixSourceFile)\n\telse()\n\t\tset (_prefixSourceFile \"${_prefixFile}\")\n\tendif()\n\tcotire_setup_combine_command(${_language} \"${_targetScript}\" \"${_prefixSourceFile}\" _cmds ${_prefixHeaderFiles})\n\tif (CMAKE_${_language}_COMPILER_ID MATCHES \"GNU|Clang\")\n\t\t# set up generation of a prefix source file which includes the prefix header\n\t\tcotire_setup_combine_command(${_language} \"${_targetScript}\" \"${_prefixFile}\" _cmds ${_prefixSourceFile})\n\tendif()\n\tset (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_init_cotire_target_properties _target)\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER TRUE)\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD TRUE)\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN FALSE)\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH \"${CMAKE_SOURCE_DIR}\")\n\t\tcotire_check_is_path_relative_to(\"${CMAKE_BINARY_DIR}\" _isRelative \"${CMAKE_SOURCE_DIR}\")\n\t\tif (NOT _isRelative)\n\t\t\tset_property(TARGET ${_target} APPEND PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH \"${CMAKE_BINARY_DIR}\")\n\t\tendif()\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH \"\")\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH \"\")\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS \"\")\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS \"\")\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT SET)\n\tif (NOT _isSet)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT \"COPY_UNITY\")\n\tendif()\n\tget_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES SET)\n\tif (NOT _isSet)\n\t\tif (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES)\n\t\t\tset_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES \"${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES}\")\n\t\telse()\n\t\t\tset_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES \"\")\n\t\tendif()\n\tendif()\nendfunction()\n\nfunction (cotire_make_target_message _target _languages _disableMsg _targetMsgVar)\n\tget_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER)\n\tget_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD)\n\tstring (REPLACE \";\" \" \" _languagesStr \"${_languages}\")\n\tmath (EXPR _numberOfExcludedFiles \"${ARGC} - 4\")\n\tif (_numberOfExcludedFiles EQUAL 0)\n\t\tset (_excludedStr \"\")\n\telseif (COTIRE_VERBOSE OR _numberOfExcludedFiles LESS 4)\n\t\tstring (REPLACE \";\" \", \" _excludedStr \"excluding ${ARGN}\")\n\telse()\n\t\tset (_excludedStr \"excluding ${_numberOfExcludedFiles} files\")\n\tendif()\n\tset (_targetMsg \"\")\n\tif (NOT _languages)\n\t\tset (_targetMsg \"Target ${_target} cannot be cotired.\")\n\t\tif (_disableMsg)\n\t\t\tset (_targetMsg \"${_targetMsg} ${_disableMsg}\")\n\t\tendif()\n\telseif (NOT _targetUsePCH AND NOT _targetAddSCU)\n\t\tset (_targetMsg \"${_languagesStr} target ${_target} cotired without unity build and precompiled header.\")\n\t\tif (_disableMsg)\n\t\t\tset (_targetMsg \"${_targetMsg} ${_disableMsg}\")\n\t\tendif()\n\telseif (NOT _targetUsePCH)\n\t\tif (_excludedStr)\n\t\t\tset (_targetMsg \"${_languagesStr} target ${_target} cotired without precompiled header ${_excludedStr}.\")\n\t\telse()\n\t\t\tset (_targetMsg \"${_languagesStr} target ${_target} cotired without precompiled header.\")\n\t\tendif()\n\t\tif (_disableMsg)\n\t\t\tset (_targetMsg \"${_targetMsg} ${_disableMsg}\")\n\t\tendif()\n\telseif (NOT _targetAddSCU)\n\t\tif (_excludedStr)\n\t\t\tset (_targetMsg \"${_languagesStr} target ${_target} cotired without unity build ${_excludedStr}.\")\n\t\telse()\n\t\t\tset (_targetMsg \"${_languagesStr} target ${_target} cotired without unity build.\")\n\t\tendif()\n\t\tif (_disableMsg)\n\t\t\tset (_targetMsg \"${_targetMsg} ${_disableMsg}\")\n\t\tendif()\n\telse()\n\t\tif (_excludedStr)\n\t\t\tset (_targetMsg \"${_languagesStr} target ${_target} cotired ${_excludedStr}.\")\n\t\telse()\n\t\t\tset (_targetMsg \"${_languagesStr} target ${_target} cotired.\")\n\t\tendif()\n\tendif()\n\tset (${_targetMsgVar} \"${_targetMsg}\" PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_choose_target_languages _target _targetLanguagesVar _wholeTargetVar)\n\tset (_languages ${ARGN})\n\tset (_allSourceFiles \"\")\n\tset (_allExcludedSourceFiles \"\")\n\tset (_allCotiredSourceFiles \"\")\n\tset (_targetLanguages \"\")\n\tset (_pchEligibleTargetLanguages \"\")\n\tget_target_property(_targetType ${_target} TYPE)\n\tget_target_property(_targetSourceFiles ${_target} SOURCES)\n\tget_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER)\n\tget_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD)\n\tset (_disableMsg \"\")\n\tforeach (_language ${_languages})\n\t\tget_target_property(_prefixHeader ${_target} COTIRE_${_language}_PREFIX_HEADER)\n\t\tget_target_property(_unityBuildFile ${_target} COTIRE_${_language}_UNITY_SOURCE)\n\t\tif (_prefixHeader OR _unityBuildFile)\n\t\t\tmessage (STATUS \"cotire: target ${_target} has already been cotired.\")\n\t\t\tset (${_targetLanguagesVar} \"\" PARENT_SCOPE)\n\t\t\treturn()\n\t\tendif()\n\t\tif (_targetUsePCH AND \"${_language}\" MATCHES \"^C|CXX$\" AND DEFINED CMAKE_${_language}_COMPILER_ID)\n\t\t\tif (CMAKE_${_language}_COMPILER_ID)\n\t\t\t\tcotire_check_precompiled_header_support(\"${_language}\" \"${_target}\" _disableMsg)\n\t\t\t\tif (_disableMsg)\n\t\t\t\t\tset (_targetUsePCH FALSE)\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\t\tset (_sourceFiles \"\")\n\t\tset (_excludedSources \"\")\n\t\tset (_cotiredSources \"\")\n\t\tcotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles})\n\t\tif (_sourceFiles OR _excludedSources OR _cotiredSources)\n\t\t\tlist (APPEND _targetLanguages ${_language})\n\t\tendif()\n\t\tif (_sourceFiles)\n\t\t\tlist (APPEND _allSourceFiles ${_sourceFiles})\n\t\tendif()\n\t\tlist (LENGTH _sourceFiles _numberOfSources)\n\t\tif (NOT _numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES})\n\t\t\tlist (APPEND _pchEligibleTargetLanguages ${_language})\n\t\tendif()\n\t\tif (_excludedSources)\n\t\t\tlist (APPEND _allExcludedSourceFiles ${_excludedSources})\n\t\tendif()\n\t\tif (_cotiredSources)\n\t\t\tlist (APPEND _allCotiredSourceFiles ${_cotiredSources})\n\t\tendif()\n\tendforeach()\n\tset (_targetMsgLevel STATUS)\n\tif (NOT _targetLanguages)\n\t\tstring (REPLACE \";\" \" or \" _languagesStr \"${_languages}\")\n\t\tset (_disableMsg \"No ${_languagesStr} source files.\")\n\t\tset (_targetUsePCH FALSE)\n\t\tset (_targetAddSCU FALSE)\n\tendif()\n\tif (_targetUsePCH)\n\t\tif (_allCotiredSourceFiles)\n\t\t\tcotire_get_source_file_property_values(_cotireTargets COTIRE_TARGET ${_allCotiredSourceFiles})\n\t\t\tlist (REMOVE_DUPLICATES _cotireTargets)\n\t\t\tstring (REPLACE \";\" \", \" _cotireTargetsStr \"${_cotireTargets}\")\n\t\t\tset (_disableMsg \"Target sources already include a precompiled header for target(s) ${_cotireTargets}.\")\n\t\t\tset (_disableMsg \"${_disableMsg} Set target property COTIRE_ENABLE_PRECOMPILED_HEADER to FALSE for targets ${_target},\")\n\t\t\tset (_disableMsg \"${_disableMsg} ${_cotireTargetsStr} to get a workable build system.\")\n\t\t\tset (_targetMsgLevel SEND_ERROR)\n\t\t\tset (_targetUsePCH FALSE)\n\t\telseif (NOT _pchEligibleTargetLanguages)\n\t\t\tset (_disableMsg \"Too few applicable sources.\")\n\t\t\tset (_targetUsePCH FALSE)\n\t\telseif (XCODE AND _allExcludedSourceFiles)\n\t\t\t# for Xcode, we cannot apply the precompiled header to individual sources, only to the whole target\n\t\t\tset (_disableMsg \"Exclusion of source files not supported for generator Xcode.\")\n\t\t\tset (_targetUsePCH FALSE)\n\t\telseif (XCODE AND \"${_targetType}\" STREQUAL \"OBJECT_LIBRARY\")\n\t\t\t# for Xcode, we cannot apply the required PRE_BUILD action to generate the prefix header to an OBJECT_LIBRARY target\n\t\t\tset (_disableMsg \"Required PRE_BUILD action not supported for OBJECT_LIBRARY targets for generator Xcode.\")\n\t\t\tset (_targetUsePCH FALSE)\n\t\tendif()\n\tendif()\n\tif (_targetAddSCU)\n\t\t# disable unity builds if automatic Qt processing is used\n\t\tget_target_property(_targetAutoMoc ${_target} AUTOMOC)\n\t\tget_target_property(_targetAutoUic ${_target} AUTOUIC)\n\t\tget_target_property(_targetAutoRcc ${_target} AUTORCC)\n\t\tif (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)\n\t\t\tif (_disableMsg)\n\t\t\t\tset (_disableMsg \"${_disableMsg} Target uses automatic CMake Qt processing.\")\n\t\t\telse()\n\t\t\t\tset (_disableMsg \"Target uses automatic CMake Qt processing.\")\n\t\t\tendif()\n\t\t\tset (_targetAddSCU FALSE)\n\t\tendif()\n\tendif()\n\tset_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH})\n\tset_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU})\n\tcotire_make_target_message(${_target} \"${_targetLanguages}\" \"${_disableMsg}\" _targetMsg ${_allExcludedSourceFiles})\n\tif (_targetMsg)\n\t\tif (NOT DEFINED COTIREMSG_${_target})\n\t\t\tset (COTIREMSG_${_target} \"\")\n\t\tendif()\n\t\tif (COTIRE_VERBOSE OR NOT \"${_targetMsgLevel}\" STREQUAL \"STATUS\" OR\n\t\t\tNOT \"${COTIREMSG_${_target}}\" STREQUAL \"${_targetMsg}\")\n\t\t\t# cache message to avoid redundant messages on re-configure\n\t\t\tset (COTIREMSG_${_target} \"${_targetMsg}\" CACHE INTERNAL \"${_target} cotire message.\")\n\t\t\tmessage (${_targetMsgLevel} \"${_targetMsg}\")\n\t\tendif()\n\tendif()\n\tlist (LENGTH _targetLanguages _numberOfLanguages)\n\tif (_numberOfLanguages GREATER 1 OR _allExcludedSourceFiles)\n\t\tset (${_wholeTargetVar} FALSE PARENT_SCOPE)\n\telse()\n\t\tset (${_wholeTargetVar} TRUE PARENT_SCOPE)\n\tendif()\n\tset (${_targetLanguagesVar} ${_targetLanguages} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_compute_unity_max_number_of_includes _target _maxIncludesVar)\n\tset (_sourceFiles ${ARGN})\n\tget_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)\n\tif (_maxIncludes MATCHES \"(-j|--parallel|--jobs) ?([0-9]*)\")\n\t\tif (DEFINED CMAKE_MATCH_2)\n\t\t\tset (_numberOfThreads \"${CMAKE_MATCH_2}\")\n\t\telse()\n\t\t\tset (_numberOfThreads \"\")\n\t\tendif()\n\t\tif (NOT _numberOfThreads)\n\t\t\t# use all available cores\n\t\t\tProcessorCount(_numberOfThreads)\n\t\tendif()\n\t\tlist (LENGTH _sourceFiles _numberOfSources)\n\t\tmath (EXPR _maxIncludes \"(${_numberOfSources} + ${_numberOfThreads} - 1) / ${_numberOfThreads}\")\n\telseif (NOT _maxIncludes MATCHES \"[0-9]+\")\n\t\tset (_maxIncludes 0)\n\tendif()\n\tif (COTIRE_DEBUG)\n\t\tmessage (STATUS \"${_target} unity source max includes: ${_maxIncludes}\")\n\tendif()\n\tset (${_maxIncludesVar} ${_maxIncludes} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_process_target_language _language _configurations _target _wholeTarget _cmdsVar)\n\tset (${_cmdsVar} \"\" PARENT_SCOPE)\n\tget_target_property(_targetSourceFiles ${_target} SOURCES)\n\tset (_sourceFiles \"\")\n\tset (_excludedSources \"\")\n\tset (_cotiredSources \"\")\n\tcotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles})\n\tif (NOT _sourceFiles AND NOT _cotiredSources)\n\t\treturn()\n\tendif()\n\tset (_cmds \"\")\n\t# check for user provided unity source file list\n\tget_property(_unitySourceFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE_INIT)\n\tif (NOT _unitySourceFiles)\n\t\tset (_unitySourceFiles ${_sourceFiles} ${_cotiredSources})\n\tendif()\n\tcotire_generate_target_script(\n\t\t${_language} \"${_configurations}\" ${_target} _targetScript _targetConfigScript ${_unitySourceFiles})\n\t# set up unity files for parallel compilation\n\tcotire_compute_unity_max_number_of_includes(${_target} _maxIncludes ${_unitySourceFiles})\n\tcotire_make_unity_source_file_paths(${_language} ${_target} ${_maxIncludes} _unityFiles ${_unitySourceFiles})\n\tlist (LENGTH _unityFiles _numberOfUnityFiles)\n\tif (_numberOfUnityFiles EQUAL 0)\n\t\treturn()\n\telseif (_numberOfUnityFiles GREATER 1)\n\t\tcotire_setup_unity_generation_commands(\n\t\t\t${_language} ${_target} \"${_targetScript}\" \"${_targetConfigScript}\" \"${_unityFiles}\" _cmds ${_unitySourceFiles})\n\tendif()\n\t# set up single unity file for prefix header generation\n\tcotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile)\n\tcotire_setup_unity_generation_commands(\n\t\t${_language} ${_target} \"${_targetScript}\" \"${_targetConfigScript}\" \"${_unityFile}\" _cmds ${_unitySourceFiles})\n\tcotire_make_prefix_file_path(${_language} ${_target} _prefixFile)\n\t# set up prefix header\n\tif (_prefixFile)\n\t\t# check for user provided prefix header files\n\t\tget_property(_prefixHeaderFiles TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT)\n\t\tif (_prefixHeaderFiles)\n\t\t\tcotire_setup_prefix_generation_from_provided_command(\n\t\t\t\t${_language} ${_target} \"${_targetConfigScript}\" \"${_prefixFile}\" _cmds ${_prefixHeaderFiles})\n\t\telse()\n\t\t\tcotire_setup_prefix_generation_from_unity_command(\n\t\t\t\t${_language} ${_target} \"${_targetConfigScript}\" \"${_prefixFile}\" \"${_unityFile}\" _cmds ${_unitySourceFiles})\n\t\tendif()\n\t\t# check if selected language has enough sources at all\n\t\tlist (LENGTH _sourceFiles _numberOfSources)\n\t\tif (_numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES})\n\t\t\tset (_targetUsePCH FALSE)\n\t\telse()\n\t\t\tget_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER)\n\t\tendif()\n\t\tif (_targetUsePCH)\n\t\t\tcotire_make_pch_file_path(${_language} ${_target} _pchFile)\n\t\t\tif (_pchFile)\n\t\t\t\t# first file in _sourceFiles is passed as the host file\n\t\t\t\tcotire_setup_pch_file_compilation(\n\t\t\t\t\t${_language} ${_target} \"${_targetConfigScript}\" \"${_prefixFile}\" \"${_pchFile}\" ${_sourceFiles})\n\t\t\t\tcotire_setup_pch_file_inclusion(\n\t\t\t\t\t${_language} ${_target} ${_wholeTarget} \"${_prefixFile}\" \"${_pchFile}\" ${_sourceFiles})\n\t\t\tendif()\n\t\telseif (_prefixHeaderFiles)\n\t\t\t# user provided prefix header must be included unconditionally\n\t\t\tcotire_setup_prefix_file_inclusion(${_language} ${_target} \"${_prefixFile}\" ${_sourceFiles})\n\t\tendif()\n\tendif()\n\t# mark target as cotired for language\n\tset_property(TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE \"${_unityFiles}\")\n\tif (_prefixFile)\n\t\tset_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER \"${_prefixFile}\")\n\t\tif (_targetUsePCH AND _pchFile)\n\t\t\tset_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER \"${_pchFile}\")\n\t\tendif()\n\tendif()\n\tset (${_cmdsVar} ${_cmds} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_setup_clean_target _target)\n\tset (_cleanTargetName \"${_target}${COTIRE_CLEAN_TARGET_SUFFIX}\")\n\tif (NOT TARGET \"${_cleanTargetName}\")\n\t\tcotire_set_cmd_to_prologue(_cmds)\n\t\tget_filename_component(_outputDir \"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}\" ABSOLUTE)\n\t\tlist (APPEND _cmds -P \"${COTIRE_CMAKE_MODULE_FILE}\" \"cleanup\" \"${_outputDir}\" \"${COTIRE_INTDIR}\" \"${_target}\")\n\t\tadd_custom_target(${_cleanTargetName}\n\t\t\tCOMMAND ${_cmds}\n\t\t\tWORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\"\n\t\t\tCOMMENT \"Cleaning up target ${_target} cotire generated files\"\n\t\t\tVERBATIM)\n\t\tcotire_init_target(\"${_cleanTargetName}\")\n\tendif()\nendfunction()\n\nfunction (cotire_setup_pch_target _languages _configurations _target)\n\tif (\"${CMAKE_GENERATOR}\" MATCHES \"Make|Ninja\")\n\t\t# for makefile based generators, we add a custom target to trigger the generation of the cotire related files\n\t\tset (_dependsFiles \"\")\n\t\tforeach (_language ${_languages})\n\t\t\tset (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE)\n\t\t\tif (NOT CMAKE_${_language}_COMPILER_ID MATCHES \"MSVC|Intel\" AND NOT\n\t\t\t\t(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES \"Clang\"))\n\t\t\t\t# MSVC, Intel and clang-cl only create precompiled header as a side effect\n\t\t\t\tlist (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER)\n\t\t\tendif()\n\t\t\tcotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props})\n\t\t\tif (_dependsFile)\n\t\t\t\tlist (APPEND _dependsFiles \"${_dependsFile}\")\n\t\t\tendif()\n\t\tendforeach()\n\t\tif (_dependsFiles)\n\t\t\tset (_pchTargetName \"${_target}${COTIRE_PCH_TARGET_SUFFIX}\")\n\t\t\tadd_custom_target(\"${_pchTargetName}\" DEPENDS ${_dependsFiles})\n\t\t\tcotire_init_target(\"${_pchTargetName}\")\n\t\t\tcotire_add_to_pch_all_target(${_pchTargetName})\n\t\tendif()\n\telse()\n\t\t# for other generators, we add the \"clean all\" target to clean up the precompiled header\n\t\tcotire_setup_clean_all_target()\n\tendif()\nendfunction()\n\nfunction (cotire_filter_object_libraries _target _objectLibrariesVar)\n\tset (_objectLibraries \"\")\n\tforeach (_source ${ARGN})\n\t\tif (_source MATCHES \"^\\\\$<TARGET_OBJECTS:.+>$\")\n\t\t\tlist (APPEND _objectLibraries \"${_source}\")\n\t\tendif()\n\tendforeach()\n\tset (${_objectLibrariesVar} ${_objectLibraries} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_collect_unity_target_sources _target _languages _unityTargetSourcesVar)\n\tget_target_property(_targetSourceFiles ${_target} SOURCES)\n\tset (_unityTargetSources ${_targetSourceFiles})\n\tforeach (_language ${_languages})\n\t\tget_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE)\n\t\tif (_unityFiles)\n\t\t\t# remove source files that are included in the unity source\n\t\t\tset (_sourceFiles \"\")\n\t\t\tset (_excludedSources \"\")\n\t\t\tset (_cotiredSources \"\")\n\t\t\tcotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles})\n\t\t\tif (_sourceFiles OR _cotiredSources)\n\t\t\t\tlist (REMOVE_ITEM _unityTargetSources ${_sourceFiles} ${_cotiredSources})\n\t\t\tendif()\n\t\t\t# add unity source files instead\n\t\t\tlist (APPEND _unityTargetSources ${_unityFiles})\n\t\tendif()\n\tendforeach()\n\t# handle object libraries which are part of the target's sources\n\tget_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT)\n\tif (\"${_linkLibrariesStrategy}\" MATCHES \"^COPY_UNITY$\")\n\t\tcotire_filter_object_libraries(${_target} _objectLibraries ${_targetSourceFiles})\n\t\tif (_objectLibraries)\n\t\t\tcotire_map_libraries(\"${_linkLibrariesStrategy}\" _unityObjectLibraries ${_objectLibraries})\n\t\t\tlist (REMOVE_ITEM _unityTargetSources ${_objectLibraries})\n\t\t\tlist (APPEND _unityTargetSources ${_unityObjectLibraries})\n\t\tendif()\n\tendif()\n\tset (${_unityTargetSourcesVar} ${_unityTargetSources} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_setup_unity_target_pch_usage _languages _target)\n\tforeach (_language ${_languages})\n\t\tget_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE)\n\t\tif (_unityFiles)\n\t\t\tget_property(_userPrefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT)\n\t\t\tget_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)\n\t\t\tif (_userPrefixFile AND _prefixFile)\n\t\t\t\t# user provided prefix header must be included unconditionally by unity sources\n\t\t\t\tcotire_setup_prefix_file_inclusion(${_language} ${_target} \"${_prefixFile}\" ${_unityFiles})\n\t\t\tendif()\n\t\tendif()\n\tendforeach()\nendfunction()\n\nfunction (cotire_setup_unity_build_target _languages _configurations _target)\n\tget_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME)\n\tif (NOT _unityTargetName)\n\t\tset (_unityTargetName \"${_target}${COTIRE_UNITY_BUILD_TARGET_SUFFIX}\")\n\tendif()\n\t# determine unity target sub type\n\tget_target_property(_targetType ${_target} TYPE)\n\tif (\"${_targetType}\" STREQUAL \"EXECUTABLE\")\n\t\tset (_unityTargetSubType \"\")\n\telseif (_targetType MATCHES \"(STATIC|SHARED|MODULE|OBJECT)_LIBRARY\")\n\t\tset (_unityTargetSubType \"${CMAKE_MATCH_1}\")\n\telse()\n\t\tmessage (WARNING \"cotire: target ${_target} has unknown target type ${_targetType}.\")\n\t\treturn()\n\tendif()\n\t# determine unity target sources\n\tset (_unityTargetSources \"\")\n\tcotire_collect_unity_target_sources(${_target} \"${_languages}\" _unityTargetSources)\n\t# prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created\n\tset (CMAKE_AUTOMOC OFF)\n\tset (CMAKE_AUTOUIC OFF)\n\tset (CMAKE_AUTORCC OFF)\n\tif (COTIRE_DEBUG)\n\t\tmessage (STATUS \"add target ${_targetType} ${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}\")\n\tendif()\n\t# generate unity target\n\tif (\"${_targetType}\" STREQUAL \"EXECUTABLE\")\n\t\tadd_executable(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources})\n\telse()\n\t\tadd_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources})\n\tendif()\n\t# copy output location properties\n\tset (_outputDirProperties\n\t\tARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>\n\t\tLIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_<CONFIG>\n\t\tRUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_<CONFIG>)\n\tif (COTIRE_UNITY_OUTPUT_DIRECTORY)\n\t\tset (_setDefaultOutputDir TRUE)\n\t\tif (IS_ABSOLUTE \"${COTIRE_UNITY_OUTPUT_DIRECTORY}\")\n\t\t\tset (_outputDir \"${COTIRE_UNITY_OUTPUT_DIRECTORY}\")\n\t\telse()\n\t\t\t# append relative COTIRE_UNITY_OUTPUT_DIRECTORY to target's actual output directory\n\t\t\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties})\n\t\t\tcotire_resolve_config_properties(\"${_configurations}\" _properties ${_outputDirProperties})\n\t\t\tforeach (_property ${_properties})\n\t\t\t\tget_property(_outputDir TARGET ${_target} PROPERTY ${_property})\n\t\t\t\tif (_outputDir)\n\t\t\t\t\tget_filename_component(_outputDir \"${_outputDir}/${COTIRE_UNITY_OUTPUT_DIRECTORY}\" ABSOLUTE)\n\t\t\t\t\tset_property(TARGET ${_unityTargetName} PROPERTY ${_property} \"${_outputDir}\")\n\t\t\t\t\tset (_setDefaultOutputDir FALSE)\n\t\t\t\tendif()\n\t\t\tendforeach()\n\t\t\tif (_setDefaultOutputDir)\n\t\t\t\tget_filename_component(_outputDir \"${CMAKE_CURRENT_BINARY_DIR}/${COTIRE_UNITY_OUTPUT_DIRECTORY}\" ABSOLUTE)\n\t\t\tendif()\n\t\tendif()\n\t\tif (_setDefaultOutputDir)\n\t\t\tset_target_properties(${_unityTargetName} PROPERTIES\n\t\t\t\tARCHIVE_OUTPUT_DIRECTORY \"${_outputDir}\"\n\t\t\t\tLIBRARY_OUTPUT_DIRECTORY \"${_outputDir}\"\n\t\t\t\tRUNTIME_OUTPUT_DIRECTORY \"${_outputDir}\")\n\t\tendif()\n\telse()\n\t\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\t\t${_outputDirProperties})\n\tendif()\n\t# copy output name\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_<CONFIG>\n\t\tLIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_<CONFIG>\n\t\tOUTPUT_NAME OUTPUT_NAME_<CONFIG>\n\t\tRUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_<CONFIG>\n\t\tPREFIX <CONFIG>_POSTFIX SUFFIX\n\t\tIMPORT_PREFIX IMPORT_SUFFIX)\n\t# copy compile stuff\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tCOMPILE_DEFINITIONS COMPILE_DEFINITIONS_<CONFIG>\n\t\tCOMPILE_FLAGS COMPILE_OPTIONS\n\t\tFortran_FORMAT Fortran_MODULE_DIRECTORY\n\t\tINCLUDE_DIRECTORIES\n\t\tINTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_<CONFIG>\n\t\tPOSITION_INDEPENDENT_CODE\n\t\tC_COMPILER_LAUNCHER CXX_COMPILER_LAUNCHER\n\t\tC_INCLUDE_WHAT_YOU_USE CXX_INCLUDE_WHAT_YOU_USE\n\t\tC_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN\n\t\tC_CLANG_TIDY CXX_CLANG_TIDY)\n\t# copy compile features\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tC_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED\n\t\tCXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED\n\t\tCOMPILE_FEATURES)\n\t# copy interface stuff\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tCOMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN\n\t\tCOMPATIBLE_INTERFACE_STRING\n\t\tINTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS\n\t\tINTERFACE_INCLUDE_DIRECTORIES INTERFACE_SOURCES\n\t\tINTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SYSTEM_INCLUDE_DIRECTORIES\n\t\tINTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED)\n\t# copy link stuff\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tBUILD_WITH_INSTALL_RPATH BUILD_WITH_INSTALL_NAME_DIR\n\t\tINSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH\n\t\tLINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED\n\t\tLINK_FLAGS LINK_FLAGS_<CONFIG>\n\t\tLINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_<CONFIG>\n\t\tLINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_<CONFIG>\n\t\tLINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC\n\t\tSTATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_<CONFIG>\n\t\tNO_SONAME SOVERSION VERSION\n\t\tLINK_WHAT_YOU_USE BUILD_RPATH)\n\t# copy cmake stuff\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tIMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK)\n\t# copy Apple platform specific stuff\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tBUNDLE BUNDLE_EXTENSION FRAMEWORK FRAMEWORK_VERSION INSTALL_NAME_DIR\n\t\tMACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH\n\t\tOSX_ARCHITECTURES OSX_ARCHITECTURES_<CONFIG> PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST\n\t\tIOS_INSTALL_COMBINED XCODE_EXPLICIT_FILE_TYPE XCODE_PRODUCT_TYPE)\n\t# copy Windows platform specific stuff\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tGNUtoMS\n\t\tCOMPILE_PDB_NAME COMPILE_PDB_NAME_<CONFIG>\n\t\tCOMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>\n\t\tPDB_NAME PDB_NAME_<CONFIG> PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_<CONFIG>\n\t\tVS_DESKTOP_EXTENSIONS_VERSION VS_DOTNET_REFERENCES VS_DOTNET_TARGET_FRAMEWORK_VERSION\n\t\tVS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE\n\t\tVS_IOT_EXTENSIONS_VERSION VS_IOT_STARTUP_TASK\n\t\tVS_KEYWORD VS_MOBILE_EXTENSIONS_VERSION\n\t\tVS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER\n\t\tVS_WINDOWS_TARGET_PLATFORM_MIN_VERSION\n\t\tVS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES\n\t\tWIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS\n\t\tDEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE\n\t\tVS_SDK_REFERENCES VS_USER_PROPS VS_DEBUGGER_WORKING_DIRECTORY)\n\t# copy Android platform specific stuff\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tANDROID_API ANDROID_API_MIN ANDROID_GUI\n\t\tANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES\n\t\tANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR\n\t\tANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES\n\t\tANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH\n\t\tANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE)\n\t# copy CUDA platform specific stuff\n\tcotire_copy_set_properties(\"${_configurations}\" TARGET ${_target} ${_unityTargetName}\n\t\tCUDA_PTX_COMPILATION CUDA_SEPARABLE_COMPILATION CUDA_RESOLVE_DEVICE_SYMBOLS\n\t\tCUDA_EXTENSIONS CUDA_STANDARD CUDA_STANDARD_REQUIRED)\n\t# use output name from original target\n\tget_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME)\n\tif (NOT _targetOutputName)\n\t\tset_property(TARGET ${_unityTargetName} PROPERTY OUTPUT_NAME \"${_target}\")\n\tendif()\n\t# use export symbol from original target\n\tcotire_get_target_export_symbol(\"${_target}\" _defineSymbol)\n\tif (_defineSymbol)\n\t\tset_property(TARGET ${_unityTargetName} PROPERTY DEFINE_SYMBOL \"${_defineSymbol}\")\n\t\tif (\"${_targetType}\" STREQUAL \"EXECUTABLE\")\n\t\t\tset_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE)\n\t\tendif()\n\tendif()\n\t# enable parallel compilation for MSVC\n\tif (MSVC AND \"${CMAKE_GENERATOR}\" MATCHES \"Visual Studio\")\n\t\tlist (LENGTH _unityTargetSources _numberOfUnityTargetSources)\n\t\tif (_numberOfUnityTargetSources GREATER 1)\n\t\t\tset_property(TARGET ${_unityTargetName} APPEND PROPERTY COMPILE_OPTIONS \"/MP\")\n\t\tendif()\n\tendif()\n\tcotire_init_target(${_unityTargetName})\n\tcotire_add_to_unity_all_target(${_unityTargetName})\n\tset_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME \"${_unityTargetName}\")\nendfunction(cotire_setup_unity_build_target)\n\nfunction (cotire_target _target)\n\tset(_options \"\")\n\tset(_oneValueArgs \"\")\n\tset(_multiValueArgs LANGUAGES CONFIGURATIONS)\n\tcmake_parse_arguments(_option \"${_options}\" \"${_oneValueArgs}\" \"${_multiValueArgs}\" ${ARGN})\n\tif (NOT _option_LANGUAGES)\n\t\tget_property (_option_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)\n\tendif()\n\tif (NOT _option_CONFIGURATIONS)\n\t\tcotire_get_configuration_types(_option_CONFIGURATIONS)\n\tendif()\n\t# check if cotire can be applied to target at all\n\tcotire_is_target_supported(${_target} _isSupported)\n\tif (NOT _isSupported)\n\t\tget_target_property(_imported ${_target} IMPORTED)\n\t\tget_target_property(_targetType ${_target} TYPE)\n\t\tif (_imported)\n\t\t\tmessage (WARNING \"cotire: imported ${_targetType} target ${_target} cannot be cotired.\")\n\t\telse()\n\t\t\tmessage (STATUS \"cotire: ${_targetType} target ${_target} cannot be cotired.\")\n\t\tendif()\n\t\treturn()\n\tendif()\n\t# resolve alias\n\tget_target_property(_aliasName ${_target} ALIASED_TARGET)\n\tif (_aliasName)\n\t\tif (COTIRE_DEBUG)\n\t\t\tmessage (STATUS \"${_target} is an alias. Applying cotire to aliased target ${_aliasName} instead.\")\n\t\tendif()\n\t\tset (_target ${_aliasName})\n\tendif()\n\t# check if target needs to be cotired for build type\n\t# when using configuration types, the test is performed at build time\n\tcotire_init_cotire_target_properties(${_target})\n\tif (NOT CMAKE_CONFIGURATION_TYPES)\n\t\tif (CMAKE_BUILD_TYPE)\n\t\t\tlist (FIND _option_CONFIGURATIONS \"${CMAKE_BUILD_TYPE}\" _index)\n\t\telse()\n\t\t\tlist (FIND _option_CONFIGURATIONS \"None\" _index)\n\t\tendif()\n\t\tif (_index EQUAL -1)\n\t\t\tif (COTIRE_DEBUG)\n\t\t\t\tmessage (STATUS \"CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} not cotired (${_option_CONFIGURATIONS})\")\n\t\t\tendif()\n\t\t\treturn()\n\t\tendif()\n\tendif()\n\t# when not using configuration types, immediately create cotire intermediate dir\n\tif (NOT CMAKE_CONFIGURATION_TYPES)\n\t\tcotire_get_intermediate_dir(_baseDir)\n\t\tfile (MAKE_DIRECTORY \"${_baseDir}\")\n\tendif()\n\t# choose languages that apply to the target\n\tcotire_choose_target_languages(\"${_target}\" _targetLanguages _wholeTarget ${_option_LANGUAGES})\n\tif (NOT _targetLanguages)\n\t\treturn()\n\tendif()\n\tset (_cmds \"\")\n\tforeach (_language ${_targetLanguages})\n\t\tcotire_process_target_language(\"${_language}\" \"${_option_CONFIGURATIONS}\" ${_target} ${_wholeTarget} _cmd)\n\t\tif (_cmd)\n\t\t\tlist (APPEND _cmds ${_cmd})\n\t\tendif()\n\tendforeach()\n\tget_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD)\n\tif (_targetAddSCU)\n\t\tcotire_setup_unity_build_target(\"${_targetLanguages}\" \"${_option_CONFIGURATIONS}\" ${_target})\n\tendif()\n\tget_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER)\n\tif (_targetUsePCH)\n\t\tcotire_setup_target_pch_usage(\"${_targetLanguages}\" ${_target} ${_wholeTarget} ${_cmds})\n\t\tcotire_setup_pch_target(\"${_targetLanguages}\" \"${_option_CONFIGURATIONS}\" ${_target})\n\t\tif (_targetAddSCU)\n\t\t\tcotire_setup_unity_target_pch_usage(\"${_targetLanguages}\" ${_target})\n\t\tendif()\n\tendif()\n\tget_target_property(_targetAddCleanTarget ${_target} COTIRE_ADD_CLEAN)\n\tif (_targetAddCleanTarget)\n\t\tcotire_setup_clean_target(${_target})\n\tendif()\nendfunction(cotire_target)\n\nfunction (cotire_map_libraries _strategy _mappedLibrariesVar)\n\tset (_mappedLibraries \"\")\n\tforeach (_library ${ARGN})\n\t\tif (_library MATCHES \"^\\\\$<LINK_ONLY:(.+)>$\")\n\t\t\tset (_libraryName \"${CMAKE_MATCH_1}\")\n\t\t\tset (_linkOnly TRUE)\n\t\t\tset (_objectLibrary FALSE)\n\t\telseif (_library MATCHES \"^\\\\$<TARGET_OBJECTS:(.+)>$\")\n\t\t\tset (_libraryName \"${CMAKE_MATCH_1}\")\n\t\t\tset (_linkOnly FALSE)\n\t\t\tset (_objectLibrary TRUE)\n\t\telse()\n\t\t\tset (_libraryName \"${_library}\")\n\t\t\tset (_linkOnly FALSE)\n\t\t\tset (_objectLibrary FALSE)\n\t\tendif()\n\t\tif (\"${_strategy}\" MATCHES \"COPY_UNITY\")\n\t\t\tcotire_is_target_supported(${_libraryName} _isSupported)\n\t\t\tif (_isSupported)\n\t\t\t\t# use target's corresponding unity target, if available\n\t\t\t\tget_target_property(_libraryUnityTargetName ${_libraryName} COTIRE_UNITY_TARGET_NAME)\n\t\t\t\tif (TARGET \"${_libraryUnityTargetName}\")\n\t\t\t\t\tif (_linkOnly)\n\t\t\t\t\t\tlist (APPEND _mappedLibraries \"$<LINK_ONLY:${_libraryUnityTargetName}>\")\n\t\t\t\t\telseif (_objectLibrary)\n\t\t\t\t\t\tlist (APPEND _mappedLibraries \"$<TARGET_OBJECTS:${_libraryUnityTargetName}>\")\n\t\t\t\t\telse()\n\t\t\t\t\t\tlist (APPEND _mappedLibraries \"${_libraryUnityTargetName}\")\n\t\t\t\t\tendif()\n\t\t\t\telse()\n\t\t\t\t\tlist (APPEND _mappedLibraries \"${_library}\")\n\t\t\t\tendif()\n\t\t\telse()\n\t\t\t\tlist (APPEND _mappedLibraries \"${_library}\")\n\t\t\tendif()\n\t\telse()\n\t\t\tlist (APPEND _mappedLibraries \"${_library}\")\n\t\tendif()\n\tendforeach()\n\tlist (REMOVE_DUPLICATES _mappedLibraries)\n\tset (${_mappedLibrariesVar} ${_mappedLibraries} PARENT_SCOPE)\nendfunction()\n\nfunction (cotire_target_link_libraries _target)\n\tcotire_is_target_supported(${_target} _isSupported)\n\tif (NOT _isSupported)\n\t\treturn()\n\tendif()\n\tget_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME)\n\tif (TARGET \"${_unityTargetName}\")\n\t\tget_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT)\n\t\tif (COTIRE_DEBUG)\n\t\t\tmessage (STATUS \"unity target ${_unityTargetName} link strategy: ${_linkLibrariesStrategy}\")\n\t\tendif()\n\t\tif (\"${_linkLibrariesStrategy}\" MATCHES \"^(COPY|COPY_UNITY)$\")\n\t\t\tget_target_property(_linkLibraries ${_target} LINK_LIBRARIES)\n\t\t\tif (_linkLibraries)\n\t\t\t\tcotire_map_libraries(\"${_linkLibrariesStrategy}\" _unityLinkLibraries ${_linkLibraries})\n\t\t\t\tset_target_properties(${_unityTargetName} PROPERTIES LINK_LIBRARIES \"${_unityLinkLibraries}\")\n\t\t\t\tif (COTIRE_DEBUG)\n\t\t\t\t\tmessage (STATUS \"unity target ${_unityTargetName} link libraries: ${_unityLinkLibraries}\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\t\tget_target_property(_interfaceLinkLibraries ${_target} INTERFACE_LINK_LIBRARIES)\n\t\t\tif (_interfaceLinkLibraries)\n\t\t\t\tcotire_map_libraries(\"${_linkLibrariesStrategy}\" _unityLinkInterfaceLibraries ${_interfaceLinkLibraries})\n\t\t\t\tset_target_properties(${_unityTargetName} PROPERTIES INTERFACE_LINK_LIBRARIES \"${_unityLinkInterfaceLibraries}\")\n\t\t\t\tif (COTIRE_DEBUG)\n\t\t\t\t\tmessage (STATUS \"unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}\")\n\t\t\t\tendif()\n\t\t\tendif()\n\t\t\tget_target_property(_manualDependencies ${_target} MANUALLY_ADDED_DEPENDENCIES)\n\t\t\tif (_manualDependencies)\n\t\t\t\tcotire_map_libraries(\"${_linkLibrariesStrategy}\" _unityManualDependencies ${_manualDependencies})\n\t\t\t\tif (_unityManualDependencies)\n\t\t\t\t\tadd_dependencies(\"${_unityTargetName}\" ${_unityManualDependencies})\n\t\t\t\tendif()\n\t\t\tendif()\n\t\tendif()\n\tendif()\nendfunction(cotire_target_link_libraries)\n\nfunction (cotire_cleanup _binaryDir _cotireIntermediateDirName _targetName)\n\tif (_targetName)\n\t\tfile (GLOB_RECURSE _cotireFiles \"${_binaryDir}/${_targetName}*.*\")\n\telse()\n\t\tfile (GLOB_RECURSE _cotireFiles \"${_binaryDir}/*.*\")\n\tendif()\n\t# filter files in intermediate directory\n\tset (_filesToRemove \"\")\n\tforeach (_file ${_cotireFiles})\n\t\tget_filename_component(_dir \"${_file}\" DIRECTORY)\n\t\tget_filename_component(_dirName \"${_dir}\" NAME)\n\t\tif (\"${_dirName}\" STREQUAL \"${_cotireIntermediateDirName}\")\n\t\t\tlist (APPEND _filesToRemove \"${_file}\")\n\t\tendif()\n\tendforeach()\n\tif (_filesToRemove)\n\t\tif (COTIRE_VERBOSE)\n\t\t\tmessage (STATUS \"cleaning up ${_filesToRemove}\")\n\t\tendif()\n\t\tfile (REMOVE ${_filesToRemove})\n\tendif()\nendfunction()\n\nfunction (cotire_init_target _targetName)\n\tif (COTIRE_TARGETS_FOLDER)\n\t\tset_target_properties(${_targetName} PROPERTIES FOLDER \"${COTIRE_TARGETS_FOLDER}\")\n\tendif()\n\tset_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_ALL TRUE)\n\tif (MSVC_IDE)\n\t\tset_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)\n\tendif()\nendfunction()\n\nfunction (cotire_add_to_pch_all_target _pchTargetName)\n\tset (_targetName \"${COTIRE_PCH_ALL_TARGET_NAME}\")\n\tif (NOT TARGET \"${_targetName}\")\n\t\tadd_custom_target(\"${_targetName}\"\n\t\t\tWORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\"\n\t\t\tVERBATIM)\n\t\tcotire_init_target(\"${_targetName}\")\n\tendif()\n\tcotire_setup_clean_all_target()\n\tadd_dependencies(${_targetName} ${_pchTargetName})\nendfunction()\n\nfunction (cotire_add_to_unity_all_target _unityTargetName)\n\tset (_targetName \"${COTIRE_UNITY_BUILD_ALL_TARGET_NAME}\")\n\tif (NOT TARGET \"${_targetName}\")\n\t\tadd_custom_target(\"${_targetName}\"\n\t\t\tWORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\"\n\t\t\tVERBATIM)\n\t\tcotire_init_target(\"${_targetName}\")\n\tendif()\n\tcotire_setup_clean_all_target()\n\tadd_dependencies(${_targetName} ${_unityTargetName})\nendfunction()\n\nfunction (cotire_setup_clean_all_target)\n\tset (_targetName \"${COTIRE_CLEAN_ALL_TARGET_NAME}\")\n\tif (NOT TARGET \"${_targetName}\")\n\t\tcotire_set_cmd_to_prologue(_cmds)\n\t\tlist (APPEND _cmds -P \"${COTIRE_CMAKE_MODULE_FILE}\" \"cleanup\" \"${CMAKE_BINARY_DIR}\" \"${COTIRE_INTDIR}\")\n\t\tadd_custom_target(${_targetName}\n\t\t\tCOMMAND ${_cmds}\n\t\t\tWORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\"\n\t\t\tCOMMENT \"Cleaning up all cotire generated files\"\n\t\t\tVERBATIM)\n\t\tcotire_init_target(\"${_targetName}\")\n\tendif()\nendfunction()\n\nfunction (cotire)\n\tset(_options \"\")\n\tset(_oneValueArgs \"\")\n\tset(_multiValueArgs LANGUAGES CONFIGURATIONS)\n\tcmake_parse_arguments(_option \"${_options}\" \"${_oneValueArgs}\" \"${_multiValueArgs}\" ${ARGN})\n\tset (_targets ${_option_UNPARSED_ARGUMENTS})\n\tforeach (_target ${_targets})\n\t\tif (TARGET ${_target})\n\t\t\tcotire_target(${_target} LANGUAGES ${_option_LANGUAGES} CONFIGURATIONS ${_option_CONFIGURATIONS})\n\t\telse()\n\t\t\tmessage (WARNING \"cotire: ${_target} is not a target.\")\n\t\tendif()\n\tendforeach()\n\tforeach (_target ${_targets})\n\t\tif (TARGET ${_target})\n\t\t\tcotire_target_link_libraries(${_target})\n\t\tendif()\n\tendforeach()\nendfunction()\n\nif (CMAKE_SCRIPT_MODE_FILE)\n\n\t# cotire is being run in script mode\n\t# locate -P on command args\n\tset (COTIRE_ARGC -1)\n\tforeach (_index RANGE ${CMAKE_ARGC})\n\t\tif (COTIRE_ARGC GREATER -1)\n\t\t\tset (COTIRE_ARGV${COTIRE_ARGC} \"${CMAKE_ARGV${_index}}\")\n\t\t\tmath (EXPR COTIRE_ARGC \"${COTIRE_ARGC} + 1\")\n\t\telseif (\"${CMAKE_ARGV${_index}}\" STREQUAL \"-P\")\n\t\t\tset (COTIRE_ARGC 0)\n\t\tendif()\n\tendforeach()\n\n\t# include target script if available\n\tif (\"${COTIRE_ARGV2}\" MATCHES \"\\\\.cmake$\")\n\t\t# the included target scripts sets up additional variables relating to the target (e.g., COTIRE_TARGET_SOURCES)\n\t\tinclude(\"${COTIRE_ARGV2}\")\n\tendif()\n\n\tif (COTIRE_DEBUG)\n\t\tmessage (STATUS \"${COTIRE_ARGV0} ${COTIRE_ARGV1} ${COTIRE_ARGV2} ${COTIRE_ARGV3} ${COTIRE_ARGV4} ${COTIRE_ARGV5}\")\n\tendif()\n\n\tif (NOT COTIRE_BUILD_TYPE)\n\t\tset (COTIRE_BUILD_TYPE \"None\")\n\tendif()\n\tstring (TOUPPER \"${COTIRE_BUILD_TYPE}\" _upperConfig)\n\tset (_includeDirs ${COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig}})\n\tset (_systemIncludeDirs ${COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig}})\n\tset (_compileDefinitions ${COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}})\n\tset (_compileFlags ${COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}})\n\t# check if target has been cotired for actual build type COTIRE_BUILD_TYPE\n\tlist (FIND COTIRE_TARGET_CONFIGURATION_TYPES \"${COTIRE_BUILD_TYPE}\" _index)\n\tif (_index GREATER -1)\n\t\tset (_sources ${COTIRE_TARGET_SOURCES})\n\t\tset (_sourcesDefinitions ${COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig}})\n\telse()\n\t\tif (COTIRE_DEBUG)\n\t\t\tmessage (STATUS \"COTIRE_BUILD_TYPE=${COTIRE_BUILD_TYPE} not cotired (${COTIRE_TARGET_CONFIGURATION_TYPES})\")\n\t\tendif()\n\t\tset (_sources \"\")\n\t\tset (_sourcesDefinitions \"\")\n\tendif()\n\tset (_targetPreUndefs ${COTIRE_TARGET_PRE_UNDEFS})\n\tset (_targetPostUndefs ${COTIRE_TARGET_POST_UNDEFS})\n\tset (_sourcesPreUndefs ${COTIRE_TARGET_SOURCES_PRE_UNDEFS})\n\tset (_sourcesPostUndefs ${COTIRE_TARGET_SOURCES_POST_UNDEFS})\n\n\tif (\"${COTIRE_ARGV1}\" STREQUAL \"unity\")\n\n\t\tif (XCODE)\n\t\t\t# executing pre-build action under Xcode, check dependency on target script\n\t\t\tset (_dependsOption DEPENDS \"${COTIRE_ARGV2}\")\n\t\telse()\n\t\t\t# executing custom command, no need to re-check for dependencies\n\t\t\tset (_dependsOption \"\")\n\t\tendif()\n\n\t\tcotire_select_unity_source_files(\"${COTIRE_ARGV3}\" _sources ${_sources})\n\n\t\tcotire_generate_unity_source(\n\t\t\t\"${COTIRE_ARGV3}\" ${_sources}\n\t\t\tLANGUAGE \"${COTIRE_TARGET_LANGUAGE}\"\n\t\t\tSOURCES_COMPILE_DEFINITIONS ${_sourcesDefinitions}\n\t\t\tPRE_UNDEFS ${_targetPreUndefs}\n\t\t\tPOST_UNDEFS ${_targetPostUndefs}\n\t\t\tSOURCES_PRE_UNDEFS ${_sourcesPreUndefs}\n\t\t\tSOURCES_POST_UNDEFS ${_sourcesPostUndefs}\n\t\t\t${_dependsOption})\n\n\telseif (\"${COTIRE_ARGV1}\" STREQUAL \"prefix\")\n\n\t\tif (XCODE)\n\t\t\t# executing pre-build action under Xcode, check dependency on unity file and prefix dependencies\n\t\t\tset (_dependsOption DEPENDS \"${COTIRE_ARGV4}\" ${COTIRE_TARGET_PREFIX_DEPENDS})\n\t\telse()\n\t\t\t# executing custom command, no need to re-check for dependencies\n\t\t\tset (_dependsOption \"\")\n\t\tendif()\n\n\t\tset (_files \"\")\n\t\tforeach (_index RANGE 4 ${COTIRE_ARGC})\n\t\t\tif (COTIRE_ARGV${_index})\n\t\t\t\tlist (APPEND _files \"${COTIRE_ARGV${_index}}\")\n\t\t\tendif()\n\t\tendforeach()\n\n\t\tcotire_generate_prefix_header(\n\t\t\t\"${COTIRE_ARGV3}\" ${_files}\n\t\t\tCOMPILER_LAUNCHER \"${COTIRE_TARGET_${COTIRE_TARGET_LANGUAGE}_COMPILER_LAUNCHER}\"\n\t\t\tCOMPILER_EXECUTABLE \"${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}\"\n\t\t\tCOMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1}\n\t\t\tCOMPILER_ID \"${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}\"\n\t\t\tCOMPILER_VERSION \"${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}\"\n\t\t\tLANGUAGE \"${COTIRE_TARGET_LANGUAGE}\"\n\t\t\tIGNORE_PATH \"${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}\"\n\t\t\tINCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH}\n\t\t\tIGNORE_EXTENSIONS \"${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}\"\n\t\t\tINCLUDE_PRIORITY_PATH ${COTIRE_TARGET_INCLUDE_PRIORITY_PATH}\n\t\t\tINCLUDE_DIRECTORIES ${_includeDirs}\n\t\t\tSYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}\n\t\t\tCOMPILE_DEFINITIONS ${_compileDefinitions}\n\t\t\tCOMPILE_FLAGS ${_compileFlags}\n\t\t\t${_dependsOption})\n\n\telseif (\"${COTIRE_ARGV1}\" STREQUAL \"precompile\")\n\n\t\tset (_files \"\")\n\t\tforeach (_index RANGE 5 ${COTIRE_ARGC})\n\t\t\tif (COTIRE_ARGV${_index})\n\t\t\t\tlist (APPEND _files \"${COTIRE_ARGV${_index}}\")\n\t\t\tendif()\n\t\tendforeach()\n\n\t\tcotire_precompile_prefix_header(\n\t\t\t\"${COTIRE_ARGV3}\" \"${COTIRE_ARGV4}\" \"${COTIRE_ARGV5}\"\n\t\t\tCOMPILER_LAUNCHER \"${COTIRE_TARGET_${COTIRE_TARGET_LANGUAGE}_COMPILER_LAUNCHER}\"\n\t\t\tCOMPILER_EXECUTABLE \"${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}\"\n\t\t\tCOMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1}\n\t\t\tCOMPILER_ID \"${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}\"\n\t\t\tCOMPILER_VERSION \"${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}\"\n\t\t\tLANGUAGE \"${COTIRE_TARGET_LANGUAGE}\"\n\t\t\tINCLUDE_DIRECTORIES ${_includeDirs}\n\t\t\tSYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}\n\t\t\tCOMPILE_DEFINITIONS ${_compileDefinitions}\n\t\t\tCOMPILE_FLAGS ${_compileFlags})\n\n\telseif (\"${COTIRE_ARGV1}\" STREQUAL \"combine\")\n\n\t\tif (COTIRE_TARGET_LANGUAGE)\n\t\t\tset (_combinedFile \"${COTIRE_ARGV3}\")\n\t\t\tset (_startIndex 4)\n\t\telse()\n\t\t\tset (_combinedFile \"${COTIRE_ARGV2}\")\n\t\t\tset (_startIndex 3)\n\t\tendif()\n\t\tset (_files \"\")\n\t\tforeach (_index RANGE ${_startIndex} ${COTIRE_ARGC})\n\t\t\tif (COTIRE_ARGV${_index})\n\t\t\t\tlist (APPEND _files \"${COTIRE_ARGV${_index}}\")\n\t\t\tendif()\n\t\tendforeach()\n\n\t\tif (XCODE)\n\t\t\t# executing pre-build action under Xcode, check dependency on files to be combined\n\t\t\tset (_dependsOption DEPENDS ${_files})\n\t\telse()\n\t\t\t# executing custom command, no need to re-check for dependencies\n\t\t\tset (_dependsOption \"\")\n\t\tendif()\n\n\t\tif (COTIRE_TARGET_LANGUAGE)\n\t\t\tcotire_generate_unity_source(\n\t\t\t\t\"${_combinedFile}\" ${_files}\n\t\t\t\tLANGUAGE \"${COTIRE_TARGET_LANGUAGE}\"\n\t\t\t\t${_dependsOption})\n\t\telse()\n\t\t\tcotire_generate_unity_source(\"${_combinedFile}\" ${_files} ${_dependsOption})\n\t\tendif()\n\n\telseif (\"${COTIRE_ARGV1}\" STREQUAL \"cleanup\")\n\n\t\tcotire_cleanup(\"${COTIRE_ARGV2}\" \"${COTIRE_ARGV3}\" \"${COTIRE_ARGV4}\")\n\n\telse()\n\t\tmessage (FATAL_ERROR \"cotire: unknown command \\\"${COTIRE_ARGV1}\\\".\")\n\tendif()\n\nelse()\n\n\t# cotire is being run in include mode\n\t# set up all variable and property definitions\n\n\tif (NOT DEFINED COTIRE_DEBUG_INIT)\n\t\tif (DEFINED COTIRE_DEBUG)\n\t\t\tset (COTIRE_DEBUG_INIT ${COTIRE_DEBUG})\n\t\telse()\n\t\t\tset (COTIRE_DEBUG_INIT FALSE)\n\t\tendif()\n\tendif()\n\toption (COTIRE_DEBUG \"Enable cotire debugging output?\" ${COTIRE_DEBUG_INIT})\n\n\tif (NOT DEFINED COTIRE_VERBOSE_INIT)\n\t\tif (DEFINED COTIRE_VERBOSE)\n\t\t\tset (COTIRE_VERBOSE_INIT ${COTIRE_VERBOSE})\n\t\telse()\n\t\t\tset (COTIRE_VERBOSE_INIT FALSE)\n\t\tendif()\n\tendif()\n\toption (COTIRE_VERBOSE \"Enable cotire verbose output?\" ${COTIRE_VERBOSE_INIT})\n\n\tset (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS \"inc;inl;ipp\" CACHE STRING\n\t\t\"Ignore headers with the listed file extensions from the generated prefix header.\")\n\n\tset (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH \"\" CACHE STRING\n\t\t\"Ignore headers from these directories when generating the prefix header.\")\n\n\tset (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS \"m;mm\" CACHE STRING\n\t\t\"Ignore sources with the listed file extensions from the generated unity source.\")\n\n\tset (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES \"2\" CACHE STRING\n\t\t\"Minimum number of sources in target required to enable use of precompiled header.\")\n\n\tif (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT)\n\t\tif (DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES)\n\t\t\tset (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT ${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES})\n\t\telseif (\"${CMAKE_GENERATOR}\" MATCHES \"JOM|Ninja|Visual Studio\")\n\t\t\t# enable parallelization for generators that run multiple jobs by default\n\t\t\tset (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT \"-j\")\n\t\telse()\n\t\t\tset (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT \"0\")\n\t\tendif()\n\tendif()\n\tset (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES \"${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT}\" CACHE STRING\n\t\t\"Maximum number of source files to include in a single unity source file.\")\n\n\tif (NOT COTIRE_PREFIX_HEADER_FILENAME_SUFFIX)\n\t\tset (COTIRE_PREFIX_HEADER_FILENAME_SUFFIX \"_prefix\")\n\tendif()\n\tif (NOT COTIRE_UNITY_SOURCE_FILENAME_SUFFIX)\n\t\tset (COTIRE_UNITY_SOURCE_FILENAME_SUFFIX \"_unity\")\n\tendif()\n\tif (NOT COTIRE_INTDIR)\n\t\tset (COTIRE_INTDIR \"cotire\")\n\tendif()\n\tif (NOT COTIRE_PCH_ALL_TARGET_NAME)\n\t\tset (COTIRE_PCH_ALL_TARGET_NAME \"all_pch\")\n\tendif()\n\tif (NOT COTIRE_UNITY_BUILD_ALL_TARGET_NAME)\n\t\tset (COTIRE_UNITY_BUILD_ALL_TARGET_NAME \"all_unity\")\n\tendif()\n\tif (NOT COTIRE_CLEAN_ALL_TARGET_NAME)\n\t\tset (COTIRE_CLEAN_ALL_TARGET_NAME \"clean_cotire\")\n\tendif()\n\tif (NOT COTIRE_CLEAN_TARGET_SUFFIX)\n\t\tset (COTIRE_CLEAN_TARGET_SUFFIX \"_clean_cotire\")\n\tendif()\n\tif (NOT COTIRE_PCH_TARGET_SUFFIX)\n\t\tset (COTIRE_PCH_TARGET_SUFFIX \"_pch\")\n\tendif()\n\tif (MSVC)\n\t\t# MSVC default PCH memory scaling factor of 100 percent (75 MB) is too small for template heavy C++ code\n\t\t# use a bigger default factor of 170 percent (128 MB)\n\t\tif (NOT DEFINED COTIRE_PCH_MEMORY_SCALING_FACTOR)\n\t\t\tset (COTIRE_PCH_MEMORY_SCALING_FACTOR \"170\")\n\t\tendif()\n\tendif()\n\tif (NOT COTIRE_UNITY_BUILD_TARGET_SUFFIX)\n\t\tset (COTIRE_UNITY_BUILD_TARGET_SUFFIX \"_unity\")\n\tendif()\n\tif (NOT DEFINED COTIRE_TARGETS_FOLDER)\n\t\tset (COTIRE_TARGETS_FOLDER \"cotire\")\n\tendif()\n\tif (NOT DEFINED COTIRE_UNITY_OUTPUT_DIRECTORY)\n\t\tif (\"${CMAKE_GENERATOR}\" MATCHES \"Ninja\")\n\t\t\t# generated Ninja build files do not work if the unity target produces the same output file as the cotired target\n\t\t\tset (COTIRE_UNITY_OUTPUT_DIRECTORY \"unity\")\n\t\telse()\n\t\t\tset (COTIRE_UNITY_OUTPUT_DIRECTORY \"\")\n\t\tendif()\n\tendif()\n\n\t# define cotire cache variables\n\n\tdefine_property(\n\t\tCACHED_VARIABLE PROPERTY \"COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH\"\n\t\tBRIEF_DOCS \"Ignore headers from these directories when generating the prefix header.\"\n\t\tFULL_DOCS\n\t\t\t\"The variable can be set to a semicolon separated list of include directories.\"\n\t\t\t\"If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header.\"\n\t\t\t\"If not defined, defaults to empty list.\"\n\t)\n\n\tdefine_property(\n\t\tCACHED_VARIABLE PROPERTY \"COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS\"\n\t\tBRIEF_DOCS \"Ignore includes with the listed file extensions from the generated prefix header.\"\n\t\tFULL_DOCS\n\t\t\t\"The variable can be set to a semicolon separated list of file extensions.\"\n\t\t\t\"If a header file extension matches one in the list, it will be excluded from the generated prefix header.\"\n\t\t\t\"Includes with an extension in CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS are always ignored.\"\n\t\t\t\"If not defined, defaults to inc;inl;ipp.\"\n\t)\n\n\tdefine_property(\n\t\tCACHED_VARIABLE PROPERTY \"COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS\"\n\t\tBRIEF_DOCS \"Exclude sources with the listed file extensions from the generated unity source.\"\n\t\tFULL_DOCS\n\t\t\t\"The variable can be set to a semicolon separated list of file extensions.\"\n\t\t\t\"If a source file extension matches one in the list, it will be excluded from the generated unity source file.\"\n\t\t\t\"Source files with an extension in CMAKE_<LANG>_IGNORE_EXTENSIONS are always excluded.\"\n\t\t\t\"If not defined, defaults to m;mm.\"\n\t)\n\n\tdefine_property(\n\t\tCACHED_VARIABLE PROPERTY \"COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES\"\n\t\tBRIEF_DOCS \"Minimum number of sources in target required to enable use of precompiled header.\"\n\t\tFULL_DOCS\n\t\t\t\"The variable can be set to an integer > 0.\"\n\t\t\t\"If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target.\"\n\t\t\t\"If not defined, defaults to 2.\"\n\t)\n\n\tdefine_property(\n\t\tCACHED_VARIABLE PROPERTY \"COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES\"\n\t\tBRIEF_DOCS \"Maximum number of source files to include in a single unity source file.\"\n\t\tFULL_DOCS\n\t\t\t\"This may be set to an integer >= 0.\"\n\t\t\t\"If 0, cotire will only create a single unity source file.\"\n\t\t\t\"If a target contains more than that number of source files, cotire will create multiple unity source files for it.\"\n\t\t\t\"Can be set to \\\"-j\\\" to optimize the count of unity source files for the number of available processor cores.\"\n\t\t\t\"Can be set to \\\"-j jobs\\\" to optimize the number of unity source files for the given number of simultaneous jobs.\"\n\t\t\t\"Is used to initialize the target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES.\"\n\t\t\t\"Defaults to \\\"-j\\\" for the generators Visual Studio, JOM or Ninja. Defaults to 0 otherwise.\"\n\t)\n\n\t# define cotire directory properties\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_ENABLE_PRECOMPILED_HEADER\"\n\t\tBRIEF_DOCS \"Modify build command of cotired targets added in this directory to make use of the generated precompiled header.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_ENABLE_PRECOMPILED_HEADER.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_ADD_UNITY_BUILD\"\n\t\tBRIEF_DOCS \"Add a new target that performs a unity build for cotired targets added in this directory.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_ADD_UNITY_BUILD.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_ADD_CLEAN\"\n\t\tBRIEF_DOCS \"Add a new target that cleans all cotire generated files for cotired targets added in this directory.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_ADD_CLEAN.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_PREFIX_HEADER_IGNORE_PATH\"\n\t\tBRIEF_DOCS \"Ignore headers from these directories when generating the prefix header.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_PREFIX_HEADER_IGNORE_PATH.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_PREFIX_HEADER_INCLUDE_PATH\"\n\t\tBRIEF_DOCS \"Honor headers from these directories when generating the prefix header.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_PREFIX_HEADER_INCLUDE_PATH.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH\"\n\t\tBRIEF_DOCS \"Header paths matching one of these directories are put at the top of the prefix header.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_UNITY_SOURCE_PRE_UNDEFS\"\n\t\tBRIEF_DOCS \"Preprocessor undefs to place in the generated unity source file before the inclusion of each source file.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_UNITY_SOURCE_PRE_UNDEFS.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_UNITY_SOURCE_POST_UNDEFS\"\n\t\tBRIEF_DOCS \"Preprocessor undefs to place in the generated unity source file after the inclusion of each source file.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_UNITY_SOURCE_POST_UNDEFS.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES\"\n\t\tBRIEF_DOCS \"Maximum number of source files to include in a single unity source file.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES.\"\n\t)\n\n\tdefine_property(\n\t\tDIRECTORY PROPERTY \"COTIRE_UNITY_LINK_LIBRARIES_INIT\"\n\t\tBRIEF_DOCS \"Define strategy for setting up the unity target's link libraries.\"\n\t\tFULL_DOCS\n\t\t\t\"See target property COTIRE_UNITY_LINK_LIBRARIES_INIT.\"\n\t)\n\n\t# define cotire target properties\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_ENABLE_PRECOMPILED_HEADER\" INHERITED\n\t\tBRIEF_DOCS \"Modify this target's build command to make use of the generated precompiled header.\"\n\t\tFULL_DOCS\n\t\t\t\"If this property is set to TRUE, cotire will modify the build command to make use of the generated precompiled header.\"\n\t\t\t\"Irrespective of the value of this property, cotire will setup custom commands to generate the unity source and prefix header for the target.\"\n\t\t\t\"For makefile based generators cotire will also set up a custom target to manually invoke the generation of the precompiled header.\"\n\t\t\t\"The target name will be set to this target's name with the suffix _pch appended.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"Defaults to TRUE.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_ADD_UNITY_BUILD\" INHERITED\n\t\tBRIEF_DOCS \"Add a new target that performs a unity build for this target.\"\n\t\tFULL_DOCS\n\t\t\t\"If this property is set to TRUE, cotire creates a new target of the same type that uses the generated unity source file instead of the target sources.\"\n\t\t\t\"Most of the relevant target properties will be copied from this target to the new unity build target.\"\n\t\t\t\"Target dependencies and linked libraries have to be manually set up for the new unity build target.\"\n\t\t\t\"The unity target name will be set to this target's name with the suffix _unity appended.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"Defaults to TRUE.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_ADD_CLEAN\" INHERITED\n\t\tBRIEF_DOCS \"Add a new target that cleans all cotire generated files for this target.\"\n\t\tFULL_DOCS\n\t\t\t\"If this property is set to TRUE, cotire creates a new target that clean all files (unity source, prefix header, precompiled header).\"\n\t\t\t\"The clean target name will be set to this target's name with the suffix _clean_cotire appended.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"Defaults to FALSE.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_PREFIX_HEADER_IGNORE_PATH\" INHERITED\n\t\tBRIEF_DOCS \"Ignore headers from these directories when generating the prefix header.\"\n\t\tFULL_DOCS\n\t\t\t\"The property can be set to a list of directories.\"\n\t\t\t\"If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"If not set, this property is initialized to \\${CMAKE_SOURCE_DIR};\\${CMAKE_BINARY_DIR}.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_PREFIX_HEADER_INCLUDE_PATH\" INHERITED\n\t\tBRIEF_DOCS \"Honor headers from these directories when generating the prefix header.\"\n\t\tFULL_DOCS\n\t\t\t\"The property can be set to a list of directories.\"\n\t\t\t\"If a header file is found in one of these directories or sub-directories, it will be included in the generated prefix header.\"\n\t\t\t\"If a header file is both selected by COTIRE_PREFIX_HEADER_IGNORE_PATH and COTIRE_PREFIX_HEADER_INCLUDE_PATH,\"\n\t\t\t\"the option which yields the closer relative path match wins.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"If not set, this property is initialized to the empty list.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH\" INHERITED\n\t\tBRIEF_DOCS \"Header paths matching one of these directories are put at the top of prefix header.\"\n\t\tFULL_DOCS\n\t\t\t\"The property can be set to a list of directories.\"\n\t\t\t\"Header file paths matching one of these directories will be inserted at the beginning of the generated prefix header.\"\n\t\t\t\"Header files are sorted according to the order of the directories in the property.\"\n\t\t\t\"If not set, this property is initialized to the empty list.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_UNITY_SOURCE_PRE_UNDEFS\" INHERITED\n\t\tBRIEF_DOCS \"Preprocessor undefs to place in the generated unity source file before the inclusion of each target source file.\"\n\t\tFULL_DOCS\n\t\t\t\"This may be set to a semicolon-separated list of preprocessor symbols.\"\n\t\t\t\"cotire will add corresponding #undef directives to the generated unit source file before each target source file.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_UNITY_SOURCE_POST_UNDEFS\" INHERITED\n\t\tBRIEF_DOCS \"Preprocessor undefs to place in the generated unity source file after the inclusion of each target source file.\"\n\t\tFULL_DOCS\n\t\t\t\"This may be set to a semicolon-separated list of preprocessor symbols.\"\n\t\t\t\"cotire will add corresponding #undef directives to the generated unit source file after each target source file.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES\" INHERITED\n\t\tBRIEF_DOCS \"Maximum number of source files to include in a single unity source file.\"\n\t\tFULL_DOCS\n\t\t\t\"This may be set to an integer > 0.\"\n\t\t\t\"If a target contains more than that number of source files, cotire will create multiple unity build files for it.\"\n\t\t\t\"If not set, cotire will only create a single unity source file.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"Defaults to empty.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_<LANG>_UNITY_SOURCE_INIT\"\n\t\tBRIEF_DOCS \"User provided unity source file to be used instead of the automatically generated one.\"\n\t\tFULL_DOCS\n\t\t\t\"If set, cotire will only add the given file(s) to the generated unity source file.\"\n\t\t\t\"If not set, cotire will add all the target source files to the generated unity source file.\"\n\t\t\t\"The property can be set to a user provided unity source file.\"\n\t\t\t\"Defaults to empty.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_<LANG>_PREFIX_HEADER_INIT\"\n\t\tBRIEF_DOCS \"User provided prefix header file to be used instead of the automatically generated one.\"\n\t\tFULL_DOCS\n\t\t\t\"If set, cotire will add the given header file(s) to the generated prefix header file.\"\n\t\t\t\"If not set, cotire will generate a prefix header by tracking the header files included by the unity source file.\"\n\t\t\t\"The property can be set to a user provided prefix header file (e.g., stdafx.h).\"\n\t\t\t\"Defaults to empty.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_UNITY_LINK_LIBRARIES_INIT\" INHERITED\n\t\tBRIEF_DOCS \"Define strategy for setting up unity target's link libraries.\"\n\t\tFULL_DOCS\n\t\t\t\"If this property is empty or set to NONE, the generated unity target's link libraries have to be set up manually.\"\n\t\t\t\"If this property is set to COPY, the unity target's link libraries will be copied from this target.\"\n\t\t\t\"If this property is set to COPY_UNITY, the unity target's link libraries will be copied from this target with considering existing unity targets.\"\n\t\t\t\"Inherited from directory.\"\n\t\t\t\"Defaults to empty.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_<LANG>_UNITY_SOURCE\"\n\t\tBRIEF_DOCS \"Read-only property. The generated <LANG> unity source file(s).\"\n\t\tFULL_DOCS\n\t\t\t\"cotire sets this property to the path of the generated <LANG> single computation unit source file for the target.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_<LANG>_PREFIX_HEADER\"\n\t\tBRIEF_DOCS \"Read-only property. The generated <LANG> prefix header file.\"\n\t\tFULL_DOCS\n\t\t\t\"cotire sets this property to the full path of the generated <LANG> language prefix header for the target.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_<LANG>_PRECOMPILED_HEADER\"\n\t\tBRIEF_DOCS \"Read-only property. The generated <LANG> precompiled header file.\"\n\t\tFULL_DOCS\n\t\t\t\"cotire sets this property to the full path of the generated <LANG> language precompiled header binary for the target.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\tdefine_property(\n\t\tTARGET PROPERTY \"COTIRE_UNITY_TARGET_NAME\"\n\t\tBRIEF_DOCS \"The name of the generated unity build target corresponding to this target.\"\n\t\tFULL_DOCS\n\t\t\t\"This property can be set to the desired name of the unity target that will be created by cotire.\"\n\t\t\t\"If not set, the unity target name will be set to this target's name with the suffix _unity appended.\"\n\t\t\t\"After this target has been processed by cotire, the property is set to the actual name of the generated unity target.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\t# define cotire source properties\n\n\tdefine_property(\n\t\tSOURCE PROPERTY \"COTIRE_EXCLUDED\"\n\t\tBRIEF_DOCS \"Do not modify source file's build command.\"\n\t\tFULL_DOCS\n\t\t\t\"If this property is set to TRUE, the source file's build command will not be modified to make use of the precompiled header.\"\n\t\t\t\"The source file will also be excluded from the generated unity source file.\"\n\t\t\t\"Source files that have their COMPILE_FLAGS property set will be excluded by default.\"\n\t\t\t\"Defaults to FALSE.\"\n\t)\n\n\tdefine_property(\n\t\tSOURCE PROPERTY \"COTIRE_DEPENDENCY\"\n\t\tBRIEF_DOCS \"Add this source file to dependencies of the automatically generated prefix header file.\"\n\t\tFULL_DOCS\n\t\t\t\"If this property is set to TRUE, the source file is added to dependencies of the generated prefix header file.\"\n\t\t\t\"If the file is modified, cotire will re-generate the prefix header source upon build.\"\n\t\t\t\"Defaults to FALSE.\"\n\t)\n\n\tdefine_property(\n\t\tSOURCE PROPERTY \"COTIRE_UNITY_SOURCE_PRE_UNDEFS\"\n\t\tBRIEF_DOCS \"Preprocessor undefs to place in the generated unity source file before the inclusion of this source file.\"\n\t\tFULL_DOCS\n\t\t\t\"This may be set to a semicolon-separated list of preprocessor symbols.\"\n\t\t\t\"cotire will add corresponding #undef directives to the generated unit source file before this file is included.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\tdefine_property(\n\t\tSOURCE PROPERTY \"COTIRE_UNITY_SOURCE_POST_UNDEFS\"\n\t\tBRIEF_DOCS \"Preprocessor undefs to place in the generated unity source file after the inclusion of this source file.\"\n\t\tFULL_DOCS\n\t\t\t\"This may be set to a semicolon-separated list of preprocessor symbols.\"\n\t\t\t\"cotire will add corresponding #undef directives to the generated unit source file after this file is included.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\tdefine_property(\n\t\tSOURCE PROPERTY \"COTIRE_START_NEW_UNITY_SOURCE\"\n\t\tBRIEF_DOCS \"Start a new unity source file which includes this source file as the first one.\"\n\t\tFULL_DOCS\n\t\t\t\"If this property is set to TRUE, cotire will complete the current unity file and start a new one.\"\n\t\t\t\"The new unity source file will include this source file as the first one.\"\n\t\t\t\"This property essentially works as a separator for unity source files.\"\n\t\t\t\"Defaults to FALSE.\"\n\t)\n\n\tdefine_property(\n\t\tSOURCE PROPERTY \"COTIRE_TARGET\"\n\t\tBRIEF_DOCS \"Read-only property. Mark this source file as cotired for the given target.\"\n\t\tFULL_DOCS\n\t\t\t\"cotire sets this property to the name of target, that the source file's build command has been altered for.\"\n\t\t\t\"Defaults to empty string.\"\n\t)\n\n\tmessage (STATUS \"cotire ${COTIRE_CMAKE_MODULE_VERSION} loaded.\")\n\nendif()\n"
  }
]