cmake_modules/CMakeSystemSpecificInformation.cmake
author Wuzzy <Wuzzy2@mail.ru>
Wed, 04 Apr 2018 18:38:00 +0200
changeset 13308 49bedbc76120
parent 11658 f87ed83568c8
permissions -rw-r--r--
Update changelog
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11658
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     1
# XXX Emscripten:
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     2
# This file is copied as-is from the CMake source tree. Due to how CMake
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     3
# platform toolchain files work, we must have a copy of this file located
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     4
# relative to Emscripten platform toolchain file, or file inclusion order
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     5
# in cmGlobalGenerator::EnableLanguage will not find Emscripten.cmake
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     6
# toolchain file, and as a result, it is not possible to set the default
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     7
# compilation output suffix to .js, and as a consequence the script
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     8
# check_function_exists() will not function properly (it will try to
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     9
# build to wrong file suffix)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    10
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    11
# CMake - Cross Platform Makefile Generator
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    12
# Copyright 2000-2014 Kitware, Inc.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    13
# Copyright 2000-2011 Insight Software Consortium
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    14
# All rights reserved.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    15
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    16
# Redistribution and use in source and binary forms, with or without
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    17
# modification, are permitted provided that the following conditions
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    18
# are met:
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    19
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    20
# * Redistributions of source code must retain the above copyright
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    21
#   notice, this list of conditions and the following disclaimer.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    22
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    23
# * Redistributions in binary form must reproduce the above copyright
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    24
#   notice, this list of conditions and the following disclaimer in the
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    25
#   documentation and/or other materials provided with the distribution.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    26
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    27
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    28
#   nor the names of their contributors may be used to endorse or promote
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    29
#   products derived from this software without specific prior written
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    30
#   permission.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    31
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    32
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    33
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    34
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    35
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    36
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    37
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    38
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    39
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    40
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    41
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    42
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    43
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    44
# ------------------------------------------------------------------------------
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    45
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    46
# The above copyright and license notice applies to distributions of
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    47
# CMake in source and binary form.  Some source files contain additional
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    48
# notices of original copyright by their contributors; see each source
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    49
# for details.  Third-party software packages supplied with CMake under
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    50
# compatible licenses provide their own copyright notices documented in
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    51
# corresponding subdirectories.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    52
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    53
# ------------------------------------------------------------------------------
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    54
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    55
# CMake was initially developed by Kitware with the following sponsorship:
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    56
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    57
#  * National Library of Medicine at the National Institutes of Health
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    58
#    as part of the Insight Segmentation and Registration Toolkit (ITK).
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    59
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    60
#  * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    61
#    Visualization Initiative.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    62
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    63
#  * National Alliance for Medical Image Computing (NAMIC) is funded by the
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    64
#    National Institutes of Health through the NIH Roadmap for Medical Research,
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    65
#    Grant U54 EB005149.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    66
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    67
#  * Kitware, Inc.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    68
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    69
# This file is included by cmGlobalGenerator::EnableLanguage.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    70
# It is included after the compiler has been determined, so
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    71
# we know things like the compiler name and if the compiler is gnu.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    72
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    73
# before cmake 2.6 these variables were set in cmMakefile.cxx. This is still
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    74
# done to keep scripts and custom language and compiler modules working.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    75
# But they are reset here and set again in the platform files for the target
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    76
# platform, so they can be used for testing the target platform instead
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    77
# of testing the host platform.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    78
set(APPLE  )
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    79
set(UNIX   )
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    80
set(CYGWIN )
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    81
set(WIN32  )
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    82
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    83
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    84
# include Generic system information
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    85
include(CMakeGenericSystem)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    86
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    87
# 2. now include SystemName.cmake file to set the system specific information
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    88
set(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    89
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    90
include(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    91
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    92
if(NOT _INCLUDED_SYSTEM_INFO_FILE)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    93
  message("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    94
          " to use this system, please send your config file to "
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    95
          "cmake@www.cmake.org so it can be added to cmake")
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    96
  if(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    97
    configure_file(${CMAKE_BINARY_DIR}/CMakeCache.txt
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    98
                   ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    99
    message("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   100
            "Please send that file to cmake@www.cmake.org.")
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   101
   endif()
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   102
endif()
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   103
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   104
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   105
# optionally include a file which can do extra-generator specific things, e.g.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   106
# CMakeFindEclipseCDT4.cmake asks gcc for the system include dirs for the Eclipse CDT4 generator
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   107
if(CMAKE_EXTRA_GENERATOR)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   108
  string(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} )
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   109
  include("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   110
endif()
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   111
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   112
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   113
# for most systems a module is the same as a shared library
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   114
# so unless the variable CMAKE_MODULE_EXISTS is set just
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   115
# copy the values from the LIBRARY variables
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   116
# this has to be done after the system information has been loaded
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   117
if(NOT CMAKE_MODULE_EXISTS)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   118
  set(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   119
  set(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   120
endif()
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   121
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   122
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
   123
set(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)