parent
626f192d1c
commit
06aa077526
@ -0,0 +1,14 @@
|
||||
.gitattributes export-ignore
|
||||
|
||||
bootstrap crlf=input
|
||||
configure crlf=input
|
||||
*.[1-9] crlf=input
|
||||
*.sh crlf=input
|
||||
*.sh.in crlf=input
|
||||
|
||||
*.bat -crlf
|
||||
*.dsp -crlf
|
||||
*.dsptemplate -crlf
|
||||
*.dsw -crlf
|
||||
*.sln -crlf
|
||||
*.vcproj -crlf
|
@ -1,3 +1,33 @@
|
||||
PROGRAM CMakeFortranCompilerId
|
||||
PRINT *, 'ABI Detection Binary'
|
||||
PROGRAM CMakeFortranCompilerABI
|
||||
#if 0
|
||||
! Address Size
|
||||
#endif
|
||||
#if defined(_LP64)
|
||||
PRINT *, 'INFO:sizeof_dptr[8]'
|
||||
#elif defined(_M_IA64)
|
||||
PRINT *, 'INFO:sizeof_dptr[8]'
|
||||
#elif defined(_M_X64)
|
||||
PRINT *, 'INFO:sizeof_dptr[8]'
|
||||
#elif defined(_M_AMD64)
|
||||
PRINT *, 'INFO:sizeof_dptr[8]'
|
||||
|
||||
#elif defined(_ILP32)
|
||||
PRINT *, 'INFO:sizeof_dptr[4]'
|
||||
#elif defined(_M_IX86)
|
||||
PRINT *, 'INFO:sizeof_dptr[4]'
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
! Application Binary Interface
|
||||
#endif
|
||||
#if defined(__sgi) && defined(_ABIO32)
|
||||
PRINT *, 'INFO:abi[ELF O32]'
|
||||
#elif defined(__sgi) && defined(_ABIN32)
|
||||
PRINT *, 'INFO:abi[ELF N32]'
|
||||
#elif defined(__sgi) && defined(_ABI64)
|
||||
PRINT *, 'INFO:abi[ELF 64]'
|
||||
#elif defined(__ELF__)
|
||||
PRINT *, 'INFO:abi[ELF]'
|
||||
#endif
|
||||
PRINT *, 'ABI Detection'
|
||||
END
|
||||
|
@ -0,0 +1,18 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
|
||||
SET (CMAKE_MAKE_PROGRAM "jom" CACHE STRING
|
||||
"Program used to build from makefiles.")
|
||||
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
|
@ -0,0 +1,21 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
function(PrintTestCompilerStatus LANG MSG)
|
||||
IF(CMAKE_GENERATOR MATCHES Make)
|
||||
MESSAGE(STATUS "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${MSG}")
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Check for working ${LANG} compiler using: ${CMAKE_GENERATOR}${MSG}")
|
||||
ENDIF()
|
||||
endfunction()
|
@ -0,0 +1,37 @@
|
||||
@headers@
|
||||
|
||||
#undef KEY
|
||||
#if defined(__i386)
|
||||
# define KEY '_','_','i','3','8','6'
|
||||
#elif defined(__x86_64)
|
||||
# define KEY '_','_','x','8','6','_','6','4'
|
||||
#elif defined(__ppc__)
|
||||
# define KEY '_','_','p','p','c','_','_'
|
||||
#elif defined(__ppc64__)
|
||||
# define KEY '_','_','p','p','c','6','4','_','_'
|
||||
#endif
|
||||
|
||||
#define SIZE (sizeof(@type@))
|
||||
char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
|
||||
('0' + ((SIZE / 10000)%10)),
|
||||
('0' + ((SIZE / 1000)%10)),
|
||||
('0' + ((SIZE / 100)%10)),
|
||||
('0' + ((SIZE / 10)%10)),
|
||||
('0' + (SIZE % 10)),
|
||||
']',
|
||||
#ifdef KEY
|
||||
' ','k','e','y','[', KEY, ']',
|
||||
#endif
|
||||
'\0'};
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
int main(argc, argv) int argc; char *argv[];
|
||||
#else
|
||||
int main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
int require = 0;
|
||||
require += info_size[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
|
||||
#ifdef CHECK_TYPE_SIZE_TYPE
|
||||
|
||||
@CHECK_TYPE_SIZE_PREINCLUDE@
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif /* HAVE_SYS_TYPES_H */
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif /* HAVE_STDINT_H */
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif /* HAVE_STDDEF_H */
|
||||
|
||||
@CHECK_TYPE_SIZE_PREMAIN@
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
# define const
|
||||
#endif
|
||||
|
||||
#define SIZE (sizeof(@CHECK_TYPE_SIZE_TYPE@))
|
||||
const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[',
|
||||
('0' + ((SIZE / 10000)%10)),
|
||||
('0' + ((SIZE / 1000)%10)),
|
||||
('0' + ((SIZE / 100)%10)),
|
||||
('0' + ((SIZE / 10)%10)),
|
||||
('0' + (SIZE % 10)),
|
||||
']','\0'};
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
int main(argc, argv) int argc; char *argv[];
|
||||
#else
|
||||
int main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
int require = 0;
|
||||
require += info_sizeof[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
|
||||
#else /* CHECK_TYPE_SIZE_TYPE */
|
||||
|
||||
# error "CHECK_TYPE_SIZE_TYPE has to specify the type"
|
||||
|
||||
#endif /* CHECK_TYPE_SIZE_TYPE */
|
@ -0,0 +1 @@
|
||||
set(@var@_KEYS "@keys@")@code@
|
@ -1 +1,2 @@
|
||||
SET(CMAKE_C_VERBOSE_FLAG "-v")
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(C)
|
||||
|
@ -1 +1,2 @@
|
||||
SET(CMAKE_CXX_VERBOSE_FLAG "-v")
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(CXX)
|
||||
|
@ -1 +1,14 @@
|
||||
SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(Fortran)
|
||||
|
||||
# No -DNDEBUG for Fortran.
|
||||
SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
|
||||
SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
|
||||
|
||||
# We require updates to CMake C++ code to support preprocessing rules
|
||||
# for Fortran.
|
||||
SET(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
|
||||
SET(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
|
||||
|
||||
# Fortran-specific feature flags.
|
||||
SET(CMAKE_Fortran_MODDIR_FLAG -J)
|
||||
|
@ -0,0 +1,38 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This module is shared by multiple languages; use include blocker.
|
||||
if(__COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__COMPILER_GNU 1)
|
||||
|
||||
macro(__compiler_gnu lang)
|
||||
# Feature flags.
|
||||
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
||||
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
|
||||
|
||||
# Initial configuration flags.
|
||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
if(NOT APPLE)
|
||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
|
||||
endif(NOT APPLE)
|
||||
endmacro()
|
@ -1 +1,4 @@
|
||||
SET(CMAKE_C_VERBOSE_FLAG "-v")
|
||||
include(Compiler/PGI)
|
||||
__compiler_pgi(C)
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG")
|
||||
|
@ -1 +1,4 @@
|
||||
SET(CMAKE_CXX_VERBOSE_FLAG "-v")
|
||||
include(Compiler/PGI)
|
||||
__compiler_pgi(CXX)
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG")
|
||||
|
@ -1 +1,12 @@
|
||||
SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
||||
include(Compiler/PGI)
|
||||
__compiler_pgi(Fortran)
|
||||
|
||||
SET(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee")
|
||||
SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT} -Mbounds")
|
||||
|
||||
# We require updates to CMake C++ code to support preprocessing rules
|
||||
# for Fortran.
|
||||
SET(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
|
||||
SET(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
|
||||
|
||||
SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
|
||||
|
@ -0,0 +1,35 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This module is shared by multiple languages; use include blocker.
|
||||
if(__COMPILER_PGI)
|
||||
return()
|
||||
endif()
|
||||
set(__COMPILER_PGI 1)
|
||||
|
||||
macro(__compiler_pgi lang)
|
||||
# Feature flags.
|
||||
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
||||
|
||||
# Initial configuration flags.
|
||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g -O0")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O2 -s")
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-fast -O3 -Mipa=fast")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -gopt")
|
||||
|
||||
# Preprocessing and assembly rules.
|
||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
endmacro()
|
@ -0,0 +1,4 @@
|
||||
include(Compiler/PathScale)
|
||||
__compiler_pathscale(C)
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG")
|
@ -0,0 +1,4 @@
|
||||
include(Compiler/PathScale)
|
||||
__compiler_pathscale(CXX)
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG")
|
@ -0,0 +1,4 @@
|
||||
include(Compiler/PathScale)
|
||||
__compiler_pathscale(Fortran)
|
||||
|
||||
SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
|
@ -0,0 +1,31 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2010 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This module is shared by multiple languages; use include blocker.
|
||||
if(__COMPILER_PATHSCALE)
|
||||
return()
|
||||
endif()
|
||||
set(__COMPILER_PATHSCALE 1)
|
||||
|
||||
macro(__compiler_pathscale lang)
|
||||
# Feature flags.
|
||||
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
||||
|
||||
# Initial configuration flags.
|
||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g -O0")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os")
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-g -O2")
|
||||
endmacro()
|
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,8 @@
|
||||
#if defined(__PATHSCALE__)
|
||||
/* PathScale Fortran wants my_module_ when calling any my_module symbol,
|
||||
but module symbols use '.in.' so we cannot provide them anyway. */
|
||||
void pathscale_my_module_(void) {}
|
||||
#else
|
||||
/* PGI Fortran wants my_module_ when calling any my_module symbol. */
|
||||
void my_module_(void) {}
|
||||
#endif
|
||||
|
@ -1,2 +1,8 @@
|
||||
#if defined(__PATHSCALE__)
|
||||
/* PathScale Fortran wants mymodule_ when calling any mymodule symbol,
|
||||
but module symbols use '.in.' so we cannot provide them anyway. */
|
||||
void pathscale_mymodule_(void) {}
|
||||
#else
|
||||
/* PGI Fortran wants mymodule_ when calling any mymodule symbol. */
|
||||
void mymodule_(void) {}
|
||||
#endif
|
||||
|
@ -0,0 +1,2 @@
|
||||
include(Platform/AIX-GNU)
|
||||
__aix_compiler_gnu(C)
|
@ -0,0 +1,2 @@
|
||||
include(Platform/AIX-GNU)
|
||||
__aix_compiler_gnu(CXX)
|
@ -0,0 +1,2 @@
|
||||
include(Platform/AIX-GNU)
|
||||
__aix_compiler_gnu(Fortran)
|
@ -0,0 +1,23 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This module is shared by multiple languages; use include blocker.
|
||||
if(__AIX_COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__AIX_COMPILER_GNU 1)
|
||||
|
||||
macro(__aix_compiler_gnu lang)
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G")
|
||||
endmacro()
|
@ -1,14 +1,10 @@
|
||||
SET(BEOS 1)
|
||||
|
||||
# GCC is the default compiler on BeOS.
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
||||
SET(CMAKE_DL_LIBS root be)
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
|
||||
|
||||
INCLUDE(Platform/UnixPaths)
|
||||
|
@ -0,0 +1,2 @@
|
||||
include(Platform/CYGWIN-GNU)
|
||||
__cygwin_compiler_gnu(C)
|
@ -0,0 +1,2 @@
|
||||
include(Platform/CYGWIN-GNU)
|
||||
__cygwin_compiler_gnu(CXX)
|
@ -0,0 +1,2 @@
|
||||
include(Platform/CYGWIN-GNU)
|
||||
__cygwin_compiler_gnu(Fortran)
|
@ -0,0 +1,51 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This module is shared by multiple languages; use include blocker.
|
||||
if(__CYGWIN_COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__CYGWIN_COMPILER_GNU 1)
|
||||
|
||||
# TODO: Is -Wl,--enable-auto-import now always default?
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-auto-import")
|
||||
set(CMAKE_CREATE_WIN32_EXE "-mwindows")
|
||||
|
||||
set(CMAKE_GNULD_IMAGE_VERSION
|
||||
"-Wl,--major-image-version,<TARGET_VERSION_MAJOR>,--minor-image-version,<TARGET_VERSION_MINOR>")
|
||||
|
||||
macro(__cygwin_compiler_gnu lang)
|
||||
# Binary link rules.
|
||||
set(CMAKE_${lang}_CREATE_SHARED_MODULE
|
||||
"<CMAKE_${lang}_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_${lang}_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
|
||||
"<CMAKE_${lang}_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
set(CMAKE_${lang}_LINK_EXECUTABLE
|
||||
"<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
|
||||
|
||||
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on cygwin
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
# to other libraries to select whether to use the static or shared
|
||||
# versions of the libraries.
|
||||
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
|
||||
SET(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic")
|
||||
SET(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")
|
||||
ENDFOREACH(type)
|
||||
|
||||
# TODO: Is -Wl,--enable-auto-import now always default?
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,--enable-auto-import")
|
||||
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS}")
|
||||
endmacro()
|
@ -1,6 +0,0 @@
|
||||
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
|
||||
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "")
|
||||
SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
|
||||
INCLUDE(Platform/g77)
|
@ -1,55 +1,20 @@
|
||||
SET(WIN32 1)
|
||||
SET(CYGWIN 1)
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-auto-import")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,--export-all-symbols -Wl,--enable-auto-import")
|
||||
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
|
||||
SET(CMAKE_DL_LIBS "-lgdi32" )
|
||||
SET(CMAKE_SHARED_LIBRARY_PREFIX "cyg")
|
||||
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
|
||||
SET(CMAKE_SHARED_MODULE_PREFIX "lib")
|
||||
SET(CMAKE_SHARED_MODULE_SUFFIX ".dll")
|
||||
SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
|
||||
SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
|
||||
# no pic for gcc on cygwin
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
|
||||
SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
|
||||
SET(CMAKE_CREATE_WIN32_EXE "-mwindows")
|
||||
# Modules have a different default prefix that shared libs.
|
||||
SET(CMAKE_MODULE_EXISTS 1)
|
||||
|
||||
SET(CMAKE_FIND_LIBRARY_PREFIXES "cyg" "lib")
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a")
|
||||
|
||||
SET(CMAKE_GNULD_IMAGE_VERSION
|
||||
"-Wl,--major-image-version,<TARGET_VERSION_MAJOR>,--minor-image-version,<TARGET_VERSION_MINOR>")
|
||||
|
||||
SET(CMAKE_C_CREATE_SHARED_MODULE
|
||||
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_MODULE_CREATE_C_FLAGS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
SET(CMAKE_CXX_CREATE_SHARED_MODULE
|
||||
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
|
||||
SET(CMAKE_C_CREATE_SHARED_LIBRARY
|
||||
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
|
||||
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
|
||||
SET(CMAKE_C_LINK_EXECUTABLE
|
||||
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
|
||||
SET(CMAKE_CXX_LINK_EXECUTABLE
|
||||
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
|
||||
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a")
|
||||
|
||||
# Shared libraries on cygwin can be named with their version number.
|
||||
SET(CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION 1)
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
# to other libraries to select whether to use the static or shared
|
||||
# versions of the libraries.
|
||||
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
|
||||
SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
|
||||
SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
|
||||
ENDFOREACH(type)
|
||||
|
||||
INCLUDE(Platform/UnixPaths)
|
||||
|
@ -1,2 +1,4 @@
|
||||
include(Platform/Darwin-GNU)
|
||||
__darwin_compiler_gnu(C)
|
||||
cmake_gnu_has_isysroot(C)
|
||||
cmake_gnu_set_osx_deployment_target_flag(C)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue