@ -9,71 +9,71 @@
# i m p l i e d w a r r a n t y o f M E R C H A N T A B I L I T Y o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E .
# S e e t h e L i c e n s e f o r m o r e i n f o r m a t i o n .
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8.2 FATAL_ERROR )
SET ( CMAKE_LEGACY_CYGWIN_WIN32 0 ) # R e m o v e w h e n C M a k e > = 2 . 8 . 4 i s r e q u i r e d
PROJECT ( CMake )
cmake_minimum_required ( VERSION 2.8.2 FATAL_ERROR )
set ( CMAKE_LEGACY_CYGWIN_WIN32 0 ) # R e m o v e w h e n C M a k e > = 2 . 8 . 4 i s r e q u i r e d
project ( CMake )
IF ( CMAKE_BOOTSTRAP )
if ( CMAKE_BOOTSTRAP )
# R u n n i n g f r o m b o o t s t r a p s c r i p t . S e t l o c a l v a r i a b l e a n d r e m o v e f r o m c a c h e .
SET ( CMAKE_BOOTSTRAP 1 )
UNSET ( CMAKE_BOOTSTRAP CACHE )
ENDIF ( )
set ( CMAKE_BOOTSTRAP 1 )
unset ( CMAKE_BOOTSTRAP CACHE )
endif ( )
SET ( CMake_BIN_DIR ${ CMake_BINARY_DIR } /bin )
set ( CMake_BIN_DIR ${ CMake_BINARY_DIR } /bin )
IF ( "${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}" )
if ( "${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}" )
# D i s a l l o w a r c h i t e c t u r e - s p e c i f i c t r y _ r u n . I t m a y n o t r u n o n t h e h o s t .
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 ( )
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 ( )
endif ( )
endmacro ( )
endif ( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# a m a c r o t o d e a l w i t h s y s t e m l i b r a r i e s , i m p l e m e n t e d a s a m a c r o
# s i m p l y t o i m p r o v e r e a d a b i l i t y o f t h e m a i n s c r i p t
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MACRO ( CMAKE_HANDLE_SYSTEM_LIBRARIES )
macro ( CMAKE_HANDLE_SYSTEM_LIBRARIES )
# O p t i o n s h a v e d e p e n d e n c i e s .
INCLUDE ( CMakeDependentOption )
include ( CMakeDependentOption )
# O p t i o n a l l y u s e s y s t e m x m l r p c . W e n o l o n g e r b u i l d o r u s e i t b y d e f a u l t .
OPTION ( CTEST_USE_XMLRPC "Enable xmlrpc submission method in CTest." OFF )
MARK_AS_ADVANCED ( CTEST_USE_XMLRPC )
option ( CTEST_USE_XMLRPC "Enable xmlrpc submission method in CTest." OFF )
mark_as_advanced ( CTEST_USE_XMLRPC )
# A l l o w t h e u s e r t o e n a b l e / d i s a b l e a l l s y s t e m u t i l i t y l i b r a r y o p t i o n s b y
# d e f i n i n g C M A K E _ U S E _ S Y S T E M _ L I B R A R I E S o r C M A K E _ U S E _ S Y S T E M _ L I B R A R Y _ $ { u t i l } .
SET ( UTILITIES BZIP2 CURL EXPAT LIBARCHIVE ZLIB )
FOREACH ( util ${ UTILITIES } )
IF ( NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_ ${ util }
set ( UTILITIES BZIP2 CURL EXPAT LIBARCHIVE ZLIB )
foreach ( util ${ UTILITIES } )
if ( NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_ ${ util }
A N D D E F I N E D C M A K E _ U S E _ S Y S T E M _ L I B R A R I E S )
SET ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } "${CMAKE_USE_SYSTEM_LIBRARIES}" )
ENDIF ( )
IF ( DEFINED CMAKE_USE_SYSTEM_LIBRARY_ ${ util } )
IF ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } )
SET ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } ON )
ELSE ( )
SET ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } OFF )
ENDIF ( )
IF ( CMAKE_BOOTSTRAP )
UNSET ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } CACHE )
ENDIF ( )
STRING ( TOLOWER "${util}" lutil )
SET ( CMAKE_USE_SYSTEM_ ${ util } "${CMAKE_USE_SYSTEM_LIBRARY_${util}}"
set ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } "${CMAKE_USE_SYSTEM_LIBRARIES}" )
endif ( )
if ( DEFINED CMAKE_USE_SYSTEM_LIBRARY_ ${ util } )
if ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } )
set ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } ON )
else ( )
set ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } OFF )
endif ( )
if ( CMAKE_BOOTSTRAP )
unset ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } CACHE )
endif ( )
string ( TOLOWER "${util}" lutil )
set ( CMAKE_USE_SYSTEM_ ${ util } "${CMAKE_USE_SYSTEM_LIBRARY_${util}}"
C A C H E B O O L " U s e s y s t e m - i n s t a l l e d $ { l u t i l } " F O R C E )
ELSE ( )
SET ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } OFF )
ENDIF ( )
ENDFOREACH( util )
IF ( CMAKE_BOOTSTRAP )
UNSET ( CMAKE_USE_SYSTEM_LIBRARIES CACHE )
ENDIF ( )
else ( )
set ( CMAKE_USE_SYSTEM_LIBRARY_ ${ util } OFF )
endif ( )
endforeach( )
if ( CMAKE_BOOTSTRAP )
unset ( CMAKE_USE_SYSTEM_LIBRARIES CACHE )
endif ( )
# O p t i o n a l l y u s e s y s t e m u t i l i t y l i b r a r i e s .
OPTION ( CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}" )
option ( CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}" )
CMAKE_DEPENDENT_OPTION ( CMAKE_USE_SYSTEM_CURL "Use system-installed curl"
" $ { C M A K E _ U S E _ S Y S T E M _ L I B R A R Y _ C U R L } " " N O T C T E S T _ U S E _ X M L R P C " O N )
CMAKE_DEPENDENT_OPTION ( CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
@ -84,159 +84,158 @@ MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
" $ { C M A K E _ U S E _ S Y S T E M _ L I B R A R Y _ B Z I P 2 } " " N O T C M A K E _ U S E _ S Y S T E M _ L I B A R C H I V E " O N )
# M e n t i o n t o t h e u s e r w h a t s y s t e m l i b r a r i e s a r e b e i n g u s e d .
FOREACH ( util ${ UTILITIES } )
IF ( CMAKE_USE_SYSTEM_ ${ util } )
MESSAGE ( STATUS "Using system-installed ${util}" )
ENDIF( CMAKE_USE_SYSTEM_ ${ util } )
ENDFOREACH( util )
foreach ( util ${ UTILITIES } )
if ( CMAKE_USE_SYSTEM_ ${ util } )
message ( STATUS "Using system-installed ${util}" )
endif( )
endforeach( )
# I n f o r m u t i l i t y l i b r a r y h e a d e r w r a p p e r s w h e t h e r t o u s e s y s t e m v e r s i o n s .
CONFIGURE_FILE ( ${ CMake_SOURCE_DIR } /Utilities/cmThirdParty.h.in
configure_file ( ${ CMake_SOURCE_DIR } /Utilities/cmThirdParty.h.in
$ { C M a k e _ B I N A R Y _ D I R } / U t i l i t i e s / c m T h i r d P a r t y . h
@ O N L Y )
ENDMACRO( CMAKE_HANDLE_SYSTEM_LIBRARIES )
endmacro( )
SET ( CMAKE_BUILD_ON_VISUAL_STUDIO 0 )
IF ( WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
SET ( CMAKE_BUILD_ON_VISUAL_STUDIO 1 )
ENDIF( WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
set ( CMAKE_BUILD_ON_VISUAL_STUDIO 0 )
if ( WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
set ( CMAKE_BUILD_ON_VISUAL_STUDIO 1 )
endif( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# a m a c r o t o d e t e r m i n e t h e g e n e r a t o r a n d c t e s t e x e c u t a b l e t o u s e
# f o r t e s t i n g . S i m p l y t o i m p r o v e r e a d a b i l i t y o f t h e m a i n s c r i p t .
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MACRO ( CMAKE_SETUP_TESTING )
IF ( NOT DART_ROOT )
SET ( MAKEPROGRAM ${ CMAKE_MAKE_PROGRAM } )
ENDIF ( NOT DART_ROOT )
macro ( CMAKE_SETUP_TESTING )
if ( NOT DART_ROOT )
set ( MAKEPROGRAM ${ CMAKE_MAKE_PROGRAM } )
endif ( )
IF ( BUILD_TESTING )
SET ( CMAKE_TEST_GENERATOR "" CACHE STRING
if ( BUILD_TESTING )
set ( CMAKE_TEST_GENERATOR "" CACHE STRING
" G e n e r a t o r u s e d w h e n r u n n i n g t e s t s " )
SET ( CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH
set ( CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH
" G e n e r a t o r u s e d w h e n r u n n i n g t e s t s " )
IF ( NOT CMAKE_TEST_GENERATOR )
SET ( CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}" )
SET ( CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}" )
ELSE ( NOT CMAKE_TEST_GENERATOR )
SET ( CMAKE_TEST_DIFFERENT_GENERATOR TRUE )
ENDIF ( NOT CMAKE_TEST_GENERATOR )
if ( NOT CMAKE_TEST_GENERATOR )
set ( CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}" )
set ( CMAKE_TEST_GENERATOR_TOOLSET "${CMAKE_GENERATOR_TOOLSET}" )
set ( CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}" )
else ( )
set ( CMAKE_TEST_DIFFERENT_GENERATOR TRUE )
set ( CMAKE_TEST_GENERATOR_TOOLSET "" )
endif ( )
# A r e w e t e s t i n g w i t h t h e MSVC c o m p i l e r ?
SET ( CMAKE_TEST_MSVC 0 )
IF ( MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR )
SET ( CMAKE_TEST_MSVC 1 )
ELSE( MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR )
IF ( "${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
set ( CMAKE_TEST_MSVC 0 )
if ( MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR )
set ( CMAKE_TEST_MSVC 1 )
else( )
if ( "${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
" $ { C M A K E _ T E S T _ G E N E R A T O R } " M A T C H E S " V i s u a l S t u d i o " )
SET ( CMAKE_TEST_MSVC 1 )
ENDIF ( "${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
" $ { C M A K E _ T E S T _ G E N E R A T O R } " M A T C H E S " V i s u a l S t u d i o " )
ENDIF ( MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR )
SET ( CMAKE_TEST_SYSTEM_LIBRARIES 0 )
FOREACH ( util CURL EXPAT XMLRPC ZLIB )
IF ( CMAKE_USE_SYSTEM_ ${ util } )
SET ( CMAKE_TEST_SYSTEM_LIBRARIES 1 )
ENDIF ( CMAKE_USE_SYSTEM_ ${ util } )
ENDFOREACH ( util )
set ( CMAKE_TEST_MSVC 1 )
endif ( )
endif ( )
set ( CMAKE_TEST_SYSTEM_LIBRARIES 0 )
foreach ( util CURL EXPAT XMLRPC ZLIB )
if ( CMAKE_USE_SYSTEM_ ${ util } )
set ( CMAKE_TEST_SYSTEM_LIBRARIES 1 )
endif ( )
endforeach ( )
# T h i s v a r i a b l e i s s e t b y c m a k e , h o w e v e r t o
# t e s t c m a k e w e w a n t t o m a k e s u r e t h a t
# t h e c t e s t f r o m t h i s c m a k e i s u s e d f o r t e s t i n g
# a n d n o t t h e c t e s t f r o m t h e c m a k e b u i l d i n g a n d t e s t i n g
# c m a k e .
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 )
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( )
# c o n f i g u r e s o m e f i l e s f o r t e s t i n g
CONFIGURE_FILE ( "${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / C T e s t S c r i p t . c m a k e "
@ O N L Y )
CONFIGURE_FILE ( ${ CMake_SOURCE_DIR } /Tests/.NoDartCoverage
configure_file ( ${ CMake_SOURCE_DIR } /Tests/.NoDartCoverage
$ { C M a k e _ B I N A R Y _ D I R } / T e s t s / . N o D a r t C o v e r a g e )
CONFIGURE_FILE ( ${ CMake_SOURCE_DIR } /Tests/.NoDartCoverage
configure_file ( ${ CMake_SOURCE_DIR } /Tests/.NoDartCoverage
$ { C M a k e _ B I N A R Y _ D I R } / M o d u l e s / . N o D a r t C o v e r a g e )
CONFIGURE_FILE ( ${ CMake_SOURCE_DIR } /CTestCustom.cmake.in
configure_file ( ${ CMake_SOURCE_DIR } /CTestCustom.cmake.in
$ { C M a k e _ B I N A R Y _ D I R } / C T e s t C u s t o m . c m a k e @ O N L Y )
CONFIGURE_FILE ( ${ CMake_SOURCE_DIR } /CTestCustom.ctest.in
configure_file ( ${ CMake_SOURCE_DIR } /CTestCustom.ctest.in
$ { C M a k e _ B I N A R Y _ D I R } / C T e s t C u s t o m . c t e s t @ O N L Y )
IF ( BUILD_TESTING AND DART_ROOT )
CONFIGURE_FILE ( ${ CMake_SOURCE_DIR } /CMakeLogo.gif
if ( BUILD_TESTING AND DART_ROOT )
configure_file ( ${ CMake_SOURCE_DIR } /CMakeLogo.gif
$ { C M a k e _ B I N A R Y _ D I R } / T e s t i n g / H T M L / T e s t i n g R e s u l t s / I c o n s / L o g o . g i f C O P Y O N L Y )
ENDIF( BUILD_TESTING AND DART_ROOT )
MARK_AS_ADVANCED ( DART_ROOT )
MARK_AS_ADVANCED ( CURL_TESTING )
ENDMACRO( CMAKE_SETUP_TESTING )
endif( )
mark_as_advanced ( DART_ROOT )
mark_as_advanced ( CURL_TESTING )
endmacro( )
# P r o v i d e a w a y f o r V i s u a l S t u d i o E x p r e s s u s e r s t o t u r n O F F t h e n e w F O L D E R
# o r g a n i z a t i o n f e a t u r e . D e f a u l t t o O N f o r n o n - E x p r e s s u s e r s . E x p r e s s u s e r s m u s t
# e x p l i c i t l y t u r n o f f t h i s o p t i o n t o b u i l d C M a k e i n t h e E x p r e s s I D E . . .
#
OPTION ( CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON )
MARK_AS_ADVANCED ( CMAKE_USE_FOLDERS )
option ( CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON )
mark_as_advanced ( CMAKE_USE_FOLDERS )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# a m a c r o t h a t o n l y s e t s t h e F O L D E R t a r g e t p r o p e r t y i f i t ' s
# " a p p r o p r i a t e "
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MACRO ( CMAKE_SET_TARGET_FOLDER tgt folder )
IF ( CMAKE_USE_FOLDERS )
SET_PROPERTY ( GLOBAL PROPERTY USE_FOLDERS ON )
macro ( CMAKE_SET_TARGET_FOLDER tgt folder )
if ( CMAKE_USE_FOLDERS )
set_property ( GLOBAL PROPERTY USE_FOLDERS ON )
# R e a l l y , I j u s t w a n t t h i s t o b e a n " if ( TARGET ${ tgt } ) " . . .
# b u t I ' m n o t s u r e t h a t o u r m i n r e q ' d . , C M a k e 2 . 4 . 5 c a n h a n d l e
# t h a t . . . s o I ' m j u s t a c t i v a t i n g t h i s f o r n o w , w i t h a v e r s i o n
# c o m p a r e , a n d o n l y f o r MSVC b u i l d s .
IF ( MSVC )
IF ( NOT ${ CMAKE_MAJOR_VERSION } . ${ CMAKE_MINOR_VERSION } LESS 2.8 )
SET_PROPERTY ( TARGET "${tgt}" PROPERTY FOLDER "${folder}" )
ENDIF ( )
ENDIF ( )
ELSE ( )
SET_PROPERTY ( GLOBAL PROPERTY USE_FOLDERS OFF )
ENDIF ( )
ENDMACRO( CMAKE_SET_TARGET_FOLDER )
if ( MSVC )
if ( NOT ${ CMAKE_MAJOR_VERSION } . ${ CMAKE_MINOR_VERSION } LESS 2.8 )
set_property ( TARGET "${tgt}" PROPERTY FOLDER "${folder}" )
endif ( )
endif ( )
else ( )
set_property ( GLOBAL PROPERTY USE_FOLDERS OFF )
endif ( )
endmacro( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# a m a c r o t o b u i l d t h e u t i l i t i e s u s e d b y C M a k e
# S i m p l y t o i m p r o v e r e a d a b i l i t y o f t h e m a i n s c r i p t .
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MACRO ( CMAKE_BUILD_UTILITIES )
macro ( CMAKE_BUILD_UTILITIES )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# C r e a t e t h e K W I M L l i b r a r y f o r C M a k e .
SET ( KWIML cmIML )
SET ( KWIML_HEADER_ROOT ${ CMake_BINARY_DIR } /Utilities )
ADD_SUBDIRECTORY ( Utilities/KWIML )
set ( KWIML cmIML )
set ( KWIML_HEADER_ROOT ${ CMake_BINARY_DIR } /Utilities )
add_subdirectory ( Utilities/KWIML )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# C r e a t e t h e k w s y s l i b r a r y f o r C M a k e .
SET ( KWSYS_NAMESPACE cmsys )
SET ( KWSYS_USE_SystemTools 1 )
SET ( KWSYS_USE_Directory 1 )
SET ( KWSYS_USE_RegularExpression 1 )
SET ( KWSYS_USE_Base64 1 )
SET ( KWSYS_USE_MD5 1 )
SET ( KWSYS_USE_Process 1 )
SET ( KWSYS_USE_CommandLineArguments 1 )
SET ( KWSYS_HEADER_ROOT ${ CMake_BINARY_DIR } /Source )
SET ( KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}" )
ADD_SUBDIRECTORY ( Source/kwsys )
SET ( kwsys_folder "Utilities/KWSys" )
set ( KWSYS_NAMESPACE cmsys )
set ( KWSYS_USE_SystemTools 1 )
set ( KWSYS_USE_Directory 1 )
set ( KWSYS_USE_RegularExpression 1 )
set ( KWSYS_USE_Base64 1 )
set ( KWSYS_USE_MD5 1 )
set ( KWSYS_USE_Process 1 )
set ( KWSYS_USE_CommandLineArguments 1 )
set ( KWSYS_HEADER_ROOT ${ CMake_BINARY_DIR } /Source )
set ( KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}" )
add_subdirectory ( Source/kwsys )
set ( kwsys_folder "Utilities/KWSys" )
CMAKE_SET_TARGET_FOLDER ( ${ KWSYS_NAMESPACE } "${kwsys_folder}" )
CMAKE_SET_TARGET_FOLDER ( ${ KWSYS_NAMESPACE } _c "${kwsys_folder}" )
CMAKE_SET_TARGET_FOLDER ( ${ KWSYS_NAMESPACE } EncodeExecutable "${kwsys_folder}" )
CMAKE_SET_TARGET_FOLDER ( ${ KWSYS_NAMESPACE } ProcessFwd9x "${kwsys_folder}" )
if ( BUILD_TESTING )
CMAKE_SET_TARGET_FOLDER ( ${ KWSYS_NAMESPACE } TestDynload "${kwsys_folder}" )
CMAKE_SET_TARGET_FOLDER ( ${ KWSYS_NAMESPACE } TestProcess "${kwsys_folder}" )
@ -249,7 +248,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
# S e t u p t h i r d - p a r t y l i b r a r i e s .
# E v e r y t h i n g i n t h e t r e e s h o u l d b e a b l e t o i n c l u d e f i l e s f r o m t h e
# U t i l i t i e s d i r e c t o r y .
INCLUDE_DIRECTORIES (
include_directories (
$ { C M a k e _ B I N A R Y _ D I R } / U t i l i t i e s
$ { C M a k e _ S O U R C E _ D I R } / U t i l i t i e s
)
@ -260,237 +259,237 @@ MACRO (CMAKE_BUILD_UTILITIES)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# B u i l d z l i b l i b r a r y f o r C u r l , C M a k e , a n d C T e s t .
SET ( CMAKE_ZLIB_HEADER "cm_zlib.h" )
IF ( CMAKE_USE_SYSTEM_ZLIB )
FIND_PACKAGE ( ZLIB )
IF ( NOT ZLIB_FOUND )
MESSAGE( FATAL_ERROR
set ( CMAKE_ZLIB_HEADER "cm_zlib.h" )
if ( CMAKE_USE_SYSTEM_ZLIB )
find_package ( ZLIB )
if ( NOT ZLIB_FOUND )
message( FATAL_ERROR
" C M A K E _ U S E _ S Y S T E M _ Z L I B i s O N b u t a z l i b i s n o t f o u n d ! " )
ENDIF( NOT ZLIB_FOUND )
SET ( CMAKE_ZLIB_INCLUDES ${ ZLIB_INCLUDE_DIR } )
SET ( CMAKE_ZLIB_LIBRARIES ${ ZLIB_LIBRARIES } )
ELSE( CMAKE_USE_SYSTEM_ZLIB )
SET ( CMAKE_ZLIB_INCLUDES ${ CMake_SOURCE_DIR } /Utilities )
SET ( CMAKE_ZLIB_LIBRARIES cmzlib )
ADD_SUBDIRECTORY ( Utilities/cmzlib )
endif( )
set ( CMAKE_ZLIB_INCLUDES ${ ZLIB_INCLUDE_DIR } )
set ( CMAKE_ZLIB_LIBRARIES ${ ZLIB_LIBRARIES } )
else( )
set ( CMAKE_ZLIB_INCLUDES ${ CMake_SOURCE_DIR } /Utilities )
set ( CMAKE_ZLIB_LIBRARIES cmzlib )
add_subdirectory ( Utilities/cmzlib )
CMAKE_SET_TARGET_FOLDER ( cmzlib "Utilities/3rdParty" )
ENDIF( CMAKE_USE_SYSTEM_ZLIB )
endif( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# B u i l d C u r l l i b r a r y f o r C T e s t .
IF ( CMAKE_USE_SYSTEM_CURL )
FIND_PACKAGE ( CURL )
IF ( NOT CURL_FOUND )
MESSAGE( FATAL_ERROR
if ( CMAKE_USE_SYSTEM_CURL )
find_package ( CURL )
if ( NOT CURL_FOUND )
message( FATAL_ERROR
" C M A K E _ U S E _ S Y S T E M _ C U R L i s O N b u t a c u r l i s n o t f o u n d ! " )
ENDIF( NOT CURL_FOUND )
SET ( CMAKE_CURL_INCLUDES ${ CURL_INCLUDE_DIRS } )
SET ( CMAKE_CURL_LIBRARIES ${ CURL_LIBRARIES } )
ELSE( CMAKE_USE_SYSTEM_CURL )
SET ( CURL_SPECIAL_ZLIB_H ${ CMAKE_ZLIB_HEADER } )
SET ( CURL_SPECIAL_LIBZ_INCLUDES ${ CMAKE_ZLIB_INCLUDES } )
SET ( CURL_SPECIAL_LIBZ ${ CMAKE_ZLIB_LIBRARIES } )
OPTION ( CMAKE_BUILD_CURL_SHARED "Should curl be built shared" FALSE )
IF ( NOT CMAKE_BUILD_CURL_SHARED )
ADD_DEFINITIONS ( -DCURL_STATICLIB )
ENDIF( NOT CMAKE_BUILD_CURL_SHARED )
SET ( CMAKE_CURL_INCLUDES )
SET ( CMAKE_CURL_LIBRARIES cmcurl )
IF ( CMAKE_TESTS_CDASH_SERVER )
SET ( CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php" )
ENDIF( CMAKE_TESTS_CDASH_SERVER )
ADD_SUBDIRECTORY ( Utilities/cmcurl )
endif( )
set ( CMAKE_CURL_INCLUDES ${ CURL_INCLUDE_DIRS } )
set ( CMAKE_CURL_LIBRARIES ${ CURL_LIBRARIES } )
else( )
set ( CURL_SPECIAL_ZLIB_H ${ CMAKE_ZLIB_HEADER } )
set ( CURL_SPECIAL_LIBZ_INCLUDES ${ CMAKE_ZLIB_INCLUDES } )
set ( CURL_SPECIAL_LIBZ ${ CMAKE_ZLIB_LIBRARIES } )
option ( CMAKE_BUILD_CURL_SHARED "Should curl be built shared" FALSE )
if ( NOT CMAKE_BUILD_CURL_SHARED )
add_definitions ( -DCURL_STATICLIB )
endif( )
set ( CMAKE_CURL_INCLUDES )
set ( CMAKE_CURL_LIBRARIES cmcurl )
if ( CMAKE_TESTS_CDASH_SERVER )
set ( CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php" )
endif( )
add_subdirectory ( Utilities/cmcurl )
CMAKE_SET_TARGET_FOLDER ( cmcurl "Utilities/3rdParty" )
CMAKE_SET_TARGET_FOLDER ( LIBCURL "Utilities/3rdParty" )
ENDIF( CMAKE_USE_SYSTEM_CURL )
endif( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# B u i l d C o m p r e s s l i b r a r y f o r C T e s t .
SET( CMAKE_COMPRESS_INCLUDES
set( CMAKE_COMPRESS_INCLUDES
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / U t i l i t i e s / c m c o m p r e s s " )
SET ( CMAKE_COMPRESS_LIBRARIES "cmcompress" )
ADD_SUBDIRECTORY ( Utilities/cmcompress )
set ( CMAKE_COMPRESS_LIBRARIES "cmcompress" )
add_subdirectory ( Utilities/cmcompress )
CMAKE_SET_TARGET_FOLDER ( cmcompress "Utilities/3rdParty" )
IF ( CMAKE_USE_SYSTEM_BZIP2 )
FIND_PACKAGE ( BZip2 )
ELSE ( )
SET( BZIP2_INCLUDE_DIR
if ( CMAKE_USE_SYSTEM_BZIP2 )
find_package ( BZip2 )
else ( )
set( BZIP2_INCLUDE_DIR
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / U t i l i t i e s / c m b z i p 2 " )
SET ( BZIP2_LIBRARIES cmbzip2 )
ADD_SUBDIRECTORY ( Utilities/cmbzip2 )
set ( BZIP2_LIBRARIES cmbzip2 )
add_subdirectory ( Utilities/cmbzip2 )
CMAKE_SET_TARGET_FOLDER ( cmbzip2 "Utilities/3rdParty" )
ENDIF ( )
endif ( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# B u i l d o r u s e s y s t e m l i b a r c h i v e f o r C M a k e a n d C T e s t .
IF ( CMAKE_USE_SYSTEM_LIBARCHIVE )
IF ( EXISTS ${ CMAKE_ROOT } /Modules/FindLibArchive.cmake ) # a d d e d i n 2 . 8 . 3
FIND_PACKAGE ( LibArchive )
ELSE ( )
INCLUDE ( ${ CMake_SOURCE_DIR } /Modules/FindLibArchive.cmake )
ENDIF ( )
IF ( NOT LibArchive_FOUND )
MESSAGE ( FATAL_ERROR "CMAKE_USE_SYSTEM_LIBARCHIVE is ON but LibArchive is not found!" )
ENDIF ( )
SET ( CMAKE_TAR_INCLUDES ${ LibArchive_INCLUDE_DIRS } )
SET ( CMAKE_TAR_LIBRARIES ${ LibArchive_LIBRARIES } )
ELSE( CMAKE_USE_SYSTEM_LIBARCHIVE )
SET ( ZLIB_INCLUDE_DIR ${ CMAKE_ZLIB_INCLUDES } )
SET ( ZLIB_LIBRARY ${ CMAKE_ZLIB_LIBRARIES } )
ADD_DEFINITIONS ( -DLIBARCHIVE_STATIC )
SET ( ENABLE_NETTLE OFF CACHE INTERNAL "Enable use of Nettle" )
SET ( ENABLE_OPENSSL ${ CMAKE_USE_OPENSSL } CACHE INTERNAL "Enable use of OpenSSL" )
SET ( ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support" )
SET ( ENABLE_ACL OFF CACHE INTERNAL "Enable ACL support" )
SET ( ENABLE_ICONV OFF CACHE INTERNAL "Enable iconv support" )
ADD_SUBDIRECTORY ( Utilities/cmlibarchive )
if ( CMAKE_USE_SYSTEM_LIBARCHIVE )
if ( EXISTS ${ CMAKE_ROOT } /Modules/FindLibArchive.cmake ) # a d d e d i n 2 . 8 . 3
find_package ( LibArchive )
else ( )
include ( ${ CMake_SOURCE_DIR } /Modules/FindLibArchive.cmake )
endif ( )
if ( NOT LibArchive_FOUND )
message ( FATAL_ERROR "CMAKE_USE_SYSTEM_LIBARCHIVE is ON but LibArchive is not found!" )
endif ( )
set ( CMAKE_TAR_INCLUDES ${ LibArchive_INCLUDE_DIRS } )
set ( CMAKE_TAR_LIBRARIES ${ LibArchive_LIBRARIES } )
else( )
set ( ZLIB_INCLUDE_DIR ${ CMAKE_ZLIB_INCLUDES } )
set ( ZLIB_LIBRARY ${ CMAKE_ZLIB_LIBRARIES } )
add_definitions ( -DLIBARCHIVE_STATIC )
set ( ENABLE_NETTLE OFF CACHE INTERNAL "Enable use of Nettle" )
set ( ENABLE_OPENSSL ${ CMAKE_USE_OPENSSL } CACHE INTERNAL "Enable use of OpenSSL" )
set ( ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support" )
set ( ENABLE_ACL OFF CACHE INTERNAL "Enable ACL support" )
set ( ENABLE_ICONV OFF CACHE INTERNAL "Enable iconv support" )
add_subdirectory ( Utilities/cmlibarchive )
CMAKE_SET_TARGET_FOLDER ( cmlibarchive "Utilities/3rdParty" )
SET ( CMAKE_TAR_LIBRARIES cmlibarchive ${ BZIP2_LIBRARIES } )
ENDIF( CMAKE_USE_SYSTEM_LIBARCHIVE )
set ( CMAKE_TAR_LIBRARIES cmlibarchive ${ BZIP2_LIBRARIES } )
endif( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# B u i l d e x p a t l i b r a r y f o r C M a k e a n d C T e s t .
IF ( CMAKE_USE_SYSTEM_EXPAT )
FIND_PACKAGE ( EXPAT )
IF ( NOT EXPAT_FOUND )
MESSAGE ( FATAL_ERROR
if ( CMAKE_USE_SYSTEM_EXPAT )
find_package ( EXPAT )
if ( NOT EXPAT_FOUND )
message ( FATAL_ERROR
" C M A K E _ U S E _ S Y S T E M _ E X P A T i s O N b u t a e x p a t i s n o t f o u n d ! " )
ENDIF( NOT EXPAT_FOUND )
SET ( CMAKE_EXPAT_INCLUDES ${ EXPAT_INCLUDE_DIRS } )
SET ( CMAKE_EXPAT_LIBRARIES ${ EXPAT_LIBRARIES } )
ELSE( CMAKE_USE_SYSTEM_EXPAT )
SET ( CMAKE_EXPAT_INCLUDES )
SET ( CMAKE_EXPAT_LIBRARIES cmexpat )
ADD_SUBDIRECTORY ( Utilities/cmexpat )
endif( )
set ( CMAKE_EXPAT_INCLUDES ${ EXPAT_INCLUDE_DIRS } )
set ( CMAKE_EXPAT_LIBRARIES ${ EXPAT_LIBRARIES } )
else( )
set ( CMAKE_EXPAT_INCLUDES )
set ( CMAKE_EXPAT_LIBRARIES cmexpat )
add_subdirectory ( Utilities/cmexpat )
CMAKE_SET_TARGET_FOLDER ( cmexpat "Utilities/3rdParty" )
ENDIF( CMAKE_USE_SYSTEM_EXPAT )
endif( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# B u i l d X M L R P C l i b r a r y f o r C M a k e a n d C T e s t .
IF ( CTEST_USE_XMLRPC )
FIND_PACKAGE ( XMLRPC QUIET REQUIRED libwww-client )
IF ( NOT XMLRPC_FOUND )
MESSAGE ( FATAL_ERROR
if ( CTEST_USE_XMLRPC )
find_package ( XMLRPC QUIET REQUIRED libwww-client )
if ( NOT XMLRPC_FOUND )
message ( FATAL_ERROR
" C T E S T _ U S E _ X M L R P C i s O N b u t x m l r p c i s n o t f o u n d ! " )
ENDIF( NOT XMLRPC_FOUND )
SET ( CMAKE_XMLRPC_INCLUDES ${ XMLRPC_INCLUDE_DIRS } )
SET ( CMAKE_XMLRPC_LIBRARIES ${ XMLRPC_LIBRARIES } )
ENDIF( CTEST_USE_XMLRPC )
endif( )
set ( CMAKE_XMLRPC_INCLUDES ${ XMLRPC_INCLUDE_DIRS } )
set ( CMAKE_XMLRPC_LIBRARIES ${ XMLRPC_LIBRARIES } )
endif( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# U s e c u r s e s ?
IF ( UNIX )
if ( UNIX )
# t h e r e i s a b u g i n t h e S y l l a b l e l i b r a r i e s w h i c h m a k e s l i n k i n g c c m a k e f a i l , A l e x
IF ( NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable )
SET ( CURSES_NEED_NCURSES TRUE )
FIND_PACKAGE ( Curses QUIET )
IF ( CURSES_LIBRARY )
OPTION ( BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON )
ELSE ( CURSES_LIBRARY )
MESSAGE ( "Curses libraries were not found. Curses GUI for CMake will not be built." )
SET ( BUILD_CursesDialog 0 )
ENDIF ( CURSES_LIBRARY )
ELSE( NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable )
SET ( BUILD_CursesDialog 0 )
ENDIF( NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable )
ELSE ( UNIX )
SET ( BUILD_CursesDialog 0 )
ENDIF ( UNIX )
IF ( BUILD_CursesDialog )
ADD_SUBDIRECTORY ( Source/CursesDialog/form )
ENDIF( BUILD_CursesDialog )
ENDMACRO ( CMAKE_BUILD_UTILITIES )
if ( NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable )
set ( CURSES_NEED_NCURSES TRUE )
find_package ( Curses QUIET )
if ( CURSES_LIBRARY )
option ( BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON )
else ( )
message ( "Curses libraries were not found. Curses GUI for CMake will not be built." )
set ( BUILD_CursesDialog 0 )
endif ( )
else( )
set ( BUILD_CursesDialog 0 )
endif( )
else ( )
set ( BUILD_CursesDialog 0 )
endif ( )
if ( BUILD_CursesDialog )
add_subdirectory ( Source/CursesDialog/form )
endif( )
endmacro ( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IF ( CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD" )
EXECUTE_PROCESS ( COMMAND ${ CMAKE_CXX_COMPILER }
if ( CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD" )
execute_process ( COMMAND ${ CMAKE_CXX_COMPILER }
$ { C M A K E _ C X X _ C O M P I L E R _ A R G 1 } - d u m p v e r s i o n
O U T P U T _ V A R I A B L E _ G X X _ V E R S I O N
)
STRING ( REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
string ( REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
_ G X X _ V E R S I O N _ S H O R T $ { _ G X X _ V E R S I O N } )
IF ( _GXX_VERSION_SHORT EQUAL 33 )
MESSAGE ( FATAL_ERROR
if ( _GXX_VERSION_SHORT EQUAL 33 )
message ( FATAL_ERROR
" G X X 3 . 3 o n O p e n B S D i s k n o w n t o c a u s e C P a c k t o C r a s h . \ n "
" P l e a s e u s e G X X 4 . 2 o r g r e a t e r t o b u i l d C M a k e o n O p e n B S D \ n "
" $ { C M A K E _ C X X _ C O M P I L E R } v e r s i o n i s : $ { _ G X X _ V E R S I O N } " )
ENDIF ( )
ENDIF ( )
endif ( )
endif ( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# T h e m a i n s e c t i o n o f t h e C M a k e L i s t s f i l e
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INCLUDE ( Source/CMakeVersion.cmake )
include ( Source/CMakeVersion.cmake )
# R e l e a s e s d e f i n e a s m a l l t w e a k l e v e l .
IF ( "${CMake_VERSION_TWEAK}" VERSION_LESS 20000000 )
SET ( CMake_VERSION_IS_RELEASE 1 )
SET ( CMake_VERSION_SOURCE "" )
ELSE ( )
SET ( CMake_VERSION_IS_RELEASE 0 )
INCLUDE ( ${ CMake_SOURCE_DIR } /Source/CMakeVersionSource.cmake )
ENDIF ( )
if ( "${CMake_VERSION_TWEAK}" VERSION_LESS 20000000 )
set ( CMake_VERSION_IS_RELEASE 1 )
set ( CMake_VERSION_SOURCE "" )
else ( )
set ( CMake_VERSION_IS_RELEASE 0 )
include ( ${ CMake_SOURCE_DIR } /Source/CMakeVersionSource.cmake )
endif ( )
# C o m p u t e t h e f u l l v e r s i o n s t r i n g .
SET ( CMake_VERSION ${ CMake_VERSION_MAJOR } . ${ CMake_VERSION_MINOR } . ${ CMake_VERSION_PATCH } )
IF ( ${ CMake_VERSION_TWEAK } GREATER 0 )
SET ( CMake_VERSION ${ CMake_VERSION } . ${ CMake_VERSION_TWEAK } )
ENDIF ( )
IF ( CMake_VERSION_RC )
SET ( CMake_VERSION ${ CMake_VERSION } -rc ${ CMake_VERSION_RC } )
ENDIF ( )
IF ( CMake_VERSION_SOURCE )
SET ( CMake_VERSION ${ CMake_VERSION } - ${ CMake_VERSION_SOURCE } )
ENDIF ( )
set ( CMake_VERSION ${ CMake_VERSION_MAJOR } . ${ CMake_VERSION_MINOR } . ${ CMake_VERSION_PATCH } )
if ( ${ CMake_VERSION_TWEAK } GREATER 0 )
set ( CMake_VERSION ${ CMake_VERSION } . ${ CMake_VERSION_TWEAK } )
endif ( )
if ( CMake_VERSION_RC )
set ( CMake_VERSION ${ CMake_VERSION } -rc ${ CMake_VERSION_RC } )
endif ( )
if ( CMake_VERSION_SOURCE )
set ( CMake_VERSION ${ CMake_VERSION } - ${ CMake_VERSION_SOURCE } )
endif ( )
# I n c l u d e t h e s t a n d a r d D a r t t e s t i n g m o d u l e
ENABLE_TESTING ( )
INCLUDE ( ${ CMAKE_ROOT } /Modules/Dart.cmake )
enable_testing ( )
include ( ${ CMAKE_ROOT } /Modules/Dart.cmake )
# S e t u p t e s t - t i m e c o n f i g u r a t i o n .
SET_DIRECTORY_PROPERTIES ( PROPERTIES
set_directory_properties ( PROPERTIES
T E S T _ I N C L U D E _ F I L E " $ { C M a k e _ B I N A R Y _ D I R } / T e s t s / E n f o r c e C o n f i g . c m a k e " )
# w h e r e t o w r i t e t h e r e s u l t i n g e x e c u t a b l e s a n d l i b r a r i e s
SET ( BUILD_SHARED_LIBS OFF )
SET ( EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir." )
SET ( LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
set ( BUILD_SHARED_LIBS OFF )
set ( EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir." )
set ( LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
" W h e r e t o p u t t h e l i b r a r i e s f o r C M a k e " )
# T h e C M a k e e x e c u t a b l e s u s u a l l y d o n o t n e e d a n y r p a t h t o r u n i n t h e b u i l d o r
# i n s t a l l t r e e .
SET ( CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs." )
set ( CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs." )
SET ( CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
set ( CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
" I n s t a l l l o c a t i o n f o r data ( relative to prefix ) . " )
SET ( CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
set ( CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
" I n s t a l l l o c a t i o n f o r documentation ( relative to prefix ) . " )
SET ( CMAKE_MAN_DIR "/man" CACHE STRING
set ( CMAKE_MAN_DIR "/man" CACHE STRING
" I n s t a l l l o c a t i o n f o r m a n pages ( relative to prefix ) . " )
MARK_AS_ADVANCED ( CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR )
IF ( CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" )
mark_as_advanced ( CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR )
if ( CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" )
# F o r c e d o c , d a t a a n d m a n d i r s t o c o n f o r m t o c y g w i n l a y o u t .
SET ( CMAKE_DOC_DIR "/share/doc/cmake-${CMake_VERSION}" )
SET ( CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}" )
SET ( CMAKE_MAN_DIR "/share/man" )
set ( CMAKE_DOC_DIR "/share/doc/cmake-${CMake_VERSION}" )
set ( CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}" )
set ( CMAKE_MAN_DIR "/share/man" )
# l e t t h e u s e r k n o w w e j u s t f o r c e d t h e s e v a l u e s
MESSAGE ( STATUS "Setup for Cygwin packaging" )
MESSAGE ( STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}" )
MESSAGE ( STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}" )
MESSAGE ( STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}" )
ENDIF ( )
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 ( )
message ( STATUS "Setup for Cygwin packaging" )
message ( STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}" )
message ( STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}" )
message ( STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}" )
endif ( )
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 ( )
# i n c l u d e s p e c i a l c o m p i l e f l a g s f o r s o m e c o m p i l e r s
INCLUDE ( CompileFlags.cmake )
include ( CompileFlags.cmake )
# n o c l u e w h y w e a r e t e s t i n g f o r t h i s h e r e
INCLUDE ( CheckSymbolExists )
include ( CheckSymbolExists )
CHECK_SYMBOL_EXISTS ( unsetenv "stdlib.h" HAVE_UNSETENV )
CHECK_SYMBOL_EXISTS ( environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE )
@ -507,9 +506,9 @@ CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
# t o a c d a s h 4 s i m p l e t e s t d a t a b a s e . I n t h e s e c a s e s , t h e C D a s h d a s h b o a r d s
# s h o u l d b e r u n f i r s t .
#
IF ( "x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x" )
SET ( CMAKE_TESTS_CDASH_SERVER "http://www.cdash.org/CDash" )
ENDIF( "x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x" )
if ( "x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x" )
set ( CMAKE_TESTS_CDASH_SERVER "http://www.cdash.org/CDash" )
endif( )
# b u i l d t h e utilities ( a macro defined in this file )
CMAKE_BUILD_UTILITIES ( )
@ -519,35 +518,35 @@ CMAKE_BUILD_UTILITIES()
# w h i c h i s n ' t i n t h e d e f a u l t l i n k e r s e a r c h p a t h . S o w i t h o u t R P A T H c c m a k e
# d o e s n ' t r u n a n d t h e b u i l d d o e s n ' t s u c c e e d s i n c e c c m a k e i s e x e c u t e d f o r
# g e n e r a t i n g t h e d o c u m e n t a t i o n .
IF ( BUILD_CursesDialog )
GET_FILENAME_COMPONENT ( _CURSES_DIR "${CURSES_LIBRARY}" PATH )
SET ( CURSES_NEED_RPATH FALSE )
IF ( NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64" )
SET ( CURSES_NEED_RPATH TRUE )
ENDIF( NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64" )
ENDIF( BUILD_CursesDialog )
IF ( BUILD_QtDialog )
IF ( APPLE )
SET ( CMAKE_BUNDLE_NAME
if ( BUILD_CursesDialog )
get_filename_component ( _CURSES_DIR "${CURSES_LIBRARY}" PATH )
set ( CURSES_NEED_RPATH FALSE )
if ( NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64" )
set ( CURSES_NEED_RPATH TRUE )
endif( )
endif( )
if ( BUILD_QtDialog )
if ( APPLE )
set ( CMAKE_BUNDLE_NAME
" C M a k e $ { C M a k e _ V E R S I O N _ M A J O R } . $ { C M a k e _ V E R S I O N _ M I N O R } - $ { C M a k e _ V E R S I O N _ P A T C H } " )
SET ( CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}" )
set ( CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}" )
# m a k e s u r e C M A K E _ I N S T A L L _ P R E F I X e n d s i n /
STRING ( LENGTH "${CMAKE_INSTALL_PREFIX}" LEN )
MATH ( EXPR LEN "${LEN} -1" )
STRING ( SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${ LEN } 1 ENDCH )
IF ( NOT "${ENDCH}" STREQUAL "/" )
SET ( CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/" )
ENDIF( NOT "${ENDCH}" STREQUAL "/" )
SET( CMAKE_INSTALL_PREFIX
string ( LENGTH "${CMAKE_INSTALL_PREFIX}" LEN )
math ( EXPR LEN "${LEN} -1" )
string ( SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${ LEN } 1 ENDCH )
if ( NOT "${ENDCH}" STREQUAL "/" )
set ( CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/" )
endif( )
set( CMAKE_INSTALL_PREFIX
" $ { C M A K E _ I N S T A L L _ P R E F I X } $ { C M A K E _ B U N D L E _ N A M E } . a p p / C o n t e n t s " )
ENDIF( APPLE )
endif( )
SET ( QT_NEED_RPATH FALSE )
IF ( NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64" )
SET ( QT_NEED_RPATH TRUE )
ENDIF( NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64" )
ENDIF( BUILD_QtDialog )
set ( QT_NEED_RPATH FALSE )
if ( NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64" )
set ( QT_NEED_RPATH TRUE )
endif( )
endif( )
# T h e s a m e m i g h t b e t r u e o n o t h e r s y s t e m s f o r o t h e r l i b r a r i e s .
@ -555,43 +554,65 @@ ENDIF(BUILD_QtDialog)
# s i n c e t h i s o n e h a s m u c h b e t t e r R P A T H f e a t u r e s t h a n c m a k e 2 . 2 .
# T h e e x e c u t a b l e s a r e t h e n b u i l t w i t h t h e R P A T H f o r t h e l i b r a r i e s o u t s i d e
# t h e b u i l d t r e e , w h i c h i s b o t h t h e b u i l d a n d t h e i n s t a l l R P A T H .
IF ( UNIX )
IF ( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
if ( UNIX )
if ( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
O R C M A K E _ U S E _ S Y S T E M _ E X P A T O R C T E S T _ U S E _ X M L R P C O R C U R S E S _ N E E D _ R P A T H O R Q T _ N E E D _ R P A T H )
SET ( CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH." )
SET ( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
SET ( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE )
ENDIF ( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
O R C M A K E _ U S E _ S Y S T E M _ E X P A T O R C T E S T _ U S E _ X M L R P C O R C U R S E S _ N E E D _ R P A T H O R Q T _ N E E D _ R P A T H )
ENDIF ( UNIX )
set ( CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH." )
set ( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
set ( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE )
endif ( )
endif ( )
# a d d t h e u n i n s t a l l s u p p o r t
CONFIGURE_FILE (
configure_file (
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c m a k e _ u n i n s t a l l . c m a k e . i n "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c m a k e _ u n i n s t a l l . c m a k e "
@ O N L Y )
ADD_CUSTOM_TARGET ( uninstall
add_custom_target ( uninstall
" $ { C M A K E _ C O M M A N D } " - P " $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c m a k e _ u n i n s t a l l . c m a k e " )
INCLUDE ( CMakeCPack.cmake )
include ( CMakeCPack.cmake )
# s e t u p s o m e T e s t i n g support ( a macro defined in this file )
CMAKE_SETUP_TESTING ( )
CONFIGURE_FILE (
configure_file (
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / D a r t L o c a l . c o n f . i n "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / D a r t L o c a l . c o n f "
C O P Y O N L Y )
OPTION( CMAKE_STRICT
option( CMAKE_STRICT
" P e r f o r m s t r i c t t e s t i n g t o r e c o r d p r o p e r t y a n d v a r i a b l e a c c e s s . C a n b e u s e d t o r e p o r t a n y u n d e f i n e d p r o p e r t i e s o r v a r i a b l e s " O F F )
MARK_AS_ADVANCED ( CMAKE_STRICT )
mark_as_advanced ( CMAKE_STRICT )
if ( NOT CMake_VERSION_IS_RELEASE )
if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND
N O T " $ { C M A K E _ C _ C O M P I L E R _ V E R S I O N } " V E R S I O N _ L E S S 4 . 2 )
set ( C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
- W a l l - W - W p o i n t e r - a r i t h - W w r i t e - s t r i n g s - W f o r m a t - s e c u r i t y
- W m i s s i n g - f o r m a t - a t t r i b u t e - f n o - c o m m o n - W u n d e f
)
set ( CXX_FLAGS_LIST -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W
- W s h a d o w - W p o i n t e r - a r i t h - W f o r m a t - s e c u r i t y - W u n d e f
)
foreach ( FLAG_LANG C CXX )
foreach ( FLAG ${ ${FLAG_LANG } _FLAGS_LIST} )
if ( NOT " ${CMAKE_${FLAG_LANG}_FLAGS} " MATCHES " ${FLAG} " )
set ( CMAKE_ ${ FLAG_LANG } _FLAGS "${CMAKE_${FLAG_LANG}_FLAGS} ${FLAG}" )
endif ( )
endforeach ( )
endforeach ( )
unset ( C_FLAGS_LIST )
unset ( CXX_FLAGS_LIST )
endif ( )
endif ( )
# b u i l d t h e r e m a i n i n g s u b d i r e c t o r i e s
ADD_SUBDIRECTORY ( Source )
ADD_SUBDIRECTORY ( Utilities )
ADD_SUBDIRECTORY ( Tests )
add_subdirectory ( Source )
add_subdirectory ( Utilities )
add_subdirectory ( Tests )
if ( BUILD_TESTING )
CMAKE_SET_TARGET_FOLDER ( CMakeLibTests "Tests" )
@ -600,14 +621,14 @@ CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat")
CMAKE_SET_TARGET_FOLDER ( documentation "Documentation" )
# a d d a t e s t
ADD_TEST ( SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
add_test ( SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
- - s y s t e m - i n f o r m a t i o n - G " $ { C M A K E _ T E S T _ G E N E R A T O R } " )
# I n s t a l l l i c e n s e f i l e a s i t r e q u i r e s .
INSTALL ( FILES Copyright.txt DESTINATION ${ CMake_DOC_DEST } )
install ( FILES Copyright.txt DESTINATION ${ CMake_DOC_DEST } )
# I n s t a l l s c r i p t d i r e c t o r i e s .
INSTALL (
install (
D I R E C T O R Y M o d u l e s T e m p l a t e s
D E S T I N A T I O N " $ { C M a k e _ D A T A _ D E S T } "
F I L E _ P E R M I S S I O N S O W N E R _ R E A D O W N E R _ W R I T E G R O U P _ R E A D W O R L D _ R E A D
@ -620,7 +641,7 @@ INSTALL(
)
# p r o c e s s d o c s r e l a t e d i n s t a l l
ADD_SUBDIRECTORY ( Docs )
add_subdirectory ( Docs )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# E n d o f t h e m a i n s e c t i o n o f t h e C M a k e L i s t s f i l e
@ -631,4 +652,4 @@ ADD_SUBDIRECTORY(Docs)
# t o c o m p u t e t h e l o c a t i o n o f t h e " c m a k e " e x e c u t a b l e . W e s e t i t h e r e
# s o t h a t t h o s e C M a k e v e r s i o n s c a n f i n d i t . W e w a i t u n t i l a f t e r a l l
# t h e add_subdirectory ( ) c a l l s t o a v o i d a f f e c t i n g t h e s u b d i r e c t o r i e s .
SET ( EXECUTABLE_OUTPUT_PATH ${ CMake_BIN_DIR } )
set ( EXECUTABLE_OUTPUT_PATH ${ CMake_BIN_DIR } )