CMake 2.8.1-rc1
This commit is contained in:
parent
612409e5b0
commit
dc1d2189ae
|
@ -20,6 +20,8 @@ MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
|
|||
# Allow empty endif() and such with CMake 2.4.
|
||||
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)
|
||||
# Since the built CMake will install itself instead of the
|
||||
# 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)
|
|||
INSTALL(CODE "SET(CMAKE_INSTALL_SELF_2_4 1)")
|
||||
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
|
||||
# simply to improve readability of the main script
|
||||
|
@ -139,9 +152,9 @@ MACRO(CMAKE_SETUP_TESTING)
|
|||
# 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")
|
||||
SET(CMAKE_CPACK_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cpack")
|
||||
SET(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest")
|
||||
SET(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake")
|
||||
SET(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack")
|
||||
ENDIF(BUILD_TESTING)
|
||||
|
||||
# configure some files for testing
|
||||
|
@ -183,7 +196,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
SET(KWSYS_USE_CommandLineArguments 1)
|
||||
SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
|
||||
SET(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}")
|
||||
SUBDIRS(Source/kwsys)
|
||||
ADD_SUBDIRECTORY(Source/kwsys)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Setup third-party libraries.
|
||||
|
@ -212,7 +225,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
ELSE(CMAKE_USE_SYSTEM_ZLIB)
|
||||
SET(CMAKE_ZLIB_INCLUDES)
|
||||
SET(CMAKE_ZLIB_LIBRARIES cmzlib)
|
||||
SUBDIRS(Utilities/cmzlib)
|
||||
ADD_SUBDIRECTORY(Utilities/cmzlib)
|
||||
ENDIF(CMAKE_USE_SYSTEM_ZLIB)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
|
@ -235,7 +248,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
ENDIF(NOT CMAKE_BUILD_CURL_SHARED)
|
||||
SET(CMAKE_CURL_INCLUDES)
|
||||
SET(CMAKE_CURL_LIBRARIES cmcurl)
|
||||
SUBDIRS(Utilities/cmcurl)
|
||||
ADD_SUBDIRECTORY(Utilities/cmcurl)
|
||||
ENDIF(CMAKE_USE_SYSTEM_CURL)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
|
@ -252,7 +265,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
SET(CMAKE_COMPRESS_INCLUDES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
|
||||
SET(CMAKE_COMPRESS_LIBRARIES "cmcompress")
|
||||
SUBDIRS(Utilities/cmcompress)
|
||||
ADD_SUBDIRECTORY(Utilities/cmcompress)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Build expat library for CMake and CTest.
|
||||
|
@ -267,7 +280,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
ELSE(CMAKE_USE_SYSTEM_EXPAT)
|
||||
SET(CMAKE_EXPAT_INCLUDES)
|
||||
SET(CMAKE_EXPAT_LIBRARIES cmexpat)
|
||||
SUBDIRS(Utilities/cmexpat)
|
||||
ADD_SUBDIRECTORY(Utilities/cmexpat)
|
||||
ENDIF(CMAKE_USE_SYSTEM_EXPAT)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
|
@ -302,7 +315,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||
SET(BUILD_CursesDialog 0)
|
||||
ENDIF (UNIX)
|
||||
IF(BUILD_CursesDialog)
|
||||
SUBDIRS(Source/CursesDialog/form)
|
||||
ADD_SUBDIRECTORY(Source/CursesDialog/form)
|
||||
ENDIF(BUILD_CursesDialog)
|
||||
ENDMACRO (CMAKE_BUILD_UTILITIES)
|
||||
|
||||
|
@ -315,8 +328,8 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
|
|||
# The CMake version number.
|
||||
SET(CMake_VERSION_MAJOR 2)
|
||||
SET(CMake_VERSION_MINOR 8)
|
||||
SET(CMake_VERSION_PATCH 0)
|
||||
#SET(CMake_VERSION_RC 8)
|
||||
SET(CMake_VERSION_PATCH 1)
|
||||
SET(CMake_VERSION_RC 1)
|
||||
|
||||
# We use odd minor numbers for development versions.
|
||||
# Use a date for the development patch level.
|
||||
|
@ -334,13 +347,15 @@ SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
|
|||
ENABLE_TESTING()
|
||||
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
|
||||
SET(BUILD_SHARED_LIBS OFF)
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${CMake_BINARY_DIR}/bin CACHE INTERNAL
|
||||
"Where to put the executables for CMake")
|
||||
SET(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir.")
|
||||
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.
|
||||
|
@ -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_DOC_DEST "${CMAKE_DOC_DIR}")
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
INCLUDE(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
|
||||
ENDIF()
|
||||
|
||||
# include special compile flags for some compilers
|
||||
INCLUDE(CompileFlags.cmake)
|
||||
|
||||
|
@ -442,9 +461,9 @@ MARK_AS_ADVANCED(CMAKE_STRICT)
|
|||
|
||||
|
||||
# build the remaining subdirectories
|
||||
SUBDIRS(Source)
|
||||
SUBDIRS(Utilities)
|
||||
SUBDIRS(Tests)
|
||||
ADD_SUBDIRECTORY(Source)
|
||||
ADD_SUBDIRECTORY(Utilities)
|
||||
ADD_SUBDIRECTORY(Tests)
|
||||
|
||||
# add a test
|
||||
ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
|
||||
|
@ -470,3 +489,10 @@ INSTALL(
|
|||
#-----------------------------------------------------------------------
|
||||
# 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")
|
|||
set(CTEST_DROP_SITE "www.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=CMake")
|
||||
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
|
||||
# get errors on trigger
|
||||
|
|
|
@ -1,3 +1,61 @@
|
|||
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
|
||||
- CPack: Honor CPACK_NSIS_DISPLAY_NAME (fixes regression)
|
||||
|
||||
|
|
|
@ -23,6 +23,17 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
|
|||
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
|
||||
|
||||
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)
|
||||
CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
|
||||
CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
|
||||
|
@ -70,6 +81,11 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
|
|||
|
||||
SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
|
||||
"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)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
|
|
|
@ -2,8 +2,10 @@ 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_MSVC_C_ARCHITECTURE_ID@
|
||||
SET(CMAKE_AR "@CMAKE_AR@")
|
||||
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
|
||||
SET(CMAKE_LINKER "@CMAKE_LINKER@")
|
||||
SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
|
||||
SET(CMAKE_C_COMPILER_LOADED 1)
|
||||
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
|
||||
#elif defined(__PATHSCALE__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# define COMPILER_ID "GNU"
|
||||
|
||||
|
@ -93,6 +96,7 @@ int main(int argc, char* argv[])
|
|||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
require += info_arch[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,10 @@ 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_MSVC_CXX_ARCHITECTURE_ID@
|
||||
SET(CMAKE_AR "@CMAKE_AR@")
|
||||
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
|
||||
SET(CMAKE_LINKER "@CMAKE_LINKER@")
|
||||
SET(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@)
|
||||
SET(CMAKE_CXX_COMPILER_LOADED 1)
|
||||
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
|
||||
#elif defined(__PATHSCALE__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# define COMPILER_ID "GNU"
|
||||
|
||||
|
|
|
@ -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})
|
||||
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)
|
||||
SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
|
||||
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
|
||||
|
@ -147,14 +155,6 @@ 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)
|
||||
|
|
|
@ -171,11 +171,13 @@ ENDIF (CMAKE_CROSSCOMPILING
|
|||
|
||||
|
||||
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_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")
|
||||
|
|
|
@ -176,7 +176,10 @@ ENDIF (CMAKE_CROSSCOMPILING
|
|||
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
|
||||
|
||||
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_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
|
||||
|
|
|
@ -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}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
|
||||
SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
|
||||
PARENT_SCOPE)
|
||||
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -171,7 +173,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
|||
SET(COMPILER_ID)
|
||||
SET(PLATFORM_ID)
|
||||
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)
|
||||
FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
|
||||
IF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
|
||||
|
@ -185,12 +187,17 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
|||
STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
|
||||
PLATFORM_ID "${info}")
|
||||
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)
|
||||
|
||||
# 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}")
|
||||
SET(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
|
||||
ENDIF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
|
||||
|
||||
# Check the compiler identification string.
|
||||
|
@ -234,5 +241,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
|||
# 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(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
|
||||
PARENT_SCOPE)
|
||||
SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
|
||||
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
|
||||
|
|
|
@ -62,9 +62,6 @@ IF(NOT CMAKE_Fortran_COMPILER)
|
|||
# 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 gfortran-4 g95 f90
|
||||
pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77
|
||||
|
|
|
@ -16,6 +16,13 @@
|
|||
# It also bypasses the check for working compiler and basic compiler
|
||||
# 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.
|
||||
# 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)
|
||||
|
@ -60,3 +67,16 @@ MACRO(CMAKE_FORCE_CXX_COMPILER compiler id)
|
|||
SET(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
||||
ENDMACRO(CMAKE_FORCE_CXX_COMPILER)
|
||||
|
||||
MACRO(CMAKE_FORCE_Fortran_COMPILER compiler id)
|
||||
SET(CMAKE_Fortran_COMPILER "${compiler}")
|
||||
SET(CMAKE_Fortran_COMPILER_ID_RUN TRUE)
|
||||
SET(CMAKE_Fortran_COMPILER_ID ${id})
|
||||
SET(CMAKE_Fortran_COMPILER_WORKS TRUE)
|
||||
SET(CMAKE_Fortran_COMPILER_FORCED TRUE)
|
||||
|
||||
# Set old compiler id variables.
|
||||
IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
|
||||
SET(CMAKE_COMPILER_IS_GNUG77 1)
|
||||
ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
|
||||
ENDMACRO(CMAKE_FORCE_Fortran_COMPILER)
|
||||
|
|
|
@ -30,5 +30,17 @@ ELSE(UNIX)
|
|||
SET(CMAKE_Fortran_OUTPUT_EXTENSION .obj)
|
||||
ENDIF(UNIX)
|
||||
|
||||
# Save compiler ABI information.
|
||||
SET(CMAKE_Fortran_SIZEOF_DATA_PTR "@CMAKE_Fortran_SIZEOF_DATA_PTR@")
|
||||
SET(CMAKE_Fortran_COMPILER_ABI "@CMAKE_Fortran_COMPILER_ABI@")
|
||||
|
||||
IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
|
||||
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}")
|
||||
ENDIF(CMAKE_Fortran_SIZEOF_DATA_PTR)
|
||||
|
||||
IF(CMAKE_Fortran_COMPILER_ABI)
|
||||
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}")
|
||||
ENDIF(CMAKE_Fortran_COMPILER_ABI)
|
||||
|
||||
SET(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
|
||||
SET(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
PRINT *, 'INFO:compiler[SunPro]'
|
||||
#elif defined(__G95__)
|
||||
PRINT *, 'INFO:compiler[G95]'
|
||||
#elif defined(__PATHSCALE__)
|
||||
PRINT *, 'INFO:compiler[PathScale]'
|
||||
#elif defined(__GNUC__)
|
||||
PRINT *, 'INFO:compiler[GNU]'
|
||||
#elif defined(__IBMC__)
|
||||
|
|
|
@ -89,6 +89,14 @@ 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)
|
||||
|
||||
IF(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG)
|
||||
SET(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
|
||||
ENDIF()
|
||||
|
||||
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG)
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
|
||||
ENDIF()
|
||||
|
||||
# repeat for modules
|
||||
IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
|
||||
SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
|
||||
|
@ -98,14 +106,6 @@ 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)
|
||||
|
|
|
@ -88,6 +88,3 @@ MARK_AS_ADVANCED(
|
|||
CMAKE_SKIP_RPATH
|
||||
CMAKE_VERBOSE_MAKEFILE
|
||||
)
|
||||
|
||||
# always include the gcc compiler information
|
||||
INCLUDE(Platform/gcc)
|
||||
|
|
|
@ -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)
|
|
@ -82,8 +82,33 @@
|
|||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is becase
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#else
|
||||
# define ARCHITECTURE_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 "]";
|
||||
char* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
|
|
@ -63,8 +63,6 @@ ENDIF(CMAKE_EXTRA_GENERATOR)
|
|||
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)
|
||||
|
||||
|
||||
|
|
|
@ -107,6 +107,66 @@
|
|||
# that won't be packaged when building a source package. This is a
|
||||
# list of patterns, e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
|
||||
#
|
||||
# The following variables are specific to the DragNDrop installers
|
||||
# built on Mac OS X:
|
||||
#
|
||||
# CPACK_DMG_VOLUME_NAME - The volume name of the generated disk
|
||||
# image. Defaults to CPACK_PACKAGE_FILE_NAME.
|
||||
#
|
||||
# CPACK_DMG_FORMAT - The disk image format. Common values are UDRO
|
||||
# (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF
|
||||
# bzip2-compressed). Refer to hdiutil(1) for more information on
|
||||
# other available formats.
|
||||
#
|
||||
# CPACK_DMG_DS_STORE - Path to a custom .DS_Store file which e.g.
|
||||
# can be used to specify the Finder window position/geometry and
|
||||
# layout (such as hidden toolbars, placement of the icons etc.).
|
||||
# This file has to be generated by the Finder (either manually or
|
||||
# through OSA-script) using a normal folder from which the .DS_Store
|
||||
# file can then be extracted.
|
||||
#
|
||||
# CPACK_DMG_BACKGROUND_IMAGE - Path to an image file which is to be
|
||||
# used as the background for the Finder Window when the disk image
|
||||
# is opened. By default no background image is set. The background
|
||||
# image is applied after applying the custom .DS_Store file.
|
||||
#
|
||||
# CPACK_COMMAND_HDIUTIL - Path to the hdiutil(1) command used to
|
||||
# operate on disk image files on Mac OS X. This variable can be used
|
||||
# to override the automatically detected command (or specify its
|
||||
# location if the auto-detection fails to find it.)
|
||||
#
|
||||
# CPACK_COMMAND_SETFILE - Path to the SetFile(1) command used to set
|
||||
# extended attributes on files and directories on Mac OS X. This
|
||||
# variable can be used to override the automatically detected
|
||||
# command (or specify its location if the auto-detection fails to
|
||||
# find it.)
|
||||
#
|
||||
# CPACK_COMMAND_REZ - Path to the Rez(1) command used to compile
|
||||
# resources on Mac OS X. This variable can be used to override the
|
||||
# automatically detected command (or specify its location if the
|
||||
# auto-detection fails to find it.)
|
||||
#
|
||||
# Installers built on Mac OS X using the Bundle generator use the
|
||||
# aforementioned DragNDrop variables, plus the following Bundle-specific
|
||||
# parameters:
|
||||
#
|
||||
# CPACK_BUNDLE_NAME - The name of the generated bundle. This
|
||||
# appears in the OSX finder as the bundle name. Required.
|
||||
#
|
||||
# CPACK_BUNDLE_PLIST - Path to an OSX plist file that will be used
|
||||
# as the Info.plist for the generated bundle. This assumes that
|
||||
# the caller has generated or specified their own Info.plist file.
|
||||
# Required.
|
||||
#
|
||||
# CPACK_BUNDLE_ICON - Path to an OSX icns file that will be used as
|
||||
# the icon for the generated bundle. This is the icon that appears
|
||||
# in the OSX finder for the bundle, and in the OSX dock when the
|
||||
# bundle is opened. Required.
|
||||
#
|
||||
# CPACK_BUNDLE_STARTUP_SCRIPT - Path to an executable or script that
|
||||
# will be run whenever an end-user double-clicks the generated bundle
|
||||
# in the OSX Finder. Optional.
|
||||
#
|
||||
# The following variables are specific to the graphical installers built
|
||||
# on Windows using the Nullsoft Installation System.
|
||||
#
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration
|
||||
#
|
||||
# However CPackRPM has specific features which are controlled by
|
||||
# the specifics CPACK_RPM_XXX variables.You'll find a detailed usage on
|
||||
# the specifics CPACK_RPM_XXX variables. You'll find a detailed usage on
|
||||
# the wiki:
|
||||
# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
|
||||
# However as a handy reminder here comes the list of specific variables:
|
||||
|
@ -44,7 +44,7 @@
|
|||
# The RPM package group.
|
||||
# CPACK_RPM_PACKAGE_VENDOR
|
||||
# Mandatory : YES
|
||||
# Default : CPACK_PACKAGE_VENDOR if set or"unknown"
|
||||
# Default : CPACK_PACKAGE_VENDOR if set or "unknown"
|
||||
# The RPM package group.
|
||||
# CPACK_RPM_PACKAGE_DESCRIPTION
|
||||
# Mandatory : YES
|
||||
|
@ -52,7 +52,14 @@
|
|||
# CPACK_RPM_PACKAGE_REQUIRES
|
||||
# Mandatory : NO
|
||||
# Default : -
|
||||
# May be used to set RPM dependencies.
|
||||
# May be used to set RPM dependencies (requires).
|
||||
# Note that you must enclose the complete requires string between quotes,
|
||||
# for example:
|
||||
# set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
|
||||
# CPACK_RPM_PACKAGES_PROVIDES
|
||||
# Mandatory : NO
|
||||
# Default : -
|
||||
# May be used to set RPM dependencies (provides).
|
||||
# CPACK_RPM_SPEC_INSTALL_POST
|
||||
# Mandatory : NO
|
||||
# Default : -
|
||||
|
@ -69,6 +76,38 @@
|
|||
# May be set when invoking cpack in order to trace debug informations
|
||||
# during CPack RPM run. For example you may launch CPack like this
|
||||
# cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
|
||||
# CPACK_RPM_USER_BINARY_SPECFILE
|
||||
# Mandatory : NO
|
||||
# Default : -
|
||||
# May be set by the user in order to specify a USER binary spec file
|
||||
# to be used by CPackRPM instead of generating the file.
|
||||
# The specified file will be processed by CONFIGURE_FILE( @ONLY).
|
||||
# CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
|
||||
# Mandatory : NO
|
||||
# Default : -
|
||||
# If set CPack will generate a template for USER specified binary
|
||||
# spec file and stop with an error. For example launch CPack like this
|
||||
# cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM
|
||||
# The user may then use this file in order to hand-craft is own
|
||||
# binary spec file which may be used with CPACK_RPM_USER_BINARY_SPECFILE.
|
||||
# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
|
||||
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
|
||||
# Mandatory : NO
|
||||
# Default : -
|
||||
# May be used to embbed a pre (un)installation script in the spec file.
|
||||
# The refered script file(s) will be read and directly
|
||||
# put after the %pre or %preun section
|
||||
# One may verify which scriptlet has been included with
|
||||
# rpm -qp --scripts package.rpm
|
||||
# CPACK_RPM_POST_INSTALL_SCRIPT_FILE
|
||||
# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
|
||||
# Mandatory : NO
|
||||
# Default : -
|
||||
# May be used to embbed a post (un)installation script in the spec file.
|
||||
# The refered script file(s) will be read and directly
|
||||
# put after the %post or %postun section
|
||||
# One may verify which scriptlet has been included with
|
||||
# rpm -qp --scripts package.rpm
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
|
@ -236,6 +275,16 @@ IF(CPACK_RPM_PACKAGE_REQUIRES)
|
|||
SET(TMP_RPM_REQUIRES "Requires: ${CPACK_RPM_PACKAGE_REQUIRES}")
|
||||
ENDIF(CPACK_RPM_PACKAGE_REQUIRES)
|
||||
|
||||
# CPACK_RPM_PACKAGE_PROVIDES
|
||||
# Placeholder used to specify binary RPM dependencies (if any)
|
||||
# see http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html
|
||||
IF(CPACK_RPM_PACKAGE_PROVIDES)
|
||||
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||
MESSAGE("CPackRPM:Debug: User defined Provides:\n ${CPACK_RPM_PACKAGE_PROVIDES}")
|
||||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||
SET(TMP_RPM_PROVIDES "Provides: ${CPACK_RPM_PACKAGE_PROVIDES}")
|
||||
ENDIF(CPACK_RPM_PACKAGE_PROVIDES)
|
||||
|
||||
# CPACK_RPM_SPEC_INSTALL_POST
|
||||
# May be used to define a RPM post intallation script
|
||||
# for example setting it to "/bin/true" may prevent
|
||||
|
@ -247,6 +296,48 @@ IF(CPACK_RPM_SPEC_INSTALL_POST)
|
|||
SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}")
|
||||
ENDIF(CPACK_RPM_SPEC_INSTALL_POST)
|
||||
|
||||
# CPACK_RPM_POST_INSTALL_SCRIPT_FILE
|
||||
# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
|
||||
# May be used to embbed a post (un)installation script in the spec file.
|
||||
# The refered script file(s) will be read and directly
|
||||
# put after the %post or %postun section
|
||||
if(CPACK_RPM_POST_INSTALL_SCRIPT_FILE)
|
||||
if(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
|
||||
file(READ ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_POSTINSTALL)
|
||||
else(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
|
||||
message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}> does not exists - ignoring")
|
||||
endif(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
|
||||
endif(CPACK_RPM_POST_INSTALL_SCRIPT_FILE)
|
||||
|
||||
if(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE)
|
||||
if(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
|
||||
file(READ ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_POSTUNINSTALL)
|
||||
else(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
|
||||
message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}> does not exists - ignoring")
|
||||
endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
|
||||
endif(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE)
|
||||
|
||||
# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
|
||||
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
|
||||
# May be used to embbed a pre (un)installation script in the spec file.
|
||||
# The refered script file(s) will be read and directly
|
||||
# put after the %pre or %preun section
|
||||
if(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE)
|
||||
if(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
|
||||
file(READ ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_PREINSTALL)
|
||||
else(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
|
||||
message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}> does not exists - ignoring")
|
||||
endif(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
|
||||
endif(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE)
|
||||
|
||||
if(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE)
|
||||
if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
|
||||
file(READ ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_PREUNINSTALL)
|
||||
else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
|
||||
message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}> does not exists - ignoring")
|
||||
endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
|
||||
endif(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE)
|
||||
|
||||
# CPACK_RPM_SPEC_MORE_DEFINE
|
||||
# This is a generated spec rpm file spaceholder
|
||||
IF(CPACK_RPM_SPEC_MORE_DEFINE)
|
||||
|
@ -255,10 +346,6 @@ IF(CPACK_RPM_SPEC_MORE_DEFINE)
|
|||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||
ENDIF(CPACK_RPM_SPEC_MORE_DEFINE)
|
||||
|
||||
# CPACK_RPM_USER_BINARY_SPECFILE
|
||||
# FIXME when this is set then CPack should us the
|
||||
# user provided file.
|
||||
|
||||
# Now we may create the RPM build tree structure
|
||||
SET(CPACK_RPM_ROOTDIR "${CPACK_TOPLEVEL_DIRECTORY}")
|
||||
MESSAGE(STATUS "CPackRPM:Debug: Using CPACK_RPM_ROOTDIR=${CPACK_RPM_ROOTDIR}")
|
||||
|
@ -279,75 +366,111 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
|
|||
SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
|
||||
|
||||
# Use files tree to construct files command (spec file)
|
||||
EXECUTE_PROCESS(COMMAND find -type f
|
||||
# We should not forget to include symlinks (thus -o -type l)
|
||||
# We must remove the './' due to the local search (thus the sed)
|
||||
# Then we must authorize any man pages extension (adding * at the end)
|
||||
# because rpmbuild may automatically compress those files
|
||||
EXECUTE_PROCESS(COMMAND find -type f -o -type l
|
||||
COMMAND sed {s/\\.//}
|
||||
COMMAND sed {s/.*man.*\\/.*/&*/}
|
||||
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
|
||||
OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
|
||||
|
||||
|
||||
# The name of the final spec file to be used by rpmbuild
|
||||
SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec")
|
||||
IF(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||
# User may have specified SPECFILE just use it
|
||||
MESSAGE("CPackRPM: Will use user specified spec file: ${CPACK_RPM_USER_BINARY_SPECFILE}")
|
||||
# Note that user provided file is processed for @var replacement
|
||||
CONFIGURE_FILE(${CPACK_RPM_USER_BINARY_SPECFILE} ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
|
||||
ELSE(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||
# No User specified spec file generate a valid one using var values
|
||||
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
|
||||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||
FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}
|
||||
"# -*- rpm-spec -*-
|
||||
Buildroot: ${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}
|
||||
Summary: ${CPACK_RPM_PACKAGE_SUMMARY}
|
||||
Name: ${CPACK_RPM_PACKAGE_NAME}
|
||||
Version: ${CPACK_RPM_PACKAGE_VERSION}
|
||||
Release: ${CPACK_RPM_PACKAGE_RELEASE}
|
||||
License: ${CPACK_RPM_PACKAGE_LICENSE}
|
||||
Group: ${CPACK_RPM_PACKAGE_GROUP}
|
||||
Vendor: ${CPACK_RPM_PACKAGE_VENDOR}
|
||||
${TMP_RPM_REQUIRES}
|
||||
${TMP_RPM_BUILDARCH}
|
||||
|
||||
#p define prefix ${CMAKE_INSTALL_PREFIX}
|
||||
%define _rpmdir ${CPACK_RPM_DIRECTORY}
|
||||
%define _rpmfilename ${CPACK_RPM_FILE_NAME}
|
||||
|
||||
# Print out some debug information if we were asked for that
|
||||
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
|
||||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||
|
||||
# USER generated spec file handling.
|
||||
# We should generate a spec file template:
|
||||
# - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
|
||||
# - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
|
||||
#
|
||||
IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
|
||||
FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
|
||||
"# -*- rpm-spec -*-
|
||||
Buildroot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@
|
||||
Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@
|
||||
Name: \@CPACK_RPM_PACKAGE_NAME\@
|
||||
Version: \@CPACK_RPM_PACKAGE_VERSION\@
|
||||
Release: \@CPACK_RPM_PACKAGE_RELEASE\@
|
||||
License: \@CPACK_RPM_PACKAGE_LICENSE\@
|
||||
Group: \@CPACK_RPM_PACKAGE_GROUP\@
|
||||
Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
|
||||
\@TMP_RPM_REQUIRES\@
|
||||
\@TMP_RPM_PROVIDES\@
|
||||
\@TMP_RPM_BUILDARCH\@
|
||||
|
||||
#p define prefix \@CMAKE_INSTALL_PREFIX\@
|
||||
%define _rpmdir \@CPACK_RPM_DIRECTORY\@
|
||||
%define _rpmfilename \@CPACK_RPM_FILE_NAME\@
|
||||
%define _unpackaged_files_terminate_build 0
|
||||
%define _topdir ${CPACK_RPM_DIRECTORY}
|
||||
${TMP_RPM_SPEC_INSTALL_POST}
|
||||
${CPACK_RPM_SPEC_MORE_DEFINE}
|
||||
|
||||
%define _topdir \@CPACK_RPM_DIRECTORY\@
|
||||
\@TMP_RPM_SPEC_INSTALL_POST\@
|
||||
\@CPACK_RPM_SPEC_MORE_DEFINE\@
|
||||
|
||||
%description
|
||||
${CPACK_RPM_PACKAGE_DESCRIPTION}
|
||||
\@CPACK_RPM_PACKAGE_DESCRIPTION\@
|
||||
|
||||
# This is a shortcutted spec file
|
||||
# generated by CMake RPM generator
|
||||
# we skip the _prepn _build and _install
|
||||
# steps because CPack does that for us
|
||||
# WE MUST NOT DO ANYTHING in those steps because they
|
||||
# may fail for non-privileged user
|
||||
#p prep
|
||||
# This is a shortcutted spec file generated by CMake RPM generator
|
||||
# we skip _install step because CPack does that for us.
|
||||
# We do only save CPack installed tree in _prepr
|
||||
# and then restore it in build.
|
||||
%prep
|
||||
mv $RPM_BUILD_ROOT \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot
|
||||
|
||||
#p build
|
||||
|
||||
#p install
|
||||
%install
|
||||
if [ -e $RPM_BUILD_ROOT ];
|
||||
then
|
||||
mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/* $RPM_BUILD_ROOT
|
||||
else
|
||||
mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot $RPM_BUILD_ROOT
|
||||
fi
|
||||
|
||||
%clean
|
||||
|
||||
%post
|
||||
\@CPACK_RPM_SPEC_POSTINSTALL\@
|
||||
|
||||
%postun
|
||||
\@CPACK_RPM_SPEC_POSTUNINSTALL\@
|
||||
|
||||
%pre
|
||||
\@CPACK_RPM_SPEC_PREINSTALL\@
|
||||
|
||||
%preun
|
||||
\@CPACK_RPM_SPEC_PREUNINSTALL\@
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
#p dir %{prefix}
|
||||
#p {prefix}/*
|
||||
${CPACK_RPM_INSTALL_FILES}
|
||||
|
||||
%changelog
|
||||
* Sat Nov 28 2009 Erk <eric.noulard@gmail.com>
|
||||
Refix backup/restore install tree for OpenSuSE 11.2
|
||||
* Sun Nov 22 2009 Erk <eric.noulard@gmail.com>
|
||||
Include symlinks in the file list.
|
||||
* Sat Nov 14 2009 Erk <eric.noulard@gmail.com>
|
||||
Replace prep and build step with backup and restore
|
||||
of the previously CPack installed tree. This should
|
||||
mimic what is expected in rpmbuild usual steps
|
||||
* Wed Nov 11 2009 Erk <eric.noulard@gmail.com>
|
||||
Add support for USER defined pre/post[un]install scripts
|
||||
* Wed Oct 07 2009 Erk <eric.noulard@gmail.com>
|
||||
Add user custom spec file support
|
||||
* Sat Oct 03 2009 Kami <cmoidavid@gmail.com>
|
||||
Update to handle more precisely the files section
|
||||
* Mon Oct 03 2008 Erk <eric.noulard@gmail.com>
|
||||
|
@ -358,8 +481,27 @@ ${CPACK_RPM_INSTALL_FILES}
|
|||
* Tue Aug 16 2007 Erk <eric.noulard@gmail.com>
|
||||
Generated by CPack RPM Generator and associated macros
|
||||
")
|
||||
ENDIF(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||
# Stop here if we were asked to only generate a template USER spec file
|
||||
# The generated file may then be used as a template by user who wants
|
||||
# to customize their own spec file.
|
||||
IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
|
||||
MESSAGE(FATAL_ERROR "CPackRPM: STOP here Generated USER binary spec file templare is: ${CPACK_RPM_BINARY_SPECFILE}.in")
|
||||
ENDIF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
|
||||
ENDIF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
|
||||
|
||||
# After that we may either use a user provided spec file
|
||||
# or generate one using appropriate variables value.
|
||||
IF(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||
# User may have specified SPECFILE just use it
|
||||
MESSAGE("CPackRPM: Will use USER specified spec file: ${CPACK_RPM_USER_BINARY_SPECFILE}")
|
||||
# The user provided file is processed for @var replacement
|
||||
CONFIGURE_FILE(${CPACK_RPM_USER_BINARY_SPECFILE} ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
|
||||
ELSE(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||
# No User specified spec file, will use the generated spec file
|
||||
MESSAGE("CPackRPM: Will use GENERATED spec file: ${CPACK_RPM_BINARY_SPECFILE}")
|
||||
# Note the just created file is processed for @var replacement
|
||||
CONFIGURE_FILE(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
|
||||
ENDIF(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||
|
||||
IF(RPMBUILD_EXECUTABLE)
|
||||
# Now call rpmbuild using the SPECFILE
|
||||
|
|
|
@ -1,13 +1,49 @@
|
|||
# - Configure a project for testing with CTest/CDash
|
||||
# This file configures a project to use the CTest/CDash/Dart
|
||||
# testing/dashboard process. This module should be included
|
||||
# in the CMakeLists.txt file at the top of a project. Typical usage:
|
||||
# INCLUDE(CTest)
|
||||
# IF(BUILD_TESTING)
|
||||
# # ... testing related CMake code ...
|
||||
# ENDIF(BUILD_TESTING)
|
||||
# The BUILD_TESTING option is created by the CTest module to determine
|
||||
# whether testing support should be enabled. The default is ON.
|
||||
# Include this module in the top CMakeLists.txt file of a project to
|
||||
# enable testing with CTest and dashboard submissions to CDash:
|
||||
# project(MyProject)
|
||||
# ...
|
||||
# include(CTest)
|
||||
# The module automatically creates a BUILD_TESTING option that selects
|
||||
# whether to enable testing support (ON by default). After including
|
||||
# the module, use code like
|
||||
# if(BUILD_TESTING)
|
||||
# # ... CMake code to create tests ...
|
||||
# endif()
|
||||
# to creating tests when testing is enabled.
|
||||
#
|
||||
# To enable submissions to a CDash server, create a CTestConfig.cmake
|
||||
# file at the top of the project with content such as
|
||||
# set(CTEST_PROJECT_NAME "MyProject")
|
||||
# set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
|
||||
# set(CTEST_DROP_METHOD "http")
|
||||
# set(CTEST_DROP_SITE "my.cdash.org")
|
||||
# set(CTEST_DROP_LOCATION "/submit.php?project=MyProject")
|
||||
# set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
# (the CDash server can provide the file to a project administrator
|
||||
# who configures 'MyProject').
|
||||
# Settings in the config file are shared by both this CTest module and
|
||||
# the CTest command-line tool's dashboard script mode (ctest -S).
|
||||
#
|
||||
# While building a project for submission to CDash, CTest scans the
|
||||
# build output for errors and warnings and reports them with
|
||||
# surrounding context from the build log. This generic approach works
|
||||
# for all build tools, but does not give details about the command
|
||||
# invocation that produced a given problem. One may get more detailed
|
||||
# reports by adding
|
||||
# set(CTEST_USE_LAUNCHERS 1)
|
||||
# to the CTestConfig.cmake file. When this option is enabled, the
|
||||
# CTest module tells CMake's Makefile generators to invoke every
|
||||
# command in the generated build system through a CTest launcher
|
||||
# program. (Currently the CTEST_USE_LAUNCHERS option is ignored on
|
||||
# non-Makefile generators.) During a manual build each launcher
|
||||
# transparently runs the command it wraps. During a CTest-driven
|
||||
# build for submission to CDash each launcher reports detailed
|
||||
# information when its command fails or warns.
|
||||
# (Setting CTEST_USE_LAUNCHERS in CTestConfig.cmake is convenient, but
|
||||
# also adds the launcher overhead even for manual builds. One may
|
||||
# instead set it in a CTest dashboard script and add it to the CMake
|
||||
# cache for the build tree.)
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2005-2009 Kitware, Inc.
|
||||
|
@ -84,10 +120,6 @@ IF(BUILD_TESTING)
|
|||
ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
|
||||
SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT")
|
||||
|
||||
# make program just needs to use CMAKE_MAKE_PROGRAM which is required
|
||||
# to be defined by cmake
|
||||
SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
|
||||
|
||||
FIND_PROGRAM(CVSCOMMAND cvs )
|
||||
SET(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING
|
||||
"Options passed to the cvs update command.")
|
||||
|
@ -202,8 +234,17 @@ IF(BUILD_TESTING)
|
|||
ENDIF(DART_CXX_NAME MATCHES "devenv")
|
||||
SET(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}")
|
||||
ENDIF(NOT BUILDNAME)
|
||||
# set the build command
|
||||
BUILD_COMMAND(MAKECOMMAND ${MAKEPROGRAM} )
|
||||
|
||||
# the build command
|
||||
BUILD_COMMAND(MAKECOMMAND CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}")
|
||||
SET(MAKECOMMAND ${MAKECOMMAND} CACHE STRING "Command to build the project")
|
||||
|
||||
# the default build configuration the ctest build handler will use
|
||||
# if there is no -C arg given to ctest:
|
||||
SET(DEFAULT_CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
|
||||
IF(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
|
||||
SET(DEFAULT_CTEST_CONFIGURATION_TYPE "Release")
|
||||
ENDIF(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
|
||||
|
||||
IF(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
|
||||
SET(CTEST_USE_LAUNCHERS 0)
|
||||
|
|
|
@ -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,16 +1,29 @@
|
|||
# - Check sizeof a type
|
||||
# CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY])
|
||||
# Check if the type exists and determine size of type. if the type
|
||||
# exists, the size will be stored to the variable. This also
|
||||
# calls check_include_file for sys/types.h stdint.h
|
||||
# and stddef.h, setting HAVE_SYS_TYPES_H, HAVE_STDINT_H,
|
||||
# and HAVE_STDDEF_H. This is because many types are stored
|
||||
# in these include files.
|
||||
# VARIABLE - variable to store size if the type exists.
|
||||
# HAVE_${VARIABLE} - does the variable exists or not
|
||||
# BUILTIN_TYPES_ONLY - The third argument is optional and if
|
||||
# it is set to the string BUILTIN_TYPES_ONLY
|
||||
# this macro will not check for any header files.
|
||||
# Check if the type exists and determine its size.
|
||||
# On return, "HAVE_${VARIABLE}" holds the existence of the type,
|
||||
# and "${VARIABLE}" holds one of the following:
|
||||
# <size> = type has non-zero size <size>
|
||||
# "0" = type has arch-dependent size (see below)
|
||||
# "" = type does not exist
|
||||
# Furthermore, the variable "${VARIABLE}_CODE" holds C preprocessor
|
||||
# code to define the macro "${VARIABLE}" to the size of the type, or
|
||||
# leave the macro undefined if the type does not exist.
|
||||
#
|
||||
# The variable "${VARIABLE}" may be "0" when CMAKE_OSX_ARCHITECTURES
|
||||
# has multiple architectures for building OS X universal binaries.
|
||||
# This indicates that the type size varies across architectures.
|
||||
# In this case "${VARIABLE}_CODE" contains C preprocessor tests
|
||||
# mapping from each architecture macro to the corresponding type size.
|
||||
# The list of architecture macros is stored in "${VARIABLE}_KEYS", and
|
||||
# the value for each key is stored in "${VARIABLE}-${KEY}".
|
||||
#
|
||||
# If the BUILTIN_TYPES_ONLY option is not given, the macro checks for
|
||||
# headers <sys/types.h>, <stdint.h>, and <stddef.h>, and saves results
|
||||
# in HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H. The type
|
||||
# size check automatically includes the available headers, thus
|
||||
# supporting checks of types defined in the headers.
|
||||
#
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
|
@ -18,9 +31,7 @@
|
|||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
# These variables are referenced in CheckTypeSizeC.c so we have
|
||||
# to check for them.
|
||||
# CMAKE_EXTRA_INCLUDE_FILES = list of extra headers to include
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
|
@ -37,81 +48,144 @@
|
|||
|
||||
include(CheckIncludeFile)
|
||||
|
||||
MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||
IF(NOT "${ARGV2}" STREQUAL "BUILTIN_TYPES_ONLY")
|
||||
cmake_policy(PUSH)
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
|
||||
get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Helper function. DO NOT CALL DIRECTLY.
|
||||
function(__check_type_size_impl type var map builtin)
|
||||
message(STATUS "Check size of ${type}")
|
||||
|
||||
# Include header files.
|
||||
set(headers)
|
||||
if(builtin)
|
||||
if(HAVE_SYS_TYPES_H)
|
||||
set(headers "${headers}#include <sys/types.h>\n")
|
||||
endif()
|
||||
if(HAVE_STDINT_H)
|
||||
set(headers "${headers}#include <stdint.h>\n")
|
||||
endif()
|
||||
if(HAVE_STDDEF_H)
|
||||
set(headers "${headers}#include <stddef.h>\n")
|
||||
endif()
|
||||
endif()
|
||||
foreach(h ${CMAKE_EXTRA_INCLUDE_FILES})
|
||||
set(headers "${headers}#include \"${h}\"\n")
|
||||
endforeach()
|
||||
|
||||
# Perform the check.
|
||||
set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
|
||||
set(bin ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.bin)
|
||||
configure_file(${__check_type_size_dir}/CheckTypeSize.c.in ${src} @ONLY)
|
||||
try_compile(HAVE_${var} ${CMAKE_BINARY_DIR} ${src}
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS
|
||||
"-DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}"
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}"
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
|
||||
OUTPUT_VARIABLE output
|
||||
COPY_FILE ${bin}
|
||||
)
|
||||
|
||||
if(HAVE_${var})
|
||||
# The check compiled. Load information from the binary.
|
||||
file(STRINGS ${bin} strings LIMIT_COUNT 10 REGEX "INFO:size")
|
||||
|
||||
# Parse the information strings.
|
||||
set(regex_size ".*INFO:size\\[0*([^]]*)\\].*")
|
||||
set(regex_key " key\\[([^]]*)\\]")
|
||||
set(keys)
|
||||
set(code)
|
||||
set(mismatch)
|
||||
set(first 1)
|
||||
foreach(info ${strings})
|
||||
if("${info}" MATCHES "${regex_size}")
|
||||
# Get the type size.
|
||||
string(REGEX REPLACE "${regex_size}" "\\1" size "${info}")
|
||||
if(first)
|
||||
set(${var} ${size})
|
||||
elseif(NOT "${size}" STREQUAL "${${var}}")
|
||||
set(mismatch 1)
|
||||
endif()
|
||||
set(first 0)
|
||||
|
||||
# Get the architecture map key.
|
||||
string(REGEX MATCH "${regex_key}" key "${info}")
|
||||
string(REGEX REPLACE "${regex_key}" "\\1" key "${key}")
|
||||
if(key)
|
||||
set(code "${code}\nset(${var}-${key} \"${size}\")")
|
||||
list(APPEND keys ${key})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Update the architecture-to-size map.
|
||||
if(mismatch AND keys)
|
||||
configure_file(${__check_type_size_dir}/CheckTypeSizeMap.cmake.in ${map} @ONLY)
|
||||
set(${var} 0)
|
||||
else()
|
||||
file(REMOVE ${map})
|
||||
endif()
|
||||
|
||||
if(mismatch AND NOT keys)
|
||||
message(SEND_ERROR "CHECK_TYPE_SIZE found different results, consider setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no architecture !")
|
||||
endif()
|
||||
|
||||
message(STATUS "Check size of ${type} - done")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining size of ${type} passed with the following output:\n${output}\n\n")
|
||||
set(${var} "${${var}}" CACHE INTERNAL "CHECK_TYPE_SIZE: sizeof(${type})")
|
||||
else(HAVE_${var})
|
||||
# The check failed to compile.
|
||||
message(STATUS "Check size of ${type} - failed")
|
||||
file(READ ${src} content)
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining size of ${type} failed with the following output:\n${output}\n${src}:\n${content}\n\n")
|
||||
set(${var} "" CACHE INTERNAL "CHECK_TYPE_SIZE: ${type} unknown")
|
||||
file(REMOVE ${map})
|
||||
endif(HAVE_${var})
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
macro(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||
# Optionally check for standard headers.
|
||||
if("${ARGV2}" STREQUAL "BUILTIN_TYPES_ONLY")
|
||||
set(_builtin 0)
|
||||
else()
|
||||
set(_builtin 1)
|
||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||
ENDIF(NOT "${ARGV2}" STREQUAL "BUILTIN_TYPES_ONLY")
|
||||
|
||||
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
MESSAGE(STATUS "Check size of ${TYPE}")
|
||||
SET(CHECK_TYPE_SIZE_TYPE "${TYPE}")
|
||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||
"${CMAKE_REQUIRED_FLAGS}")
|
||||
FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
|
||||
IF("${def}")
|
||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
||||
ENDIF("${def}")
|
||||
ENDFOREACH(def)
|
||||
SET(CHECK_TYPE_SIZE_PREINCLUDE)
|
||||
SET(CHECK_TYPE_SIZE_PREMAIN)
|
||||
SET(CHECK_TYPE_SIZE_ADD_LIBRARIES)
|
||||
SET(CHECK_TYPE_SIZE_ADD_INCLUDES)
|
||||
endif()
|
||||
|
||||
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
||||
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||
ENDFOREACH(def)
|
||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||
SET(CHECK_TYPE_SIZE_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
||||
IF(CMAKE_REQUIRED_INCLUDES)
|
||||
SET(CHECK_TYPE_SIZE_ADD_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
ENDIF(CMAKE_REQUIRED_INCLUDES)
|
||||
# Compute or load the size or size map.
|
||||
set(${VARIABLE}_KEYS)
|
||||
set(_map_file ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${VARIABLE}.cmake)
|
||||
if(NOT DEFINED HAVE_${VARIABLE})
|
||||
__check_type_size_impl(${TYPE} ${VARIABLE} ${_map_file} ${_builtin})
|
||||
endif()
|
||||
include(${_map_file} OPTIONAL)
|
||||
set(_map_file)
|
||||
set(_builtin)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSizeC.c.in"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeC.c" IMMEDIATE @ONLY)
|
||||
FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeC.c"
|
||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
||||
TRY_COMPILE(HAVE_${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeC.c"
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
||||
"${CHECK_TYPE_SIZE_ADD_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT
|
||||
COPY_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize.bin" )
|
||||
# Create preprocessor code.
|
||||
if(${VARIABLE}_KEYS)
|
||||
set(${VARIABLE}_CODE)
|
||||
set(_if if)
|
||||
foreach(key ${${VARIABLE}_KEYS})
|
||||
set(${VARIABLE}_CODE "${${VARIABLE}_CODE}#${_if} defined(${key})\n# define ${VARIABLE} ${${VARIABLE}-${key}}\n")
|
||||
set(_if elif)
|
||||
endforeach()
|
||||
set(${VARIABLE}_CODE "${${VARIABLE}_CODE}#else\n# error ${VARIABLE} unknown\n#endif")
|
||||
set(_if)
|
||||
elseif(${VARIABLE})
|
||||
set(${VARIABLE}_CODE "#define ${VARIABLE} ${${VARIABLE}}")
|
||||
else()
|
||||
set(${VARIABLE}_CODE "/* #undef ${VARIABLE} */")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
IF(HAVE_${VARIABLE})
|
||||
FILE(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize.bin"
|
||||
CMAKE_CHECKTYPESIZE_STRINGS LIMIT_COUNT 2 REGEX "INFO:sizeof")
|
||||
|
||||
SET(CMAKE_CHECKTYPESIZE_FIRST_RESULT "FIRST_LOOP")
|
||||
FOREACH(info ${CMAKE_CHECKTYPESIZE_STRINGS})
|
||||
IF("${info}" MATCHES ".*INFO:sizeof\\[0*([^]]*)\\].*")
|
||||
STRING(REGEX REPLACE ".*INFO:sizeof\\[0*([^]]*)\\].*" "\\1" ${VARIABLE} "${info}")
|
||||
ENDIF("${info}" MATCHES ".*INFO:sizeof\\[0*([^]]*)\\].*")
|
||||
IF("${CMAKE_CHECKTYPESIZE_FIRST_RESULT}" STREQUAL "FIRST_LOOP")
|
||||
SET(CMAKE_CHECKTYPESIZE_FIRST_RESULT "${${VARIABLE}}")
|
||||
ENDIF("${CMAKE_CHECKTYPESIZE_FIRST_RESULT}" STREQUAL "FIRST_LOOP")
|
||||
IF(NOT "${CMAKE_CHECKTYPESIZE_FIRST_RESULT}" STREQUAL "${${VARIABLE}}")
|
||||
MESSAGE(SEND_ERROR "CHECK_TYPE_SIZE found different results, consider setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no architecture !")
|
||||
ENDIF(NOT "${CMAKE_CHECKTYPESIZE_FIRST_RESULT}" STREQUAL "${${VARIABLE}}")
|
||||
|
||||
ENDFOREACH(info ${CMAKE_CHECKTYPESIZE_STRINGS})
|
||||
MESSAGE(STATUS "Check size of ${TYPE} - done")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
|
||||
ELSE(HAVE_${VARIABLE})
|
||||
MESSAGE(STATUS "Check size of ${TYPE} - failed")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSizeC.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
|
||||
SET(${VARIABLE})
|
||||
ENDIF(HAVE_${VARIABLE})
|
||||
SET(${VARIABLE} "${${VARIABLE}}" CACHE INTERNAL "Result of CHECK_TYPE_SIZE" FORCE)
|
||||
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
ENDMACRO(CHECK_TYPE_SIZE)
|
||||
#-----------------------------------------------------------------------------
|
||||
cmake_policy(POP)
|
||||
|
|
|
@ -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()
|
|
@ -1,6 +1,5 @@
|
|||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G")
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h")
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G")
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h")
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G")
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-R")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-h")
|
||||
|
|
|
@ -15,6 +15,7 @@ BuildName: @BUILDNAME@
|
|||
|
||||
# Submission information
|
||||
IsCDash: @CTEST_DROP_SITE_CDASH@
|
||||
CDashVersion: @CTEST_CDASH_VERSION@
|
||||
DropSite: @DROP_SITE@
|
||||
DropLocation: @DROP_LOCATION@
|
||||
DropSiteUser: @DROP_SITE_USER@
|
||||
|
@ -30,6 +31,7 @@ NightlyStartTime: @NIGHTLY_START_TIME@
|
|||
# Commands for the build/test/submit cycle
|
||||
ConfigureCommand: "@CMAKE_COMMAND@" "@PROJECT_SOURCE_DIR@"
|
||||
MakeCommand: @MAKECOMMAND@
|
||||
DefaultCTestConfigurationType: @DEFAULT_CTEST_CONFIGURATION_TYPE@
|
||||
|
||||
# CVS options
|
||||
# Default is "-d -P -A"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
# [SVN_REPOSITORY url] # URL of Subversion repo
|
||||
# [SVN_REVISION rev] # Revision to checkout from Subversion repo
|
||||
# [URL /.../src.tgz] # Full path or URL of source
|
||||
# [TIMEOUT seconds] # Time allowed for file download operations
|
||||
# #--Update/Patch step----------
|
||||
# [UPDATE_COMMAND cmd...] # Source work-tree update command
|
||||
# [PATCH_COMMAND cmd...] # Command to patch downloaded source
|
||||
|
@ -203,19 +204,24 @@ define_property(DIRECTORY PROPERTY "EP_PREFIX" INHERITED
|
|||
|
||||
|
||||
function(_ep_write_downloadfile_script script_filename remote local timeout)
|
||||
if(NOT timeout)
|
||||
set(timeout 30)
|
||||
if(timeout)
|
||||
set(timeout_args TIMEOUT ${timeout})
|
||||
set(timeout_msg "${timeout} seconds")
|
||||
else()
|
||||
set(timeout_args "# no TIMEOUT")
|
||||
set(timeout_msg "none")
|
||||
endif()
|
||||
|
||||
file(WRITE ${script_filename}
|
||||
"message(STATUS \"downloading...
|
||||
src='${remote}'
|
||||
dst='${local}'\")
|
||||
dst='${local}'
|
||||
timeout='${timeout_msg}'\")
|
||||
|
||||
file(DOWNLOAD
|
||||
\"${remote}\"
|
||||
\"${local}\"
|
||||
TIMEOUT ${timeout}
|
||||
${timeout_args}
|
||||
STATUS status
|
||||
LOG log)
|
||||
|
||||
|
@ -694,7 +700,8 @@ function(_ep_add_download_command name)
|
|||
message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
|
||||
endif()
|
||||
set(file ${download_dir}/${fname})
|
||||
_ep_write_downloadfile_script("${stamp_dir}/download-${name}.cmake" "${url}" "${file}" "")
|
||||
get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)
|
||||
_ep_write_downloadfile_script("${stamp_dir}/download-${name}.cmake" "${url}" "${file}" "${timeout}")
|
||||
set(cmd ${CMAKE_COMMAND} -P ${stamp_dir}/download-${name}.cmake
|
||||
COMMAND)
|
||||
set(comment "Performing download step (download and extract) for '${name}'")
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
# Currently this module searches for the following version numbers:
|
||||
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
|
||||
# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0,
|
||||
# 1.40, 1.40.0
|
||||
# 1.40, 1.40.0, 1.41, 1.41.0
|
||||
#
|
||||
# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
|
||||
# add both 1.x and 1.x.0 as shown above. Official Boost include directories
|
||||
|
@ -264,6 +264,17 @@ FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
|
|||
SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE)
|
||||
ENDFUNCTION()
|
||||
|
||||
#
|
||||
# A convenience function for marking desired components
|
||||
# as found or not
|
||||
#
|
||||
function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no)
|
||||
foreach(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
set(Boost_${UPPERCOMPONENT}_FOUND ${_yes_or_no} CACHE INTERNAL "Whether the Boost ${COMPONENT} library found" FORCE)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# End functions/macros
|
||||
#
|
||||
|
@ -286,7 +297,7 @@ else(Boost_FIND_VERSION_EXACT)
|
|||
# The user has not requested an exact version. Among known
|
||||
# versions, find those that are acceptable to the user request.
|
||||
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
|
||||
"1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
|
||||
"1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
|
||||
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
|
||||
"1.34" "1.33.1" "1.33.0" "1.33")
|
||||
set(_boost_TEST_VERSIONS)
|
||||
|
@ -760,6 +771,10 @@ ELSE (_boost_IN_CACHE)
|
|||
endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" )
|
||||
endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" )
|
||||
|
||||
if (NOT Boost_FOUND)
|
||||
_Boost_MARK_COMPONENTS_FOUND(OFF)
|
||||
endif()
|
||||
|
||||
if (Boost_FOUND AND Boost_FIND_VERSION_EXACT)
|
||||
# If the user requested an exact version of Boost, check
|
||||
# that. We already know that the Boost version we have is >= the
|
||||
|
@ -773,10 +788,12 @@ ELSE (_boost_IN_CACHE)
|
|||
|
||||
# We'll set Boost_FOUND true again if we have an exact version match.
|
||||
set(Boost_FOUND FALSE)
|
||||
_Boost_MARK_COMPONENTS_FOUND(OFF)
|
||||
if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" )
|
||||
if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" )
|
||||
if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" )
|
||||
set( Boost_FOUND TRUE )
|
||||
_Boost_MARK_COMPONENTS_FOUND(ON)
|
||||
endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" )
|
||||
endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" )
|
||||
endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" )
|
||||
|
@ -796,19 +813,18 @@ ELSE (_boost_IN_CACHE)
|
|||
set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.")
|
||||
endif (NOT Boost_FOUND)
|
||||
|
||||
if (Boost_FOUND)
|
||||
set(_boost_CHECKED_COMPONENT FALSE)
|
||||
set(_Boost_MISSING_COMPONENTS)
|
||||
foreach(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} COMPONENT)
|
||||
set(_boost_CHECKED_COMPONENT TRUE)
|
||||
if(NOT Boost_${COMPONENT}_FOUND)
|
||||
string(TOLOWER ${COMPONENT} COMPONENT)
|
||||
list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
|
||||
set( Boost_FOUND FALSE)
|
||||
endif(NOT Boost_${COMPONENT}_FOUND)
|
||||
endforeach(COMPONENT)
|
||||
endif (Boost_FOUND)
|
||||
# Always check for missing components
|
||||
set(_boost_CHECKED_COMPONENT FALSE)
|
||||
set(_Boost_MISSING_COMPONENTS "")
|
||||
foreach(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} COMPONENT)
|
||||
set(_boost_CHECKED_COMPONENT TRUE)
|
||||
if(NOT Boost_${COMPONENT}_FOUND)
|
||||
string(TOLOWER ${COMPONENT} COMPONENT)
|
||||
list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
|
||||
set( Boost_FOUND FALSE)
|
||||
endif(NOT Boost_${COMPONENT}_FOUND)
|
||||
endforeach(COMPONENT)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
|
||||
|
@ -876,9 +892,9 @@ ELSE (_boost_IN_CACHE)
|
|||
IF (Boost_FOUND)
|
||||
IF (NOT Boost_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
|
||||
ENDIF(NOT Boost_FIND_QUIETLY)
|
||||
IF (NOT Boost_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found the following Boost libraries:")
|
||||
if(Boost_FIND_COMPONENTS)
|
||||
message(STATUS "Found the following Boost libraries:")
|
||||
endif()
|
||||
ENDIF(NOT Boost_FIND_QUIETLY)
|
||||
FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} )
|
||||
STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT )
|
||||
|
|
|
@ -476,7 +476,7 @@ mark_as_advanced(CUDA_NVCC_EXECUTABLE)
|
|||
|
||||
if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION)
|
||||
# Compute the version.
|
||||
exec_program(${CUDA_NVCC_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE NVCC_OUT)
|
||||
execute_process (COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT)
|
||||
string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR ${NVCC_OUT})
|
||||
string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${NVCC_OUT})
|
||||
set(CUDA_VERSION "${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}" CACHE STRING "Version of CUDA as computed from nvcc.")
|
||||
|
@ -813,7 +813,11 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
|
|||
if(CUDA_HOST_COMPILATION_CPP)
|
||||
set(CUDA_C_OR_CXX CXX)
|
||||
else(CUDA_HOST_COMPILATION_CPP)
|
||||
set(nvcc_flags ${nvcc_flags} --host-compilation C)
|
||||
if(CUDA_VERSION VERSION_LESS "3.0")
|
||||
set(nvcc_flags ${nvcc_flags} --host-compilation C)
|
||||
else()
|
||||
message(WARNING "--host-compilation flag is deprecated in CUDA version >= 3.0. Removing --host-compilation C flag" )
|
||||
endif()
|
||||
set(CUDA_C_OR_CXX C)
|
||||
endif(CUDA_HOST_COMPILATION_CPP)
|
||||
|
||||
|
|
|
@ -150,18 +150,32 @@ cuda_execute_process(
|
|||
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
|
||||
)
|
||||
|
||||
# For CUDA 2.3 and below, -G -M doesn't work, so remove the -G flag
|
||||
# for dependency generation and hope for the best.
|
||||
set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}")
|
||||
set(CUDA_VERSION @CUDA_VERSION@)
|
||||
if(CUDA_VERSION VERSION_LESS "3.0")
|
||||
cmake_policy(PUSH)
|
||||
# CMake policy 0007 NEW states that empty list elements are not
|
||||
# ignored. I'm just setting it to avoid the warning that's printed.
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
# Note that this will remove all occurances of -G.
|
||||
list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G")
|
||||
cmake_policy(POP)
|
||||
endif()
|
||||
|
||||
# Generate the dependency file
|
||||
cuda_execute_process(
|
||||
"Generating dependency file: ${NVCC_generated_dependency_file}"
|
||||
COMMAND "${CUDA_NVCC_EXECUTABLE}"
|
||||
"${source_file}"
|
||||
${CUDA_NVCC_FLAGS}
|
||||
${nvcc_flags}
|
||||
${CCBIN}
|
||||
${nvcc_host_compiler_flags}
|
||||
-DNVCC
|
||||
-M
|
||||
"${source_file}"
|
||||
-o "${NVCC_generated_dependency_file}"
|
||||
${CCBIN}
|
||||
${nvcc_flags}
|
||||
${nvcc_host_compiler_flags}
|
||||
${depends_CUDA_NVCC_FLAGS}
|
||||
-DNVCC
|
||||
${CUDA_NVCC_INCLUDE_ARGS}
|
||||
)
|
||||
|
||||
|
@ -209,12 +223,12 @@ cuda_execute_process(
|
|||
"Generating ${generated_file}"
|
||||
COMMAND "${CUDA_NVCC_EXECUTABLE}"
|
||||
"${source_file}"
|
||||
${CUDA_NVCC_FLAGS}
|
||||
${nvcc_flags}
|
||||
${CCBIN}
|
||||
${nvcc_host_compiler_flags}
|
||||
-DNVCC
|
||||
${format_flag} -o "${generated_file}"
|
||||
${CCBIN}
|
||||
${nvcc_flags}
|
||||
${nvcc_host_compiler_flags}
|
||||
${CUDA_NVCC_FLAGS}
|
||||
-DNVCC
|
||||
${CUDA_NVCC_INCLUDE_ARGS}
|
||||
)
|
||||
|
||||
|
|
|
@ -23,7 +23,13 @@ FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h)
|
|||
MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
|
||||
|
||||
# Look for the library.
|
||||
FIND_LIBRARY(CURL_LIBRARY NAMES curl)
|
||||
FIND_LIBRARY(CURL_LIBRARY NAMES
|
||||
curl
|
||||
# Windows MSVC prebuilts:
|
||||
curllib
|
||||
libcurl_imp
|
||||
curllib_static
|
||||
)
|
||||
MARK_AS_ADVANCED(CURL_LIBRARY)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
|
||||
|
@ -34,7 +40,4 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR
|
|||
IF(CURL_FOUND)
|
||||
SET(CURL_LIBRARIES ${CURL_LIBRARY})
|
||||
SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
|
||||
ELSE(CURL_FOUND)
|
||||
SET(CURL_LIBRARIES)
|
||||
SET(CURL_INCLUDE_DIRS)
|
||||
ENDIF(CURL_FOUND)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# - find DCMTK libraries
|
||||
# - find DCMTK libraries and applications
|
||||
#
|
||||
|
||||
# DCMTK_INCLUDE_DIR - Directories to include to use DCMTK
|
||||
|
@ -9,10 +9,11 @@
|
|||
# DCMTK_DIR can be used to make it simpler to find the various include
|
||||
# directories and compiled libraries if you've just compiled it in the
|
||||
# source tree. Just set it to the root of the tree where you extracted
|
||||
# the source.
|
||||
# the source (default to /usr/include/dcmtk/)
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2004-2009 Kitware, Inc.
|
||||
# Copyright 2009 Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
|
@ -26,14 +27,26 @@
|
|||
|
||||
#
|
||||
# Written for VXL by Amitha Perera.
|
||||
# Upgraded for GDCM by Mathieu Malaterre.
|
||||
#
|
||||
|
||||
IF( NOT DCMTK_FOUND )
|
||||
SET( DCMTK_DIR "/usr/include/dcmtk/"
|
||||
CACHE PATH "Root of DCMTK source tree (optional)." )
|
||||
MARK_AS_ADVANCED( DCMTK_DIR )
|
||||
ENDIF( NOT DCMTK_FOUND )
|
||||
|
||||
|
||||
FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
|
||||
${DCMTK_DIR}/config/include ${DCMTK_DIR}/include
|
||||
${DCMTK_DIR}/config/include
|
||||
${DCMTK_DIR}/config
|
||||
${DCMTK_DIR}/include
|
||||
)
|
||||
|
||||
FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
|
||||
${DCMTK_DIR}/ofstd/include ${DCMTK_DIR}/include/ofstd
|
||||
${DCMTK_DIR}/ofstd/include
|
||||
${DCMTK_DIR}/ofstd
|
||||
${DCMTK_DIR}/include/ofstd
|
||||
)
|
||||
|
||||
FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
|
||||
|
@ -47,8 +60,9 @@ FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
|
|||
|
||||
|
||||
FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
|
||||
${DCMTK_DIR}/dcmdata/include
|
||||
${DCMTK_DIR}/include/dcmdata
|
||||
${DCMTK_DIR}/dcmdata
|
||||
${DCMTK_DIR}/dcmdata/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
|
||||
|
@ -63,6 +77,7 @@ FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
|
|||
|
||||
FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
|
||||
${DCMTK_DIR}/dcmimgle/include
|
||||
${DCMTK_DIR}/dcmimgle
|
||||
${DCMTK_DIR}/include/dcmimgle
|
||||
)
|
||||
|
||||
|
@ -75,17 +90,18 @@ FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
|
|||
${DCMTK_DIR}/lib
|
||||
)
|
||||
|
||||
# MM: I could not find this library on debian system / dcmtk 3.5.4
|
||||
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
||||
${DCMTK_DIR}/imagectn/libsrc/Release
|
||||
${DCMTK_DIR}/imagectn/libsrc/
|
||||
${DCMTK_DIR}/imagectn/libsrc/Debug
|
||||
)
|
||||
${DCMTK_DIR}/imagectn/libsrc/Release
|
||||
${DCMTK_DIR}/imagectn/libsrc/
|
||||
${DCMTK_DIR}/imagectn/libsrc/Debug
|
||||
)
|
||||
|
||||
FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
||||
${DCMTK_DIR}/dcmnet/libsrc/Release
|
||||
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
||||
${DCMTK_DIR}/dcmnet/libsrc/
|
||||
)
|
||||
${DCMTK_DIR}/dcmnet/libsrc/Release
|
||||
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
||||
${DCMTK_DIR}/dcmnet/libsrc/
|
||||
)
|
||||
|
||||
|
||||
IF( DCMTK_config_INCLUDE_DIR
|
||||
|
@ -137,7 +153,30 @@ ENDIF( DCMTK_config_INCLUDE_DIR
|
|||
AND DCMTK_dcmimgle_INCLUDE_DIR
|
||||
AND DCMTK_dcmimgle_LIBRARY )
|
||||
|
||||
IF( NOT DCMTK_FOUND )
|
||||
SET( DCMTK_DIR "" CACHE PATH "Root of DCMTK source tree (optional)." )
|
||||
MARK_AS_ADVANCED( DCMTK_DIR )
|
||||
ENDIF( NOT DCMTK_FOUND )
|
||||
FIND_PROGRAM(DCMTK_DCMDUMP_EXECUTABLE dcmdump
|
||||
${DCMTK_DIR}/bin
|
||||
)
|
||||
|
||||
FIND_PROGRAM(DCMTK_DCMDJPEG_EXECUTABLE dcmdjpeg
|
||||
${DCMTK_DIR}/bin
|
||||
)
|
||||
|
||||
FIND_PROGRAM(DCMTK_DCMDRLE_EXECUTABLE dcmdrle
|
||||
${DCMTK_DIR}/bin
|
||||
)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
DCMTK_DCMDUMP_EXECUTABLE
|
||||
DCMTK_DCMDJPEG_EXECUTABLE
|
||||
DCMTK_DCMDRLE_EXECUTABLE
|
||||
DCMTK_config_INCLUDE_DIR
|
||||
DCMTK_dcmdata_INCLUDE_DIR
|
||||
DCMTK_dcmdata_LIBRARY
|
||||
DCMTK_dcmimgle_INCLUDE_DIR
|
||||
DCMTK_dcmimgle_LIBRARY
|
||||
DCMTK_imagedb_LIBRARY
|
||||
DCMTK_dcmnet_LIBRARY
|
||||
DCMTK_ofstd_INCLUDE_DIR
|
||||
DCMTK_ofstd_LIBRARY
|
||||
)
|
||||
|
||||
|
|
|
@ -64,6 +64,9 @@
|
|||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Version 0.8 (1/4/2010)
|
||||
# * Get module working under MacOSX fink by adding /sw/include, /sw/lib
|
||||
# to PATHS and the gobject library
|
||||
# Version 0.7 (3/22/09)
|
||||
# * Checked into CMake CVS
|
||||
# * Added versioning support
|
||||
|
@ -167,6 +170,8 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
|
|||
/opt/gnome/lib
|
||||
/opt/openwin/include
|
||||
/usr/openwin/lib
|
||||
/sw/include
|
||||
/sw/lib
|
||||
$ENV{GTKMM_BASEPATH}/include
|
||||
$ENV{GTKMM_BASEPATH}/lib
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/include
|
||||
|
@ -277,6 +282,7 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
|
|||
/opt/gnome/lib64
|
||||
/usr/openwin/lib
|
||||
/usr/openwin/lib64
|
||||
/sw/lib
|
||||
$ENV{GTKMM_BASEPATH}/lib
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib
|
||||
|
@ -386,10 +392,12 @@ endif()
|
|||
|
||||
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
||||
if(_GTK2_component STREQUAL "gtk")
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GLIB_LIBRARY glib false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h)
|
||||
|
|
|
@ -15,16 +15,17 @@
|
|||
#
|
||||
# Accepts the following variables as input:
|
||||
#
|
||||
# GTEST_ROOT - (as CMake or env. variable)
|
||||
# GTEST_ROOT - (as a CMake or environment variable)
|
||||
# The root directory of the gtest install prefix
|
||||
#
|
||||
# GTEST_MSVC_SEARCH - If on MSVC, enables searching the build tree of
|
||||
# GTest if set to MD or MT (defaults: MD)
|
||||
# GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to
|
||||
# "MD" or "MT" to enable searching a GTest build tree
|
||||
# (defaults: "MD")
|
||||
#
|
||||
#-----------------------
|
||||
# Example Usage:
|
||||
#
|
||||
# enable_testing(true)
|
||||
# enable_testing()
|
||||
# find_package(GTest REQUIRED)
|
||||
# include_directories(${GTEST_INCLUDE_DIRS})
|
||||
#
|
||||
|
@ -36,8 +37,10 @@
|
|||
#-----------------------
|
||||
#
|
||||
# If you would like each Google test to show up in CTest as
|
||||
# a test you may use the following macro. NOTE: It WILL slow
|
||||
# down your tests, so be warned.
|
||||
# a test you may use the following macro.
|
||||
# NOTE: It will slow down your tests by running an executable
|
||||
# for each test and test fixture. You will also have to rerun
|
||||
# CMake after adding or removing tests or test fixtures.
|
||||
#
|
||||
# GTEST_ADD_TESTS(executable extra_args ARGN)
|
||||
# executable = The path to the test executable
|
||||
|
@ -76,7 +79,7 @@ function(GTEST_ADD_TESTS executable extra_args)
|
|||
file(READ "${source}" contents)
|
||||
string(REGEX MATCHALL "TEST_?F?\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
|
||||
foreach(hit ${found_tests})
|
||||
string(REGEX REPLACE ".*\\(([A-Za-z_0-9]+)[, ]*([A-Za-z_0-9]+)\\).*" "\\1.\\2" test_name ${hit})
|
||||
string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*" "\\1.\\2" test_name ${hit})
|
||||
add_test(${test_name} ${executable} --gtest_filter=${test_name} ${extra_args})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
# with the HDF5 distribution that may be useful for regression testing.
|
||||
#
|
||||
# This module will define the following variables:
|
||||
# HDF5_INCLUDE_DIR - Location of the hdf5 includes
|
||||
# HDF5_INCLUDE_DIRS - Location of the hdf5 includes
|
||||
# HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated)
|
||||
# HDF5_DEFINITIONS - Required compiler definitions for HDF5
|
||||
# HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings.
|
||||
# HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings
|
||||
|
@ -106,7 +107,7 @@ endmacro()
|
|||
|
||||
# Parse a compile line for definitions, includes, library paths, and libraries.
|
||||
macro( _HDF5_parse_compile_line
|
||||
compile_line
|
||||
compile_line_var
|
||||
include_paths
|
||||
definitions
|
||||
library_paths
|
||||
|
@ -114,7 +115,7 @@ macro( _HDF5_parse_compile_line
|
|||
|
||||
# Match the include paths
|
||||
string( REGEX MATCHALL "-I([^\" ]+)" include_path_flags
|
||||
"${compile_line}"
|
||||
"${${compile_line_var}}"
|
||||
)
|
||||
foreach( IPATH ${include_path_flags} )
|
||||
string( REGEX REPLACE "^-I" "" IPATH ${IPATH} )
|
||||
|
@ -123,14 +124,14 @@ macro( _HDF5_parse_compile_line
|
|||
endforeach()
|
||||
|
||||
# Match the definitions
|
||||
string( REGEX MATCHALL "-D[^ ]*" definition_flags "${compile_line}" )
|
||||
string( REGEX MATCHALL "-D[^ ]*" definition_flags "${${compile_line_var}}" )
|
||||
foreach( DEF ${definition_flags} )
|
||||
list( APPEND ${definitions} ${DEF} )
|
||||
endforeach()
|
||||
|
||||
# Match the library paths
|
||||
string( REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" library_path_flags
|
||||
"${compile_line}"
|
||||
"${${compile_line_var}}"
|
||||
)
|
||||
|
||||
foreach( LPATH ${library_path_flags} )
|
||||
|
@ -143,7 +144,7 @@ macro( _HDF5_parse_compile_line
|
|||
# match only -l's preceded by a space or comma
|
||||
# this is to exclude directory names like xxx-linux/
|
||||
string( REGEX MATCHALL "[, ]-l([^\", ]+)" library_name_flags
|
||||
"${compile_line}" )
|
||||
"${${compile_line_var}}" )
|
||||
# strip the -l from all of the library flags and add to the search list
|
||||
foreach( LIB ${library_name_flags} )
|
||||
string( REGEX REPLACE "^[, ]-l" "" LIB ${LIB} )
|
||||
|
@ -151,7 +152,7 @@ macro( _HDF5_parse_compile_line
|
|||
endforeach()
|
||||
endmacro()
|
||||
|
||||
if( HDF5_INCLUDE_DIR AND HDF5_LIBRARIES )
|
||||
if( HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES )
|
||||
# Do nothing: we already have HDF5_INCLUDE_PATH and HDF5_LIBRARIES in the
|
||||
# cache, it would be a shame to override them
|
||||
else()
|
||||
|
@ -179,7 +180,7 @@ else()
|
|||
|
||||
foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} )
|
||||
if( HDF5_${LANGUAGE}_COMPILE_LINE )
|
||||
_HDF5_parse_compile_line( ${HDF5_${LANGUAGE}_COMPILE_LINE}
|
||||
_HDF5_parse_compile_line( HDF5_${LANGUAGE}_COMPILE_LINE
|
||||
HDF5_${LANGUAGE}_INCLUDE_FLAGS
|
||||
HDF5_${LANGUAGE}_DEFINITIONS
|
||||
HDF5_${LANGUAGE}_LIBRARY_DIRS
|
||||
|
@ -209,7 +210,7 @@ else()
|
|||
Include
|
||||
)
|
||||
mark_as_advanced( HDF5_${LANGUAGE}_INCLUDE_DIR )
|
||||
list( APPEND HDF5_INCLUDE_DIR ${HDF5_${LANGUAGE}_INCLUDE_DIR} )
|
||||
list( APPEND HDF5_INCLUDE_DIRS ${HDF5_${LANGUAGE}_INCLUDE_DIR} )
|
||||
|
||||
set( HDF5_${LANGUAGE}_LIBRARY_NAMES
|
||||
${HDF5_${LANGUAGE}_LIBRARY_NAMES_INIT}
|
||||
|
@ -266,8 +267,8 @@ else()
|
|||
# We may have picked up some duplicates in various lists during the above
|
||||
# process for the language bindings (both the C and C++ bindings depend on
|
||||
# libz for example). Remove the duplicates.
|
||||
if( HDF5_INCLUDE_DIR )
|
||||
list( REMOVE_DUPLICATES HDF5_INCLUDE_DIR )
|
||||
if( HDF5_INCLUDE_DIRS )
|
||||
list( REMOVE_DUPLICATES HDF5_INCLUDE_DIRS )
|
||||
endif()
|
||||
if( HDF5_LIBRARIES_DEBUG )
|
||||
list( REMOVE_DUPLICATES HDF5_LIBRARIES_DEBUG )
|
||||
|
@ -292,16 +293,16 @@ else()
|
|||
# If the HDF5 include directory was found, open H5pubconf.h to determine if
|
||||
# HDF5 was compiled with parallel IO support
|
||||
set( HDF5_IS_PARALLEL FALSE )
|
||||
if( HDF5_INCLUDE_DIR )
|
||||
if( EXISTS "${HDF5_INCLUDE_DIR}/h5pubconf.h" )
|
||||
file( STRINGS "${HDF5_INCLUDE_DIR}/H5pubconf.h"
|
||||
foreach( _dir HDF5_INCLUDE_DIRS )
|
||||
if( EXISTS "${_dir}/H5pubconf.h" )
|
||||
file( STRINGS "${_dir}/H5pubconf.h"
|
||||
HDF5_HAVE_PARALLEL_DEFINE
|
||||
REGEX "HAVE_PARALLEL 1" )
|
||||
if( HDF5_HAVE_PARALLEL_DEFINE )
|
||||
set( HDF5_IS_PARALLEL TRUE )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
|
||||
"HDF5 library compiled with parallel IO support" )
|
||||
mark_as_advanced( HDF5_IS_PARALLEL )
|
||||
|
@ -310,14 +311,18 @@ endif()
|
|||
|
||||
find_package_handle_standard_args( HDF5 DEFAULT_MSG
|
||||
HDF5_LIBRARIES
|
||||
HDF5_INCLUDE_DIR
|
||||
HDF5_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
HDF5_INCLUDE_DIR
|
||||
HDF5_INCLUDE_DIRS
|
||||
HDF5_LIBRARIES
|
||||
HDF5_DEFINTIONS
|
||||
HDF5_LIBRARY_DIRS
|
||||
HDF5_C_COMPILER_EXECUTABLE
|
||||
HDF5_CXX_COMPILER_EXECUTABLE )
|
||||
|
||||
# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
|
||||
# HDF5_INCLUDE_DIRS
|
||||
set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#
|
||||
# JNI_INCLUDE_DIRS = the include dirs to use
|
||||
# JNI_LIBRARIES = the libraries to use
|
||||
# JNI_FOUND = TRUE if JNI headers and libraries were found.
|
||||
# JAVA_AWT_LIBRARY = the path to the jawt library
|
||||
# JAVA_JVM_LIBRARY = the path to the jvm library
|
||||
# JAVA_INCLUDE_PATH = the include path to jni.h
|
||||
|
@ -206,6 +207,10 @@ FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
|
|||
${JAVA_INCLUDE_PATH}
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JNI DEFAULT_MSG JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
|
||||
JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
JAVA_AWT_LIBRARY
|
||||
JAVA_JVM_LIBRARY
|
||||
|
|
|
@ -3,13 +3,34 @@
|
|||
# include files and libraries are. This code sets the following
|
||||
# variables:
|
||||
#
|
||||
# JAVA_RUNTIME = the full path to the Java runtime
|
||||
# JAVA_COMPILE = the full path to the Java compiler
|
||||
# JAVA_ARCHIVE = the full path to the Java archiver
|
||||
# Java_JAVA_EXECUTABLE = the full path to the Java runtime
|
||||
# Java_JAVAC_EXECUTABLE = the full path to the Java compiler
|
||||
# Java_JAR_EXECUTABLE = the full path to the Java archiver
|
||||
# Java_VERSION_STRING = Version of the package found (java version), eg. 1.6.0_12
|
||||
# Java_VERSION_MAJOR = The major version of the package found.
|
||||
# Java_VERSION_MINOR = The minor version of the package found.
|
||||
# Java_VERSION_PATCH = The patch version of the package found.
|
||||
# Java_VERSION_TWEAK = The tweak version of the package found (after '_')
|
||||
# Java_VERSION = This is set to: $major.$minor.$patch(.$tweak)
|
||||
#
|
||||
# NOTE: ${Java_VERSION} and ${Java_VERSION_STRING} are not guaranteed to be
|
||||
# identical. For example some java version may return:
|
||||
# Java_VERSION_STRING = 1.5.0_17
|
||||
# and
|
||||
# Java_VERSION = 1.5.0.17
|
||||
#
|
||||
# another example is the Java OEM, with:
|
||||
# Java_VERSION_STRING = 1.6.0-oem
|
||||
# and
|
||||
# Java_VERSION = 1.6.0
|
||||
#
|
||||
# NOTE: At the moment this script will look for javac and jar component,
|
||||
# which means it will fail if javac or jar is not found.:w
|
||||
# See Bug #9840
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
# Copyright 2009 Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
|
@ -21,20 +42,23 @@
|
|||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
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"
|
||||
# The HINTS option should only be used for values computed from the system.
|
||||
SET(_JAVA_HINTS
|
||||
"[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"
|
||||
$ENV{JAVA_HOME}/bin
|
||||
/usr/bin
|
||||
)
|
||||
# Hard-coded guesses should still go in PATHS. This ensures that the user
|
||||
# environment can always override hard guesses.
|
||||
SET(_JAVA_PATHS
|
||||
/usr/lib/java/bin
|
||||
/usr/share/java/bin
|
||||
/usr/local/bin
|
||||
/usr/local/java/bin
|
||||
/usr/local/java/share/bin
|
||||
/usr/java/j2sdk1.4.2_04
|
||||
|
@ -43,23 +67,102 @@ SET(JAVA_BIN_PATH
|
|||
/usr/lib/j2sdk1.5-sun/bin
|
||||
/opt/sun-jdk-1.5.0.04/bin
|
||||
)
|
||||
FIND_PROGRAM(JAVA_RUNTIME
|
||||
FIND_PROGRAM(Java_JAVA_EXECUTABLE
|
||||
NAMES java
|
||||
PATHS ${JAVA_BIN_PATH}
|
||||
HINTS ${_JAVA_HINTS}
|
||||
PATHS ${_JAVA_PATHS}
|
||||
)
|
||||
|
||||
FIND_PROGRAM(JAVA_ARCHIVE
|
||||
IF(Java_JAVA_EXECUTABLE)
|
||||
set(_java_version_acceptable TRUE)
|
||||
EXECUTE_PROCESS(COMMAND ${Java_JAVA_EXECUTABLE} -version
|
||||
RESULT_VARIABLE res
|
||||
OUTPUT_VARIABLE var
|
||||
ERROR_VARIABLE var # sun-java output to stderr
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
IF( res )
|
||||
MESSAGE( FATAL_ERROR "Error executing java -version" )
|
||||
ELSE()
|
||||
# extract major/minor version and patch level from "java -version" output
|
||||
# Tested on linux using
|
||||
# 1. Sun / Sun OEM
|
||||
# 2. OpenJDK 1.6
|
||||
# 3. GCJ 1.5
|
||||
# 4. Kaffe 1.4.2
|
||||
IF(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_]+[oem-]*\".*")
|
||||
# This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
|
||||
STRING( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_]+)[oem-]*\".*"
|
||||
"\\1" Java_VERSION_STRING "${var}" )
|
||||
ELSEIF(var MATCHES "java full version \"kaffe-[0-9]+\\.[0-9]+\\.[0-9_]+\".*")
|
||||
# Kaffe style
|
||||
STRING( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*"
|
||||
"\\1" Java_VERSION_STRING "${var}" )
|
||||
ELSE()
|
||||
IF(NOT Java_FIND_QUIETLY)
|
||||
message(WARNING "regex not supported: ${var}. Please report")
|
||||
set(_java_version_acceptable FALSE)
|
||||
ENDIF(NOT Java_FIND_QUIETLY)
|
||||
ENDIF()
|
||||
STRING( REGEX REPLACE "([0-9]+).*" "\\1" Java_VERSION_MAJOR "${Java_VERSION_STRING}" )
|
||||
STRING( REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_MINOR "${Java_VERSION_STRING}" )
|
||||
STRING( REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_PATCH "${Java_VERSION_STRING}" )
|
||||
# warning tweak version can be empty:
|
||||
STRING( REGEX REPLACE "[0-9]+\\.[0-9]+\\.[0-9]+\\_?([0-9]*)$" "\\1" Java_VERSION_TWEAK "${Java_VERSION_STRING}" )
|
||||
if( Java_VERSION_TWEAK STREQUAL "" ) # check case where tweak is not defined
|
||||
set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH})
|
||||
else( )
|
||||
set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}.${Java_VERSION_TWEAK})
|
||||
endif( )
|
||||
# display info
|
||||
#MESSAGE( STATUS "Java version ${Java_VERSION_STRING} configured successfully!" ) # keep me, used for debug
|
||||
IF(NOT Java_FIND_QUIETLY)
|
||||
MESSAGE( STATUS "Java version ${Java_VERSION} configured successfully!" )
|
||||
ENDIF(NOT Java_FIND_QUIETLY)
|
||||
ENDIF()
|
||||
|
||||
# check version if requested:
|
||||
if( Java_FIND_VERSION )
|
||||
if("${Java_VERSION}" VERSION_LESS "${Java_FIND_VERSION}")
|
||||
set(_java_version_acceptable FALSE)
|
||||
endif("${Java_VERSION}" VERSION_LESS "${Java_FIND_VERSION}")
|
||||
if( Java_FIND_VERSION_EXACT )
|
||||
if("${Java_VERSION}" VERSION_GREATER "${Java_FIND_VERSION}")
|
||||
set(_java_version_acceptable FALSE)
|
||||
endif("${Java_VERSION}" VERSION_GREATER "${Java_FIND_VERSION}")
|
||||
endif( Java_FIND_VERSION_EXACT )
|
||||
endif( Java_FIND_VERSION )
|
||||
ENDIF(Java_JAVA_EXECUTABLE)
|
||||
|
||||
|
||||
FIND_PROGRAM(Java_JAR_EXECUTABLE
|
||||
NAMES jar
|
||||
PATHS ${JAVA_BIN_PATH}
|
||||
HINTS ${_JAVA_HINTS}
|
||||
PATHS ${_JAVA_PATHS}
|
||||
)
|
||||
|
||||
FIND_PROGRAM(JAVA_COMPILE
|
||||
FIND_PROGRAM(Java_JAVAC_EXECUTABLE
|
||||
NAMES javac
|
||||
PATHS ${JAVA_BIN_PATH}
|
||||
HINTS ${_JAVA_HINTS}
|
||||
PATHS ${_JAVA_PATHS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Java DEFAULT_MSG
|
||||
Java_JAVA_EXECUTABLE
|
||||
Java_JAR_EXECUTABLE
|
||||
Java_JAVAC_EXECUTABLE
|
||||
_java_version_acceptable
|
||||
)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
JAVA_RUNTIME
|
||||
JAVA_ARCHIVE
|
||||
JAVA_COMPILE
|
||||
)
|
||||
Java_JAVA_EXECUTABLE
|
||||
Java_JAR_EXECUTABLE
|
||||
Java_JAVAC_EXECUTABLE
|
||||
)
|
||||
|
||||
# LEGACY
|
||||
SET(JAVA_RUNTIME ${Java_JAVA_EXECUTABLE})
|
||||
SET(JAVA_ARCHIVE ${Java_JAR_EXECUTABLE})
|
||||
SET(JAVA_COMPILE ${Java_JAVAC_EXECUTABLE})
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# - Try to find LibXml2
|
||||
# - Try to find the LibXml2 xml processing library
|
||||
# Once done this will define
|
||||
#
|
||||
# LIBXML2_FOUND - System has LibXml2
|
||||
|
@ -21,20 +21,13 @@
|
|||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
|
||||
# in cache already
|
||||
SET(LibXml2_FIND_QUIETLY TRUE)
|
||||
ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
|
||||
SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
|
||||
|
||||
IF (NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
|
||||
SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
|
||||
ENDIF (NOT WIN32)
|
||||
|
||||
FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
|
||||
FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
|
||||
HINTS
|
||||
${PC_LIBXML_INCLUDEDIR}
|
||||
${PC_LIBXML_INCLUDE_DIRS}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# - Try to find LibXslt
|
||||
# - Try to find the LibXslt library
|
||||
# Once done this will define
|
||||
#
|
||||
# LIBXSLT_FOUND - system has LibXslt
|
||||
|
@ -20,26 +20,23 @@
|
|||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
IF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES)
|
||||
# in cache already
|
||||
SET(LibXslt_FIND_QUIETLY TRUE)
|
||||
ENDIF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PC_LIBXSLT libxslt)
|
||||
SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER})
|
||||
|
||||
IF (NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
INCLUDE(UsePkgConfig)
|
||||
PKGCONFIG(libxslt _LibXsltIncDir _LibXsltLinkDir _LibXsltLinkFlags _LibXsltCflags)
|
||||
SET(LIBXSLT_DEFINITIONS ${_LibXsltCflags})
|
||||
ENDIF (NOT WIN32)
|
||||
|
||||
FIND_PATH(LIBXSLT_INCLUDE_DIR libxslt/xslt.h
|
||||
${_LibXsltIncDir}
|
||||
FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h
|
||||
HINTS
|
||||
${PC_LIBXSLT_INCLUDEDIR}
|
||||
${PC_LIBXSLT_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
|
||||
PATHS
|
||||
${_LibXsltLinkDir}
|
||||
HINTS
|
||||
${PC_LIBXSLT_LIBDIR}
|
||||
${PC_LIBXSLT_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
# Microsoft HPC SDK is automatically added to the system path
|
||||
# Argonne National Labs MPICH2 sets a registry key that we can use.
|
||||
|
||||
set(MPI_PACKAGE_DIR
|
||||
set(_MPI_PACKAGE_DIR
|
||||
mpi
|
||||
mpich
|
||||
openmpi
|
||||
|
@ -83,15 +83,15 @@ set(MPI_PACKAGE_DIR
|
|||
"Microsoft Compute Cluster Pack"
|
||||
)
|
||||
|
||||
set(MPI_PREFIX_PATH)
|
||||
set(_MPI_PREFIX_PATH)
|
||||
if(WIN32)
|
||||
list(APPEND MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
|
||||
list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
|
||||
endif()
|
||||
|
||||
foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH})
|
||||
foreach(MpiPackageDir ${MPI_PREFIX_PATH})
|
||||
foreach(MpiPackageDir ${_MPI_PREFIX_PATH})
|
||||
if(EXISTS ${SystemPrefixDir}/${MpiPackageDir})
|
||||
list(APPEND MPI_PREFIX_PATH "${SystemPrefixDir}/${MpiPackageDir}")
|
||||
list(APPEND _MPI_PREFIX_PATH "${SystemPrefixDir}/${MpiPackageDir}")
|
||||
endif()
|
||||
endforeach(MpiPackageDir)
|
||||
endforeach(SystemPrefixDir)
|
||||
|
@ -99,21 +99,21 @@ endforeach(SystemPrefixDir)
|
|||
# Most mpi distros have some form of mpiexec which gives us something we can reliably look for.
|
||||
find_program(MPIEXEC
|
||||
NAMES mpiexec mpirun lamexec
|
||||
PATHS ${MPI_PREFIX_PATH}
|
||||
PATHS ${_MPI_PREFIX_PATH}
|
||||
PATH_SUFFIXES bin
|
||||
DOC "Executable for running MPI programs."
|
||||
)
|
||||
|
||||
# call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin).
|
||||
# This gives us a fairly reliable base directory to search for /bin /lib and /include from.
|
||||
get_filename_component(MPI_BASE_DIR "${MPIEXEC}" PATH)
|
||||
get_filename_component(MPI_BASE_DIR "${MPI_BASE_DIR}" PATH)
|
||||
get_filename_component(_MPI_BASE_DIR "${MPIEXEC}" PATH)
|
||||
get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH)
|
||||
|
||||
# If there is an mpi compiler find it and interogate (farther below) it for the include
|
||||
# and lib dirs otherwise we will continue to search from ${MPI_BASE_DIR}.
|
||||
# and lib dirs otherwise we will continue to search from ${_MPI_BASE_DIR}.
|
||||
find_program(MPI_COMPILER
|
||||
NAMES mpic++ mpicxx mpiCC mpicc
|
||||
HINTS "${MPI_BASE_DIR}"
|
||||
HINTS "${_MPI_BASE_DIR}"
|
||||
PATH_SUFFIXES bin
|
||||
DOC "MPI compiler. Used only to detect MPI compilation flags.")
|
||||
mark_as_advanced(MPI_COMPILER)
|
||||
|
@ -222,7 +222,7 @@ elseif (MPI_COMPILE_CMDLINE)
|
|||
# If all else fails, just search for mpi.h in the normal include
|
||||
# paths.
|
||||
find_path(MPI_INCLUDE_PATH mpi.h
|
||||
HINTS ${MPI_BASE_DIR} ${MPI_PREFIX_PATH}
|
||||
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
set(MPI_INCLUDE_PATH_WORK ${MPI_INCLUDE_PATH})
|
||||
|
@ -304,7 +304,7 @@ elseif (MPI_COMPILE_CMDLINE)
|
|||
else (MPI_COMPILE_CMDLINE)
|
||||
# No MPI compiler to interogate so attempt to find everything with find functions.
|
||||
find_path(MPI_INCLUDE_PATH mpi.h
|
||||
HINTS ${MPI_BASE_DIR} ${MPI_PREFIX_PATH}
|
||||
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
|
@ -317,13 +317,13 @@ else (MPI_COMPILE_CMDLINE)
|
|||
|
||||
find_library(MPI_LIBRARY
|
||||
NAMES mpi mpich msmpi
|
||||
HINTS ${MPI_BASE_DIR} ${MPI_PREFIX_PATH}
|
||||
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
|
||||
PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR}
|
||||
)
|
||||
|
||||
find_library(MPI_EXTRA_LIBRARY
|
||||
NAMES mpi++
|
||||
HINTS ${MPI_BASE_DIR} ${MPI_PREFIX_PATH}
|
||||
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
|
||||
PATH_SUFFIXES lib
|
||||
DOC "Extra MPI libraries to link against.")
|
||||
|
||||
|
@ -358,6 +358,6 @@ mark_as_advanced(MPI_INCLUDE_PATH MPI_COMPILE_FLAGS MPI_LINK_FLAGS MPI_LIBRARY
|
|||
MPI_EXTRA_LIBRARY)
|
||||
|
||||
# unset to cleanup namespace
|
||||
unset(MPI_PACKAGE_DIR)
|
||||
unset(MPI_PREFIX_PATH)
|
||||
unset(MPI_BASE_DIR)
|
||||
unset(_MPI_PACKAGE_DIR)
|
||||
unset(_MPI_PREFIX_PATH)
|
||||
unset(_MPI_BASE_DIR)
|
||||
|
|
|
@ -20,79 +20,86 @@
|
|||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
IF(OPENSSL_LIBRARIES)
|
||||
SET(OpenSSL_FIND_QUIETLY TRUE)
|
||||
ENDIF(OPENSSL_LIBRARIES)
|
||||
|
||||
IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
|
||||
SET(LIB_FOUND 1)
|
||||
ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
|
||||
|
||||
# http://www.slproweb.com/products/Win32OpenSSL.html
|
||||
FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/include"
|
||||
)
|
||||
|
||||
IF(WIN32 AND MSVC)
|
||||
# /MD and /MDd are the standard values - if somone wants to use
|
||||
# others, the libnames have to change here too
|
||||
# use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
|
||||
IF(WIN32 AND NOT CYGWIN)
|
||||
# MINGW should go here too
|
||||
IF(MSVC)
|
||||
# /MD and /MDd are the standard values - if someone wants to use
|
||||
# others, the libnames have to change here too
|
||||
# use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
|
||||
# TODO: handle /MT and static lib
|
||||
# In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
|
||||
# * MD for dynamic-release
|
||||
# * MDd for dynamic-debug
|
||||
# * MT for static-release
|
||||
# * MTd for static-debug
|
||||
|
||||
FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd libeay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/VC"
|
||||
)
|
||||
FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD libeay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/VC"
|
||||
)
|
||||
FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/VC"
|
||||
)
|
||||
FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/VC"
|
||||
)
|
||||
# Implementation details:
|
||||
# We are using the libraries located in the VC subdir instead of the parent directory eventhough :
|
||||
# libeay32MD.lib is identical to ../libeay32.lib, and
|
||||
# ssleay32MD.lib is identical to ../ssleay32.lib
|
||||
FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd libeay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/VC"
|
||||
)
|
||||
FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD libeay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/VC"
|
||||
)
|
||||
FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssleay32 ssl
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/VC"
|
||||
)
|
||||
FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssleay32 ssl
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/VC"
|
||||
)
|
||||
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
set( OPENSSL_LIBRARIES
|
||||
optimized ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE}
|
||||
debug ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG}
|
||||
)
|
||||
else()
|
||||
set( OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} )
|
||||
endif()
|
||||
MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE)
|
||||
MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE)
|
||||
ELSEIF(MINGW)
|
||||
# same player, for MingW
|
||||
FIND_LIBRARY(LIB_EAY NAMES libeay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/MinGW"
|
||||
)
|
||||
FIND_LIBRARY(SSL_EAY NAMES ssleay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib/MinGW"
|
||||
)
|
||||
MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
|
||||
set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
|
||||
ELSE(MSVC)
|
||||
# Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues:
|
||||
FIND_LIBRARY(LIB_EAY NAMES libeay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib"
|
||||
)
|
||||
FIND_LIBRARY(SSL_EAY NAMES ssleay32
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]/lib"
|
||||
)
|
||||
MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
|
||||
set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
|
||||
ENDIF(MSVC)
|
||||
ELSE(WIN32 AND NOT CYGWIN)
|
||||
|
||||
IF(MSVC_IDE)
|
||||
IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
|
||||
SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} debug ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG})
|
||||
ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
|
||||
SET(OPENSSL_LIBRARIES NOTFOUND)
|
||||
MESSAGE(STATUS "Could not find the debug and release version of openssl")
|
||||
ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
|
||||
ELSE(MSVC_IDE)
|
||||
STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
|
||||
IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
|
||||
SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG})
|
||||
ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
|
||||
SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE})
|
||||
ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
|
||||
ENDIF(MSVC_IDE)
|
||||
MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE)
|
||||
MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE)
|
||||
ELSE(WIN32 AND MSVC)
|
||||
FIND_LIBRARY(OPENSSL_SSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD)
|
||||
FIND_LIBRARY(OPENSSL_CRYPTO_LIBRARIES NAMES crypto)
|
||||
MARK_AS_ADVANCED(OPENSSL_CRYPTO_LIBRARIES OPENSSL_SSL_LIBRARIES)
|
||||
|
||||
FIND_LIBRARY(OPENSSL_SSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD)
|
||||
FIND_LIBRARY(OPENSSL_CRYPTO_LIBRARIES NAMES crypto)
|
||||
MARK_AS_ADVANCED(OPENSSL_CRYPTO_LIBRARIES OPENSSL_SSL_LIBRARIES)
|
||||
SET(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES})
|
||||
|
||||
SET(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES})
|
||||
ENDIF(WIN32 AND NOT CYGWIN)
|
||||
|
||||
ENDIF(WIN32 AND MSVC)
|
||||
|
||||
IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
|
||||
SET(OPENSSL_FOUND TRUE)
|
||||
ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
|
||||
SET(OPENSSL_FOUND FALSE)
|
||||
ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
|
||||
|
||||
IF (OPENSSL_FOUND)
|
||||
IF (NOT OpenSSL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}")
|
||||
ENDIF (NOT OpenSSL_FIND_QUIETLY)
|
||||
ELSE (OPENSSL_FOUND)
|
||||
IF (OpenSSL_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could NOT find OpenSSL")
|
||||
ENDIF (OpenSSL_FIND_REQUIRED)
|
||||
ENDIF (OPENSSL_FOUND)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenSSL DEFAULT_MSG
|
||||
OPENSSL_LIBRARIES
|
||||
OPENSSL_INCLUDE_DIR
|
||||
)
|
||||
|
||||
MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
|
||||
|
||||
|
|
|
@ -44,6 +44,14 @@ FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|||
# Avoid finding the .dll in the PATH. We want the .lib.
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
# Look for the static library in the Python config directory
|
||||
FIND_LIBRARY(PYTHON_LIBRARY
|
||||
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
|
||||
# Avoid finding the .dll in the PATH. We want the .lib.
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
# This is where the static library is usually located
|
||||
PATH_SUFFIXES python${_CURRENT_VERSION}/config
|
||||
)
|
||||
|
||||
# For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
|
||||
# PYTHON_INCLUDE_DIR is not set.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -152,6 +152,7 @@ ENDIF(NOT RUBY_VERSION_MAJOR)
|
|||
SET(RUBY_VERSION "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}")
|
||||
SET(_RUBY_VERSION_SHORT "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}")
|
||||
SET(_RUBY_VERSION_SHORT_NODOT "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}")
|
||||
SET(_RUBY_NODOT_VERSION "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}${RUBY_VERSION_PATCH}")
|
||||
|
||||
# Now we know which version we found
|
||||
IF(Ruby_FIND_VERSION)
|
||||
|
@ -180,7 +181,6 @@ SET(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIR} )
|
|||
|
||||
# if ruby > 1.8 is required or if ruby > 1.8 was found, search for the config.h dir
|
||||
IF( ${Ruby_FIND_VERSION_SHORT_NODOT} GREATER 18 OR ${_RUBY_VERSION_SHORT_NODOT} GREATER 18 OR RUBY_HDR_DIR)
|
||||
message(STATUS "lookign for config.h")
|
||||
FIND_PATH(RUBY_CONFIG_INCLUDE_DIR
|
||||
NAMES ruby/config.h config.h
|
||||
HINTS
|
||||
|
@ -214,10 +214,10 @@ IF(WIN32)
|
|||
ENDIF( MSVC90 )
|
||||
|
||||
LIST(APPEND _RUBY_POSSIBLE_LIB_NAMES
|
||||
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${RUBY_NODOT_VERSION}"
|
||||
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${RUBY_NODOT_VERSION}-static"
|
||||
"msvcrt-ruby${RUBY_NODOT_VERSION}"
|
||||
"msvcrt-ruby${RUBY_NODOT_VERSION}-static" )
|
||||
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}"
|
||||
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}-static"
|
||||
"msvcrt-ruby${_RUBY_NODOT_VERSION}"
|
||||
"msvcrt-ruby${_RUBY_NODOT_VERSION}-static" )
|
||||
ENDIF(WIN32)
|
||||
|
||||
FIND_LIBRARY(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
IF(WIN32 AND UNIX)
|
||||
IF(CYGWIN)
|
||||
FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80)
|
||||
ENDIF(WIN32 AND UNIX)
|
||||
ENDIF(CYGWIN)
|
||||
|
||||
GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
|
||||
GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#
|
||||
# and also the following more fine grained variables:
|
||||
# Include paths: X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND
|
||||
# X11_X11_INCLUDE_PATH, X11_X11_LIB
|
||||
# X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND
|
||||
# X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND
|
||||
# X11_Xau_INCLUDE_PATH, X11_Xau_LIB, X11_Xau_FOUND
|
||||
|
|
|
@ -100,6 +100,10 @@ if(FortranCInterface_SOURCE_DIR)
|
|||
return()
|
||||
endif()
|
||||
|
||||
# Use CMake 2.8.0 behavior for this module regardless of including context.
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(VERSION 2.8.0)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Verify that C and Fortran are available.
|
||||
foreach(lang C Fortran)
|
||||
|
@ -244,6 +248,9 @@ function(FortranCInterface_VERIFY)
|
|||
VerifyFortranC
|
||||
CMAKE_FLAGS -DVERIFY_CXX=${verify_cxx}
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
|
||||
"-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}"
|
||||
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
|
||||
OUTPUT_VARIABLE _output)
|
||||
file(WRITE "${FortranCInterface_BINARY_DIR}/Verify${lang}/output.txt" "${_output}")
|
||||
|
||||
|
@ -273,3 +280,6 @@ function(FortranCInterface_VERIFY)
|
|||
"The output was:\n ${_output}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Restore including context policies.
|
||||
cmake_policy(POP)
|
||||
|
|
|
@ -56,6 +56,7 @@ list(REMOVE_DUPLICATES module_symbols)
|
|||
# Note that some compiler manglings cannot be invoked from C:
|
||||
# MIPSpro uses "MY_SUB.in.MY_MODULE"
|
||||
# SunPro uses "my_module.my_sub_"
|
||||
# PathScale uses "MY_SUB.in.MY_MODULE"
|
||||
|
||||
# Add module symbols only with Fortran90.
|
||||
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
||||
|
|
|
@ -39,6 +39,9 @@ try_compile(FortranCInterface_COMPILED
|
|||
${FortranCInterface_BINARY_DIR}
|
||||
${FortranCInterface_SOURCE_DIR}
|
||||
FortranCInterface
|
||||
CMAKE_FLAGS
|
||||
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
|
||||
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
|
||||
OUTPUT_VARIABLE FortranCInterface_OUTPUT)
|
||||
set(FortranCInterface_COMPILED ${FortranCInterface_COMPILED})
|
||||
unset(FortranCInterface_COMPILED CACHE)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -389,7 +389,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
|
|||
string(TOLOWER "$ENV{windir}" windir)
|
||||
string(REGEX REPLACE "\\\\" "/" windir "${windir}")
|
||||
|
||||
if(lower MATCHES "^(${sysroot}/system|${windir}/system|(.*/)*msvc[^/]+dll)")
|
||||
if(lower MATCHES "^(${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*msvc[^/]+dll)")
|
||||
set(is_system 1)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# By including this file, all files in the CMAKE_INSTALL_DEBUG_LIBRARIES,
|
||||
# will be installed with INSTALL_PROGRAMS into /bin for WIN32 and /lib
|
||||
# for non-win32. If CMAKE_SKIP_INSTALL_RULES is set to TRUE before including
|
||||
# this file, then the INSTALL command is not called. The use can use
|
||||
# this file, then the INSTALL command is not called. The user can use
|
||||
# the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install
|
||||
# command and install them into any directory they want.
|
||||
# If it is the MSVC compiler, then the microsoft run
|
||||
# time libraries will be found add automatically added to the
|
||||
# time libraries will be found and automatically added to the
|
||||
# CMAKE_INSTALL_DEBUG_LIBRARIES, and installed.
|
||||
# If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC
|
||||
# compiler, then the debug libraries are installed when available.
|
||||
|
@ -114,6 +114,34 @@ IF(MSVC)
|
|||
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||
ENDIF(MSVC90)
|
||||
|
||||
IF(MSVC10)
|
||||
# Find the runtime library redistribution directory.
|
||||
FIND_PATH(MSVC10_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT
|
||||
PATHS
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../VC/redist"
|
||||
"${base_dir}/VC/redist"
|
||||
)
|
||||
MARK_AS_ADVANCED(MSVC10_REDIST_DIR)
|
||||
SET(MSVC10_CRT_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT")
|
||||
|
||||
# Install the manifest that allows DLLs to be loaded from the
|
||||
# directory containing the executable.
|
||||
SET(__install__libs
|
||||
"${MSVC10_CRT_DIR}/Microsoft.VC100.CRT.manifest"
|
||||
"${MSVC10_CRT_DIR}/msvcp100.dll"
|
||||
"${MSVC10_CRT_DIR}/msvcr100.dll"
|
||||
)
|
||||
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||
SET(MSVC10_CRT_DIR
|
||||
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
|
||||
SET(__install__libs ${__install__libs}
|
||||
"${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
|
||||
"${MSVC10_CRT_DIR}/msvcp100d.dll"
|
||||
"${MSVC10_CRT_DIR}/msvcr100d.dll"
|
||||
)
|
||||
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||
ENDIF(MSVC10)
|
||||
|
||||
IF(CMAKE_INSTALL_MFC_LIBRARIES)
|
||||
IF(MSVC70)
|
||||
SET(__install__libs ${__install__libs}
|
||||
|
@ -207,6 +235,47 @@ IF(MSVC)
|
|||
)
|
||||
ENDIF(MSVC90)
|
||||
|
||||
IF(MSVC10)
|
||||
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||
SET(MSVC10_MFC_DIR
|
||||
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugMFC")
|
||||
SET(__install__libs ${__install__libs}
|
||||
"${MSVC10_MFC_DIR}/Microsoft.VC100.DebugMFC.manifest"
|
||||
"${MSVC10_MFC_DIR}/mfc100d.dll"
|
||||
"${MSVC10_MFC_DIR}/mfc100ud.dll"
|
||||
"${MSVC10_MFC_DIR}/mfcm100d.dll"
|
||||
"${MSVC10_MFC_DIR}/mfcm100ud.dll"
|
||||
)
|
||||
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
|
||||
|
||||
SET(MSVC10_MFC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFC")
|
||||
# Install the manifest that allows DLLs to be loaded from the
|
||||
# directory containing the executable.
|
||||
SET(__install__libs ${__install__libs}
|
||||
"${MSVC10_MFC_DIR}/Microsoft.VC100.MFC.manifest"
|
||||
"${MSVC10_MFC_DIR}/mfc100.dll"
|
||||
"${MSVC10_MFC_DIR}/mfc100u.dll"
|
||||
"${MSVC10_MFC_DIR}/mfcm100.dll"
|
||||
"${MSVC10_MFC_DIR}/mfcm100u.dll"
|
||||
)
|
||||
# include the language dll's for vs10 as well as the actuall dll's
|
||||
SET(MSVC10_MFCLOC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFCLOC")
|
||||
# Install the manifest that allows DLLs to be loaded from the
|
||||
# directory containing the executable.
|
||||
SET(__install__libs ${__install__libs}
|
||||
"${MSVC10_MFCLOC_DIR}/Microsoft.VC100.MFCLOC.manifest"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100chs.dll"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100cht.dll"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100enu.dll"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100esp.dll"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100deu.dll"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100fra.dll"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100ita.dll"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100jpn.dll"
|
||||
"${MSVC10_MFCLOC_DIR}/mfc100kor.dll"
|
||||
)
|
||||
ENDIF(MSVC10)
|
||||
|
||||
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
|
||||
|
||||
FOREACH(lib
|
||||
|
|
|
@ -322,7 +322,11 @@ MACRO(KDE3_INSTALL_LIBTOOL_FILE _target)
|
|||
FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n")
|
||||
FILE(APPEND ${_laname} "dlname='${_soname}'\n")
|
||||
FILE(APPEND ${_laname} "# Names of this library\n")
|
||||
FILE(APPEND ${_laname} "library_names='${_soname} ${_soname} ${_soname}'\n")
|
||||
IF(CYGWIN)
|
||||
FILE(APPEND ${_laname} "library_names='${_soname}'\n")
|
||||
ELSE(CYGWIN)
|
||||
FILE(APPEND ${_laname} "library_names='${_soname} ${_soname} ${_soname}'\n")
|
||||
ENDIF(CYGWIN)
|
||||
FILE(APPEND ${_laname} "# The name of the static archive\n")
|
||||
FILE(APPEND ${_laname} "old_library=''\n")
|
||||
FILE(APPEND ${_laname} "# Libraries that this one depends upon.\n")
|
||||
|
|
|
@ -74,7 +74,7 @@ Var AR_RegFlags
|
|||
|
||||
ClearErrors
|
||||
;Reading component status from registry
|
||||
ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@\Components\${SecName}" "Installed"
|
||||
ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" "Installed"
|
||||
IfErrors "default_${SecName}"
|
||||
;Status will stay default if registry value not found
|
||||
;(component was never installed)
|
||||
|
@ -107,13 +107,13 @@ Var AR_RegFlags
|
|||
;Section is not selected:
|
||||
;Calling Section uninstall macro and writing zero installed flag
|
||||
!insertmacro "Remove_${${SecName}}"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@\Components\${SecName}" \
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
|
||||
"Installed" 0
|
||||
Goto "exit_${SecName}"
|
||||
|
||||
"leave_${SecName}:"
|
||||
;Section is selected:
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@\Components\${SecName}" \
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
|
||||
"Installed" 1
|
||||
|
||||
"exit_${SecName}:"
|
||||
|
@ -484,7 +484,7 @@ Function ConditionalAddToRegisty
|
|||
Pop $0
|
||||
Pop $1
|
||||
StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
|
||||
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" \
|
||||
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" \
|
||||
"$1" "$0"
|
||||
;MessageBox MB_OK "Set Registry: '$1' to '$0'"
|
||||
DetailPrint "Set install registry entry: '$1' to '$0'"
|
||||
|
@ -794,17 +794,17 @@ FunctionEnd
|
|||
|
||||
Section "Uninstall"
|
||||
ReadRegStr $START_MENU SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "StartMenu"
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "StartMenu"
|
||||
;MessageBox MB_OK "Start menu is in: $START_MENU"
|
||||
ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "DoNotAddToPath"
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "DoNotAddToPath"
|
||||
ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "AddToPathAllUsers"
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathAllUsers"
|
||||
ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "AddToPathCurrentUser"
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathCurrentUser"
|
||||
;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
|
||||
ReadRegStr $INSTALL_DESKTOP SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "InstallToDesktop"
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "InstallToDesktop"
|
||||
;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
|
||||
|
||||
@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
|
||||
|
@ -821,7 +821,7 @@ Section "Uninstall"
|
|||
|
||||
;Remove the uninstaller itself.
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
||||
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@"
|
||||
|
||||
;Remove the installation directory if it is empty.
|
||||
RMDir "$INSTDIR"
|
||||
|
|
|
@ -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()
|
|
@ -15,16 +15,6 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
|||
# Files named "libfoo.a" may actually be shared libraries.
|
||||
SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
|
||||
|
||||
# CXX Compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-G") # -shared
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# C Compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
# since .a can be a static or shared library on AIX, we can not do this.
|
||||
# at some point if we wanted it, we would have to figure out if a .a is
|
||||
# static or shared, then we could add this back:
|
||||
|
|
|
@ -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,3 @@
|
|||
include(Platform/Darwin-GNU)
|
||||
__darwin_compiler_gnu(C)
|
||||
cmake_gnu_has_isysroot(C)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
include(Platform/Darwin-GNU)
|
||||
__darwin_compiler_gnu(CXX)
|
||||
cmake_gnu_has_isysroot(CXX)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/Darwin-GNU)
|
||||
__darwin_compiler_gnu(Fortran)
|
|
@ -1,3 +1,29 @@
|
|||
|
||||
#=============================================================================
|
||||
# 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(__DARWIN_COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__DARWIN_COMPILER_GNU 1)
|
||||
|
||||
macro(__darwin_compiler_gnu lang)
|
||||
# GNU does not have -shared on OS X
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -headerpad_max_install_names")
|
||||
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -headerpad_max_install_names")
|
||||
endmacro()
|
||||
|
||||
macro(cmake_gnu_has_isysroot lang)
|
||||
if("x${CMAKE_${lang}_HAS_ISYSROOT}" STREQUAL "x")
|
||||
set(_doc "${lang} compiler has -isysroot")
|
||||
|
|
|
@ -172,8 +172,6 @@ IF(NOT XCODE)
|
|||
# but the fact that the setting exists will cause the generators to support
|
||||
# soname computation.
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-install_name")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-install_name")
|
||||
ENDIF(NOT XCODE)
|
||||
|
||||
# Xcode does not support -isystem yet.
|
||||
|
|
|
@ -7,9 +7,7 @@ IF(EXISTS /usr/include/dlfcn.h)
|
|||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
||||
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
|
||||
SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
||||
SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic")
|
||||
ENDIF(EXISTS /usr/include/dlfcn.h)
|
||||
|
||||
# Shared libraries with no builtin soname may not be linked safely by
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
SET(CMAKE_DL_LIBS "dl")
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic")
|
||||
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/HP-UX-GNU)
|
||||
__hpux_compiler_gnu(C)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/HP-UX-GNU)
|
||||
__hpux_compiler_gnu(CXX)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/HP-UX-GNU)
|
||||
__hpux_compiler_gnu(Fortran)
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
#=============================================================================
|
||||
# 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(__HPUX_COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__HPUX_COMPILER_GNU 1)
|
||||
|
||||
macro(__hpux_compiler_gnu lang)
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-E,-b,+nodefaultrpath")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h")
|
||||
endmacro()
|
|
@ -15,13 +15,6 @@ SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
|
|||
|
||||
# fortran
|
||||
IF(CMAKE_COMPILER_IS_GNUG77)
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,+b") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") # : or empty
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,+h")
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic
|
||||
ELSE(CMAKE_COMPILER_IS_GNUG77)
|
||||
# use ld directly to create shared libraries for hp cc
|
||||
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
||||
|
@ -37,14 +30,6 @@ ENDIF(CMAKE_COMPILER_IS_GNUG77)
|
|||
|
||||
# C compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
# gnu gcc
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,+b") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,+h")
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
ELSE(CMAKE_COMPILER_IS_GNUCC)
|
||||
# hp cc
|
||||
# use ld directly to create shared libraries for hp cc
|
||||
|
@ -64,14 +49,6 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
|||
|
||||
# CXX compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# for gnu C++
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") # : or empty
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h")
|
||||
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# for hp aCC
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "+Z") # -pic
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
SET(BEOS 1)
|
||||
|
||||
# GCC is the default compiler on Haiku.
|
||||
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)
|
||||
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
SET(CMAKE_DL_LIBS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -rdata_shared")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
|
||||
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
SET(CMAKE_DL_LIBS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -rdata_shared")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
|
||||
IF(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
# Set default flags init.
|
||||
SET(CMAKE_C_FLAGS_INIT "")
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue