Commit dc1d2189 authored by Brad King's avatar Brad King

CMake 2.8.1-rc1

parent 612409e5
...@@ -20,6 +20,8 @@ MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) ...@@ -20,6 +20,8 @@ MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# Allow empty endif() and such with CMake 2.4. # Allow empty endif() and such with CMake 2.4.
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1) SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1)
SET(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
# Since the built CMake will install itself instead of the # Since the built CMake will install itself instead of the
# generating CMake, tell it that the install rules were generated # generating CMake, tell it that the install rules were generated
...@@ -27,6 +29,17 @@ IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) ...@@ -27,6 +29,17 @@ IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
INSTALL(CODE "SET(CMAKE_INSTALL_SELF_2_4 1)") INSTALL(CODE "SET(CMAKE_INSTALL_SELF_2_4 1)")
ENDIF() ENDIF()
IF("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
# Disallow architecture-specific try_run. It may not run on the host.
MACRO(TRY_RUN)
IF(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
MESSAGE(FATAL_ERROR "TRY_RUN not allowed with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES=[${CMAKE_TRY_COMPILE_OSX_ARCHITECTURES}]")
ELSE()
_TRY_RUN(${ARGV})
ENDIF()
ENDMACRO()
ENDIF()
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# a macro to deal with system libraries, implemented as a macro # a macro to deal with system libraries, implemented as a macro
# simply to improve readability of the main script # simply to improve readability of the main script
...@@ -139,9 +152,9 @@ MACRO(CMAKE_SETUP_TESTING) ...@@ -139,9 +152,9 @@ MACRO(CMAKE_SETUP_TESTING)
# the ctest from this cmake is used for testing # the ctest from this cmake is used for testing
# and not the ctest from the cmake building and testing # and not the ctest from the cmake building and testing
# cmake. # cmake.
SET(CMAKE_CTEST_COMMAND "${EXECUTABLE_OUTPUT_PATH}/ctest") SET(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest")
SET(CMAKE_CMAKE_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cmake") SET(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake")
SET(CMAKE_CPACK_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cpack") SET(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack")
ENDIF(BUILD_TESTING) ENDIF(BUILD_TESTING)
# configure some files for testing # configure some files for testing
...@@ -183,7 +196,7 @@ MACRO (CMAKE_BUILD_UTILITIES) ...@@ -183,7 +196,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
SET(KWSYS_USE_CommandLineArguments 1) SET(KWSYS_USE_CommandLineArguments 1)
SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source) SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
SET(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}") SET(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}")
SUBDIRS(Source/kwsys) ADD_SUBDIRECTORY(Source/kwsys)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Setup third-party libraries. # Setup third-party libraries.
...@@ -212,7 +225,7 @@ MACRO (CMAKE_BUILD_UTILITIES) ...@@ -212,7 +225,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
ELSE(CMAKE_USE_SYSTEM_ZLIB) ELSE(CMAKE_USE_SYSTEM_ZLIB)
SET(CMAKE_ZLIB_INCLUDES) SET(CMAKE_ZLIB_INCLUDES)
SET(CMAKE_ZLIB_LIBRARIES cmzlib) SET(CMAKE_ZLIB_LIBRARIES cmzlib)
SUBDIRS(Utilities/cmzlib) ADD_SUBDIRECTORY(Utilities/cmzlib)
ENDIF(CMAKE_USE_SYSTEM_ZLIB) ENDIF(CMAKE_USE_SYSTEM_ZLIB)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
...@@ -235,7 +248,7 @@ MACRO (CMAKE_BUILD_UTILITIES) ...@@ -235,7 +248,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
ENDIF(NOT CMAKE_BUILD_CURL_SHARED) ENDIF(NOT CMAKE_BUILD_CURL_SHARED)
SET(CMAKE_CURL_INCLUDES) SET(CMAKE_CURL_INCLUDES)
SET(CMAKE_CURL_LIBRARIES cmcurl) SET(CMAKE_CURL_LIBRARIES cmcurl)
SUBDIRS(Utilities/cmcurl) ADD_SUBDIRECTORY(Utilities/cmcurl)
ENDIF(CMAKE_USE_SYSTEM_CURL) ENDIF(CMAKE_USE_SYSTEM_CURL)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
...@@ -252,7 +265,7 @@ MACRO (CMAKE_BUILD_UTILITIES) ...@@ -252,7 +265,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
SET(CMAKE_COMPRESS_INCLUDES SET(CMAKE_COMPRESS_INCLUDES
"${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress") "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
SET(CMAKE_COMPRESS_LIBRARIES "cmcompress") SET(CMAKE_COMPRESS_LIBRARIES "cmcompress")
SUBDIRS(Utilities/cmcompress) ADD_SUBDIRECTORY(Utilities/cmcompress)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Build expat library for CMake and CTest. # Build expat library for CMake and CTest.
...@@ -267,7 +280,7 @@ MACRO (CMAKE_BUILD_UTILITIES) ...@@ -267,7 +280,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
ELSE(CMAKE_USE_SYSTEM_EXPAT) ELSE(CMAKE_USE_SYSTEM_EXPAT)
SET(CMAKE_EXPAT_INCLUDES) SET(CMAKE_EXPAT_INCLUDES)
SET(CMAKE_EXPAT_LIBRARIES cmexpat) SET(CMAKE_EXPAT_LIBRARIES cmexpat)
SUBDIRS(Utilities/cmexpat) ADD_SUBDIRECTORY(Utilities/cmexpat)
ENDIF(CMAKE_USE_SYSTEM_EXPAT) ENDIF(CMAKE_USE_SYSTEM_EXPAT)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
...@@ -302,7 +315,7 @@ MACRO (CMAKE_BUILD_UTILITIES) ...@@ -302,7 +315,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
SET(BUILD_CursesDialog 0) SET(BUILD_CursesDialog 0)
ENDIF (UNIX) ENDIF (UNIX)
IF(BUILD_CursesDialog) IF(BUILD_CursesDialog)
SUBDIRS(Source/CursesDialog/form) ADD_SUBDIRECTORY(Source/CursesDialog/form)
ENDIF(BUILD_CursesDialog) ENDIF(BUILD_CursesDialog)
ENDMACRO (CMAKE_BUILD_UTILITIES) ENDMACRO (CMAKE_BUILD_UTILITIES)
...@@ -315,8 +328,8 @@ ENDMACRO (CMAKE_BUILD_UTILITIES) ...@@ -315,8 +328,8 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
# The CMake version number. # The CMake version number.
SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_MINOR 8)
SET(CMake_VERSION_PATCH 0) SET(CMake_VERSION_PATCH 1)
#SET(CMake_VERSION_RC 8) SET(CMake_VERSION_RC 1)
# We use odd minor numbers for development versions. # We use odd minor numbers for development versions.
# Use a date for the development patch level. # Use a date for the development patch level.
...@@ -334,13 +347,15 @@ SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}") ...@@ -334,13 +347,15 @@ SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
ENABLE_TESTING() ENABLE_TESTING()
INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake) INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
# Set up test-time configuration.
SET_DIRECTORY_PROPERTIES(PROPERTIES
TEST_INCLUDE_FILE "${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake")
# where to write the resulting executables and libraries # where to write the resulting executables and libraries
SET(BUILD_SHARED_LIBS OFF) SET(BUILD_SHARED_LIBS OFF)
SET(EXECUTABLE_OUTPUT_PATH ${CMake_BINARY_DIR}/bin CACHE INTERNAL SET(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir.")
"Where to put the executables for CMake")
SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
"Where to put the libraries for CMake") "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 # The CMake executables usually do not need any rpath to run in the build or
# install tree. # install tree.
...@@ -356,6 +371,10 @@ MARK_AS_ADVANCED(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR) ...@@ -356,6 +371,10 @@ MARK_AS_ADVANCED(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR)
STRING(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}") STRING(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}")
STRING(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}") STRING(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}")
IF(BUILD_TESTING)
INCLUDE(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
ENDIF()
# include special compile flags for some compilers # include special compile flags for some compilers
INCLUDE(CompileFlags.cmake) INCLUDE(CompileFlags.cmake)
...@@ -442,9 +461,9 @@ MARK_AS_ADVANCED(CMAKE_STRICT) ...@@ -442,9 +461,9 @@ MARK_AS_ADVANCED(CMAKE_STRICT)
# build the remaining subdirectories # build the remaining subdirectories
SUBDIRS(Source) ADD_SUBDIRECTORY(Source)
SUBDIRS(Utilities) ADD_SUBDIRECTORY(Utilities)
SUBDIRS(Tests) ADD_SUBDIRECTORY(Tests)
# add a test # add a test
ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}" ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
...@@ -470,3 +489,10 @@ INSTALL( ...@@ -470,3 +489,10 @@ INSTALL(
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# End of the main section of the CMakeLists file # End of the main section of the CMakeLists file
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# As a special case when building CMake itself, CMake 2.8.0 and below
# look up EXECUTABLE_OUTPUT_PATH in the top-level CMakeLists.txt file
# to compute the location of the "cmake" executable. We set it here
# so that those CMake versions can find it. We wait until after all
# the add_subdirectory() calls to avoid affecting the subdirectories.
SET(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR})
...@@ -16,6 +16,7 @@ set(CTEST_DROP_METHOD "http") ...@@ -16,6 +16,7 @@ set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org") set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=CMake") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=CMake")
set(CTEST_DROP_SITE_CDASH TRUE) set(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_CDASH_VERSION "1.4")
# use old trigger stuff so that cmake 2.4 and below will not # use old trigger stuff so that cmake 2.4 and below will not
# get errors on trigger # get errors on trigger
......
Changes in CMake 2.8.1 RC 1
- Add "NMake Makefiles JOM" generator
- Add PathScale compiler support
- Add per-configuration OUTPUT_DIRECTORY properties
- Add per-target OSX_ARCHITECTURES property
- check_type_size(): Handle mixed-size universal binaries
- CPack: Document Mac generators
- CPack: Improve RPM spec files
- Create CMAKE_FORCE_Fortran_COMPILER for cross-compiling
- CTest: Add --http1.0 command-line option
- CTest: Add --timeout command-line option
- CTest: Do not munge UTF-8 output in XML files
- CTest: Document CTEST_USE_LAUNCHERS option
- CTest: Fix killing of whole test process trees
- CTest: Handle failure of running invalid executables
- CTest: Honor the -C arg to ctest (#2336)
- CTest: Improve host system introspection
- CTest: Optionally randomize test order (--schedule-random)
- CTest: Skip tests with unsatisfied REQUIRED_FILES test property
- CTest: Submit arbitrary results with ATTACHED_FILES test property
- ctest_build(): Enhance signature
- ctest_start(): Add APPEND option
- ctest_start(): Move CTEST_CHECKOUT_COMMAND from ctest_update
- ctest_update(): Submit global tree revision in Update.xml
- Cygwin: Do not export all symbols from DLLs (#10122)
- Cygwin: Name DLLs with SOVERSION, not VERSION (#10122)
- Detect 32/64-bit Windows with Intel compiler
- Eclipse generator enhancements
- ExternalProject: Add TIMEOUT parameter
- FindCUDA: Respect CUDA version differences
- FindCURL: Find import libraries on Windows
- FindDCMTK: Look in more places
- FindGTest: Handle spaces better (#10065)
- FindGTK2: Look in fink locations on Mac OS X
- FindHDF5: Follow find-module API conventions
- FindJava: Support for versioned find
- FindJNI: Honor find_package() REQUIRED and QUIET options
- FindMPI: Improve Windows support
- FindOpenSSL: Fix MinGW support
- FindPythonLibs: Look in config for static library
- FindQt4: Misc enhancements, sync with KDE vesion
- FindRuby: Fix version convention on Windows
- FindX11: Improve documentation
- Fortran: Detect address size (#10119)
- FortranCInterface: Honor user flags
- Improve VS 2010 beta2 support
- link_directories(): Treat relative paths consistently (CMP0015)
- Modernize FindLibXslt and FindLibXml.cmake
- Refactor platform info to simplify adding new compilers
- Support cross-compiling versioned DLLs
- UseQt4: Provide dependencies only for static Qt (#10021)
- Address issues:
#2336, #3571, #5041, #7541, #8725, #9011, #9042, #9054, #9163,
#9171, #9450, #9697, #9764, #9782, #9792, #9862, #9894, #9913,
#9916, #9917, #9918, #9949, #9965, #9970, #9982, #9985, #10003,
#10014, #10021, #10032, #10055, #10060, #10065, #10114, #10119,
#10122, #10126, #10136.
Changes in CMake 2.8.0 Release Changes in CMake 2.8.0 Release
- CPack: Honor CPACK_NSIS_DISPLAY_NAME (fixes regression) - CPack: Honor CPACK_NSIS_DISPLAY_NAME (fixes regression)
......
...@@ -23,6 +23,17 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 6") ...@@ -23,6 +23,17 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6") ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
# Old CMake versions did not support OS X universal binaries anyway,
# so just get through this with at least some size for the types.
LIST(LENGTH CMAKE_OSX_ARCHITECTURES NUM_ARCHS)
IF(${NUM_ARCHS} GREATER 1)
IF(NOT DEFINED CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
MESSAGE(WARNING "This module does not work with OS X universal binaries.")
SET(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES 1)
LIST(GET CMAKE_OSX_ARCHITECTURES 0 CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
ENDIF()
ENDIF()
INCLUDE (CheckTypeSize) INCLUDE (CheckTypeSize)
CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT) CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG) CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
...@@ -70,6 +81,11 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) ...@@ -70,6 +81,11 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
"Use sproc libs.") "Use sproc libs.")
IF(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
SET(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
ENDIF()
ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
......
...@@ -2,8 +2,10 @@ SET(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") ...@@ -2,8 +2,10 @@ SET(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
SET(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@") SET(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
SET(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@") SET(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
SET(CMAKE_C_PLATFORM_ID "@CMAKE_C_PLATFORM_ID@") SET(CMAKE_C_PLATFORM_ID "@CMAKE_C_PLATFORM_ID@")
@SET_MSVC_C_ARCHITECTURE_ID@
SET(CMAKE_AR "@CMAKE_AR@") SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@") SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_LINKER "@CMAKE_LINKER@")
SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@) SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
SET(CMAKE_C_COMPILER_LOADED 1) SET(CMAKE_C_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@) SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
#elif defined(__PGI) #elif defined(__PGI)
# define COMPILER_ID "PGI" # define COMPILER_ID "PGI"
#elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale"
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define COMPILER_ID "GNU" # define COMPILER_ID "GNU"
...@@ -93,6 +96,7 @@ int main(int argc, char* argv[]) ...@@ -93,6 +96,7 @@ int main(int argc, char* argv[])
int require = 0; int require = 0;
require += info_compiler[argc]; require += info_compiler[argc];
require += info_platform[argc]; require += info_platform[argc];
require += info_arch[argc];
(void)argv; (void)argv;
return require; return require;
} }
......
...@@ -2,8 +2,10 @@ SET(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@") ...@@ -2,8 +2,10 @@ SET(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
SET(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@") SET(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@")
SET(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@") SET(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
SET(CMAKE_CXX_PLATFORM_ID "@CMAKE_CXX_PLATFORM_ID@") SET(CMAKE_CXX_PLATFORM_ID "@CMAKE_CXX_PLATFORM_ID@")
@SET_MSVC_CXX_ARCHITECTURE_ID@
SET(CMAKE_AR "@CMAKE_AR@") SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@") SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_LINKER "@CMAKE_LINKER@")
SET(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@) SET(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@)
SET(CMAKE_CXX_COMPILER_LOADED 1) SET(CMAKE_CXX_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@) SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
#elif defined(__PGI) #elif defined(__PGI)
# define COMPILER_ID "PGI" # define COMPILER_ID "PGI"
#elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale"
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define COMPILER_ID "GNU" # define COMPILER_ID "GNU"
......
...@@ -114,6 +114,14 @@ IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG) ...@@ -114,6 +114,14 @@ IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_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) ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
IF(NOT DEFINED CMAKE_EXE_EXPORTS_CXX_FLAG)
SET(CMAKE_EXE_EXPORTS_CXX_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
ENDIF()
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG)
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
ENDIF()
IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG) IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG}) SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG) ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
...@@ -147,14 +155,6 @@ IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS) ...@@ -147,14 +155,6 @@ IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_CXX_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. # Initialize CXX link type selection flags from C versions.
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
IF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS) IF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
......
...@@ -171,11 +171,13 @@ ENDIF (CMAKE_CROSSCOMPILING ...@@ -171,11 +171,13 @@ ENDIF (CMAKE_CROSSCOMPILING
INCLUDE(CMakeFindBinUtils) INCLUDE(CMakeFindBinUtils)
IF(MSVC_C_ARCHITECTURE_ID)
SET(SET_MSVC_C_ARCHITECTURE_ID
"SET(MSVC_C_ARCHITECTURE_ID ${MSVC_C_ARCHITECTURE_ID})")
ENDIF(MSVC_C_ARCHITECTURE_ID)
# configure variables set in this file for fast reload later on # configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake" "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0 @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
) )
SET(CMAKE_C_COMPILER_ENV_VAR "CC") SET(CMAKE_C_COMPILER_ENV_VAR "CC")
...@@ -176,7 +176,10 @@ ENDIF (CMAKE_CROSSCOMPILING ...@@ -176,7 +176,10 @@ ENDIF (CMAKE_CROSSCOMPILING
AND NOT _CMAKE_TOOLCHAIN_PREFIX) AND NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(CMakeFindBinUtils) INCLUDE(CMakeFindBinUtils)
IF(MSVC_CXX_ARCHITECTURE_ID)
SET(SET_MSVC_CXX_ARCHITECTURE_ID
"SET(MSVC_CXX_ARCHITECTURE_ID ${MSVC_CXX_ARCHITECTURE_ID})")
ENDIF(MSVC_CXX_ARCHITECTURE_ID)
# configure all variables set in this file # configure all variables set in this file
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
......
...@@ -57,6 +57,8 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) ...@@ -57,6 +57,8 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
PARENT_SCOPE)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID) ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
...@@ -171,7 +173,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) ...@@ -171,7 +173,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
SET(COMPILER_ID) SET(COMPILER_ID)
SET(PLATFORM_ID) SET(PLATFORM_ID)
FILE(STRINGS ${file} FILE(STRINGS ${file}
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:") CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 3 REGEX "INFO:")
SET(HAVE_COMPILER_TWICE 0) SET(HAVE_COMPILER_TWICE 0)
FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS}) FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
IF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*") IF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
...@@ -185,12 +187,17 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) ...@@ -185,12 +187,17 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1" STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
PLATFORM_ID "${info}") PLATFORM_ID "${info}")
ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*") ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
IF("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
STRING(REGEX REPLACE ".*INFO:arch\\[([^]]*)\\].*" "\\1"
ARCHITECTURE_ID "${info}")
ENDIF("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
ENDFOREACH(info) ENDFOREACH(info)
# Check if a valid compiler and platform were found. # Check if a valid compiler and platform were found.
IF(COMPILER_ID AND NOT COMPILER_ID_TWICE) IF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
SET(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}") SET(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}")
SET(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}") SET(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}")
SET(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
ENDIF(COMPILER_ID AND NOT COMPILER_ID_TWICE) ENDIF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
# Check the compiler identification string. # Check the compiler identification string.
...@@ -234,5 +241,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) ...@@ -234,5 +241,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# Return the information extracted. # Return the information extracted.
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
PARENT_SCOPE)
SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE) SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang) ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
...@@ -62,9 +62,6 @@ IF(NOT CMAKE_Fortran_COMPILER) ...@@ -62,9 +62,6 @@ IF(NOT CMAKE_Fortran_COMPILER)
# The order is 95 or newer compilers first, then 90, # The order is 95 or newer compilers first, then 90,
# then 77 or older compilers, gnu is always last in the group, # then 77 or older compilers, gnu is always last in the group,
# so if you paid for a compiler it is picked by default. # 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 SET(CMAKE_Fortran_COMPILER_LIST
ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran gfortran-4 g95 f90 ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran gfortran-4 g95 f90
pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77 pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77
......
...@@ -16,6 +16,13 @@ ...@@ -16,6 +16,13 @@
# It also bypasses the check for working compiler and basic compiler # It also bypasses the check for working compiler and basic compiler
# information tests. # information tests.
# #
# Macro CMAKE_FORCE_Fortran_COMPILER has the following signature:
# CMAKE_FORCE_Fortran_COMPILER(<compiler> <compiler-id>)
# It sets CMAKE_Fortran_COMPILER to the given compiler and the cmake
# internal variable CMAKE_Fortran_COMPILER_ID to the given compiler-id.