summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt19
-rw-r--r--Modules/CMakeASM-ATTInformation.cmake3
-rw-r--r--Modules/CMakeASMCompiler.cmake.in1
-rw-r--r--Modules/CMakeASMInformation.cmake21
-rw-r--r--Modules/CMakeCommonLanguageInclude.cmake6
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake86
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake7
-rw-r--r--Modules/CMakeFortranInformation.cmake3
-rw-r--r--Modules/CPackDeb.cmake24
-rw-r--r--Modules/CPackRPM.cmake28
-rw-r--r--Modules/CTest.cmake21
-rw-r--r--Modules/CTestTargets.cmake8
-rw-r--r--Modules/Compiler/GNU-ASM.cmake6
-rw-r--r--Modules/Compiler/HP-ASM.cmake3
-rw-r--r--Modules/Compiler/HP-C.cmake3
-rw-r--r--Modules/Compiler/HP-CXX.cmake3
-rw-r--r--Modules/Compiler/Intel-ASM.cmake13
-rw-r--r--Modules/Compiler/SunPro-ASM.cmake24
-rw-r--r--Modules/Compiler/XL-ASM.cmake13
-rw-r--r--Modules/ExternalProject.cmake13
-rw-r--r--Modules/FindPostgreSQL.cmake4
-rw-r--r--Modules/FindQt4.cmake283
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake16
-rw-r--r--Modules/Platform/AIX-GNU.cmake2
-rw-r--r--Modules/Platform/AIX-XL-ASM.cmake2
-rw-r--r--Modules/Platform/AIX-XL-C.cmake6
-rw-r--r--Modules/Platform/AIX-XL-CXX.cmake6
-rw-r--r--Modules/Platform/AIX-XL-Fortran.cmake6
-rw-r--r--Modules/Platform/AIX-XL.cmake28
-rw-r--r--Modules/Platform/AIX.cmake2
-rw-r--r--Modules/Platform/Darwin.cmake3
-rw-r--r--Modules/Platform/HP-UX-HP-ASM.cmake6
-rw-r--r--Modules/Platform/HP-UX-HP-C.cmake11
-rw-r--r--Modules/Platform/HP-UX-HP-CXX.cmake16
-rw-r--r--Modules/Platform/HP-UX-HP-Fortran.cmake7
-rw-r--r--Modules/Platform/HP-UX-HP.cmake34
-rw-r--r--Modules/Platform/HP-UX.cmake65
-rw-r--r--Modules/Platform/Windows-GNU.cmake1
-rw-r--r--Modules/Platform/Windows-Intel-ASM.cmake2
-rw-r--r--Modules/Qt4Macros.cmake6
-rw-r--r--Modules/UsewxWidgets.cmake2
-rw-r--r--Source/CMakeLists.txt4
-rw-r--r--Source/CPack/OSXScriptLauncher.cxx1
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx53
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx357
-rw-r--r--Source/CPack/cmCPackDebGenerator.h18
-rw-r--r--Source/CPack/cmCPackGenerator.cxx155
-rw-r--r--Source/CPack/cmCPackGenerator.h26
-rw-r--r--Source/CPack/cmCPackRPMGenerator.cxx212
-rw-r--r--Source/CPack/cmCPackRPMGenerator.h13
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx2
-rw-r--r--Source/CTest/cmCTestGIT.cxx45
-rw-r--r--Source/CTest/cmCTestGIT.h2
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx2
-rw-r--r--Source/CursesDialog/form/frm_driver.c2
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx14
-rw-r--r--Source/QtDialog/QCMakeCacheView.h4
-rw-r--r--Source/cmAddCustomCommandCommand.cxx7
-rw-r--r--Source/cmAddCustomCommandCommand.h2
-rw-r--r--Source/cmAddCustomTargetCommand.cxx8
-rw-r--r--Source/cmAddCustomTargetCommand.h2
-rw-r--r--Source/cmComputeLinkInformation.cxx6
-rw-r--r--Source/cmDocumentVariables.cxx24
-rw-r--r--Source/cmExportFileGenerator.cxx6
-rw-r--r--Source/cmExportInstallFileGenerator.cxx14
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx7
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx90
-rw-r--r--Source/cmFileCommand.cxx452
-rw-r--r--Source/cmFileCommand.h15
-rw-r--r--Source/cmGetCMakePropertyCommand.cxx21
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx9
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx72
-rw-r--r--Source/cmIDEOptions.cxx6
-rw-r--r--Source/cmIDEOptions.h1
-rw-r--r--Source/cmListCommand.h8
-rw-r--r--Source/cmLocalGenerator.cxx1
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx2
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx30
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx8
-rw-r--r--Source/cmLocalVisualStudioGenerator.h2
-rw-r--r--Source/cmMakefile.cxx35
-rw-r--r--Source/cmMakefile.h12
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx49
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.h1
-rw-r--r--Source/cmPolicies.cxx2
-rw-r--r--Source/cmSourceFile.cxx6
-rw-r--r--Source/cmStringCommand.cxx68
-rw-r--r--Source/cmStringCommand.h6
-rw-r--r--Source/cmTarget.cxx65
-rw-r--r--Source/cmTarget.h5
-rw-r--r--Source/cmUseMangledMesaCommand.h14
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx14
-rw-r--r--Source/cmake.cxx69
-rw-r--r--Source/cmake.h4
-rw-r--r--Source/cmakemain.cxx12
-rw-r--r--Source/kwsys/CMakeLists.txt286
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake4
-rw-r--r--Tests/Assembler/CMakeLists.txt40
-rw-r--r--Tests/BundleTest/BundleLib.cxx4
-rw-r--r--Tests/BundleTest/BundleTest.cxx6
-rw-r--r--Tests/BundleTest/CMakeLists.txt12
-rw-r--r--Tests/CFBundleTest/CMakeLists.txt56
-rw-r--r--Tests/CFBundleTest/ExportList_plugin.txt3
-rw-r--r--Tests/CFBundleTest/Info.plist.in54
-rw-r--r--Tests/CFBundleTest/InfoPlist.strings.in4
-rw-r--r--Tests/CFBundleTest/Localized.r18
-rw-r--r--Tests/CFBundleTest/Localized.rsrcbin0 -> 496 bytes
-rw-r--r--Tests/CFBundleTest/PluginConfig.cmake21
-rw-r--r--Tests/CFBundleTest/README.txt16
-rw-r--r--Tests/CFBundleTest/VerifyResult.cmake32
-rw-r--r--Tests/CFBundleTest/np_macmain.cpp49
-rw-r--r--Tests/CMakeLists.txt55
-rw-r--r--Tests/CMakeTests/CMakeLists.txt2
-rw-r--r--Tests/CMakeTests/FileDownloadTest.cmake.in2
-rw-r--r--Tests/CMakeTests/FileTest.cmake.in2
-rw-r--r--Tests/CMakeTests/FileTestScript.cmake20
-rw-r--r--Tests/CMakeTests/FileUploadTest.cmake.in49
-rw-r--r--Tests/CMakeTests/StringTest.cmake.in2
-rw-r--r--Tests/CMakeTests/StringTestScript.cmake79
-rw-r--r--Tests/CPackComponentsForAll/CMakeLists.txt10
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in4
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in4
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in4
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in4
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake55
-rw-r--r--Tests/CPackComponentsForAll/SystemSpecificInformations.cmake164
-rw-r--r--Tests/CTestTest3/test.cmake.in120
-rw-r--r--Tests/CTestTestBadExe/test.cmake.in3
-rw-r--r--Tests/CTestTestChecksum/test.cmake.in3
-rw-r--r--Tests/CTestTestCostSerial/test.cmake.in3
-rw-r--r--Tests/CTestTestCrash/test.cmake.in3
-rw-r--r--Tests/CTestTestCycle/test.cmake.in3
-rw-r--r--Tests/CTestTestDepends/test.cmake.in3
-rw-r--r--Tests/CTestTestFailedSubmits/test.cmake.in4
-rw-r--r--Tests/CTestTestFailure/testNoBuild.cmake.in3
-rw-r--r--Tests/CTestTestFailure/testNoExe.cmake.in3
-rw-r--r--Tests/CTestTestParallel/test.cmake.in3
-rw-r--r--Tests/CTestTestResourceLock/test.cmake.in3
-rw-r--r--Tests/CTestTestScheduler/test.cmake.in3
-rw-r--r--Tests/CTestTestStopTime/test.cmake.in3
-rw-r--r--Tests/CTestTestSubdir/test.cmake.in3
-rw-r--r--Tests/CTestTestTimeout/test.cmake.in3
-rw-r--r--Tests/CTestTestZeroTimeout/test.cmake.in3
-rw-r--r--Tests/CustomCommandWorkingDirectory/CMakeLists.txt21
-rw-r--r--Tests/Fortran/CMakeLists.txt13
-rw-r--r--Tests/Fortran/world_gnu.def2
-rw-r--r--Tests/Fortran/world_icl.def (renamed from Tests/Fortran/world.def)0
-rw-r--r--Tests/LinkStatic/CMakeLists.txt27
-rw-r--r--Tests/LinkStatic/LinkStatic.c5
-rw-r--r--Utilities/cmcurl/CMakeLists.txt8
-rw-r--r--Utilities/cmcurl/easy.c2
-rw-r--r--Utilities/cmcurl/setup.h2
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt2
-rw-r--r--Utilities/cmlibarchive/build/windows/mvcpp.nt117
-rw-r--r--Utilities/cmlibarchive/build/windows/vc71/libarchive.sln23
-rw-r--r--Utilities/cmlibarchive/build/windows/vc71/libarchive.vcproj327
-rw-r--r--Utilities/cmlibarchive/build/windows/vc80/libarchive.sln25
-rw-r--r--Utilities/cmlibarchive/build/windows/vc80/libarchive.vcproj455
-rw-r--r--Utilities/cmlibarchive/build/windows/vc80/libarchive_test/libarchive_test.vcproj495
-rw-r--r--Utilities/cmlibarchive/build/windows/vc90/libarchive.sln25
-rw-r--r--Utilities/cmlibarchive/build/windows/vc90/libarchive.vcproj456
-rw-r--r--Utilities/cmlibarchive/build/windows/vc90/libarchive_test/libarchive_test.vcproj494
-rw-r--r--Utilities/cmlibarchive/build/windows/wccpp.nt107
-rwxr-xr-xbootstrap4
164 files changed, 3102 insertions, 3616 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23525c4..c40bc26 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
#=============================================================================
# CMake - Cross Platform Makefile Generator
-# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -9,12 +9,9 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5 FATAL_ERROR)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
PROJECT(CMake)
-IF(COMMAND CMAKE_POLICY)
- CMAKE_POLICY(SET CMP0003 NEW)
-ENDIF(COMMAND CMAKE_POLICY)
IF(CMAKE_BOOTSTRAP)
# Running from bootstrap script. Set local variable and remove from cache.
@@ -22,20 +19,8 @@ IF(CMAKE_BOOTSTRAP)
UNSET(CMAKE_BOOTSTRAP CACHE)
ENDIF()
-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
- # by CMake 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)
diff --git a/Modules/CMakeASM-ATTInformation.cmake b/Modules/CMakeASM-ATTInformation.cmake
index abf560b..cb1f5d6 100644
--- a/Modules/CMakeASM-ATTInformation.cmake
+++ b/Modules/CMakeASM-ATTInformation.cmake
@@ -18,5 +18,8 @@ SET(ASM_DIALECT "-ATT")
# *.S files are supposed to be preprocessed, so they should not be passed to
# assembler but should be processed by gcc
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm)
+
+SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
+
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)
diff --git a/Modules/CMakeASMCompiler.cmake.in b/Modules/CMakeASMCompiler.cmake.in
index 230805b..2dc24b0 100644
--- a/Modules/CMakeASMCompiler.cmake.in
+++ b/Modules/CMakeASMCompiler.cmake.in
@@ -4,6 +4,7 @@ SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_LINKER "@CMAKE_LINKER@")
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1)
+SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ID "@_CMAKE_ASM_COMPILER_ID@")
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@")
SET(CMAKE_ASM@ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index b94303e..d50f351 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -12,8 +12,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues")
-
IF(UNIX)
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
ELSE(UNIX)
@@ -34,6 +32,9 @@ IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
IF(NOT _INCLUDED_FILE)
+ IF("ASM${ASM_DIALECT}" STREQUAL "ASM")
+ MESSAGE(FATAL_ERROR "Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}")
+ ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
ENDIF(NOT _INCLUDED_FILE)
@@ -89,7 +90,7 @@ MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_FLAGS
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
@@ -100,9 +101,21 @@ ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
IF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
- "<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+ "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
+IF(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG)
+ SET(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG})
+ENDIF()
+
+IF(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP)
+ SET(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP})
+ENDIF()
+
+IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG)
+ SET(CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_ASM${ASM_DIALECT}_FLAG})
+ENDIF()
+
# to be done
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake
index 237f8dd..a2929f1 100644
--- a/Modules/CMakeCommonLanguageInclude.cmake
+++ b/Modules/CMakeCommonLanguageInclude.cmake
@@ -16,7 +16,7 @@
# cache values that can be initialized in the platform-compiler.cmake file
# it may be included by more than one language.
-SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
+SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker.")
@@ -70,11 +70,11 @@ IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# shared linker flags
-SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
+SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker during the creation of dll's.")
# module linker flags
-SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
+SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker during the creation of modules.")
SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index d6350bf..171e31f 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -21,11 +21,37 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
ENDIF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
# finally list compilers to try
- IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
- ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}as ${_CMAKE_TOOLCHAIN_PREFIX}gas)
- ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+ IF("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support
+
+ IF(CMAKE_ASM_COMPILER_INIT)
+ SET(CMAKE_ASM_COMPILER_LIST ${CMAKE_ASM_COMPILER_INIT})
+ ELSE(CMAKE_ASM_COMPILER_INIT)
+
+ IF(CMAKE_C_COMPILER)
+ SET(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "The ASM compiler")
+ SET(CMAKE_ASM_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
+ ELSEIF(CMAKE_CXX_COMPILER)
+ SET(CMAKE_ASM_COMPILER "${CMAKE_CXX_COMPILER}" CACHE FILEPATH "The ASM compiler")
+ SET(CMAKE_ASM_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
+ ELSE(CMAKE_CXX_COMPILER)
+ # List all default C and CXX compilers
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc
+ ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC)
+ ENDIF(CMAKE_C_COMPILER)
+
+ ENDIF(CMAKE_ASM_COMPILER_INIT)
+
+
+ ELSE("ASM${ASM_DIALECT}" STREQUAL "ASM") # some specific assembler "dialect"
+
+ IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
+ ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+ MESSAGE(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !")
+ ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+
+ ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
+
# Find the compiler.
IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
@@ -63,7 +89,24 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
# Table of per-vendor compiler id flags with expected output.
LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "GNU assembler")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "(GNU assembler)|(GCC)|(Free Software Foundation)")
+
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS HP )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_HP "-V")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_HP "HP C")
+
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS Intel )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_Intel "--version")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_Intel "(ICC)")
+
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS SunPro )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_SunPro "-V")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_SunPro "Sun C")
+
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS XL )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XL "-qversion")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XL "XL C")
+
LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")
@@ -71,14 +114,15 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
INCLUDE(CMakeDetermineCompilerId)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
- IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
- MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
- ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
- MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
- ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
-
ENDIF()
+IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+ MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
+ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+ MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
+ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+
+
# If we have a gas/as cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas , optionally
@@ -90,10 +134,25 @@ ENDIF()
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
IF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- STRING(REGEX REPLACE "^(.+-)g?as(\\.exe)?$" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
+ SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+# Now try the C compiler regexp:
+IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+ IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+
+# Finally try the CXX compiler regexp:
+IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+ IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+
+
INCLUDE(CMakeFindBinUtils)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
@@ -106,6 +165,7 @@ ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
+SET(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 9a3884a..b160dee 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -287,6 +287,13 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
RESULT_VARIABLE result
TIMEOUT 10
)
+
+ IF("${lang}" STREQUAL "ASM")
+ MESSAGE(STATUS "Checked for ${vendor}")
+ MESSAGE(STATUS " Output: -${output}-")
+ MESSAGE(STATUS " Result: -${result}-")
+ ENDIF("${lang}" STREQUAL "ASM")
+
IF("${output}" MATCHES "${regex}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 4f033e3..dc15e55 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -178,9 +178,10 @@ IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH)
ENDIF()
# compile a Fortran file into an object file
+# (put -o after -c to workaround bug in at least one mpif77 wrapper)
IF(NOT CMAKE_Fortran_COMPILE_OBJECT)
SET(CMAKE_Fortran_COMPILE_OBJECT
- "<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
+ "<CMAKE_Fortran_COMPILER> <DEFINES> <FLAGS> -c <SOURCE> -o <OBJECT>")
ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT)
# link a fortran program
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 98d40d6..469f08f 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -60,7 +60,7 @@
# CPACK_DEBIAN_PACKAGE_DEBUG
# Mandatory : NO
# Default : -
-# May be set when invoking cpack in order to trace debug informations
+# May be set when invoking cpack in order to trace debug information
# during CPackDeb run.
# CPACK_DEBIAN_PACKAGE_PREDEPENDS
# Mandatory : NO
@@ -311,6 +311,28 @@ ENDIF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY )
# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
+# Are we packaging components ?
+IF(CPACK_DEB_PACKAGE_COMPONENT)
+ SET(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
+ SET(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "/${CPACK_DEB_PACKAGE_COMPONENT}")
+ SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_DEB_PACKAGE_COMPONENT}")
+ELSE(CPACK_DEB_PACKAGE_COMPONENT)
+ SET(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
+ SET(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "")
+ SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
+ENDIF(CPACK_DEB_PACKAGE_COMPONENT)
+
+# Print out some debug information if we were asked for that
+IF(CPACK_DEBIAN_PACKAGE_DEBUG)
+ MESSAGE("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
+ MESSAGE("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
+ MESSAGE("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
+ MESSAGE("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
+ MESSAGE("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
+ MESSAGE("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
+ MESSAGE("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ MESSAGE("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
+ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
# For debian source packages:
# debian/control
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 026c45a..26209a7 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -194,6 +194,25 @@ IF(NOT RPMBUILD_EXECUTABLE)
MESSAGE(FATAL_ERROR "RPM package requires rpmbuild executable")
ENDIF(NOT RPMBUILD_EXECUTABLE)
+# Display lsb_release output if DEBUG mode enable
+# This will help to diagnose problem with CPackRPM
+# because we will know on which kind of Linux we are
+IF(CPACK_RPM_PACKAGE_DEBUG)
+ find_program(LSB_RELEASE_EXECUTABLE lsb_release)
+ if(LSB_RELEASE_EXECUTABLE)
+ execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -a
+ OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REGEX REPLACE "\n" ", "
+ LSB_RELEASE_OUTPUT
+ ${_TMP_LSB_RELEASE_OUTPUT})
+ else (LSB_RELEASE_EXECUTABLE)
+ set(LSB_RELEASE_OUTPUT "lsb_release not installed/found!")
+ endif(LSB_RELEASE_EXECUTABLE)
+ MESSAGE("CPackRPM:Debug: LSB_RELEASE = ${LSB_RELEASE_OUTPUT}")
+ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+
# We may use RPM version in the future in order
# to shut down warning about space in buildtree
# some recent RPM version should support space in different places.
@@ -621,13 +640,18 @@ IF(RPMBUILD_EXECUTABLE)
--buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
"${CPACK_RPM_BINARY_SPECFILE}"
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
+ RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT
ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err"
OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
- IF(CPACK_RPM_PACKAGE_DEBUG)
+ IF(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
+ FILE(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err RPMBUILDERR)
+ FILE(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out RPMBUILDOUT)
MESSAGE("CPackRPM:Debug: You may consult rpmbuild logs in: ")
MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err")
+ MESSAGE("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ MESSAGE("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
+ ENDIF(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
ELSE(RPMBUILD_EXECUTABLE)
IF(ALIEN_EXECUTABLE)
MESSAGE(FATAL_ERROR "RPM packaging through alien not done (yet)")
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index bb76ddd..c261eb3 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -63,7 +63,8 @@ OPTION(BUILD_TESTING "Build the testing tree." ON)
# function to turn generator name into a version string
# like vs7 vs71 vs8 vs9
FUNCTION(GET_VS_VERSION_STRING generator var)
- STRING(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1" NUMBER "${generator}")
+ STRING(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1"
+ NUMBER "${generator}")
IF("${generator}" MATCHES "Visual Studio 7 .NET 2003")
SET(ver_string "vs71")
ELSE("${generator}" MATCHES "Visual Studio 7 .NET 2003")
@@ -253,15 +254,16 @@ IF(BUILD_TESTING)
ENDIF(CTEST_USE_LAUNCHERS)
MARK_AS_ADVANCED(
+ BZRCOMMAND
+ BZR_UPDATE_OPTIONS
COVERAGE_COMMAND
+ CTEST_SUBMIT_RETRY_DELAY
+ CTEST_SUBMIT_RETRY_COUNT
CVSCOMMAND
- SVNCOMMAND
- BZRCOMMAND
- HGCOMMAND
- GITCOMMAND
CVS_UPDATE_OPTIONS
- SVN_UPDATE_OPTIONS
- BZR_UPDATE_OPTIONS
+ DART_TESTING_TIMEOUT
+ GITCOMMAND
+ HGCOMMAND
MAKECOMMAND
MEMORYCHECK_COMMAND
MEMORYCHECK_SUPPRESSIONS_FILE
@@ -270,10 +272,9 @@ IF(BUILD_TESTING)
SLURM_SBATCH_COMMAND
SLURM_SRUN_COMMAND
SITE
- CTEST_SUBMIT_RETRY_DELAY
- CTEST_SUBMIT_RETRY_COUNT
+ SVNCOMMAND
+ SVN_UPDATE_OPTIONS
)
- # BUILDNAME
IF(NOT RUN_FROM_DART)
SET(RUN_FROM_CTEST_OR_DART 1)
INCLUDE(CTestTargets)
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake
index e3ef86c..d66874d 100644
--- a/Modules/CTestTargets.cmake
+++ b/Modules/CTestTargets.cmake
@@ -84,4 +84,12 @@ IF(NOT _CTEST_TARGETS_ADDED)
ENDFOREACH(testtype)
ENDFOREACH(mode)
ENDIF("${CMAKE_GENERATOR}" MATCHES Make)
+
+ # If requested, add an alias that is the equivalent of the built-in "test"
+ # or "RUN_TESTS" target:
+ IF(CTEST_TEST_TARGET_ALIAS)
+ ADD_CUSTOM_TARGET(${CTEST_TEST_TARGET_ALIAS}
+ ${CMAKE_CTEST_COMMAND} ${__conf_types}
+ )
+ ENDIF()
ENDIF(NOT _CTEST_TARGETS_ADDED)
diff --git a/Modules/Compiler/GNU-ASM.cmake b/Modules/Compiler/GNU-ASM.cmake
new file mode 100644
index 0000000..e07401d
--- /dev/null
+++ b/Modules/Compiler/GNU-ASM.cmake
@@ -0,0 +1,6 @@
+# This file is loaded when gcc/g++ is used for assembler files (the "ASM" cmake language)
+include(Compiler/GNU)
+
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S;asm)
+
+__compiler_gnu(ASM)
diff --git a/Modules/Compiler/HP-ASM.cmake b/Modules/Compiler/HP-ASM.cmake
new file mode 100644
index 0000000..8aa7bdb
--- /dev/null
+++ b/Modules/Compiler/HP-ASM.cmake
@@ -0,0 +1,3 @@
+SET(CMAKE_ASM_VERBOSE_FLAG "-v")
+
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
diff --git a/Modules/Compiler/HP-C.cmake b/Modules/Compiler/HP-C.cmake
index abf384a..dc7fbb2 100644
--- a/Modules/Compiler/HP-C.cmake
+++ b/Modules/Compiler/HP-C.cmake
@@ -1 +1,4 @@
SET(CMAKE_C_VERBOSE_FLAG "-v")
+
+SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/HP-CXX.cmake b/Modules/Compiler/HP-CXX.cmake
index f3c6b5f..82c1a86 100644
--- a/Modules/Compiler/HP-CXX.cmake
+++ b/Modules/Compiler/HP-CXX.cmake
@@ -1 +1,4 @@
SET(CMAKE_CXX_VERBOSE_FLAG "-v")
+
+SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/Intel-ASM.cmake b/Modules/Compiler/Intel-ASM.cmake
new file mode 100644
index 0000000..59b50a1
--- /dev/null
+++ b/Modules/Compiler/Intel-ASM.cmake
@@ -0,0 +1,13 @@
+SET(CMAKE_ASM_VERBOSE_FLAG "-v")
+
+SET(CMAKE_ASM_FLAGS_INIT "")
+SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+
+IF(UNIX)
+ SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
+ELSE(UNIX)
+ SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
+ENDIF(UNIX)
diff --git a/Modules/Compiler/SunPro-ASM.cmake b/Modules/Compiler/SunPro-ASM.cmake
new file mode 100644
index 0000000..dfc5702
--- /dev/null
+++ b/Modules/Compiler/SunPro-ASM.cmake
@@ -0,0 +1,24 @@
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
+
+SET(CMAKE_ASM_VERBOSE_FLAG "-#")
+
+SET(CMAKE_SHARED_LIBRARY_ASM_FLAGS "-KPIC")
+SET(CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS "-G")
+SET(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG "-R")
+SET(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":")
+SET(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h")
+
+SET(CMAKE_ASM_FLAGS_INIT "")
+SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+
+# Initialize ASM 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_ASM_FLAGS "-Bstatic")
+ SET(CMAKE_${type}_LINK_DYNAMIC_ASM_FLAGS "-Bdynamic")
+ENDFOREACH(type)
diff --git a/Modules/Compiler/XL-ASM.cmake b/Modules/Compiler/XL-ASM.cmake
new file mode 100644
index 0000000..e5d4ffa
--- /dev/null
+++ b/Modules/Compiler/XL-ASM.cmake
@@ -0,0 +1,13 @@
+SET(CMAKE_ASM_VERBOSE_FLAG "-V")
+
+# -qthreaded = Ensures that all optimizations will be thread-safe
+# -qalias=noansi = Turns off type-based aliasing completely (safer optimizer)
+# -qhalt=e = Halt on error messages (rather than just severe errors)
+SET(CMAKE_ASM_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e -qsourcetype=assembler")
+
+SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g")
+
+SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 3de6b7e..390b8f9 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -403,11 +403,11 @@ endfunction(_ep_write_verifyfile_script)
function(_ep_write_extractfile_script script_filename name filename directory)
set(args "")
- if(filename MATCHES "(\\.bz2|\\.tar\\.gz|\\.tgz|\\.zip)$")
+ if(filename MATCHES "(\\.|=)(bz2|tar\\.gz|tgz|zip)$")
set(args xfz)
endif()
- if(filename MATCHES "\\.tar$")
+ if(filename MATCHES "(\\.|=)tar$")
set(args xf)
endif()
@@ -1109,10 +1109,15 @@ function(_ep_add_download_command name)
else()
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
- string(REGEX MATCH "[^/]*$" fname "${url}")
- if(NOT "${fname}" MATCHES "\\.(bz2|tar|tgz|tar\\.gz|zip)$")
+ string(REGEX MATCH "[^/\\?]*$" fname "${url}")
+ if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$")
+ string(REGEX MATCH "([^/\\?]+(\\.|=)(bz2|tar|tgz|tar\\.gz|zip))/.*$" match_result "${url}")
+ set(fname "${CMAKE_MATCH_1}")
+ endif()
+ if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$")
message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
endif()
+ string(REPLACE ";" "-" fname "${fname}")
set(file ${download_dir}/${fname})
get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)
_ep_write_downloadfile_script("${stamp_dir}/download-${name}.cmake" "${url}" "${file}" "${timeout}" "${md5}")
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 6455c99..96b6741 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -1,6 +1,4 @@
-# Find the PostgreSQL installation.
-#
-# ----------------------------------------------------------------------------
+# - Find the PostgreSQL installation.
# Usage:
# In your CMakeLists.txt file do something like this:
# ...
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 79a3d51..0a11cfb 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -9,7 +9,7 @@
# QT_LIBRARIES variable.
#
# Typical usage could be something like:
-# find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED )
+# find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml)
# include(${QT_USE_FILE})
# add_executable(myexe main.cpp)
# target_link_libraries(myexe ${QT_LIBRARIES})
@@ -354,6 +354,7 @@ ENDIF(QT_QT_LIBRARY)
INCLUDE(CheckSymbolExists)
INCLUDE(MacroAddFileDependencies)
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
@@ -472,6 +473,7 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
DOC "The qmake executable for the Qt installation to use"
)
+# double check that it was a Qt4 qmake, if not, re-find with different names
IF (QT_QMAKE_EXECUTABLE)
IF(QT_QMAKE_EXECUTABLE_LAST)
@@ -480,8 +482,6 @@ IF (QT_QMAKE_EXECUTABLE)
SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE)
- SET(QT4_QMAKE_FOUND FALSE)
-
_qt4_query_qmake(QT_VERSION QTVERSION)
# check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
@@ -498,74 +498,9 @@ IF (QT_QMAKE_EXECUTABLE)
ENDIF(QT_QMAKE_EXECUTABLE)
ENDIF(NOT QTVERSION)
- # check that we found the Qt4 qmake, Qt3 qmake output won't match here
- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
- IF (qt_version_tmp)
-
- # we need at least version 4.0.0
- IF (NOT QT_MIN_VERSION)
- SET(QT_MIN_VERSION "4.0.0")
- ENDIF (NOT QT_MIN_VERSION)
-
- #now parse the parts of the user given version string into variables
- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}")
- IF (NOT req_qt_major_vers)
- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"")
- ENDIF (NOT req_qt_major_vers)
-
- # now parse the parts of the user given version string into variables
- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}")
-
- # Suppport finding at least a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 )
- # This implementation is a hack to avoid duplicating code and make sure we stay
- # source-compatible with CMake 2.6.x
- IF( Qt4_FIND_VERSION )
- SET( QT_MIN_VERSION ${Qt4_FIND_VERSION} )
- SET( req_qt_major_vers ${Qt4_FIND_VERSION_MAJOR} )
- SET( req_qt_minor_vers ${Qt4_FIND_VERSION_MINOR} )
- SET( req_qt_patch_vers ${Qt4_FIND_VERSION_PATCH} )
- ENDIF( Qt4_FIND_VERSION )
-
- IF (NOT req_qt_major_vers EQUAL 4)
- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"")
- ENDIF (NOT req_qt_major_vers EQUAL 4)
-
- # and now the version string given by qmake
- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-
- # compute an overall version number which can be compared at once
- MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}")
- MATH(EXPR found_vers "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100 + ${QT_VERSION_PATCH}")
-
- # Support finding *exactly* a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 EXACT )
- IF( Qt4_FIND_VERSION_EXACT )
- IF(found_vers EQUAL req_vers)
- SET( QT4_QMAKE_FOUND TRUE )
- ELSE(found_vers EQUAL req_vers)
- SET( QT4_QMAKE_FOUND FALSE )
- IF (found_vers LESS req_vers)
- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
- ELSE (found_vers LESS req_vers)
- SET(QT4_INSTALLED_VERSION_TOO_NEW TRUE)
- ENDIF (found_vers LESS req_vers)
- ENDIF(found_vers EQUAL req_vers)
- ELSE( Qt4_FIND_VERSION_EXACT )
- IF (found_vers LESS req_vers)
- SET(QT4_QMAKE_FOUND FALSE)
- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
- ELSE (found_vers LESS req_vers)
- SET(QT4_QMAKE_FOUND TRUE)
- ENDIF (found_vers LESS req_vers)
- ENDIF( Qt4_FIND_VERSION_EXACT )
- ENDIF (qt_version_tmp)
-
ENDIF (QT_QMAKE_EXECUTABLE)
-IF (QT4_QMAKE_FOUND)
+IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
# ask qmake for the mkspecs directory
# we do this first because QT_LIBINFIX might be set
@@ -607,14 +542,25 @@ IF (QT4_QMAKE_FOUND)
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
HINTS ${QT_LIBRARY_DIR_TMP}
- NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
+ NO_DEFAULT_PATH
)
FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
HINTS ${QT_LIBRARY_DIR_TMP}
- NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
+ NO_DEFAULT_PATH
)
+ IF(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
+ FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
+ NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
+ HINTS ${QT_LIBRARY_DIR_TMP}
+ )
+ FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
+ NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
+ HINTS ${QT_LIBRARY_DIR_TMP}
+ )
+ ENDIF(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
+
# try dropping a hint if trying to use Visual Studio with Qt built by mingw
IF(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
IF(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
@@ -644,10 +590,13 @@ IF (QT4_QMAKE_FOUND)
ENDIF()
IF (APPLE)
+ SET(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK})
IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
SET(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE)
+ SET(CMAKE_FIND_FRAMEWORK FIRST)
ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
SET(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE)
+ SET(CMAKE_FIND_FRAMEWORK LAST)
ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
ENDIF (APPLE)
@@ -663,8 +612,7 @@ IF (QT4_QMAKE_FOUND)
_qt4_query_qmake(QT_INSTALL_HEADERS qt_headers)
SET(QT_QTCORE_INCLUDE_DIR NOTFOUND)
FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
- HINTS ${qt_headers}
- ${QT_LIBRARY_DIR}/QtCore.framework/Headers
+ HINTS ${qt_headers} ${QT_LIBRARY_DIR}
PATH_SUFFIXES QtCore
)
@@ -682,6 +630,10 @@ IF (QT4_QMAKE_FOUND)
ENDIF()
ENDIF()
+ IF(APPLE)
+ SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD})
+ ENDIF(APPLE)
+
# Set QT_INCLUDE_DIR based on QT_HEADERS_DIR
IF(QT_HEADERS_DIR)
IF(QT_USE_FRAMEWORKS)
@@ -835,7 +787,7 @@ IF (QT4_QMAKE_FOUND)
PATHS
${QT_HEADERS_DIR}/${QT_MODULE}
${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
# phonon doesn't seem consistent, let's try phonondefs.h for some
# installations
@@ -844,7 +796,7 @@ IF (QT4_QMAKE_FOUND)
PATHS
${QT_HEADERS_DIR}/${QT_MODULE}
${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
ENDIF(${QT_MODULE} STREQUAL "phonon")
ENDFOREACH(QT_MODULE)
@@ -854,11 +806,11 @@ IF (QT4_QMAKE_FOUND)
# Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
PATHS ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt
PATHS ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
ENDIF(Q_WS_WIN)
@@ -867,7 +819,7 @@ IF (QT4_QMAKE_FOUND)
PATHS
${QT_HEADERS_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
# Set QT_QTASSISTANT_INCLUDE_DIR
@@ -875,7 +827,7 @@ IF (QT4_QMAKE_FOUND)
PATHS
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
# Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
@@ -883,7 +835,7 @@ IF (QT4_QMAKE_FOUND)
PATHS
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
########################################
@@ -897,11 +849,11 @@ IF (QT4_QMAKE_FOUND)
STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE
NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4
- PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG
NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4
- PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
ENDFOREACH(QT_MODULE)
@@ -911,26 +863,26 @@ IF (QT4_QMAKE_FOUND)
ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
# Set QT_QTDESIGNERCOMPONENTS_LIBRARY
- FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTMAIN_LIBRARY
IF(Q_WS_WIN)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
ENDIF(Q_WS_WIN)
# Set QT_QTASSISTANTCLIENT_LIBRARY
- FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTASSISTANT_LIBRARY
- FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTHELP_LIBRARY
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
@@ -993,67 +945,67 @@ IF (QT4_QMAKE_FOUND)
FIND_PROGRAM(QT_MOC_EXECUTABLE
NAMES moc-qt4 moc
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_UIC_EXECUTABLE
NAMES uic-qt4 uic
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_UIC3_EXECUTABLE
NAMES uic3
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_RCC_EXECUTABLE
NAMES rcc
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
NAMES qdbuscpp2xml
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
NAMES qdbusxml2cpp
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
NAMES lupdate-qt4 lupdate
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
NAMES lrelease-qt4 lrelease
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE
NAMES qcollectiongenerator-qt4 qcollectiongenerator
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DESIGNER_EXECUTABLE
NAMES designer-qt4 designer
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LINGUIST_EXECUTABLE
NAMES linguist-qt4 linguist
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
IF (QT_MOC_EXECUTABLE)
@@ -1075,32 +1027,7 @@ IF (QT4_QMAKE_FOUND)
# get the directory of the current file, used later on in the file
GET_FILENAME_COMPONENT( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
- ######################################
- #
- # decide if Qt got found
- #
- ######################################
-
- # if the includes,libraries,moc,uic and rcc are found then we have it
- IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
- SET( QT4_FOUND "YES" )
- INCLUDE(FindPackageMessage)
- FIND_PACKAGE_MESSAGE(Qt4 "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})"
- "[${QT_LIBRARY_DIR}][${QT_INCLUDE_DIR}][${QT_MOC_EXECUTABLE}][${QT_UIC_EXECUTABLE}][${QT_RCC_EXECUTABLE}]")
- ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
- SET( QT4_FOUND "NO")
- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
- IF( Qt4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!")
- ENDIF( Qt4_FIND_REQUIRED)
- ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
- SET(QT_FOUND ${QT4_FOUND})
-
-
###############################################
#
# configuration/system dependent settings
@@ -1158,11 +1085,11 @@ IF (QT4_QMAKE_FOUND)
IF(QT_IS_STATIC)
FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_RELEASE
NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
- PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_DEBUG
NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
- PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
_QT4_ADJUST_LIB_VARS(${QT_PLUGIN})
ELSE(QT_IS_STATIC)
@@ -1171,11 +1098,11 @@ IF (QT4_QMAKE_FOUND)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_MODULE_SUFFIX} ${CMAKE_SHARED_LIBRARY_SUFFIX})
FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_RELEASE
NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
- PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_DEBUG
NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
- PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
MARK_AS_ADVANCED(QT_${_upper_qt_plugin}_PLUGIN_RELEASE QT_${_upper_qt_plugin}_PLUGIN_DEBUG)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT})
@@ -1192,44 +1119,58 @@ IF (QT4_QMAKE_FOUND)
INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake")
+ # set version variables
+ STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
+ STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
+ STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
- #######################################
- #
- # compatibility settings
- #
- #######################################
- # Backwards compatibility for CMake1.4 and 1.2
- SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
- SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
-
- SET( QT_QT_LIBRARY "")
-
-ELSE(QT4_QMAKE_FOUND)
-
- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
-
- # The code below is overly complex to make sure we do not break compatibility with CMake 2.6.x
- # For CMake 2.8, it should be simplified by getting rid of QT4_INSTALLED_VERSION_TOO_OLD and
- # QT4_INSTALLED_VERSION_TOO_NEW
- IF(Qt4_FIND_REQUIRED)
- IF(QT4_INSTALLED_VERSION_TOO_OLD)
- IF( Qt4_FIND_VERSION_EXACT )
- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, version ${QT_MIN_VERSION} is required")
- ELSE( Qt4_FIND_VERSION_EXACT )
- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
- ENDIF( Qt4_FIND_VERSION_EXACT )
- ELSE(QT4_INSTALLED_VERSION_TOO_OLD)
- IF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too new, version ${QT_MIN_VERSION} is required")
- ELSE( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
- MESSAGE( FATAL_ERROR "Qt qmake not found!")
- ENDIF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD)
- ELSE(Qt4_FIND_REQUIRED)
- IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
- MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
- ENDIF(Qt4_FIND_REQUIRED)
-
-ENDIF (QT4_QMAKE_FOUND)
+ENDIF(QT_QMAKE_EXECUTABLE AND QTVERSION)
+
+#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
+IF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION)
+ SET(Qt4_FIND_VERSION ${QT_MIN_VERSION})
+ENDIF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION)
+
+IF( Qt4_FIND_COMPONENTS )
+
+ # if components specified in find_package(), make sure each of those pieces were found
+ SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR)
+ FOREACH( component ${Qt4_FIND_COMPONENTS} )
+ STRING( TOUPPER ${component} _COMPONENT )
+ if(${_COMPONENT} STREQUAL "QTMAIN")
+ IF(Q_WS_WIN)
+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_LIBRARY)
+ ENDIF(Q_WS_WIN)
+ else(${_COMPONENT} STREQUAL "QTMAIN")
+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY)
+ endif(${_COMPONENT} STREQUAL "QTMAIN")
+ ENDFOREACH( component )
+
+ if(Qt4_FIND_COMPONENTS MATCHES QtGui)
+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_UIC_EXECUTABLE)
+ endif(Qt4_FIND_COMPONENTS MATCHES QtGui)
+
+ELSE( Qt4_FIND_COMPONENTS )
+
+ # if no components specified, we'll make a default set of required variables to say Qt is found
+ SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR
+ QT_LIBRARY_DIR QT_QTCORE_LIBRARY)
+
+ENDIF( Qt4_FIND_COMPONENTS )
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
+ REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
+ VERSION_VAR QTVERSION
+ )
+
+#######################################
+#
+# compatibility settings
+#
+#######################################
+# Backwards compatibility for CMake1.4 and 1.2
+SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
+SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
+SET( QT_QT_LIBRARY "")
+SET(QT_FOUND ${QT4_FOUND})
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 2dfe8b1..59e5ec1 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -70,9 +70,11 @@ IF(MSVC)
IF(MSVC80)
# Find the runtime library redistribution directory.
+ GET_FILENAME_COMPONENT(msvc_install_dir
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]" ABSOLUTE)
FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
+ "${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
)
MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
@@ -103,10 +105,14 @@ IF(MSVC)
IF(MSVC90)
# Find the runtime library redistribution directory.
+ GET_FILENAME_COMPONENT(msvc_install_dir
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]" ABSOLUTE)
+ GET_FILENAME_COMPONENT(msvc_express_install_dir
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]" ABSOLUTE)
FIND_PATH(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist"
+ "${msvc_install_dir}/../../VC/redist"
+ "${msvc_express_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
)
MARK_AS_ADVANCED(MSVC90_REDIST_DIR)
@@ -137,9 +143,11 @@ IF(MSVC)
IF(MSVC10)
# Find the runtime library redistribution directory.
+ GET_FILENAME_COMPONENT(msvc_install_dir
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]" ABSOLUTE)
FIND_PATH(MSVC10_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT
PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../VC/redist"
+ "${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
"$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/VC/redist"
"$ENV{ProgramFiles(x86)}/Microsoft Visual Studio 10.0/VC/redist"
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake
index 79c06ba..543f3e8 100644
--- a/Modules/Platform/AIX-GNU.cmake
+++ b/Modules/Platform/AIX-GNU.cmake
@@ -19,5 +19,7 @@ endif()
set(__AIX_COMPILER_GNU 1)
macro(__aix_compiler_gnu lang)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G")
endmacro()
diff --git a/Modules/Platform/AIX-XL-ASM.cmake b/Modules/Platform/AIX-XL-ASM.cmake
new file mode 100644
index 0000000..ea0944b
--- /dev/null
+++ b/Modules/Platform/AIX-XL-ASM.cmake
@@ -0,0 +1,2 @@
+include(Platform/AIX-XL)
+__aix_compiler_xl(ASM)
diff --git a/Modules/Platform/AIX-XL-C.cmake b/Modules/Platform/AIX-XL-C.cmake
index 2de30d5..5e437fa 100644
--- a/Modules/Platform/AIX-XL-C.cmake
+++ b/Modules/Platform/AIX-XL-C.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_C_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(C)
diff --git a/Modules/Platform/AIX-XL-CXX.cmake b/Modules/Platform/AIX-XL-CXX.cmake
index 648cb31..ef38a5f 100644
--- a/Modules/Platform/AIX-XL-CXX.cmake
+++ b/Modules/Platform/AIX-XL-CXX.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_CXX_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(CXX)
diff --git a/Modules/Platform/AIX-XL-Fortran.cmake b/Modules/Platform/AIX-XL-Fortran.cmake
index 8292e78..6d4f655 100644
--- a/Modules/Platform/AIX-XL-Fortran.cmake
+++ b/Modules/Platform/AIX-XL-Fortran.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_Fortran_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(Fortran)
diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake
new file mode 100644
index 0000000..1f94152
--- /dev/null
+++ b/Modules/Platform/AIX-XL.cmake
@@ -0,0 +1,28 @@
+
+#=============================================================================
+# Copyright 2002-2011 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 distribute 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_XL)
+ return()
+endif()
+set(__AIX_COMPILER_XL 1)
+
+macro(__aix_compiler_xl lang)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
+ set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ")
+ set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ")
+endmacro()
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake
index 0ab0cce..a9f773e 100644
--- a/Modules/Platform/AIX.cmake
+++ b/Modules/Platform/AIX.cmake
@@ -9,8 +9,6 @@ SET(CMAKE_DL_LIBS "-lld")
# When our own RPATH is to be added it may be inserted before the
# "always" paths.
SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-blibpath:")
-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)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index a99ff4a..c11c8fb 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -68,7 +68,8 @@ IF(NOT _CMAKE_OSX_SDKS)
FIND_PROGRAM(CMAKE_XCODE_SELECT xcode-select)
IF(CMAKE_XCODE_SELECT)
EXECUTE_PROCESS(COMMAND ${CMAKE_XCODE_SELECT} "-print-path"
- OUTPUT_VARIABLE OSX_DEVELOPER_ROOT)
+ OUTPUT_VARIABLE OSX_DEVELOPER_ROOT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
FILE(GLOB _CMAKE_OSX_SDKS "${OSX_DEVELOPER_ROOT}/SDKs/*")
ENDIF(CMAKE_XCODE_SELECT)
ENDIF(NOT _CMAKE_OSX_SDKS)
diff --git a/Modules/Platform/HP-UX-HP-ASM.cmake b/Modules/Platform/HP-UX-HP-ASM.cmake
new file mode 100644
index 0000000..0a85905
--- /dev/null
+++ b/Modules/Platform/HP-UX-HP-ASM.cmake
@@ -0,0 +1,6 @@
+include(Platform/HP-UX-HP)
+__hpux_compiler_hp(ASM)
+
+set(CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS "-E -b +nodefaultrpath -L/usr/lib")
+
+set(CMAKE_ASM_CREATE_SHARED_LIBRARY "ld <CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
diff --git a/Modules/Platform/HP-UX-HP-C.cmake b/Modules/Platform/HP-UX-HP-C.cmake
new file mode 100644
index 0000000..d83e01b
--- /dev/null
+++ b/Modules/Platform/HP-UX-HP-C.cmake
@@ -0,0 +1,11 @@
+include(Platform/HP-UX-HP)
+__hpux_compiler_hp(C)
+
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b +nodefaultrpath -L/usr/lib")
+
+set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> -Aa -Ae <FLAGS> -o <OBJECT> -c <SOURCE>")
+
+# use ld directly to create shared libraries for hp cc
+set(CMAKE_C_CREATE_SHARED_LIBRARY "ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
diff --git a/Modules/Platform/HP-UX-HP-CXX.cmake b/Modules/Platform/HP-UX-HP-CXX.cmake
new file mode 100644
index 0000000..8f3c70c
--- /dev/null
+++ b/Modules/Platform/HP-UX-HP-CXX.cmake
@@ -0,0 +1,16 @@
+include(Platform/HP-UX-HP)
+__hpux_compiler_hp(CXX)
+
+set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "+Z -Wl,-E,+nodefaultrpath -b -L/usr/lib")
+
+set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
+ "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>"
+ "mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>"
+ "rm -f `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.o"
+ )
+
+set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
diff --git a/Modules/Platform/HP-UX-HP-Fortran.cmake b/Modules/Platform/HP-UX-HP-Fortran.cmake
new file mode 100644
index 0000000..5a3ab19
--- /dev/null
+++ b/Modules/Platform/HP-UX-HP-Fortran.cmake
@@ -0,0 +1,7 @@
+include(Platform/HP-UX-HP)
+__hpux_compiler_hp(Fortran)
+
+set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-E -b -L/usr/lib")
+
+set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
+ "ld <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
diff --git a/Modules/Platform/HP-UX-HP.cmake b/Modules/Platform/HP-UX-HP.cmake
new file mode 100644
index 0000000..5e70d31
--- /dev/null
+++ b/Modules/Platform/HP-UX-HP.cmake
@@ -0,0 +1,34 @@
+
+#=============================================================================
+# Copyright 2002-2011 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 distribute 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_HP)
+ return()
+endif()
+set(__HPUX_COMPILER_HP 1)
+set(_Wl_C "")
+set(_Wl_CXX "-Wl,")
+set(_Wl_Fortran "")
+set(_Wl_ASM "")
+
+macro(__hpux_compiler_hp lang)
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "+Z")
+ set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "${_Wl_${lang}}+b")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
+ set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "${_Wl_${lang}}+h")
+ set(CMAKE_EXECUTABLE_RUNTIME_${lang}_FLAG "-Wl,+b")
+
+ set(CMAKE_${lang}_FLAGS_INIT "")
+endmacro()
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake
index 9d357c9..ab3dc22 100644
--- a/Modules/Platform/HP-UX.cmake
+++ b/Modules/Platform/HP-UX.cmake
@@ -15,57 +15,6 @@ SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
# specifying the file path.
SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
-# fortran
-IF(CMAKE_COMPILER_IS_GNUG77)
-ELSE(CMAKE_COMPILER_IS_GNUG77)
- # use ld directly to create shared libraries for hp cc
- SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
- "ld <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
- SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "+Z") # -pic
- SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-E -b -L/usr/lib") # -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 "+b") # -rpath
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") # : or empty
- SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "+h")
- SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-Wl,+b") # -rpath
-ENDIF(CMAKE_COMPILER_IS_GNUG77)
-
-# C compiler
-IF(CMAKE_COMPILER_IS_GNUCC)
-ELSE(CMAKE_COMPILER_IS_GNUCC)
- # hp cc
- # use ld directly to create shared libraries for hp cc
- SET(CMAKE_C_CREATE_SHARED_LIBRARY
- "ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "+Z") # -pic
- SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b +nodefaultrpath -L/usr/lib") # -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 "+b") # -rpath
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
- SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "+h")
- SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG "-Wl,+b") # -rpath
- SET(CMAKE_C_FLAGS_INIT "")
- SET(CMAKE_C_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> <DEFINES> -Aa -Ae <FLAGS> -o <OBJECT> -c <SOURCE>")
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-
-# CXX compiler
-IF(CMAKE_COMPILER_IS_GNUCXX)
-ELSE(CMAKE_COMPILER_IS_GNUCXX)
- # for hp aCC
- SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "+Z") # -pic
- SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "+Z -Wl,-E,+nodefaultrpath -b -L/usr/lib") # -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_SONAME_CXX_FLAG "-Wl,+h")
- SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath
- SET (CMAKE_CXX_FLAGS_INIT "")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# set flags for gcc support
INCLUDE(Platform/UnixPaths)
@@ -81,20 +30,6 @@ LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux64)
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
/usr/lib/hpux32 /usr/lib/hpux64)
-IF(NOT CMAKE_COMPILER_IS_GNUCC)
- SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
-
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
- "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>"
- "mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>"
- "rm -f `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.o"
- )
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-
# Initialize C and CXX 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
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index 7084b83..72b5d62 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -43,6 +43,7 @@ endif()
set(CMAKE_DL_LIBS "")
set(CMAKE_LIBRARY_PATH_FLAG "-L")
set(CMAKE_LINK_LIBRARY_FLAG "-l")
+set(CMAKE_LINK_DEF_FILE_FLAG "") # Empty string: passing the file is enough
set(CMAKE_LINK_LIBRARY_SUFFIX "")
set(CMAKE_CREATE_WIN32_EXE "-mwindows")
diff --git a/Modules/Platform/Windows-Intel-ASM.cmake b/Modules/Platform/Windows-Intel-ASM.cmake
new file mode 100644
index 0000000..31d08c7
--- /dev/null
+++ b/Modules/Platform/Windows-Intel-ASM.cmake
@@ -0,0 +1,2 @@
+include(Platform/Windows-Intel)
+__windows_compiler_intel(ASM)
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 86a7404..6d7a3ec 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -107,10 +107,8 @@ MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
ENDIF(_moc_outfile_dir)
SET (_moc_parameters_file ${outfile}_parameters)
SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
- FILE (REMOVE ${_moc_parameters_file})
- FOREACH(arg ${_moc_parameters})
- FILE (APPEND ${_moc_parameters_file} "${arg}\n")
- ENDFOREACH(arg)
+ STRING (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
+ FILE (WRITE ${_moc_parameters_file} "${_moc_parameters}")
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters
DEPENDS ${infile}
diff --git a/Modules/UsewxWidgets.cmake b/Modules/UsewxWidgets.cmake
index 9ecfff0..a0f2e86 100644
--- a/Modules/UsewxWidgets.cmake
+++ b/Modules/UsewxWidgets.cmake
@@ -6,7 +6,7 @@
# # Note that for MinGW users the order of libs is important!
# FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
# INCLUDE(${wxWidgets_USE_FILE})
-# # and for each of your dependant executable/library targets:
+# # and for each of your dependent executable/library targets:
# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
#
# DEPRECATED
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 7722c19..278d4df 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -343,7 +343,7 @@ TARGET_LINK_LIBRARIES(CMakeLib cmsys
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
${CMAKE_CURL_LIBRARIES} )
-# On Apple we need Carbon
+# On Apple we need CoreFoundation
IF(APPLE)
TARGET_LINK_LIBRARIES(CMakeLib "-framework CoreFoundation")
ENDIF(APPLE)
@@ -465,7 +465,7 @@ IF(APPLE)
ADD_EXECUTABLE(OSXScriptLauncher
CPack/OSXScriptLauncher.cxx)
TARGET_LINK_LIBRARIES(OSXScriptLauncher cmsys)
- TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework Carbon")
+ TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework CoreFoundation")
ENDIF(APPLE)
# Build CMake executable
diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx
index 99ffecc..e0fbe9b 100644
--- a/Source/CPack/OSXScriptLauncher.cxx
+++ b/Source/CPack/OSXScriptLauncher.cxx
@@ -14,7 +14,6 @@
#include <cmsys/ios/fstream>
#include <cmsys/ios/iostream>
-#include <Carbon/Carbon.h>
#include <CoreFoundation/CoreFoundation.h>
// For the PATH_MAX constant
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 46be99b..b629c63 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -121,9 +121,11 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
<< std::endl);
// Begin the archive for this group
std::string packageFileName= std::string(toplevel);
- packageFileName += "/"
- +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
- +"-"+compGIt->first + this->GetOutputExtension();
+ packageFileName += "/"+
+ GetComponentPackageFileName(this->GetOption("CPACK_PACKAGE_FILE_NAME"),
+ compGIt->first,
+ true)
+ + this->GetOutputExtension();
// open a block in order to automatically close archive
// at the end of the block
{
@@ -141,6 +143,39 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
// add the generated package to package file names list
packageFileNames.push_back(packageFileName);
}
+ // Handle Orphan components (components not belonging to any groups)
+ std::map<std::string, cmCPackComponent>::iterator compIt;
+ for (compIt=this->Components.begin();
+ compIt!=this->Components.end(); ++compIt )
+ {
+ // Does the component belong to a group?
+ if (compIt->second.Group==NULL)
+ {
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Component <"
+ << compIt->second.Name
+ << "> does not belong to any group, package it separately."
+ << std::endl);
+ std::string localToplevel(
+ this->GetOption("CPACK_TEMPORARY_DIRECTORY")
+ );
+ std::string packageFileName = std::string(toplevel);
+
+ localToplevel += "/"+ compIt->first;
+ packageFileName += "/"+
+ GetComponentPackageFileName(this->GetOption("CPACK_PACKAGE_FILE_NAME"),
+ compIt->first,
+ false)
+ + this->GetOutputExtension();
+ {
+ DECLARE_AND_OPEN_ARCHIVE(packageFileName,archive);
+ // Add the files of this component to the archive
+ addOneComponentToArchive(archive,&(compIt->second));
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+ }
+ }
}
// CPACK_COMPONENTS_IGNORE_GROUPS is set
// We build 1 package per component
@@ -154,9 +189,11 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
std::string packageFileName = std::string(toplevel);
localToplevel += "/"+ compIt->first;
- packageFileName += "/"
- +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
- +"-"+compIt->first + this->GetOutputExtension();
+ packageFileName += "/"+
+ GetComponentPackageFileName(this->GetOption("CPACK_PACKAGE_FILE_NAME"),
+ compIt->first,
+ false)
+ + this->GetOutputExtension();
{
DECLARE_AND_OPEN_ARCHIVE(packageFileName,archive);
// Add the files of this component to the archive
@@ -177,7 +214,7 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponent)
packageFileNames.push_back(std::string(toplevel));
packageFileNames[0] += "/"
+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
- +"-ALL" + this->GetOutputExtension();
+ + this->GetOutputExtension();
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Packaging all groups in one package..."
"(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)"
@@ -226,8 +263,6 @@ int cmCPackArchiveGenerator::PackageFiles()
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: "
<< toplevel << std::endl);
- PrepareGroupingKind();
-
if (SupportsComponentInstallation()) {
// CASE 1 : COMPONENT ALL-IN-ONE package
// If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 47a1ff6..d3320c0 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -51,14 +51,256 @@ int cmCPackDebGenerator::InitializeInternal()
}
//----------------------------------------------------------------------
+int cmCPackDebGenerator::PackageComponents(bool ignoreGroup)
+{
+ int retval = 1;
+ /* Reset package file name list it will be populated during the
+ * component packaging run*/
+ packageFileNames.clear();
+ std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
+
+ // The default behavior is to have one package by component group
+ // unless CPACK_COMPONENTS_IGNORE_GROUP is specified.
+ if (!ignoreGroup)
+ {
+ std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
+ for (compGIt=this->ComponentGroups.begin();
+ compGIt!=this->ComponentGroups.end(); ++compGIt)
+ {
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
+ << compGIt->first
+ << std::endl);
+ // Begin the archive for this group
+ std::string localToplevel(initialTopLevel);
+ std::string packageFileName(
+ cmSystemTools::GetParentDirectory(toplevel.c_str())
+ );
+ std::string outputFileName(
+ std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ +"-"+compGIt->first + this->GetOutputExtension()
+ );
+
+ localToplevel += "/"+ compGIt->first;
+ /* replace the TEMP DIRECTORY with the component one */
+ this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
+ packageFileName += "/"+ outputFileName;
+ /* replace proposed CPACK_OUTPUT_FILE_NAME */
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
+ /* replace the TEMPORARY package file name */
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ packageFileName.c_str());
+ // Tell CPackDeb.cmake the name of the component GROUP.
+ this->SetOption("CPACK_DEB_PACKAGE_COMPONENT",compGIt->first.c_str());
+ if (!this->ReadListFile("CPackDeb.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
+ retval = 0;
+ }
+
+ cmsys::Glob gl;
+ std::string findExpr(this->GetOption("WDIR"));
+ findExpr += "/*";
+ gl.RecurseOn();
+ if ( !gl.FindFiles(findExpr) )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find any files in the installed directory" << std::endl);
+ return 0;
+ }
+ packageFiles = gl.GetFiles();
+
+ int res = createDeb();
+ if (res != 1)
+ {
+ retval = 0;
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+ }
+ }
+ // CPACK_COMPONENTS_IGNORE_GROUPS is set
+ // We build 1 package per component
+ else
+ {
+ std::map<std::string, cmCPackComponent>::iterator compIt;
+ for (compIt=this->Components.begin();
+ compIt!=this->Components.end(); ++compIt )
+ {
+ std::string localToplevel(initialTopLevel);
+ std::string packageFileName(
+ cmSystemTools::GetParentDirectory(toplevel.c_str())
+ );
+ std::string outputFileName(
+ std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")
+ )
+ +"-"+compIt->first + this->GetOutputExtension());
+
+ localToplevel += "/"+ compIt->first;
+ /* replace the TEMP DIRECTORY with the component one */
+ this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
+ packageFileName += "/"+ outputFileName;
+ /* replace proposed CPACK_OUTPUT_FILE_NAME */
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
+ /* replace the TEMPORARY package file name */
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ packageFileName.c_str());
+
+ this->SetOption("CPACK_DEB_PACKAGE_COMPONENT",compIt->first.c_str());
+ if (!this->ReadListFile("CPackDeb.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
+ retval = 0;
+ }
+
+ cmsys::Glob gl;
+ std::string findExpr(this->GetOption("WDIR"));
+ findExpr += "/*";
+ gl.RecurseOn();
+ if ( !gl.FindFiles(findExpr) )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find any files in the installed directory" << std::endl);
+ return 0;
+ }
+ packageFiles = gl.GetFiles();
+
+ int res = createDeb();
+ if (res != 1)
+ {
+ retval = 0;
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+ }
+ }
+ return retval;
+}
+
+//----------------------------------------------------------------------
+int cmCPackDebGenerator::PackageComponentsAllInOne(bool allComponent)
+{
+ int retval = 1;
+ std::string compInstDirName;
+ /* Reset package file name list it will be populated during the
+ * component packaging run*/
+ packageFileNames.clear();
+ std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
+
+ // all GROUP in one vs all COMPONENT in one
+ if (allComponent)
+ {
+ compInstDirName = "ALL_COMPONENTS_IN_ONE";
+ }
+ else
+ {
+ compInstDirName = "ALL_GROUPS_IN_ONE";
+ }
+
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Packaging all groups in one package..."
+ "(CPACK_COMPONENTS_ALL_[GROUPS_]IN_ONE_PACKAGE is set)"
+ << std::endl);
+
+ // The ALL GROUPS in ONE package case
+ std::string localToplevel(initialTopLevel);
+ std::string packageFileName(
+ cmSystemTools::GetParentDirectory(toplevel.c_str())
+ );
+ std::string outputFileName(
+ std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ + this->GetOutputExtension()
+ );
+ // all GROUP in one vs all COMPONENT in one
+ localToplevel += "/"+compInstDirName;
+
+ /* replace the TEMP DIRECTORY with the component one */
+ this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
+ packageFileName += "/"+ outputFileName;
+ /* replace proposed CPACK_OUTPUT_FILE_NAME */
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
+ /* replace the TEMPORARY package file name */
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ packageFileName.c_str());
+ // Tell CPackDeb.cmake the name of the component GROUP.
+ this->SetOption("CPACK_DEB_PACKAGE_COMPONENT",compInstDirName.c_str());
+ if (!this->ReadListFile("CPackDeb.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
+ retval = 0;
+ }
+
+ cmsys::Glob gl;
+ std::string findExpr(this->GetOption("WDIR"));
+ findExpr += "/*";
+ gl.RecurseOn();
+ if ( !gl.FindFiles(findExpr) )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find any files in the installed directory" << std::endl);
+ return 0;
+ }
+ packageFiles = gl.GetFiles();
+
+ int res = createDeb();
+ if (res != 1)
+ {
+ retval = 0;
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+ return retval;
+}
+
+//----------------------------------------------------------------------
int cmCPackDebGenerator::PackageFiles()
{
- this->ReadListFile("CPackDeb.cmake");
+ int retval = -1;
+
+ /* Are we in the component packaging case */
+ if (SupportsComponentInstallation()) {
+ // CASE 1 : COMPONENT ALL-IN-ONE package
+ // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
+ // then the package file is unique and should be open here.
+ if (allComponentInOne ||
+ (allGroupInOne && (!this->ComponentGroups.empty()))
+ )
+ {
+ return PackageComponentsAllInOne(allComponentInOne);
+ }
+ // CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one)
+ // There will be 1 package for each component group
+ // however one may require to ignore component group and
+ // in this case you'll get 1 package for each component.
+ else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup))
+ {
+ return PackageComponents(ignoreComponentGroup);
+ }
+ }
+ // CASE 3 : NON COMPONENT package.
+ else
+ {
+ if (!this->ReadListFile("CPackDeb.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
+ retval = 0;
+ }
+ packageFiles = files;
+ return createDeb();
+ }
+ return retval;
+}
+
+int cmCPackDebGenerator::createDeb()
+{
const char* cmakeExecutable = this->GetOption("CMAKE_COMMAND");
// debian-binary file
std::string dbfilename;
- dbfilename = toplevel;
+ dbfilename += this->GetOption("WDIR");
dbfilename += "/debian-binary";
{ // the scope is needed for cmGeneratedFileStream
cmGeneratedFileStream out(dbfilename.c_str());
@@ -68,7 +310,7 @@ int cmCPackDebGenerator::PackageFiles()
// control file
std::string ctlfilename;
- ctlfilename = toplevel;
+ ctlfilename = this->GetOption("WDIR");
ctlfilename += "/control";
// debian policy enforce lower case for package name
@@ -158,8 +400,9 @@ int cmCPackDebGenerator::PackageFiles()
{
std::string dirName = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
dirName += '/';
- for (std::vector<std::string>::const_iterator fileIt = files.begin();
- fileIt != files.end(); ++ fileIt )
+ for (std::vector<std::string>::const_iterator fileIt =
+ packageFiles.begin();
+ fileIt != packageFiles.end(); ++ fileIt )
{
totalSize += cmSystemTools::FileLength(fileIt->c_str());
}
@@ -178,14 +421,22 @@ int cmCPackDebGenerator::PackageFiles()
// now add all directories which have to be compressed
// collect all top level install dirs for that
// e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would give /usr and /opt
- size_t topLevelLength = toplevel.length();
+ size_t topLevelLength = std::string(this->GetOption("WDIR")).length();
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "WDIR: \"" << this->GetOption("WDIR")
+ << "\", length = " << topLevelLength
+ << std::endl);
std::set<std::string> installDirs;
- for (std::vector<std::string>::const_iterator fileIt = files.begin();
- fileIt != files.end(); ++ fileIt )
+ for (std::vector<std::string>::const_iterator fileIt =
+ packageFiles.begin();
+ fileIt != packageFiles.end(); ++ fileIt )
{
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "FILEIT: \"" << *fileIt << "\""
+ << std::endl);
std::string::size_type slashPos = fileIt->find('/', topLevelLength+1);
- std::string relativeDir = fileIt->substr(topLevelLength,
+ std::string relativeDir = fileIt->substr(topLevelLength,
slashPos - topLevelLength);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "RELATIVEDIR: \"" << relativeDir
+ << "\"" << std::endl);
if (installDirs.find(relativeDir) == installDirs.end())
{
installDirs.insert(relativeDir);
@@ -195,11 +446,11 @@ int cmCPackDebGenerator::PackageFiles()
}
std::string output;
- int retVal = -1;
+ int retval = -1;
int res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
- &retVal, toplevel.c_str(), this->GeneratorVerbose, 0);
+ &retval, this->GetOption("WDIR"), this->GeneratorVerbose, 0);
- if ( !res || retVal )
+ if ( !res || retval )
{
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/Deb.log";
@@ -215,15 +466,18 @@ int cmCPackDebGenerator::PackageFiles()
}
std::string md5filename;
- md5filename = toplevel;
+ md5filename = this->GetOption("WDIR");
md5filename += "/md5sums";
{ // the scope is needed for cmGeneratedFileStream
cmGeneratedFileStream out(md5filename.c_str());
std::vector<std::string>::const_iterator fileIt;
- std::string topLevelWithTrailingSlash = toplevel;
+// std::string topLevelWithTrailingSlash = toplevel;
+ std::string topLevelWithTrailingSlash =
+ this->GetOption("CPACK_TEMPORARY_DIRECTORY");
topLevelWithTrailingSlash += '/';
- for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
+ for ( fileIt = packageFiles.begin();
+ fileIt != packageFiles.end(); ++ fileIt )
{
cmd = "\"";
cmd += cmakeExecutable;
@@ -233,32 +487,31 @@ int cmCPackDebGenerator::PackageFiles()
//std::string output;
//int retVal = -1;
res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
- &retVal, toplevel.c_str(), this->GeneratorVerbose, 0);
+ &retval, toplevel.c_str(), this->GeneratorVerbose, 0);
// debian md5sums entries are like this:
// 014f3604694729f3bf19263bac599765 usr/bin/ccmake
// thus strip the full path (with the trailing slash)
- cmSystemTools::ReplaceString(output,
+ cmSystemTools::ReplaceString(output,
topLevelWithTrailingSlash.c_str(), "");
out << output;
}
- // each line contains a eol.
+ // each line contains a eol.
// Do not end the md5sum file with yet another (invalid)
}
-
cmd = "\"";
cmd += cmakeExecutable;
cmd += "\" -E tar cfz control.tar.gz ./control ./md5sums";
- const char* controlExtra =
+ const char* controlExtra =
this->GetOption("CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA");
if( controlExtra )
- {
+ {
std::vector<std::string> controlExtraList;
cmSystemTools::ExpandListArgument(controlExtra, controlExtraList);
- for(std::vector<std::string>::iterator i =
+ for(std::vector<std::string>::iterator i =
controlExtraList.begin(); i != controlExtraList.end(); ++i)
{
- std::string filenamename =
+ std::string filenamename =
cmsys::SystemTools::GetFilenameName(i->c_str());
std::string localcopy = toplevel;
localcopy += "/";
@@ -274,9 +527,9 @@ int cmCPackDebGenerator::PackageFiles()
}
}
res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
- &retVal, toplevel.c_str(), this->GeneratorVerbose, 0);
+ &retval, this->GetOption("WDIR"), this->GeneratorVerbose, 0);
- if ( !res || retVal )
+ if ( !res || retval )
{
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/Deb.log";
@@ -295,24 +548,70 @@ int cmCPackDebGenerator::PackageFiles()
// since debian packages require BSD ar (most Linux distros and even
// FreeBSD and NetBSD ship GNU ar) we use a copy of OpenBSD ar here.
std::vector<std::string> arFiles;
- std::string topLevelString = toplevel;
+ std::string topLevelString = this->GetOption("WDIR");
topLevelString += "/";
arFiles.push_back(topLevelString + "debian-binary");
arFiles.push_back(topLevelString + "control.tar.gz");
arFiles.push_back(topLevelString + "data.tar.gz");
- res = ar_append(packageFileNames[0].c_str(), arFiles);
+ std::string outputFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
+ outputFileName += "/";
+ outputFileName += this->GetOption("CPACK_OUTPUT_FILE_NAME");
+ res = ar_append(outputFileName.c_str(), arFiles);
if ( res!=0 )
{
- std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
+ std::string tmpFile = this->GetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME");
tmpFile += "/Deb.log";
cmGeneratedFileStream ofs(tmpFile.c_str());
ofs << "# Problem creating archive using: " << res << std::endl;
return 0;
}
-
return 1;
}
+bool cmCPackDebGenerator::SupportsComponentInstallation() const
+ {
+ if (IsOn("CPACK_DEB_COMPONENT_INSTALL"))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
+ const std::string& componentName)
+ {
+ if (ignoreComponentGroup) {
+ return componentName;
+ }
+
+ if (allComponentInOne) {
+ return std::string("ALL_COMPONENTS_IN_ONE");
+ }
+ // We have to find the name of the COMPONENT GROUP
+ // the current COMPONENT belongs to.
+ std::string groupVar = "CPACK_COMPONENT_" +
+ cmSystemTools::UpperCase(componentName) + "_GROUP";
+ if (NULL != GetOption(groupVar.c_str()))
+ {
+ if (allGroupInOne)
+ {
+ return std::string("ALL_GROUPS_IN_ONE");
+ }
+ else
+ {
+ return std::string(GetOption(groupVar.c_str()));
+ }
+ }
+ else
+ {
+ return componentName;
+ }
+ }
+
+
// The following code is taken from OpenBSD ar:
// http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ar/
// It has been slightly modified:
diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h
index 4a357d1..de1ea77 100644
--- a/Source/CPack/cmCPackDebGenerator.h
+++ b/Source/CPack/cmCPackDebGenerator.h
@@ -33,8 +33,26 @@ public:
protected:
virtual int InitializeInternal();
+ /**
+ * The method used to package files when component
+ * install is used. This will create one
+ * archive for each component group.
+ */
+ int PackageComponents(bool ignoreGroup);
+ /**
+ * Special case of component install where all
+ * components will be put in a single installer.
+ */
+ int PackageComponentsAllInOne(bool allComponent);
virtual int PackageFiles();
virtual const char* GetOutputExtension() { return ".deb"; }
+ virtual bool SupportsComponentInstallation() const;
+ virtual std::string GetComponentInstallDirNameSuffix(
+ const std::string& componentName);
+
+private:
+ int createDeb();
+ std::vector<std::string> packageFiles;
};
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index feda52c..5f314c6 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -24,6 +24,7 @@
#include <cmsys/SystemTools.hxx>
#include <cmsys/Glob.hxx>
#include <memory> // auto_ptr
+#include <algorithm>
#if defined(__HAIKU__)
#include <StorageKit.h>
@@ -684,7 +685,14 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
if (componentInstall)
{
tempInstallDirectory += "/";
- tempInstallDirectory += installComponent;
+ // Some CPack generators would rather chose
+ // the local installation directory suffix.
+ // Some (e.g. RPM) use
+ // one install directory for each component **GROUP**
+ // instead of the default
+ // one install directory for each component.
+ tempInstallDirectory +=
+ GetComponentInstallDirNameSuffix(installComponent);
}
if (!setDestDir)
@@ -803,7 +811,55 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
{
mf->AddDefinition("CMAKE_INSTALL_DO_STRIP", "1");
}
+ // Remember the list of files before installation
+ // of the current component (if we are in component install)
+ const char* InstallPrefix = tempInstallDirectory.c_str();
+ std::vector<std::string> filesBefore;
+ std::string findExpr(InstallPrefix);
+ if (componentInstall)
+ {
+ cmsys::Glob glB;
+ findExpr += "/*";
+ glB.RecurseOn();
+ glB.FindFiles(findExpr);
+ filesBefore = glB.GetFiles();
+ std::sort(filesBefore.begin(),filesBefore.end());
+ }
+ // do installation
int res = mf->ReadListFile(0, installFile.c_str());
+ // Now rebuild the list of files after installation
+ // of the current component (if we are in component install)
+ if (componentInstall)
+ {
+ cmsys::Glob glA;
+ glA.RecurseOn();
+ glA.FindFiles(findExpr);
+ std::vector<std::string> filesAfter = glA.GetFiles();
+ std::sort(filesAfter.begin(),filesAfter.end());
+ std::vector<std::string>::iterator diff;
+ std::vector<std::string> result(filesAfter.size());
+ diff = std::set_difference (
+ filesAfter.begin(),filesAfter.end(),
+ filesBefore.begin(),filesBefore.end(),
+ result.begin());
+
+ std::vector<std::string>::iterator fit;
+ std::string localFileName;
+ // Populate the File field of each component
+ for (fit=result.begin();fit!=diff;++fit)
+ {
+ localFileName =
+ cmSystemTools::RelativePath(InstallPrefix, fit->c_str());
+ localFileName =
+ localFileName.substr(localFileName.find('/')+1,
+ std::string::npos);
+ Components[installComponent].Files.push_back(localFileName);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"
+ <<localFileName<<"> to component <"
+ <<installComponent<<">"<<std::endl);
+ }
+ }
+
if (NULL !=mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
if (absoluteDestFiles.length()>0) {
absoluteDestFiles +=";";
@@ -873,6 +929,12 @@ int cmCPackGenerator::DoPackage()
return 0;
}
+ // Digest Component grouping specification
+ if ( !this->PrepareGroupingKind() )
+ {
+ return 0;
+ }
+
if ( cmSystemTools::IsOn(
this->GetOption("CPACK_REMOVE_TOPLEVEL_DIRECTORY")) )
{
@@ -939,35 +1001,6 @@ int cmCPackGenerator::DoPackage()
// The files to be installed
files = gl.GetFiles();
- // For component installations, determine which files go into which
- // components.
- if (!this->Components.empty())
- {
- std::vector<std::string>::const_iterator it;
- for ( it = files.begin(); it != files.end(); ++ it )
- {
- // beware we cannot just use tempDirectory as before
- // because some generator will "CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
- // we really want "CPACK_TEMPORARY_DIRECTORY"
- std::string fileN =
- cmSystemTools::RelativePath(
- this->GetOption("CPACK_TEMPORARY_DIRECTORY"), it->c_str());
-
- // Determine which component we are in.
- std::string componentName = fileN.substr(0, fileN.find('/'));
-
- // Strip off the component part of the path.
- fileN = fileN.substr(fileN.find('/')+1, std::string::npos);
-
- // Add this file to the list of files for the component.
- this->Components[componentName].Files.push_back(fileN);
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"
- <<fileN<<"> to component <"
- <<componentName<<">"<<std::endl);
- }
- }
-
-
packageFileNames.clear();
/* Put at least one file name into the list of
* wanted packageFileNames. The specific generator
@@ -1251,11 +1284,11 @@ int cmCPackGenerator::PrepareGroupingKind()
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
<< this->Name << "]"
<< " requested component grouping = "<< groupingType <<std::endl);
- if (groupingType == "ALL_GROUP_IN_ONE")
+ if (groupingType == "ALL_GROUPS_IN_ONE")
{
allGroupInOne = true;
}
- else if (groupingType == "ALL_COMPONENT_IN_ONE")
+ else if (groupingType == "ALL_COMPONENTS_IN_ONE")
{
allComponentInOne = true;
}
@@ -1268,11 +1301,19 @@ int cmCPackGenerator::PrepareGroupingKind()
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " requested component grouping type <"<< groupingType
- << "> UNKNOWN not in (ALL_GROUP_IN_ONE,"
- "ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl);
+ << "> UNKNOWN not in (ALL_GROUPS_IN_ONE,"
+ "ALL_COMPONENTS_IN_ONE,IGNORE)" <<std::endl);
}
}
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
+ << this->Name << "]"
+ << " requested component grouping = ("
+ << "ALL_GROUPS_IN_ONE=" << allGroupInOne
+ << ", ALL_COMPONENTS_IN_ONE=" << allComponentInOne
+ << ", IGNORE_GROUPS=" << ignoreComponentGroup
+ << ")"
+ << std::endl);
// Some components were defined but NO group
// force ignoreGroups
if (this->ComponentGroups.empty() && (!this->Components.empty())
@@ -1289,6 +1330,52 @@ int cmCPackGenerator::PrepareGroupingKind()
}
//----------------------------------------------------------------------
+std::string cmCPackGenerator::GetComponentInstallDirNameSuffix(
+ const std::string& componentName) {
+ return componentName;
+}
+//----------------------------------------------------------------------
+std::string cmCPackGenerator::GetComponentPackageFileName(
+ const std::string& initialPackageFileName,
+ const std::string& groupOrComponentName,
+ bool isGroupName) {
+
+ /*
+ * the default behavior is to use the
+ * component [group] name as a suffix
+ */
+ std::string suffix="-"+groupOrComponentName;
+ /* check if we should use DISPLAY name */
+ std::string dispNameVar = "CPACK_"+Name+"_USE_DISPLAY_NAME_IN_FILENAME";
+ if (IsOn(dispNameVar.c_str()))
+ {
+ /* the component Group case */
+ if (isGroupName)
+ {
+ std::string groupDispVar = "CPACK_COMPONENT_GROUP_"
+ + cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
+ const char* groupDispName = GetOption(groupDispVar.c_str());
+ if (groupDispName)
+ {
+ suffix = "-"+std::string(groupDispName);
+ }
+ }
+ /* the [single] component case */
+ else
+ {
+ std::string dispVar = "CPACK_COMPONENT_"
+ + cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
+ const char* dispName = GetOption(dispVar.c_str());
+ if(dispName)
+ {
+ suffix = "-"+std::string(dispName);
+ }
+ }
+ }
+ return initialPackageFileName + suffix;
+}
+
+//----------------------------------------------------------------------
bool cmCPackGenerator::SupportsComponentInstallation() const
{
return false;
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index f44a334..0497d1c 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -132,6 +132,32 @@ protected:
virtual int PrepareGroupingKind();
/**
+ * Some CPack generators may prefer to have
+ * CPack install all components belonging to the same
+ * [component] group to be install in the same directory.
+ * The default behavior is to install each component in
+ * a separate directory.
+ * @param[in] componentName the name of the component to be installed
+ * @return the name suffix the generator wants for the specified component
+ * default is "componentName"
+ */
+ virtual std::string GetComponentInstallDirNameSuffix(
+ const std::string& componentName);
+
+ /**
+ * CPack specific generator may mangle CPACK_PACKAGE_FILE_NAME
+ * with CPACK_COMPONENT_xxxx_<NAME>_DISPLAY_NAME if
+ * CPACK_<GEN>_USE_DISPLAY_NAME_IN_FILENAME is ON.
+ * @param[in] initialPackageFileName
+ * @param[in] groupOrComponentName
+ * @param[in] isGroupName
+ */
+ virtual std::string GetComponentPackageFileName(
+ const std::string& initialPackageFileName,
+ const std::string& groupOrComponentName,
+ bool isGroupName);
+
+ /**
* Package the list of files and/or components which
* has been prepared by the beginning of DoPackage.
* @pre @ref toplevel has been filled-in
diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx
index a5db78f..0b0c6b1 100644
--- a/Source/CPack/cmCPackRPMGenerator.cxx
+++ b/Source/CPack/cmCPackRPMGenerator.cxx
@@ -31,39 +31,94 @@ int cmCPackRPMGenerator::InitializeInternal()
{
this->SetOption("CPACK_SET_DESTDIR", "I_ON");
}
+ /* Replace space in CPACK_PACKAGE_NAME in order to avoid
+ * rpmbuild scream on unwanted space in filename issue
+ * Moreover RPM file do not usually embed space in filename
+ */
+ if (this->GetOption("CPACK_PACKAGE_NAME")) {
+ std::string packageName=this->GetOption("CPACK_PACKAGE_NAME");
+ cmSystemTools::ReplaceString(packageName," ","-");
+ this->SetOption("CPACK_PACKAGE_NAME",packageName.c_str());
+ }
+ /* same for CPACK_PACKAGE_FILE_NAME */
+ if (this->GetOption("CPACK_PACKAGE_FILE_NAME")) {
+ std::string packageName=this->GetOption("CPACK_PACKAGE_FILE_NAME");
+ cmSystemTools::ReplaceString(packageName," ","-");
+ this->SetOption("CPACK_PACKAGE_FILE_NAME",packageName.c_str());
+ }
return this->Superclass::InitializeInternal();
}
//----------------------------------------------------------------------
-int cmCPackRPMGenerator::PackageFiles()
+int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
{
int retval = 1;
- /* Digest Component grouping specification */
- retval = PrepareGroupingKind();
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: "
- << toplevel << std::endl);
+ /* Reset package file name list it will be populated during the
+ * component packaging run*/
+ packageFileNames.clear();
+ std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
- /* Are we in the component packaging case */
- if (SupportsComponentInstallation() & (!this->ComponentGroups.empty()))
+ // The default behavior is to have one package by component group
+ // unless CPACK_COMPONENTS_IGNORE_GROUP is specified.
+ if (!ignoreGroup)
+ {
+ std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
+ for (compGIt=this->ComponentGroups.begin();
+ compGIt!=this->ComponentGroups.end(); ++compGIt)
+ {
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
+ << compGIt->first
+ << std::endl);
+ // Begin the archive for this group
+ std::string localToplevel(initialTopLevel);
+ std::string packageFileName(
+ cmSystemTools::GetParentDirectory(toplevel.c_str())
+ );
+ std::string outputFileName(
+ GetComponentPackageFileName(this->GetOption("CPACK_PACKAGE_FILE_NAME"),
+ compGIt->first,
+ true)
+ + this->GetOutputExtension()
+ );
+
+ localToplevel += "/"+ compGIt->first;
+ /* replace the TEMP DIRECTORY with the component one */
+ this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
+ packageFileName += "/"+ outputFileName;
+ /* replace proposed CPACK_OUTPUT_FILE_NAME */
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
+ /* replace the TEMPORARY package file name */
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ packageFileName.c_str());
+ // Tell CPackRPM.cmake the name of the component GROUP.
+ this->SetOption("CPACK_RPM_PACKAGE_COMPONENT",compGIt->first.c_str());
+ if (!this->ReadListFile("CPackRPM.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackRPM.cmake" << std::endl);
+ retval = 0;
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+ }
+ }
+ // CPACK_COMPONENTS_IGNORE_GROUPS is set
+ // We build 1 package per component
+ else
{
- /* Reset package file name list it will be populated during the
- * component packaging run*/
- packageFileNames.clear();
- std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
- /* One Package per component CASE */
- /* Iterate over components */
std::map<std::string, cmCPackComponent>::iterator compIt;
for (compIt=this->Components.begin();
- compIt!=this->Components.end(); ++compIt )
+ compIt!=this->Components.end(); ++compIt )
{
std::string localToplevel(initialTopLevel);
std::string packageFileName(
cmSystemTools::GetParentDirectory(toplevel.c_str())
);
std::string outputFileName(
- std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")
- )
- +"-"+compIt->first + this->GetOutputExtension());
+ GetComponentPackageFileName(this->GetOption("CPACK_PACKAGE_FILE_NAME"),
+ compIt->first,
+ false)
+ + this->GetOutputExtension());
localToplevel += "/"+ compIt->first;
/* replace the TEMP DIRECTORY with the component one */
@@ -82,12 +137,101 @@ int cmCPackRPMGenerator::PackageFiles()
"Error while execution CPackRPM.cmake" << std::endl);
retval = 0;
}
-
// add the generated package to package file names list
packageFileNames.push_back(packageFileName);
}
}
- /* This is the non component case */
+ return retval;
+}
+
+//----------------------------------------------------------------------
+int cmCPackRPMGenerator::PackageComponentsAllInOne(bool allComponent)
+{
+ int retval = 1;
+ std::string compInstDirName;
+ /* Reset package file name list it will be populated during the
+ * component packaging run*/
+ packageFileNames.clear();
+ std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
+
+ // all GROUP in one vs all COMPONENT in one
+ if (allComponent)
+ {
+ compInstDirName = "ALL_COMPONENTS_IN_ONE";
+ }
+ else
+ {
+ compInstDirName = "ALL_GROUPS_IN_ONE";
+ }
+
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Packaging all groups in one package..."
+ "(CPACK_COMPONENTS_ALL_[GROUPS_]IN_ONE_PACKAGE is set)"
+ << std::endl);
+
+ // The ALL GROUPS in ONE package case
+ std::string localToplevel(initialTopLevel);
+ std::string packageFileName(
+ cmSystemTools::GetParentDirectory(toplevel.c_str())
+ );
+ std::string outputFileName(
+ std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ + this->GetOutputExtension()
+ );
+ // all GROUP in one vs all COMPONENT in one
+ localToplevel += "/"+compInstDirName;
+
+ /* replace the TEMP DIRECTORY with the component one */
+ this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
+ packageFileName += "/"+ outputFileName;
+ /* replace proposed CPACK_OUTPUT_FILE_NAME */
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
+ /* replace the TEMPORARY package file name */
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ packageFileName.c_str());
+ // Tell CPackRPM.cmake the name of the component GROUP.
+ this->SetOption("CPACK_RPM_PACKAGE_COMPONENT",compInstDirName.c_str());
+ if (!this->ReadListFile("CPackRPM.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackRPM.cmake" << std::endl);
+ retval = 0;
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+
+ return retval;
+}
+
+//----------------------------------------------------------------------
+int cmCPackRPMGenerator::PackageFiles()
+{
+ int retval = 1;
+
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: "
+ << toplevel << std::endl);
+
+ /* Are we in the component packaging case */
+ if (SupportsComponentInstallation()) {
+ // CASE 1 : COMPONENT ALL-IN-ONE package
+ // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
+ // then the package file is unique and should be open here.
+ if (allComponentInOne ||
+ (allGroupInOne && (!this->ComponentGroups.empty()))
+ )
+ {
+ return PackageComponentsAllInOne(allComponentInOne);
+ }
+ // CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one)
+ // There will be 1 package for each component group
+ // however one may require to ignore component group and
+ // in this case you'll get 1 package for each component.
+ else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup))
+ {
+ return PackageComponents(ignoreComponentGroup);
+ }
+ }
+ // CASE 3 : NON COMPONENT package.
else
{
if (!this->ReadListFile("CPackRPM.cmake"))
@@ -118,3 +262,33 @@ bool cmCPackRPMGenerator::SupportsComponentInstallation() const
}
}
+std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
+ const std::string& componentName)
+ {
+ if (ignoreComponentGroup) {
+ return componentName;
+ }
+
+ if (allComponentInOne) {
+ return std::string("ALL_COMPONENTS_IN_ONE");
+ }
+ // We have to find the name of the COMPONENT GROUP
+ // the current COMPONENT belongs to.
+ std::string groupVar = "CPACK_COMPONENT_" +
+ cmSystemTools::UpperCase(componentName) + "_GROUP";
+ if (NULL != GetOption(groupVar.c_str()))
+ {
+ if (allGroupInOne)
+ {
+ return std::string("ALL_GROUPS_IN_ONE");
+ }
+ else
+ {
+ return std::string(GetOption(groupVar.c_str()));
+ }
+ }
+ else
+ {
+ return componentName;
+ }
+ }
diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h
index 57d5cca..7c2e434 100644
--- a/Source/CPack/cmCPackRPMGenerator.h
+++ b/Source/CPack/cmCPackRPMGenerator.h
@@ -38,8 +38,21 @@ public:
protected:
virtual int InitializeInternal();
virtual int PackageFiles();
+ /**
+ * The method used to package files when component
+ * install is used. This will create one
+ * archive for each component group.
+ */
+ int PackageComponents(bool ignoreGroup);
+ /**
+ * Special case of component install where all
+ * components will be put in a single installer.
+ */
+ int PackageComponentsAllInOne(bool allComponent);
virtual const char* GetOutputExtension() { return ".rpm"; }
virtual bool SupportsComponentInstallation() const;
+ virtual std::string GetComponentInstallDirNameSuffix(
+ const std::string& componentName);
};
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 6863adc..005651f 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -825,7 +825,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
// Call gcov to get coverage data for this *.gcda file:
//
std::string fileDir = cmSystemTools::GetFilenamePath(it->c_str());
- std::string command = "\"" + gcovCommand + "\" -l -o \"" + fileDir
+ std::string command = "\"" + gcovCommand + "\" -l -p -o \"" + fileDir
+ "\" \"" + *it + "\"";
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str()
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index aa9e55b..2c1a0af 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -24,10 +24,19 @@
#include <ctype.h>
//----------------------------------------------------------------------------
+static unsigned int cmCTestGITVersion(unsigned int epic, unsigned int major,
+ unsigned int minor, unsigned int fix)
+{
+ // 1.6.5.0 maps to 10605000
+ return fix + minor*1000 + major*100000 + epic*10000000;
+}
+
+//----------------------------------------------------------------------------
cmCTestGIT::cmCTestGIT(cmCTest* ct, std::ostream& log):
cmCTestGlobalVC(ct, log)
{
this->PriorRev = this->Unknown;
+ this->CurrentGitVersion = 0;
}
//----------------------------------------------------------------------------
@@ -263,7 +272,20 @@ bool cmCTestGIT::UpdateImpl()
std::string top_dir = this->FindTopDir();
const char* git = this->CommandLineTool.c_str();
- char const* git_submodule[] = {git, "submodule", "update", 0};
+ const char* recursive = "--recursive";
+
+ // Git < 1.6.5.0 did not support --recursive
+ if(this->GetGitVersion() < cmCTestGITVersion(1,6,5,0))
+ {
+ recursive = 0;
+ // No need to require >= 1.6.5.0 if there are no submodules.
+ if(cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str()))
+ {
+ this->Log << "Git < 1.6.5.0 cannot update submodules recursively\n";
+ }
+ }
+
+ char const* git_submodule[] = {git, "submodule", "update", recursive, 0};
OutputLogger submodule_out(this->Log, "submodule-out> ");
OutputLogger submodule_err(this->Log, "submodule-err> ");
return this->RunChild(git_submodule, &submodule_out, &submodule_err,
@@ -271,6 +293,27 @@ bool cmCTestGIT::UpdateImpl()
}
//----------------------------------------------------------------------------
+unsigned int cmCTestGIT::GetGitVersion()
+{
+ if(!this->CurrentGitVersion)
+ {
+ const char* git = this->CommandLineTool.c_str();
+ char const* git_version[] = {git, "--version", 0};
+ std::string version;
+ OneLineParser version_out(this, "version-out> ", version);
+ OutputLogger version_err(this->Log, "version-err> ");
+ unsigned int v[4] = {0,0,0,0};
+ if(this->RunChild(git_version, &version_out, &version_err) &&
+ sscanf(version.c_str(), "git version %u.%u.%u.%u",
+ &v[0], &v[1], &v[2], &v[3]) >= 3)
+ {
+ this->CurrentGitVersion = cmCTestGITVersion(v[0], v[1], v[2], v[3]);
+ }
+ }
+ return this->CurrentGitVersion;
+}
+
+//----------------------------------------------------------------------------
/* Diff format:
:src-mode dst-mode src-sha1 dst-sha1 status\0
diff --git a/Source/CTest/cmCTestGIT.h b/Source/CTest/cmCTestGIT.h
index 1765340..f4fae8f 100644
--- a/Source/CTest/cmCTestGIT.h
+++ b/Source/CTest/cmCTestGIT.h
@@ -27,6 +27,8 @@ public:
virtual ~cmCTestGIT();
private:
+ unsigned int CurrentGitVersion;
+ unsigned int GetGitVersion();
std::string GetWorkingRevision();
virtual void NoteOldRevision();
virtual void NoteNewRevision();
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index f3a4457..2cae802 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -484,7 +484,7 @@ void cmCTestMultiProcessHandler::CreateTestCostList()
}
TestComparator comp(this);
- std::sort(SortedTests.begin(), SortedTests.end(), comp);
+ std::stable_sort(SortedTests.begin(), SortedTests.end(), comp);
}
//---------------------------------------------------------
diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c
index 03896c2..f234722 100644
--- a/Source/CursesDialog/form/frm_driver.c
+++ b/Source/CursesDialog/form/frm_driver.c
@@ -1086,7 +1086,7 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts)
if (form->status & _POSTED)
{
- if ((form->curpage == field->page))
+ if (form->curpage == field->page)
{
if (changed_opts & O_VISIBLE)
{
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index 562396d..72e9b24 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -293,6 +293,8 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
parentItems.append(new QStandardItem());
parentItems[0]->setData(QBrush(QColor(255,100,100)), Qt::BackgroundColorRole);
parentItems[1]->setData(QBrush(QColor(255,100,100)), Qt::BackgroundColorRole);
+ parentItems[0]->setData(1, GroupRole);
+ parentItems[1]->setData(1, GroupRole);
root->appendRow(parentItems);
int num = props2.size();
@@ -314,6 +316,7 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
QStandardItem* parentItem =
new QStandardItem(key.isEmpty() ? tr("Ungrouped Entries") : key);
root->appendRow(parentItem);
+ parentItem->setData(1, GroupRole);
int num = props2.size();
for(int i=0; i<num; i++)
@@ -478,10 +481,13 @@ QCMakePropertyList QCMakeCacheModel::properties() const
}
else
{
- // get data
- QCMakeProperty prop;
- this->getPropertyData(idx, prop);
- props.append(prop);
+ if(!data(idx, GroupRole).toInt())
+ {
+ // get data
+ QCMakeProperty prop;
+ this->getPropertyData(idx, prop);
+ props.append(prop);
+ }
// go to the next in the tree
while(!idxs.isEmpty() && !idxs.last().sibling(idxs.last().row()+1, 0).isValid())
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h
index 58bbd2d..0a628b9 100644
--- a/Source/QtDialog/QCMakeCacheView.h
+++ b/Source/QtDialog/QCMakeCacheView.h
@@ -67,7 +67,9 @@ public:
enum { HelpRole = Qt::ToolTipRole,
TypeRole = Qt::UserRole,
AdvancedRole,
- StringsRole};
+ StringsRole,
+ GroupRole
+ };
enum ViewType { FlatView, GroupView };
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 7af6ec8..502829e 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -286,6 +286,13 @@ bool cmAddCustomCommandCommand
return false;
}
+ // Convert working directory to a full path.
+ if(!working.empty())
+ {
+ const char* build_dir = this->Makefile->GetCurrentOutputDirectory();
+ working = cmSystemTools::CollapseFullPath(working.c_str(), build_dir);
+ }
+
// Choose which mode of the command to use.
bool escapeOldStyle = !verbatim;
if(source.empty() && output.empty())
diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h
index 490e043..47b542c 100644
--- a/Source/cmAddCustomCommandCommand.h
+++ b/Source/cmAddCustomCommandCommand.h
@@ -110,6 +110,8 @@ public:
"will be treated as PRE_LINK.\n"
"If WORKING_DIRECTORY is specified the command will be executed "
"in the directory given. "
+ "If it is a relative path it will be interpreted relative to the "
+ "build tree directory corresponding to the current source directory. "
"If COMMENT is set, the value will be displayed as a "
"message before the commands are executed at build time. "
"If APPEND is specified the COMMAND and DEPENDS option values "
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index edb787b..27dea98 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -166,6 +166,14 @@ bool cmAddCustomTargetCommand
}
}
+ // Convert working directory to a full path.
+ if(!working_directory.empty())
+ {
+ const char* build_dir = this->Makefile->GetCurrentOutputDirectory();
+ working_directory =
+ cmSystemTools::CollapseFullPath(working_directory.c_str(), build_dir);
+ }
+
// Add the utility target to the makefile.
bool escapeOldStyle = !verbatim;
cmTarget* target =
diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h
index 7a2b396..6d94fb2 100644
--- a/Source/cmAddCustomTargetCommand.h
+++ b/Source/cmAddCustomTargetCommand.h
@@ -79,6 +79,8 @@ public:
"empty target will be created. "
"If WORKING_DIRECTORY is set, then the command will be run in that "
"directory. "
+ "If it is a relative path it will be interpreted relative to the "
+ "build tree directory corresponding to the current source directory. "
"If COMMENT is set, the value will be displayed as a "
"message before the commands are executed at build time. "
"Dependencies listed with the DEPENDS argument may reference files "
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index d53200c..e3c33a2 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -817,9 +817,9 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
this->SharedLinkTypeFlag = shared_link_type_flag;
}
- // TODO: Lookup the starting link type from the target (is it being
- // linked statically?).
- this->StartLinkType = LinkShared;
+ // Lookup the starting link type from the target (linked statically?).
+ const char* lss = this->Target->GetProperty("LINK_SEARCH_START_STATIC");
+ this->StartLinkType = cmSystemTools::IsOn(lss)? LinkStatic : LinkShared;
this->CurrentLinkType = this->StartLinkType;
}
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 0cd5fa2..bb6dc3f 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -97,6 +97,30 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Variables that Provide Information");
cm->DefineProperty
+ ("CMAKE_SCRIPT_MODE_FILE", cmProperty::VARIABLE,
+ "Full path to the -P script file currently being processed. ",
+ "When run in -P script mode, CMake sets this variable to the full "
+ "path of the script file. When run to configure a CMakeLists.txt "
+ "file, this variable is not set.", false,
+ "Variables that Provide Information");
+
+ cm->DefineProperty
+ ("CMAKE_ARGC", cmProperty::VARIABLE,
+ "Number of command line arguments passed to CMake in script mode. ",
+ "When run in -P script mode, CMake sets this variable to the number "
+ "of command line arguments. See also CMAKE_ARGV0, 1, 2 ... ", false,
+ "Variables that Provide Information");
+
+ cm->DefineProperty
+ ("CMAKE_ARGV0", cmProperty::VARIABLE,
+ "Command line argument passed to CMake in script mode. ",
+ "When run in -P script mode, CMake sets this variable to "
+ "the first command line argument. It then also sets CMAKE_ARGV1, "
+ "CMAKE_ARGV2, ... and so on, up to the number of command line arguments "
+ "given. See also CMAKE_ARGC.", false,
+ "Variables that Provide Information");
+
+ cm->DefineProperty
("CMAKE_BUILD_TOOL", cmProperty::VARIABLE,
"Tool used for the actual build process.",
"This variable is set to the program that will be"
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index e2a6035..9e5c91e 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -325,6 +325,12 @@ cmExportFileGenerator
os << "SET_PROPERTY(TARGET " << targetName
<< " PROPERTY MACOSX_BUNDLE 1)\n";
}
+
+ if (target->IsCFBundleOnApple())
+ {
+ os << "SET_PROPERTY(TARGET " << targetName
+ << " PROPERTY BUNDLE 1)\n";
+ }
os << "\n";
}
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 717571c..23ff5fb 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -263,6 +263,20 @@ cmExportInstallFileGenerator
value += ".framework/";
value += itgen->GetInstallFilename(target, config);
}
+ else if(target->IsCFBundleOnApple())
+ {
+ const char *ext = target->GetProperty("BUNDLE_EXTENSION");
+ if (!ext)
+ {
+ ext = "bundle";
+ }
+
+ value += itgen->GetInstallFilename(target, config);
+ value += ".";
+ value += ext;
+ value += "/";
+ value += itgen->GetInstallFilename(target, config);
+ }
else if(target->IsAppBundleOnApple())
{
value += itgen->GetInstallFilename(target, config);
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index a5650d4..4f93067 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -416,11 +416,18 @@ void cmExtraCodeBlocksGenerator
case cmTarget::STATIC_LIBRARY:
case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY:
+ case cmTarget::UTILITY: // can have sources since 2.6.3
{
const std::vector<cmSourceFile*>&sources=ti->second.GetSourceFiles();
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
si!=sources.end(); si++)
{
+ // don't add source files which have the GENERATED property set:
+ if ((*si)->GetPropertyAsBool("GENERATED"))
+ {
+ continue;
+ }
+
// check whether it is a C/C++ implementation file
bool isCFile = false;
if ((*si)->GetLanguage() && (*(*si)->GetLanguage() == 'C'))
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 0ef771f..c4ea425 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -102,7 +102,7 @@ void cmExtraEclipseCDT4Generator::CreateSourceProjectFile() const
fout <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<projectDescription>\n"
- "\t<name>" << name << "</name>\n"
+ "\t<name>" << this->EscapeForXML(name) << "</name>\n"
"\t<comment></comment>\n"
"\t<projects>\n"
"\t</projects>\n"
@@ -376,11 +376,10 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
"\t</natures>\n"
;
- // TODO: refactor this
+ fout << "\t<linkedResources>\n";
// create linked resources
if (this->IsOutOfSourceBuild)
{
- fout << "\t<linkedResources>\n";
// create a linked resource to CMAKE_SOURCE_DIR
// (this is not done anymore for each project because of
// http://public.kitware.com/Bug/view.php?id=9978 and because I found it
@@ -399,18 +398,48 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
this->SrcLinkedResources.push_back(sourceLinkedResourceName);
}
- // for EXECUTABLE_OUTPUT_PATH when not in binary dir
- this->AppendOutLinkedResource(fout,
- mf->GetSafeDefinition("CMAKE_RUNTIME_OUTPUT_DIRECTORY"),
- mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"));
- // for LIBRARY_OUTPUT_PATH when not in binary dir
- this->AppendOutLinkedResource(fout,
- mf->GetSafeDefinition("CMAKE_LIBRARY_OUTPUT_DIRECTORY"),
- mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH"));
+ }
+
+ // for each sub project create a linked resource to the source dir
+ // - only if it is an out-of-source build
+ this->AppendLinkedResource(fout, "[Subprojects]",
+ "virtual:/virtual");
- fout << "\t</linkedResources>\n";
+ for (std::map<cmStdString, std::vector<cmLocalGenerator*> >::const_iterator
+ it = this->GlobalGenerator->GetProjectMap().begin();
+ it != this->GlobalGenerator->GetProjectMap().end();
+ ++it)
+ {
+ std::string linkSourceDirectory = this->GetEclipsePath(
+ it->second[0]->GetMakefile()->GetStartDirectory());
+ // a linked resource must not point to a parent directory of .project or
+ // .project itself
+ if ((this->HomeOutputDirectory != linkSourceDirectory) &&
+ !cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
+ linkSourceDirectory.c_str()))
+ {
+ std::string linkName = "[Subprojects]/";
+ linkName += it->first;
+ this->AppendLinkedResource(fout, linkName,
+ this->GetEclipsePath(linkSourceDirectory));
+ this->SrcLinkedResources.push_back(it->first);
+ }
}
+ // I'm not sure this makes too much sense. There can be different
+ // output directories in different subdirs, so we would need more of them.
+
+ // for EXECUTABLE_OUTPUT_PATH when not in binary dir
+ this->AppendOutLinkedResource(fout,
+ mf->GetSafeDefinition("CMAKE_RUNTIME_OUTPUT_DIRECTORY"),
+ mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"));
+ // for LIBRARY_OUTPUT_PATH when not in binary dir
+ this->AppendOutLinkedResource(fout,
+ mf->GetSafeDefinition("CMAKE_LIBRARY_OUTPUT_DIRECTORY"),
+ mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH"));
+
+ fout << "\t</linkedResources>\n";
+
fout << "</projectDescription>\n";
}
@@ -431,7 +460,8 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
{
emittedDirs.insert(dir);
fout << "<pathentry include=\""
- << cmExtraEclipseCDT4Generator::GetEclipsePath(dir)
+ << cmExtraEclipseCDT4Generator::EscapeForXML(
+ cmExtraEclipseCDT4Generator::GetEclipsePath(dir))
<< "\" kind=\"inc\" path=\"\" system=\"true\"/>\n";
}
}
@@ -550,14 +580,15 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
it != this->SrcLinkedResources.end();
++it)
{
- fout << "<pathentry kind=\"src\" path=\"" << *it << "\"/>\n";
+ fout << "<pathentry kind=\"src\" path=\"" << this->EscapeForXML(*it)
+ << "\"/>\n";
// exlude source directory from output search path
// - only if not named the same as an output directory
if (!cmSystemTools::FileIsDirectory(
std::string(this->HomeOutputDirectory + "/" + *it).c_str()))
{
- excludeFromOut += *it + "/|";
+ excludeFromOut += this->EscapeForXML(*it) + "/|";
}
}
excludeFromOut += "**/CMakeFiles/";
@@ -572,7 +603,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
it != this->OutLinkedResources.end();
++it)
{
- fout << "<pathentry kind=\"out\" path=\"" << *it << "\"/>\n";
+ fout << "<pathentry kind=\"out\" path=\"" << this->EscapeForXML(*it)
+ << "\"/>\n";
}
// add pre-processor definitions to allow eclipse to gray out sections
@@ -875,8 +907,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
fout << "</cconfiguration>\n"
"</storageModule>\n"
"<storageModule moduleId=\"cdtBuildSystem\" version=\"4.0.0\">\n"
- "<project id=\"" << mf->GetProjectName() << ".null.1\""
- " name=\"" << mf->GetProjectName() << "\"/>\n"
+ "<project id=\"" << this->EscapeForXML(mf->GetProjectName())
+ << ".null.1\" name=\"" << this->EscapeForXML(mf->GetProjectName())
+ << "\"/>\n"
"</storageModule>\n"
"</cproject>\n"
;
@@ -927,7 +960,8 @@ cmExtraEclipseCDT4Generator::GenerateProjectName(const std::string& name,
const std::string& type,
const std::string& path)
{
- return name + (type.empty() ? "" : "-") + type + "@" + path;
+ return cmExtraEclipseCDT4Generator::EscapeForXML(name)
+ +(type.empty() ? "" : "-") + type + "@" + path;
}
std::string cmExtraEclipseCDT4Generator::EscapeForXML(const std::string& value)
@@ -999,15 +1033,17 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
const std::string& path,
const char* prefix)
{
+ std::string targetXml = cmExtraEclipseCDT4Generator::EscapeForXML(target);
+ std::string pathXml = cmExtraEclipseCDT4Generator::EscapeForXML(path);
fout <<
- "<target name=\"" << prefix << target << "\""
- " path=\"" << path.c_str() << "\""
+ "<target name=\"" << prefix << targetXml << "\""
+ " path=\"" << pathXml.c_str() << "\""
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
"<buildCommand>"
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)
<< "</buildCommand>\n"
"<buildArguments>" << makeArgs << "</buildArguments>\n"
- "<buildTarget>" << target << "</buildTarget>\n"
+ "<buildTarget>" << targetXml << "</buildTarget>\n"
"<stopOnError>true</stopOnError>\n"
"<useDefaultCommand>false</useDefaultCommand>\n"
"</target>\n"
@@ -1050,11 +1086,13 @@ void cmExtraEclipseCDT4Generator
{
fout <<
"\t\t<link>\n"
- "\t\t\t<name>" << name << "</name>\n"
+ "\t\t\t<name>"
+ << cmExtraEclipseCDT4Generator::EscapeForXML(name)
+ << "</name>\n"
"\t\t\t<type>2</type>\n"
- "\t\t\t<location>"
- << path
- << "</location>\n"
+ "\t\t\t<locationURI>"
+ << cmExtraEclipseCDT4Generator::EscapeForXML(path)
+ << "</locationURI>\n"
"\t\t</link>\n"
;
}
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 8ebd41f..d28de08 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -75,6 +75,10 @@ bool cmFileCommand
{
return this->HandleDownloadCommand(args);
}
+ else if ( subCommand == "UPLOAD" )
+ {
+ return this->HandleUploadCommand(args);
+ }
else if ( subCommand == "READ" )
{
return this->HandleReadCommand(args);
@@ -1707,7 +1711,7 @@ protected:
{
DoingType = DoingLast1,
DoingRename,
- DoingSelf24
+ DoingLast2
};
virtual bool CheckKeyword(std::string const& arg);
virtual bool CheckValue(std::string const& arg);
@@ -1846,22 +1850,12 @@ bool cmFileInstaller::CheckKeyword(std::string const& arg)
else if(arg == "COMPONENTS" || arg == "CONFIGURATIONS" ||
arg == "PROPERTIES")
{
- if(this->Makefile->IsOn("CMAKE_INSTALL_SELF_2_4"))
- {
- // When CMake 2.4 builds this CMake version we need to support
- // the install scripts it generates since it asks this CMake
- // to install itself using the rules it generated.
- this->Doing = DoingSelf24;
- }
- else
- {
- cmOStringStream e;
- e << "INSTALL called with old-style " << arg << " argument. "
- << "This script was generated with an older version of CMake. "
- << "Re-run this cmake version on your build tree.";
- this->FileCommand->SetError(e.str().c_str());
- this->Doing = DoingError;
- }
+ cmOStringStream e;
+ e << "INSTALL called with old-style " << arg << " argument. "
+ << "This script was generated with an older version of CMake. "
+ << "Re-run this cmake version on your build tree.";
+ this->FileCommand->SetError(e.str().c_str());
+ this->Doing = DoingError;
}
else
{
@@ -1884,12 +1878,6 @@ bool cmFileInstaller::CheckValue(std::string const& arg)
case DoingRename:
this->Rename = arg;
break;
- case DoingSelf24:
- // Ignore these arguments for compatibility. This should be
- // reached only when CMake 2.4 is installing the current
- // CMake. It can be removed when CMake 2.6 or higher is
- // required to build CMake.
- break;
default:
return this->cmFileCopier::CheckValue(arg);
}
@@ -2432,53 +2420,66 @@ bool cmFileCommand::HandleCMakePathCommand(std::vector<std::string>
this->Makefile->AddDefinition(var, value.c_str());
return true;
}
+
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
-// Stuff for curl download
+// Stuff for curl download/upload
typedef std::vector<char> cmFileCommandVectorOfChar;
-namespace{
+
+namespace {
+
size_t
- cmFileCommandWriteMemoryCallback(void *ptr, size_t size, size_t nmemb,
- void *data)
- {
+ cmWriteToFileCallback(void *ptr, size_t size, size_t nmemb,
+ void *data)
+ {
register int realsize = (int)(size * nmemb);
std::ofstream* fout = static_cast<std::ofstream*>(data);
const char* chPtr = static_cast<char*>(ptr);
fout->write(chPtr, realsize);
return realsize;
- }
+ }
+
+
+ size_t
+ cmWriteToMemoryCallback(void *ptr, size_t size, size_t nmemb,
+ void *data)
+ {
+ register int realsize = (int)(size * nmemb);
+ cmFileCommandVectorOfChar *vec
+ = static_cast<cmFileCommandVectorOfChar*>(data);
+ const char* chPtr = static_cast<char*>(ptr);
+ vec->insert(vec->end(), chPtr, chPtr + realsize);
+ return realsize;
+ }
static size_t
cmFileCommandCurlDebugCallback(CURL *, curl_infotype, char *chPtr,
- size_t size, void *data)
- {
+ size_t size, void *data)
+ {
cmFileCommandVectorOfChar *vec
= static_cast<cmFileCommandVectorOfChar*>(data);
vec->insert(vec->end(), chPtr, chPtr + size);
-
return size;
- }
+ }
class cURLProgressHelper
{
public:
- cURLProgressHelper(cmFileCommand *fc)
+ cURLProgressHelper(cmFileCommand *fc, const char *text)
{
this->CurrentPercentage = -1;
this->FileCommand = fc;
+ this->Text = text;
}
bool UpdatePercentage(double value, double total, std::string &status)
{
int OldPercentage = this->CurrentPercentage;
- if (0.0 == total)
- {
- this->CurrentPercentage = 100;
- }
- else
+ if (total > 0.0)
{
this->CurrentPercentage = static_cast<int>(value/total*100.0 + 0.5);
}
@@ -2488,7 +2489,8 @@ namespace{
if (updated)
{
cmOStringStream oss;
- oss << "[download " << this->CurrentPercentage << "% complete]";
+ oss << "[" << this->Text << " " << this->CurrentPercentage
+ << "% complete]";
status = oss.str();
}
@@ -2503,14 +2505,15 @@ namespace{
private:
int CurrentPercentage;
cmFileCommand *FileCommand;
+ std::string Text;
};
static int
- cmFileCommandCurlProgressCallback(void *clientp,
- double dltotal, double dlnow,
- double ultotal, double ulnow)
- {
+ cmFileDownloadProgressCallback(void *clientp,
+ double dltotal, double dlnow,
+ double ultotal, double ulnow)
+ {
cURLProgressHelper *helper =
reinterpret_cast<cURLProgressHelper *>(clientp);
@@ -2526,12 +2529,33 @@ namespace{
}
return 0;
- }
+ }
+
+
+ static int
+ cmFileUploadProgressCallback(void *clientp,
+ double dltotal, double dlnow,
+ double ultotal, double ulnow)
+ {
+ cURLProgressHelper *helper =
+ reinterpret_cast<cURLProgressHelper *>(clientp);
+
+ static_cast<void>(dltotal);
+ static_cast<void>(dlnow);
+
+ std::string status;
+ if (helper->UpdatePercentage(ulnow, ultotal, status))
+ {
+ cmFileCommand *fc = helper->GetFileCommand();
+ cmMakefile *mf = fc->GetMakefile();
+ mf->DisplayStatus(status.c_str(), -1);
+ }
+
+ return 0;
+ }
}
-#endif
-#if defined(CMAKE_BUILD_WITH_CMAKE)
namespace {
class cURLEasyGuard
@@ -2563,9 +2587,18 @@ namespace {
#endif
+#define check_curl_result(result, errstr) \
+ if (result != CURLE_OK) \
+ { \
+ std::string e(errstr); \
+ e += ::curl_easy_strerror(result); \
+ this->SetError(e.c_str()); \
+ return false; \
+ }
+
+
bool
-cmFileCommand::HandleDownloadCommand(std::vector<std::string>
- const& args)
+cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
std::vector<std::string>::const_iterator i = args.begin();
@@ -2658,10 +2691,6 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (expectedMD5sum == actualMD5sum)
{
- this->Makefile->DisplayStatus(
- "FILE(DOWNLOAD) returning early: file already exists with "
- "expected MD5 sum", -1);
-
if(statusVar.size())
{
cmOStringStream result;
@@ -2708,88 +2737,37 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
cURLEasyGuard g_curl(curl);
::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set url: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ check_curl_result(res, "DOWNLOAD cannot set url: ");
res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
- cmFileCommandWriteMemoryCallback);
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set write function: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ cmWriteToFileCallback);
+ check_curl_result(res, "DOWNLOAD cannot set write function: ");
res = ::curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION,
cmFileCommandCurlDebugCallback);
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set debug function: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ check_curl_result(res, "DOWNLOAD cannot set debug function: ");
cmFileCommandVectorOfChar chunkDebug;
res = ::curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&fout);
-
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set write data: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ check_curl_result(res, "DOWNLOAD cannot set write data: ");
res = ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug);
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set debug data: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ check_curl_result(res, "DOWNLOAD cannot set debug data: ");
res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set follow-redirect option: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ check_curl_result(res, "DOWNLOAD cannot set follow-redirect option: ");
if(verboseLog.size())
{
res = ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
-
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set verbose: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ check_curl_result(res, "DOWNLOAD cannot set verbose: ");
}
if(timeout > 0)
{
res = ::curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout );
-
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set timeout: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ check_curl_result(res, "DOWNLOAD cannot set timeout: ");
}
// Need the progress helper's scope to last through the duration of
@@ -2797,39 +2775,20 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
// scope intentionally, rather than inside the "if(showProgress)"
// block...
//
- cURLProgressHelper helper(this);
+ cURLProgressHelper helper(this, "download");
if(showProgress)
{
- res = ::curl_easy_setopt(curl,
- CURLOPT_NOPROGRESS, 0);
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set noprogress value: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ res = ::curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
+ check_curl_result(res, "DOWNLOAD cannot set noprogress value: ");
res = ::curl_easy_setopt(curl,
- CURLOPT_PROGRESSFUNCTION, cmFileCommandCurlProgressCallback);
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set progress function: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ CURLOPT_PROGRESSFUNCTION, cmFileDownloadProgressCallback);
+ check_curl_result(res, "DOWNLOAD cannot set progress function: ");
res = ::curl_easy_setopt(curl,
CURLOPT_PROGRESSDATA, reinterpret_cast<void*>(&helper));
- if (res != CURLE_OK)
- {
- std::string e = "DOWNLOAD cannot set progress data: ";
- e += ::curl_easy_strerror(res);
- this->SetError(e.c_str());
- return false;
- }
+ check_curl_result(res, "DOWNLOAD cannot set progress data: ");
}
res = ::curl_easy_perform(curl);
@@ -2905,3 +2864,220 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
return false;
#endif
}
+
+
+bool
+cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
+{
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+ if(args.size() < 3)
+ {
+ this->SetError("UPLOAD must be called with at least three arguments.");
+ return false;
+ }
+ std::vector<std::string>::const_iterator i = args.begin();
+ ++i;
+ std::string filename = *i;
+ ++i;
+ std::string url = *i;
+ ++i;
+
+ long timeout = 0;
+ std::string logVar;
+ std::string statusVar;
+ bool showProgress = false;
+
+ while(i != args.end())
+ {
+ if(*i == "TIMEOUT")
+ {
+ ++i;
+ if(i != args.end())
+ {
+ timeout = atol(i->c_str());
+ }
+ else
+ {
+ this->SetError("UPLOAD missing time for TIMEOUT.");
+ return false;
+ }
+ }
+ else if(*i == "LOG")
+ {
+ ++i;
+ if( i == args.end())
+ {
+ this->SetError("UPLOAD missing VAR for LOG.");
+ return false;
+ }
+ logVar = *i;
+ }
+ else if(*i == "STATUS")
+ {
+ ++i;
+ if( i == args.end())
+ {
+ this->SetError("UPLOAD missing VAR for STATUS.");
+ return false;
+ }
+ statusVar = *i;
+ }
+ else if(*i == "SHOW_PROGRESS")
+ {
+ showProgress = true;
+ }
+
+ ++i;
+ }
+
+ // Open file for reading:
+ //
+ FILE *fin = fopen(filename.c_str(), "rb");
+ if(!fin)
+ {
+ std::string errStr = "UPLOAD cannot open file '";
+ errStr += filename + "' for reading.";
+ this->SetError(errStr.c_str());
+ return false;
+ }
+
+ struct stat st;
+ if(::stat(filename.c_str(), &st))
+ {
+ std::string errStr = "UPLOAD cannot stat file '";
+ errStr += filename + "'.";
+ this->SetError(errStr.c_str());
+ return false;
+ }
+
+ ::CURL *curl;
+ ::curl_global_init(CURL_GLOBAL_DEFAULT);
+ curl = ::curl_easy_init();
+ if(!curl)
+ {
+ this->SetError("UPLOAD error initializing curl.");
+ return false;
+ }
+
+ cURLEasyGuard g_curl(curl);
+
+ // enable HTTP ERROR parsing
+ ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
+
+ // enable uploading
+ res = ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
+ check_curl_result(res, "UPLOAD cannot set upload flag: ");
+
+ res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
+ check_curl_result(res, "UPLOAD cannot set url: ");
+
+ res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
+ cmWriteToMemoryCallback);
+ check_curl_result(res, "UPLOAD cannot set write function: ");
+
+ res = ::curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION,
+ cmFileCommandCurlDebugCallback);
+ check_curl_result(res, "UPLOAD cannot set debug function: ");
+
+ cmFileCommandVectorOfChar chunkResponse;
+ cmFileCommandVectorOfChar chunkDebug;
+
+ res = ::curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunkResponse);
+ check_curl_result(res, "UPLOAD cannot set write data: ");
+
+ res = ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug);
+ check_curl_result(res, "UPLOAD cannot set debug data: ");
+
+ res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+ check_curl_result(res, "UPLOAD cannot set follow-redirect option: ");
+
+ if(logVar.size())
+ {
+ res = ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+ check_curl_result(res, "UPLOAD cannot set verbose: ");
+ }
+
+ if(timeout > 0)
+ {
+ res = ::curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout );
+ check_curl_result(res, "UPLOAD cannot set timeout: ");
+ }
+
+ // Need the progress helper's scope to last through the duration of
+ // the curl_easy_perform call... so this object is declared at function
+ // scope intentionally, rather than inside the "if(showProgress)"
+ // block...
+ //
+ cURLProgressHelper helper(this, "upload");
+
+ if(showProgress)
+ {
+ res = ::curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
+ check_curl_result(res, "UPLOAD cannot set noprogress value: ");
+
+ res = ::curl_easy_setopt(curl,
+ CURLOPT_PROGRESSFUNCTION, cmFileUploadProgressCallback);
+ check_curl_result(res, "UPLOAD cannot set progress function: ");
+
+ res = ::curl_easy_setopt(curl,
+ CURLOPT_PROGRESSDATA, reinterpret_cast<void*>(&helper));
+ check_curl_result(res, "UPLOAD cannot set progress data: ");
+ }
+
+ // now specify which file to upload
+ res = ::curl_easy_setopt(curl, CURLOPT_INFILE, fin);
+ check_curl_result(res, "UPLOAD cannot set input file: ");
+
+ // and give the size of the upload (optional)
+ res = ::curl_easy_setopt(curl,
+ CURLOPT_INFILESIZE, static_cast<long>(st.st_size));
+ check_curl_result(res, "UPLOAD cannot set input file size: ");
+
+ res = ::curl_easy_perform(curl);
+
+ /* always cleanup */
+ g_curl.release();
+ ::curl_easy_cleanup(curl);
+
+ if(statusVar.size())
+ {
+ cmOStringStream result;
+ result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
+ this->Makefile->AddDefinition(statusVar.c_str(),
+ result.str().c_str());
+ }
+
+ ::curl_global_cleanup();
+
+ fclose(fin);
+ fin = NULL;
+
+ if(logVar.size())
+ {
+ std::string log;
+
+ if(chunkResponse.size())
+ {
+ chunkResponse.push_back(0);
+ log += "Response:\n";
+ log += &*chunkResponse.begin();
+ log += "\n";
+ }
+
+ if(chunkDebug.size())
+ {
+ chunkDebug.push_back(0);
+ log += "Debug:\n";
+ log += &*chunkDebug.begin();
+ log += "\n";
+ }
+
+ this->Makefile->AddDefinition(logVar.c_str(), log.c_str());
+ }
+
+ return true;
+#else
+ this->SetError("UPLOAD not supported by bootstrap cmake.");
+ return false;
+#endif
+}
diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h
index b11dcde..1b6dbbf 100644
--- a/Source/cmFileCommand.h
+++ b/Source/cmFileCommand.h
@@ -82,6 +82,8 @@ public:
" file(TO_NATIVE_PATH path result)\n"
" file(DOWNLOAD url file [TIMEOUT timeout] [STATUS status] [LOG log]\n"
" [EXPECTED_MD5 sum] [SHOW_PROGRESS])\n"
+ " file(UPLOAD filename url [TIMEOUT timeout] [STATUS status]\n"
+ " [LOG log] [SHOW_PROGRESS])\n"
"WRITE will write a message into a file called 'filename'. It "
"overwrites the file if it already exists, and creates the file "
"if it does not exist.\n"
@@ -165,6 +167,18 @@ public:
"If SHOW_PROGRESS is specified, progress information will be printed "
"as status messages until the operation is complete."
"\n"
+ "UPLOAD will upload the given file to the given URL. "
+ "If LOG var is specified a log of the upload will be put in var. "
+ "If STATUS var is specified the status of the operation will"
+ " be put in var. The status is returned in a list of length 2. "
+ "The first element is the numeric return value for the operation, "
+ "and the second element is a string value for the error. A 0 "
+ "numeric error means no error in the operation. "
+ "If TIMEOUT time is specified, the operation will "
+ "timeout after time seconds, time should be specified as an integer. "
+ "If SHOW_PROGRESS is specified, progress information will be printed "
+ "as status messages until the operation is complete."
+ "\n"
"The file() command also provides COPY and INSTALL signatures:\n"
" file(<COPY|INSTALL> files... DESTINATION <dir>\n"
" [FILE_PERMISSIONS permissions...]\n"
@@ -223,6 +237,7 @@ protected:
bool HandleCopyCommand(std::vector<std::string> const& args);
bool HandleInstallCommand(std::vector<std::string> const& args);
bool HandleDownloadCommand(std::vector<std::string> const& args);
+ bool HandleUploadCommand(std::vector<std::string> const& args);
};
diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx
index e3448de..8bb5487 100644
--- a/Source/cmGetCMakePropertyCommand.cxx
+++ b/Source/cmGetCMakePropertyCommand.cxx
@@ -22,21 +22,22 @@ bool cmGetCMakePropertyCommand
this->SetError("called with incorrect number of arguments");
return false;
}
-
+
std::vector<std::string>::size_type cc;
std::string variable = args[0];
std::string output = "NOTFOUND";
- if ( args[1] == "VARIABLES")
+ if ( args[1] == "VARIABLES" )
{
int cacheonly = 0;
std::vector<std::string> vars = this->Makefile->GetDefinitions(cacheonly);
- for ( cc = 0; cc < vars.size(); cc ++ )
+ if (vars.size()>0)
{
- if ( cc > 0 )
- {
- output += ";";
- }
+ output = vars[0];
+ }
+ for ( cc = 1; cc < vars.size(); ++cc )
+ {
+ output += ";";
output += vars[cc];
}
}
@@ -62,15 +63,15 @@ bool cmGetCMakePropertyCommand
}
else
{
- const char *prop =
+ const char *prop =
this->Makefile->GetCMakeInstance()->GetProperty(args[1].c_str());
if (prop)
{
output = prop;
}
}
+
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
-
+
return true;
}
-
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 2d080df..ef723b7 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -358,6 +358,15 @@ static cmVS7FlagTable cmVS8ExtraFlagTable[] =
{"ExceptionHandling", "EHsc", "enable c++ exceptions", "1", 0},
{"ExceptionHandling", "EHa", "enable SEH exceptions", "2", 0},
+ {"EnablePREfast", "analyze", "", "true", 0},
+ {"EnablePREfast", "analyze-", "", "false", 0},
+
+ // Language options
+ {"TreatWChar_tAsBuiltInType", "Zc:wchar_t",
+ "wchar_t is a built-in type", "true", 0},
+ {"TreatWChar_tAsBuiltInType", "Zc:wchar_t-",
+ "wchar_t is not a built-in type", "false", 0},
+
{0,0,0,0,0}
};
cmIDEFlagTable const* cmGlobalVisualStudio8Generator::GetExtraFlagTableVS8()
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 358721f..d5c0fef 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -165,13 +165,16 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
}
else
{
- mf->AddCacheDefinition(
- "CMAKE_CONFIGURATION_TYPES",
- "Debug;Release;MinSizeRel;RelWithDebInfo",
- "Semicolon separated list of supported configuration types, "
- "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
- "anything else will be ignored.",
- cmCacheManager::STRING);
+ if(!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
+ {
+ mf->AddCacheDefinition(
+ "CMAKE_CONFIGURATION_TYPES",
+ "Debug;Release;MinSizeRel;RelWithDebInfo",
+ "Semicolon separated list of supported configuration types, "
+ "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
+ "anything else will be ignored.",
+ cmCacheManager::STRING);
+ }
}
mf->AddDefinition("CMAKE_GENERATOR_CC", "gcc");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "g++");
@@ -578,6 +581,12 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
}
}
+ if(cmtarget.IsCFBundleOnApple())
+ {
+ cmtarget.SetProperty("PREFIX", "");
+ cmtarget.SetProperty("SUFFIX", "");
+ }
+
// Add the fileRef to the top level Resources group/folder if it is not
// already there.
//
@@ -812,6 +821,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
// some build phases only apply to bundles and/or frameworks
bool isFrameworkTarget = cmtarget.IsFrameworkOnApple();
bool isBundleTarget = cmtarget.GetPropertyAsBool("MACOSX_BUNDLE");
+ bool isCFBundleTarget = cmtarget.IsCFBundleOnApple();
cmXCodeObject* buildFiles = 0;
@@ -857,7 +867,8 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
// create resource build phase - only for framework or bundle targets
cmXCodeObject* resourceBuildPhase = 0;
- if (!resourceFiles.empty() && (isFrameworkTarget || isBundleTarget))
+ if (!resourceFiles.empty() &&
+ (isFrameworkTarget || isBundleTarget || isCFBundleTarget))
{
resourceBuildPhase =
this->CreateObject(cmXCodeObject::PBXResourcesBuildPhase);
@@ -878,7 +889,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
// create vector of "non-resource content file" build phases - only for
// framework or bundle targets
std::vector<cmXCodeObject*> contentBuildPhases;
- if (isFrameworkTarget || isBundleTarget)
+ if (isFrameworkTarget || isBundleTarget || isCFBundleTarget)
{
typedef std::map<cmStdString, std::vector<cmSourceFile*> >
mapOfVectorOfSourceFiles;
@@ -1605,7 +1616,33 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("BUNDLE"));
- if(this->XcodeVersion >= 22)
+ if (target.GetPropertyAsBool("BUNDLE"))
+ {
+ // It turns out that a BUNDLE is basically the same
+ // in many ways as an application bundle, as far as
+ // link flags go
+ std::string createFlags =
+ this->LookupFlags("CMAKE_SHARED_MODULE_CREATE_", lang, "_FLAGS",
+ "-bundle");
+ if(!createFlags.empty())
+ {
+ extraLinkOptions += " ";
+ extraLinkOptions += createFlags;
+ }
+ std::string plist = this->ComputeInfoPListLocation(target);
+ // Xcode will create the final version of Info.plist at build time,
+ // so let it replace the cfbundle name. This avoids creating
+ // a per-configuration Info.plist file. The cfbundle plist
+ // is very similar to the application bundle plist
+ this->CurrentLocalGenerator
+ ->GenerateAppleInfoPList(&target, "$(EXECUTABLE_NAME)",
+ plist.c_str());
+ std::string path =
+ this->ConvertToRelativeForXCode(plist.c_str());
+ buildSettings->AddAttribute("INFOPLIST_FILE",
+ this->CreateString(path.c_str()));
+ }
+ else if(this->XcodeVersion >= 22)
{
buildSettings->AddAttribute("MACH_O_TYPE",
this->CreateString("mh_bundle"));
@@ -1644,7 +1681,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string plist = this->ComputeInfoPListLocation(target);
// Xcode will create the final version of Info.plist at build time,
- // so let it replace the framework name. This avoids creating
+ // so let it replace the framework name. This avoids creating
// a per-configuration Info.plist file.
this->CurrentLocalGenerator
->GenerateFrameworkInfoPList(&target, "$(EXECUTABLE_NAME)",
@@ -2043,7 +2080,10 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget)
case cmTarget::STATIC_LIBRARY:
return "archive.ar";
case cmTarget::MODULE_LIBRARY:
- return ((this->XcodeVersion >= 22)?
+ if (cmtarget.IsCFBundleOnApple())
+ return "wrapper.plug-in";
+ else
+ return ((this->XcodeVersion >= 22)?
"compiled.mach-o.executable" : "compiled.mach-o.dylib");
case cmTarget::SHARED_LIBRARY:
return (cmtarget.GetPropertyAsBool("FRAMEWORK")?
@@ -2063,8 +2103,12 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget)
case cmTarget::STATIC_LIBRARY:
return "com.apple.product-type.library.static";
case cmTarget::MODULE_LIBRARY:
- return ((this->XcodeVersion >= 22)? "com.apple.product-type.tool" :
- "com.apple.product-type.library.dynamic");
+ if (cmtarget.IsCFBundleOnApple())
+ return "com.apple.product-type.bundle";
+ else
+ return ((this->XcodeVersion >= 22)?
+ "com.apple.product-type.tool" :
+ "com.apple.product-type.library.dynamic");
case cmTarget::SHARED_LIBRARY:
return (cmtarget.GetPropertyAsBool("FRAMEWORK")?
"com.apple.product-type.framework" :
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index 7acb0f0..d9c0e87 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -171,3 +171,9 @@ void cmIDEOptions::AddFlag(const char* flag, const char* value)
{
this->FlagMap[flag] = value;
}
+
+//----------------------------------------------------------------------------
+void cmIDEOptions::RemoveFlag(const char* flag)
+{
+ this->FlagMap.erase(flag);
+}
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h
index a156b23..a5be8fb 100644
--- a/Source/cmIDEOptions.h
+++ b/Source/cmIDEOptions.h
@@ -28,6 +28,7 @@ public:
void AddDefine(const std::string& define);
void AddDefines(const char* defines);
void AddFlag(const char* flag, const char* value);
+ void RemoveFlag(const char* flag);
protected:
// create a map of xml tags to the values they should have in the output
diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h
index 7f229fa..d215295 100644
--- a/Source/cmListCommand.h
+++ b/Source/cmListCommand.h
@@ -83,6 +83,14 @@ public:
"REMOVE_DUPLICATES will remove duplicated items in the list.\n"
"REVERSE reverses the contents of the list in-place.\n"
"SORT sorts the list in-place alphabetically.\n"
+ "The list subcommands APPEND, INSERT, REMOVE_AT, REMOVE_ITEM, "
+ "REMOVE_DUPLICATES, REVERSE and SORT may create new values for "
+ "the list within the current CMake variable scope. Similar to "
+ "the SET command, the LIST command creates new variable values "
+ "in the current scope, even if the list itself is actually "
+ "defined in a parent scope. To propagate the results of these "
+ "operations upwards, use SET with PARENT_SCOPE, SET with CACHE "
+ "INTERNAL, or some other means of value propagation.\n"
"NOTES: A list in cmake is a ; separated group of strings. "
"To create a list the set command can be used. For example, "
"set(var a b c d e) creates a list with a;b;c;d;e, and "
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index d3cbc1f..cd265c1 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1893,6 +1893,7 @@ bool cmLocalGenerator::GetRealDependency(const char* inName,
{
// This is a full path. Return it as given.
dep = inName;
+ cmSystemTools::ConvertToUnixSlashes(dep);
return true;
}
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 7aabf4d..095e1a7 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -863,7 +863,7 @@ cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target,
event.Write(target.GetPreBuildCommands());
event.Write(target.GetPreLinkCommands());
cmsys::auto_ptr<cmCustomCommand> pcc(
- this->MaybeCreateImplibDir(target, configName));
+ this->MaybeCreateImplibDir(target, configName, false));
if(pcc.get())
{
event.Write(*pcc);
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index e839ed3..b9ffe62 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -381,6 +381,11 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
"Use sse2 instructions", "2", 0},
{"EnableEnhancedInstructionSet", "arch:SSE",
"Use sse instructions", "1", 0},
+ {"FloatingPointModel", "fp:precise",
+ "Use precise floating point model", "0", 0},
+ {"FloatingPointModel", "fp:strict",
+ "Use strict floating point model", "1", 0},
+ {"FloatingPointModel", "fp:fast", "Use fast floating point model", "2", 0},
{"FavorSizeOrSpeed", "Ot", "Favor fast code", "1", 0},
{"FavorSizeOrSpeed", "Os", "Favor small code", "2", 0},
{"CompileAs", "TC", "Compile as c code", "1", 0},
@@ -451,8 +456,13 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
"Turn off Run time type information for c++", "FALSE", 0},
{"SmallerTypeCheck", "RTCc", "smaller type check", "TRUE", 0},
{"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "TRUE", 0},
+ {"WholeProgramOptimization", "GL",
+ "Enables whole program optimization", "TRUE", 0},
+ {"WholeProgramOptimization", "GL-",
+ "Disables whole program optimization", "FALSE", 0},
{"WarnAsError", "WX", "Treat warnings as errors", "TRUE", 0},
{"BrowseInformation", "FR", "Generate browse information", "1", 0},
+ {"StringPooling", "GF", "Enable StringPooling", "TRUE", 0},
{0,0,0,0,0}
};
@@ -466,6 +476,14 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] =
{"GenerateManifest", "MANIFEST", "enable manifest generation", "TRUE", 0},
{"LinkIncremental", "INCREMENTAL:NO", "link incremental", "1", 0},
{"LinkIncremental", "INCREMENTAL:YES", "link incremental", "2", 0},
+ {"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0},
+ {"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK", "", "true", 0},
+ {"DataExecutionPrevention", "NXCOMPAT:NO",
+ "Not known to work with Windows Data Execution Prevention", "1", 0},
+ {"DataExecutionPrevention", "NXCOMPAT",
+ "Known to work with Windows Data Execution Prevention", "2", 0},
+ {"DelaySign", "DELAYSIGN:NO", "", "false", 0},
+ {"DelaySign", "DELAYSIGN", "", "true", 0},
{"EntryPointSymbol", "ENTRY:", "sets the starting address", "",
cmVS7FlagTable::UserValue},
{"IgnoreDefaultLibraryNames", "NODEFAULTLIB:", "default libs to ignore", "",
@@ -478,8 +496,16 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] =
{"EnableCOMDATFolding", "OPT:NOICF", "Do not remove redundant COMDATs",
"1", 0},
{"EnableCOMDATFolding", "OPT:ICF", "Remove redundant COMDATs", "2", 0},
+ {"ResourceOnlyDLL", "NOENTRY", "Create DLL with no entry point", "true", 0},
{"OptimizeReferences", "OPT:NOREF", "Keep unreferenced data", "1", 0},
{"OptimizeReferences", "OPT:REF", "Eliminate unreferenced data", "2", 0},
+ {"Profile", "PROFILE", "", "true", 0},
+ {"RandomizedBaseAddress", "DYNAMICBASE:NO",
+ "Image may not be rebased at load-time", "1", 0},
+ {"RandomizedBaseAddress", "DYNAMICBASE",
+ "Image may be rebased at load-time", "2", 0},
+ {"SetChecksum", "RELEASE", "Enable setting checksum in header", "true", 0},
+ {"SupportUnloadOfDelayLoadedDLL", "DELAY:UNLOAD", "", "true", 0},
{"TargetMachine", "MACHINE:I386", "Machine x86", "1", 0},
{"TargetMachine", "MACHINE:X86", "Machine x86", "1", 0},
{"TargetMachine", "MACHINE:AM33", "Machine AM33", "2", 0},
@@ -498,6 +524,8 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] =
{"TargetMachine", "MACHINE:SH5", "Machine SH5", "15", 0},
{"TargetMachine", "MACHINE:THUMB", "Machine THUMB", "16", 0},
{"TargetMachine", "MACHINE:X64", "Machine x64", "17", 0},
+ {"TurnOffAssemblyGeneration", "NOASSEMBLY",
+ "No assembly even if CLR information is present in objects.", "true", 0},
{"ModuleDefinitionFile", "DEF:", "add an export def file", "",
cmVS7FlagTable::UserValue},
{"GenerateMapFile", "MAP", "enable generation of map file", "TRUE", 0},
@@ -1695,7 +1723,7 @@ void cmLocalVisualStudio7Generator
event.Start(tool);
event.Write(target.GetPreLinkCommands());
cmsys::auto_ptr<cmCustomCommand> pcc(
- this->MaybeCreateImplibDir(target, configName));
+ this->MaybeCreateImplibDir(target, configName, this->FortranProject));
if(pcc.get())
{
event.Write(*pcc);
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 9164beb..39f9962 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -32,13 +32,17 @@ cmLocalVisualStudioGenerator::~cmLocalVisualStudioGenerator()
//----------------------------------------------------------------------------
cmsys::auto_ptr<cmCustomCommand>
cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmTarget& target,
- const char* config)
+ const char* config,
+ bool isFortran)
{
cmsys::auto_ptr<cmCustomCommand> pcc;
// If an executable exports symbols then VS wants to create an
// import library but forgets to create the output directory.
- if(target.GetType() != cmTarget::EXECUTABLE) { return pcc; }
+ // The Intel Fortran plugin always forgets to the directory.
+ if(target.GetType() != cmTarget::EXECUTABLE &&
+ !(isFortran && target.GetType() == cmTarget::SHARED_LIBRARY))
+ { return pcc; }
std::string outDir = target.GetDirectory(config, false);
std::string impDir = target.GetDirectory(config, true);
if(impDir == outDir) { return pcc; }
diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h
index 1954ac5..22112b3 100644
--- a/Source/cmLocalVisualStudioGenerator.h
+++ b/Source/cmLocalVisualStudioGenerator.h
@@ -47,7 +47,7 @@ protected:
/** Construct a custom command to make exe import lib dir. */
cmsys::auto_ptr<cmCustomCommand>
- MaybeCreateImplibDir(cmTarget& target, const char* config);
+ MaybeCreateImplibDir(cmTarget& target, const char* config, bool isFortran);
// Safe object file name generation.
void ComputeObjectNameRequirements(std::vector<cmSourceGroup> const&);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e14e44d..63bf03b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -893,6 +893,20 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
return;
}
+ // Validate custom commands. TODO: More strict?
+ for(cmCustomCommandLines::const_iterator i=commandLines.begin();
+ i != commandLines.end(); ++i)
+ {
+ cmCustomCommandLine const& cl = *i;
+ if(!cl.empty() && !cl[0].empty() && cl[0][0] == '"')
+ {
+ cmOStringStream e;
+ e << "COMMAND may not contain literal quotes:\n " << cl[0] << "\n";
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return;
+ }
+ }
+
// Choose a source file on which to store the custom command.
cmSourceFile* file = 0;
if(main_dependency && main_dependency[0])
@@ -2744,6 +2758,27 @@ void cmMakefile::SetHomeOutputDirectory(const char* lib)
}
}
+void cmMakefile::SetScriptModeFile(const char* scriptfile)
+{
+ this->AddDefinition("CMAKE_SCRIPT_MODE_FILE", scriptfile);
+}
+
+void cmMakefile::SetArgcArgv(const std::vector<std::string>& args)
+{
+ cmOStringStream strStream;
+ strStream << args.size();
+ this->AddDefinition("CMAKE_ARGC", strStream.str().c_str());
+ //this->MarkVariableAsUsed("CMAKE_ARGC");
+
+ for (unsigned int t = 0; t < args.size(); ++t)
+ {
+ cmOStringStream tmpStream;
+ tmpStream << "CMAKE_ARGV" << t;
+ this->AddDefinition(tmpStream.str().c_str(), args[t].c_str());
+ //this->MarkVariableAsUsed(tmpStream.str().c_str());
+ }
+}
+
//----------------------------------------------------------------------------
cmSourceFile* cmMakefile::GetSource(const char* sourceName)
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 837a352..1c1aef3 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -411,7 +411,17 @@ public:
return this->HomeOutputDirectory.c_str();
}
//@}
-
+
+ /**
+ * Set CMAKE_SCRIPT_MODE_FILE variable when running a -P script.
+ */
+ void SetScriptModeFile(const char* scriptfile);
+
+ /**
+ * Set CMAKE_ARGC, CMAKE_ARGV0 ... variables.
+ */
+ void SetArgcArgv(const std::vector<std::string>& args);
+
//@{
/**
* Set/Get the start directory (or output directory). The start directory
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 049a338..1e9a670 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -26,6 +26,12 @@ cmMakefileLibraryTargetGenerator
::cmMakefileLibraryTargetGenerator(cmTarget* target):
cmMakefileTargetGenerator(target)
{
+ if(this->Target->IsCFBundleOnApple())
+ {
+ target->SetProperty("PREFIX", "");
+ target->SetProperty("SUFFIX", "");
+ }
+
this->CustomCommandDriver = OnDepends;
this->Target->GetLibraryNames(
this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
@@ -41,6 +47,20 @@ cmMakefileLibraryTargetGenerator
this->MacContentDirectory += this->FrameworkVersion;
this->MacContentDirectory += "/";
}
+ else if(this->Target->IsCFBundleOnApple())
+ {
+ this->MacContentDirectory = this->Target->GetDirectory(this->ConfigName);
+ this->MacContentDirectory += "/";
+ this->MacContentDirectory += this->TargetNameOut;
+ this->MacContentDirectory += ".";
+ const char *ext = this->Target->GetProperty("BUNDLE_EXTENSION");
+ if (!ext)
+ {
+ ext = "bundle";
+ }
+ this->MacContentDirectory += ext;
+ this->MacContentDirectory += "/Contents/";
+ }
}
//----------------------------------------------------------------------------
@@ -301,6 +321,27 @@ cmMakefileLibraryTargetGenerator
}
//----------------------------------------------------------------------------
+void
+cmMakefileLibraryTargetGenerator::CreateCFBundle(std::string& targetName,
+ std::string& outpath)
+{
+ // Compute bundle directory names.
+ outpath = this->MacContentDirectory;
+ outpath += "MacOS";
+ cmSystemTools::MakeDirectory(outpath.c_str());
+ this->Makefile->AddCMakeOutputFile(outpath.c_str());
+ outpath += "/";
+
+ // Configure the Info.plist file. Note that it needs the executable name
+ // to be set.
+ std::string plist = this->MacContentDirectory + "Info.plist";
+ this->LocalGenerator->GenerateAppleInfoPList(this->Target,
+ targetName.c_str(),
+ plist.c_str());
+ this->Makefile->AddCMakeOutputFile(plist.c_str());
+}
+
+//----------------------------------------------------------------------------
void cmMakefileLibraryTargetGenerator::WriteLibraryRules
(const char* linkRuleVar, const char* extraFlags, bool relink)
{
@@ -354,6 +395,12 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
outpath = this->MacContentDirectory;
this->CreateFramework(targetName);
}
+ else if(this->Target->IsCFBundleOnApple())
+ {
+ outpath = this->Target->GetDirectory(this->ConfigName);
+ outpath += "/";
+ this->CreateCFBundle(targetName, outpath);
+ }
else if(relink)
{
outpath = this->Makefile->GetStartOutputDirectory();
@@ -417,6 +464,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
buildEcho += " shared library ";
break;
case cmTarget::MODULE_LIBRARY:
+ if (this->Target->IsCFBundleOnApple())
+ buildEcho += " CFBundle";
buildEcho += " shared module ";
break;
default:
diff --git a/Source/cmMakefileLibraryTargetGenerator.h b/Source/cmMakefileLibraryTargetGenerator.h
index 2f085ad..f3c47db 100644
--- a/Source/cmMakefileLibraryTargetGenerator.h
+++ b/Source/cmMakefileLibraryTargetGenerator.h
@@ -33,6 +33,7 @@ protected:
// MacOSX Framework support methods
void WriteFrameworkRules(bool relink);
void CreateFramework(std::string const& targetName);
+ void CreateCFBundle(std::string& targetName, std::string& outpath);
// Store the computd framework version for OS X Frameworks.
std::string FrameworkVersion;
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 2d1f792..37070b6 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -453,7 +453,7 @@ cmPolicies::cmPolicies()
"Starting with CMake 2.8.4, if a cmake-module shipped with CMake (i.e. "
"located in the CMake module directory) calls include() or "
"find_package(), the files located in the the CMake module directory are "
- "prefered over the files in CMAKE_MODULE_PATH. "
+ "preferred over the files in CMAKE_MODULE_PATH. "
"This makes sure that the modules belonging to "
"CMake always get those files included which they expect, and against "
"which they were developed and tested. "
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index ed1da7b..42d3f06 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -482,17 +482,21 @@ void cmSourceFile::DefineProperties(cmake *cm)
cm->DefineProperty
("MACOSX_PACKAGE_LOCATION", cmProperty::SOURCE_FILE,
- "Place a source file inside a Mac OS X bundle or framework.",
+ "Place a source file inside a Mac OS X bundle, CFBundle, or framework.",
"Executable targets with the MACOSX_BUNDLE property set are built "
"as Mac OS X application bundles on Apple platforms. "
"Shared library targets with the FRAMEWORK property set are built "
"as Mac OS X frameworks on Apple platforms. "
+ "Module library targets with the BUNDLE property set are built "
+ "as Mac OS X CFBundle bundles on Apple platforms. "
"Source files listed in the target with this property set will "
"be copied to a directory inside the bundle or framework content "
"folder specified by the property value. "
"For bundles the content folder is \"<name>.app/Contents\". "
"For frameworks the content folder is "
"\"<name>.framework/Versions/<version>\". "
+ "For cfbundles the content folder is "
+ "\"<name>.bundle/Contents\" (unless the extension is changed). "
"See the PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE target "
"properties for specifying files meant for Headers, PrivateHeaders, "
"or Resources directories.");
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 949fcf5..19d2369 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -72,7 +72,11 @@ bool cmStringCommand
{
return this->HandleRandomCommand(args);
}
-
+ else if(subCommand == "FIND")
+ {
+ return this->HandleFindCommand(args);
+ }
+
std::string e = "does not recognize sub-command "+subCommand;
this->SetError(e.c_str());
return false;
@@ -499,6 +503,68 @@ void cmStringCommand::StoreMatches(cmMakefile* mf,cmsys::RegularExpression& re)
}
//----------------------------------------------------------------------------
+bool cmStringCommand::HandleFindCommand(std::vector<std::string> const&
+ args)
+{
+ // check if all required parameters were passed
+ if(args.size() < 4 || args.size() > 5)
+ {
+ this->SetError("sub-command FIND requires 3 or 4 parameters.");
+ return false;
+ }
+
+ // check if the reverse flag was set or not
+ bool reverseMode = false;
+ if(args.size() == 5 && args[4] == "REVERSE")
+ {
+ reverseMode = true;
+ }
+
+ // if we have 5 arguments the last one must be REVERSE
+ if(args.size() == 5 && args[4] != "REVERSE")
+ {
+ this->SetError("sub-command FIND: unknown last parameter");
+ return false;
+ }
+
+ // local parameter names.
+ const std::string& sstring = args[1];
+ const std::string& schar = args[2];
+ const std::string& outvar = args[3];
+
+ // ensure that the user cannot accidentally specify REVERSE as a variable
+ if(outvar == "REVERSE")
+ {
+ this->SetError("sub-command FIND does not allow to select REVERSE as "
+ "the output variable. "
+ "Maybe you missed the actual output variable?");
+ return false;
+ }
+
+ // try to find the character and return its position
+ size_t pos;
+ if(!reverseMode)
+ {
+ pos = sstring.find(schar);
+ }
+ else
+ {
+ pos = sstring.rfind(schar);
+ }
+ if(std::string::npos != pos)
+ {
+ cmOStringStream s;
+ s << pos;
+ this->Makefile->AddDefinition(outvar.c_str(), s.str().c_str());
+ return true;
+ }
+
+ // the character was not found, but this is not really an error
+ this->Makefile->AddDefinition(outvar.c_str(), "-1");
+ return true;
+}
+
+//----------------------------------------------------------------------------
bool cmStringCommand::HandleCompareCommand(std::vector<std::string> const&
args)
{
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index 2a916b4..9586449 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -90,6 +90,7 @@ public:
" string(STRIP <string> <output variable>)\n"
" string(RANDOM [LENGTH <length>] [ALPHABET <alphabet>]\n"
" [RANDOM_SEED <seed>] <output variable>)\n"
+ " string(FIND <string> <substring> <output variable> [REVERSE])\n"
"REGEX MATCH will match the regular expression once and store the "
"match in the output variable.\n"
"REGEX MATCHALL will match the regular expression as many times as "
@@ -117,6 +118,10 @@ public:
"characters and default alphabet is all numbers and upper and "
"lower case letters. If an integer RANDOM_SEED is given, its "
"value will be used to seed the random number generator.\n"
+ "FIND will return the position where the given substring was found "
+ "in the supplied string. If the REVERSE flag was used, the command "
+ "will search for the position of the last occurrence of the "
+ "specified substring.\n"
"The following characters have special meaning in regular expressions:\n"
" ^ Matches at beginning of a line\n"
" $ Matches at end of a line\n"
@@ -152,6 +157,7 @@ protected:
bool HandleSubstringCommand(std::vector<std::string> const& args);
bool HandleStripCommand(std::vector<std::string> const& args);
bool HandleRandomCommand(std::vector<std::string> const& args);
+ bool HandleFindCommand(std::vector<std::string> const& args);
class RegexReplacement
{
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 72efce3..7bd5372 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -188,6 +188,22 @@ void cmTarget::DefineProperties(cmake *cm)
"the target is built.");
cm->DefineProperty
+ ("BUNDLE", cmProperty::TARGET,
+ "This target is a CFBundle on the Mac.",
+ "If a module library target has this property set to true it will "
+ "be built as a CFBundle when built on the mac. It will have the "
+ "directory structure required for a CFBundle and will be suitable "
+ "to be used for creating Browser Plugins or other application "
+ "resources.");
+
+ cm->DefineProperty
+ ("BUNDLE_EXTENSION", cmProperty::TARGET,
+ "The file extension used to name a BUNDLE target on the Mac.",
+ "The default value is \"bundle\" - you can also use \"plugin\" or "
+ "whatever file extension is required by the host app for your "
+ "bundle.");
+
+ cm->DefineProperty
("FRAMEWORK", cmProperty::TARGET,
"This target is a framework on the Mac.",
"If a shared library target has this property set to true it will "
@@ -471,17 +487,32 @@ void cmTarget::DefineProperties(cmake *cm)
"Per-configuration linker flags for a target.",
"This is the configuration-specific version of LINK_FLAGS.");
+#define CM_LINK_SEARCH_SUMMARY \
+ "Some linkers support switches such as -Bstatic and -Bdynamic " \
+ "to determine whether to use static or shared libraries for -lXXX " \
+ "options. CMake uses these options to set the link type for " \
+ "libraries whose full paths are not known or (in some cases) are in " \
+ "implicit link directories for the platform. "
+
+ cm->DefineProperty
+ ("LINK_SEARCH_START_STATIC", cmProperty::TARGET,
+ "Assume the linker looks for static libraries by default.",
+ CM_LINK_SEARCH_SUMMARY
+ "By default the linker search type is assumed to be -Bdynamic at "
+ "the beginning of the library list. This property switches the "
+ "assumption to -Bstatic. It is intended for use when linking an "
+ "executable statically (e.g. with the GNU -static option). "
+ "See also LINK_SEARCH_END_STATIC.");
+
cm->DefineProperty
("LINK_SEARCH_END_STATIC", cmProperty::TARGET,
"End a link line such that static system libraries are used.",
- "Some linkers support switches such as -Bstatic and -Bdynamic "
- "to determine whether to use static or shared libraries for -lXXX "
- "options. CMake uses these options to set the link type for "
- "libraries whose full paths are not known or (in some cases) are in "
- "implicit link directories for the platform. By default the "
- "linker search type is left at -Bdynamic by the end of the library "
- "list. This property switches the final linker search type to "
- "-Bstatic.");
+ CM_LINK_SEARCH_SUMMARY
+ "By default CMake adds an option at the end of the library list (if "
+ "necessary) to set the linker search type back to its starting type. "
+ "This property switches the final linker search type to -Bstatic "
+ "regardless of how it started. "
+ "See also LINK_SEARCH_START_STATIC.");
cm->DefineProperty
("LINKER_LANGUAGE", cmProperty::TARGET,
@@ -1211,6 +1242,14 @@ bool cmTarget::IsAppBundleOnApple()
}
//----------------------------------------------------------------------------
+bool cmTarget::IsCFBundleOnApple()
+{
+ return (this->GetType() == cmTarget::MODULE_LIBRARY &&
+ this->Makefile->IsOn("APPLE") &&
+ this->GetPropertyAsBool("BUNDLE"));
+}
+
+//----------------------------------------------------------------------------
class cmTargetTraceDependencies
{
public:
@@ -4278,9 +4317,13 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface)
}
}
- // There is no implicit link interface for executables, so if none
- // was explicitly set, there is no link interface.
- if(!explicitLibraries && this->GetType() == cmTarget::EXECUTABLE)
+ // There is no implicit link interface for executables or modules
+ // so if none was explicitly set then there is no link interface.
+ // Note that CMake versions 2.2 and below allowed linking to modules.
+ bool canLinkModules = this->Makefile->NeedBackwardsCompatibility(2,2);
+ if(!explicitLibraries &&
+ (this->GetType() == cmTarget::EXECUTABLE ||
+ (this->GetType() == cmTarget::MODULE_LIBRARY && !canLinkModules)))
{
return false;
}
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index f2b7d61..3b1f016 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -326,7 +326,7 @@ public:
*/
bool FindSourceFiles();
- ///! Return the prefered linker language for this target
+ ///! Return the preferred linker language for this target
const char* GetLinkerLanguage(const char* config = 0);
///! Return the rule variable used to create this type of target,
@@ -430,6 +430,9 @@ public:
Apple. */
bool IsFrameworkOnApple();
+ /** Return whether this target is a CFBundle (plugin) on Apple. */
+ bool IsCFBundleOnApple();
+
/** Return whether this target is an executable Bundle on Apple. */
bool IsAppBundleOnApple();
diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h
index 141995d..fec2265 100644
--- a/Source/cmUseMangledMesaCommand.h
+++ b/Source/cmUseMangledMesaCommand.h
@@ -30,7 +30,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
- virtual cmCommand* Clone()
+ virtual cmCommand* Clone()
{
return new cmUseMangledMesaCommand;
}
@@ -41,7 +41,7 @@ public:
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
+
/**
* The name of the command as specified in CMakeList.txt.
*/
@@ -50,11 +50,11 @@ public:
/**
* Succinct documentation.
*/
- virtual const char* GetTerseDocumentation()
+ virtual const char* GetTerseDocumentation()
{
return "Copy mesa headers for use in combination with system GL.";
}
-
+
/**
* More documentation.
*/
@@ -68,6 +68,11 @@ public:
"being added to the include directory path earlier.";
}
+ /**
+ * This determines if the command is invoked when in script mode.
+ */
+ virtual bool IsScriptable() { return true; }
+
/** This command is kept for compatibility with older CMake versions. */
virtual bool IsDiscouraged()
{
@@ -80,5 +85,4 @@ protected:
};
-
#endif
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4cb745e..8a27ffd 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -167,6 +167,7 @@ void cmVisualStudio10TargetGenerator::Generate()
// Write the encoding header into the file
char magic[] = {0xEF,0xBB, 0xBF};
this->BuildFileStream->write(magic, 3);
+ this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",0);
this->WriteString("<Project DefaultTargets=\"Build\" "
"ToolsVersion=\"4.0\" "
"xmlns=\"http://schemas.microsoft.com/"
@@ -998,6 +999,15 @@ OutputLinkIncremental(std::string const& configName)
this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 3);
*this->BuildFileStream << incremental
<< "</LinkIncremental>\n";
+
+ const char* manifest = "true";
+ if(flags.find("MANIFEST:NO") != flags.npos)
+ {
+ manifest = "false";
+ }
+ this->WritePlatformConfigTag("GenerateManifest", configName.c_str(), 3);
+ *this->BuildFileStream << manifest
+ << "</GenerateManifest>\n";
}
//----------------------------------------------------------------------------
@@ -1326,7 +1336,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
linkDirs += "%(AdditionalLibraryDirectories)";
linkOptions.AddFlag("AdditionalLibraryDirectories", linkDirs.c_str());
linkOptions.AddFlag("AdditionalDependencies", libs.c_str());
- linkOptions.AddFlag("Version", "0.0");
+ linkOptions.AddFlag("Version", "");
if(linkOptions.IsDebug() || flags.find("/debug") != flags.npos)
{
linkOptions.AddFlag("GenerateDebugInformation", "true");
@@ -1369,6 +1379,8 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
linkOptions.AddFlag("ModuleDefinitionFile",
this->ModuleDefinitionFile.c_str());
}
+
+ linkOptions.RemoveFlag("GenerateManifest");
linkOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
linkOptions.OutputFlagMap(*this->BuildFileStream, " ");
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index bab0aaf..ea8cdfd 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -462,7 +462,7 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
}
}
std::cerr << "loading initial cache file " << path.c_str() << "\n";
- this->ReadListFile(path.c_str());
+ this->ReadListFile(args, path.c_str());
}
else if(arg.find("-P",0) == 0)
{
@@ -478,13 +478,14 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
cmSystemTools::Error("No cmake script provided.");
return false;
}
- this->ReadListFile(path.c_str());
+ this->ReadListFile(args, path.c_str());
}
}
return true;
}
-void cmake::ReadListFile(const char *path)
+void cmake::ReadListFile(const std::vector<std::string>& args,
+ const char *path)
{
// if a generator was not yet created, temporarily create one
cmGlobalGenerator *gg = this->GetGlobalGenerator();
@@ -510,6 +511,14 @@ void cmake::ReadListFile(const char *path)
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
lg->GetMakefile()->SetStartDirectory
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
+ if (this->GetScriptMode())
+ {
+ std::string file(cmSystemTools::CollapseFullPath(path));
+ cmSystemTools::ConvertToUnixSlashes(file);
+ lg->GetMakefile()->SetScriptModeFile(file.c_str());
+
+ lg->GetMakefile()->SetArgcArgv(args);
+ }
if (!lg->GetMakefile()->ReadListFile(0, path))
{
cmSystemTools::Error("Error processing file:", path);
@@ -979,37 +988,39 @@ void CMakeCommandUsage(const char* program)
errorStream
<< "Usage: " << program << " -E [command] [arguments ...]\n"
<< "Available commands: \n"
+ << " build build_dir - build the project in build_dir.\n"
<< " chdir dir cmd [args]... - run command in a given directory\n"
- << " rename oldname newname - rename a file or directory "
- "(on one volume)\n"
+ << " compare_files file1 file2 - check if file1 is same as file2\n"
<< " copy file destination - copy file to destination (either file "
"or directory)\n"
- << " copy_if_different in-file out-file - copy file if input has "
- "changed\n"
<< " copy_directory source destination - copy directory 'source' "
"content to directory 'destination'\n"
- << " compare_files file1 file2 - check if file1 is same as file2\n"
+ << " copy_if_different in-file out-file - copy file if input has "
+ "changed\n"
<< " echo [string]... - displays arguments as text\n"
<< " echo_append [string]... - displays arguments as text but no new "
"line\n"
<< " environment - display the current environment\n"
<< " make_directory dir - create a directory\n"
<< " md5sum file1 [...] - compute md5sum of files\n"
- << " remove_directory dir - remove a directory and its contents\n"
<< " remove [-f] file1 file2 ... - remove the file(s), use -f to force "
"it\n"
+ << " remove_directory dir - remove a directory and its contents\n"
+ << " rename oldname newname - rename a file or directory "
+ "(on one volume)\n"
<< " tar [cxt][vfz][cvfj] file.tar "
"file/dir1 file/dir2 ... - create a tar "
"archive\n"
<< " time command [args] ... - run command and return elapsed time\n"
<< " touch file - touch a file.\n"
<< " touch_nocreate file - touch a file but do not create it.\n"
- << " build build_dir - build the project in build_dir.\n"
#if defined(_WIN32) && !defined(__CYGWIN__)
- << " write_regv key value - write registry value\n"
- << " delete_regv key - delete registry value\n"
+ << "Available on Windows only:\n"
<< " comspec - on windows 9x use this for RunCommand\n"
+ << " delete_regv key - delete registry value\n"
+ << " write_regv key value - write registry value\n"
#else
+ << "Available on UNIX only:\n"
<< " create_symlink old new - create a symbolic link new -> old\n"
#endif
;
@@ -1984,8 +1995,32 @@ int cmake::Configure()
}
+bool cmake::RejectUnsupportedPaths(const char* desc, std::string const& path)
+{
+ // Some characters are not well-supported by native build systems.
+ std::string::size_type pos = path.find_first_of("=");
+ if(pos == std::string::npos)
+ {
+ return false;
+ }
+ cmOStringStream e;
+ e << "The path to the " << desc << " directory:\n"
+ << " " << path << "\n"
+ << "contains unsupported character '" << path[pos] << "'.\n"
+ << "Please use a different " << desc << " directory name.";
+ cmListFileBacktrace bt;
+ this->IssueMessage(cmake::FATAL_ERROR, e.str(), bt);
+ return true;
+}
+
int cmake::ActualConfigure()
{
+ if(this->RejectUnsupportedPaths("source", this->cmHomeDirectory) ||
+ this->RejectUnsupportedPaths("binary", this->HomeOutputDirectory))
+ {
+ return 1;
+ }
+
// Construct right now our path conversion table before it's too late:
this->UpdateConversionPathTable();
this->CleanupCommandsAndMacros();
@@ -2197,13 +2232,14 @@ int cmake::ActualConfigure()
void cmake::PreLoadCMakeFiles()
{
+ std::vector<std::string> args;
std::string pre_load = this->GetHomeDirectory();
if ( pre_load.size() > 0 )
{
pre_load += "/PreLoad.cmake";
if ( cmSystemTools::FileExists(pre_load.c_str()) )
{
- this->ReadListFile(pre_load.c_str());
+ this->ReadListFile(args, pre_load.c_str());
}
}
pre_load = this->GetHomeOutputDirectory();
@@ -2212,7 +2248,7 @@ void cmake::PreLoadCMakeFiles()
pre_load += "/PreLoad.cmake";
if ( cmSystemTools::FileExists(pre_load.c_str()) )
{
- this->ReadListFile(pre_load.c_str());
+ this->ReadListFile(args, pre_load.c_str());
}
}
}
@@ -4108,7 +4144,10 @@ int cmake::VisualStudioLinkNonIncremental(std::vector<std::string>& args,
return -1;
}
// Run the link command as given
- linkCommand.push_back("/MANIFEST");
+ if (hasManifest)
+ {
+ linkCommand.push_back("/MANIFEST");
+ }
if(!cmake::RunCommand("LINK", linkCommand, verbose))
{
return -1;
diff --git a/Source/cmake.h b/Source/cmake.h
index 1bb42d3..132a86d 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -406,7 +406,7 @@ protected:
bool DoSuppressDevWarnings;
///! read in a cmake list file to initialize the cache
- void ReadListFile(const char *path);
+ void ReadListFile(const std::vector<std::string>& args, const char *path);
///! Check if CMAKE_CACHEFILE_DIR is set. If it is not, delete the log file.
/// If it is set, truncate it to 50kb
@@ -451,6 +451,8 @@ protected:
///! Find the full path to one of the cmake programs like ctest, cpack, etc.
std::string FindCMakeProgram(const char* name) const;
+
+ bool RejectUnsupportedPaths(const char* desc, std::string const& path);
private:
cmake(const cmake&); // Not implemented.
void operator=(const cmake&); // Not implemented.
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index a51673c..a5dca18 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -71,11 +71,13 @@ static const char * cmDocumentationOptions[][3] =
{"-E", "CMake command mode.",
"For true platform independence, CMake provides a list of commands "
"that can be used on all systems. Run with -E help for the usage "
- "information. Commands available are: chdir, copy, copy_if_different "
- "copy_directory, compare_files, echo, echo_append, environment, "
- "make_directory, md5sum, remove_directory, remove, tar, time, "
- "touch, touch_nocreate, write_regv, delete_regv, comspec, "
- "create_symlink."},
+ "information. Commands available are: build, chdir, compare_files, copy, "
+ "copy_directory, copy_if_different, echo, echo_append, environment, "
+ "make_directory, md5sum, remove, remove_directory, rename, tar, time, "
+ "touch, touch_nocreate. In addition, some platform specific commands "
+ "are available. "
+ "On Windows: comspec, delete_regv, write_regv. "
+ "On UNIX: create_symlink."},
{"-i", "Run in wizard mode.",
"Wizard mode runs cmake interactively without a GUI. The user is "
"prompted to answer questions about the project configuration. "
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index a35a01f..f5f317c 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -1,6 +1,6 @@
#=============================================================================
# KWSys - Kitware System Library
-# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -44,9 +44,7 @@
# SET(KWSYS_IOS_FORCE_OLD 1)
#
#
-# Optional settings to setup install rules work in one of two ways.
-# The modern way utilizes the CMake 2.4 INSTALL command. Settings
-# for this mode are as follows:
+# Optional settings to setup install rules are as follows:
#
# KWSYS_INSTALL_BIN_DIR = The installation target directories into
# KWSYS_INSTALL_LIB_DIR which the libraries and headers from
@@ -70,25 +68,6 @@
# SET(KWSYS_INSTALL_INCLUDE_DIR include)
# SET(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME Runtime)
# SET(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT Development)
-#
-# The old way uses the original CMake INSTALL_* commands. Settings
-# for this mode are as follows:
-#
-# KWSYS_LIBRARY_INSTALL_DIR = The installation target directories into
-# KWSYS_HEADER_INSTALL_DIR which the libraries and headers from
-# kwsys should be installed by a "make install".
-# The values should be specified relative to
-# the installation prefix and start with a '/'.
-# Example:
-#
-# SET(KWSYS_LIBRARY_INSTALL_DIR /lib)
-# SET(KWSYS_HEADER_INSTALL_DIR /include)
-#
-# The modern way will be used whenever the INSTALL command is
-# available. If the settings are not available the old names will be
-# used to construct them. The old way will be used whenever the
-# INSTALL command is not available. If the settings are not available
-# the new names will be used to construct them.
# Once configured, kwsys should be used as follows from C or C++ code:
#
@@ -105,13 +84,7 @@
# any outside mailing list and no documentation of the change will be
# written.
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5 FATAL_ERROR)
-IF(COMMAND CMAKE_POLICY)
- CMAKE_POLICY(SET CMP0003 NEW)
-ENDIF(COMMAND CMAKE_POLICY)
-
-# Allow empty endif() and such with CMake 2.4.
-SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
#-----------------------------------------------------------------------------
# If a namespace is not specified, use "kwsys" and enable testing.
@@ -126,23 +99,11 @@ ENDIF(NOT KWSYS_NAMESPACE)
# The project name is that of the specified namespace.
PROJECT(${KWSYS_NAMESPACE})
-# Some properties we set only with CMake 2.6 and above.
-IF(COMMAND SET_PROPERTY)
- MACRO(KWSYS_SET_PROPERTY)
- SET_PROPERTY(${ARGV})
- ENDMACRO(KWSYS_SET_PROPERTY)
-ELSE(COMMAND SET_PROPERTY)
- MACRO(KWSYS_SET_PROPERTY)
- ENDMACRO(KWSYS_SET_PROPERTY)
-ENDIF(COMMAND SET_PROPERTY)
-
# Tell CMake how to follow dependencies of sources in this directory.
-IF(COMMAND SET_PROPERTY)
- SET_PROPERTY(DIRECTORY
- PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
- "KWSYS_HEADER(%)=<${KWSYS_NAMESPACE}/%>"
- )
-ENDIF(COMMAND SET_PROPERTY)
+SET_PROPERTY(DIRECTORY
+ PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
+ "KWSYS_HEADER(%)=<${KWSYS_NAMESPACE}/%>"
+ )
# Select library components.
IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
@@ -208,97 +169,75 @@ INCLUDE(CheckTypeSize)
# Do full dependency headers.
INCLUDE_REGULAR_EXPRESSION("^.*$")
-# Choose which kind of install commands to use.
-IF(COMMAND INSTALL)
- # Use new KWSYS_INSTALL_*_DIR variable names to control installation.
- # Take defaults from the old names. Note that there was no old name
- # for the bin dir, so we take the old lib dir name so DLLs will be
- # installed in a compatible way for old code.
- IF(NOT KWSYS_INSTALL_INCLUDE_DIR)
- STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_INCLUDE_DIR
- "${KWSYS_HEADER_INSTALL_DIR}")
- ENDIF(NOT KWSYS_INSTALL_INCLUDE_DIR)
- IF(NOT KWSYS_INSTALL_LIB_DIR)
- STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_LIB_DIR
- "${KWSYS_LIBRARY_INSTALL_DIR}")
- ENDIF(NOT KWSYS_INSTALL_LIB_DIR)
- IF(NOT KWSYS_INSTALL_BIN_DIR)
- STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_BIN_DIR
- "${KWSYS_LIBRARY_INSTALL_DIR}")
- ENDIF(NOT KWSYS_INSTALL_BIN_DIR)
-
- # Setup header install rules.
- SET(KWSYS_INSTALL_INCLUDE_OPTIONS)
- IF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
- SET(KWSYS_INSTALL_INCLUDE_OPTIONS ${KWSYS_INSTALL_INCLUDE_OPTIONS}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT}
- )
- ENDIF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
+# Use new KWSYS_INSTALL_*_DIR variable names to control installation.
+# Take defaults from the old names. Note that there was no old name
+# for the bin dir, so we take the old lib dir name so DLLs will be
+# installed in a compatible way for old code.
+IF(NOT KWSYS_INSTALL_INCLUDE_DIR)
+ STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_INCLUDE_DIR
+ "${KWSYS_HEADER_INSTALL_DIR}")
+ENDIF(NOT KWSYS_INSTALL_INCLUDE_DIR)
+IF(NOT KWSYS_INSTALL_LIB_DIR)
+ STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_LIB_DIR
+ "${KWSYS_LIBRARY_INSTALL_DIR}")
+ENDIF(NOT KWSYS_INSTALL_LIB_DIR)
+IF(NOT KWSYS_INSTALL_BIN_DIR)
+ STRING(REGEX REPLACE "^/" "" KWSYS_INSTALL_BIN_DIR
+ "${KWSYS_LIBRARY_INSTALL_DIR}")
+ENDIF(NOT KWSYS_INSTALL_BIN_DIR)
+
+# Setup header install rules.
+SET(KWSYS_INSTALL_INCLUDE_OPTIONS)
+IF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
+ SET(KWSYS_INSTALL_INCLUDE_OPTIONS ${KWSYS_INSTALL_INCLUDE_OPTIONS}
+ COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT}
+ )
+ENDIF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
- # Setup library install rules.
- SET(KWSYS_INSTALL_LIBRARY_RULE)
- IF(KWSYS_INSTALL_LIB_DIR)
- IF(KWSYS_INSTALL_EXPORT_NAME)
- LIST(APPEND KWSYS_INSTALL_LIBRARY_RULE EXPORT ${KWSYS_INSTALL_EXPORT_NAME})
- ENDIF()
- # Install the shared library to the lib directory.
+# Setup library install rules.
+SET(KWSYS_INSTALL_LIBRARY_RULE)
+IF(KWSYS_INSTALL_LIB_DIR)
+ IF(KWSYS_INSTALL_EXPORT_NAME)
+ LIST(APPEND KWSYS_INSTALL_LIBRARY_RULE EXPORT ${KWSYS_INSTALL_EXPORT_NAME})
+ ENDIF()
+ # Install the shared library to the lib directory.
+ SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
+ LIBRARY DESTINATION ${KWSYS_INSTALL_LIB_DIR}
+ )
+ # Assign the shared library to the runtime component.
+ IF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- LIBRARY DESTINATION ${KWSYS_INSTALL_LIB_DIR}
+ COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
)
- # Assign the shared library to the runtime component.
- IF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
- )
- ENDIF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
+ ENDIF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
- # Install the archive to the lib directory.
+ # Install the archive to the lib directory.
+ SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
+ ARCHIVE DESTINATION ${KWSYS_INSTALL_LIB_DIR}
+ )
+ # Assign the archive to the development component.
+ IF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- ARCHIVE DESTINATION ${KWSYS_INSTALL_LIB_DIR}
+ COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT}
)
- # Assign the archive to the development component.
- IF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT}
- )
- ENDIF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
- ENDIF(KWSYS_INSTALL_LIB_DIR)
- IF(KWSYS_INSTALL_BIN_DIR)
- # Install the runtime library to the bin directory.
+ ENDIF(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT)
+ENDIF(KWSYS_INSTALL_LIB_DIR)
+IF(KWSYS_INSTALL_BIN_DIR)
+ # Install the runtime library to the bin directory.
+ SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
+ RUNTIME DESTINATION ${KWSYS_INSTALL_BIN_DIR}
+ )
+ # Assign the runtime library to the runtime component.
+ IF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- RUNTIME DESTINATION ${KWSYS_INSTALL_BIN_DIR}
+ COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
)
- # Assign the runtime library to the runtime component.
- IF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
- SET(KWSYS_INSTALL_LIBRARY_RULE ${KWSYS_INSTALL_LIBRARY_RULE}
- COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
- )
- ENDIF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
- ENDIF(KWSYS_INSTALL_BIN_DIR)
-
- # Do not support old KWSYS_*_INSTALL_DIR variable names.
- SET(KWSYS_HEADER_INSTALL_DIR)
- SET(KWSYS_LIBRARY_INSTALL_DIR)
-
-ELSE(COMMAND INSTALL)
- # Use old KWSYS_*_INSTALL_DIR variable names.
- # Take defaults from the new names.
- IF(KWSYS_INSTALL_LIB_DIR)
- IF(NOT KWSYS_LIBRARY_INSTALL_DIR)
- SET(KWSYS_LIBRARY_INSTALL_DIR "/${KWSYS_INSTALL_LIB_DIR}")
- ENDIF(NOT KWSYS_LIBRARY_INSTALL_DIR)
- ENDIF(KWSYS_INSTALL_LIB_DIR)
- IF(KWSYS_INSTALL_INCLUDE_DIR)
- IF(NOT KWSYS_HEADER_INSTALL_DIR)
- SET(KWSYS_HEADER_INSTALL_DIR "/${KWSYS_INSTALL_INCLUDE_DIR}")
- ENDIF(NOT KWSYS_HEADER_INSTALL_DIR)
- ENDIF(KWSYS_INSTALL_INCLUDE_DIR)
+ ENDIF(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME)
+ENDIF(KWSYS_INSTALL_BIN_DIR)
- # Do not support new KWSYS_INSTALL_*_DIR variable names.
- SET(KWSYS_INSTALL_BIN_DIR)
- SET(KWSYS_INSTALL_INCLUDE_DIR)
- SET(KWSYS_INSTALL_LIB_DIR)
-ENDIF(COMMAND INSTALL)
+# Do not support old KWSYS_*a_INSTALL_DIR variable names.
+SET(KWSYS_HEADER_INSTALL_DIR)
+SET(KWSYS_LIBRARY_INSTALL_DIR)
# Generated source files will need this header.
STRING(COMPARE EQUAL "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}"
@@ -680,10 +619,6 @@ FOREACH(header
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}/stl
${KWSYS_INSTALL_INCLUDE_OPTIONS})
ENDIF(KWSYS_INSTALL_INCLUDE_DIR)
- IF(KWSYS_HEADER_INSTALL_DIR)
- INSTALL_FILES(${KWSYS_HEADER_INSTALL_DIR}/${KWSYS_NAMESPACE}/stl
- FILES ${KWSYS_HEADER_DIR}/stl/${header}.hxx)
- ENDIF(KWSYS_HEADER_INSTALL_DIR)
ELSE(KWSYS_STL_HEADER_EXTRA_${header})
SET(KWSYS_STL_HEADER_EXTRA "")
ENDIF(KWSYS_STL_HEADER_EXTRA_${header})
@@ -697,10 +632,6 @@ FOREACH(header
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}/stl
${KWSYS_INSTALL_INCLUDE_OPTIONS})
ENDIF(KWSYS_INSTALL_INCLUDE_DIR)
- IF(KWSYS_HEADER_INSTALL_DIR)
- INSTALL_FILES(${KWSYS_HEADER_INSTALL_DIR}/${KWSYS_NAMESPACE}/stl
- FILES ${KWSYS_HEADER_DIR}/stl/${header})
- ENDIF(KWSYS_HEADER_INSTALL_DIR)
ENDFOREACH(header)
# Provide cstddef header.
@@ -711,10 +642,6 @@ IF(KWSYS_INSTALL_INCLUDE_DIR)
INSTALL(FILES ${KWSYS_HEADER_DIR}/cstddef
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}
${KWSYS_INSTALL_INCLUDE_OPTIONS})
- IF(KWSYS_HEADER_INSTALL_DIR)
- INSTALL_FILES(${KWSYS_HEADER_INSTALL_DIR}/${KWSYS_NAMESPACE}
- FILES ${KWSYS_HEADER_DIR}/cstddef)
- ENDIF(KWSYS_HEADER_INSTALL_DIR)
ENDIF(KWSYS_INSTALL_INCLUDE_DIR)
#-----------------------------------------------------------------------------
@@ -732,10 +659,6 @@ FOREACH(header iostream fstream sstream iosfwd)
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}/ios
${KWSYS_INSTALL_INCLUDE_OPTIONS})
ENDIF(KWSYS_INSTALL_INCLUDE_DIR)
- IF(KWSYS_HEADER_INSTALL_DIR)
- INSTALL_FILES(${KWSYS_HEADER_INSTALL_DIR}/${KWSYS_NAMESPACE}/ios
- FILES ${KWSYS_HEADER_DIR}/ios/${header})
- ENDIF(KWSYS_HEADER_INSTALL_DIR)
ENDFOREACH(header)
#-----------------------------------------------------------------------------
@@ -824,10 +747,6 @@ FOREACH(c ${KWSYS_CLASSES})
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}
${KWSYS_INSTALL_INCLUDE_OPTIONS})
ENDIF(KWSYS_INSTALL_INCLUDE_DIR)
- IF(KWSYS_HEADER_INSTALL_DIR)
- INSTALL_FILES(${KWSYS_HEADER_INSTALL_DIR}/${KWSYS_NAMESPACE}
- FILES ${KWSYS_HEADER_DIR}/${c}.hxx)
- ENDIF(KWSYS_HEADER_INSTALL_DIR)
ENDFOREACH(c)
# Configure C headers.
@@ -843,10 +762,6 @@ FOREACH(h ${KWSYS_H_FILES})
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}
${KWSYS_INSTALL_INCLUDE_OPTIONS})
ENDIF(KWSYS_INSTALL_INCLUDE_DIR)
- IF(KWSYS_HEADER_INSTALL_DIR)
- INSTALL_FILES(${KWSYS_HEADER_INSTALL_DIR}/${KWSYS_NAMESPACE}
- FILES ${KWSYS_HEADER_DIR}/${h}.h)
- ENDIF(KWSYS_HEADER_INSTALL_DIR)
ENDFOREACH(h)
# Configure other C++ headers.
@@ -862,10 +777,6 @@ FOREACH(h ${KWSYS_HXX_FILES})
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}
${KWSYS_INSTALL_INCLUDE_OPTIONS})
ENDIF(KWSYS_INSTALL_INCLUDE_DIR)
- IF(KWSYS_HEADER_INSTALL_DIR)
- INSTALL_FILES(${KWSYS_HEADER_INSTALL_DIR}/${KWSYS_NAMESPACE}
- FILES ${KWSYS_HEADER_DIR}/${h}.hxx)
- ENDIF(KWSYS_HEADER_INSTALL_DIR)
ENDFOREACH(h)
#-----------------------------------------------------------------------------
@@ -873,7 +784,7 @@ ENDFOREACH(h)
IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE}
${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS})
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE} PROPERTY LABELS ${KWSYS_LABELS_LIB})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE} PROPERTY LABELS ${KWSYS_LABELS_LIB})
IF(KWSYS_USE_DynamicLoader)
IF(UNIX)
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
@@ -895,15 +806,12 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
IF(KWSYS_INSTALL_LIBRARY_RULE)
INSTALL(TARGETS ${KWSYS_NAMESPACE} ${KWSYS_INSTALL_LIBRARY_RULE})
ENDIF(KWSYS_INSTALL_LIBRARY_RULE)
- IF(KWSYS_LIBRARY_INSTALL_DIR)
- INSTALL_TARGETS(${KWSYS_LIBRARY_INSTALL_DIR} ${KWSYS_NAMESPACE})
- ENDIF(KWSYS_LIBRARY_INSTALL_DIR)
ENDIF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
# Add a C-only library if requested.
IF(KWSYS_ENABLE_C AND KWSYS_C_SRCS)
ADD_LIBRARY(${KWSYS_NAMESPACE}_c ${KWSYS_LIBRARY_TYPE} ${KWSYS_C_SRCS})
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}_c PROPERTY LABELS ${KWSYS_LABELS_LIB})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}_c PROPERTY LABELS ${KWSYS_LABELS_LIB})
# Apply user-defined target properties to the library.
IF(KWSYS_PROPERTIES_C)
@@ -916,9 +824,6 @@ IF(KWSYS_ENABLE_C AND KWSYS_C_SRCS)
IF(KWSYS_INSTALL_LIBRARY_RULE)
INSTALL(TARGETS ${KWSYS_NAMESPACE}_c ${KWSYS_INSTALL_LIBRARY_RULE})
ENDIF(KWSYS_INSTALL_LIBRARY_RULE)
- IF(KWSYS_LIBRARY_INSTALL_DIR)
- INSTALL_TARGETS(${KWSYS_LIBRARY_INSTALL_DIR} ${KWSYS_NAMESPACE}_c)
- ENDIF(KWSYS_LIBRARY_INSTALL_DIR)
ENDIF(KWSYS_ENABLE_C AND KWSYS_C_SRCS)
# For building kwsys itself, we use a macro defined on the command
@@ -942,8 +847,8 @@ IF(KWSYS_USE_Process)
# encode it into a C file.
ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}EncodeExecutable EncodeExecutable.c)
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE})
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE})
# Construct the location of the executable to be encoded.
SET(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
@@ -959,23 +864,12 @@ IF(KWSYS_USE_Process)
# Take advantage of a better custom command syntax if possible.
SET(CMD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe)
SET(FWD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe)
- IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
- ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
- COMMAND ${CMD}
- ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
- ${KWSYS_NAMESPACE} ProcessFwd9x
- DEPENDS ${CMD} ${FWD})
- ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
- ADD_CUSTOM_COMMAND(
- TARGET ${KWSYS_NAMESPACE}
- SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ProcessFwd9x.c
- COMMAND ${CMD}
- ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
- ${KWSYS_NAMESPACE} ProcessFwd9x
- OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
- DEPENDS ${CMD} ${FWD})
- ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
+ COMMAND ${CMD}
+ ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
+ ${KWSYS_NAMESPACE} ProcessFwd9x
+ DEPENDS ${CMD} ${FWD})
# Make sure build occurs in proper order.
ADD_DEPENDENCIES(${KWSYS_NAMESPACE} ${KWSYS_NAMESPACE}ProcessFwd9x
@@ -998,19 +892,19 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
testEncode
testTerminal
)
- IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
+ IF(KWSYS_STANDALONE)
SET(KWSYS_C_TESTS ${KWSYS_C_TESTS} testFail)
- ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
+ ENDIF()
CREATE_TEST_SOURCELIST(
KWSYS_C_TEST_SRCS ${KWSYS_NAMESPACE}TestsC.c
${KWSYS_C_TESTS}
)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestsC ${KWSYS_C_TEST_SRCS})
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsC PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsC PROPERTY LABELS ${KWSYS_LABELS_EXE})
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestsC ${KWSYS_NAMESPACE}_c)
FOREACH(test ${KWSYS_C_TESTS})
ADD_TEST(kwsys.${test} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestsC ${test} ${KWSYS_TEST_ARGS_${test}})
- KWSYS_SET_PROPERTY(TEST kwsys.${test} PROPERTY LABELS ${KWSYS_LABELS_TEST})
+ SET_PROPERTY(TEST kwsys.${test} PROPERTY LABELS ${KWSYS_LABELS_TEST})
ENDFOREACH(test)
# C++ tests
@@ -1034,7 +928,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} testDynamicLoader)
# If kwsys contains the DynamicLoader, need extra library
ADD_LIBRARY(${KWSYS_NAMESPACE}TestDynload MODULE testDynload.c)
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestDynload PROPERTY LABELS ${KWSYS_LABELS_LIB})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestDynload PROPERTY LABELS ${KWSYS_LABELS_LIB})
ADD_DEPENDENCIES(${KWSYS_NAMESPACE}TestDynload ${KWSYS_NAMESPACE})
ENDIF(KWSYS_USE_DynamicLoader)
CREATE_TEST_SOURCELIST(
@@ -1042,7 +936,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
${KWSYS_CXX_TESTS}
)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_CXX_TEST_SRCS})
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY LABELS ${KWSYS_LABELS_EXE})
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_NAMESPACE})
SET(TEST_SYSTEMTOOLS_BIN_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/testSystemTools.bin")
@@ -1089,19 +983,19 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
)
FOREACH(test ${KWSYS_CXX_TESTS})
ADD_TEST(kwsys.${test} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestsCxx ${test} ${KWSYS_TEST_ARGS_${test}})
- KWSYS_SET_PROPERTY(TEST kwsys.${test} PROPERTY LABELS ${KWSYS_LABELS_TEST})
+ SET_PROPERTY(TEST kwsys.${test} PROPERTY LABELS ${KWSYS_LABELS_TEST})
ENDFOREACH(test)
# Process tests.
ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestProcess testProcess.c)
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestProcess PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestProcess PROPERTY LABELS ${KWSYS_LABELS_EXE})
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestProcess ${KWSYS_NAMESPACE}_c)
IF(NOT CYGWIN)
SET(KWSYS_TEST_PROCESS_7 7)
ENDIF(NOT CYGWIN)
FOREACH(n 1 2 3 4 5 6 ${KWSYS_TEST_PROCESS_7})
ADD_TEST(kwsys.testProcess-${n} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestProcess ${n})
- KWSYS_SET_PROPERTY(TEST kwsys.testProcess-${n} PROPERTY LABELS ${KWSYS_LABELS_TEST})
+ SET_PROPERTY(TEST kwsys.testProcess-${n} PROPERTY LABELS ${KWSYS_LABELS_TEST})
SET_TESTS_PROPERTIES(kwsys.testProcess-${n} PROPERTIES TIMEOUT 120)
ENDFOREACH(n)
@@ -1115,13 +1009,13 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestSharedForward
${PROJECT_BINARY_DIR}/testSharedForward.c)
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestSharedForward PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestSharedForward PROPERTY LABELS ${KWSYS_LABELS_EXE})
ADD_DEPENDENCIES(${KWSYS_NAMESPACE}TestSharedForward ${KWSYS_NAMESPACE}_c)
ADD_TEST(kwsys.testSharedForward ${EXEC_DIR}/${KWSYS_NAMESPACE}TestSharedForward 1)
- KWSYS_SET_PROPERTY(TEST kwsys.testSharedForward PROPERTY LABELS ${KWSYS_LABELS_TEST})
+ SET_PROPERTY(TEST kwsys.testSharedForward PROPERTY LABELS ${KWSYS_LABELS_TEST})
# Configure some test properties.
- IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
+ IF(KWSYS_STANDALONE)
# We expect test to fail
SET_TESTS_PROPERTIES(kwsys.testFail PROPERTIES WILL_FAIL ON)
GET_TEST_PROPERTY(kwsys.testFail WILL_FAIL wfv)
@@ -1129,7 +1023,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
SET_TESTS_PROPERTIES(kwsys.testRegistry PROPERTIES PASS_REGULAR_EXPRESSION "Test passed")
SET_TESTS_PROPERTIES(kwsys.testFail PROPERTIES MEASUREMENT "Some Key=Some Value")
MESSAGE(STATUS "GET_TEST_PROPERTY returned: ${wfv}")
- ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
+ ENDIF()
# Suppress known consistent failures on buggy systems.
IF(KWSYS_TEST_BOGUS_FAILURES)
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index ed3b71c..453d728 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
SET(KWSYS_DATE_STAMP_YEAR 2011)
# KWSys version date month component. Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 02)
+SET(KWSYS_DATE_STAMP_MONTH 03)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 17)
+SET(KWSYS_DATE_STAMP_DAY 15)
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt
index b2937bb..ad27e57 100644
--- a/Tests/Assembler/CMakeLists.txt
+++ b/Tests/Assembler/CMakeLists.txt
@@ -1,26 +1,32 @@
cmake_minimum_required (VERSION 2.6)
-project(Assembler)
+project(Assembler C)
+message("CTEST_FULL_OUTPUT ")
+set(CMAKE_VERBOSE_MAKEFILE 1)
set(SRCS)
-# if no file has been set as source and we are on linux with an x86 processor try to use the gas/as assembler
-# main-linux-x86-gas.s seems to work for Linux and FreeBSD
-if(NOT SRCS AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86$")
- if(CMAKE_SYSTEM MATCHES Linux OR CMAKE_SYSTEM MATCHES FreeBSD)
- message(STATUS "Trying to enable ASM-ATT for Linux or FreeBSD on x86")
- enable_language(ASM-ATT OPTIONAL)
- if(CMAKE_ASM-ATT_COMPILER_WORKS)
- message(STATUS "Trying to enable ASM-ATT for Linux/x86 - succeeded")
- # this assembler file was created using gcc -S main.c
- set(SRCS main-linux-x86-gas.s)
- endif(CMAKE_ASM-ATT_COMPILER_WORKS)
- endif(CMAKE_SYSTEM MATCHES Linux OR CMAKE_SYSTEM MATCHES FreeBSD)
-endif(NOT SRCS AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86$")
+# (at least) the following toolchains can process assembler files directly
+# and also generate assembler files from C:
+if("${CMAKE_GENERATOR}" MATCHES "Makefile")
+ if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX))
+ set(C_FLAGS "${CMAKE_C_FLAGS}")
+ separate_arguments(C_FLAGS)
+ set(SRCS main.s)
+ add_custom_command(
+ OUTPUT main.s
+ COMMAND ${CMAKE_C_COMPILER} ${C_FLAGS} -S ${CMAKE_CURRENT_SOURCE_DIR}/main.c -o main.s
+ DEPENDS main.c
+ VERBATIM
+ )
+ endif(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX))
+endif("${CMAKE_GENERATOR}" MATCHES "Makefile")
-if(NOT SRCS)
+
+if(SRCS)
+ enable_language(ASM OPTIONAL)
+else(SRCS)
message(STATUS "No assembler enabled, using C")
set(SRCS main.c)
-endif(NOT SRCS)
+endif(SRCS)
add_executable(HelloAsm ${SRCS})
-set_target_properties(HelloAsm PROPERTIES LINKER_LANGUAGE C)
diff --git a/Tests/BundleTest/BundleLib.cxx b/Tests/BundleTest/BundleLib.cxx
index bab745e..b68ee25 100644
--- a/Tests/BundleTest/BundleLib.cxx
+++ b/Tests/BundleTest/BundleLib.cxx
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <Carbon/Carbon.h>
+#include <CoreFoundation/CoreFoundation.h>
int fileExists(char* filename)
{
@@ -51,7 +51,7 @@ int findBundleFile(char* exec, const char* file)
int foo(char *exec)
{
- // Call a "Carbon" function...
+ // Call a CoreFoundation function...
//
CFBundleRef br = CFBundleGetMainBundle();
(void) br;
diff --git a/Tests/BundleTest/BundleTest.cxx b/Tests/BundleTest/BundleTest.cxx
index 29d17db..a66d601 100644
--- a/Tests/BundleTest/BundleTest.cxx
+++ b/Tests/BundleTest/BundleTest.cxx
@@ -1,6 +1,6 @@
#include <stdio.h>
-#include <Carbon/Carbon.h>
+#include <CoreFoundation/CoreFoundation.h>
extern int foo(char* exec);
@@ -8,8 +8,8 @@ int main(int argc, char* argv[])
{
printf("Started with: %d arguments\n", argc);
- // Call a "Carbon" function... but pull in the link dependency on "-framework
- // Carbon" via CMake's dependency chaining mechanism. This code exists to
+ // Call a CoreFoundation function... but pull in the link dependency on "-framework
+ // CoreFoundation" via CMake's dependency chaining mechanism. This code exists to
// verify that the chaining mechanism works with "-framework blah" style
// link dependencies.
//
diff --git a/Tests/BundleTest/CMakeLists.txt b/Tests/BundleTest/CMakeLists.txt
index 5ccf2bf..5342f49 100644
--- a/Tests/BundleTest/CMakeLists.txt
+++ b/Tests/BundleTest/CMakeLists.txt
@@ -25,14 +25,14 @@ SET_SOURCE_FILES_PROPERTIES(
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")
# Test building a bundle linking to a shared library where the
-# shared library links to Carbon, but the executable does not
-# explicitly link to Carbon, but the executable does *depend*
-# on Carbon. There should be a link failure for the executable
+# shared library links to CoreFoundation, but the executable does not
+# explicitly link to CoreFoundation, but the executable does *depend*
+# on CoreFoundation. There should be a link failure for the executable
# if CMake's dependency chaining for libraries with "-framework
# blah" style dependencies gets broken...
#
ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)
-TARGET_LINK_LIBRARIES(BundleTestLib "-framework Carbon")
+TARGET_LINK_LIBRARIES(BundleTestLib "-framework CoreFoundation")
ADD_EXECUTABLE(BundleTest
MACOSX_BUNDLE
@@ -43,8 +43,8 @@ ADD_EXECUTABLE(BundleTest
)
TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)
#
-# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework Carbon")
-# (see above comments about Carbon)
+# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework CoreFoundation")
+# (see above comments about CoreFoundation)
#
# Test bundle installation.
diff --git a/Tests/CFBundleTest/CMakeLists.txt b/Tests/CFBundleTest/CMakeLists.txt
new file mode 100644
index 0000000..8fd9efd
--- /dev/null
+++ b/Tests/CFBundleTest/CMakeLists.txt
@@ -0,0 +1,56 @@
+#this is adapted from FireBreath (http://www.firebreath.org)
+
+cmake_minimum_required(VERSION 2.8)
+
+project(CFBundleTest)
+
+include(PluginConfig.cmake)
+
+message ("Creating Mac Browser Plugin project ${PROJECT_NAME}")
+set(SOURCES
+ np_macmain.cpp
+ Localized.r
+ ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
+ ${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings
+ ${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc
+)
+
+add_library( ${PROJECT_NAME} MODULE
+ ${SOURCES}
+ )
+
+set (RCFILES ${CMAKE_CURRENT_SOURCE_DIR}/Localized.r)
+
+configure_file(Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
+configure_file(InfoPlist.strings.in ${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings)
+
+# Compile the resource file
+find_program(RC_COMPILER Rez NO_DEFAULT_PATHS PATHS /Developer/Tools)
+if(NOT RC_COMPILER)
+ message(FATAL_ERROR "could not find Rez to build resources from .r file...")
+endif()
+
+execute_process(COMMAND
+ ${RC_COMPILER} ${RCFILES} -useDF -o ${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc
+ )
+
+set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc
+ PROPERTIES GENERATED 1
+ )
+# note that for some reason, the makefile and xcode generators use a different
+# property to indicate where the Info.plist file is :-/ For that reason, we
+# specify it twice so it will work both places
+set_target_properties(CFBundleTest PROPERTIES
+ BUNDLE 1
+ BUNDLE_EXTENSION plugin
+ XCODE_ATTRIBUTE_WRAPPER_EXTENSION plugin #sets the extension to .plugin
+ XCODE_ATTRIBUTE_MACH_O_TYPE mh_bundle
+ XCODE_ATTRIBUTE_INFOPLIST_FILE ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
+ LINK_FLAGS "-Wl,-exported_symbols_list,\"${CMAKE_CURRENT_SOURCE_DIR}/ExportList_plugin.txt\"")
+
+set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings
+ ${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc
+ PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/English.lproj")
diff --git a/Tests/CFBundleTest/ExportList_plugin.txt b/Tests/CFBundleTest/ExportList_plugin.txt
new file mode 100644
index 0000000..31d6f64
--- /dev/null
+++ b/Tests/CFBundleTest/ExportList_plugin.txt
@@ -0,0 +1,3 @@
+_NP_GetEntryPoints
+_NP_Initialize
+_NP_Shutdown
diff --git a/Tests/CFBundleTest/Info.plist.in b/Tests/CFBundleTest/Info.plist.in
new file mode 100644
index 0000000..638002f
--- /dev/null
+++ b/Tests/CFBundleTest/Info.plist.in
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${PLUGIN_NAME}</string>
+ <key>CFBundleGetInfoString</key>
+ <string>${PLUGIN_NAME} ${FBSTRING_PLUGIN_VERSION}, ${FBSTRING_LegalCopyright}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.${ACTIVEX_PROGID}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BRPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${PLUGIN_NAME} ${FBSTRING_PLUGIN_VERSION}</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>${FBSTRING_PLUGIN_VERSION}</string>
+ <key>CFPlugInDynamicRegisterFunction</key>
+ <string></string>
+ <key>CFPlugInDynamicRegistration</key>
+ <string>NO</string>
+ <key>CFPlugInFactories</key>
+ <dict>
+ <key>00000000-0000-0000-0000-000000000000</key>
+ <string>MyFactoryFunction</string>
+ </dict>
+ <key>CFPlugInTypes</key>
+ <dict>
+ <key>00000000-0000-0000-0000-000000000000</key>
+ <array>
+ <string>00000000-0000-0000-0000-000000000000</string>
+ </array>
+ </dict>
+ <key>CFPlugInUnloadFunction</key>
+ <string></string>
+ <key>WebPluginName</key>
+ <string>${FBSTRING_ProductName}</string>
+ <key>WebPluginDescription</key>
+ <string>${FBSTRING_FileDescription}</string>
+ <key>WebPluginMIMETypes</key>
+ <dict>
+ <key>${FBSTRING_MIMEType}</key>
+ <dict>
+ <key>WebPluginTypeDescription</key>
+ <string>${FBSTRING_FileDescription}</string>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/Tests/CFBundleTest/InfoPlist.strings.in b/Tests/CFBundleTest/InfoPlist.strings.in
new file mode 100644
index 0000000..790ead0
--- /dev/null
+++ b/Tests/CFBundleTest/InfoPlist.strings.in
@@ -0,0 +1,4 @@
+/* Localized versions of Info.plist keys */
+
+CFBundleName = "${PLUGIN_NAME}.plugin";
+NSHumanReadableCopyright = "${FBSTRING_LegalCopyright}";
diff --git a/Tests/CFBundleTest/Localized.r b/Tests/CFBundleTest/Localized.r
new file mode 100644
index 0000000..e988e26
--- /dev/null
+++ b/Tests/CFBundleTest/Localized.r
@@ -0,0 +1,18 @@
+#include <CoreServices/CoreServices.r>
+
+resource 'STR#' (126)
+{ {
+ "${FBSTRING_LegalCopyright}",
+ "${FBSTRING_ProductName}"
+} };
+
+resource 'STR#' (127)
+{ {
+ "${FBSTRING_FileDescription}"
+} };
+
+resource 'STR#' (128)
+{ {
+ "${FBSTRING_MIMEType}",
+ "${FBSTRING_FileExtents}"
+} };
diff --git a/Tests/CFBundleTest/Localized.rsrc b/Tests/CFBundleTest/Localized.rsrc
new file mode 100644
index 0000000..cbf3523
--- /dev/null
+++ b/Tests/CFBundleTest/Localized.rsrc
Binary files differ
diff --git a/Tests/CFBundleTest/PluginConfig.cmake b/Tests/CFBundleTest/PluginConfig.cmake
new file mode 100644
index 0000000..763ddcc
--- /dev/null
+++ b/Tests/CFBundleTest/PluginConfig.cmake
@@ -0,0 +1,21 @@
+#/**********************************************************\
+# Auto-Generated Plugin Configuration file
+# for CFTestPlugin
+#\**********************************************************/
+
+set(PLUGIN_NAME "CFTestPlugin")
+set(PLUGIN_PREFIX "CFTP")
+set(COMPANY_NAME "FBDevTeam")
+
+set(MOZILLA_PLUGINID "@firebreath.googlecode.com/CFTestPlugin")
+
+# strings
+set(FBSTRING_CompanyName "Firebreath Dev Team")
+set(FBSTRING_FileDescription "CFBundle Test Plugin - Plugin for testing cmake patch to improve FireBreath project generation")
+set(FBSTRING_PLUGIN_VERSION "1.0.0")
+set(FBSTRING_LegalCopyright "Copyright 2010 Firebreath Dev Team")
+set(FBSTRING_PluginFileName "np${PLUGIN_NAME}.dll")
+set(FBSTRING_ProductName "CFTestPlugin")
+set(FBSTRING_FileExtents "")
+set(FBSTRING_PluginName "CFTestPlugin")
+set(FBSTRING_MIMEType "application/x-fbtestplugin")
diff --git a/Tests/CFBundleTest/README.txt b/Tests/CFBundleTest/README.txt
new file mode 100644
index 0000000..248651b
--- /dev/null
+++ b/Tests/CFBundleTest/README.txt
@@ -0,0 +1,16 @@
+
+CFBundle test project. The generated .plugin/ bundle from either makefiles or XCode should look like this:
+
+./Contents
+./Contents/Info.plist
+./Contents/MacOS
+./Contents/MacOS/CFBundleTest
+./Contents/Resources
+./Contents/Resources/English.lproj
+./Contents/Resources/English.lproj/InfoPlist.strings
+./Contents/Resources/English.lproj/Localized.rsrc
+
+file Contents/MacOS/CFBundleTest should return something like:
+Contents/MacOS/CFBundleTest: Mach-O 64-bit bundle x86_64
+
+It is okay if it is a 32 bit binary; if it is not Mach-O, or is spelled differently, it is not okay.
diff --git a/Tests/CFBundleTest/VerifyResult.cmake b/Tests/CFBundleTest/VerifyResult.cmake
new file mode 100644
index 0000000..e622900
--- /dev/null
+++ b/Tests/CFBundleTest/VerifyResult.cmake
@@ -0,0 +1,32 @@
+if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
+ message(FATAL_ERROR "expected variable CTEST_CONFIGURATION_TYPE not defined")
+endif()
+
+if(NOT DEFINED dir)
+ message(FATAL_ERROR "expected variable dir not defined")
+endif()
+
+if(NOT DEFINED gen)
+ message(FATAL_ERROR "expected variable gen not defined")
+endif()
+
+message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'")
+message(STATUS "dir='${dir}'")
+message(STATUS "gen='${gen}'")
+
+if(gen MATCHES "Make" OR
+ "${CTEST_CONFIGURATION_TYPE}" STREQUAL "" OR
+ "${CTEST_CONFIGURATION_TYPE}" STREQUAL "." OR
+ "${CTEST_CONFIGURATION_TYPE}" STREQUAL "NoConfig")
+ set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
+else()
+ set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
+endif()
+
+if(NOT EXISTS "${expected_filename}")
+ message(FATAL_ERROR "test fails: expected output file does not exist [${expected_filename}]")
+endif()
+
+file(COPY "${expected_filename}"
+ DESTINATION "${dir}/LatestBuildResult"
+ )
diff --git a/Tests/CFBundleTest/np_macmain.cpp b/Tests/CFBundleTest/np_macmain.cpp
new file mode 100644
index 0000000..78004d0
--- /dev/null
+++ b/Tests/CFBundleTest/np_macmain.cpp
@@ -0,0 +1,49 @@
+/***********************************************************\
+ Written by: Richard Bateman (taxilian)
+
+ Based on the default np_macmain.cpp from FireBreath
+ http://firebreath.googlecode.com
+
+ This file has been stripped to prevent it from accidently
+ doing anything useful.
+\***********************************************************/
+
+
+#include <stdio.h>
+
+typedef void (*NPP_ShutdownProcPtr)(void);
+typedef short NPError;
+
+#pragma GCC visibility push(default)
+
+struct NPNetscapeFuncs;
+struct NPPluginFuncs;
+
+extern "C" {
+ NPError NP_Initialize(NPNetscapeFuncs *browserFuncs);
+ NPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);
+ NPError NP_Shutdown(void);
+}
+
+#pragma GCC visibility pop
+
+void initPluginModule()
+{
+}
+
+NPError NP_GetEntryPoints(NPPluginFuncs* pFuncs)
+{
+ printf("NP_GetEntryPoints()\n");
+ return 0;
+}
+
+NPError NP_Initialize(NPNetscapeFuncs* pFuncs)
+{
+ printf("NP_Initialize()\n");
+ return 0;
+}
+
+NPError NP_Shutdown()
+{
+ return 0;
+}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2c11919..6da06f6 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -566,6 +566,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
set(CPackRun_CPackCommand "-DCPackCommand=${CMAKE_CPACK_COMMAND}")
# set up list of CPack generators
list(APPEND GENLST "ZIP")
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
+ find_program(RPMBUILD NAMES rpmbuild)
+ endif(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
+ if (RPMBUILD)
+ list(APPEND GENLST "RPM")
+ endif(RPMBUILD)
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+ find_program(DPKG NAMES dpkg)
+ if (DPKG)
+ list(APPEND GENLST "DEB")
+ endif(DPKG)
+ endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
# set up list of component packaging ways
list(APPEND CWAYLST "default")
list(APPEND CWAYLST "OnePackPerGroup")
@@ -815,11 +827,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--test-command ${CMAKE_CTEST_COMMAND} -V
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProject")
- # The ExternalProject test takes 900 seconds on some machines!
- GET_TEST_PROPERTY(ExternalProject TIMEOUT PREVIOUS_TIMEOUT)
- IF("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
- SET_TESTS_PROPERTIES(ExternalProject PROPERTIES TIMEOUT 1000)
- ENDIF("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
+ SET_TESTS_PROPERTIES(ExternalProject PROPERTIES
+ TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
# do each of the tutorial steps
FOREACH(STP RANGE 1 7)
@@ -1002,6 +1011,22 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
SET_TESTS_PROPERTIES ( linkorder2 PROPERTIES DEPENDS linkorder1)
SET_TESTS_PROPERTIES ( SimpleInstall-Stage2 PROPERTIES DEPENDS SimpleInstall)
+ # Test static linking on toolchains known to support it.
+ IF("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU)$"
+ AND NOT APPLE AND NOT WIN32 AND NOT CYGWIN
+ AND EXISTS "/usr/lib/libm.a")
+ ADD_TEST(LinkStatic ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/LinkStatic"
+ "${CMake_BINARY_DIR}/Tests/LinkStatic"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project LinkStatic
+ --build-options -DMATH_LIBRARY:FILEPATH=/usr/lib/libm.a
+ --test-command LinkStatic
+ )
+ ENDIF()
+
IF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
ADD_TEST(kwsys ${CMAKE_CTEST_COMMAND}
--build-and-test
@@ -1082,8 +1107,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
IF(CMAKE_TEST_MSVC)
ADD_TEST_MACRO(ForceInclude foo)
ADD_TEST_MACRO(PrecompiledHeader foo)
+ ENDIF()
+ IF(CMAKE_TEST_MSVC OR
+ "${CMAKE_TEST_GENERATOR}" MATCHES "(MSYS|MinGW) Makefiles")
ADD_TEST_MACRO(ModuleDefinition example_exe)
- ENDIF(CMAKE_TEST_MSVC)
+ ENDIF()
ADD_TEST_MACRO(CheckCompilerRelatedVariables CheckCompilerRelatedVariables)
@@ -1144,6 +1172,21 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest")
+ ADD_TEST(CFBundleTest ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/CFBundleTest"
+ "${CMake_BINARY_DIR}/Tests/CFBundleTest"
+ --build-two-config
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project CFBundleTest
+ --test-command
+ ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE}
+ -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest
+ -Dgen=${CMAKE_TEST_GENERATOR}
+ -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake)
+ LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CFBundleTest")
+
ADD_TEST_MACRO(ObjC++ ObjC++)
ENDIF (APPLE AND CMAKE_COMPILER_IS_GNUCXX)
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index 8fd52df..cceef3b 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -33,6 +33,8 @@ set_property(TEST CMake.FileDownload PROPERTY
PASS_REGULAR_EXPRESSION "file already exists with expected MD5 sum"
)
+AddCMakeTest(FileUpload "")
+
if(HAVE_ELF_H)
AddCMakeTest(ELF "")
endif()
diff --git a/Tests/CMakeTests/FileDownloadTest.cmake.in b/Tests/CMakeTests/FileDownloadTest.cmake.in
index 578f510..9dc2ebb 100644
--- a/Tests/CMakeTests/FileDownloadTest.cmake.in
+++ b/Tests/CMakeTests/FileDownloadTest.cmake.in
@@ -37,5 +37,7 @@ file(DOWNLOAD
${url}
${dir}/file3.png
TIMEOUT 2
+ STATUS status
EXPECTED_MD5 d16778650db435bda3a8c3435c3ff5d1
)
+message(STATUS "${status}")
diff --git a/Tests/CMakeTests/FileTest.cmake.in b/Tests/CMakeTests/FileTest.cmake.in
index 721f311..b6dcaa6 100644
--- a/Tests/CMakeTests/FileTest.cmake.in
+++ b/Tests/CMakeTests/FileTest.cmake.in
@@ -27,7 +27,7 @@ check_cmake_test(File
# Also execute each test listed in FileTestScript.cmake:
#
set(scriptname "@CMAKE_CURRENT_SOURCE_DIR@/FileTestScript.cmake")
-set(number_of_tests_expected 56)
+set(number_of_tests_expected 62)
include("@CMAKE_CURRENT_SOURCE_DIR@/ExecuteScriptTests.cmake")
execute_all_script_tests(${scriptname} number_of_tests_executed)
diff --git a/Tests/CMakeTests/FileTestScript.cmake b/Tests/CMakeTests/FileTestScript.cmake
index c4e27bd..9a43569 100644
--- a/Tests/CMakeTests/FileTestScript.cmake
+++ b/Tests/CMakeTests/FileTestScript.cmake
@@ -201,6 +201,26 @@ elseif(testname STREQUAL download_with_bogus_protocol) # pass
message("l='${l}'")
message("s='${s}'")
+elseif(testname STREQUAL upload_wrong_number_of_args) # fail
+ file(UPLOAD ./ffff)
+
+elseif(testname STREQUAL upload_missing_time) # fail
+ file(UPLOAD ./ffff zzzz://bogus/ffff TIMEOUT)
+
+elseif(testname STREQUAL upload_missing_log_var) # fail
+ file(UPLOAD ./ffff zzzz://bogus/ffff TIMEOUT 2 LOG)
+
+elseif(testname STREQUAL upload_missing_status_var) # fail
+ file(UPLOAD ./ffff zzzz://bogus/ffff TIMEOUT 2 LOG l STATUS)
+
+elseif(testname STREQUAL upload_file_that_doesnt_exist) # fail
+ file(UPLOAD ./ffff zzzz://bogus/ffff)
+
+elseif(testname STREQUAL upload_with_bogus_protocol) # pass
+ file(UPLOAD ${CMAKE_CURRENT_LIST_FILE} zzzz://bogus/ffff TIMEOUT 2 LOG l STATUS s)
+ message("l='${l}'")
+ message("s='${s}'")
+
else() # fail
message(FATAL_ERROR "testname='${testname}' - error: no such test in '${CMAKE_CURRENT_LIST_FILE}'")
diff --git a/Tests/CMakeTests/FileUploadTest.cmake.in b/Tests/CMakeTests/FileUploadTest.cmake.in
new file mode 100644
index 0000000..8577aef
--- /dev/null
+++ b/Tests/CMakeTests/FileUploadTest.cmake.in
@@ -0,0 +1,49 @@
+file(REMOVE_RECURSE "@CMAKE_CURRENT_BINARY_DIR@/uploads")
+
+if(EXISTS "@CMAKE_CURRENT_BINARY_DIR@/uploads/file1.png")
+ message(FATAL_ERROR "error: file1.png exists - should have been deleted")
+endif()
+if(EXISTS "@CMAKE_CURRENT_BINARY_DIR@/uploads/file2.png")
+ message(FATAL_ERROR "error: file2.png exists - should have been deleted")
+endif()
+
+file(MAKE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/uploads")
+
+set(filename "@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png")
+set(urlbase "file://@CMAKE_CURRENT_BINARY_DIR@/uploads")
+
+message(STATUS "FileUpload:1")
+file(UPLOAD
+ ${filename}
+ ${urlbase}/file1.png
+ TIMEOUT 2
+ )
+
+message(STATUS "FileUpload:2")
+file(UPLOAD
+ ${filename}
+ ${urlbase}/file2.png
+ STATUS status
+ LOG log
+ SHOW_PROGRESS
+ )
+
+execute_process(COMMAND ${CMAKE_COMMAND} -E md5sum
+ "@CMAKE_CURRENT_BINARY_DIR@/uploads/file1.png"
+ OUTPUT_VARIABLE sum1
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+if(NOT sum1 MATCHES "^d16778650db435bda3a8c3435c3ff5d1 .*/uploads/file1.png$")
+ message(FATAL_ERROR "file1.png did not upload correctly (sum1='${sum1}')")
+endif()
+
+execute_process(COMMAND ${CMAKE_COMMAND} -E md5sum
+ "@CMAKE_CURRENT_BINARY_DIR@/uploads/file2.png"
+ OUTPUT_VARIABLE sum2
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+if(NOT sum2 MATCHES "^d16778650db435bda3a8c3435c3ff5d1 .*/uploads/file2.png$")
+ message(FATAL_ERROR "file2.png did not upload correctly (sum2='${sum2}')")
+endif()
+
+message(STATUS "log='${log}'")
+message(STATUS "status='${status}'")
+message(STATUS "DONE")
diff --git a/Tests/CMakeTests/StringTest.cmake.in b/Tests/CMakeTests/StringTest.cmake.in
index 54fee7f..6bb60f4 100644
--- a/Tests/CMakeTests/StringTest.cmake.in
+++ b/Tests/CMakeTests/StringTest.cmake.in
@@ -1,7 +1,7 @@
# Execute each test listed in StringTestScript.cmake:
#
set(scriptname "@CMAKE_CURRENT_SOURCE_DIR@/StringTestScript.cmake")
-set(number_of_tests_expected 52)
+set(number_of_tests_expected 69)
include("@CMAKE_CURRENT_SOURCE_DIR@/ExecuteScriptTests.cmake")
execute_all_script_tests(${scriptname} number_of_tests_executed)
diff --git a/Tests/CMakeTests/StringTestScript.cmake b/Tests/CMakeTests/StringTestScript.cmake
index 3703856..7a264a0 100644
--- a/Tests/CMakeTests/StringTestScript.cmake
+++ b/Tests/CMakeTests/StringTestScript.cmake
@@ -194,6 +194,85 @@ elseif(testname STREQUAL random_with_various_alphabets) # pass
string(RANDOM LENGTH 78 ALPHABET "~`!@#$%^&*()_-+={}[]\\|:\\;'\",.<>/?" v)
message(STATUS "v='${v}'")
+ message(STATUS "CMAKE_SCRIPT_MODE_FILE='${CMAKE_SCRIPT_MODE_FILE}'")
+
+elseif(testname STREQUAL string_find_with_no_parameter) # fail
+ string(FIND)
+
+elseif(testname STREQUAL string_find_with_one_parameter) # fail
+ string(FIND "CMake is great.")
+
+elseif(testname STREQUAL string_find_with_two_parameters) # fail
+ string(FIND "CMake is great." "a")
+
+elseif(testname STREQUAL string_find_with_three_parameters) # pass
+ string(FIND "CMake is great." "a" v)
+ message(STATUS "v='${v}'")
+
+elseif(testname STREQUAL string_find_with_four_parameters) # fail
+ string(FIND "CMake is great." "a" v v2)
+
+elseif(testname STREQUAL string_find_reverse_with_no_parameter) # fail
+ string(FIND REVERSE)
+
+elseif(testname STREQUAL string_find_reverse_with_one_parameter) # fail
+ string(FIND "CMake is great." REVERSE)
+
+elseif(testname STREQUAL string_find_reverse_with_two_parameters) # fail
+ string(FIND "CMake is great." "a" REVERSE)
+
+elseif(testname STREQUAL string_find_reverse_with_three_parameters) # pass
+ string(FIND "CMake is great." "a" v REVERSE)
+ message(STATUS "v='${v}'")
+
+elseif(testname STREQUAL string_find_reverse_with_four_parameters_part1) # fail
+ string(FIND "CMake is great." "a" v v2 REVERSE)
+
+elseif(testname STREQUAL string_find_reverse_with_four_parameters_part2) # fail
+ string(FIND "CMake is great." "a" v REVERSE v2)
+
+elseif(testname STREQUAL string_find_with_no_possible_result) # pass
+ string(FIND "CMake is a great application." "z" v)
+ message(STATUS "v='${v}'")
+ if(NOT(-1 EQUAL ${v}))
+ message(SEND_ERROR "FIND sub-command should return -1 but returned ${v}.")
+ endif(NOT(-1 EQUAL ${v}))
+
+elseif(testname STREQUAL string_find_reverse_with_no_possible_result) # pass
+ string(FIND "CMake is a great application." "z" v REVERSE)
+ message(STATUS "v='${v}'")
+ if(NOT(-1 EQUAL ${v}))
+ message(SEND_ERROR "FIND REVERSE sub-command should return -1 but returned ${v}.")
+ endif(NOT(-1 EQUAL ${v}))
+
+elseif(testname STREQUAL string_find_with_required_result) # pass
+ string(FIND "CMake is a great application." "g" v)
+ message(STATUS "v='${v}'")
+ if(NOT(11 EQUAL ${v}))
+ message(SEND_ERROR "FIND sub-command should return 11 but returned ${v}.")
+ endif(NOT(11 EQUAL ${v}))
+
+elseif(testname STREQUAL string_find_reverse_with_required_result) # pass
+ string(FIND "CMake is a great application." "e" v REVERSE)
+ message(STATUS "v='${v}'")
+ if(NOT(13 EQUAL ${v}))
+ message(SEND_ERROR "FIND REVERSE sub-command should return 13 but returned ${v}.")
+ endif(NOT(13 EQUAL ${v}))
+
+elseif(testname STREQUAL string_find_word_reverse_with_required_result) # pass
+ string(FIND "The command should find REVERSE in this string. Or maybe this REVERSE?!" "REVERSE" v)
+ message(STATUS "v='${v}'")
+ if(NOT(24 EQUAL ${v}))
+ message(SEND_ERROR "FIND sub-command should return 24 but returned ${v}.")
+ endif(NOT(24 EQUAL ${v}))
+
+elseif(testname STREQUAL string_find_reverse_word_reverse_with_required_result) # pass
+ string(FIND "The command should find REVERSE in this string. Or maybe this REVERSE?!" "REVERSE" v REVERSE)
+ message(STATUS "v='${v}'")
+ if(NOT(62 EQUAL ${v}))
+ message(SEND_ERROR "FIND sub-command should return 62 but returned ${v}.")
+ endif(NOT(62 EQUAL ${v}))
+
else() # fail
message(FATAL_ERROR "testname='${testname}' - error: no such test in '${CMAKE_CURRENT_LIST_FILE}'")
diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt
index bcec509..ce12b3b 100644
--- a/Tests/CPackComponentsForAll/CMakeLists.txt
+++ b/Tests/CPackComponentsForAll/CMakeLists.txt
@@ -10,6 +10,14 @@
cmake_minimum_required(VERSION 2.8.3.20101130 FATAL_ERROR)
project(CPackComponentsForAll)
+set(LIBDEST "lib")
+include(${CMAKE_SOURCE_DIR}/SystemSpecificInformations.cmake)
+if(DISTRO_ID MATCHES "SUSE")
+ if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
+ set(LIBDEST "lib64")
+ endif("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
+endif(DISTRO_ID MATCHES "SUSE")
+
# Create the mylib library
add_library(mylib mylib.cpp)
@@ -27,7 +35,7 @@ target_link_libraries(mylibapp2 mylib)
# be used to create the installation components.
install(TARGETS mylib
ARCHIVE
- DESTINATION lib
+ DESTINATION ${LIBDEST}
COMPONENT libraries)
install(TARGETS mylibapp
RUNTIME
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in
index 3a7119e..85626be 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in
@@ -9,6 +9,10 @@ if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "RPM")
+if(CPACK_GENERATOR MATCHES "DEB")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "DEB")
+
#
# Choose grouping way
#
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in
index 9a40293..1d203c8 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in
@@ -9,6 +9,10 @@ if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "RPM")
+if(CPACK_GENERATOR MATCHES "DEB")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "DEB")
+
#
# Choose grouping way
#
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
index 92a97a5..d82943f 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
@@ -9,6 +9,10 @@ if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "RPM")
+if(CPACK_GENERATOR MATCHES "DEB")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "DEB")
+
#
# Choose grouping way
#
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
index 4180891..7b665b6 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
@@ -9,6 +9,10 @@ if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "RPM")
+if(CPACK_GENERATOR MATCHES "DEB")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "DEB")
+
#
# Choose grouping way
#
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index d5137bd..ae0ee1a 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -30,19 +30,8 @@ set(config_type $ENV{CMAKE_CONFIG_TYPE})
set(config_args )
if(config_type)
set(config_args -C ${config_type})
-endif()
-message(" ${config_args}")
-execute_process(COMMAND ${CPackCommand} -G ${CPackGen} ${config_args}
- RESULT_VARIABLE CPack_result
- OUTPUT_VARIABLE CPack_output
- ERROR_VARIABLE CPack_error
- WORKING_DIRECTORY ${CPackComponentsForAll_BINARY_DIR})
-
-if (CPack_result)
- message(FATAL_ERROR "error: CPack execution went wrong!, CPack_output=${CPack_output}, CPack_error=${CPack_error}")
-else (CPack_result)
- message(STATUS "CPack_output=${CPack_output}")
-endif(CPack_result)
+endif(config_type)
+set(config_verbose )
if(CPackGen MATCHES "ZIP")
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.zip")
@@ -50,6 +39,24 @@ if(CPackGen MATCHES "ZIP")
set(expected_count 1)
endif(${CPackComponentWay} STREQUAL "default")
if (${CPackComponentWay} STREQUAL "OnePackPerGroup")
+ set(expected_count 3)
+ endif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
+ if (${CPackComponentWay} STREQUAL "IgnoreGroup")
+ set(expected_count 4)
+ endif (${CPackComponentWay} STREQUAL "IgnoreGroup")
+ if (${CPackComponentWay} STREQUAL "AllInOne")
+ set(expected_count 1)
+ endif (${CPackComponentWay} STREQUAL "AllInOne")
+ if (${CPackComponentWay} STREQUAL "AllGroupsInOne")
+ set(expected_count 1)
+ endif (${CPackComponentWay} STREQUAL "AllGroupsInOne")
+elseif (CPackGen MATCHES "RPM")
+ set(config_verbose -D "CPACK_RPM_PACKAGE_DEBUG=1")
+ set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.rpm")
+ if (${CPackComponentWay} STREQUAL "default")
+ set(expected_count 1)
+ endif (${CPackComponentWay} STREQUAL "default")
+ if (${CPackComponentWay} STREQUAL "OnePackPerGroup")
set(expected_count 2)
endif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
if (${CPackComponentWay} STREQUAL "IgnoreGroup")
@@ -63,6 +70,28 @@ if(CPackGen MATCHES "ZIP")
endif (${CPackComponentWay} STREQUAL "AllGroupsInOne")
endif(CPackGen MATCHES "ZIP")
+# clean-up previously CPack generated files
+if(expected_file_mask)
+ file(GLOB expected_file "${expected_file_mask}")
+ if (expected_file)
+ file(REMOVE ${expected_file})
+ endif(expected_file)
+endif(expected_file_mask)
+
+message("config_args = ${config_args}")
+message("config_verbose = ${config_verbose}")
+execute_process(COMMAND ${CPackCommand} ${config_verbose} -G ${CPackGen} ${config_args}
+ RESULT_VARIABLE CPack_result
+ OUTPUT_VARIABLE CPack_output
+ ERROR_VARIABLE CPack_error
+ WORKING_DIRECTORY ${CPackComponentsForAll_BINARY_DIR})
+
+if (CPack_result)
+ message(FATAL_ERROR "error: CPack execution went wrong!, CPack_output=${CPack_output}, CPack_error=${CPack_error}")
+else (CPack_result)
+ message(STATUS "CPack_output=${CPack_output}")
+endif(CPack_result)
+
# Now verify if the number of expected file is OK
# - using expected_file_mask and
# - expected_count
diff --git a/Tests/CPackComponentsForAll/SystemSpecificInformations.cmake b/Tests/CPackComponentsForAll/SystemSpecificInformations.cmake
new file mode 100644
index 0000000..8d11400
--- /dev/null
+++ b/Tests/CPackComponentsForAll/SystemSpecificInformations.cmake
@@ -0,0 +1,164 @@
+
+# define a set of string with may-be useful readable name
+# this file is meant to be included in a CMakeLists.txt
+# not as a standalone CMake script
+set(SPECIFIC_COMPILER_NAME "")
+set(SPECIFIC_SYSTEM_VERSION_NAME "")
+set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "")
+
+# In the WIN32 case try to guess a "readable system name"
+if(WIN32)
+ set(SPECIFIC_SYSTEM_PREFERED_PACKAGE "NSIS")
+ # information taken from
+ # http://www.codeguru.com/cpp/w-p/system/systeminformation/article.php/c8973/
+ # Win9x series
+ if(CMAKE_SYSTEM_VERSION MATCHES "4.0")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "Win95")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "4.0")
+ if(CMAKE_SYSTEM_VERSION MATCHES "4.10")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "Win98")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "4.10")
+ if(CMAKE_SYSTEM_VERSION MATCHES "4.90")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "WinME")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "4.90")
+
+ # WinNTyyy series
+ if(CMAKE_SYSTEM_VERSION MATCHES "3.0")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "WinNT351")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "3.0")
+ if(CMAKE_SYSTEM_VERSION MATCHES "4.1")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "WinNT4")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "4.1")
+
+ # Win2000/XP series
+ if(CMAKE_SYSTEM_VERSION MATCHES "5.0")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "Win2000")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "5.0")
+ if(CMAKE_SYSTEM_VERSION MATCHES "5.1")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "WinXP")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "5.1")
+ if(CMAKE_SYSTEM_VERSION MATCHES "5.2")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "Win2003")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "5.2")
+
+ # WinVista/7 series
+ if(CMAKE_SYSTEM_VERSION MATCHES "6.0")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "WinVISTA")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "6.0")
+ if(CMAKE_SYSTEM_VERSION MATCHES "6.1")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "Win7")
+ endif(CMAKE_SYSTEM_VERSION MATCHES "6.1")
+
+ # Compilers
+ # taken from http://predef.sourceforge.net/precomp.html#sec34
+ if(MSVC)
+ set(SPECIFIC_COMPILER_NAME "MSVC-Unknown-${MSVC_VERSION}")
+ if(MSVC_VERSION EQUAL 1200)
+ set(SPECIFIC_COMPILER_NAME "MSVC-6.0")
+ endif(MSVC_VERSION EQUAL 1200)
+ if(MSVC_VERSION EQUAL 1300)
+ set(SPECIFIC_COMPILER_NAME "MSVC-7.0")
+ endif(MSVC_VERSION EQUAL 1300)
+ if(MSVC_VERSION EQUAL 1310)
+ set(SPECIFIC_COMPILER_NAME "MSVC-7.1-2003") #Visual Studio 2003
+ endif(MSVC_VERSION EQUAL 1310)
+ if(MSVC_VERSION EQUAL 1400)
+ set(SPECIFIC_COMPILER_NAME "MSVC-8.0-2005") #Visual Studio 2005
+ endif(MSVC_VERSION EQUAL 1400)
+ if(MSVC_VERSION EQUAL 1500)
+ set(SPECIFIC_COMPILER_NAME "MSVC-9.0-2008") #Visual Studio 2008
+ endif(MSVC_VERSION EQUAL 1500)
+ if(MSVC_VERSION EQUAL 1600)
+ set(SPECIFIC_COMPILER_NAME "MSVC-10.0-2010") #Visual Studio 2010
+ endif(MSVC_VERSION EQUAL 1600)
+ endif(MSVC)
+ if(MINGW)
+ set(SPECIFIC_COMPILER_NAME "MinGW")
+ endif(MINGW)
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "${SPECIFIC_SYSTEM_VERSION_NAME}-x86_64")
+ endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
+endif(WIN32)
+
+# In the Linux case try to guess the distro name/type
+# using either lsb_release program or fallback
+# to the content of the /etc/issue file
+if(UNIX)
+ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ set(SPECIFIC_SYSTEM_VERSION_NAME "${CMAKE_SYSTEM_NAME}")
+ set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "TGZ")
+ find_program(LSB_RELEASE_EXECUTABLE lsb_release)
+ if(LSB_RELEASE_EXECUTABLE)
+ execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -i
+ OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REGEX MATCH "Distributor ID:(.*)" DISTRO_ID ${_TMP_LSB_RELEASE_OUTPUT})
+ string(STRIP "${CMAKE_MATCH_1}" DISTRO_ID)
+ # replace potential space with underscore
+ string(REPLACE " " "_" DISTRO_ID "${DISTRO_ID}")
+ execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -r
+ OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REGEX MATCH "Release:(.*)" DISTRO_RELEASE ${_TMP_LSB_RELEASE_OUTPUT})
+ string(STRIP "${CMAKE_MATCH_1}" DISTRO_RELEASE)
+ execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -c
+ OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REGEX MATCH "Codename:(.*)" DISTRO_CODENAME ${_TMP_LSB_RELEASE_OUTPUT})
+ string(STRIP "${CMAKE_MATCH_1}" DISTRO_CODENAME)
+ elseif (EXISTS "/etc/issue")
+ set(LINUX_NAME "")
+ file(READ "/etc/issue" LINUX_ISSUE)
+ # Fedora case
+ if(LINUX_ISSUE MATCHES "Fedora")
+ string(REGEX MATCH "release ([0-9]+)" FEDORA "${LINUX_ISSUE}")
+ set(DISTRO_ID "Fedora")
+ set(DISTRO_RELEASE "${CMAKE_MATCH_1}")
+ # FIXME can we find that in /etc/issue
+ set(DISTRO_CODENAME "")
+ endif(LINUX_ISSUE MATCHES "Fedora")
+ # Ubuntu case
+ if(LINUX_ISSUE MATCHES "Ubuntu")
+ string(REGEX MATCH "buntu ([0-9]+\\.[0-9]+)" UBUNTU "${LINUX_ISSUE}")
+ set(DISTRO_ID "Ubuntu")
+ set(DISTRO_RELEASE "${CMAKE_MATCH_1}")
+ # FIXME can we find that in /etc/issue
+ set(DISTRO_CODENAME "")
+ endif(LINUX_ISSUE MATCHES "Ubuntu")
+ # Debian case
+ if(LINUX_ISSUE MATCHES "Debian")
+ string(REGEX MATCH "Debian .*ux ([0-9]+\\.[0-9]+)"
+ DEBIAN "${LINUX_ISSUE}")
+ set(DISTRO_ID "Debian")
+ set(DISTRO_RELEASE "${CMAKE_MATCH_1}")
+ set(DISTRO_CODENAME "")
+ endif(LINUX_ISSUE MATCHES "Debian")
+ # Open SuSE case
+ if(LINUX_ISSUE MATCHES "SUSE")
+ string(REGEX MATCH "SUSE ([0-9]+\\.[0-9]+)" SUSE "${LINUX_ISSUE}")
+ set(DISTRO_ID "SUSE")
+ set(DISTRO_RELEASE "${CMAKE_MATCH_1}")
+ set(DISTRO_CODENAME "")
+ endif(LINUX_ISSUE MATCHES "SUSE")
+ # Mandriva case
+ # TODO
+ endif(LSB_RELEASE_EXECUTABLE)
+ # Now mangle some names
+ set(LINUX_NAME "${DISTRO_ID}_${DISTRO_RELEASE}")
+ if(DISTRO_ID MATCHES "Fedora|Mandriva|SUSE|OpenSUSE")
+ set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "RPM")
+ endif(DISTRO_ID MATCHES "Fedora|Mandriva|SUSE|OpenSUSE")
+ if(DISTRO_ID MATCHES "Debian|Ubuntu")
+ set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "DEB")
+ endif(DISTRO_ID MATCHES "Debian|Ubuntu")
+ if(LINUX_NAME)
+ set(SPECIFIC_SYSTEM_VERSION_NAME "${CMAKE_SYSTEM_NAME}-${LINUX_NAME}")
+ endif(LINUX_NAME)
+ endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ set(SPECIFIC_SYSTEM_VERSION_NAME
+ "${SPECIFIC_SYSTEM_VERSION_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
+ set(SPECIFIC_COMPILER_NAME "")
+endif(UNIX)
diff --git a/Tests/CTestTest3/test.cmake.in b/Tests/CTestTest3/test.cmake.in
deleted file mode 100644
index 1e8ea50..0000000
--- a/Tests/CTestTest3/test.cmake.in
+++ /dev/null
@@ -1,120 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.1)
-
-MACRO(PROJECT_START NAME)
- MESSAGE("###################################################")
- MESSAGE("")
- MESSAGE("Start project: ${NAME}")
- MESSAGE("")
- MESSAGE("###################################################")
-ENDMACRO(PROJECT_START)
-
-# Project 1
-PROJECT_START("KWSys from CVS")
-
-# Settings:
-SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest3")
-SET(CTEST_SITE "@SITE@")
-SET(CTEST_BUILD_NAME "KWSys-@BUILDNAME@-CTest3-CVS")
-
-# ---
-SET(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CVS/KWSys")
-SET(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CVS/KWSysBin")
-SET(CTEST_UPDATE_COMMAND "@CVSCOMMAND@")
-SET(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
-SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
-# for unix purify has to be used as a linker, and
-# will not work with ctest. So disable it so
-# that it is not attempted.
-IF(UNIX)
- IF("${CTEST_MEMORYCHECK_COMMAND}" MATCHES purify)
- SET(CTEST_MEMORYCHECK_COMMAND)
- ENDIF()
-ENDIF()
-SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
-SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
-SET(CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" -q -z3 \"-d:pserver:anoncvs@www.cmake.org:/cvsroot/KWSys\" co -r CTest-Testing-Tag KWSys")
-
-CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
-
-FILE(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
-CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@
-CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@
-CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@
-CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@
-CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@
-CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@
-
-# This one is needed for testing advanced ctest features
-CTEST_TEST_KWSYS:BOOL=ON
-")
-
-SET(CTEST_CUSTOM_WARNING_MATCH CommandLineArguments)
-
-CTEST_START(Nightly)
-CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
-CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-CTEST_READ_CUSTOM_FILES("${CTEST_BINARY_DIRECTORY}")
-CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL 5 SCHEDULE_RANDOM ON)
-CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-
-set(CTEST_DROP_METHOD "@protocol@")
-set(CTEST_DROP_SITE "@server@")
-set(CTEST_DROP_LOCATION "@path@/submit.php?project=PublicDashboard")
-
-CTEST_SUBMIT(RETURN_VALUE res)
-
-#SET(svncommand "@SVNCOMMAND@")
-set(svncommand FALSE) # turn this off until namic svn cmake is back
-IF(svncommand)
- # Project 2
- PROJECT_START("KWSys from SVN")
-
- # Settings:
- SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest3")
- SET(CTEST_SITE "@SITE@")
- SET(CTEST_BUILD_NAME "KWSys-@BUILDNAME@-CTest3-SVN")
-
- # ---
- SET(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/SVN/kwsys")
- SET(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/SVN/kwsysBin")
- SET(CTEST_UPDATE_COMMAND "@SVNCOMMAND@")
- SET(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
- SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
- SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
- SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
- SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
- SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
- SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
- SET(CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" co \"http://svn.na-mic.org:8000/svn/CMake/Source/kwsys/\" -r 500")
-
- CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
-
- FILE(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
- CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@
- CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@
- CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@
- CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@
- CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@
- CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@
-
- # This one is needed for testing advanced ctest features
- CTEST_TEST_KWSYS:BOOL=ON
- ")
-
- CTEST_START(Experimental)
- CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
- CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
- CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
- CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL 5 SCHEDULE_RANDOM ON)
- CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL 5)
- CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
- CTEST_SUBMIT(RETURN_VALUE res)
-
-ELSE(svncommand)
- MESSAGE("Cannot find SVN command: ${svncommand}")
-ENDIF(svncommand)
diff --git a/Tests/CTestTestBadExe/test.cmake.in b/Tests/CTestTestBadExe/test.cmake.in
index 743e835..5d22d35 100644
--- a/Tests/CTestTestBadExe/test.cmake.in
+++ b/Tests/CTestTestBadExe/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestBadEx
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in
index c3c41a5..8413544 100644
--- a/Tests/CTestTestChecksum/test.cmake.in
+++ b/Tests/CTestTestChecksum/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParal
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestCostSerial/test.cmake.in b/Tests/CTestTestCostSerial/test.cmake.in
index ce4d60a..ca216e3 100644
--- a/Tests/CTestTestCostSerial/test.cmake.in
+++ b/Tests/CTestTestCostSerial/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCostS
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestCrash/test.cmake.in b/Tests/CTestTestCrash/test.cmake.in
index 259c8659..5cec594 100644
--- a/Tests/CTestTestCrash/test.cmake.in
+++ b/Tests/CTestTestCrash/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCrash
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in
index a17adca..201f604 100644
--- a/Tests/CTestTestCycle/test.cmake.in
+++ b/Tests/CTestTestCycle/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCycle
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in
index ed4e182..36a1ebf 100644
--- a/Tests/CTestTestDepends/test.cmake.in
+++ b/Tests/CTestTestDepends/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestDepen
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestFailedSubmits/test.cmake.in b/Tests/CTestTestFailedSubmits/test.cmake.in
index 9b581eb..b0e1632 100644
--- a/Tests/CTestTestFailedSubmits/test.cmake.in
+++ b/Tests/CTestTestFailedSubmits/test.cmake.in
@@ -22,9 +22,6 @@ SET(CTEST_BINARY_DIRECTORY "@build@")
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
@@ -39,7 +36,6 @@ CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}"
RETURN_VALUE res)
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}" @ctest_coverage_labels_args@ RETURN_VALUE res)
# ok to call ctest_submit - still avoids network activity because there is
diff --git a/Tests/CTestTestFailure/testNoBuild.cmake.in b/Tests/CTestTestFailure/testNoBuild.cmake.in
index b0bb039..7bc921a 100644
--- a/Tests/CTestTestFailure/testNoBuild.cmake.in
+++ b/Tests/CTestTestFailure/testNoBuild.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFailu
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestFailure/testNoExe.cmake.in b/Tests/CTestTestFailure/testNoExe.cmake.in
index 69d4f84..59c18d7 100644
--- a/Tests/CTestTestFailure/testNoExe.cmake.in
+++ b/Tests/CTestTestFailure/testNoExe.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFailu
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestParallel/test.cmake.in b/Tests/CTestTestParallel/test.cmake.in
index 6ca15f6..83845de 100644
--- a/Tests/CTestTestParallel/test.cmake.in
+++ b/Tests/CTestTestParallel/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParal
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestResourceLock/test.cmake.in b/Tests/CTestTestResourceLock/test.cmake.in
index 0f353b8..98c5901 100644
--- a/Tests/CTestTestResourceLock/test.cmake.in
+++ b/Tests/CTestTestResourceLock/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestResou
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestScheduler/test.cmake.in b/Tests/CTestTestScheduler/test.cmake.in
index 2a91829..505bd7c 100644
--- a/Tests/CTestTestScheduler/test.cmake.in
+++ b/Tests/CTestTestScheduler/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSched
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in
index 6a5534e..2d03686 100644
--- a/Tests/CTestTestStopTime/test.cmake.in
+++ b/Tests/CTestTestStopTime/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestStopT
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestSubdir/test.cmake.in b/Tests/CTestTestSubdir/test.cmake.in
index c8d4fda..f240473 100644
--- a/Tests/CTestTestSubdir/test.cmake.in
+++ b/Tests/CTestTestSubdir/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSubdi
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestTimeout/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in
index 6ed11a4..8a8dc24 100644
--- a/Tests/CTestTestTimeout/test.cmake.in
+++ b/Tests/CTestTestTimeout/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestTimeo
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
diff --git a/Tests/CTestTestZeroTimeout/test.cmake.in b/Tests/CTestTestZeroTimeout/test.cmake.in
index 0ff32a4..56bae9d 100644
--- a/Tests/CTestTestZeroTimeout/test.cmake.in
+++ b/Tests/CTestTestZeroTimeout/test.cmake.in
@@ -10,9 +10,6 @@ SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestZeroT
SET(CTEST_CVS_COMMAND "@CVSCOMMAND@")
SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
-SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
-SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
SET(CTEST_TEST_TIMEOUT 2)
diff --git a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt
index 57cb712..36d32e4 100644
--- a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt
+++ b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt
@@ -9,8 +9,8 @@ ADD_CUSTOM_COMMAND(
)
SET_SOURCE_FILES_PROPERTIES(
- "${TestWorkingDir_BINARY_DIR}/working.c"
- "${TestWorkingDir_BINARY_DIR}/customTarget.c"
+ "${TestWorkingDir_BINARY_DIR}/customTarget.c"
+ "${TestWorkingDir_BINARY_DIR}/customTarget2.c"
PROPERTIES GENERATED 1)
ADD_EXECUTABLE(working "${TestWorkingDir_BINARY_DIR}/working.c"
@@ -23,3 +23,20 @@ ADD_CUSTOM_TARGET(
)
ADD_DEPENDENCIES(working Custom)
+
+file(MAKE_DIRECTORY ${TestWorkingDir_BINARY_DIR}/work)
+add_custom_command(
+ OUTPUT working2.c # Relative to build tree
+ COMMAND "${CMAKE_COMMAND}" -E copy ${TestWorkingDir_SOURCE_DIR}/working.c.in ../working2.c
+ DEPENDS ${TestWorkingDir_SOURCE_DIR}/working.c.in/ # trailing slash should be removed
+ WORKING_DIRECTORY work/ # Relative to build tree, trailing slash
+ )
+add_executable(working2 working2.c ${TestWorkingDir_BINARY_DIR}/customTarget2.c)
+
+add_custom_target(
+ Custom2 ALL
+ COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${TestWorkingDir_SOURCE_DIR}/customTarget.c ../customTarget2.c
+ WORKING_DIRECTORY work/ # Relative to build tree, trailing slash
+)
+
+add_dependencies(working2 Custom2)
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 04563ef..c68d543 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -22,8 +22,19 @@ elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
endif()
endif()
+# Pick a module .def file with the properly mangled symbol name.
+set(world_def "")
+if(WIN32 AND NOT CYGWIN)
+ if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ set(world_def world_gnu.def)
+ elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel" OR
+ "${CMAKE_GENERATOR}" MATCHES "Visual Studio") # Intel plugin
+ set(world_def world_icl.def)
+ endif()
+endif()
+
add_library(hello STATIC hello.f)
-add_library(world ${_SHARED} world.f world.def)
+add_library(world ${_SHARED} world.f ${world_def})
add_executable(testf testf.f)
target_link_libraries(testf hello world)
diff --git a/Tests/Fortran/world_gnu.def b/Tests/Fortran/world_gnu.def
new file mode 100644
index 0000000..1617798
--- /dev/null
+++ b/Tests/Fortran/world_gnu.def
@@ -0,0 +1,2 @@
+EXPORTS
+ world_
diff --git a/Tests/Fortran/world.def b/Tests/Fortran/world_icl.def
index ead7710..ead7710 100644
--- a/Tests/Fortran/world.def
+++ b/Tests/Fortran/world_icl.def
diff --git a/Tests/LinkStatic/CMakeLists.txt b/Tests/LinkStatic/CMakeLists.txt
new file mode 100644
index 0000000..2062c43
--- /dev/null
+++ b/Tests/LinkStatic/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 2.8.4.20110303 FATAL_ERROR)
+project(LinkStatic C)
+
+if(NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU)$")
+ message(FATAL_ERROR "This test works only with the GNU compiler!")
+endif()
+
+find_library(MATH_LIBRARY NAMES libm.a)
+if(MATH_LIBRARY)
+ get_filename_component(MATH_LIB_DIR ${MATH_LIBRARY} PATH)
+ link_directories(${MATH_LIB_DIR})
+ # Name the library both with a full path and as "-lm" to
+ # activate the link type switching code for both cases.
+ # If the second one links shared then the link will fail.
+ set(MATH_LIBRARIES ${MATH_LIBRARY} -lm)
+else()
+ message(FATAL_ERROR "Cannot find libm.a needed for this test")
+endif()
+
+add_executable(LinkStatic LinkStatic.c)
+target_link_libraries(LinkStatic ${MATH_LIBRARIES})
+
+# Enable static linking.
+set(LinkStatic_FLAG "-static" CACHE STRING "Flag to link statically")
+set_property(TARGET LinkStatic PROPERTY LINK_FLAGS "${LinkStatic_FLAG}")
+set_property(TARGET LinkStatic PROPERTY LINK_SEARCH_START_STATIC 1)
+#set_property(TARGET LinkStatic PROPERTY LINK_SEARCH_END_STATIC 1) # insufficient
diff --git a/Tests/LinkStatic/LinkStatic.c b/Tests/LinkStatic/LinkStatic.c
new file mode 100644
index 0000000..3600977
--- /dev/null
+++ b/Tests/LinkStatic/LinkStatic.c
@@ -0,0 +1,5 @@
+#include <math.h>
+int main(void)
+{
+ return (int)sin(0);
+}
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 454d2d1..7030b2e 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -1,10 +1,4 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
-IF(COMMAND CMAKE_POLICY)
- CMAKE_POLICY(SET CMP0003 NEW)
-ENDIF(COMMAND CMAKE_POLICY)
-IF(CMAKE_OSX_ARCHITECTURES)
- CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
-ENDIF(CMAKE_OSX_ARCHITECTURES)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
PROJECT(LIBCURL C)
# Setup package meta-data
diff --git a/Utilities/cmcurl/easy.c b/Utilities/cmcurl/easy.c
index f3c2273..209d1c3 100644
--- a/Utilities/cmcurl/easy.c
+++ b/Utilities/cmcurl/easy.c
@@ -708,7 +708,7 @@ void curl_easy_reset(CURL *curl)
data->set.ssl.verifypeer = TRUE;
data->set.ssl.verifyhost = 2;
#ifdef CURL_CA_BUNDLE
- /* This is our prefered CA cert bundle since install time */
+ /* This is our preferred CA cert bundle since install time */
data->set.ssl.CAfile = (char *)CURL_CA_BUNDLE;
#endif
diff --git a/Utilities/cmcurl/setup.h b/Utilities/cmcurl/setup.h
index e302f35..5ae881f 100644
--- a/Utilities/cmcurl/setup.h
+++ b/Utilities/cmcurl/setup.h
@@ -155,7 +155,7 @@ typedef unsigned char bool;
#define SIZEOF_CURL_OFF_T 4
#endif
-/* We set up our internal prefered (CURL_)FORMAT_OFF_T here */
+/* We set up our internal preferred (CURL_)FORMAT_OFF_T here */
#if SIZEOF_CURL_OFF_T > 4
#define FORMAT_OFF_T "lld"
#else
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 08cda1e..0b9380f 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -1,8 +1,8 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
#
#
PROJECT(libarchive C)
#
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6.1)
SET(CMAKE_MODULE_PATH "${libarchive_SOURCE_DIR}/build/cmake")
# We use CHECK_TYPE_SIZE for existence tests, so use only one arch.
diff --git a/Utilities/cmlibarchive/build/windows/mvcpp.nt b/Utilities/cmlibarchive/build/windows/mvcpp.nt
deleted file mode 100644
index 228fc5d..0000000
--- a/Utilities/cmlibarchive/build/windows/mvcpp.nt
+++ /dev/null
@@ -1,117 +0,0 @@
-#/* FILE: mvcpp.nt
-# *
-# * Copyright (c) 2008
-# * TouchNet Information Systems, Inc.
-# * All Rights Reserved
-# *
-# * This program is an unpublished copyright work of TouchNet Information
-# * Systems, Inc. of Lenexa, KS. The program, all information disclosed
-# * and the matter shown and described hereon or herewith are confidential
-# * and proprietary to TouchNet Information Systems, Inc.
-# *
-# ******************************************************************************
-# *
-# * $LastChangedBy: kientzle $
-# * $Locker: $
-# * $ProjectName: $
-# * $ProjectRevision: $
-# * $LastChangedRevision: 29 $
-# * $LastChangedDate: 2008-05-05 18:10:33 -0400 (Mon, 05 May 2008) $
-# * $State$
-# * $RCSfile$
-# * $Source$
-# *
-# * Change Log:
-# * $Log: $
-# *
-# */
-
-.SUFFIXES : .c .cpp .obm
-
-ZLIB_INCL=\3rdParty\ZLib\Current\Include
-
-EXTRA_DEFINES=/DLIBARCHIVE_STATIC=1
-
-!ifdef DEBUG
-DEST_PATH=.\lib\mvcpp\debug
-OBJ_DIR=obj\debug
-COMPILE_FLAG=/MTd /DDEBUG=1 $(EXTRA_DEFINES) /Zi /Fd$(OBJ_DIR)\libarchive.pdb
-!else
-DEST_PATH=.\lib\mvcpp
-OBJ_DIR=obj
-COMPILE_FLAG=/MT $(EXTRA_DEFINES) /Fd$(OBJ_DIR)\libarchive.pdb
-!endif
-
-INCLUDE=.;$(MSDEVDIR)\INCLUDE;$(ZLIB_INCL);
-INCLUDE_OPTS=
-
-NT_CPP=cl
-NT_C=cl
-NT_LIBRARIAN=lib
-
-###
-NT_C_OPTS=$(COMPILE_FLAG) /GX /Zl /Zp1 /nologo /c /G5 /Oi /Ot /TC /DVC_EXTRANLEAN /DWIN32_LEAN_AND_MEAN $(INCLUDE_OPTS)
-NT_CPP_OPTS=$(COMPILE_FLAG) /GX /Zl /Zp1 /nologo /c /G5 /Oi /Ot /TP /DVC_EXTRANLEAN /DWIN32_LEAN_AND_MEAN $(INCLUDE_OPTS)
-NT_LIB_OPTS=
-
-.cpp{$(OBJ_DIR)}.obm:
- -md $(OBJ_DIR) > nul 2>nul
- $(NT_CPP) $(NT_CPP_OPTS) -Fo$*.obm $<
-
-.c{$(OBJ_DIR)}.obm:
- -md $(OBJ_DIR) > nul 2>nul
- $(NT_C) $(NT_C_OPTS) -Fo$*.obm $<
-
-
-OBJS=\
- $(OBJ_DIR)\archive_check_magic.obm $(OBJ_DIR)\archive_entry.obm \
- $(OBJ_DIR)\archive_entry_copy_stat.obm $(OBJ_DIR)\archive_entry_link_resolver.obm \
- $(OBJ_DIR)\archive_entry_stat.obm $(OBJ_DIR)\archive_entry_strmode.obm \
- $(OBJ_DIR)\archive_read.obm $(OBJ_DIR)\archive_read_data_into_fd.obm \
- $(OBJ_DIR)\archive_read_extract.obm $(OBJ_DIR)\archive_read_open_fd.obm \
- $(OBJ_DIR)\archive_read_open_file.obm $(OBJ_DIR)\archive_read_open_filename.obm \
- $(OBJ_DIR)\archive_read_open_memory.obm $(OBJ_DIR)\archive_read_support_compression_all.obm \
- $(OBJ_DIR)\archive_read_support_compression_bzip2.obm \
- $(OBJ_DIR)\archive_read_support_compression_compress.obm \
- $(OBJ_DIR)\archive_read_support_compression_gzip.obm \
- $(OBJ_DIR)\archive_read_support_compression_none.obm \
- $(OBJ_DIR)\archive_read_support_compression_program.obm \
- $(OBJ_DIR)\archive_read_support_format_all.obm \
- $(OBJ_DIR)\archive_read_support_format_ar.obm \
- $(OBJ_DIR)\archive_read_support_format_cpio.obm \
- $(OBJ_DIR)\archive_read_support_format_empty.obm \
- $(OBJ_DIR)\archive_read_support_format_iso9660.obm \
- $(OBJ_DIR)\archive_read_support_format_mtree.obm \
- $(OBJ_DIR)\archive_read_support_format_tar.obm \
- $(OBJ_DIR)\archive_read_support_format_zip.obm \
- $(OBJ_DIR)\archive_string.obm $(OBJ_DIR)\archive_string_sprintf.obm \
- $(OBJ_DIR)\archive_util.obm $(OBJ_DIR)\archive_virtual.obm \
- $(OBJ_DIR)\archive_write.obm $(OBJ_DIR)\archive_write_disk.obm \
- $(OBJ_DIR)\archive_write_disk_set_standard_lookup.obm \
- $(OBJ_DIR)\archive_write_open_fd.obm $(OBJ_DIR)\archive_write_open_file.obm \
- $(OBJ_DIR)\archive_write_open_filename.obm $(OBJ_DIR)\archive_write_open_memory.obm \
- $(OBJ_DIR)\archive_write_set_compression_bzip2.obm $(OBJ_DIR)\archive_write_set_compression_compress.obm \
- $(OBJ_DIR)\archive_write_set_compression_gzip.obm $(OBJ_DIR)\archive_write_set_compression_none.obm \
- $(OBJ_DIR)\archive_write_set_compression_program.obm $(OBJ_DIR)\archive_write_set_format.obm \
- $(OBJ_DIR)\archive_write_set_format_ar.obm $(OBJ_DIR)\archive_write_set_format_by_name.obm \
- $(OBJ_DIR)\archive_write_set_format_cpio.obm $(OBJ_DIR)\archive_write_set_format_cpio_newc.obm \
- $(OBJ_DIR)\archive_write_set_format_pax.obm $(OBJ_DIR)\archive_write_set_format_shar.obm \
- $(OBJ_DIR)\archive_write_set_format_ustar.obm $(OBJ_DIR)\filter_fork.obm \
- $(OBJ_DIR)\libarchive-nonposix.obm
-
-all: CLEAN $(DEST_PATH)\libarchive.lib
-
-$(DEST_PATH)\libarchive.lib :: $(OBJS) $(DEST_PATH)
-
-$(DEST_PATH)\libarchive.lib ::
- $(NT_LIBRARIAN) $(NT_LIB_OPTS) /OUT:$(DEST_PATH)\libarchive.lib $(OBJS)
-
-$(DEST_PATH):
- -md $(DEST_PATH) > nul 2>nul
-
-CLEAN:
-!ifdef CLEAN
- -del $(OBJ_DIR)\*.pd? > nul 2>nul
- -ren $(OBJ_DIR)\*.pdb *.pd1 > nul 2>nul
- -ren $(OBJ_DIR)\*.pdb *.pd2 > nul 2>nul
-!endif
diff --git a/Utilities/cmlibarchive/build/windows/vc71/libarchive.sln b/Utilities/cmlibarchive/build/windows/vc71/libarchive.sln
deleted file mode 100644
index 962c497..0000000
--- a/Utilities/cmlibarchive/build/windows/vc71/libarchive.sln
+++ /dev/null
@@ -1,23 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive", "libarchive.vcproj", "{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectDependencies) = postSolution
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug.ActiveCfg = Debug|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug.Build.0 = Debug|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release.ActiveCfg = Release|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/Utilities/cmlibarchive/build/windows/vc71/libarchive.vcproj b/Utilities/cmlibarchive/build/windows/vc71/libarchive.vcproj
deleted file mode 100644
index e09b896..0000000
--- a/Utilities/cmlibarchive/build/windows/vc71/libarchive.vcproj
+++ /dev/null
@@ -1,327 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="libarchive"
- ProjectGUID="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="4"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="../../lib/$(ProjectName)-vc71-mt-d.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="4"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="../../lib/$(ProjectName)-vc71-mt.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\..\libarchive\archive_check_magic.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_copy_stat.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_link_resolver.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_stat.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_strmode.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_data_into_fd.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk_set_standard_lookup.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_extract.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_fd.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_file.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_filename.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_memory.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_all.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_bzip2.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_compress.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_gzip.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_lzma.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_none.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_program.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_all.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_ar.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_cpio.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_empty.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_iso9660.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_mtree.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_tar.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_zip.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string_sprintf.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_util.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_virtual.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_windows.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk_set_standard_lookup.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_fd.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_file.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_filename.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_memory.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_bzip2.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_compress.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_gzip.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_none.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_program.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_ar.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_by_name.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_cpio.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_cpio_newc.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_mtree.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_pax.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_shar.c">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_ustar.c">
- </File>
- <File
- RelativePath="..\..\libarchive\filter_fork.c">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- <File
- RelativePath="..\..\libarchive\archive.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_endian.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_private.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_platform.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_private.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk_private.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_private.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_windows.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk_private.h">
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_private.h">
- </File>
- <File
- RelativePath="..\..\libarchive\config_windows.h">
- </File>
- <File
- RelativePath="..\..\libarchive\filter_fork.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Utilities/cmlibarchive/build/windows/vc80/libarchive.sln b/Utilities/cmlibarchive/build/windows/vc80/libarchive.sln
deleted file mode 100644
index d6ee3c5..0000000
--- a/Utilities/cmlibarchive/build/windows/vc80/libarchive.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive", "libarchive.vcproj", "{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive_test", "libarchive_test\libarchive_test.vcproj", "{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug|Win32.ActiveCfg = Debug|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug|Win32.Build.0 = Debug|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release|Win32.ActiveCfg = Release|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release|Win32.Build.0 = Release|Win32
- {407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Debug|Win32.ActiveCfg = Debug|Win32
- {407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Debug|Win32.Build.0 = Debug|Win32
- {407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Release|Win32.ActiveCfg = Release|Win32
- {407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Utilities/cmlibarchive/build/windows/vc80/libarchive.vcproj b/Utilities/cmlibarchive/build/windows/vc80/libarchive.vcproj
deleted file mode 100644
index 444de6d..0000000
--- a/Utilities/cmlibarchive/build/windows/vc80/libarchive.vcproj
+++ /dev/null
@@ -1,455 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="libarchive"
- ProjectGUID="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
- RootNamespace="libarchive"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;;LIBARCHIVE_STATIC"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="../../lib/$(ProjectName)-vc80-mt-d.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;;LIBARCHIVE_STATIC"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="../../lib/$(ProjectName)-vc80-mt.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\libarchive\archive_check_magic.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_copy_stat.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_link_resolver.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_stat.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_strmode.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_data_into_fd.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk_set_standard_lookup.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_extract.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_fd.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_file.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_filename.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_memory.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_all.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_bzip2.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_compress.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_gzip.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_lzma.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_none.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_program.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_all.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_ar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_cpio.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_iso9660.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_mtree.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_tar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_zip.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string_sprintf.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_util.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_virtual.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_windows.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk_set_standard_lookup.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_fd.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_file.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_filename.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_memory.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_bzip2.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_compress.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_gzip.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_none.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_program.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_ar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_by_name.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_cpio.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_cpio_newc.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_mtree.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_pax.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_shar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_ustar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\filter_fork.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\libarchive\archive.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_endian.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_platform.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_windows.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\config_windows.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\filter_fork.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Utilities/cmlibarchive/build/windows/vc80/libarchive_test/libarchive_test.vcproj b/Utilities/cmlibarchive/build/windows/vc80/libarchive_test/libarchive_test.vcproj
deleted file mode 100644
index e1058fd..0000000
--- a/Utilities/cmlibarchive/build/windows/vc80/libarchive_test/libarchive_test.vcproj
+++ /dev/null
@@ -1,495 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="libarchive_test"
- ProjectGUID="{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}"
- RootNamespace="libarchive_test"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\libarchive"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;LIBARCHIVE_STATIC"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- CompileAs="1"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- ShowProgress="0"
- OutputFile="..\..\..\$(ProjectName).exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- EmbedManifest="true"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\libarchive"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;LIBARCHIVE_STATIC"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- CompileAs="1"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="..\..\..\$(ProjectName).exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
- CopyLocal="false"
- CopyLocalDependencies="false"
- CopyLocalSatelliteAssemblies="false"
- RelativePathToProject=".\libarchive.vcproj"
- />
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\libarchive\test\main.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\read_open_memory.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_acl_basic.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_acl_freebsd.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_acl_pax.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_archive_api_feature.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_bad_fd.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_bzip2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_gtar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_gzip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_tar_hardlink.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_zip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_empty_write.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_entry.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_entry_strmode.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_fuzz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_link_resolver.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_pax_filename_encoding.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_compress_program.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_data_large.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_disk.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_extract.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_ar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_bz2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_gz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_Z.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_odc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_svr4_gzip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_svr4c_Z.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_gtar_gz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_gtar_lzma.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_gtar_sparse.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_iso_gz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_isorr_bz2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_mtree.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_pax_bz2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tar_empty_filename.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tbz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tgz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_zip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_large.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_pax_truncated.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_position.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_truncated.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_tar_filenames.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_tar_large.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_ustar_filenames.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_compress.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_compress_program.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk_hardlink.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk_perms.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk_secure.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk_times.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_ar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_cpio.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_cpio_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_cpio_newc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_cpio_odc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_pax.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_shar_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_tar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_tar_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_tar_ustar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_open_memory.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\libarchive\test\list.h"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Utilities/cmlibarchive/build/windows/vc90/libarchive.sln b/Utilities/cmlibarchive/build/windows/vc90/libarchive.sln
deleted file mode 100644
index 1ddfc98..0000000
--- a/Utilities/cmlibarchive/build/windows/vc90/libarchive.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive", "libarchive.vcproj", "{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive_test", "libarchive_test\libarchive_test.vcproj", "{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug|Win32.ActiveCfg = Debug|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug|Win32.Build.0 = Debug|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release|Win32.ActiveCfg = Release|Win32
- {0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release|Win32.Build.0 = Release|Win32
- {407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Debug|Win32.ActiveCfg = Debug|Win32
- {407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Debug|Win32.Build.0 = Debug|Win32
- {407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Release|Win32.ActiveCfg = Release|Win32
- {407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Utilities/cmlibarchive/build/windows/vc90/libarchive.vcproj b/Utilities/cmlibarchive/build/windows/vc90/libarchive.vcproj
deleted file mode 100644
index 0946b71..0000000
--- a/Utilities/cmlibarchive/build/windows/vc90/libarchive.vcproj
+++ /dev/null
@@ -1,456 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="libarchive"
- ProjectGUID="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
- RootNamespace="libarchive"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="../../lib/$(ProjectName)-vc90-mt-d.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="../../lib/$(ProjectName)-vc90-mt.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\libarchive\archive_check_magic.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_copy_stat.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_link_resolver.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_stat.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_strmode.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_data_into_fd.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk_set_standard_lookup.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_extract.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_fd.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_file.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_filename.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_open_memory.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_all.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_bzip2.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_compress.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_gzip.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_lzma.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_none.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_compression_program.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_all.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_ar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_cpio.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_iso9660.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_mtree.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_tar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_support_format_zip.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string_sprintf.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_util.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_virtual.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_windows.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk_set_standard_lookup.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_fd.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_file.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_filename.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_open_memory.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_bzip2.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_compress.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_gzip.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_none.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_compression_program.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_ar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_by_name.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_cpio.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_cpio_newc.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_mtree.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_pax.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_shar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_set_format_ustar.c"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\filter_fork.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\libarchive\archive.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_endian.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_entry_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_platform.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_disk_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_read_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_string.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_windows.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_disk_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\archive_write_private.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\config_windows.h"
- >
- </File>
- <File
- RelativePath="..\..\libarchive\filter_fork.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Utilities/cmlibarchive/build/windows/vc90/libarchive_test/libarchive_test.vcproj b/Utilities/cmlibarchive/build/windows/vc90/libarchive_test/libarchive_test.vcproj
deleted file mode 100644
index 7fc3271..0000000
--- a/Utilities/cmlibarchive/build/windows/vc90/libarchive_test/libarchive_test.vcproj
+++ /dev/null
@@ -1,494 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="libarchive_test"
- ProjectGUID="{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}"
- RootNamespace="libarchive_test"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\libarchive"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;LIBARCHIVE_STATIC"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- CompileAs="1"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- ShowProgress="0"
- OutputFile="..\..\..\$(ProjectName).exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- EmbedManifest="true"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\libarchive"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;LIBARCHIVE_STATIC"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- CompileAs="1"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="..\..\..\$(ProjectName).exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
- CopyLocal="false"
- CopyLocalDependencies="false"
- CopyLocalSatelliteAssemblies="false"
- RelativePathToProject=".\libarchive.vcproj"
- />
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\libarchive\test\main.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\read_open_memory.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_acl_basic.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_acl_freebsd.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_acl_pax.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_archive_api_feature.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_bad_fd.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_bzip2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_gtar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_gzip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_tar_hardlink.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_compat_zip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_empty_write.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_entry.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_entry_strmode.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_fuzz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_link_resolver.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_pax_filename_encoding.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_compress_program.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_data_large.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_disk.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_extract.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_ar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_bz2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_gz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_Z.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_odc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_svr4_gzip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_cpio_svr4c_Z.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_gtar_gz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_gtar_lzma.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_gtar_sparse.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_iso_gz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_isorr_bz2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_mtree.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_pax_bz2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tar_empty_filename.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tbz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tgz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_tz.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_format_zip.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_large.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_pax_truncated.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_position.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_read_truncated.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_tar_filenames.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_tar_large.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_ustar_filenames.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_compress.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_compress_program.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk_hardlink.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk_perms.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk_secure.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_disk_times.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_ar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_cpio.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_cpio_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_cpio_newc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_cpio_odc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_pax.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_shar_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_tar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_tar_empty.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_format_tar_ustar.c"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test_write_open_memory.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\libarchive\test\list.h"
- >
- </File>
- <File
- RelativePath="..\..\..\libarchive\test\test.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Utilities/cmlibarchive/build/windows/wccpp.nt b/Utilities/cmlibarchive/build/windows/wccpp.nt
deleted file mode 100644
index 2c6c730..0000000
--- a/Utilities/cmlibarchive/build/windows/wccpp.nt
+++ /dev/null
@@ -1,107 +0,0 @@
-#/* FILE: wccpp.nt
-# *
-# * Copyright (c) 2008
-# * TouchNet Information Systems, Inc.
-# * All Rights Reserved
-# *
-# * This program is an unpublished copyright work of TouchNet Information
-# * Systems, Inc. of Lenexa, KS. The program, all information disclosed
-# * and the matter shown and described hereon or herewith are confidential
-# * and proprietary to TouchNet Information Systems, Inc.
-# *
-# ******************************************************************************
-# *
-# * $LastChangedBy: kientzle $
-# * $Locker: $
-# * $ProjectName: $
-# * $ProjectRevision: $
-# * $LastChangedRevision: 29 $
-# * $LastChangedDate: 2008-05-05 18:10:33 -0400 (Mon, 05 May 2008) $
-# * $State$
-# * $RCSfile$
-# * $Source$
-# *
-# * Change Log:
-# * $Log: $
-# *
-# */
-
-.EXTENSIONS:
-.EXTENSIONS: .obn .cpp .c
-
-ZLIB_INCL=\3rdParty\ZLib\Current\Include
-
-!ifdef DEBUG
-DEST_PATH=.\lib\wccpp\debug
-OBJ_DIR=obj\debug
-EXT_COMPILE_FLAG=-d2 -DLIBARCHIVE_STATIC=1
-!else
-DEST_PATH=.\lib\wccpp
-OBJ_DIR=obj
-EXT_COMPILE_FLAG=-DLIBARCHIVE_STATIC=1
-!endif
-
-# ----- NT compiler options -----------------------------------------------
-NT_CPP=wpp386
-NT_C=wcc386
-NT_LIBRARIAN=wlib
-
-
-###
-INCLUDE_OPTS=/I.;$(%watcom)\h;$(%watcom)\h\nt;$(ZLIB_INCL);
-NT_CPP_OPTS=-ei -wx -xs -xss -xst -od -of+ -zp1 -5 -bt=nt -bm $(EXT_COMPILE_FLAG) $(INCLUDE_OPTS) -DWIN32_LEAN_AND_MEAN
-NT_C_OPTS=-ei -wx -od -of+ -zp1 -5 -bt=nt -bm $(EXT_COMPILE_FLAG) $(INCLUDE_OPTS) -DWIN32_LEAN_AND_MEAN
-NT_LIB_OPTS=
-
-.cpp{$(OBJ_DIR)}.obn:
- -md $(OBJ_DIR) > nul 2>nul
- $(NT_CPP) $(NT_CPP_OPTS) -zp1 -fo=$*.obn $<
-
-.c{$(OBJ_DIR)}.obn:
- -md $(OBJ_DIR) > nul 2>nul
- $(NT_C) $(NT_C_OPTS) -zp1 -fo=$*.obn $<
-
-OBJS = &
- $(OBJ_DIR)\archive_check_magic.obn $(OBJ_DIR)\archive_entry.obn &
- $(OBJ_DIR)\archive_entry_copy_stat.obn $(OBJ_DIR)\archive_entry_link_resolver.obn &
- $(OBJ_DIR)\archive_entry_stat.obn $(OBJ_DIR)\archive_entry_strmode.obn &
- $(OBJ_DIR)\archive_read.obn $(OBJ_DIR)\archive_read_data_into_fd.obn &
- $(OBJ_DIR)\archive_read_extract.obn $(OBJ_DIR)\archive_read_open_fd.obn &
- $(OBJ_DIR)\archive_read_open_file.obn $(OBJ_DIR)\archive_read_open_filename.obn &
- $(OBJ_DIR)\archive_read_open_memory.obn $(OBJ_DIR)\archive_read_support_compression_all.obn &
- $(OBJ_DIR)\archive_read_support_compression_bzip2.obn &
- $(OBJ_DIR)\archive_read_support_compression_compress.obn &
- $(OBJ_DIR)\archive_read_support_compression_gzip.obn &
- $(OBJ_DIR)\archive_read_support_compression_none.obn &
- $(OBJ_DIR)\archive_read_support_compression_program.obn &
- $(OBJ_DIR)\archive_read_support_format_all.obn &
- $(OBJ_DIR)\archive_read_support_format_ar.obn &
- $(OBJ_DIR)\archive_read_support_format_cpio.obn &
- $(OBJ_DIR)\archive_read_support_format_empty.obn &
- $(OBJ_DIR)\archive_read_support_format_iso9660.obn &
- $(OBJ_DIR)\archive_read_support_format_mtree.obn &
- $(OBJ_DIR)\archive_read_support_format_tar.obn &
- $(OBJ_DIR)\archive_read_support_format_zip.obn &
- $(OBJ_DIR)\archive_string.obn $(OBJ_DIR)\archive_string_sprintf.obn &
- $(OBJ_DIR)\archive_util.obn $(OBJ_DIR)\archive_virtual.obn &
- $(OBJ_DIR)\archive_write.obn $(OBJ_DIR)\archive_write_disk.obn &
- $(OBJ_DIR)\archive_write_disk_set_standard_lookup.obn &
- $(OBJ_DIR)\archive_write_open_fd.obn $(OBJ_DIR)\archive_write_open_file.obn &
- $(OBJ_DIR)\archive_write_open_filename.obn $(OBJ_DIR)\archive_write_open_memory.obn &
- $(OBJ_DIR)\archive_write_set_compression_bzip2.obn $(OBJ_DIR)\archive_write_set_compression_compress.obn &
- $(OBJ_DIR)\archive_write_set_compression_gzip.obn $(OBJ_DIR)\archive_write_set_compression_none.obn &
- $(OBJ_DIR)\archive_write_set_compression_program.obn $(OBJ_DIR)\archive_write_set_format.obn &
- $(OBJ_DIR)\archive_write_set_format_ar.obn $(OBJ_DIR)\archive_write_set_format_by_name.obn &
- $(OBJ_DIR)\archive_write_set_format_cpio.obn $(OBJ_DIR)\archive_write_set_format_cpio_newc.obn &
- $(OBJ_DIR)\archive_write_set_format_pax.obn $(OBJ_DIR)\archive_write_set_format_shar.obn &
- $(OBJ_DIR)\archive_write_set_format_ustar.obn $(OBJ_DIR)\filter_fork.obn &
- $(OBJ_DIR)\libarchive-nonposix.obn
-
-$(DEST_PATH)\LibArchive.lib :: $(OBJS) $(DEST_PATH)
-
-$(DEST_PATH)\LibArchive.lib ::
- -md $(DEST_PATH) > nul 2>nul
- $(NT_LIBRARIAN) $@ -+ $(OBJS)
-
-$(DEST_PATH):
- -md $(DEST_PATH) > nul 2>nul
diff --git a/bootstrap b/bootstrap
index b95e36a..c999888 100755
--- a/bootstrap
+++ b/bootstrap
@@ -666,9 +666,9 @@ if ${cmake_system_cygwin}; then
cmake_ld_flags="${LDFLAGS} -Wl,--enable-auto-import"
fi
-# Add Carbon framework on Darwin
+# Add CoreFoundation framework on Darwin
if ${cmake_system_darwin}; then
- cmake_ld_flags="${LDFLAGS} -framework Carbon"
+ cmake_ld_flags="${LDFLAGS} -framework CoreFoundation"
fi
# Add BeOS toolkits...