import cmake 2.6.0

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
ci/unstable
Pierre Habouzit 16 years ago
commit 4c630dbbc0

@ -0,0 +1,89 @@
# If the cmake version includes cpack, use it
IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
IF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
SET(CMAKE_INSTALL_MFC_LIBRARIES 1)
OPTION(CMAKE_INSTALL_DEBUG_LIBRARIES
"Install Microsoft runtime debug libraries with CMake." FALSE)
MARK_AS_ADVANCED(CMAKE_INSTALL_DEBUG_LIBRARIES)
INCLUDE(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
# Set the options file that needs to be included inside CMakeCPackOptions.cmake
SET(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
CONFIGURE_FILE("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
"${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
SET(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
SET(CPACK_PACKAGE_VENDOR "Kitware")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR "${CMake_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${CMake_VERSION_MINOR}")
# if version date is set then use that as the patch
IF(CMake_VERSION_DATE)
SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_DATE}")
ELSE(CMake_VERSION_DATE)
SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}")
ENDIF(CMake_VERSION_DATE)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
"cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
IF(CMake_VERSION_RC)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-RC-${CMake_VERSION_RC}")
ENDIF(CMake_VERSION_RC)
IF(NOT DEFINED CPACK_SYSTEM_NAME)
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
ENDIF(NOT DEFINED CPACK_SYSTEM_NAME)
IF(${CPACK_SYSTEM_NAME} MATCHES Windows)
IF(CMAKE_CL_64)
SET(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR})
ELSE(CMAKE_CL_64)
SET(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR})
ENDIF(CMAKE_CL_64)
ENDIF(${CPACK_SYSTEM_NAME} MATCHES Windows)
IF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
ENDIF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
SET(CPACK_PACKAGE_CONTACT "cmake@cmake.org")
IF(UNIX)
SET(CPACK_STRIP_FILES "bin/ccmake;bin/cmake;bin/cpack;bin/ctest")
SET(CPACK_SOURCE_STRIP_FILES "")
SET(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
ENDIF(UNIX)
# cygwin specific packaging stuff
IF(CYGWIN)
# if we are on cygwin and have cpack, then force the
# doc, data and man dirs to conform to cygwin style directories
SET(CMAKE_DOC_DIR "/share/doc/${CPACK_PACKAGE_FILE_NAME}")
SET(CMAKE_DATA_DIR "/share/${CPACK_PACKAGE_FILE_NAME}")
SET(CMAKE_MAN_DIR "/share/man")
# let the user know we just forced these values
MESSAGE(STATUS "Setup for Cygwin packaging")
MESSAGE(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}")
MESSAGE(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}")
MESSAGE(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}")
# setup the cygwin package name
SET(CPACK_PACKAGE_NAME cmake)
# setup the name of the package for cygwin cmake-2.4.3
SET(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
# the source has the same name as the binary
SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
# Create a cygwin version number in case there are changes for cygwin
# that are not reflected upstream in CMake
SET(CPACK_CYGWIN_PATCH_NUMBER 1)
# These files are required by the cmCPackCygwinSourceGenerator and the files
# put into the release tar files.
SET(CPACK_CYGWIN_BUILD_SCRIPT
"${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.sh")
SET(CPACK_CYGWIN_PATCH_FILE
"${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch")
# include the sub directory cmake file for cygwin that
# configures some files and adds some install targets
# this file uses some of the package file name variables
INCLUDE(Utilities/Release/Cygwin/CMakeLists.txt)
ENDIF(CYGWIN)
# include CPack model once all variables are set
INCLUDE(CPack)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")

@ -0,0 +1,51 @@
# This file is configured at cmake time, and loaded at cpack time.
# To pass variables to cpack from cmake, they must be configured
# in this file.
if(CPACK_GENERATOR MATCHES "NSIS")
# set the install/unistall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
SET(CPACK_NSIS_MUI_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
SET(CPACK_NSIS_MUI_UNIICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
# set the package header icon for MUI
SET(CPACK_PACKAGE_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeInstall.bmp")
# tell cpack to create links to the doc files
SET(CPACK_NSIS_MENU_LINKS
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/CMakeSetup.html" "CMakeSetup Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html" "CMake Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-properties.html"
"CMake Properties and Variables Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/ctest.html" "CTest Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-modules.html" "CMake Modules Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-commands.html" "CMake Commands Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cpack.html" "CPack Help"
"http://www.cmake.org" "CMake Web Site"
)
# tell cpack the executables you want in the start menu as links
SET(CPACK_PACKAGE_EXECUTABLES "CMakeSetup" "CMake" )
# tell cpack to create a desktop link to CMakeSetup
SET(CPACK_CREATE_DESKTOP_LINKS "CMakeSetup")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\CMakeSetup.exe")
SET(CPACK_NSIS_DISPLAY_NAME "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR} a cross-platform, open-source build system")
SET(CPACK_NSIS_HELP_LINK "http:\\\\www.cmake.org")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\www.kitware.com")
SET(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
SET(CPACK_NSIS_MODIFY_PATH ON)
endif(CPACK_GENERATOR MATCHES "NSIS")
# include the cpack options for qt dialog if they exisit
# they might not if qt was not enabled for the build
INCLUDE("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL)
if(CPACK_GENERATOR MATCHES "CygwinSource")
# when packaging source make sure the .build directory is not included
SET(CPACK_SOURCE_IGNORE_FILES
"/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
endif(CPACK_GENERATOR MATCHES "CygwinSource")
if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
if(CMAKE_PACKAGE_QTGUI)
set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications")
else(CMAKE_PACKAGE_QTGUI)
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
endif(CMAKE_PACKAGE_QTGUI)
endif("${CPACK_GENERATOR}" STREQUAL "PackageMaker")

@ -0,0 +1 @@
SET(GRAPHVIZ_IGNORE_TARGETS "tartest;testSystemTools;testRegistry;testProcess;testIOS;testHashSTL;testFail;testCommandLineArguments;xrtest;LIBCURL;foo")

@ -0,0 +1,500 @@
PROJECT(CMake)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
#-----------------------------------------------------------------------
# a macro to deal with system libraries, implemented as a macro
# simply to improve readability of the main script
#-----------------------------------------------------------------------
MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
# Third party libraries must be something that can be found.
IF(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake)
SET(CMAKE_ALLOW_SYSTEM_LIBRARIES 1)
ELSE(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake)
SET(CMAKE_ALLOW_SYSTEM_LIBRARIES 0)
ENDIF(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake)
IF(CMAKE_ALLOW_SYSTEM_LIBRARIES)
# Options have dependencies.
INCLUDE(CMakeDependentOption)
# Allow the user to enable/disable all system utility library options
# by setting CMAKE_USE_SYSTEM_LIBRARIES on the command line.
IF(DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
SET(CMAKE_USE_SYSTEM_LIBRARIES_USER 1)
ENDIF(DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
IF(CMAKE_USE_SYSTEM_LIBRARIES)
SET(CMAKE_USE_SYSTEM_LIBRARIES ON)
ELSE(CMAKE_USE_SYSTEM_LIBRARIES)
SET(CMAKE_USE_SYSTEM_LIBRARIES OFF)
ENDIF(CMAKE_USE_SYSTEM_LIBRARIES)
IF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
SET(CMAKE_USE_SYSTEM_CURL "${CMAKE_USE_SYSTEM_LIBRARIES}"
CACHE BOOL "Use system-installed curl" FORCE)
SET(CMAKE_USE_SYSTEM_EXPAT "${CMAKE_USE_SYSTEM_LIBRARIES}"
CACHE BOOL "Use system-installed expat" FORCE)
SET(CMAKE_USE_SYSTEM_XMLRPC "${CMAKE_USE_SYSTEM_LIBRARIES}"
CACHE BOOL "Use system-installed xmlrpc" FORCE)
SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}"
CACHE BOOL "Use system-installed zlib" FORCE)
ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
# Optionally use system utility libraries.
OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl"
${CMAKE_USE_SYSTEM_LIBRARIES})
OPTION(CMAKE_USE_SYSTEM_XMLRPC "Use system-installed xmlrpc"
${CMAKE_USE_SYSTEM_LIBRARIES})
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_XMLRPC" ON)
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_CURL" ON)
# There is currently no option for system tar because the upstream
# libtar does not have our modifications to allow reentrant
# object-oriented use of the library.
# OPTION(CMAKE_USE_SYSTEM_TAR "Use system-installed tar" OFF)
ELSE(CMAKE_ALLOW_SYSTEM_LIBRARIES)
SET(CMAKE_USE_SYSTEM_CURL 0)
SET(CMAKE_USE_SYSTEM_EXPAT 0)
SET(CMAKE_USE_SYSTEM_XMLRPC 0)
SET(CMAKE_USE_SYSTEM_ZLIB 0)
ENDIF(CMAKE_ALLOW_SYSTEM_LIBRARIES)
# Mention to the user what system libraries are being used.
FOREACH(util CURL EXPAT XMLRPC ZLIB)
IF(CMAKE_USE_SYSTEM_${util})
MESSAGE(STATUS "Using system-installed ${util}")
ENDIF(CMAKE_USE_SYSTEM_${util})
ENDFOREACH(util)
# Inform utility library header wrappers whether to use system versions.
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in
${CMake_BINARY_DIR}/Utilities/cmThirdParty.h
@ONLY)
ENDMACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
#-----------------------------------------------------------------------
# a macro to check for MFC and setup to build the MFC Dialog
# simply to improve readability of the main script
#-----------------------------------------------------------------------
MACRO(CMAKE_TEST_FOR_MFC)
SET(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
IF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
SET(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
ENDIF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
IF(CMAKE_BUILD_ON_VISUAL_STUDIO)
IF("CMake_HAVE_MFC" MATCHES "^CMake_HAVE_MFC$")
SET(CHECK_INCLUDE_FILE_VAR "afxwin.h")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)
MESSAGE(STATUS "Looking for MFC")
TRY_COMPILE(CMake_HAVE_MFC
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
CMAKE_FLAGS
-DCMAKE_MFC_FLAG:STRING=2
-DCOMPILE_DEFINITIONS:STRING=-D_AFXDLL
OUTPUT_VARIABLE OUTPUT)
IF(CMake_HAVE_MFC)
MESSAGE(STATUS "Looking for MFC - found")
SET(CMake_HAVE_MFC 1 CACHE INTERNAL "Have MFC?")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if MFC exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(CMake_HAVE_MFC)
MESSAGE(STATUS "Looking for MFC - not found")
SET(CMake_HAVE_MFC 0 CACHE INTERNAL "Have MFC?")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if MFC exists failed with the following output:\n"
"${OUTPUT}\n\n")
ENDIF(CMake_HAVE_MFC)
ENDIF("CMake_HAVE_MFC" MATCHES "^CMake_HAVE_MFC$")
IF(CMake_HAVE_MFC)
OPTION(BUILD_MFCDialog "Whether to build the CMakeSetup MFC dialog." ON)
ELSE(CMake_HAVE_MFC)
SET(BUILD_MFCDialog 0)
ENDIF(CMake_HAVE_MFC)
ELSE(CMAKE_BUILD_ON_VISUAL_STUDIO)
SET(BUILD_MFCDialog 0)
ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO)
ENDMACRO(CMAKE_TEST_FOR_MFC)
#-----------------------------------------------------------------------
# a macro to determine the generator and ctest executable to use
# for testing. Simply to improve readability of the main script.
#-----------------------------------------------------------------------
MACRO(CMAKE_SETUP_TESTING)
IF (NOT DART_ROOT)
SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
ENDIF (NOT DART_ROOT)
IF(BUILD_TESTING)
SET(CMAKE_TEST_GENERATOR "" CACHE STRING
"Generator used when running tests")
SET(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH
"Generator used when running tests")
IF(NOT CMAKE_TEST_GENERATOR)
SET(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
SET(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
ELSE(NOT CMAKE_TEST_GENERATOR)
SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
ENDIF(NOT CMAKE_TEST_GENERATOR)
# Are we testing with the MSVC compiler?
SET(CMAKE_TEST_MSVC 0)
IF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
SET(CMAKE_TEST_MSVC 1)
ELSE(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
IF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
SET(CMAKE_TEST_MSVC 1)
ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
ENDIF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
SET(CMAKE_TEST_SYSTEM_LIBRARIES 0)
FOREACH(util CURL EXPAT XMLRPC ZLIB)
IF(CMAKE_USE_SYSTEM_${util})
SET(CMAKE_TEST_SYSTEM_LIBRARIES 1)
ENDIF(CMAKE_USE_SYSTEM_${util})
ENDFOREACH(util)
# This variable is set by cmake, however to
# test cmake we want to make sure that
# the ctest from this cmake is used for testing
# and not the ctest from the cmake building and testing
# cmake.
SET(CMAKE_CTEST_COMMAND "${EXECUTABLE_OUTPUT_PATH}/ctest")
SET(CMAKE_CMAKE_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cmake")
ENDIF(BUILD_TESTING)
# configure some files for testing
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestScript.cmake"
@ONLY)
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
${CMake_BINARY_DIR}/Tests/.NoDartCoverage)
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
${CMake_BINARY_DIR}/Modules/.NoDartCoverage)
CONFIGURE_FILE(${CMake_SOURCE_DIR}/CTestCustom.cmake.in
${CMake_BINARY_DIR}/CTestCustom.cmake @ONLY)
CONFIGURE_FILE(${CMake_SOURCE_DIR}/CTestCustom.ctest.in
${CMake_BINARY_DIR}/CTestCustom.ctest @ONLY)
IF(BUILD_TESTING AND DART_ROOT)
CONFIGURE_FILE(${CMake_SOURCE_DIR}/CMakeLogo.gif
${CMake_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)
ENDIF(BUILD_TESTING AND DART_ROOT)
MARK_AS_ADVANCED(DART_ROOT)
MARK_AS_ADVANCED(CURL_TESTING)
ENDMACRO(CMAKE_SETUP_TESTING)
#-----------------------------------------------------------------------
# a macro to build the utilities used by CMake
# Simply to improve readability of the main script.
#-----------------------------------------------------------------------
MACRO (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Create the kwsys library for CMake.
SET(KWSYS_NAMESPACE cmsys)
SET(KWSYS_USE_SystemTools 1)
SET(KWSYS_USE_Directory 1)
SET(KWSYS_USE_RegularExpression 1)
SET(KWSYS_USE_Base64 1)
SET(KWSYS_USE_MD5 1)
SET(KWSYS_USE_Process 1)
SET(KWSYS_USE_CommandLineArguments 1)
SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
SUBDIRS(Source/kwsys)
#---------------------------------------------------------------------
# Setup third-party libraries.
# Everything in the tree should be able to include files from the
# Utilities directory.
INCLUDE_DIRECTORIES(
${CMake_SOURCE_DIR}/Utilities
${CMake_BINARY_DIR}/Utilities
)
# check for the use of system libraries versus builtin ones
# (a macro defined in this file)
CMAKE_HANDLE_SYSTEM_LIBRARIES()
#---------------------------------------------------------------------
# Build zlib library for Curl, CMake, and CTest.
SET(CMAKE_ZLIB_HEADER "cm_zlib.h")
IF(CMAKE_USE_SYSTEM_ZLIB)
FIND_PACKAGE(ZLIB)
IF(NOT ZLIB_FOUND)
MESSAGE(FATAL_ERROR
"CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!")
ENDIF(NOT ZLIB_FOUND)
SET(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR})
SET(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
ELSE(CMAKE_USE_SYSTEM_ZLIB)
SET(CMAKE_ZLIB_INCLUDES)
SET(CMAKE_ZLIB_LIBRARIES cmzlib)
SUBDIRS(Utilities/cmzlib)
ENDIF(CMAKE_USE_SYSTEM_ZLIB)
#---------------------------------------------------------------------
# Build Curl library for CTest.
IF(CMAKE_USE_SYSTEM_CURL)
FIND_PACKAGE(CURL)
IF(NOT CURL_FOUND)
MESSAGE(FATAL_ERROR
"CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!")
ENDIF(NOT CURL_FOUND)
SET(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS})
SET(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES})
ELSE(CMAKE_USE_SYSTEM_CURL)
SET(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER})
SET(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES})
SET(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES})
ADD_DEFINITIONS(-DCURL_STATICLIB)
SET(CMAKE_CURL_INCLUDES)
SET(CMAKE_CURL_LIBRARIES cmcurl)
SUBDIRS(Utilities/cmcurl)
ENDIF(CMAKE_USE_SYSTEM_CURL)
#---------------------------------------------------------------------
# Build Tar library for CTest.
SET(CMTAR_ZLIB_HEADER ${CMAKE_ZLIB_HEADER})
SET(CMTAR_ZLIB_LIBRARIES ${CMAKE_ZLIB_LIBRARIES})
SET(CMTAR_ZLIB_INCLUDE_DIRS ${CMAKE_ZLIB_INCLUDES})
SET(CMAKE_TAR_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmtar)
SET(CMAKE_TAR_LIBRARIES cmtar)
SUBDIRS(Utilities/cmtar)
#---------------------------------------------------------------------
# Build Compress library for CTest.
SET(CMAKE_COMPRESS_INCLUDES
"${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
SET(CMAKE_COMPRESS_LIBRARIES "cmcompress")
SUBDIRS(Utilities/cmcompress)
#---------------------------------------------------------------------
# Build expat library for CMake and CTest.
IF(CMAKE_USE_SYSTEM_EXPAT)
FIND_PACKAGE(EXPAT)
IF(NOT EXPAT_FOUND)
MESSAGE(FATAL_ERROR
"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!")
ENDIF(NOT EXPAT_FOUND)
SET(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS})
SET(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
ELSE(CMAKE_USE_SYSTEM_EXPAT)
SET(CMAKE_EXPAT_INCLUDES)
SET(CMAKE_EXPAT_LIBRARIES cmexpat)
SUBDIRS(Utilities/cmexpat)
ENDIF(CMAKE_USE_SYSTEM_EXPAT)
#---------------------------------------------------------------------
# Build XMLRPC library for CMake and CTest.
IF(CMAKE_USE_SYSTEM_XMLRPC)
FIND_PACKAGE(XMLRPC QUIET REQUIRED libwww-client)
IF(NOT XMLRPC_FOUND)
MESSAGE(FATAL_ERROR
"CMAKE_USE_SYSTEM_XMLRPC is ON but a xmlrpc is not found!")
ENDIF(NOT XMLRPC_FOUND)
SET(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
SET(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
ELSE(CMAKE_USE_SYSTEM_XMLRPC)
SET(CMAKE_XMLRPC_INCLUDES)
SET(CMAKE_XMLRPC_LIBRARIES cmXMLRPC)
SUBDIRS(Utilities/cmxmlrpc)
ENDIF(CMAKE_USE_SYSTEM_XMLRPC)
#---------------------------------------------------------------------
# Use curses?
IF (UNIX)
# there is a bug in the Syllable libraries which makes linking ccmake fail, Alex
IF(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
SET(CURSES_NEED_NCURSES TRUE)
FIND_PACKAGE(Curses QUIET)
IF (CURSES_LIBRARY)
OPTION(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON)
ELSE (CURSES_LIBRARY)
MESSAGE("Curses libraries were not found. Curses GUI for CMake will not be built.")
SET(BUILD_CursesDialog 0)
ENDIF (CURSES_LIBRARY)
ELSE(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
SET(BUILD_CursesDialog 0)
ENDIF(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
ELSE (UNIX)
SET(BUILD_CursesDialog 0)
ENDIF (UNIX)
IF(BUILD_CursesDialog)
SUBDIRS(Source/CursesDialog/form)
ENDIF(BUILD_CursesDialog)
ENDMACRO (CMAKE_BUILD_UTILITIES)
#-----------------------------------------------------------------------
# The main section of the CMakeLists file
#
#-----------------------------------------------------------------------
# The CMake version number.
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 0)
#SET(CMake_VERSION_RC 1)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
INCLUDE(${CMake_SOURCE_DIR}/Source/kwsys/kwsysDateStamp.cmake)
SET(CMake_VERSION_DATE
"${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}"
)
ENDIF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
# Include the standard Dart testing module
ENABLE_TESTING()
INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
# where to write the resulting executables and libraries
SET(BUILD_SHARED_LIBS OFF)
SET(EXECUTABLE_OUTPUT_PATH ${CMake_BINARY_DIR}/bin CACHE INTERNAL
"Where to put the executables for CMake")
SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
"Where to put the libraries for CMake")
INCLUDE_REGULAR_EXPRESSION("^.*$")
# The CMake executables usually do not need any rpath to run in the build or
# install tree.
SET(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
SET(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}" CACHE STRING
"Install location for data (relative to prefix).")
SET(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION}" CACHE STRING
"Install location for documentation (relative to prefix).")
SET(CMAKE_MAN_DIR "/man" CACHE STRING
"Install location for man pages (relative to prefix).")
MARK_AS_ADVANCED(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR)
# include special compile flags for some compilers
INCLUDE(CompileFlags.cmake)
# no clue why we are testing for this here
INCLUDE(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(unsetenv "stdlib.h" HAVE_UNSETENV)
CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
# build the utilities (a macro defined in this file)
CMAKE_BUILD_UTILITIES()
# On NetBSD ncurses is required, since curses doesn't have the wsyncup()
# function. ncurses is installed via pkgsrc, so the library is in /usr/pkg/lib,
# which isn't in the default linker search path. So without RPATH ccmake
# doesn't run and the build doesn't succeed since ccmake is executed for
# generating the documentation.
IF(BUILD_CursesDialog)
GET_FILENAME_COMPONENT(_CURSES_DIR "${CURSES_LIBRARY}" PATH)
SET(CURSES_NEED_RPATH FALSE)
IF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64")
SET(CURSES_NEED_RPATH TRUE)
ENDIF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64")
ENDIF(BUILD_CursesDialog)
IF(BUILD_QtDialog)
IF(APPLE)
SET(CMAKE_BUNDLE_NAME
"CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_PATCH}")
IF(CMake_VERSION_DATE)
SET(CMAKE_BUNDLE_NAME
"CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_DATE}")
ENDIF(CMake_VERSION_DATE)
SET(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
# make sure CMAKE_INSTALL_PREFIX ends in /
STRING(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)
MATH(EXPR LEN "${LEN} -1" )
STRING(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
IF(NOT "${ENDCH}" STREQUAL "/")
SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
ENDIF(NOT "${ENDCH}" STREQUAL "/")
SET(CMAKE_INSTALL_PREFIX
"${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents")
ENDIF(APPLE)
SET(QT_NEED_RPATH FALSE)
IF(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64")
SET(QT_NEED_RPATH TRUE)
ENDIF(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64")
ENDIF(BUILD_QtDialog)
# The same might be true on other systems for other libraries if
# CMAKE_USE_SYSTEM_XMLRPC or other variables like this are enabled.
# Then only enable RPATH if we have are building at least with cmake 2.4,
# since this one has much better RPATH features than cmake 2.2.
# The executables are then built with the RPATH for the libraries outside
# the build tree, which is both the build and the install RPATH.
IF (UNIX)
IF( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
OR CMAKE_USE_SYSTEM_EXPAT OR CMAKE_USE_SYSTEM_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
SET(CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH.")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
ENDIF(CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
OR CMAKE_USE_SYSTEM_EXPAT OR CMAKE_USE_SYSTEM_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
ENDIF (UNIX)
# should we build the MFC dialog? (a macro defined in this file)
CMAKE_TEST_FOR_MFC()
# add the uninstall support
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
@ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
INCLUDE (CMakeCPack.cmake)
# setup some Testing support (a macro defined in this file)
CMAKE_SETUP_TESTING()
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/DartLocal.conf.in"
"${CMAKE_CURRENT_BINARY_DIR}/DartLocal.conf"
COPYONLY)
OPTION(CMAKE_STRICT
"Perform strict testing to record property and variable access. Can be used to report any undefined properties or variables" OFF)
MARK_AS_ADVANCED(CMAKE_STRICT)
# build the remaining subdirectories
SUBDIRS(Source)
SUBDIRS(Modules)
SUBDIRS(Templates)
SUBDIRS(Utilities)
SUBDIRS(Tests)
# add a test
ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
--system-information -G "${CMAKE_TEST_GENERATOR}" )
#-----------------------------------------------------------------------
# End of the main section of the CMakeLists file
#-----------------------------------------------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -0,0 +1,23 @@
SET (CTEST_PROJECT_NAME "CMake")
SET (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
MACRO(SET_IF_NOT_SET var val)
IF(NOT DEFINED "${var}")
SET("${var}" "${val}")
ENDIF(NOT DEFINED "${var}")
ENDMACRO(SET_IF_NOT_SET)
SET_IF_NOT_SET(CTEST_DROP_METHOD "http")
IF(CTEST_DROP_METHOD STREQUAL "http")
SET (CTEST_DROP_SITE "public.kitware.com")
SET (CTEST_DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
SET (CTEST_TRIGGER_SITE "http://${CTEST_DROP_SITE}/cgi-bin/Submit-CMake-TestingResults.cgi")
ENDIF(CTEST_DROP_METHOD STREQUAL "http")
IF(CTEST_DROP_METHOD STREQUAL "xmlrpc")
SET (CTEST_DROP_SITE "http://www.na-mic.org:8081")
SET (CTEST_DROP_LOCATION "CMake")
SET (CTEST_TRIGGER_SITE "not used")
SET (COMPRESS_SUBMISSION ON)
ENDIF(CTEST_DROP_METHOD STREQUAL "xmlrpc")

@ -0,0 +1,52 @@
SET(CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
"xtree.[0-9]+. : warning C4702: unreachable code"
"warning LNK4221"
"variable .var_args[2]*. is used before its value is set"
"jobserver unavailable"
"warning: \\(Long double usage is reported only once for each file"
"warning: To disable this warning use"
"could not be inlined"
"libcmcurl.*has no symbols"
"not sorted slower link editing will result"
"stl_deque.h:479"
"Utilities.cmzlib."
"Utilities.cmxmlrpc."
"Source.CTest.Curl"
"Utilities.cmcurl"
"Source.CursesDialog.form"
"/usr/bin/ld.*warning.*-..*directory.name.*bin.*does not exist"
"Redeclaration of .send..... with a different storage class specifier"
"Utilities.cmexpat."
"is not used for resolving any symbol"
"Clock skew detected"
"remark\\(1209"
"stl_deque.h:1051"
"Parser.cxx.*warning.*2111-D.*statement is unreachable"
"CMakeSetupManifest.xml.*manifest authoring warning.*Unrecognized Element"
)
IF(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"XCode"
)
ENDIF (NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
IF(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"Kdevelop"
)
ENDIF (NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
# Exclude kwsys files from coverage results. They are reported
# (with better coverage results) on kwsys dashboards...
"/Source/(cm|kw)sys/"
# Exclude try_compile sources from coverage results:
"/CMakeFiles/CMakeTmp/"
)

@ -0,0 +1,3 @@
# This file is provided for compatibility with CMake 2.2 and lower.
# Just include the custom file by its new name.
INCLUDE("CTestCustom.cmake")

@ -0,0 +1,121 @@
Changes in CMake 2.6.0
- Fix links in generated documentation
- Fix for FindQt and some mac frameworks
- Fix for ctest to report more than 2 gigs system memory on windows
- Fix CTest build name for vs 9, and fix memory size on windows
Changes in CMake 2.6.0 RC 10
- Do not duplicate .so libraries on the link line
- Add more system library paths to sun builds
- Add BETA support for Intel Fortran IDE files in visual studio
- Fix FindCurses to work if ncurses is the only option
- Fix shell escapes on some systems
- Remove check for file write as input to cmake, as it is no longer needed
- Make check_type_size automatically check for headers that it uses
- Remove minimum required from FindBoost.cmake
- Fix FindSDL so that it can be run more than once
- Fix find required for VTK package
- Allow for CMAKE_OSX_SYSROOT to work with single architecture
- Add context information when a source file cannot be found.
- Report the directory-level context even if no list file
is currently being processed.
Changes in CMake 2.6.0 RC 9
- Fix for fortran mod:: support
- Fix bug in install command with BUNDLE DESTINATION
- Make mac install symlinks check for errors
- Fix for CMP0007, to not warn about empty lists
- Preserve static libraries when linked multiple times
- Use c compiler path to find asm compiler
- Allow RC compiler to not get all COMPILE_FLAGS
- Complete overhaul for FindBoost.cmake
- Minor fixes for FindMPI.cmake
- Fix for list command and empty list elements CMP0007
- Fix for VS6 and sub-groups
- Fix bug 6440, and make sure _INIT flags do not overright cache values
- Do not report CMP0003 for anything other than -l
- Fix crash in fortran depend scanning, bug 6855
- Fix timeout values for cmake's own tests
- Better message in compiler ABI detect
- Fixes for cpack x11 packages on leopard
- Changes to cpack options names
- Fixes for FindMPI on 64 bit MS MPI
- Fix for -isystem for wxWidgets
- Some fixes for chrpath during installation
- Fix compatibility with CMake 2.4 for installation of MACOSX_BUNDLE (CMP0006)
- Do not use debug postfix when building frameworks on the Mac
- Fix exception handling off/on issue with visual studio IDE generators
- Fix <OBJECT_DIR> to be native path style
- Fix leak in cpack
- Some Qt GUI style changes
Changes in CMake 2.6.0 RC 8
- Fix sun make very poor performance
- Fix includes for automoc in FindQt4
Changes in CMake 2.6.0 RC 7
- Fix for chrpath on sun with gcc
- Fix FindJNI on unix with HKEY issue bug 6688
- Change install location on mac for cmake-gui
- Fix for bugs 6730 and 6720 in FindQt4 configured headers in binary dir
- Add VS9 support to InstallRequiredSystemLibraries.cmake
- Fix some bugs in framework support
- Have make edit_cache work with cmake-gui and eclipse generator
- Fix find_* to not mistakenly construct network paths on windows
- Several bug fixes in cmake-gui Qt program.
Changes in CMake 2.6.0 RC 6
- Added ChangeLog.manual
- Allow CMakeImportBuildSettings force compiler to be optional
- Change cpack deb packager to detect the architecture
- Fix FindCurses to be backwards compatible with cache variable CURSES_LIBRARY
- Add version variables to FindQt4.cmake
- Fix CPack Deb generator to not hard code /usr
- Better default size for cmake-gui help dialog
- Fix problem where incorrect path was used for cmake.exe when
used to do incremental linking on windows nmake or make
- Fix build with system libraries on
- Add color output in kdevelop
- Create non-verbose makefiles in kdevelop
- Fix some missing flags for vs IDE flag map
- Fix MacOSX install symlink crash problem
- Fix turning of Dev warnings with gui's
- Fix backwards compatibility issue with FindMPI.cmake
- Fix for bug 6605, add -L path for optimized in debug sometimes for
backwards compatibility
- Allow for CMP0000 to be set before any warnings happen
- Do not use FAT32 hack in VS 2005 and 2008 unless on a FAT32 disk,
causes try-compiles to be 3 times slower if FAT hack is present.
- Fixes to debian cpack
- Can now check if a proprty is SET or not
- Fix for generate with vs 2005 and vista not being able to create stamp file
- set_property with an empty value unsets that property now
- Fix FindQt4 on windows with some \ style paths
Changes in CMake 2.6.0
- Documentation for all variables
- Automatic reload of projects in visual stuido 7 and greater
when cmake is re-run.
- Direct CDash submit support
- Bullseye coverage support
- Use full paths for linking to libraries on all platforms. No longer
separate into -L and -l.
- Enhance the install command
- export command and ability to have imported targets
- CPack support for rpm and deb
- Cross compile support
- New Qt GUI
- Introduction of the cmake_policy command
- Much better Fortran support
- Mac OSX Framework creation support
- Project generators for Eclipse and CodeBlocks
- Beta support for asm in makefiles
- Enhanced find_package() command with support for project-installed
FooConfig.cmake files
- New CMAKE_PREFIX_PATH environment variable to specify user search dirs
for find_xxx()
- Lots of bug fixes

File diff suppressed because it is too large Load Diff

@ -0,0 +1,44 @@
#-----------------------------------------------------------------------------
# set some special flags for different compilers
#
IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
# Disable deprecation warnings for standard C functions.
IF(MSVC80 OR MSVC90)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
ENDIF(MSVC80 OR MSVC90)
#silence duplicate symbol warnings on AIX
IF(CMAKE_SYSTEM MATCHES "AIX.*")
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_SYSTEM MATCHES "AIX.*")
IF(CMAKE_SYSTEM MATCHES "IRIX.*")
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
# use the ansi CXX compile flag for building cmake
IF (CMAKE_ANSI_CXXFLAGS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
ENDIF (CMAKE_ANSI_CXXFLAGS)
IF (CMAKE_ANSI_CFLAGS)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
ENDIF (CMAKE_ANSI_CFLAGS)

@ -0,0 +1,50 @@
CMake was initially developed by Kitware with the following sponsorship:
* National Library of Medicine at the National Institutes of Health
as part of the Insight Segmentation and Registration Toolkit (ITK).
* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
Visualization Initiative.
* National Alliance for Medical Image Computing (NAMIC) is funded by the
National Institutes of Health through the NIH Roadmap for Medical Research,
Grant U54 EB005149.
* Kitware, Inc.
The CMake copyright is as follows:
Copyright (c) 2002 Kitware, Inc., Insight Consortium
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The names of Kitware, Inc., the Insight Consortium, or the names of
any consortium members, or of any contributors, may not be used to
endorse or promote products derived from this software without
specific prior written permission.
* Modified source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
See also the CMake web site: http://www.cmake.org for more information.

@ -0,0 +1,61 @@
# Dashboard is opened for submissions for a 24 hour period starting at
# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
SET (NIGHTLY_START_TIME "21:00:00 EDT")
# Dart server to submit results (used by client)
IF(NOT DROP_METHOD)
SET(DROP_METHOD http)
ENDIF(NOT DROP_METHOD)
IF(DROP_METHOD MATCHES http)
SET (DROP_SITE "public.kitware.com")
SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
ELSE(DROP_METHOD MATCHES http)
IF(DROP_METHOD MATCHES xmlrpc)
SET (DROP_SITE "http://www.na-mic.org:8081")
SET (DROP_LOCATION "CMake")
SET (COMPRESS_SUBMISSION ON)
ELSE(DROP_METHOD MATCHES xmlrpc)
SET (DROP_SITE "public.kitware.com")
SET (DROP_LOCATION "/incoming")
SET (DROP_SITE_USER "ftpuser")
SET (DROP_SITE_PASSWORD "public")
ENDIF(DROP_METHOD MATCHES xmlrpc)
ENDIF(DROP_METHOD MATCHES http)
SET (TRIGGER_SITE
"http://${DROP_SITE}/cgi-bin/Submit-CMake-TestingResults.cgi")
# Project Home Page
SET (PROJECT_URL "http://www.cmake.org")
# Dart server configuration
SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/cmake-rollup-dashboard.sh")
SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/viewcvs.cgi/")
SET (CVS_WEB_CVSROOT "CMake")
OPTION(BUILD_DOXYGEN "Build source documentation using doxygen" "Off")
SET (DOXYGEN_CONFIG "${PROJECT_BINARY_DIR}/doxygen.config" )
MARK_AS_ADVANCED(BUILD_DOXYGEN)
SET (USE_DOXYGEN "On")
SET (DOXYGEN_URL "${PROJECT_URL}/doc/nightly/html/" )
SET (USE_GNATS "On")
SET (GNATS_WEB_URL "${PROJECT_URL}/Bug/query.php?projects=2&status%5B%5D=1&status%5B%5D=2&status%5B%5D=3&status%5B%5D=4&status%5B%5D=6&op=doquery")
# Continuous email delivery variables
SET (CONTINUOUS_FROM "cmake-dashboard@public.kitware.com")
SET (SMTP_MAILHOST "public.kitware.com")
SET (CONTINUOUS_MONITOR_LIST "cmake-dashboard@public.kitware.com")
SET (CONTINUOUS_BASE_URL "${PROJECT_URL}/Testing")
SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_FAILURES ON)
SET (DELIVER_BROKEN_BUILD_EMAIL "Continuous Nightly")
SET (EMAIL_FROM "cmake-dashboard@public.kitware.com")
SET (DARTBOARD_BASE_URL "${PROJECT_URL}/Testing")
SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_CONFIGURE_FAILURES 1)
SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_BUILD_ERRORS 1)
SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_BUILD_WARNINGS 1)
SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_NOT_RUNS 1)
SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_FAILURES 1)

@ -0,0 +1,121 @@
ExpectedBuilds: \
{andoria.kitware Linux-g++3.4-KDevelop} \
{andoria.kitware Linux-g++3.4-SVN} \
{DASH1.kitware Win32-nmake71} \
{DASH1.kitware Win32-vs71} \
{DASH1.kitware Win32-vs71Rel} \
{DASH1.kitware zRel24-Win32-nmake71} \
{DASH1.kitware zRel24-Win32-vs71} \
{DASH11.kitware zRel24-Win32-nmake71} \
{dash14.kitware Win32-bcc5.6} \
{dash14.kitware Win32-cygwin} \
{dash14.kitware Win32-mingw} \
{dash14.kitware zRel24-Win32-bcc5.6} \
{dash17.kitware Linux-g++4.0} \
{dash1win64.kitware Win64-vs80} \
{dash1win98.kitware Win32-vs60} \
{DASH2.kitware Win32-nmake70} \
{DASH2.kitware Win32-vs70} \
{DASH2.kitware Win32-vs70-InPlace} \
{DASH2.kitware zRel24-Win32-nmake70} \
{DASH2.kitware zRel24-Win32-vs70} \
{DASH3.kitware Win32-nmake60} \
{DASH3.kitware Win32-vs60} \
{DASH3.kitware zRel24-Win32-nmake60} \
{DASH3.kitware zRel24-Win32-vs60} \
{dash4.kitware Win32-bcc5.8} \
{DASH5.kitware Linux-gcc332-InPlace} \
{DASH5.kitware zRel24-Linix-gcc332} \
{DASH6.kitware zRel24-Linix-gcc332} \
{dash8.kitware Linux64-g++} \
{dash8.kitware Linux64-g++332} \
{dash8.kitware Linux64-g++341} \
{dash8.kitware zRel24-Linux64-g++} \
{dash8.kitware zRel24-Linux64-g++332} \
{dashmacmini1.kitware Darwin-Tiger-Xcode21} \
{dashmacmini1.kitware zRel24-Darwin-Tiger-g++} \
{dashmacmini2.kitware DarwinIntel-g++} \
{dashmacmini2.kitware DarwinIntel-Universal} \
{dashmacmini2.kitware Darwin-Tiger-Xcode21-univ} \
{dashmacmini3.kitware Darwin-LeopardIntel-g++} \
{dashmacmini3.kitware Darwin-LeopardIntel-Universal} \
{dashmacmini3.kitware Darwin-Leopard-Xcode21-univ} \
{dashsgi1.kitware IRIX32-CC} \
{dashsgi1.kitware IRIX64-CC} \
{dashsun1.kitware SunOS-CC} \
{dashsun1.kitware SunOS-CC-64} \
{dashsun1.kitware SunOS-gcc34-64} \
{destiny.kitware HP-UX-aCC} \
{destiny.kitware HP-UX-aCC-gmake} \
{devqnx.acfr.usyd.edu.au qnx-V3.3.5-gcc_ntox86} \
{grayson.kitware Win32-nmake80} \
{heart HP-UXia64-aCC} \
{hythloth.kitware Linux64-bullseye-cov} \
{hythloth.kitware Linux64-suncc-5.9} \
{hythloth.kitware Linux-nightly-win32-release} \
{insight.journal.kitware KWStyle} \
{iris.elemtech IRIX64-CC64-7.4} \
{iris.elemtech IRIX64-CC-7.4} \
{JET.kitware Linux-valgrind2} \
{krondor.kitware Darwin-c++} \
{krondor.kitware zRel24-Darwin-c++} \
{midworld.kitware DarwinG5-g++} \
{midworld.kitware DarwinG5-XCode15} \
{midworld.kitware zRel24-DarwinG5-g++} \
{pre.vision.cs.rpi.edu FreeBSD-CC-gmake} \
{pre.vision.cs.rpi.edu FreeBSD-CC-make} \
{RogueResearch3 Mac10.5-CMake-gcc-dbg-ppc} \
{RogueResearch3 Mac10.5-CMake-gcc-dbg-ppc64} \
{RogueResearch3 Mac10.5-CMake-gcc-rel-ppc} \
{RogueResearch3 Mac10.5-CMake-gcc-rel-ppc64} \
{RogueResearch3 Mac10.5-CMake-Xcode-dbg-ppc} \
{RogueResearch3 Mac10.5-CMake-Xcode-dbg-ppc64} \
{RogueResearch4 Mac10.5-CMake-gcc-dbg-i386} \
{RogueResearch4 Mac10.5-CMake-gcc-dbg-rosetta} \
{RogueResearch4 Mac10.5-CMake-gcc-rel-i386} \
{tick.rz.uni-augsburg.de LinuxPPC-g++3.3} \
{tick.rz.uni-augsburg.de LinuxPPC-g++3.4} \
{trinsic.kitware Win32-mingw} \
{r06n01.pbm.ihost.com AIX53-xlC} \
{r06n01.pbm.ihost.com zRel24-AIX53-xlC} \
{valhalla.kitware Win32-wcl386}
#{devqnx.acfr.usyd.edu.au qnx-V3.3.5-gcc_ntox86 } \
#{mr-orange.obtech.net gentoo-linux-x86\_64-gcc-4.0.2 } \
#{G5.Nfsnet.Org Darwin8.3-gcc4} \
# commas in names do not work for expected builds....
#{G4.Nfsnet.Org Darwin-c++} \
#{salmon.nlm.nih.gov Darwin8.7-gcc4} \
#{crd.ge.com Solaris-gcc343} \
#{crd.ge.com Linux-icc81} \
#{crd.ge.com Windows-bcc32} \
#{crd.ge.com Windows-nmake71} \
#{crd.ge.com Windows-nmake60} \
#{dash16.kitware Linux-g++4.0} \
#{styx Linuxia64-g++} \
#{crd.ge.com Cygwin-gcc344} \
#{valhalla.kitware Win32-bccRel} \
#{valhalla.kitware Win32-bcc} \
#{valhalla.kitware Win32-g++} \
#{valhalla.kitware Win32-nmake60} \
#{valhalla.kitware Win32-nmake70} \
#{valhalla.kitware Win32-vs60} \
#{valhalla.kitware Win32-vs70}
#{crd.ge.com FreeBSD-gcc321} \
#{crd.ge.com Linux-gcc320} \
#{cogattaca.kitware LinuxWin32-g++-Werror} \
#{cogattaca.kitware LinuxWin32-g++} \
#{dash8.kitware Win64-icl80} \
#{dash8.kitware zLRB-Win64-icl80} \
#{hythloth.kitware Linux-icc-8.1} \
CompressionMode: ALL
CompressionCommand: /bin/gzip
CompressionType: gzip

@ -0,0 +1,93 @@
" =============================================================================
"
" Program: CMake - Cross-Platform Makefile Generator
" Module: $RCSfile: cmake-indent.vim,v $
" Language: VIM
" Date: $Date: 2008-01-16 16:53:53 $
" Version: $Revision: 1.9 $
"
" =============================================================================
" Vim indent file
" Language: CMake (ft=cmake)
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
" Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
" Last Change: $Date: 2008-01-16 16:53:53 $
" Version: $Revision: 1.9 $
"
" Licence: The CMake license applies to this file. See
" http://www.cmake.org/HTML/Copyright.html
" This implies that distribution with Vim is allowed
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=CMakeGetIndent(v:lnum)
setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
" Only define the function once.
if exists("*CMakeGetIndent")
finish
endif
fun! CMakeGetIndent(lnum)
let this_line = getline(a:lnum)
" Find a non-blank line above the current line.
let lnum = a:lnum
let lnum = prevnonblank(lnum - 1)
let previous_line = getline(lnum)
" Hit the start of the file, use zero indent.
if lnum == 0
return 0
endif
let ind = indent(lnum)
let or = '\|'
" Regular expressions used by line indentation function.
let cmake_regex_comment = '#.*'
let cmake_regex_identifier = '[A-Za-z][A-Za-z0-9_]*'
let cmake_regex_quoted = '"\([^"\\]\|\\.\)*"'
let cmake_regex_arguments = '\(' . cmake_regex_quoted .
\ or . '\$(' . cmake_regex_identifier . ')' .
\ or . '[^()\\#"]' . or . '\\.' . '\)*'
let cmake_indent_comment_line = '^\s*' . cmake_regex_comment
let cmake_indent_blank_regex = '^\s*$'
let cmake_indent_open_regex = '^\s*' . cmake_regex_identifier .
\ '\s*(' . cmake_regex_arguments .
\ '\(' . cmake_regex_comment . '\)\?$'
let cmake_indent_close_regex = '^' . cmake_regex_arguments .
\ ')\s*' .
\ '\(' . cmake_regex_comment . '\)\?$'
let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\|FUNCTION\)\s*('
let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*('
" Add
if previous_line =~? cmake_indent_comment_line " Handle comments
let ind = ind
else
if previous_line =~? cmake_indent_begin_regex
let ind = ind + &sw
endif
if previous_line =~? cmake_indent_open_regex
let ind = ind + &sw
endif
endif
" Subtract
if this_line =~? cmake_indent_end_regex
let ind = ind - &sw
endif
if previous_line =~? cmake_indent_close_regex
let ind = ind - &sw
endif
return ind
endfun

@ -0,0 +1,241 @@
;=============================================================================
;
; Program: CMake - Cross-Platform Makefile Generator
; Module: $RCSfile: cmake-mode.el,v $
;
; Copyright (c) 2000-$Date: 2008-03-11 14:54:40 $ Kitware, Inc., Insight Consortium. All rights reserved.
; See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
;
; This software is distributed WITHOUT ANY WARRANTY; without even
; the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
; PURPOSE. See the above copyright notices for more information.
;
;=============================================================================
;;; cmake-mode.el --- major-mode for editing CMake sources
;------------------------------------------------------------------------------
;;; Commentary:
;; Provides syntax highlighting and indentation for CMakeLists.txt and
;; *.cmake source files.
;;
;; Add this code to your .emacs file to use the mode:
;;
;; (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path))
;; (require 'cmake-mode)
;; (setq auto-mode-alist
;; (append '(("CMakeLists\\.txt\\'" . cmake-mode)
;; ("\\.cmake\\'" . cmake-mode))
;; auto-mode-alist))
;------------------------------------------------------------------------------
;;; Code:
;;
;; Regular expressions used by line indentation function.
;;
(defconst cmake-regex-blank "^[ \t]*$")
(defconst cmake-regex-comment "#.*")
(defconst cmake-regex-paren-left "(")
(defconst cmake-regex-paren-right ")")
(defconst cmake-regex-argument-quoted
"\"\\([^\"\\\\]\\|\\\\\\(.\\|\n\\)\\)*\"")
(defconst cmake-regex-argument-unquoted
"\\([^ \t\r\n()#\"\\\\]\\|\\\\.\\)\\([^ \t\r\n()#\\\\]\\|\\\\.\\)*")
(defconst cmake-regex-token (concat "\\(" cmake-regex-comment
"\\|" cmake-regex-paren-left
"\\|" cmake-regex-paren-right
"\\|" cmake-regex-argument-unquoted
"\\|" cmake-regex-argument-quoted
"\\)"))
(defconst cmake-regex-indented (concat "^\\("
cmake-regex-token
"\\|" "[ \t\r\n]"
"\\)*"))
(defconst cmake-regex-block-open
"^\\(IF\\|MACRO\\|FOREACH\\|ELSE\\|ELSEIF\\|WHILE\\|FUNCTION\\)$")
(defconst cmake-regex-block-close
"^[ \t]*\\(ENDIF\\|ENDFOREACH\\|ENDMACRO\\|ELSE\\|ELSEIF\\|ENDWHILE\\|ENDFUNCTION\\)[ \t]*(")
;------------------------------------------------------------------------------
;;
;; Helper functions for line indentation function.
;;
(defun cmake-line-starts-inside-string ()
"Determine whether the beginning of the current line is in a string."
(if (save-excursion
(beginning-of-line)
(let ((parse-end (point)))
(beginning-of-buffer)
(nth 3 (parse-partial-sexp (point) parse-end))
)
)
t
nil
)
)
(defun cmake-find-last-indented-line ()
"Move to the beginning of the last line that has meaningful indentation."
(let ((point-start (point))
region)
(forward-line -1)
(setq region (buffer-substring-no-properties (point) point-start))
(while (and (not (bobp))
(or (looking-at cmake-regex-blank)
(not (and (string-match cmake-regex-indented region)
(= (length region) (match-end 0))))))
(forward-line -1)
(setq region (buffer-substring-no-properties (point) point-start))
)
)
)
;------------------------------------------------------------------------------
;;
;; Line indentation function.
;;
(defun cmake-indent ()
"Indent current line as CMAKE code."
(interactive)
(beginning-of-line)
(if (cmake-line-starts-inside-string)
()
(if (bobp)
(indent-line-to 0)
(let ((point-start (point))
token cur-indent)
(save-excursion
; Search back for the last indented line.
(cmake-find-last-indented-line)
; Start with the indentation on this line.
(setq cur-indent (current-indentation))
; Search forward counting tokens that adjust indentation.
(while (re-search-forward cmake-regex-token point-start t)
(setq token (match-string 0))
(if (string-match (concat "^" cmake-regex-paren-left "$") token)
(setq cur-indent (+ cur-indent cmake-tab-width))
)
(if (string-match (concat "^" cmake-regex-paren-right "$") token)
(setq cur-indent (- cur-indent cmake-tab-width))
)
(if (and
(string-match cmake-regex-block-open token)
(looking-at (concat "[ \t]*" cmake-regex-paren-left))
)
(setq cur-indent (+ cur-indent cmake-tab-width))
)
)
)
; If this is the end of a block, decrease indentation.
(if (looking-at cmake-regex-block-close)
(setq cur-indent (- cur-indent cmake-tab-width))
)
; Indent this line by the amount selected.
(if (< cur-indent 0)
(indent-line-to 0)
(indent-line-to cur-indent)
)
)
)
)
)
;------------------------------------------------------------------------------
;;
;; Helper functions for buffer
;;
(defun unscreamify-cmake-buffer ()
"Convert all CMake commands to lowercase in buffer."
(interactive)
(setq save-point (point))
(goto-char (point-min))
(while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
(replace-match
(concat
(match-string 1)
(downcase (match-string 2))
(match-string 3))
t))
(goto-char save-point)
)
;------------------------------------------------------------------------------
;;
;; Keyword highlighting regex-to-face map.
;;
(defconst cmake-font-lock-keywords
(list '("^[ \t]*\\(\\w+\\)[ \t]*(" 1 font-lock-function-name-face))
"Highlighting expressions for CMAKE mode."
)
;------------------------------------------------------------------------------
;;
;; Syntax table for this mode. Initialize to nil so that it is
;; regenerated when the cmake-mode function is called.
;;
(defvar cmake-mode-syntax-table nil "Syntax table for cmake-mode.")
(setq cmake-mode-syntax-table nil)
;;
;; User hook entry point.
;;
(defvar cmake-mode-hook nil)
;;
;; Indentation increment.
;;
(defvar cmake-tab-width 2)
;------------------------------------------------------------------------------
;;
;; CMake mode startup function.
;;
(defun cmake-mode ()
"Major mode for editing CMake listfiles."
(interactive)
(kill-all-local-variables)
(setq major-mode 'cmake-mode)
(setq mode-name "CMAKE")
; Create the syntax table
(setq cmake-mode-syntax-table (make-syntax-table))
(set-syntax-table cmake-mode-syntax-table)
(modify-syntax-entry ?_ "w" cmake-mode-syntax-table)
(modify-syntax-entry ?\( "()" cmake-mode-syntax-table)
(modify-syntax-entry ?\) ")(" cmake-mode-syntax-table)
(modify-syntax-entry ?# "<" cmake-mode-syntax-table)
(modify-syntax-entry ?\n ">" cmake-mode-syntax-table)
; Setup font-lock mode.
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(cmake-font-lock-keywords))
; Setup indentation function.
(make-local-variable 'indent-line-function)
(setq indent-line-function 'cmake-indent)
; Setup comment syntax.
(make-local-variable 'comment-start)
(setq comment-start "#")
; Run user hooks.
(run-hooks 'cmake-mode-hook))
; This file provides cmake-mode.
(provide 'cmake-mode)
;;; cmake-mode.el ends here

@ -0,0 +1,89 @@
" =============================================================================
"
" Program: CMake - Cross-Platform Makefile Generator
" Module: $RCSfile: cmake-syntax.vim,v $
" Language: VIM
" Date: $Date: 2008-01-16 16:53:53 $
" Version: $Revision: 1.9 $
"
" =============================================================================
" Vim syntax file
" Language: CMake
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
" Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
" Last Change: $Date: 2008-01-16 16:53:53 $
" Version: $Revision: 1.9 $
"
" Licence: The CMake license applies to this file. See
" http://www.cmake.org/HTML/Copyright.html
" This implies that distribution with Vim is allowed
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case ignore
syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
syn region cmakeComment start="#" end="$" contains=cmakeTodo
syn region cmakeRegistry start=/\[/ end=/]/
\ contained oneline contains=CONTAINED,cmakeTodo,cmakeEscaped
syn region cmakeVariableValue start=/\${/ end=/}/
\ contained oneline contains=CONTAINED,cmakeTodo
syn region cmakeEnvironment start=/\$ENV{/ end=/}/
\ contained oneline contains=CONTAINED,cmakeTodo
syn region cmakeString start=/"/ end=/"/
\ contains=CONTAINED,cmakeTodo,cmakeOperators
syn region cmakeArguments start=/(/ end=/)/
\ contains=ALLBUT,cmakeArguments,cmakeTodo
syn keyword cmakeSystemVariables
\ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80
syn keyword cmakeOperators
\ ABSOLUTE AND BOOL CACHE COMMAND DEFINED DOC EQUAL EXISTS EXT FALSE GREATER INTERNAL LESS MATCHES NAME NAMES NAME_WE NOT OFF ON OR PATH PATHS PROGRAM STREQUAL STRGREATER STRING STRLESS TRUE
\ contained
syn keyword cmakeDeprecated ABSTRACT_FILES BUILD_NAME SOURCE_FILES SOURCE_FILES_REMOVE VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WRAP_EXCLUDE_FILES
\ nextgroup=cmakeArguments
" The keywords are generated as: cmake --help-command-list | tr "\n" " "
syn keyword cmakeStatement
\ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_SUBDIRECTORY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND BUILD_NAME CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ELSE ELSEIF ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDFUNCTION ENDIF ENDMACRO ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH FUNCTION GET_CMAKE_PROPERTY GET_DIRECTORY_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY GET_TEST_PROPERTY IF INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS LINK_DIRECTORIES LINK_LIBRARIES LIST LOAD_CACHE LOAD_COMMAND MACRO MAKE_DIRECTORY MARK_AS_ADVANCED MATH MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI REMOVE REMOVE_DEFINITIONS SEPARATE_ARGUMENTS SET SET_DIRECTORY_PROPERTIES SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SET_TESTS_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIR_DEPENDS SUBDIRS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE
\ nextgroup=cmakeArguments
syn keyword cmakeTodo
\ TODO FIXME XXX
\ contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cmake_syntax_inits")
if version < 508
let did_cmake_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink cmakeStatement Statement
HiLink cmakeComment Comment
HiLink cmakeString String
HiLink cmakeVariableValue Type
HiLink cmakeRegistry Underlined
HiLink cmakeArguments Identifier
HiLink cmakeArgument Constant
HiLink cmakeEnvironment Special
HiLink cmakeOperators Operator
HiLink cmakeMacro PreProc
HiLink cmakeError Error
HiLink cmakeTodo TODO
HiLink cmakeEscaped Special
delcommand HiLink
endif
let b:current_syntax = "cmake"
"EOF"

@ -0,0 +1,10 @@
# The name of our project is "HELLO". CMakeLists files in this project can
# refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and
# to the root binary directory of the project as ${HELLO_BINARY_DIR}.
project (HELLO)
# Recurse into the "Hello" and "Demo" subdirectories. This does not actually
# cause another cmake executable to run. The same process will walk through
# the project's entire directory structure.
add_subdirectory (Hello)
add_subdirectory (Demo)

@ -0,0 +1,12 @@
# Make sure the compiler can find include files from our Hello library.
include_directories (${HELLO_SOURCE_DIR}/Hello)
# Make sure the linker can find the Hello library once it is built.
link_directories (${HELLO_BINARY_DIR}/Hello)
# Add executable called "helloDemo" that is built from the source files
# "demo.cxx" and "demo_b.cxx". The extensions are automatically found.
add_executable (helloDemo demo.cxx demo_b.cxx)
# Link the executable to the Hello library.
target_link_libraries (helloDemo Hello)

@ -0,0 +1,10 @@
#include "hello.h"
extern Hello hello;
int main()
{
hello.Print();
return 0;
}

@ -0,0 +1,3 @@
#include "hello.h"
Hello hello;

@ -0,0 +1,3 @@
# Create a library called "Hello" which includes the source file "hello.cxx".
# The extension is already found. Any number of sources could be listed here.
add_library (Hello hello.cxx)

@ -0,0 +1,7 @@
#include "hello.h"
#include <stdio.h>
void Hello::Print()
{
printf("Hello, World!\n");
}

@ -0,0 +1,11 @@
#ifndef _hello_h
#define _hello_h
class Hello
{
public:
void Print();
};
#endif

@ -0,0 +1,16 @@
# - ADD_FILE_DEPENDENCIES(source_file depend_files...)
# Adds the given files as dependencies to source_file
#
MACRO(ADD_FILE_DEPENDENCIES _file)
GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS)
IF (_deps)
SET(_deps ${_deps} ${ARGN})
ELSE (_deps)
SET(_deps ${ARGN})
ENDIF (_deps)
SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
ENDMACRO(ADD_FILE_DEPENDENCIES)

@ -0,0 +1,4 @@
# This file is used by cmake.cxx to compute the CMAKE_ROOT location.
# Do not remove this file from cvs without updating cmake.cxx to look
# for a different file.

@ -0,0 +1,4 @@
SET(ASM_DIALECT "-ATT")
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)

@ -0,0 +1,11 @@
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER "@_CMAKE_ASM_COMPILER@")
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ARG1 "@_CMAKE_ASM_COMPILER_ARG1@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_LINKER "@CMAKE_LINKER@")
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1)
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@")
SET(CMAKE_ASM@ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_ASM@ASM_DIALECT@_LINKER_PREFERENCE 0)

@ -0,0 +1,61 @@
MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues")
IF(UNIX)
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
IF("${CMAKE_BASE_NAME}" STREQUAL "as")
SET(CMAKE_BASE_NAME gas)
ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as")
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
IF(CMAKE_SYSTEM_PROCESSOR)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_SYSTEM_PROCESSOR)
IF(NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
ENDIF(NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
IF(NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM OPTIONAL)
ENDIF(NOT _INCLUDED_FILE)
IF(NOT CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS)
SET(CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS s;S;asm)
ENDIF(NOT CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS)
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
IF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
"<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
# to be done
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
SET(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1)

@ -0,0 +1,17 @@
CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in
CMake(LANG)Compiler.cmake.in -> used by CMakeDetermine(LANG)Compiler.cmake
This file is used to store compiler information and is copied down into try
compile directories so that try compiles do not need to re-determine and test the LANG
CMakeTest(LANG)Compiler.cmake -> test the compiler and set:
SET(CMAKE_(LANG)_COMPILER_WORKS 1 CACHE INTERNAL "")
CMake(LANG)Information.cmake -> set up rule variables for LANG :
CMAKE_(LANG)_CREATE_SHARED_LIBRARY
CMAKE_(LANG)_CREATE_SHARED_MODULE
CMAKE_(LANG)_CREATE_STATIC_LIBRARY
CMAKE_(LANG)_COMPILE_OBJECT
CMAKE_(LANG)_LINK_EXECUTABLE

@ -0,0 +1,71 @@
# Nothing here yet
IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
INCLUDE(CMakeVS7BackwardCompatibility)
SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
INCLUDE(CMakeVS6BackwardCompatibility)
SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
INCLUDE (CheckTypeSize)
CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
CHECK_TYPE_SIZE(char CMAKE_SIZEOF_CHAR)
CHECK_TYPE_SIZE(short CMAKE_SIZEOF_SHORT)
CHECK_TYPE_SIZE(float CMAKE_SIZEOF_FLOAT)
CHECK_TYPE_SIZE(double CMAKE_SIZEOF_DOUBLE)
INCLUDE (CheckIncludeFile)
CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H)
CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
INCLUDE (CheckIncludeFiles)
CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
INCLUDE (TestBigEndian)
TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
INCLUDE (FindX11)
IF("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
SET (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.")
ELSE("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
SET (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING
"X11 extra flags.")
ENDIF("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
SET (CMAKE_X_LIBS "${X11_LIBRARIES}" CACHE STRING
"Libraries and options used in X11 programs.")
SET (CMAKE_HAS_X "${X11_FOUND}" CACHE INTERNAL "Is X11 around.")
INCLUDE (FindThreads)
SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING
"Thread library used.")
SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL
"Use the pthreads library.")
SET (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL
"Use the win32 thread library.")
SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL
"Use HP pthreads.")
SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
"Use sproc libs.")
ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
MARK_AS_ADVANCED(
CMAKE_HP_PTHREADS
CMAKE_THREAD_LIBS
CMAKE_USE_PTHREADS
CMAKE_USE_SPROC
CMAKE_USE_WIN32_THREADS
CMAKE_X_CFLAGS
CMAKE_X_LIBS
)

@ -0,0 +1,40 @@
# - define a bunch of backwards compatibility variables
# CMAKE_ANSI_CXXFLAGS - flag for ansi c++
# CMAKE_HAS_ANSI_STRING_STREAM - has <strstream>
# INCLUDE(TestForANSIStreamHeaders)
# INCLUDE(CheckIncludeFileCXX)
# INCLUDE(TestForSTDNamespace)
# INCLUDE(TestForANSIForScope)
IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
# check for some ANSI flags in the CXX compiler if it is not gnu
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
INCLUDE(TestCXXAcceptsFlag)
SET(CMAKE_TRY_ANSI_CXX_FLAGS "")
IF(CMAKE_SYSTEM MATCHES "IRIX.*")
SET(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
IF(CMAKE_SYSTEM MATCHES "OSF.*")
SET(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
ENDIF(CMAKE_SYSTEM MATCHES "OSF.*")
# if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see
# if the compiler accepts it
IF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
CHECK_CXX_ACCEPTS_FLAG(${CMAKE_TRY_ANSI_CXX_FLAGS} CMAKE_CXX_ACCEPTS_FLAGS)
# if the compiler liked the flag then set CMAKE_ANSI_CXXFLAGS
# to the flag
IF(CMAKE_CXX_ACCEPTS_FLAGS)
SET(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL
"What flags are required by the c++ compiler to make it ansi." )
ENDIF(CMAKE_CXX_ACCEPTS_FLAGS)
ENDIF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
INCLUDE(TestForANSIStreamHeaders)
INCLUDE(CheckIncludeFileCXX)
INCLUDE(TestForSTDNamespace)
INCLUDE(TestForANSIForScope)
INCLUDE(TestForSSTREAM)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")
ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)

@ -0,0 +1,3 @@
SET (CMAKE_MAKE_PROGRAM "make" CACHE STRING
"Program used to build from makefiles.")
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

@ -0,0 +1,29 @@
# This file has been automatically generated by CMake. DO NOT EDIT!
# It contains the build configuration for @PROJECT_NAME@. The command
# CMAKE_EXPORT_BUILD_SETTINGS(...) was used by @PROJECT_NAME@ to
# generate this file. Another project can use
# CMAKE_IMPORT_BUILD_SETTINGS(...) to load the build configuration
# from this file. The contents of this file may be different across
# versions of CMake. The values set here should not be used by user
# code.
SET(CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION "@CMAKE_MAJOR_VERSION@")
SET(CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION "@CMAKE_MINOR_VERSION@")
SET(CMAKE_BUILD_SETTING_PROJECT_NAME "@PROJECT_NAME@")
SET(CMAKE_BUILD_SETTING_C_COMPILER "@CMAKE_C_COMPILER@")
SET(CMAKE_BUILD_SETTING_C_FLAGS "@CMAKE_C_FLAGS@")
SET(CMAKE_BUILD_SETTING_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@")
SET(CMAKE_BUILD_SETTING_C_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@")
SET(CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL "@CMAKE_C_FLAGS_MINSIZEREL@")
SET(CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO "@CMAKE_C_FLAGS_RELWITHDEBINFO@")
SET(CMAKE_BUILD_SETTING_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
SET(CMAKE_BUILD_SETTING_BUILD_TYPE "@CMAKE_BUILD_TYPE@")
SET(CMAKE_BUILD_SETTING_BUILD_TOOL "@CMAKE_BUILD_TOOL@")

@ -0,0 +1,36 @@
SET(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
SET(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
SET(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
SET(CMAKE_C_PLATFORM_ID "@CMAKE_C_PLATFORM_ID@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
SET(CMAKE_C_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_C_COMPILER_ENV_VAR "CC")
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
SET(CMAKE_C_SIZEOF_DATA_PTR "@CMAKE_C_SIZEOF_DATA_PTR@")
SET(CMAKE_C_COMPILER_ABI "@CMAKE_C_COMPILER_ABI@")
IF(CMAKE_C_SIZEOF_DATA_PTR)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
ENDIF(CMAKE_C_SIZEOF_DATA_PTR)
IF(CMAKE_C_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
ENDIF(CMAKE_C_COMPILER_ABI)

@ -0,0 +1,28 @@
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#ifdef __CLASSIC_C__
# define const
#endif
/*--------------------------------------------------------------------------*/
#include "CMakeCompilerABI.h"
/*--------------------------------------------------------------------------*/
/* Make sure the information strings are referenced. */
#define REQUIRE(x) (&x[0] != &require)
int main()
{
const char require = 0;
return
(
REQUIRE(info_sizeof_dptr)
#if defined(ABI_ID)
&& REQUIRE(info_abi)
#endif
);
}

@ -0,0 +1,84 @@
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
/* Provide main() so the program can link. */
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#ifdef ID_VOID_MAIN
void main() {}
#else
int main() { return 0; }
#endif
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
#elif defined(__WATCOMC__)
# define COMPILER_ID "Watcom"
#elif defined(__SUNPRO_C)
# define COMPILER_ID "SunPro"
#elif defined(__HP_cc)
# define COMPILER_ID "HP"
#elif defined(__DECC)
# define COMPILER_ID "Compaq"
#elif defined(__IBMC__)
# define COMPILER_ID "VisualAge"
#elif defined(__PGI)
# define COMPILER_ID "PGI"
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
/* Analog Devices C++ compiler for Blackfin, TigerSHARC and
SHARC (21000) DSPs */
# define COMPILER_ID "ADSP"
/* IAR Systems compiler for embedded systems.
http://www.iar.com
Not supported yet by CMake
#elif defined(__IAR_SYSTEMS_ICC__)
# define COMPILER_ID "IAR" */
/* sdcc, the small devices C compiler for embedded systems,
http://sdcc.sourceforge.net */
#elif defined(SDCC)
# define COMPILER_ID "SDCC"
#elif defined(_COMPILER_VERSION)
# define COMPILER_ID "MIPSpro"
/* This compiler is either not known or is too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__sgi)
# define COMPILER_ID "MIPSpro"
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@

@ -0,0 +1,175 @@
# This file sets the basic flags for the C language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
# It also loads a system - compiler - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
# some compilers use different extensions (e.g. sdcc uses .rel)
# so set the extension here first so it can be overridden by the compiler specific file
IF(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_BASE_NAME gcc)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
# load a hardware specific file, mostly useful for embedded compilers
IF(CMAKE_SYSTEM_PROCESSOR)
IF(CMAKE_C_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_C_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
ENDIF(CMAKE_SYSTEM_PROCESSOR)
# load the system- and compiler specific files
IF(CMAKE_C_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_C_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
# But, it should still be after the platform file so changes can
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_C})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
IF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
IF(CMAKE_C_FLAGS_INIT STREQUAL " ")
SET(CMAKE_C_FLAGS_INIT)
ENDIF(CMAKE_C_FLAGS_INIT STREQUAL " ")
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
IF(NOT CMAKE_NO_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF(NOT CMAKE_NO_BUILD_TYPE)
SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
SET (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
IF(CMAKE_C_STANDARD_LIBRARIES_INIT)
SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all C applications.")
MARK_AS_ADVANCED(CMAKE_C_STANDARD_LIBRARIES)
ENDIF(CMAKE_C_STANDARD_LIBRARIES_INIT)
INCLUDE(CMakeCommonLanguageInclude)
# now define the following rule variables
# CMAKE_C_CREATE_SHARED_LIBRARY
# CMAKE_C_CREATE_SHARED_MODULE
# CMAKE_C_CREATE_STATIC_LIBRARY
# CMAKE_C_COMPILE_OBJECT
# CMAKE_C_LINK_EXECUTABLE
# variables supplied by the generator at use time
# <TARGET>
# <TARGET_BASE> the target without the suffix
# <OBJECTS>
# <OBJECT>
# <LINK_LIBRARIES>
# <FLAGS>
# <LINK_FLAGS>
# C compiler information
# <CMAKE_C_COMPILER>
# <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS>
# <CMAKE_SHARED_MODULE_CREATE_C_FLAGS>
# <CMAKE_C_LINK_FLAGS>
# Static library tools
# <CMAKE_AR>
# <CMAKE_RANLIB>
# create a C shared library
IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
SET(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
# create a C shared module just copy the shared library rule
IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
# create a C static library
IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
SET(CMAKE_C_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
# compile a C file into an object file
IF(NOT CMAKE_C_COMPILE_OBJECT)
SET(CMAKE_C_COMPILE_OBJECT
"<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
ENDIF(NOT CMAKE_C_COMPILE_OBJECT)
IF(NOT CMAKE_C_LINK_EXECUTABLE)
SET(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
SET(CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
MARK_AS_ADVANCED(
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
)
SET(CMAKE_C_INFORMATION_LOADED 1)

@ -0,0 +1,36 @@
SET(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
SET(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@")
SET(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
SET(CMAKE_CXX_PLATFORM_ID "@CMAKE_CXX_PLATFORM_ID@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@)
SET(CMAKE_CXX_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm)
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
# Save compiler ABI information.
SET(CMAKE_CXX_SIZEOF_DATA_PTR "@CMAKE_CXX_SIZEOF_DATA_PTR@")
SET(CMAKE_CXX_COMPILER_ABI "@CMAKE_CXX_COMPILER_ABI@")
IF(CMAKE_CXX_SIZEOF_DATA_PTR)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR)
IF(CMAKE_CXX_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
ENDIF(CMAKE_CXX_COMPILER_ABI)

@ -0,0 +1,24 @@
#ifndef __cplusplus
# error "A C compiler has been selected for C++."
#endif
/*--------------------------------------------------------------------------*/
#include "CMakeCompilerABI.h"
/*--------------------------------------------------------------------------*/
/* Make sure the information strings are referenced. */
#define REQUIRE(x) (&x[0] != &require)
int main()
{
const char require = 0;
return
(
REQUIRE(info_sizeof_dptr)
#if defined(ABI_ID)
&& REQUIRE(info_abi)
#endif
);
}

@ -0,0 +1,72 @@
/* This source file must have a .cpp extension so that all C++ compilers
recognize the extension without flags. Borland does not know .cxx for
example. */
#ifndef __cplusplus
# error "A C compiler has been selected for C++."
#endif
/* Provide main() so the program can link. */
int main() { return 0; }
#if defined(__COMO__)
# define COMPILER_ID "Comeau"
#elif defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
#elif defined(__WATCOMC__)
# define COMPILER_ID "Watcom"
#elif defined(__SUNPRO_CC)
# define COMPILER_ID "SunPro"
#elif defined(__HP_aCC)
# define COMPILER_ID "HP"
#elif defined(__DECCXX)
# define COMPILER_ID "Compaq"
#elif defined(__IBMCPP__)
# define COMPILER_ID "VisualAge"
#elif defined(__PGI)
# define COMPILER_ID "PGI"
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
/* Analog Devices C++ compiler for Blackfin, TigerSHARC and
SHARC (21000) DSPs */
# define COMPILER_ID "ADSP"
#elif defined(_COMPILER_VERSION)
# define COMPILER_ID "MIPSpro"
/* This compiler is either not known or is too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__sgi)
# define COMPILER_ID "MIPSpro"
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
@CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@

@ -0,0 +1,243 @@
# This file sets the basic flags for the C++ language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
# It also loads a system - compiler - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
# some compilers use different extensions (e.g. sdcc uses .rel)
# so set the extension here first so it can be overridden by the compiler specific file
IF(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_BASE_NAME g++)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# load a hardware specific file, mostly useful for embedded compilers
IF(CMAKE_SYSTEM_PROCESSOR)
IF(CMAKE_CXX_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_CXX_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
ENDIF(CMAKE_SYSTEM_PROCESSOR)
# load the system- and compiler specific files
IF(CMAKE_CXX_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_CXX_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
# But, it should still be after the platform file so changes can
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
IF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
ENDIF(NOT CMAKE_MODULE_EXISTS)
# Create a set of shared library variable specific to C++
# For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version
IF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
SET(CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
IF(NOT CMAKE_INCLUDE_FLAG_CXX)
SET(CMAKE_INCLUDE_FLAG_CXX ${CMAKE_INCLUDE_FLAG_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_CXX)
IF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
SET(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
# repeat for modules
IF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG)
SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP)
SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP)
# Initialize CXX link type selection flags from C versions.
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
IF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS
${CMAKE_${type}_LINK_STATIC_C_FLAGS})
ENDIF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
IF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS
${CMAKE_${type}_LINK_DYNAMIC_C_FLAGS})
ENDIF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
ENDFOREACH(type)
# add the flags to the cache based
# on the initial values computed in the platform/*.cmake files
# use _INIT variables so that this only happens the first time
# and you can set these flags in the cmake cache
SET(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
IF(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
SET(CMAKE_CXX_FLAGS_INIT)
ENDIF(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
SET (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
IF(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all C++ applications.")
MARK_AS_ADVANCED(CMAKE_CXX_STANDARD_LIBRARIES)
ENDIF(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
INCLUDE(CMakeCommonLanguageInclude)
# now define the following rules:
# CMAKE_CXX_CREATE_SHARED_LIBRARY
# CMAKE_CXX_CREATE_SHARED_MODULE
# CMAKE_CXX_CREATE_STATIC_LIBRARY
# CMAKE_CXX_COMPILE_OBJECT
# CMAKE_CXX_LINK_EXECUTABLE
# variables supplied by the generator at use time
# <TARGET>
# <TARGET_BASE> the target without the suffix
# <OBJECTS>
# <OBJECT>
# <LINK_LIBRARIES>
# <FLAGS>
# <LINK_FLAGS>
# CXX compiler information
# <CMAKE_CXX_COMPILER>
# <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>
# <CMAKE_CXX_SHARED_MODULE_CREATE_FLAGS>
# <CMAKE_CXX_LINK_FLAGS>
# Static library tools
# <CMAKE_AR>
# <CMAKE_RANLIB>
# create a shared C++ library
IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
# create a c++ shared module copy the shared library rule by default
IF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
# create a C++ static library
IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
ENDIF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
# compile a C++ file into an object file
IF(NOT CMAKE_CXX_COMPILE_OBJECT)
SET(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
ENDIF(NOT CMAKE_CXX_COMPILE_OBJECT)
IF(NOT CMAKE_CXX_LINK_EXECUTABLE)
SET(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE)
MARK_AS_ADVANCED(
CMAKE_BUILD_TOOL
CMAKE_VERBOSE_MAKEFILE
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_DEBUG)
SET(CMAKE_CXX_INFORMATION_LOADED 1)

@ -0,0 +1,94 @@
# this file has flags that are shared across languages and sets
# cache values that can be initialized in the platform-compiler.cmake file
# it may be included by more than one language.
SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
CACHE STRING "Flags used by the linker.")
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
IF(NOT CMAKE_NO_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF(NOT CMAKE_NO_BUILD_TYPE)
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
SET (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING
"Flags used by the linker during release minsize builds.")
SET (CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL ${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG ${CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL ${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# shared linker flags
SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
CACHE STRING "Flags used by the linker during the creation of dll's.")
# module linker flags
SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
CACHE STRING "Flags used by the linker during the creation of modules.")
SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
"What is the target build tool cmake is generating for.")
MARK_AS_ADVANCED(
CMAKE_BUILD_TOOL
CMAKE_VERBOSE_MAKEFILE
CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
)

@ -0,0 +1,26 @@
/*--------------------------------------------------------------------------*/
/* Size of a pointer-to-data in bytes. */
#define SIZEOF_DPTR (sizeof(void*))
const char info_sizeof_dptr[] = {
'I', 'N', 'F', 'O', ':', 's', 'i', 'z', 'e', 'o', 'f', '_', 'd', 'p', 't', 'r', '[',
('0' + ((SIZEOF_DPTR / 10)%10)),
('0' + (SIZEOF_DPTR % 10)),
']','\0'};
/*--------------------------------------------------------------------------*/
/* Application Binary Interface. */
#if defined(__sgi) && defined(_ABIO32)
# define ABI_ID "ELF O32"
#elif defined(__sgi) && defined(_ABIN32)
# define ABI_ID "ELF N32"
#elif defined(__sgi) && defined(_ABI64)
# define ABI_ID "ELF 64"
#elif defined(__ELF__)
# define ABI_ID "ELF"
#endif
#if defined(ABI_ID)
static char const info_abi[] = "INFO:abi[" ABI_ID "]";
#endif

@ -0,0 +1,2 @@
@CMAKE_CONFIGURABLE_FILE_CONTENT@

@ -0,0 +1,37 @@
# - Macro to provide an option dependent on other options.
# This macro presents an option to the user only if a set of other
# conditions are true. When the option is not presented a default
# value is used, but any value set by the user is preserved for when
# the option is presented again.
# Example invocation:
# CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON
# "USE_BAR;NOT USE_ZOT" OFF)
# If USE_BAR is true and USE_ZOT is false, this provides an option called
# USE_FOO that defaults to ON. Otherwise, it sets USE_FOO to OFF. If
# the status of USE_BAR or USE_ZOT ever changes, any value for the
# USE_FOO option is saved so that when the option is re-enabled it
# retains its old value.
MACRO(CMAKE_DEPENDENT_OPTION option doc default depends force)
IF(${option}_ISSET MATCHES "^${option}_ISSET$")
SET(${option}_AVAILABLE 1)
FOREACH(d ${depends})
STRING(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
IF(${CMAKE_DEPENDENT_OPTION_DEP})
ELSE(${CMAKE_DEPENDENT_OPTION_DEP})
SET(${option}_AVAILABLE 0)
ENDIF(${CMAKE_DEPENDENT_OPTION_DEP})
ENDFOREACH(d)
IF(${option}_AVAILABLE)
OPTION(${option} "${doc}" "${default}")
SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
ELSE(${option}_AVAILABLE)
IF(${option} MATCHES "^${option}$")
ELSE(${option} MATCHES "^${option}$")
SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
ENDIF(${option} MATCHES "^${option}$")
SET(${option} ${force})
ENDIF(${option}_AVAILABLE)
ELSE(${option}_ISSET MATCHES "^${option}_ISSET$")
SET(${option} "${${option}_ISSET}")
ENDIF(${option}_ISSET MATCHES "^${option}_ISSET$")
ENDMACRO(CMAKE_DEPENDENT_OPTION)

@ -0,0 +1,6 @@
# determine the compiler to use for ASM using AT&T syntax
SET(ASM_DIALECT "-ATT")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)

@ -0,0 +1,77 @@
# determine the compiler to use for ASM programs
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# prefer the environment variable ASM
IF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}")
ENDIF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
# finally list compilers to try
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}as ${_CMAKE_TOOLCHAIN_PREFIX}gas)
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
# Find the compiler.
IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} DOC "Assembler")
ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
#
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
GET_FILENAME_COMPONENT(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
IF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER})
MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE)
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
ENDIF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER)
IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
# if we have a gcc cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc
# the other tools of the toolchain usually have the same prefix
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
IF (COMPILER_BASENAME MATCHES "^(.+-)g?as")
STRING(REGEX REPLACE "^(.+-)g?as" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as")
ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(CMakeFindBinUtils)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM")
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
MESSAGE(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER)
MESSAGE(STATUS "Didn't find assembler")
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
SET(_CMAKE_ASM_COMPILER)
SET(_CMAKE_ASM_COMPILER_ARG1)
SET(_CMAKE_ASM_COMPILER_ENV_VAR)

@ -0,0 +1,149 @@
# determine the compiler to use for C programs
# NOTE, a generator may set CMAKE_C_COMPILER before
# loading this file to force a compiler.
# use environment variable CC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
# as a default compiler
# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
# as prefix for the tools (e.g. arm-elf-gcc, arm-elf-ar etc.). This works
# currently with the GNU crosscompilers.
#
# Sets the following variables:
# CMAKE_C_COMPILER
# CMAKE_AR
# CMAKE_RANLIB
# CMAKE_COMPILER_IS_GNUCC
#
# If not already set before, it also sets
# _CMAKE_TOOLCHAIN_PREFIX
IF(NOT CMAKE_C_COMPILER)
SET(CMAKE_CXX_COMPILER_INIT NOTFOUND)
# prefer the environment variable CC
IF($ENV{CC} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_C_COMPILER_INIT $ENV{CC} PROGRAM PROGRAM_ARGS CMAKE_C_FLAGS_ENV_INIT)
IF(CMAKE_C_FLAGS_ENV_INIT)
SET(CMAKE_C_COMPILER_ARG1 "${CMAKE_C_FLAGS_ENV_INIT}" CACHE STRING "First argument to C compiler")
ENDIF(CMAKE_C_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CC:\n$ENV{CC}.")
ENDIF(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
ENDIF($ENV{CC} MATCHES ".+")
# next try prefer the compiler specified by the generator
IF(CMAKE_GENERATOR_CC)
IF(NOT CMAKE_C_COMPILER_INIT)
SET(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC})
ENDIF(NOT CMAKE_C_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_CC)
# finally list compilers to try
IF(CMAKE_C_COMPILER_INIT)
SET(CMAKE_C_COMPILER_LIST ${CMAKE_C_COMPILER_INIT})
ELSE(CMAKE_C_COMPILER_INIT)
SET(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc)
ENDIF(CMAKE_C_COMPILER_INIT)
# Find the compiler.
IF (_CMAKE_USER_CXX_COMPILER_PATH)
FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} PATHS ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "C compiler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_CXX_COMPILER_PATH)
FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC "C compiler")
IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C compiler" FORCE)
ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
ELSE(NOT CMAKE_C_COMPILER)
# we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
# if CMAKE_C_COMPILER is a list of length 2, use the first item as
# CMAKE_C_COMPILER and the 2nd one as CMAKE_C_COMPILER_ARG1
LIST(LENGTH CMAKE_C_COMPILER _CMAKE_C_COMPILER_LIST_LENGTH)
IF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
LIST(GET CMAKE_C_COMPILER 1 CMAKE_C_COMPILER_ARG1)
LIST(GET CMAKE_C_COMPILER 0 CMAKE_C_COMPILER)
ENDIF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the C compiler already had a path, reuse it for searching the CXX compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_C_COMPILER_PATH "${CMAKE_C_COMPILER}" PATH)
IF(NOT _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_C_COMPILER_WITH_PATH NAMES ${CMAKE_C_COMPILER})
MARK_AS_ADVANCED(CMAKE_C_COMPILER_WITH_PATH)
IF(CMAKE_C_COMPILER_WITH_PATH)
SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE)
ENDIF(CMAKE_C_COMPILER_WITH_PATH)
ENDIF(NOT _CMAKE_USER_C_COMPILER_PATH)
ENDIF(NOT CMAKE_C_COMPILER)
MARK_AS_ADVANCED(CMAKE_C_COMPILER)
IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
# if we have a gcc cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc
# the other tools of the toolchain usually have the same prefix
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME_WE)
IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc")
STRING(REGEX REPLACE "^(.+-)g?cc" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc")
ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
# Build a small source file to identify the compiler.
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_PLATFORM_ID "Windows")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_C_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_C_COMPILER_ID_RUN)
SET(CMAKE_C_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification file.
SET(CMAKE_C_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
)
# Try to identify the compiler.
SET(CMAKE_C_COMPILER_ID)
FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_C_COMPILER_ID_PLATFORM_CONTENT)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)
# Set old compiler and platform id variables.
IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCC 1)
ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
IF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
SET(CMAKE_COMPILER_IS_MINGW 1)
ELSEIF("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin")
SET(CMAKE_COMPILER_IS_CYGWIN 1)
ENDIF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
ENDIF(NOT CMAKE_C_COMPILER_ID_RUN)
INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_C_COMPILER_ENV_VAR "CC")

@ -0,0 +1,159 @@
# determine the compiler to use for C++ programs
# NOTE, a generator may set CMAKE_CXX_COMPILER before
# loading this file to force a compiler.
# use environment variable CXX first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CXX which can be defined by a generator
# as a default compiler
# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
# as prefix for the tools (e.g. arm-elf-g++, arm-elf-ar etc.)
#
# Sets the following variables:
# CMAKE_CXX_COMPILER
# CMAKE_COMPILER_IS_GNUCXX
# CMAKE_AR
# CMAKE_RANLIB
#
# If not already set before, it also sets
# _CMAKE_TOOLCHAIN_PREFIX
IF(NOT CMAKE_CXX_COMPILER)
SET(CMAKE_CXX_COMPILER_INIT NOTFOUND)
# prefer the environment variable CXX
IF($ENV{CXX} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER_INIT $ENV{CXX} PROGRAM PROGRAM_ARGS CMAKE_CXX_FLAGS_ENV_INIT)
IF(CMAKE_CXX_FLAGS_ENV_INIT)
SET(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "First argument to CXX compiler")
ENDIF(CMAKE_CXX_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CXX:\n$ENV{CXX}.\n${CMAKE_CXX_COMPILER_INIT}")
ENDIF(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
ENDIF($ENV{CXX} MATCHES ".+")
# next prefer the generator specified compiler
IF(CMAKE_GENERATOR_CXX)
IF(NOT CMAKE_CXX_COMPILER_INIT)
SET(CMAKE_CXX_COMPILER_INIT ${CMAKE_GENERATOR_CXX})
ENDIF(NOT CMAKE_CXX_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_CXX)
# finally list compilers to try
IF(CMAKE_CXX_COMPILER_INIT)
SET(CMAKE_CXX_COMPILER_LIST ${CMAKE_CXX_COMPILER_INIT})
ELSE(CMAKE_CXX_COMPILER_INIT)
SET(CMAKE_CXX_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC)
ENDIF(CMAKE_CXX_COMPILER_INIT)
# Find the compiler.
IF (_CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} DOC "C++ compiler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} DOC "C++ compiler")
IF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER)
SET(CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER_INIT}" CACHE FILEPATH "C++ compiler" FORCE)
ENDIF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER)
ELSE(NOT CMAKE_CXX_COMPILER)
# we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
#
# if CMAKE_CXX_COMPILER is a list of length 2, use the first item as
# CMAKE_CXX_COMPILER and the 2nd one as CMAKE_CXX_COMPILER_ARG1
LIST(LENGTH CMAKE_CXX_COMPILER _CMAKE_CXX_COMPILER_LIST_LENGTH)
IF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
LIST(GET CMAKE_CXX_COMPILER 1 CMAKE_CXX_COMPILER_ARG1)
LIST(GET CMAKE_CXX_COMPILER 0 CMAKE_CXX_COMPILER)
ENDIF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the CXX compiler already had a path, reuse it for searching the C compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH)
IF(NOT _CMAKE_USER_CXX_COMPILER_PATH)
FIND_PROGRAM(CMAKE_CXX_COMPILER_WITH_PATH NAMES ${CMAKE_CXX_COMPILER})
MARK_AS_ADVANCED(CMAKE_CXX_COMPILER_WITH_PATH)
IF(CMAKE_CXX_COMPILER_WITH_PATH)
SET(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE)
ENDIF(CMAKE_CXX_COMPILER_WITH_PATH)
ENDIF(NOT _CMAKE_USER_CXX_COMPILER_PATH)
ENDIF(NOT CMAKE_CXX_COMPILER)
MARK_AS_ADVANCED(CMAKE_CXX_COMPILER)
IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
# if we have a g++ cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++
# the other tools of the toolchain usually have the same prefix
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME_WE)
IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+")
STRING(REGEX REPLACE "^(.+-)[gc]\\+\\+" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+")
ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
# This block was used before the compiler was identified by building a
# source file. Unless g++ crashes when building a small C++
# executable this should no longer be needed.
#
# The g++ that comes with BeOS 5 segfaults if you run "g++ -E"
# ("gcc -E" is fine), which throws up a system dialog box that hangs cmake
# until the user clicks "OK"...so for now, we just assume it's g++.
# IF(BEOS)
# SET(CMAKE_COMPILER_IS_GNUCXX 1)
# SET(CMAKE_COMPILER_IS_GNUCXX_RUN 1)
# ENDIF(BEOS)
# Build a small source file to identify the compiler.
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
SET(CMAKE_CXX_PLATFORM_ID "Windows")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_CXX_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_CXX_COMPILER_ID_RUN)
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification file.
SET(CMAKE_CXX_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
)
# Try to identify the compiler.
SET(CMAKE_CXX_COMPILER_ID)
FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp)
# Set old compiler and platform id variables.
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCXX 1)
ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
IF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
SET(CMAKE_COMPILER_IS_MINGW 1)
ELSEIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
SET(CMAKE_COMPILER_IS_CYGWIN 1)
ENDIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
ENDIF(NOT CMAKE_CXX_COMPILER_ID_RUN)
INCLUDE(CMakeFindBinUtils)
# configure all variables set in this file
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")

@ -0,0 +1,49 @@
# Function to compile a source file to identify the compiler ABI.
# This is used internally by CMake and should not be included by user
# code.
FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
IF(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
MESSAGE(STATUS "Detecting ${lang} compiler ABI info")
# Compile the ABI identification source.
SET(BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDetermineCompilerABI_${lang}.bin")
TRY_COMPILE(CMAKE_DETERMINE_${lang}_ABI_COMPILED
${CMAKE_BINARY_DIR} ${src}
OUTPUT_VARIABLE OUTPUT
COPY_FILE "${BIN}"
)
# Load the resulting information strings.
IF(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
MESSAGE(STATUS "Detecting ${lang} compiler ABI info - done")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n")
FILE(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[")
FOREACH(info ${ABI_STRINGS})
IF("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
STRING(REGEX REPLACE ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*" "\\1" ABI_SIZEOF_DPTR "${info}")
ENDIF("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
IF("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
STRING(REGEX REPLACE ".*INFO:abi\\[([^]]*)\\].*" "\\1" ABI_NAME "${info}")
ENDIF("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
ENDFOREACH(info)
IF(ABI_SIZEOF_DPTR)
SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
SET(CMAKE_SIZEOF_VOID_P "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
ENDIF(ABI_SIZEOF_DPTR)
IF(ABI_NAME)
SET(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${ABI_NAME}" PARENT_SCOPE)
ENDIF(ABI_NAME)
ELSE(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
MESSAGE(STATUS "Detecting ${lang} compiler ABI info - failed")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n\n")
ENDIF(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
ENDIF(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ABI)

@ -0,0 +1,225 @@
# Function to compile a source file to identify the compiler. This is
# used internally by CMake and should not be included by user code.
# If successful, sets CMAKE_<lang>_COMPILER_ID and CMAKE_<lang>_PLATFORM_ID
FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
# Make sure the compiler arguments are clean.
STRING(STRIP "${CMAKE_${lang}_COMPILER_ARG1}" CMAKE_${lang}_COMPILER_ID_ARG1)
# Make sure user-specified compiler flags are used.
IF(CMAKE_${lang}_FLAGS)
SET(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
ELSE(CMAKE_${lang}_FLAGS)
SET(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}})
ENDIF(CMAKE_${lang}_FLAGS)
STRING(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
# Compute the directory in which to run the test.
SET(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
# Try building with no extra flags and then try each set
# of helper flags. Stop when the compiler is identified.
FOREACH(flags "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
IF(NOT CMAKE_${lang}_COMPILER_ID)
CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
FOREACH(file ${COMPILER_${lang}_PRODUCED_FILES})
CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
ENDFOREACH(file)
ENDIF(NOT CMAKE_${lang}_COMPILER_ID)
ENDFOREACH(flags)
# if the format is unknown after all files have been checked, put "Unknown" in the cache
IF(NOT CMAKE_EXECUTABLE_FORMAT)
SET(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format")
ENDIF(NOT CMAKE_EXECUTABLE_FORMAT)
# Display the final identification result.
IF(CMAKE_${lang}_COMPILER_ID)
MESSAGE(STATUS "The ${lang} compiler identification is "
"${CMAKE_${lang}_COMPILER_ID}")
ELSE(CMAKE_${lang}_COMPILER_ID)
MESSAGE(STATUS "The ${lang} compiler identification is unknown")
ENDIF(CMAKE_${lang}_COMPILER_ID)
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID)
#-----------------------------------------------------------------------------
# Function to write the compiler id source file.
FUNCTION(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src)
FILE(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN)
STRING(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY)
FILE(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}")
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_WRITE)
#-----------------------------------------------------------------------------
# Function to build the compiler id source file and look for output
# files.
FUNCTION(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
# Create a clean working directory.
FILE(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
FILE(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
CMAKE_DETERMINE_COMPILER_ID_WRITE("${lang}" "${src}")
# Construct a description of this test case.
SET(COMPILER_DESCRIPTION
"Compiler: ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_ARG1}
Build flags: ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
Id flags: ${testflags}
")
# Compile the compiler identification source.
IF(COMMAND EXECUTE_PROCESS)
EXECUTE_PROCESS(
COMMAND ${CMAKE_${lang}_COMPILER}
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
"${src}"
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT
)
ELSE(COMMAND EXECUTE_PROCESS)
EXEC_PROGRAM(
${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
ARGS ${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
\"${src}\"
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT
)
ENDIF(COMMAND EXECUTE_PROCESS)
# Check the result of compilation.
IF(CMAKE_${lang}_COMPILER_ID_RESULT)
# Compilation failed.
SET(MSG
"Compiling the ${lang} compiler identification source file \"${src}\" failed.
${COMPILER_DESCRIPTION}
The output was:
${CMAKE_${lang}_COMPILER_ID_RESULT}
${CMAKE_${lang}_COMPILER_ID_OUTPUT}
")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}")
#IF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
# MESSAGE(FATAL_ERROR "${MSG}")
#ENDIF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
# No output files should be inspected.
SET(COMPILER_${lang}_PRODUCED_FILES)
ELSE(CMAKE_${lang}_COMPILER_ID_RESULT)
# Compilation succeeded.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Compiling the ${lang} compiler identification source file \"${src}\" succeeded.
${COMPILER_DESCRIPTION}
The output was:
${CMAKE_${lang}_COMPILER_ID_RESULT}
${CMAKE_${lang}_COMPILER_ID_OUTPUT}
")
# Find the executable produced by the compiler, try all files in the
# binary dir.
FILE(GLOB COMPILER_${lang}_PRODUCED_FILES
RELATIVE ${CMAKE_${lang}_COMPILER_ID_DIR}
${CMAKE_${lang}_COMPILER_ID_DIR}/*)
LIST(REMOVE_ITEM COMPILER_${lang}_PRODUCED_FILES "${src}")
FOREACH(file ${COMPILER_${lang}_PRODUCED_FILES})
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Compilation of the ${lang} compiler identification source \""
"${src}\" produced \"${file}\"\n\n")
ENDFOREACH(file)
IF(NOT COMPILER_${lang}_PRODUCED_FILES)
# No executable was found.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Compilation of the ${lang} compiler identification source \""
"${src}\" did not produce an executable in \""
"${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n")
ENDIF(NOT COMPILER_${lang}_PRODUCED_FILES)
ENDIF(CMAKE_${lang}_COMPILER_ID_RESULT)
# Return the files produced by the compilation.
SET(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
#-----------------------------------------------------------------------------
# Function to extract the compiler id from an executable.
FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# Look for a compiler id if not yet known.
IF(NOT CMAKE_${lang}_COMPILER_ID)
# Read the compiler identification string from the executable file.
SET(COMPILER_ID)
SET(PLATFORM_ID)
FILE(STRINGS ${file}
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:")
SET(HAVE_COMPILER_TWICE 0)
FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
IF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
IF(COMPILER_ID)
SET(COMPILER_ID_TWICE 1)
ENDIF(COMPILER_ID)
STRING(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
COMPILER_ID "${info}")
ENDIF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
IF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
PLATFORM_ID "${info}")
ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
ENDFOREACH(info)
# Check if a valid compiler and platform were found.
IF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
SET(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}")
SET(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}")
ENDIF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
# Check the compiler identification string.
IF(CMAKE_${lang}_COMPILER_ID)
# The compiler identification was found.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The ${lang} compiler identification is ${CMAKE_${lang}_COMPILER_ID}, found in \""
"${file}\"\n\n")
ELSE(CMAKE_${lang}_COMPILER_ID)
# The compiler identification could not be found.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"The ${lang} compiler identification could not be found in \""
"${file}\"\n\n")
ENDIF(CMAKE_${lang}_COMPILER_ID)
ENDIF(NOT CMAKE_${lang}_COMPILER_ID)
# try to figure out the executable format: ELF, COFF, Mach-O
IF(NOT CMAKE_EXECUTABLE_FORMAT)
FILE(READ ${file} CMAKE_EXECUTABLE_MAGIC LIMIT 4 HEX)
# ELF files start with 0x7f"ELF"
IF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
SET(CMAKE_EXECUTABLE_FORMAT "ELF" CACHE INTERNAL "Executable file format")
ENDIF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
# # COFF (.exe) files start with "MZ"
# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
# SET(CMAKE_EXECUTABLE_FORMAT "COFF" CACHE STRING "Executable file format")
# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
#
# # Mach-O files start with CAFEBABE or FEEDFACE, according to http://radio.weblogs.com/0100490/2003/01/28.html
# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
# SET(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
# SET(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
ENDIF(NOT CMAKE_EXECUTABLE_FORMAT)
# Return the information extracted.
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)

@ -0,0 +1,144 @@
# determine the compiler to use for Fortran programs
# NOTE, a generator may set CMAKE_Fortran_COMPILER before
# loading this file to force a compiler.
# use environment variable FC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_FC which can be defined by a generator
# as a default compiler
IF(NOT CMAKE_Fortran_COMPILER)
# prefer the environment variable CC
IF($ENV{FC} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_Fortran_COMPILER_INIT $ENV{FC} PROGRAM PROGRAM_ARGS CMAKE_Fortran_FLAGS_ENV_INIT)
IF(CMAKE_Fortran_FLAGS_ENV_INIT)
SET(CMAKE_Fortran_COMPILER_ARG1 "${CMAKE_Fortran_FLAGS_ENV_INIT}" CACHE STRING "First argument to Fortran compiler")
ENDIF(CMAKE_Fortran_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
ELSE(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.")
ENDIF(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
ENDIF($ENV{FC} MATCHES ".+")
# next try prefer the compiler specified by the generator
IF(CMAKE_GENERATOR_FC)
IF(NOT CMAKE_Fortran_COMPILER_INIT)
SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
ENDIF(NOT CMAKE_Fortran_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_FC)
# finally list compilers to try
IF(CMAKE_Fortran_COMPILER_INIT)
SET(CMAKE_Fortran_COMPILER_LIST ${CMAKE_Fortran_COMPILER_INIT})
ELSE(CMAKE_Fortran_COMPILER_INIT)
# Known compilers:
# f77/f90/f95: generic compiler names
# g77: GNU Fortran 77 compiler
# gfortran: putative GNU Fortran 95+ compiler (in progress)
# fort77: native F77 compiler under HP-UX (and some older Crays)
# frt: Fujitsu F77 compiler
# pgf77/pgf90/pgf95: Portland Group F77/F90/F95 compilers
# xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers
# lf95: Lahey-Fujitsu F95 compiler
# fl32: Microsoft Fortran 77 "PowerStation" compiler
# af77: Apogee F77 compiler for Intergraph hardware running CLIX
# epcf90: "Edinburgh Portable Compiler" F90
# fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha
# ifc: Intel Fortran 95 compiler for Linux/x86
# efc: Intel Fortran 95 compiler for IA64
#
# The order is 95 or newer compilers first, then 90,
# then 77 or older compilers, gnu is always last in the group,
# so if you paid for a compiler it is picked by default.
# NOTE for testing purposes this list is DUPLICATED in
# CMake/Source/CMakeLists.txt, IF YOU CHANGE THIS LIST,
# PLEASE UPDATE THAT FILE AS WELL!
SET(CMAKE_Fortran_COMPILER_LIST
ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran g95 f90
pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77
)
ENDIF(CMAKE_Fortran_COMPILER_INIT)
# Find the compiler.
FIND_PROGRAM(CMAKE_Fortran_COMPILER NAMES ${CMAKE_Fortran_COMPILER_LIST} DOC "Fortran compiler")
IF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
SET(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER_INIT}" CACHE FILEPATH "Fortran compiler" FORCE)
ENDIF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
ENDIF(NOT CMAKE_Fortran_COMPILER)
MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER)
# Build a small source file to identify the compiler.
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
SET(CMAKE_Fortran_PLATFORM_ID "Windows")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_Fortran_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification executable.
SET(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
# Intel on windows does not preprocess by default.
"-fpp"
)
# Try to identify the compiler.
SET(CMAKE_Fortran_COMPILER_ID)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(Fortran FFLAGS CMakeFortranCompilerId.F90)
# Fall back to old is-GNU test.
IF(NOT CMAKE_Fortran_COMPILER_ID)
EXEC_PROGRAM(${CMAKE_Fortran_COMPILER}
ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\""
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_Fortran_COMPILER_ID "GNU")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
IF(NOT CMAKE_Fortran_PLATFORM_ID)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
SET(CMAKE_Fortran_PLATFORM_ID "MinGW")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
SET(CMAKE_Fortran_PLATFORM_ID "Cygwin")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
ENDIF(NOT CMAKE_Fortran_PLATFORM_ID)
ENDIF(NOT CMAKE_COMPILER_RETURN)
ENDIF(NOT CMAKE_Fortran_COMPILER_ID)
# Set old compiler and platform id variables.
IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUG77 1)
ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
IF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
SET(CMAKE_COMPILER_IS_MINGW 1)
ELSEIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin")
SET(CMAKE_COMPILER_IS_CYGWIN 1)
ENDIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
ENDIF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")

@ -0,0 +1,85 @@
# determine the compiler to use for Java programs
# NOTE, a generator may set CMAKE_Java_COMPILER before
# loading this file to force a compiler.
IF(NOT CMAKE_Java_COMPILER)
# prefer the environment variable CC
IF($ENV{JAVA_COMPILER} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_Java_COMPILER_INIT $ENV{JAVA_COMPILER} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(CMAKE_Java_FLAGS_ENV_INIT)
SET(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler")
ENDIF(CMAKE_Java_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.")
ENDIF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
ENDIF($ENV{JAVA_COMPILER} MATCHES ".+")
IF($ENV{JAVA_RUNTIME} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.")
ENDIF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
ENDIF($ENV{JAVA_RUNTIME} MATCHES ".+")
IF($ENV{JAVA_ARCHIVE} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.")
ENDIF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
ENDIF($ENV{JAVA_ARCHIVE} MATCHES ".+")
SET(Java_BIN_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.9;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.7;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.6;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin"
/usr/bin
/usr/lib/java/bin
/usr/share/java/bin
/usr/local/bin
/usr/local/java/bin
/usr/java/j2sdk1.4.2_04
/usr/lib/j2sdk1.4-sun/bin
/usr/lib/j2sdk1.5-sun/bin
)
# if no compiler has been specified yet, then look for one
IF(CMAKE_Java_COMPILER_INIT)
SET(CMAKE_Java_COMPILER ${CMAKE_Java_COMPILER_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_COMPILER_INIT)
FIND_PROGRAM(CMAKE_Java_COMPILER
NAMES javac
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_Java_COMPILER_INIT)
# if no runtime has been specified yet, then look for one
IF(CMAKE_Java_RUNTIME_INIT)
SET(CMAKE_Java_RUNTIME ${CMAKE_Java_RUNTIME_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_RUNTIME_INIT)
FIND_PROGRAM(CMAKE_Java_RUNTIME
NAMES java
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_Java_RUNTIME_INIT)
# if no archive has been specified yet, then look for one
IF(CMAKE_Java_ARCHIVE_INIT)
SET(CMAKE_Java_ARCHIVE ${CMAKE_Java_ARCHIVE_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_ARCHIVE_INIT)
FIND_PROGRAM(CMAKE_Java_ARCHIVE
NAMES jar
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_Java_ARCHIVE_INIT)
ENDIF(NOT CMAKE_Java_COMPILER)
MARK_AS_ADVANCED(CMAKE_Java_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")

@ -0,0 +1,48 @@
# determine the compiler to use for C programs
# NOTE, a generator may set CMAKE_C_COMPILER before
# loading this file to force a compiler.
# use environment variable CCC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
# as a default compiler
IF(NOT CMAKE_RC_COMPILER)
# prefer the environment variable CC
IF($ENV{RC} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT)
IF(CMAKE_RC_FLAGS_ENV_INIT)
SET(CMAKE_RC_COMPILER_ARG1 "${CMAKE_RC_FLAGS_ENV_INIT}" CACHE STRING "First argument to RC compiler")
ENDIF(CMAKE_RC_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_RC_COMPILER_INIT})
ELSE(EXISTS ${CMAKE_RC_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.")
ENDIF(EXISTS ${CMAKE_RC_COMPILER_INIT})
ENDIF($ENV{RC} MATCHES ".+")
# next try prefer the compiler specified by the generator
IF(CMAKE_GENERATOR_RC)
IF(NOT CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC})
ENDIF(NOT CMAKE_RC_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_RC)
# finally list compilers to try
IF(CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT})
ELSE(CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER_LIST rc)
ENDIF(CMAKE_RC_COMPILER_INIT)
# Find the compiler.
FIND_PROGRAM(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler")
IF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
SET(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE)
ENDIF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
ENDIF(NOT CMAKE_RC_COMPILER)
MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE)
SET(CMAKE_RC_COMPILER_ENV_VAR "RC")

@ -0,0 +1,154 @@
# This module is used by the Makefile generator to determin the following variables:
# CMAKE_SYSTEM_NAME - on unix this is uname -s, for windows it is Windows
# CMAKE_SYSTEM_VERSION - on unix this is uname -r, for windows it is empty
# CMAKE_SYSTEM - ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_VERSION}, for windows: ${CMAKE_SYSTEM}
#
# Expected uname -s output:
#
# AIX AIX
# BSD/OS BSD/OS
# FreeBSD FreeBSD
# HP-UX HP-UX
# IRIX IRIX
# Linux Linux
# NetBSD NetBSD
# OpenBSD OpenBSD
# OFS/1 (Digital Unix) OSF1
# SCO OpenServer 5 SCO_SV
# SCO UnixWare 7 UnixWare
# SCO UnixWare (pre release 7) UNIX_SV
# SCO XENIX Xenix
# Solaris SunOS
# SunOS SunOS
# Tru64 Tru64
# Ultrix ULTRIX
# cygwin CYGWIN_NT-5.1
# MacOSX Darwin
# find out on which system cmake runs
IF(CMAKE_HOST_UNIX)
FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
IF(CMAKE_UNAME)
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
IF("${val}" GREATER 0)
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
ENDIF("${val}" GREATER 0)
ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
# check the return of the last uname -m or -p
IF("${val}" GREATER 0)
SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
ENDIF("${val}" GREATER 0)
SET(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command")
# processor may have double quote in the name, and that needs to be removed
STRING(REGEX REPLACE "\"" "" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
STRING(REGEX REPLACE "/" "_" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
ENDIF(CMAKE_UNAME)
ELSE(CMAKE_HOST_UNIX)
IF(CMAKE_HOST_WIN32)
SET (CMAKE_HOST_SYSTEM_NAME "Windows")
SET (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
ENDIF(CMAKE_HOST_WIN32)
ENDIF(CMAKE_HOST_UNIX)
# if a toolchain file is used, the user wants to cross compile.
# in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_*
# variables around so they can be used in CMakeLists.txt.
# In all other cases, the host and target platform are the same.
IF(CMAKE_TOOLCHAIN_FILE)
# at first try to load it as path relative to the directory from which cmake has been run
INCLUDE("${CMAKE_BINARY_DIR}/${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
IF(NOT _INCLUDED_TOOLCHAIN_FILE)
# if the file isn't found there, check the default locations
INCLUDE("${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
ENDIF(NOT _INCLUDED_TOOLCHAIN_FILE)
IF(_INCLUDED_TOOLCHAIN_FILE)
SET(CMAKE_TOOLCHAIN_FILE "${_INCLUDED_TOOLCHAIN_FILE}" CACHE FILEPATH "The CMake toolchain file" FORCE)
ELSE(_INCLUDED_TOOLCHAIN_FILE)
MESSAGE(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
SET(CMAKE_TOOLCHAIN_FILE "NOTFOUND" CACHE FILEPATH "The CMake toolchain file" FORCE)
ENDIF(_INCLUDED_TOOLCHAIN_FILE)
ENDIF(CMAKE_TOOLCHAIN_FILE)
# if CMAKE_SYSTEM_NAME is here already set, either it comes from a toolchain file
# or it was set via -DCMAKE_SYSTEM_NAME=...
# if that's the case, assume we are crosscompiling
IF(CMAKE_SYSTEM_NAME)
IF(NOT DEFINED CMAKE_CROSSCOMPILING)
SET(CMAKE_CROSSCOMPILING TRUE)
ENDIF(NOT DEFINED CMAKE_CROSSCOMPILING)
SET(PRESET_CMAKE_SYSTEM_NAME TRUE)
ELSE(CMAKE_SYSTEM_NAME)
SET(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
SET(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
SET(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
SET(CMAKE_CROSSCOMPILING FALSE)
SET(PRESET_CMAKE_SYSTEM_NAME FALSE)
ENDIF(CMAKE_SYSTEM_NAME)
MACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
IF(NOT ${_PREFIX}_NAME)
SET(${_PREFIX}_NAME "UnknownOS")
ENDIF(NOT ${_PREFIX}_NAME)
# fix for BSD/OS , remove the /
IF(${_PREFIX}_NAME MATCHES BSD.OS)
SET(${_PREFIX}_NAME BSDOS)
ENDIF(${_PREFIX}_NAME MATCHES BSD.OS)
# fix for CYGWIN which has windows version in it
IF(${_PREFIX}_NAME MATCHES CYGWIN)
SET(${_PREFIX}_NAME CYGWIN)
ENDIF(${_PREFIX}_NAME MATCHES CYGWIN)
# set CMAKE_SYSTEM to the CMAKE_SYSTEM_NAME
SET(${_PREFIX} ${${_PREFIX}_NAME})
# if there is a CMAKE_SYSTEM_VERSION then add a -${CMAKE_SYSTEM_VERSION}
IF(${_PREFIX}_VERSION)
SET(${_PREFIX} ${${_PREFIX}}-${${_PREFIX}_VERSION})
ENDIF(${_PREFIX}_VERSION)
ENDMACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_SYSTEM)
ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_HOST_SYSTEM)
# this file is also executed from cpack, then we don't need to generate these files
# in this case there is no CMAKE_BINARY_DIR
IF(CMAKE_BINARY_DIR)
# write entry to the log file
IF(PRESET_CMAKE_SYSTEM_NAME)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The target system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The host system is: ${CMAKE_HOST_SYSTEM_NAME} - ${CMAKE_HOST_SYSTEM_VERSION} - ${CMAKE_HOST_SYSTEM_PROCESSOR}\n")
ELSE(PRESET_CMAKE_SYSTEM_NAME)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
ENDIF(PRESET_CMAKE_SYSTEM_NAME)
# if a toolchain file is used, it needs to be included in the configured file,
# so settings done there are also available if they don't go in the cache and in TRY_COMPILE()
SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED)
IF(DEFINED CMAKE_TOOLCHAIN_FILE)
SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED "INCLUDE(\"${CMAKE_TOOLCHAIN_FILE}\")")
ENDIF(DEFINED CMAKE_TOOLCHAIN_FILE)
# configure variables set in this file for fast reload, the template file is defined at the top of this file
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake
IMMEDIATE @ONLY)
ENDIF(CMAKE_BINARY_DIR)

@ -0,0 +1,12 @@
# - export build settings from a project.
# CMAKE_EXPORT_BUILD_SETTINGS(SETTINGS_FILE)
# macro defined to export the build settings for use by another project.
# SETTINGS_FILE - the file into which the settings are to be stored.
MACRO(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE)
IF(${SETTINGS_FILE} MATCHES ".+")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in
${SETTINGS_FILE} @ONLY IMMEDIATE)
ELSE(${SETTINGS_FILE} MATCHES ".+")
MESSAGE(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.")
ENDIF(${SETTINGS_FILE} MATCHES ".+")
ENDMACRO(CMAKE_EXPORT_BUILD_SETTINGS)

@ -0,0 +1,76 @@
# search for additional tools required for C/C++ (and other languages ?)
#
# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
# as prefix for the tools (e.g. arm-elf-gcc etc.)
# If the cmake variable _CMAKE_TOOLCHAIN_LOCATION is set, the compiler is
# searched only there. The other tools are at first searched there, then
# also in the default locations.
#
# Sets the following variables:
# CMAKE_AR
# CMAKE_RANLIB
# CMAKE_LINKER
# CMAKE_STRIP
# CMAKE_INSTALL_NAME_TOOL
# on UNIX, cygwin and mingw
# if it's the MS C/CXX compiler, search for link
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
FIND_PROGRAM(CMAKE_LINKER NAMES link PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_LINKER NAMES link)
MARK_AS_ADVANCED(CMAKE_LINKER)
# in all other cases search for ar, ranlib, etc.
ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar)
FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib)
IF(NOT CMAKE_RANLIB)
SET(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
ENDIF(NOT CMAKE_RANLIB)
FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip)
FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld)
FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm)
FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump)
FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy)
MARK_AS_ADVANCED(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY)
ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
# on Apple there really should be install_name_tool
IF(APPLE)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool)
IF(NOT CMAKE_INSTALL_NAME_TOOL)
MESSAGE(FATAL_ERROR "Could not find install_name_tool, please check your installation.")
ENDIF(NOT CMAKE_INSTALL_NAME_TOOL)
MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL)
ENDIF(APPLE)

@ -0,0 +1,19 @@
# - helper module to find OSX frameworks
IF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
SET(CMAKE_FIND_FRAMEWORKS_INCLUDED 1)
MACRO(CMAKE_FIND_FRAMEWORKS fwk)
SET(${fwk}_FRAMEWORKS)
IF(APPLE)
FOREACH(dir
~/Library/Frameworks/${fwk}.framework
/Library/Frameworks/${fwk}.framework
/System/Library/Frameworks/${fwk}.framework
/Network/Library/Frameworks/${fwk}.framework)
IF(EXISTS ${dir})
SET(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
ENDIF(EXISTS ${dir})
ENDFOREACH(dir)
ENDIF(APPLE)
ENDMACRO(CMAKE_FIND_FRAMEWORKS)
ENDIF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)

@ -0,0 +1,3 @@
SET (CMAKE_MAKE_PROGRAM "wmake" CACHE STRING
"Program used to build from makefiles.")
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

@ -0,0 +1,6 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES xcodebuild
PATHS
/usr/bin
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

@ -0,0 +1,49 @@
# This module defines macros intended for use by cross-compiling
# toolchain files when CMake is not able to automatically detect the
# compiler identification.
#
# Macro CMAKE_FORCE_C_COMPILER has the following signature:
# CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)
# It sets CMAKE_C_COMPILER to the given compiler and the cmake
# internal variable CMAKE_C_COMPILER_ID to the given compiler-id.
# It also bypasses the check for working compiler and basic compiler
# information tests.
#
# Macro CMAKE_FORCE_CXX_COMPILER has the following signature:
# CMAKE_FORCE_CXX_COMPILER(<compiler> <compiler-id>)
# It sets CMAKE_CXX_COMPILER to the given compiler and the cmake
# internal variable CMAKE_CXX_COMPILER_ID to the given compiler-id.
# It also bypasses the check for working compiler and basic compiler
# information tests.
#
# So a simple toolchain file could look like this:
# INCLUDE (CMakeForceCompiler)
# SET(CMAKE_SYSTEM_NAME Generic)
# CMAKE_FORCE_C_COMPILER (chc12 MetrowerksHicross)
# CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross)
MACRO(CMAKE_FORCE_C_COMPILER compiler id)
SET(CMAKE_C_COMPILER "${compiler}")
SET(CMAKE_C_COMPILER_ID_RUN TRUE)
SET(CMAKE_C_COMPILER_ID ${id})
SET(CMAKE_C_COMPILER_WORKS TRUE)
SET(CMAKE_C_COMPILER_FORCED TRUE)
# Set old compiler id variables.
IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCC 1)
ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
ENDMACRO(CMAKE_FORCE_C_COMPILER)
MACRO(CMAKE_FORCE_CXX_COMPILER compiler id)
SET(CMAKE_CXX_COMPILER "${compiler}")
SET(CMAKE_CXX_COMPILER_ID_RUN TRUE)
SET(CMAKE_CXX_COMPILER_ID ${id})
SET(CMAKE_CXX_COMPILER_WORKS TRUE)
SET(CMAKE_CXX_COMPILER_FORCED TRUE)
# Set old compiler id variables.
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCXX 1)
ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
ENDMACRO(CMAKE_FORCE_CXX_COMPILER)

@ -0,0 +1,29 @@
SET(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
SET(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@")
SET(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
SET(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUG77 @CMAKE_COMPILER_IS_GNUG77@)
SET(CMAKE_Fortran_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
SET(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;For;FOR;f95;F95)
SET(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_Fortran_LINKER_PREFERENCE 20)
IF(UNIX)
SET(CMAKE_Fortran_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_Fortran_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)

@ -0,0 +1,78 @@
PROGRAM CMakeFortranCompilerId
! Identify the compiler
#if defined(__INTEL_COMPILER) || defined(__ICC)
PRINT *, 'INFO:compiler[Intel]'
#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
PRINT *, 'INFO:compiler[SunPro]'
#elif defined(__GNUC__)
PRINT *, 'INFO:compiler[GNU]'
#elif defined(__IBM__) || defined(__IBMC__)
PRINT *, 'INFO:compiler[VisualAge]'
#elif defined(_COMPILER_VERSION)
PRINT *, 'INFO:compiler[MIPSpro]'
! This compiler is either not known or is too old to define an
! identification macro. Try to identify the platform and guess that
! it is the native compiler.
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
PRINT *, 'INFO:compiler[VisualAge]'
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
PRINT *, 'INFO:compiler[MIPSpro]'
#elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:compiler[HP]'
#else
PRINT *, 'INFO:compiler[]'
#endif
! Identify the platform
#if defined(__linux) || defined(__linux__) || defined(linux)
PRINT *, 'INFO:platform[Linux]'
#elif defined(__CYGWIN__)
PRINT *, 'INFO:platform[Cygwin]'
#elif defined(__MINGW32__)
PRINT *, 'INFO:platform[MinGW]'
#elif defined(__APPLE__)
PRINT *, 'INFO:platform[Darwin]'
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
PRINT *, 'INFO:platform[Windows]'
#elif defined(__FreeBSD__) || defined(__FreeBSD)
PRINT *, 'INFO:platform[FreeBSD]'
#elif defined(__NetBSD__) || defined(__NetBSD)
PRINT *, 'INFO:platform[NetBSD]'
#elif defined(__OpenBSD__) || defined(__OPENBSD)
PRINT *, 'INFO:platform[OpenBSD]'
#elif defined(__sun) || defined(sun)
PRINT *, 'INFO:platform[SunOS]'
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
PRINT *, 'INFO:platform[AIX]'
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
PRINT *, 'INFO:platform[IRIX]'
#elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:platform[HP-UX]'
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
PRINT *, 'INFO:platform[BeOS]'
#elif defined(__QNX__) || defined(__QNXNTO__)
PRINT *, 'INFO:platform[QNX]'
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
PRINT *, 'INFO:platform[Tru64]'
#elif defined(__riscos) || defined(__riscos__)
PRINT *, 'INFO:platform[RISCos]'
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
PRINT *, 'INFO:platform[SINIX]'
#elif defined(__UNIX_SV__)
PRINT *, 'INFO:platform[UNIX_SV]'
#elif defined(__bsdos__)
PRINT *, 'INFO:platform[BSDOS]'
#elif defined(_MPRAS) || defined(MPRAS)
PRINT *, 'INFO:platform[MP-RAS]'
#elif defined(__osf) || defined(__osf__)
PRINT *, 'INFO:platform[OSF1]'
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
PRINT *, 'INFO:platform[SCO_SV]'
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
PRINT *, 'INFO:platform[ULTRIX]'
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
PRINT *, 'INFO:platform[Xenix]'
#else
PRINT *, 'INFO:platform[]'
#endif
END PROGRAM

@ -0,0 +1,182 @@
# This file sets the basic flags for the Fortran language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUG77)
SET(CMAKE_BASE_NAME g77)
ENDIF(CMAKE_COMPILER_IS_GNUG77)
IF(CMAKE_Fortran_COMPILER_ID)
IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
SET(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER_ID}-Fortran)
ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
ENDIF(CMAKE_Fortran_COMPILER_ID)
SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
# But, it should still be after the platform file so changes can
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
# Fortran needs cmake to do a requires step during its build process to
# catch any modules
SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
# Create a set of shared library variable specific to Fortran
# For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version
IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
# repeat for modules
IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
IF(NOT CMAKE_INCLUDE_FLAG_Fortran)
SET(CMAKE_INCLUDE_FLAG_Fortran ${CMAKE_INCLUDE_FLAG_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_Fortran)
IF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
SET(CMAKE_INCLUDE_FLAG_SEP_Fortran ${CMAKE_INCLUDE_FLAG_SEP_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
SET(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
IF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
SET(CMAKE_Fortran_FLAGS_INIT)
ENDIF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
INCLUDE(CMakeCommonLanguageInclude)
# now define the following rule variables
# CMAKE_Fortran_CREATE_SHARED_LIBRARY
# CMAKE_Fortran_CREATE_SHARED_MODULE
# CMAKE_Fortran_CREATE_STATIC_LIBRARY
# CMAKE_Fortran_COMPILE_OBJECT
# CMAKE_Fortran_LINK_EXECUTABLE
# create a Fortran shared library
IF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
# create a Fortran shared module just copy the shared library rule
IF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
# create a Fortran static library
IF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
ENDIF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
# compile a Fortran file into an object file
IF(NOT CMAKE_Fortran_COMPILE_OBJECT)
SET(CMAKE_Fortran_COMPILE_OBJECT
"<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT)
# link a fortran program
IF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
SET(CMAKE_Fortran_LINK_EXECUTABLE
"<CMAKE_Fortran_COMPILER> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
IF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
SET(CMAKE_Fortran_STANDARD_LIBRARIES "${CMAKE_Fortran_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all Fortran applications.")
MARK_AS_ADVANCED(CMAKE_Fortran_STANDARD_LIBRARIES)
ENDIF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
SET (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
SET (CMAKE_Fortran_FLAGS_MINSIZEREL "${CMAKE_Fortran_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
SET (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
MARK_AS_ADVANCED(
CMAKE_Fortran_FLAGS
CMAKE_Fortran_FLAGS_DEBUG
CMAKE_Fortran_FLAGS_MINSIZEREL
CMAKE_Fortran_FLAGS_RELEASE
CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
# set this variable so we can avoid loading this more than once.
SET(CMAKE_Fortran_INFORMATION_LOADED 1)

@ -0,0 +1,80 @@
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
SET(CMAKE_INCLUDE_FLAG_C "-I") # -I
SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty
SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LIBRARY_PATH_TERMINATOR "") # for the Digital Mars D compiler the link paths have to be terminated with a "/"
SET(CMAKE_LINK_LIBRARY_FLAG "-l")
SET(CMAKE_LINK_LIBRARY_SUFFIX "")
SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
SET(CMAKE_DL_LIBS "dl")
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
# basically all general purpose OSs support shared libs
SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when using shared libraries.")
SET(CMAKE_INIT_VALUE FALSE)
IF(CMAKE_GENERATOR MATCHES "KDevelop3")
SET(CMAKE_INIT_VALUE TRUE)
ENDIF(CMAKE_GENERATOR MATCHES "KDevelop3")
SET(CMAKE_VERBOSE_MAKEFILE ${CMAKE_INIT_VALUE} CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
"Enable/Disable color output during build."
)
MARK_AS_ADVANCED(CMAKE_COLOR_MAKEFILE)
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
# Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
# was initialized by the block below. This is useful for user
# projects to change the default prefix while still allowing the
# command line to override it.
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
# Choose a default install prefix for this platform.
IF(CMAKE_HOST_UNIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local"
CACHE PATH "Install path prefix, prepended onto install directories.")
ELSE(CMAKE_HOST_UNIX)
IF("$ENV{ProgramFiles}" MATCHES "^$")
IF("$ENV{SystemDrive}" MATCHES "^$")
SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files")
ELSE("$ENV{SystemDrive}" MATCHES "^$")
SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{SystemDrive}/Program Files")
ENDIF("$ENV{SystemDrive}" MATCHES "^$")
ELSE("$ENV{ProgramFiles}" MATCHES "^$")
SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{ProgramFiles}")
ENDIF("$ENV{ProgramFiles}" MATCHES "^$")
SET(CMAKE_INSTALL_PREFIX
"${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
CACHE PATH "Install path prefix, prepended onto install directories.")
SET(CMAKE_GENERIC_PROGRAM_FILES)
# Make sure the prefix uses forward slashes.
STRING(REGEX REPLACE "\\\\" "/"
CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
ENDIF(CMAKE_HOST_UNIX)
MARK_AS_ADVANCED(
CMAKE_SKIP_RPATH
CMAKE_VERBOSE_MAKEFILE
)
# always include the gcc compiler information
INCLUDE(Platform/gcc)

@ -0,0 +1,250 @@
# - import build settings from another project
# CMAKE_IMPORT_BUILD_SETTINGS(SETTINGS_FILE)
# macro defined to import the build settings from another project.
# SETTINGS_FILE is a file created by the other project's call to the
# CMAKE_EXPORT_BUILD_SETTINGS macro, see CMakeExportBuildSettings.
MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
IF(${SETTINGS_FILE} MATCHES ".+")
# Load the settings.
INCLUDE(${SETTINGS_FILE})
# Check the CMake version that stored the settings.
IF(${CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION}.${CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION}
GREATER ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
MESSAGE(SEND_ERROR
"${CMAKE_BUILD_SETTING_PROJECT_NAME} was built using CMake "
"${CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION}.${CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION}, "
"but this is CMake${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}. "
"Please upgrade CMake to a more recent version.")
ENDIF(${CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION}.${CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION}
GREATER ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
# Check the build tool.
SET(CMAKE_BUILD_TOOL1 "")
IF(CMAKE_BUILD_TOOL)
GET_FILENAME_COMPONENT (CMAKE_BUILD_TOOL1 ${CMAKE_BUILD_TOOL} NAME_WE)
STRING(TOLOWER ${CMAKE_BUILD_TOOL1} CMAKE_BUILD_TOOL1)
ENDIF(CMAKE_BUILD_TOOL)
SET(CMAKE_BUILD_TOOL2 "")
IF(CMAKE_BUILD_SETTING_BUILD_TOOL)
GET_FILENAME_COMPONENT (CMAKE_BUILD_TOOL2 ${CMAKE_BUILD_SETTING_BUILD_TOOL} NAME_WE)
STRING(TOLOWER ${CMAKE_BUILD_TOOL2} CMAKE_BUILD_TOOL2)
ENDIF(CMAKE_BUILD_SETTING_BUILD_TOOL)
STRING(COMPARE NOTEQUAL "x${CMAKE_BUILD_TOOL1}" "x${CMAKE_BUILD_TOOL2}"
CMAKE_BUILD_TOOL_MISMATCH)
IF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^msdev$")
SET(CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO 1)
ENDIF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^msdev$")
IF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^devenv$")
SET(CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO 1)
ENDIF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^devenv$")
# Check the C++ compiler setting. If it is empty, the imported
# project is not a C++ project, and doesn't need a matching compiler.
IF(CMAKE_BUILD_SETTING_CXX_COMPILER)
IF(WIN32)
STRING(TOLOWER "x${CMAKE_CXX_COMPILER}" COMPARE_CXX_LOCAL)
STRING(TOLOWER "x${CMAKE_BUILD_SETTING_CXX_COMPILER}" COMPARE_CXX_REMOTE)
STRING(COMPARE NOTEQUAL "${COMPARE_CXX_LOCAL}" "${COMPARE_CXX_REMOTE}"
CMAKE_CXX_COMPILER_MISMATCH)
ELSE(WIN32)
STRING(COMPARE NOTEQUAL
"x${CMAKE_CXX_COMPILER}" "x${CMAKE_BUILD_SETTING_CXX_COMPILER}"
CMAKE_CXX_COMPILER_MISMATCH)
ENDIF(WIN32)
ENDIF(CMAKE_BUILD_SETTING_CXX_COMPILER)
# Check the C build variation flags.
STRING(COMPARE NOTEQUAL
"x${CMAKE_C_FLAGS_DEBUG}" "x${CMAKE_BUILD_SETTING_C_FLAGS_DEBUG}"
CMAKE_C_FLAGS_DEBUG_MISMATCH)
STRING(COMPARE NOTEQUAL
"x${CMAKE_C_FLAGS_RELEASE}" "x${CMAKE_BUILD_SETTING_C_FLAGS_RELEASE}"
CMAKE_C_FLAGS_RELEASE_MISMATCH)
STRING(COMPARE NOTEQUAL
"x${CMAKE_C_FLAGS_MINSIZEREL}" "x${CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL}"
CMAKE_C_FLAGS_MINSIZEREL_MISMATCH)
STRING(COMPARE NOTEQUAL
"x${CMAKE_C_FLAGS_RELWITHDEBINFO}" "x${CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO}"
CMAKE_C_FLAGS_RELWITHDEBINFO_MISMATCH)
# Check the C++ build variation flags.
STRING(COMPARE NOTEQUAL
"x${CMAKE_CXX_FLAGS_DEBUG}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG}"
CMAKE_CXX_FLAGS_DEBUG_MISMATCH)
STRING(COMPARE NOTEQUAL
"x${CMAKE_CXX_FLAGS_RELEASE}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE}"
CMAKE_CXX_FLAGS_RELEASE_MISMATCH)
STRING(COMPARE NOTEQUAL
"x${CMAKE_CXX_FLAGS_MINSIZEREL}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL}"
CMAKE_CXX_FLAGS_MINSIZEREL_MISMATCH)
STRING(COMPARE NOTEQUAL
"x${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO}"
CMAKE_CXX_FLAGS_RELWITHDEBINFO_MISMATCH)
# Check the build type.
SET(CMAKE_BUILD_TYPE_MISMATCH 0)
IF(WIN32)
IF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO)
STRING(COMPARE NOTEQUAL
"x${CMAKE_BUILD_TYPE}" "x${CMAKE_BUILD_SETTING_BUILD_TYPE}"
CMAKE_BUILD_TYPE_MISMATCH)
ENDIF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO)
ENDIF(WIN32)
# Build tool must match on Windows.
IF(WIN32)
IF(CMAKE_BUILD_TOOL_MISMATCH)
MESSAGE(SEND_ERROR
"This project, ${PROJECT_NAME}, depends on the project "
"${CMAKE_BUILD_SETTING_PROJECT_NAME}. Unfortunately "
"${CMAKE_BUILD_SETTING_PROJECT_NAME} was built using "
"\"${CMAKE_BUILD_TOOL2}\", but you are trying to build "
"${PROJECT_NAME} using \"${CMAKE_BUILD_TOOL1}\"."
"In order for this build to succeed, both projects must be "
"built with the same Generator. To change the Generator you "
"are using for the project ${PROJECT_NAME}, you must "
"delete the cache, and then rerun cmake and this "
"time select the same Generator that was used to build "
"${CMAKE_BUILD_SETTING_PROJECT_NAME}. If "
"${CMAKE_BUILD_SETTING_PROJECT_NAME} was built using a "
"generator that you do not have (for example it was built "
"with Visual Studio 6 and you only have 7) then you will "
"need to select a different version of "
"${CMAKE_BUILD_SETTING_PROJECT_NAME} or rebuild "
"${CMAKE_BUILD_SETTING_PROJECT_NAME} with the correct "
"generator. ")
ENDIF(CMAKE_BUILD_TOOL_MISMATCH)
ENDIF(WIN32)
# Enforce the C++ compiler setting.
# CMAKE_OVERRIDE_COMPILER_MISMATCH allow advanced user to override cmake detection of
# compiler mismatch between imported projects. Typical case on UNIX could be:
# 1. Compile a project with g++-3.3 while the imported project was configured
# using the 'c++' alias (which at the time meant g++-3.3)
# 2. This variable also becomes handy when the project your are importing has been
# compiled with a compiler you do not have access to, but offer a compatible ABI with
# yours.
# WARNING: Do not use this variable with C++ compiler with incompatible ABI
IF(CMAKE_CXX_COMPILER_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_CXX_COMPILER to "
"\"${CMAKE_BUILD_SETTING_CXX_COMPILER}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. This is required "
"because C++ projects must use the same compiler. "
"If this message appears for more than one imported project, "
"you have conflicting C++ compilers and will have to "
"re-build one of those projects. Was set to ${CMAKE_CXX_COMPILER}")
SET(CMAKE_CXX_COMPILER ${CMAKE_BUILD_SETTING_CXX_COMPILER}
CACHE STRING "C++ compiler imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_CXX_COMPILER_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
# Enforce the build type.
IF(CMAKE_BUILD_TYPE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_BUILD_TYPE to "
"\"${CMAKE_BUILD_SETTING_BUILD_TYPE}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. This is required "
"because projects must use the same compiler settings. "
"If this message appears for more than one imported project, "
"you have conflicting compiler settings and will have to "
"re-build one of those projects.")
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_SETTING_BUILD_TYPE}
CACHE STRING "Build type imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_BUILD_TYPE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
# Enforce the C build variation flags.
IF(CMAKE_C_FLAGS_DEBUG_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_C_FLAGS_DEBUG to "
"\"${CMAKE_BUILD_SETTING_C_FLAGS_DEBUG}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. "
"If this message appears for more than one imported project, "
"you have conflicting options and will have to "
"re-build one of those projects.")
SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_BUILD_SETTING_C_FLAGS_DEBUG}
CACHE STRING "C DEBUG flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_C_FLAGS_DEBUG_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
IF(CMAKE_C_FLAGS_RELEASE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_C_FLAGS_RELEASE to "
"\"${CMAKE_BUILD_SETTING_C_FLAGS_RELEASE}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. "
"If this message appears for more than one imported project, "
"you have conflicting options and will have to "
"re-build one of those projects.")
SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_BUILD_SETTING_C_FLAGS_RELEASE}
CACHE STRING "C RELEASE flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_C_FLAGS_RELEASE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
IF(CMAKE_C_FLAGS_MINSIZEREL_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_C_FLAGS_MINSIZEREL to "
"\"${CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. "
"If this message appears for more than one imported project, "
"you have conflicting options and will have to "
"re-build one of those projects.")
SET(CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL}
CACHE STRING "C MINSIZEREL flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_C_FLAGS_MINSIZEREL_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
IF(CMAKE_C_FLAGS_RELWITHDEBINFO_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_C_FLAGS_RELWITHDEBINFO to "
"\"${CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. "
"If this message appears for more than one imported project, "
"you have conflicting options and will have to "
"re-build one of those projects.")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO}
CACHE STRING "C RELWITHDEBINFO flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_C_FLAGS_RELWITHDEBINFO_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
# Enforce the C++ build variation flags.
IF(CMAKE_CXX_FLAGS_DEBUG_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_CXX_FLAGS_DEBUG to "
"\"${CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. "
"If this message appears for more than one imported project, "
"you have conflicting options and will have to "
"re-build one of those projects.")
SET(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG}
CACHE STRING "C++ DEBUG flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_CXX_FLAGS_DEBUG_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
IF(CMAKE_CXX_FLAGS_RELEASE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_CXX_FLAGS_RELEASE to "
"\"${CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. "
"If this message appears for more than one imported project, "
"you have conflicting options and will have to "
"re-build one of those projects.")
SET(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE}
CACHE STRING "C++ RELEASE flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_CXX_FLAGS_RELEASE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
IF(CMAKE_CXX_FLAGS_MINSIZEREL_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_CXX_FLAGS_MINSIZEREL to "
"\"${CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. "
"If this message appears for more than one imported project, "
"you have conflicting options and will have to "
"re-build one of those projects.")
SET(CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL}
CACHE STRING "C++ MINSIZEREL flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_CXX_FLAGS_MINSIZEREL_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
MESSAGE("Warning: CMake is forcing CMAKE_CXX_FLAGS_RELWITHDEBINFO to "
"\"${CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO}\" to match that imported "
"from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. "
"If this message appears for more than one imported project, "
"you have conflicting options and will have to "
"re-build one of those projects.")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO}
CACHE STRING "C++ RELWITHDEBINFO flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE)
ENDIF(CMAKE_CXX_FLAGS_RELWITHDEBINFO_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH)
ELSE(${SETTINGS_FILE} MATCHES ".+")
MESSAGE(SEND_ERROR "CMAKE_IMPORT_BUILD_SETTINGS called with no argument.")
ENDIF(${SETTINGS_FILE} MATCHES ".+")
ENDMACRO(CMAKE_IMPORT_BUILD_SETTINGS)

@ -0,0 +1,13 @@
SET(CMAKE_Java_COMPILER "@CMAKE_Java_COMPILER@")
SET(CMAKE_Java_COMPILER_ARG1 "@CMAKE_Java_COMPILER_ARG1@")
SET(CMAKE_Java_RUNTIME "@CMAKE_Java_RUNTIME@")
SET(CMAKE_Java_ARCHIVE "@CMAKE_Java_ARCHIVE@")
SET(CMAKE_Java_COMPILER_LOADED 1)
SET(CMAKE_Java_SOURCE_FILE_EXTENSIONS java)
SET(CMAKE_Java_LINKER_PREFERENCE 40)
SET(CMAKE_Java_OUTPUT_EXTENSION .class)
SET(CMAKE_Java_OUTPUT_EXTENSION_REPLACE 1)
SET(CMAKE_STATIC_LIBRARY_PREFIX_Java "")
SET(CMAKE_STATIC_LIBRARY_SUFFIX_Java ".jar")
SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")

@ -0,0 +1,41 @@
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
# But, it should still be after the platform file so changes can
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
# this is a place holder if java needed flags for javac they would go here.
IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
# IF(WIN32)
# SET(class_files_mask "*.class")
# ELSE(WIN32)
SET(class_files_mask ".")
# ENDIF(WIN32)
SET(CMAKE_Java_CREATE_STATIC_LIBRARY
"<CMAKE_Java_ARCHIVE> -cf <TARGET> -C <OBJECT_DIR> ${class_files_mask}")
# "${class_files_mask}" should really be "<OBJECTS>" but compling a *.java
# file can create more than one *.class file...
ENDIF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
# compile a Java file into an object file
IF(NOT CMAKE_Java_COMPILE_OBJECT)
SET(CMAKE_Java_COMPILE_OBJECT
"<CMAKE_Java_COMPILER> <FLAGS> <SOURCE> -d <OBJECT_DIR>")
ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)
# set java include flag option and the separator for multiple include paths
SET(CMAKE_INCLUDE_FLAG_Java "-classpath ")
IF(WIN32 AND NOT CYGWIN)
SET(CMAKE_INCLUDE_FLAG_SEP_Java ";")
ELSE(WIN32 AND NOT CYGWIN)
SET(CMAKE_INCLUDE_FLAG_SEP_Java ":")
ENDIF(WIN32 AND NOT CYGWIN)

@ -0,0 +1,12 @@
# just install the modules
# new file added, force rerunning cmake
SUBDIRS(Platform)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cmake$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cpp$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cxx$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.in$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.c$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.h$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.F90$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules readme\\.txt$)

@ -0,0 +1,6 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM make
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS-1.0_is1;Inno Setup: App Path]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
c:/msys/1.0/bin /msys/1.0/bin)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

@ -0,0 +1,10 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
c:/MinGW/bin /MinGW/bin)
FIND_PROGRAM(CMAKE_SH sh.exe )
IF(CMAKE_SH)
MESSAGE(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n")
SET(CMAKE_MAKE_PROGRAM NOTFOUND)
ENDIF(CMAKE_SH)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM CMAKE_SH)

@ -0,0 +1,3 @@
SET (CMAKE_MAKE_PROGRAM "nmake" CACHE STRING
"Program used to build from makefiles.")
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

@ -0,0 +1,83 @@
/* Identify known platforms by name. */
#if defined(__linux) || defined(__linux__) || defined(linux)
# define PLATFORM_ID "Linux"
#elif defined(__CYGWIN__)
# define PLATFORM_ID "Cygwin"
#elif defined(__MINGW32__)
# define PLATFORM_ID "MinGW"
#elif defined(__APPLE__)
# define PLATFORM_ID "Darwin"
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
# define PLATFORM_ID "Windows"
#elif defined(__FreeBSD__) || defined(__FreeBSD)
# define PLATFORM_ID "FreeBSD"
#elif defined(__NetBSD__) || defined(__NetBSD)
# define PLATFORM_ID "NetBSD"
#elif defined(__OpenBSD__) || defined(__OPENBSD)
# define PLATFORM_ID "OpenBSD"
#elif defined(__sun) || defined(sun)
# define PLATFORM_ID "SunOS"
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
# define PLATFORM_ID "AIX"
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
# define PLATFORM_ID "IRIX"
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
#elif defined(__QNX__) || defined(__QNXNTO__)
# define PLATFORM_ID "QNX"
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
# define PLATFORM_ID "Tru64"
#elif defined(__riscos) || defined(__riscos__)
# define PLATFORM_ID "RISCos"
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
# define PLATFORM_ID "SINIX"
#elif defined(__UNIX_SV__)
# define PLATFORM_ID "UNIX_SV"
#elif defined(__bsdos__)
# define PLATFORM_ID "BSDOS"
#elif defined(_MPRAS) || defined(MPRAS)
# define PLATFORM_ID "MP-RAS"
#elif defined(__osf) || defined(__osf__)
# define PLATFORM_ID "OSF1"
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
# define PLATFORM_ID "SCO_SV"
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
# define PLATFORM_ID "ULTRIX"
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
# define PLATFORM_ID "Xenix"
#else /* unknown platform */
# define PLATFORM_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";

@ -0,0 +1,33 @@
# - print system information
# This file can be used for diagnostic purposes
# just include it in a project to see various internal CMake
# variables.
MESSAGE("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
MESSAGE("CMAKE_SYSTEM file is ${CMAKE_SYSTEM_INFO_FILE}")
MESSAGE("CMAKE_C_COMPILER is ${CMAKE_C_COMPILER}")
MESSAGE("CMAKE_CXX_COMPILER is ${CMAKE_CXX_COMPILER}")
MESSAGE("CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
MESSAGE("CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
MESSAGE("CMAKE_DL_LIBS is ${CMAKE_DL_LIBS}")
MESSAGE("CMAKE_SHARED_LIBRARY_PREFIX is ${CMAKE_SHARED_LIBRARY_PREFIX}")
MESSAGE("CMAKE_SHARED_LIBRARY_SUFFIX is ${CMAKE_SHARED_LIBRARY_SUFFIX}")
MESSAGE("CMAKE_COMPILER_IS_GNUGCC = ${CMAKE_COMPILER_IS_GNUGCC}")
MESSAGE("CMAKE_COMPILER_IS_GNUCXX = ${CMAKE_COMPILER_IS_GNUCXX}")
MESSAGE("CMAKE_CXX_CREATE_SHARED_LIBRARY is ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
MESSAGE("CMAKE_CXX_CREATE_SHARED_MODULE is ${CMAKE_CXX_CREATE_SHARED_MODULE}")
MESSAGE("CMAKE_CXX_CREATE_STATIC_LIBRARY is ${CMAKE_CXX_CREATE_STATIC_LIBRARY}")
MESSAGE("CMAKE_CXX_COMPILE_OBJECT is ${CMAKE_CXX_COMPILE_OBJECT}")
MESSAGE("CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_CXX_LINK_EXECUTABLE}")
MESSAGE("CMAKE_C_CREATE_SHARED_LIBRARY is ${CMAKE_C_CREATE_SHARED_LIBRARY}")
MESSAGE("CMAKE_C_CREATE_SHARED_MODULE is ${CMAKE_C_CREATE_SHARED_MODULE}")
MESSAGE("CMAKE_C_CREATE_STATIC_LIBRARY is ${CMAKE_C_CREATE_STATIC_LIBRARY}")
MESSAGE("CMAKE_C_COMPILE_OBJECT is ${CMAKE_C_COMPILE_OBJECT}")
MESSAGE("CMAKE_C_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE}")
MESSAGE("CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE ${CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE}")
MESSAGE("CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE ${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE}")

@ -0,0 +1,6 @@
SET(CMAKE_RC_COMPILER "@CMAKE_RC_COMPILER@")
SET(CMAKE_RC_COMPILER_ARG1 "@CMAKE_RC_COMPILER_ARG1@")
SET(CMAKE_RC_COMPILER_LOADED 1)
SET(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc)
SET(CMAKE_RC_OUTPUT_EXTENSION .res)
SET(CMAKE_RC_COMPILER_ENV_VAR "RC")

@ -0,0 +1,33 @@
# This file sets the basic flags for the Fortran language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
# These are the only types of flags that should be passed to the rc
# command, if COMPILE_FLAGS is used on a target this will be used
# to filter out any other flags
SET(CMAKE_RC_FLAG_REGEX "^[-/](D|I)")
# now define the following rule variables
# CMAKE_RC_COMPILE_OBJECT
SET(CMAKE_INCLUDE_FLAG_RC "-I")
# compile a Resource file into an object file
IF(NOT CMAKE_RC_COMPILE_OBJECT)
SET(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> <FLAGS> /fo<OBJECT> <SOURCE>")
ENDIF(NOT CMAKE_RC_COMPILE_OBJECT)
MARK_AS_ADVANCED(
CMAKE_RC_FLAGS
)
# set this variable so we can avoid loading this more than once.
SET(CMAKE_RC_INFORMATION_LOADED 1)

@ -0,0 +1,15 @@
@INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED@
SET(CMAKE_SYSTEM "@CMAKE_SYSTEM@")
SET(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@")
SET(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@")
SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@")
SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
SET(CMAKE_HOST_SYSTEM_NAME "@CMAKE_HOST_SYSTEM_NAME@")
SET(CMAKE_HOST_SYSTEM_VERSION "@CMAKE_HOST_SYSTEM_VERSION@")
SET(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@")
SET(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@")
SET(CMAKE_SYSTEM_LOADED 1)

@ -0,0 +1,50 @@
# This file is included by cmGlobalGenerator::EnableLanguage.
# It is included after the compiler has been determined, so
# we know things like the compiler name and if the compiler is gnu.
# before cmake 2.6 these variables were set in cmMakefile.cxx. This is still
# done to keep scripts and custom language and compiler modules working.
# But they are reset here and set again in the platform files for the target
# platform, so they can be used for testing the target platform instead
# of testing the host platform.
SET(APPLE )
SET(UNIX )
SET(CYGWIN )
SET(WIN32 )
# include Generic system information
INCLUDE(CMakeGenericSystem)
# 2. now include SystemName.cmake file to set the system specific information
SET(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
INCLUDE(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
IF(NOT _INCLUDED_SYSTEM_INFO_FILE)
MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
" to use this system, please send your config file to "
"cmake@www.cmake.org so it can be added to cmake")
IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt
${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
MESSAGE("You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
"Please send that file to cmake@www.cmake.org.")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE)
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
# this has to be done after the system information has been loaded
IF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
SET(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)

@ -0,0 +1,9 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected ASM-ATT compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
SET(ASM_DIALECT "-ATT")
INCLUDE(CMakeTestASMCompiler)
SET(ASM_DIALECT)

@ -0,0 +1,11 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected ASM compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 1 CACHE INTERNAL "")
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 0 CACHE INTERNAL "")
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER)

@ -0,0 +1,59 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected C compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
IF(NOT CMAKE_C_COMPILER_WORKS)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER}")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
"#ifdef __cplusplus\n"
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
"#endif\n"
"#if defined(__CLASSIC_C__)\n"
"int main(argc, argv)\n"
" int argc;\n"
" char* argv[];\n"
"#else\n"
"int main(int argc, char* argv[])\n"
"#endif\n"
"{ return argc-1;}\n")
TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
OUTPUT_VARIABLE OUTPUT)
SET(C_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
IF(NOT CMAKE_C_COMPILER_WORKS)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- broken")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the C compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
ELSE(NOT CMAKE_C_COMPILER_WORKS)
IF(C_TEST_WAS_RUN)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(C_TEST_WAS_RUN)
SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
IF(CMAKE_C_COMPILER_FORCED)
# The compiler configuration was forced by the user.
# Assume the user has configured all compiler information.
ELSE(CMAKE_C_COMPILER_FORCED)
# Try to identify the ABI and configure it into CMakeCCompiler.cmake
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c)
CONFIGURE_FILE(
${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
ENDIF(CMAKE_C_COMPILER_FORCED)
ENDIF(NOT CMAKE_C_COMPILER_WORKS)

@ -0,0 +1,51 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected C++ compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
IF(NOT CMAKE_CXX_COMPILER_WORKS)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER}")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
"#ifndef __cplusplus\n"
"# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
"#endif\n"
"int main(){return 0;}\n")
TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
OUTPUT_VARIABLE OUTPUT)
SET(CXX_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
IF(NOT CMAKE_CXX_COMPILER_WORKS)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- broken")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
IF(CXX_TEST_WAS_RUN)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(CXX_TEST_WAS_RUN)
SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
IF(CMAKE_CXX_COMPILER_FORCED)
# The compiler configuration was forced by the user.
# Assume the user has configured all compiler information.
ELSE(CMAKE_CXX_COMPILER_FORCED)
# Try to identify the ABI and configure it into CMakeCXXCompiler.cmake
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(CXX ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp)
CONFIGURE_FILE(
${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
ENDIF(CMAKE_CXX_COMPILER_FORCED)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)

@ -0,0 +1,3 @@
#include<iostream>
int main(){return 0;}

@ -0,0 +1,66 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected Fortran compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER}")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "
PROGRAM TESTFortran
PRINT *, 'Hello'
END
")
TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
OUTPUT_VARIABLE OUTPUT)
SET(FORTRAN_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- broken")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
MESSAGE(FATAL_ERROR "The Fortran compiler \"${CMAKE_Fortran_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
IF(FORTRAN_TEST_WAS_RUN)
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(FORTRAN_TEST_WAS_RUN)
SET(CMAKE_Fortran_COMPILER_WORKS 1 CACHE INTERNAL "")
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
IF(CMAKE_Fortran_COMPILER_WORKS)
# Test for Fortran 90 support by using an f90-specific construct.
IF(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
ELSE(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
PROGRAM TESTFortran90
stop = 1 ; do while ( stop .eq. 0 ) ; end do
END PROGRAM TESTFortran90
")
TRY_COMPILE(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90
OUTPUT_VARIABLE OUTPUT)
IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler supports Fortran 90 passed with "
"the following output:\n${OUTPUT}\n\n")
SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1 CACHE INTERNAL "")
ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran compiler supports Fortran 90 failed with "
"the following output:\n${OUTPUT}\n\n")
SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0 CACHE INTERNAL "")
ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
ENDIF(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
ENDIF(CMAKE_Fortran_COMPILER_WORKS)

@ -0,0 +1,9 @@
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
void THIS_IS_GNU();
#endif
#ifdef __MINGW32__
void THIS_IS_MINGW();
#endif
#ifdef __CYGWIN__
void THIS_IS_CYGWIN();
#endif

@ -0,0 +1,7 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected Fortran compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
SET(CMAKE_Java_COMPILER_WORKS 1 CACHE INTERNAL "")

@ -0,0 +1,2 @@
VERSION=_MSC_VER

@ -0,0 +1,10 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected RC compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
# For now there is no way to do a try compile on just a .rc file
# so just do nothing in here.
SET(CMAKE_RC_COMPILER_WORKS 1 CACHE INTERNAL "")

@ -0,0 +1,2 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

@ -0,0 +1,13 @@
# hard code these for fast backwards compatibility tests
SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
"Does the compiler support ansi for scope.")
SET (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.")
SET (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes")

@ -0,0 +1,10 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES msdev
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin
"c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
"c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
"/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC60 1)

@ -0,0 +1,11 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VS;EnvironmentDirectory]
"$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE"
"c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE"
"c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
"/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC71 1)

@ -0,0 +1,13 @@
# hard code these for fast backwards compatibility tests
SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
"Does the compiler support ansi for scope.")
SET (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.")
SET (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes")

@ -0,0 +1,10 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VS;EnvironmentDirectory]
"c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE"
"c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
"/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC70 1)

@ -0,0 +1,16 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES VCExpress devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VS;EnvironmentDirectory]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup;Dbghelp_path]
"$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio 8/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio8/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 8/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio8/Common7/IDE"
"/Program Files/Microsoft Visual Studio 8/Common7/IDE/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC80 1)
SET(MSVC_VERSION 1400)

@ -0,0 +1,16 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES VCExpress devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS;EnvironmentDirectory]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup;Dbghelp_path]
"$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio 9/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio9/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 9/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio9/Common7/IDE"
"/Program Files/Microsoft Visual Studio 9/Common7/IDE/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC90 1)
SET(MSVC_VERSION 1500)

@ -0,0 +1,22 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Binary file not shown.

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.4">
<dict>
<key>IFPkgDescriptionTitle</key>
<string>@CPACK_PACKAGE_NAME@</string>
<key>IFPkgDescriptionVersion</key>
<string>@CPACK_PACKAGE_VERSION@</string>
<key>IFPkgDescriptionDescription</key>
<string>@CPACK_PACKAGE_DESCRIPTION@</string>
</dict>
</plist>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save