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