Merge branch 'master' into sublime-text-2-generator
This commit is contained in:
commit
cc84072156
444
ChangeLog.manual
444
ChangeLog.manual
|
@ -1,3 +1,447 @@
|
|||
Changes in CMake 2.8.10 (since 2.8.10-rc3)
|
||||
----------------------------------------------
|
||||
None
|
||||
|
||||
Changes in CMake 2.8.10-rc3 (since 2.8.10-rc2)
|
||||
----------------------------------------------
|
||||
Rolf Eike Beer (2):
|
||||
SelectLibraryConfigurations: add testcase
|
||||
SelectLibraryConfigurations: fix for release and debug libs being the same
|
||||
|
||||
Stephen Kelly (5):
|
||||
BasicConfigVersion: Make docs refer to the macro, not the module name
|
||||
Document LOCATION undefined behavior with use of LINKER_LANGUAGE.
|
||||
GenEx: Add an accessor for imported targets in a makefile.
|
||||
GenEx: Create cmGeneratorTargets for imported targets.
|
||||
GexEx: Validate Target names and property names differently.
|
||||
|
||||
Thomas Arcila (1):
|
||||
SelectLibraryConfigurations: Fix foreach(x IN LISTS ...) syntax
|
||||
|
||||
Changes in CMake 2.8.10-rc2 (since 2.8.10-rc1)
|
||||
----------------------------------------------
|
||||
Alex Neundorf (2):
|
||||
Document CMAKE_FIND_PACKAGE_NAME
|
||||
Automoc: fix #13572: issue with symbolic links
|
||||
|
||||
Brad King (4):
|
||||
cmCTestSVN: Fix compilation with Sun CC 5.1
|
||||
if: Document that plain 'NOTFOUND' is a false constant
|
||||
string: Clarify regex documentation of '-' behavior
|
||||
FortranCInterface: Pass all flags to VERIFY project (#13579)
|
||||
|
||||
David Cole (1):
|
||||
NSIS: Fix incorrect uninstall registry key name (#13578)
|
||||
|
||||
Eric NOULARD (3):
|
||||
CPACK_XX_ON_ABSOLUTE_INSTALL_DESTINATION is now properly checked for ON/OFF
|
||||
Document CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY and fix some typo.
|
||||
Make CPACK_SET_DESTDIR work with archive generator + component-based packaging
|
||||
|
||||
Jean-Christophe Fillion-Robin (1):
|
||||
CTest: Ensure CTEST_USE_LAUNCHERS behaves nicely in Superbuild setup
|
||||
|
||||
Pere Nubiola i Radigales (1):
|
||||
Find PostgreSQL headers on Debian
|
||||
|
||||
Peter Kümmel (4):
|
||||
Ninja: also set OBJECT_DIR when compiling
|
||||
Ninja: don't pollute current dir when using gui (#13495)
|
||||
Ninja: implicit dependency for custom command files
|
||||
Fix regression: write compile definitions if any
|
||||
|
||||
Philip Lowman (4):
|
||||
FindGTK2: Rollback lib64 changes which broke header file finding
|
||||
FindGTK2: #12049 fix detection of header files on multiarch systems
|
||||
FindGTK2: #12596 Missing paths for FindGTK2 on NetBSD
|
||||
FindGTK2: Update local changelog
|
||||
|
||||
Rolf Eike Beer (6):
|
||||
CTest: fix usage of memory checker with spaces in path
|
||||
CTest: fix pre and post test commands with spaces
|
||||
CTest: add tests that simulate memcheck runs
|
||||
CTest: improve memory checker type detection
|
||||
CTest: add a test for CTEST_CUSTOM_MEMCHECK_IGNORE
|
||||
CTest: add a check with a quoted memory checker
|
||||
|
||||
Stephen Kelly (18):
|
||||
GenEx: It is not an error to specify an empty parameter
|
||||
GenEx: Return after error reported.
|
||||
GenEx: Report actual target name not found, not "0" each time.
|
||||
GenEx: Parse comma after colon tokens specially
|
||||
GenEx: Validate target and property names.
|
||||
GenEx: Ensure that the empty CONFIGURATION can be used conditionally.
|
||||
GenEx: Add test for $<BOOL:> with empty parameter.
|
||||
GenEx: Add tests for "0" and "1" expressions with literal commas.
|
||||
GenEx: Don't use std::vector::at(int).
|
||||
Attempt to fix the compile of cmake on Sun CC.
|
||||
GenEx: Parse colon after arguments separator colon specially.
|
||||
GenEx: Test the use of generator expressions to generate lists.
|
||||
GenEx: Fix termination bugs in generator expression parser.
|
||||
GenEx: Break if there are no more commas in the container
|
||||
GenEx: Add some more asserts to verify code-sanity.
|
||||
GenEx: Replace some failing tests with Borland and NMake makefiles.
|
||||
GenEx: Fix reporting about not-found include directories and libraries.
|
||||
Fix config-specific INCLUDE_DIRECTORIES in multi-config generators
|
||||
|
||||
Changes in CMake 2.8.10-rc1 (since 2.8.9)
|
||||
-----------------------------------------
|
||||
Scripted Changes (3):
|
||||
Remove trailing whitespace from most CMake and C/C++ code
|
||||
Convert CMake-language commands to lower case
|
||||
Remove CMake-language block-end command arguments
|
||||
|
||||
Alex Neundorf (27):
|
||||
Eclipse: add support for the 4.2 Juno release (#13367)
|
||||
Eclipse: improve (fix ?) version detection on OSX
|
||||
Eclipse: fix #13358: don't create bad linked resources
|
||||
Eclipse: fix #13358: don't create bad linked resources
|
||||
remove non-working KDE4 test
|
||||
Eclipse on OSX: fix handling of framework include dirs (#13464)
|
||||
Eclipse on OSX: improve handling of framework include dirs (#13367)
|
||||
-fix line length
|
||||
fix #13474: also rescan dependencies if the depender does not exist
|
||||
-fix line length
|
||||
-fix Java dependency scanning, broken in previous commit
|
||||
error out if CTEST_USE_LAUNCHERS is TRUE but RULE_LAUNCH_* are not set
|
||||
fix #13494: rerun automoc also if include dirs or moc options change
|
||||
CMakeDetermineFortranCompiler: add support for cross-compiling (#13379)
|
||||
Automoc: fix #13493, use target properties for include dirs
|
||||
Automoc: do not use DEFINITIONS, but only COMPILE_DEFINITIONS
|
||||
Automoc: also the makefile-COMPILE_DEFINITIONS
|
||||
cmGlobalGenerator.h: some minor coding style fixes
|
||||
Modules/readme.txt: fix typo
|
||||
find_package: add support for a <package>_NOT_FOUND_MESSAGE variable
|
||||
exports: store pointers to all installations of each export set
|
||||
exports: accept a missing target if it is exported exactly once
|
||||
exports: first try at error handling if a target is missing
|
||||
exports: fix build with MSVC6
|
||||
exports: move the handling of missing targets into subclasses
|
||||
exports: define a CMAKE_FIND_PACKAGE_NAME var set by find_package()
|
||||
exports: add a test for exporting dependent targets
|
||||
|
||||
Andreas Mohr (1):
|
||||
FindCURL: Find older MSVC prebuilts
|
||||
|
||||
Andy Piper (1):
|
||||
Do not include directories which are part of the package install prefix.
|
||||
|
||||
Benjamin Eikel (21):
|
||||
Initial version of find module
|
||||
FindSDL: Add version support for FindSDL_net
|
||||
FindSDL: Version support for FindSDL_image
|
||||
FindSDL: Use prefix SDL_NET, because it matches the file name.
|
||||
FindSDL: Use SDL_IMAGE prefix for varibales
|
||||
FindSDL: Add "cmake_minimum_required" to "try_compile" project
|
||||
FindSDL: Format the documentation
|
||||
FindSDL: Version support for FindSDL_sound
|
||||
FindSDL: Use same capitalization for FPHSA as file name
|
||||
FindSDL: Pass SDL_SOUND_LIBRARY to FIND_PACKAGE_HANDLE_STANDARD_ARGS
|
||||
FindSDL: Use SDL_MIXER prefix for variables
|
||||
FindSDL: Add version support for FindSDL_mixer
|
||||
FindSDL: Update documentation
|
||||
FindSDL: Use SDL_TTF prefix for variables
|
||||
FindSDL: Add version support for FindSDL_ttf
|
||||
FindSDL: Update documentation
|
||||
FindSDL: Format documentation
|
||||
FindSDL: Add version support
|
||||
FindSDL: Add my copyright tag to all FindSDL_* modules
|
||||
FindSDL: Remove from find_... calls PATHS that are set by default
|
||||
FindSDL: Stay compatible with old input variables
|
||||
|
||||
Bill Hoffman (8):
|
||||
Use OUTPUT_NORMAL instead of OUTPUT_MERGE for cmake -E chdir.
|
||||
curl: Use find_package(OpenSSL)
|
||||
curl: Make OpenSSL DLLs available to CMake on Windows
|
||||
file(DOWNLOAD): Generalize EXPECTED_MD5 to EXPECTED_HASH
|
||||
file(DOWNLOAD): Add options for SSL
|
||||
Utilities/Release: Enable CMAKE_USE_OPENSSL in nightly binaries
|
||||
Add SSL_VERIFYPEER and CAINFO file options to ExternalProject_Add.
|
||||
Revert "Ninja: don't expand any rsp files"
|
||||
|
||||
Brad King (83):
|
||||
find_library: Add test covering lib->lib64 cases
|
||||
find_library: Refactor lib->lib64 conversion
|
||||
find_library: Simplify lib->lib<arch> expansion
|
||||
find_library: Fix mixed lib->lib64 (non-)conversion cases (#13419)
|
||||
CMakeDetermine(C|CXX)Compiler: Consider Clang compilers
|
||||
Factor common code out of CMakeDetermine(ASM|C|CXX|Fortran)Compiler
|
||||
Prefer generic system compilers by default for C, C++, and Fortran
|
||||
Xcode: Fix object library references in multi-project trees (#13452)
|
||||
Xcode: Run xcode-select to find Xcode version file (#13463)
|
||||
Watcom: Simplify compiler version detection (#11866)
|
||||
Remove trailing TAB from NSIS.template.in
|
||||
Fix WarnUnusedUnusedViaUnset test pass/fail regex
|
||||
CMakeVersion.bash: Update sed expression for lower-case 'set'
|
||||
GetPrerequisites: Mark file_cmd as advanced cache entry
|
||||
Add boolean generator expressions
|
||||
Add $<CONFIG:...> boolean query generator expression
|
||||
Recognize Clang ASM support (#13473)
|
||||
Xcode: Set ASM source language in project file (#13472)
|
||||
Tests/Assembler: Do not use assembler in universal binaries
|
||||
Add FindHg module to find Mercurial
|
||||
ExternalProject: Add Mercurial (hg) repository support
|
||||
Qt4Macros: Fix recently broken resource file parsing
|
||||
Tests/ObjectLibrary: Do not enable CXX in subdirectories
|
||||
VS11: Rename 'Immersive' to 'WindowsAppContainer' (#12930)
|
||||
VS: Disable precompiled headers unless enabled by project (#12930)
|
||||
VS11: Generate flag tables from MSBuild V110 tool files
|
||||
Detect Compaq compiler version with its id
|
||||
Detect PathScale compiler version with its id
|
||||
Detect TI compiler version with its id
|
||||
Detect Comeau compiler version with its id
|
||||
Detect SDCC compiler version with its id
|
||||
Detect Cray compiler version with its id
|
||||
Detect Analog VisualDSP++ compiler version with its id
|
||||
Re-order C/C++/Fortran compiler determination logic
|
||||
CMakeDetermineCompilerId: Prepare to detect IDE compiler id
|
||||
Xcode: Detect the compiler id and tool location
|
||||
VS10: Define CMAKE_VS_PLATFORM_TOOLSET variable
|
||||
VS: Detect the compiler id and tool location
|
||||
Cleanly enable a language in multiple subdirectories
|
||||
Test variables CMAKE_(C|CXX|Fortran)_COMPILER(|_ID|_VERSION)
|
||||
Document CMAKE_<LANG>_COMPILER_(ID|VERSION) values
|
||||
Make platform information files specific to the CMake version
|
||||
Move CMAKE_<LANG>_COMPILER_WORKS to compiler information files
|
||||
Store ABI detection results in compiler information files
|
||||
VS: Remove support for "free" version 2003 tools
|
||||
VS: Simplify MSVC version reporting
|
||||
Modernize MSVC compiler information files
|
||||
VS: Fix MSVC_IDE definition recently broken by refactoring
|
||||
add_library: Document POSITION_INDEPENDENT_CODE default (#13479)
|
||||
magrathea: Tell cmELF about DT_RUNPATH (#13497)
|
||||
Utilities/Release: Link AIX binary with large maxdata
|
||||
Utilities/xml: Add .gitattributes to disable whitespace checks
|
||||
Utilities/xml: Add docbook-4.5 DTD (#13508)
|
||||
docbook: Fix formatter naming convention to avoid shadow
|
||||
docbook: Fix Sun CC warning on ptr_fun(isalnum)
|
||||
curl: Honor OPENSSL_NO_SSL2
|
||||
if: Compare up to 8 components in VERSION tests
|
||||
ExternalProject: Generalize URL_MD5 option to URL_HASH
|
||||
Rename SSL terminology to TLS
|
||||
file(DOWNLOAD): Make TLS options behave as documented
|
||||
OS X: Add platform-specific Clang compiler info files (#13536)
|
||||
VS11: Detect VS 2012 Express for default generator (#13348)
|
||||
VS11: Add VS 2012 Express support (#13348)
|
||||
file(DOWNLOAD): Add HTTP User-Agent string
|
||||
ExternalProject: Add DOWNLOAD_NAME option
|
||||
file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=value
|
||||
VS8: Remove '.NET' from generator description (#10158)
|
||||
Clang: Split Compiler/Clang* modules out from GNU (#13550)
|
||||
Clang: All versions know about -fPIE (#13550)
|
||||
Xcode: Remove unused code reading CMAKE_OSX_SYSROOT_DEFAULT
|
||||
OS X: Always generate -isysroot if any SDK is in use
|
||||
OS X: Improve default CMAKE_OSX_SYSROOT selection
|
||||
bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot
|
||||
Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file
|
||||
OS X: Allow CMAKE_OSX_SYSROOT to be a logical SDK name
|
||||
OS X: Simplify selection of CMAKE_OSX_ARCHITECTURES
|
||||
OS X: If CMAKE_OSX_SYSROOT is already set do not compute default
|
||||
OS X: Further improve default CMAKE_OSX_SYSROOT selection
|
||||
OS X: Teach deployment target sanity check about SDK names
|
||||
OS X: Ignore MACOSX_DEPLOYMENT_TARGET during Xcode compiler id
|
||||
Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test
|
||||
Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6
|
||||
Run PDBDirectoryAndName test on MSVC and Intel
|
||||
|
||||
Clinton Stimpson (8):
|
||||
fphsa: clarify message about minimum required version found.
|
||||
DeployQt4: Include DESTDIR for some cpack generators.
|
||||
Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it.
|
||||
Fix regex for qt minor version.
|
||||
FindQt4: Give precedence to QTDIR environment variable, if set.
|
||||
FindQt4: Give precedence to QTDIR environment variable, if set.
|
||||
Fix errors detecting Qt4 on Windows 8.
|
||||
cmake-gui: Fix error status when interrupted.
|
||||
|
||||
Daniel Pfeifer (8):
|
||||
Simplify CMake.HTML documentation test command line
|
||||
docbook: Remove table of contents
|
||||
docbook: Factor out code to write valid DocBook IDs
|
||||
docbook: Fix the DocBook section output
|
||||
docbook: Cleanup formatter and generated DocBook
|
||||
docbook: Add support for <abstract> at section level 1
|
||||
docbook: Add CMake.DocBook test to validate xml (#13508)
|
||||
docbook: Remove redundant docs that cause invalid DocBook
|
||||
|
||||
David Cole (9):
|
||||
Begin post-2.8.9 development
|
||||
Release: Temporarily exclude ExternalProject test on cygwin
|
||||
Add ability to run as a ctest -S script also
|
||||
CMake: Clarify the documentation for if(f1 IS_NEWER_THAN f2)
|
||||
Convert the CPACK_CYGWIN_PATCH_NUMBER variable to a cache variable
|
||||
InstallRequiredSystemLibraries: Use correct file names (#13315)
|
||||
ProcessorCount: Mark find_program vars as advanced (#13236)
|
||||
FindQt4: Avoid "finding" non-existent library in a .framework
|
||||
FindMPI: Set correct variables for calls to FPHSA
|
||||
|
||||
Eric NOULARD (2):
|
||||
Enhance DESTDIR documentation. Fixes #0012374.
|
||||
Handles %attr(nnn,-,-) /path/to/file in CPACK_RPM_USER_FILELIST properly.
|
||||
|
||||
James Bigler (3):
|
||||
Replace -g3 with -g for CUDA 4.1 and 4.2 in addition to CUDA < 3.0.
|
||||
Added CUDA_SOURCE_PROPERTY_FORMAT. Allows setting per file format (OBJ or PTX)
|
||||
FindCUDA: Added CUDA_HOST_COMPILER variable.
|
||||
|
||||
Marcin Wojdyr (1):
|
||||
Remove CMake multiline block-end command arguments
|
||||
|
||||
Nils Gladitz (1):
|
||||
ctest_update: Tell svn not to prompt interactively (#13024)
|
||||
|
||||
Patrick Gansterer (4):
|
||||
VS: Cleanup AddPlatformDefinitions() of Visual Studio generators
|
||||
Add additional architectures to CMakePlatformId.h.in
|
||||
Add WindowsCE platform information files
|
||||
VS: Remove duplicated implementations of CreateLocalGenerator()
|
||||
|
||||
Peter Kuemmel (1):
|
||||
Ninja: don't expand any rsp files
|
||||
|
||||
Peter Kümmel (15):
|
||||
Ninja: cmcldeps needs a compiler
|
||||
Ninja: don't crash on returned 0 pointer
|
||||
Ninja: prepare msvc pdb cleanup
|
||||
Ninja:split out setting of msvc TARGET_PDB
|
||||
Ninja: remove GetTargetPDB because it is used only once
|
||||
Ninja: also detect /showInclude prefix for icl
|
||||
Find mingw's windres also when Unix Makefiles are used
|
||||
Ninja: don't suppress warning about compiler options
|
||||
Ninja: suppress cmcldeps only for source file signature try_compiles
|
||||
Ninja: filter target specific compile flags with language specific regex
|
||||
Ninja: OBJECT_DEPENDS should set an implicit dependency
|
||||
Ninja: don't confuse ninja's rsp files with nmake's
|
||||
Ninja: move -LIBPATH behind -link option
|
||||
Ninja: move <OBJECTS> in front of the first linker option
|
||||
Ninja: add option to enforce usage of response files
|
||||
|
||||
Philip Lowman (3):
|
||||
FindOpenSceneGraph: CMake variable OSG_DIR influences detection now too
|
||||
FindGTK2: Add GTK2_CAIROMMCONFIG_INCLUDE_DIR for cairommconfig.h
|
||||
CMakeDetermineVSServicePack: Visual Studio 2012 added
|
||||
|
||||
Rolf Eike Beer (25):
|
||||
remove lib64 Unix paths if the respective lib path is also given
|
||||
FindOpenSSL: find cross-compiled OpenSSL from MinGW (#13431)
|
||||
FindOpenSSL: use SelectLibraryConfigurations
|
||||
FindOpenSSL: let CMake handle environment variable HINTS
|
||||
FindOpenSSL: cleanup path hints
|
||||
FindOpenSSL: remove leftover comment
|
||||
SelectLibraryConfiguration: generate correct output when input vars are lists
|
||||
Fix typo direcotry -> directory (and similar) [#13444]
|
||||
FindSelfPackers: fix typo (#13456)
|
||||
CheckTypeSize: show in documentation how to get struct member size (#10579)
|
||||
CheckTypeSize: add a test for size of struct members
|
||||
FindX11: remove duplicates from X11 include path list (#13316)
|
||||
FindX11: avoid calling list(REMOVE_DUPLICATES) on an empty list
|
||||
list command: error on too many arguments
|
||||
CMake.List test: explicitely test with lists containing only an empty string
|
||||
use the find_* functions ENV parameter
|
||||
use PATH_SUFFIXES to simplify find_* calls
|
||||
do not escape spaces in regular expressions
|
||||
read less from version headers into variables
|
||||
FindFLEX: fix version extraction on Apple
|
||||
FindGettext: remove code duplicating FPHSA checks
|
||||
include FPHSA from current directory in all modules
|
||||
FindOpenSceneGraph: simplify by using more features of FPHSA
|
||||
FindSDL: add SDLMAIN_LIBRARY only once (#13262)
|
||||
add documentation for all MSVCxxx version variables (#12567)
|
||||
|
||||
Sergei Nikulov (1):
|
||||
fix for discovering ft2build.h using FREETYPE_DIR environment var (#13502)
|
||||
|
||||
Stephen Kelly (60):
|
||||
Add new qt4_use_modules function.
|
||||
Add missing whitespace to docs.
|
||||
Fix some typos in the docs.
|
||||
Remove incorrect doc string for link type enum
|
||||
Remove duplicate 'of' from docs.
|
||||
Fix unfortunate documentation error for PIC feature.
|
||||
Don't duplicate -D defines sent to the compiler.
|
||||
Fix CompileDefinitions test on Visual Studio.
|
||||
Fix the test setting COMPILE_DEFINITIONS target property
|
||||
Rename files from main.cpp to more meaningful names.
|
||||
Fix casing of 'Qt' in docs, comments and user-visible strings.
|
||||
Read entire Qt4 qrc file when parsing for depends info.
|
||||
Add a return-after-error if an old Qt is found.
|
||||
Use CMake platform variables instead of Qt ones.
|
||||
Move variable setting down to where it relates to.
|
||||
Remove an if which is always true.
|
||||
Use add_subdirectory instead of the obsolete subdirs.
|
||||
Replace two include_directories with a setting.
|
||||
Compile with both Qt4 and Qt5.
|
||||
Build with Qt5 if it is found.
|
||||
cmGeneratorExpression: Re-write for multi-stage evaluation
|
||||
cmGeneratorExpression: Port users to two-stage processing
|
||||
Fix the regular expression validator for target names.
|
||||
Handle colons as a special case in the generator expression parser.
|
||||
Enable deprecated API when using Qt 5.
|
||||
Add more forwarding API to cmGeneratorTarget.
|
||||
Store cmGeneratorTargets with the makefile.
|
||||
Move GenerateTargetManifest to cmGeneratorTarget.
|
||||
Move GetLinkInformation to cmGeneratorTarget
|
||||
Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget.
|
||||
Move GetCreateRuleVariable to cmGeneratorTarget.
|
||||
Port cmLocalGenerator::GetTargetFlags to cmGeneratorTarget.
|
||||
Move GetIncludeDirectories to cmGeneratorTarget.
|
||||
Append the COMPILE_DEFINITIONS from the Makefile to all targets.
|
||||
Add a wrapper for accessing config-specific compile-definitions.
|
||||
Add convenience for getting a cmGeneratorTarget to use.
|
||||
Fix compiler warning with initialization order.
|
||||
Revert "Move GenerateTargetManifest to cmGeneratorTarget."
|
||||
Use the cmGeneratorTarget for the include directories API.
|
||||
Fix indentation in the code blocks generator.
|
||||
Port remaining code to GetCompileDefinitions().
|
||||
Add include guard for cmGeneratorExpression.
|
||||
Don't prepend a path before generator expressions in include_directories.
|
||||
Convert paths in INCLUDE_DIRECTORIES property to Unix slashes.
|
||||
Add an AppendDefines std::string overload.
|
||||
Return a std::string from GetCompileDefinitions.
|
||||
Refactor GetCompileDefinitions a bit.
|
||||
Extend the generator expression language with more logic.
|
||||
Add a generator expression for target properties.
|
||||
Add API to check that dependent target properties form a DAG.
|
||||
Add a self-reference check for target properties.
|
||||
Early return if there is no target.
|
||||
Process generator expressions in the INCLUDE_DIRECTORIES property.
|
||||
Process generator expressions in the COMPILE_DEFINITIONS target property.
|
||||
Fix the layout of the generator expression documentation.
|
||||
Fix punctuation in some variables documentation.
|
||||
Document that generator expressions can be used in target properties.
|
||||
Remove unused parameter marker and the unused parameter.
|
||||
Fix minor typos.
|
||||
Remove period at the end of the check message.
|
||||
|
||||
Tom Schutter (2):
|
||||
cmake-mode.el: Use more readable regex and case-fold-search
|
||||
cmake-mode.el: add local keybindings
|
||||
|
||||
Xavier Besseron (7):
|
||||
cmCTestSVN: Add the new SVNInfo structure
|
||||
cmCTestSVN: Extend Revision struct with SVN repo information
|
||||
cmCTestSVN: Add the Repositories list and the RootInfo pointer
|
||||
cmCTestSVN: Create the SVNInfo for the root repository
|
||||
cmCTestSVN: Use the SVNInfo structure
|
||||
cmCTestSVN: Add a LoadExternal() function and an ExternalParser class
|
||||
cmCTestSVN: Load and process information from externals
|
||||
|
||||
Yuchen Deng (1):
|
||||
Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
|
||||
|
||||
Yury G. Kudryashov (7):
|
||||
exports: Move cmTargetExport to a dedicated header file
|
||||
exports: Remove cmTargetExport constructor
|
||||
exports: Rename cmGlobalGenerator::AddTargetToExport{s,}
|
||||
exports: Create class cmExportSet
|
||||
exports: Add cmExportSetMap class
|
||||
exports: Hold an ExportSet pointer in cm*Export*Generator
|
||||
exports: cmGlobalGenerator::ExportSets destructor will clear it
|
||||
|
||||
Zack Galbreath (2):
|
||||
Clean up documentation formatting so that it is rendered properly in HTML.
|
||||
cmparseMSBuildXML: Include DisplayName in the output
|
||||
|
||||
Changes in CMake 2.8.9 (since 2.8.9-rc3)
|
||||
----------------------------------------
|
||||
None
|
||||
|
|
|
@ -62,3 +62,9 @@ endif ()
|
|||
if (CMAKE_ANSI_CFLAGS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
|
||||
endif ()
|
||||
|
||||
# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
|
||||
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL parisc)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--unique=.text.*")
|
||||
endif ()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# This is a basic version file for the Config-mode of find_package().
|
||||
# It is used by WriteBasicConfigVersionFile.cmake as input file for configure_file()
|
||||
# It is used by write_basic_package_version_file() as input file for configure_file()
|
||||
# to create a version-file which can be installed along a config.cmake file.
|
||||
#
|
||||
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# This is a basic version file for the Config-mode of find_package().
|
||||
# It is used by WriteBasicConfigVersionFile.cmake as input file for configure_file()
|
||||
# It is used by write_basic_package_version_file() as input file for configure_file()
|
||||
# to create a version-file which can be installed along a config.cmake file.
|
||||
#
|
||||
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
This file provides a few notes to CMake developers about how to add
|
||||
support for a new language to CMake. It is also possible to place
|
||||
these files in CMAKE_MODULE_PATH within an outside project to add
|
||||
languages not supported by upstream CMake. However, this is not
|
||||
a fully supported use case.
|
||||
|
||||
The implementation behind the scenes of project/enable_language,
|
||||
including the compiler/platform modules, is an *internal* API that
|
||||
does not make any compatibility guarantees. It is not covered in the
|
||||
official reference documentation that is versioned with the source code.
|
||||
Maintainers of external language support are responsible for porting
|
||||
it to each version of CMake as upstream changes are made. Since
|
||||
the API is internal we will not necessarily include notice of any
|
||||
changes in release notes.
|
||||
|
||||
|
||||
CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in
|
||||
|
||||
CMake(LANG)Compiler.cmake.in -> used by CMakeDetermine(LANG)Compiler.cmake
|
||||
|
|
|
@ -77,6 +77,8 @@ endif()
|
|||
# This variable is used by the Eclipse generator and appended to the make invocation commands.
|
||||
set(CMAKE_ECLIPSE_MAKE_ARGUMENTS "${_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
|
||||
|
||||
set(CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES TRUE CACHE BOOL "If disabled, CMake will not generate linked resource to the subprojects and to the source files within targets")
|
||||
|
||||
# This variable is used by the Eclipse generator in out-of-source builds only.
|
||||
set(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
|
||||
mark_as_advanced(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,56 @@
|
|||
# - Find icotool
|
||||
# This module looks for icotool. This module defines the
|
||||
# following values:
|
||||
# ICOTOOL_EXECUTABLE: the full path to the icotool tool.
|
||||
# ICOTOOL_FOUND: True if icotool has been found.
|
||||
# ICOTOOL_VERSION_STRING: the version of icotool found.
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2012 Aleksey Avdeev <solo@altlinux.ru>
|
||||
#
|
||||
# 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.)
|
||||
|
||||
find_program(ICOTOOL_EXECUTABLE
|
||||
icotool
|
||||
)
|
||||
|
||||
if(ICOTOOL_EXECUTABLE)
|
||||
execute_process(
|
||||
COMMAND ${ICOTOOL_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE _icotool_version
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if("${_icotool_version}" MATCHES "^icotool \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*")
|
||||
set( ICOTOOL_VERSION_STRING
|
||||
"${CMAKE_MATCH_1}"
|
||||
)
|
||||
else()
|
||||
set( ICOTOOL_VERSION_STRING
|
||||
""
|
||||
)
|
||||
endif()
|
||||
unset(_icotool_version)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ICOTOOL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
Icotool
|
||||
REQUIRED_VARS ICOTOOL_EXECUTABLE
|
||||
VERSION_VAR ICOTOOL_VERSION_STRING
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
ICOTOOL_EXECUTABLE
|
||||
)
|
|
@ -31,7 +31,7 @@
|
|||
# License text for the above reference.)
|
||||
|
||||
# look for signs of qt3 installations
|
||||
file(GLOB GLOB_TEMP_VAR /usr/lib/qt-3*/bin/qmake)
|
||||
file(GLOB GLOB_TEMP_VAR /usr/lib*/qt-3*/bin/qmake /usr/lib*/qt3*/bin/qmake)
|
||||
if(GLOB_TEMP_VAR)
|
||||
set(QT3_INSTALLED TRUE)
|
||||
endif()
|
||||
|
@ -56,6 +56,10 @@ if(GLOB_TEMP_VAR)
|
|||
endif()
|
||||
set(GLOB_TEMP_VAR)
|
||||
|
||||
if (Qt_FIND_VERSION)
|
||||
set(DESIRED_QT_VERSION "${Qt_FIND_VERSION}")
|
||||
endif ()
|
||||
|
||||
# now find qmake
|
||||
find_program(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
|
||||
if(QT_QMAKE_EXECUTABLE_FINDQT)
|
||||
|
@ -113,15 +117,15 @@ if(QT3_QGLOBAL_H_FILE)
|
|||
set(QT3_INSTALLED TRUE)
|
||||
endif()
|
||||
|
||||
if(QT3_INSTALLED AND QT4_INSTALLED )
|
||||
if(QT3_INSTALLED AND QT4_INSTALLED AND NOT DESIRED_QT_VERSION)
|
||||
# force user to pick if we have both
|
||||
set(DESIRED_QT_VERSION 0 CACHE STRING "Pick a version of Qt to use: 3 or 4")
|
||||
else()
|
||||
# if only one found then pick that one
|
||||
if(QT3_INSTALLED)
|
||||
if(QT3_INSTALLED AND NOT DESIRED_QT_VERSION EQUAL 4)
|
||||
set(DESIRED_QT_VERSION 3 CACHE STRING "Pick a version of Qt to use: 3 or 4")
|
||||
endif()
|
||||
if(QT4_INSTALLED)
|
||||
if(QT4_INSTALLED AND NOT DESIRED_QT_VERSION EQUAL 3)
|
||||
set(DESIRED_QT_VERSION 4 CACHE STRING "Pick a version of Qt to use: 3 or 4")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
if(EXISTS /usr/include/dlfcn.h)
|
||||
set(CMAKE_DL_LIBS "")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
|
||||
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
||||
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
||||
endif()
|
||||
set(CMAKE_DL_LIBS "")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
|
||||
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
||||
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
||||
|
||||
# Shared libraries with no builtin soname may not be linked safely by
|
||||
# specifying the file path.
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
if(EXISTS /usr/include/dlfcn.h)
|
||||
set(CMAKE_DL_LIBS "")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
|
||||
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
||||
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
||||
endif()
|
||||
set(CMAKE_DL_LIBS "")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
|
||||
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
||||
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
||||
|
||||
include(Platform/UnixPaths)
|
||||
|
|
|
@ -48,24 +48,28 @@ macro( select_library_configurations basename )
|
|||
# if only the debug version was found, set the release value to be the
|
||||
# debug value.
|
||||
_set_library_name( ${basename} DEBUG RELEASE )
|
||||
|
||||
# Set a default case, which will come into effect if
|
||||
# -no build type is set and the generator only supports one build type
|
||||
# at a time (i.e. CMAKE_CONFIGURATION_TYPES is false)
|
||||
# -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are the same
|
||||
# -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are both empty
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
|
||||
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
|
||||
|
||||
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
|
||||
NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE )
|
||||
# if the generator supports configuration types or CMAKE_BUILD_TYPE
|
||||
# is set, then set optimized and debug options.
|
||||
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
set( ${basename}_LIBRARY )
|
||||
foreach( _libname LISTS ${basename}_LIBRARY_RELEASE )
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE )
|
||||
list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
|
||||
endforeach()
|
||||
foreach( _libname LISTS ${basename}_LIBRARY_DEBUG )
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG )
|
||||
list( APPEND ${basename}_LIBRARY debug "${_libname}" )
|
||||
endforeach()
|
||||
set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
|
||||
else()
|
||||
# If there are no configuration types or build type, just use
|
||||
# the release version
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
|
||||
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# CMake version number components.
|
||||
set(CMake_VERSION_MAJOR 2)
|
||||
set(CMake_VERSION_MINOR 8)
|
||||
set(CMake_VERSION_PATCH 9)
|
||||
set(CMake_VERSION_TWEAK 20121017)
|
||||
set(CMake_VERSION_PATCH 10)
|
||||
set(CMake_VERSION_TWEAK 20121104)
|
||||
#set(CMake_VERSION_RC 1)
|
||||
|
|
|
@ -42,7 +42,9 @@ public:
|
|||
class cmCPackComponent
|
||||
{
|
||||
public:
|
||||
cmCPackComponent() : Group(0), TotalSize(0) { }
|
||||
cmCPackComponent() : Group(0), IsRequired(true), IsHidden(false),
|
||||
IsDisabledByDefault(false), IsDownloaded(false),
|
||||
TotalSize(0) { }
|
||||
|
||||
/// The name of the component (used to reference the component).
|
||||
std::string Name;
|
||||
|
|
|
@ -442,7 +442,22 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
|||
line.replace(pos, 1, "\\\"");
|
||||
pos = line.find('\"', pos+2);
|
||||
}
|
||||
osf << " \"" << line << "\\n\"\n";
|
||||
// break up long lines to avoid Rez errors
|
||||
std::vector<std::string> lines;
|
||||
const size_t max_line_length = 512;
|
||||
for(size_t i=0; i<line.size(); i+= max_line_length)
|
||||
{
|
||||
int line_length = max_line_length;
|
||||
if(i+max_line_length > line.size())
|
||||
line_length = line.size()-i;
|
||||
lines.push_back(line.substr(i, line_length));
|
||||
}
|
||||
|
||||
for(size_t i=0; i<lines.size(); i++)
|
||||
{
|
||||
osf << " \"" << lines[i] << "\"\n";
|
||||
}
|
||||
osf << " \"\\n\"\n";
|
||||
}
|
||||
osf << "};\n";
|
||||
osf << "\n";
|
||||
|
|
|
@ -356,18 +356,30 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||
<< std::endl);
|
||||
std::vector<std::string> path;
|
||||
std::string nsisPath;
|
||||
bool gotRegValue = true;
|
||||
bool gotRegValue = false;
|
||||
|
||||
#ifdef _WIN32
|
||||
if ( !cmsys::SystemTools::ReadRegistryValue(
|
||||
if ( !gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath,
|
||||
cmsys::SystemTools::KeyWOW64_32) )
|
||||
{
|
||||
gotRegValue = true;
|
||||
}
|
||||
if ( !gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath) )
|
||||
{
|
||||
gotRegValue = true;
|
||||
}
|
||||
if ( !gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
||||
cmsys::SystemTools::KeyWOW64_32) )
|
||||
{
|
||||
if ( !cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) )
|
||||
{
|
||||
gotRegValue = false;
|
||||
}
|
||||
gotRegValue = true;
|
||||
}
|
||||
if ( !gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) )
|
||||
{
|
||||
gotRegValue = true;
|
||||
}
|
||||
|
||||
if (gotRegValue)
|
||||
|
|
|
@ -106,56 +106,101 @@ int cmCPackPackageMakerGenerator::PackageFiles()
|
|||
resDir += "/en.lproj";
|
||||
}
|
||||
|
||||
|
||||
// Create directory structure
|
||||
std::string preflightDirName = resDir + "/PreFlight";
|
||||
std::string postflightDirName = resDir + "/PostFlight";
|
||||
const char* preflight = this->GetOption("CPACK_PREFLIGHT_SCRIPT");
|
||||
const char* postflight = this->GetOption("CPACK_POSTFLIGHT_SCRIPT");
|
||||
const char* postupgrade = this->GetOption("CPACK_POSTUPGRADE_SCRIPT");
|
||||
// if preflight or postflight scripts not there create directories
|
||||
// of the same name, I think this makes it work
|
||||
if(!preflight)
|
||||
|
||||
if(this->Components.empty())
|
||||
{
|
||||
if ( !cmsys::SystemTools::MakeDirectory(preflightDirName.c_str()))
|
||||
// Create directory structure
|
||||
std::string preflightDirName = resDir + "/PreFlight";
|
||||
std::string postflightDirName = resDir + "/PostFlight";
|
||||
// if preflight or postflight scripts not there create directories
|
||||
// of the same name, I think this makes it work
|
||||
if(!preflight)
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem creating installer directory: "
|
||||
<< preflightDirName.c_str() << std::endl);
|
||||
return 0;
|
||||
if ( !cmsys::SystemTools::MakeDirectory(preflightDirName.c_str()))
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem creating installer directory: "
|
||||
<< preflightDirName.c_str() << std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if(!postflight)
|
||||
{
|
||||
if ( !cmsys::SystemTools::MakeDirectory(postflightDirName.c_str()))
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem creating installer directory: "
|
||||
<< postflightDirName.c_str() << std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
// if preflight, postflight, or postupgrade are set
|
||||
// then copy them into the resource directory and make
|
||||
// them executable
|
||||
if(preflight)
|
||||
{
|
||||
this->CopyInstallScript(resDir.c_str(),
|
||||
preflight,
|
||||
"preflight");
|
||||
}
|
||||
if(postflight)
|
||||
{
|
||||
this->CopyInstallScript(resDir.c_str(),
|
||||
postflight,
|
||||
"postflight");
|
||||
}
|
||||
if(postupgrade)
|
||||
{
|
||||
this->CopyInstallScript(resDir.c_str(),
|
||||
postupgrade,
|
||||
"postupgrade");
|
||||
}
|
||||
}
|
||||
if(!postflight)
|
||||
else if(postflight)
|
||||
{
|
||||
if ( !cmsys::SystemTools::MakeDirectory(postflightDirName.c_str()))
|
||||
// create a postflight component to house the script
|
||||
this->PostFlightComponent.Name = "PostFlight";
|
||||
this->PostFlightComponent.DisplayName = "PostFlight";
|
||||
this->PostFlightComponent.Description = "PostFlight";
|
||||
this->PostFlightComponent.IsHidden = true;
|
||||
|
||||
// empty directory for pkg contents
|
||||
std::string packageDir = toplevel + "/" + PostFlightComponent.Name;
|
||||
if (!cmsys::SystemTools::MakeDirectory(packageDir.c_str()))
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem creating installer directory: "
|
||||
<< postflightDirName.c_str() << std::endl);
|
||||
"Problem creating component packages directory: "
|
||||
<< packageDir.c_str() << std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
// if preflight, postflight, or postupgrade are set
|
||||
// then copy them into the resource directory and make
|
||||
// them executable
|
||||
if(preflight)
|
||||
{
|
||||
this->CopyInstallScript(resDir.c_str(),
|
||||
preflight,
|
||||
"preflight");
|
||||
}
|
||||
if(postflight)
|
||||
{
|
||||
this->CopyInstallScript(resDir.c_str(),
|
||||
|
||||
// create package
|
||||
std::string packageFileDir = packageDirFileName + "/Contents/Packages/";
|
||||
if (!cmsys::SystemTools::MakeDirectory(packageFileDir.c_str()))
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem creating component PostFlight Packages directory: "
|
||||
<< packageFileDir.c_str() << std::endl);
|
||||
return 0;
|
||||
}
|
||||
std::string packageFile = packageFileDir +
|
||||
this->GetPackageName(PostFlightComponent);
|
||||
if (!this->GenerateComponentPackage(packageFile.c_str(),
|
||||
packageDir.c_str(),
|
||||
PostFlightComponent))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// copy postflight script into resource directory of .pkg
|
||||
std::string resourceDir = packageFile + "/Contents/Resources";
|
||||
this->CopyInstallScript(resourceDir.c_str(),
|
||||
postflight,
|
||||
"postflight");
|
||||
}
|
||||
if(postupgrade)
|
||||
{
|
||||
this->CopyInstallScript(resDir.c_str(),
|
||||
postupgrade,
|
||||
"postupgrade");
|
||||
}
|
||||
|
||||
if (!this->Components.empty())
|
||||
{
|
||||
|
@ -778,6 +823,11 @@ WriteDistributionFile(const char* metapackageFile)
|
|||
<< std::endl;
|
||||
}
|
||||
}
|
||||
if(!this->PostFlightComponent.Name.empty())
|
||||
{
|
||||
choiceOut << "<line choice=\"" << PostFlightComponent.Name
|
||||
<< "Choice\"></line>" << std::endl;
|
||||
}
|
||||
choiceOut << "</choices-outline>" << std::endl;
|
||||
|
||||
// Create the actual choices
|
||||
|
@ -792,6 +842,12 @@ WriteDistributionFile(const char* metapackageFile)
|
|||
{
|
||||
CreateChoice(compIt->second, choiceOut);
|
||||
}
|
||||
|
||||
if(!this->PostFlightComponent.Name.empty())
|
||||
{
|
||||
CreateChoice(PostFlightComponent, choiceOut);
|
||||
}
|
||||
|
||||
this->SetOption("CPACK_PACKAGEMAKER_CHOICES", choiceOut.str().c_str());
|
||||
|
||||
// Create the distribution.dist file in the metapackage to turn it
|
||||
|
|
|
@ -112,6 +112,9 @@ protected:
|
|||
// value.
|
||||
std::string EscapeForXML(std::string str);
|
||||
|
||||
// The PostFlight component when creating a metapackage
|
||||
cmCPackComponent PostFlightComponent;
|
||||
|
||||
double PackageMakerVersion;
|
||||
double PackageCompatibilityVersion;
|
||||
};
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
"\n" \
|
||||
"Do not set properties that affect the location of a target after " \
|
||||
action ". These include properties whose names match " \
|
||||
"\"(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_<CONFIG>)?\" " \
|
||||
"or \"(IMPLIB_)?(PREFIX|SUFFIX)\". " \
|
||||
"\"(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_<CONFIG>)?\", " \
|
||||
"\"(IMPLIB_)?(PREFIX|SUFFIX)\", or \"LINKER_LANGUAGE\". " \
|
||||
"Failure to follow this rule is not diagnosed and leaves the location " \
|
||||
"of the target undefined."
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ cmExtraEclipseCDT4Generator
|
|||
this->SupportedGlobalGenerators.push_back("Unix Makefiles");
|
||||
|
||||
this->SupportsVirtualFolders = true;
|
||||
this->GenerateLinkedResources = true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -83,6 +84,9 @@ void cmExtraEclipseCDT4Generator::Generate()
|
|||
this->HomeDirectory = mf->GetHomeDirectory();
|
||||
this->HomeOutputDirectory = mf->GetHomeOutputDirectory();
|
||||
|
||||
this->GenerateLinkedResources = mf->IsOn(
|
||||
"CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES");
|
||||
|
||||
this->IsOutOfSourceBuild = (this->HomeDirectory!=this->HomeOutputDirectory);
|
||||
|
||||
this->GenerateSourceProject = (this->IsOutOfSourceBuild &&
|
||||
|
@ -501,6 +505,10 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
|
|||
linkName2 += ti->first;
|
||||
this->AppendLinkedResource(fout, linkName2, "virtual:/virtual",
|
||||
VirtualFolder);
|
||||
if (!this->GenerateLinkedResources)
|
||||
{
|
||||
break; // skip generating the linked resources to the source files
|
||||
}
|
||||
std::vector<cmSourceGroup> sourceGroups=makefile->GetSourceGroups();
|
||||
// get the files from the source lists then add them to the groups
|
||||
cmTarget* tgt = const_cast<cmTarget*>(&ti->second);
|
||||
|
@ -555,6 +563,11 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
|
|||
void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects(
|
||||
cmGeneratedFileStream& fout, const std::string& baseDir)
|
||||
{
|
||||
if (!this->GenerateLinkedResources)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 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]",
|
||||
|
@ -889,6 +902,10 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
|||
for (cmGeneratorTargetsType::iterator l = targets.begin();
|
||||
l != targets.end(); ++l)
|
||||
{
|
||||
if (l->first->IsImported())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
std::vector<std::string> includeDirs;
|
||||
const char *config = mf->GetDefinition("CMAKE_BUILD_TYPE");
|
||||
(*it)->GetIncludeDirectories(includeDirs, l->second, "C", config);
|
||||
|
|
|
@ -109,6 +109,7 @@ private:
|
|||
std::string HomeOutputDirectory;
|
||||
bool IsOutOfSourceBuild;
|
||||
bool GenerateSourceProject;
|
||||
bool GenerateLinkedResources;
|
||||
bool SupportsVirtualFolders;
|
||||
|
||||
};
|
||||
|
|
|
@ -15,6 +15,8 @@ cmFindBase::cmFindBase()
|
|||
{
|
||||
this->AlreadyInCache = false;
|
||||
this->AlreadyInCacheWithoutMetaInfo = false;
|
||||
this->NamesPerDir = false;
|
||||
this->NamesPerDirAllowed = false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -213,6 +215,19 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
|
|||
compatibility = false;
|
||||
newStyle = true;
|
||||
}
|
||||
else if (args[j] == "NAMES_PER_DIR")
|
||||
{
|
||||
doing = DoingNone;
|
||||
if(this->NamesPerDirAllowed)
|
||||
{
|
||||
this->NamesPerDir = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->SetError("does not support NAMES_PER_DIR");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (args[j] == "NO_SYSTEM_PATH")
|
||||
{
|
||||
doing = DoingNone;
|
||||
|
|
|
@ -49,6 +49,8 @@ protected:
|
|||
cmStdString VariableDocumentation;
|
||||
cmStdString VariableName;
|
||||
std::vector<std::string> Names;
|
||||
bool NamesPerDir;
|
||||
bool NamesPerDirAllowed;
|
||||
|
||||
// CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM
|
||||
cmStdString EnvironmentPath; // LIB,INCLUDE
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
cmFindLibraryCommand::cmFindLibraryCommand()
|
||||
{
|
||||
this->EnvironmentPath = "LIB";
|
||||
this->NamesPerDirAllowed = true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -44,6 +45,9 @@ void cmFindLibraryCommand::GenerateDocumentation()
|
|||
"SEARCH_XXX", "library");
|
||||
cmSystemTools::ReplaceString(this->GenericDocumentation,
|
||||
"XXX_SUBDIR", "lib");
|
||||
cmSystemTools::ReplaceString(this->GenericDocumentation,
|
||||
"NAMES name1 [name2 ...]",
|
||||
"NAMES name1 [name2 ...] [NAMES_PER_DIR]");
|
||||
cmSystemTools::ReplaceString(
|
||||
this->GenericDocumentation,
|
||||
"XXX_EXTRA_PREFIX_ENTRY",
|
||||
|
@ -52,6 +56,12 @@ void cmFindLibraryCommand::GenerateDocumentation()
|
|||
"CMAKE_FIND_ROOT_PATH_MODE_XXX",
|
||||
"CMAKE_FIND_ROOT_PATH_MODE_LIBRARY");
|
||||
this->GenericDocumentation +=
|
||||
"\n"
|
||||
"When more than one value is given to the NAMES option this command "
|
||||
"by default will consider one name at a time and search every directory "
|
||||
"for it. "
|
||||
"The NAMES_PER_DIR option tells this command to consider one directory "
|
||||
"at a time and search for all names in it."
|
||||
"\n"
|
||||
"If the library found is a framework, then VAR will be set to "
|
||||
"the full path to the framework <fullPath>/A.framework. "
|
||||
|
@ -220,18 +230,19 @@ struct cmFindLibraryHelper
|
|||
// Keep track of the best library file found so far.
|
||||
typedef std::vector<std::string>::size_type size_type;
|
||||
std::string BestPath;
|
||||
size_type BestPrefix;
|
||||
size_type BestSuffix;
|
||||
|
||||
// Support for OpenBSD shared library naming: lib<name>.so.<major>.<minor>
|
||||
bool OpenBSD;
|
||||
unsigned int BestMajor;
|
||||
unsigned int BestMinor;
|
||||
|
||||
// Current name under consideration.
|
||||
cmsys::RegularExpression NameRegex;
|
||||
bool TryRawName;
|
||||
std::string RawName;
|
||||
// Current names under consideration.
|
||||
struct Name
|
||||
{
|
||||
bool TryRaw;
|
||||
std::string Raw;
|
||||
cmsys::RegularExpression Regex;
|
||||
Name(): TryRaw(false) {}
|
||||
};
|
||||
std::vector<Name> Names;
|
||||
|
||||
// Current full path under consideration.
|
||||
std::string TestPath;
|
||||
|
@ -249,8 +260,9 @@ struct cmFindLibraryHelper
|
|||
suffix) - this->Suffixes.begin();
|
||||
}
|
||||
bool HasValidSuffix(std::string const& name);
|
||||
void SetName(std::string const& name);
|
||||
void AddName(std::string const& name);
|
||||
bool CheckDirectory(std::string const& path);
|
||||
bool CheckDirectoryForName(std::string const& path, Name& name);
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -273,14 +285,6 @@ cmFindLibraryHelper::cmFindLibraryHelper(cmMakefile* mf):
|
|||
this->OpenBSD =
|
||||
this->Makefile->GetCMakeInstance()
|
||||
->GetPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
|
||||
|
||||
this->TryRawName = false;
|
||||
|
||||
// No library file has yet been found.
|
||||
this->BestPrefix = this->Prefixes.size();
|
||||
this->BestSuffix = this->Suffixes.size();
|
||||
this->BestMajor = 0;
|
||||
this->BestMinor = 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -353,11 +357,13 @@ bool cmFindLibraryHelper::HasValidSuffix(std::string const& name)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmFindLibraryHelper::SetName(std::string const& name)
|
||||
void cmFindLibraryHelper::AddName(std::string const& name)
|
||||
{
|
||||
Name entry;
|
||||
|
||||
// Consider checking the raw name too.
|
||||
this->TryRawName = this->HasValidSuffix(name);
|
||||
this->RawName = name;
|
||||
entry.TryRaw = this->HasValidSuffix(name);
|
||||
entry.Raw = name;
|
||||
|
||||
// Build a regular expression to match library names.
|
||||
std::string regex = "^";
|
||||
|
@ -369,21 +375,37 @@ void cmFindLibraryHelper::SetName(std::string const& name)
|
|||
regex += "(\\.[0-9]+\\.[0-9]+)?";
|
||||
}
|
||||
regex += "$";
|
||||
this->NameRegex.compile(regex.c_str());
|
||||
entry.Regex.compile(regex.c_str());
|
||||
this->Names.push_back(entry);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmFindLibraryHelper::CheckDirectory(std::string const& path)
|
||||
{
|
||||
for(std::vector<Name>::iterator i = this->Names.begin();
|
||||
i != this->Names.end(); ++i)
|
||||
{
|
||||
if(this->CheckDirectoryForName(path, *i))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path,
|
||||
Name& name)
|
||||
{
|
||||
// If the original library name provided by the user matches one of
|
||||
// the suffixes, try it first. This allows users to search
|
||||
// specifically for a static library on some platforms (on MS tools
|
||||
// one cannot tell just from the library name whether it is a static
|
||||
// library or an import library).
|
||||
if(this->TryRawName)
|
||||
if(name.TryRaw)
|
||||
{
|
||||
this->TestPath = path;
|
||||
this->TestPath += this->RawName;
|
||||
this->TestPath += name.Raw;
|
||||
if(cmSystemTools::FileExists(this->TestPath.c_str(), true))
|
||||
{
|
||||
this->BestPath =
|
||||
|
@ -393,6 +415,12 @@ bool cmFindLibraryHelper::CheckDirectory(std::string const& path)
|
|||
}
|
||||
}
|
||||
|
||||
// No library file has yet been found.
|
||||
size_type bestPrefix = this->Prefixes.size();
|
||||
size_type bestSuffix = this->Suffixes.size();
|
||||
unsigned int bestMajor = 0;
|
||||
unsigned int bestMinor = 0;
|
||||
|
||||
// Search for a file matching the library name regex.
|
||||
std::string dir = path;
|
||||
cmSystemTools::ConvertToUnixSlashes(dir);
|
||||
|
@ -406,7 +434,7 @@ bool cmFindLibraryHelper::CheckDirectory(std::string const& path)
|
|||
#else
|
||||
std::string const& testName = origName;
|
||||
#endif
|
||||
if(this->NameRegex.find(testName))
|
||||
if(name.Regex.find(testName))
|
||||
{
|
||||
this->TestPath = path;
|
||||
this->TestPath += origName;
|
||||
|
@ -416,25 +444,25 @@ bool cmFindLibraryHelper::CheckDirectory(std::string const& path)
|
|||
// best name found so far. Earlier prefixes are preferred,
|
||||
// followed by earlier suffixes. For OpenBSD, shared library
|
||||
// version extensions are compared.
|
||||
size_type prefix = this->GetPrefixIndex(this->NameRegex.match(1));
|
||||
size_type suffix = this->GetSuffixIndex(this->NameRegex.match(2));
|
||||
size_type prefix = this->GetPrefixIndex(name.Regex.match(1));
|
||||
size_type suffix = this->GetSuffixIndex(name.Regex.match(2));
|
||||
unsigned int major = 0;
|
||||
unsigned int minor = 0;
|
||||
if(this->OpenBSD)
|
||||
{
|
||||
sscanf(this->NameRegex.match(3).c_str(), ".%u.%u", &major, &minor);
|
||||
sscanf(name.Regex.match(3).c_str(), ".%u.%u", &major, &minor);
|
||||
}
|
||||
if(this->BestPath.empty() || prefix < this->BestPrefix ||
|
||||
(prefix == this->BestPrefix && suffix < this->BestSuffix) ||
|
||||
(prefix == this->BestPrefix && suffix == this->BestSuffix &&
|
||||
(major > this->BestMajor ||
|
||||
(major == this->BestMajor && minor > this->BestMinor))))
|
||||
if(this->BestPath.empty() || prefix < bestPrefix ||
|
||||
(prefix == bestPrefix && suffix < bestSuffix) ||
|
||||
(prefix == bestPrefix && suffix == bestSuffix &&
|
||||
(major > bestMajor ||
|
||||
(major == bestMajor && minor > bestMinor))))
|
||||
{
|
||||
this->BestPath = this->TestPath;
|
||||
this->BestPrefix = prefix;
|
||||
this->BestSuffix = suffix;
|
||||
this->BestMajor = major;
|
||||
this->BestMinor = minor;
|
||||
bestPrefix = prefix;
|
||||
bestSuffix = suffix;
|
||||
bestMajor = major;
|
||||
bestMinor = minor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -446,6 +474,42 @@ bool cmFindLibraryHelper::CheckDirectory(std::string const& path)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmFindLibraryCommand::FindNormalLibrary()
|
||||
{
|
||||
if(this->NamesPerDir)
|
||||
{
|
||||
return this->FindNormalLibraryNamesPerDir();
|
||||
}
|
||||
else
|
||||
{
|
||||
return this->FindNormalLibraryDirsPerName();
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmFindLibraryCommand::FindNormalLibraryNamesPerDir()
|
||||
{
|
||||
// Search for all names in each directory.
|
||||
cmFindLibraryHelper helper(this->Makefile);
|
||||
for(std::vector<std::string>::const_iterator ni = this->Names.begin();
|
||||
ni != this->Names.end() ; ++ni)
|
||||
{
|
||||
helper.AddName(*ni);
|
||||
}
|
||||
// Search every directory.
|
||||
for(std::vector<std::string>::const_iterator
|
||||
p = this->SearchPaths.begin(); p != this->SearchPaths.end(); ++p)
|
||||
{
|
||||
if(helper.CheckDirectory(*p))
|
||||
{
|
||||
return helper.BestPath;
|
||||
}
|
||||
}
|
||||
// Couldn't find the library.
|
||||
return "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmFindLibraryCommand::FindNormalLibraryDirsPerName()
|
||||
{
|
||||
// Search the entire path for each name.
|
||||
cmFindLibraryHelper helper(this->Makefile);
|
||||
|
@ -454,7 +518,7 @@ std::string cmFindLibraryCommand::FindNormalLibrary()
|
|||
{
|
||||
// Switch to searching for this name.
|
||||
std::string const& name = *ni;
|
||||
helper.SetName(name);
|
||||
helper.AddName(name);
|
||||
|
||||
// Search every directory.
|
||||
for(std::vector<std::string>::const_iterator
|
||||
|
@ -474,19 +538,60 @@ std::string cmFindLibraryCommand::FindNormalLibrary()
|
|||
//----------------------------------------------------------------------------
|
||||
std::string cmFindLibraryCommand::FindFrameworkLibrary()
|
||||
{
|
||||
// Search for a framework of each name in the entire search path.
|
||||
for(std::vector<std::string>::const_iterator ni = this->Names.begin();
|
||||
ni != this->Names.end() ; ++ni)
|
||||
if(this->NamesPerDir)
|
||||
{
|
||||
// Search the paths for a framework with this name.
|
||||
std::string fwName = *ni;
|
||||
fwName += ".framework";
|
||||
std::string fwPath = cmSystemTools::FindDirectory(fwName.c_str(),
|
||||
this->SearchPaths,
|
||||
true);
|
||||
if(!fwPath.empty())
|
||||
return this->FindFrameworkLibraryNamesPerDir();
|
||||
}
|
||||
else
|
||||
{
|
||||
return this->FindFrameworkLibraryDirsPerName();
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmFindLibraryCommand::FindFrameworkLibraryNamesPerDir()
|
||||
{
|
||||
std::string fwPath;
|
||||
// Search for all names in each search path.
|
||||
for(std::vector<std::string>::const_iterator di = this->SearchPaths.begin();
|
||||
di != this->SearchPaths.end(); ++di)
|
||||
{
|
||||
for(std::vector<std::string>::const_iterator ni = this->Names.begin();
|
||||
ni != this->Names.end() ; ++ni)
|
||||
{
|
||||
return fwPath;
|
||||
fwPath = *di;
|
||||
fwPath += *ni;
|
||||
fwPath += ".framework";
|
||||
if(cmSystemTools::FileIsDirectory(fwPath.c_str()))
|
||||
{
|
||||
return cmSystemTools::CollapseFullPath(fwPath.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No framework found.
|
||||
return "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmFindLibraryCommand::FindFrameworkLibraryDirsPerName()
|
||||
{
|
||||
std::string fwPath;
|
||||
// Search for each name in all search paths.
|
||||
for(std::vector<std::string>::const_iterator ni = this->Names.begin();
|
||||
ni != this->Names.end() ; ++ni)
|
||||
{
|
||||
for(std::vector<std::string>::const_iterator
|
||||
di = this->SearchPaths.begin();
|
||||
di != this->SearchPaths.end(); ++di)
|
||||
{
|
||||
fwPath = *di;
|
||||
fwPath += *ni;
|
||||
fwPath += ".framework";
|
||||
if(cmSystemTools::FileIsDirectory(fwPath.c_str()))
|
||||
{
|
||||
return cmSystemTools::CollapseFullPath(fwPath.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,11 @@ protected:
|
|||
virtual void GenerateDocumentation();
|
||||
private:
|
||||
std::string FindNormalLibrary();
|
||||
std::string FindNormalLibraryNamesPerDir();
|
||||
std::string FindNormalLibraryDirsPerName();
|
||||
std::string FindFrameworkLibrary();
|
||||
std::string FindFrameworkLibraryNamesPerDir();
|
||||
std::string FindFrameworkLibraryDirsPerName();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -277,8 +277,12 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
|||
"$<TARGET_PROPERTY:...> expression requires one or two parameters");
|
||||
return std::string();
|
||||
}
|
||||
cmsys::RegularExpression nameValidator;
|
||||
nameValidator.compile("^[A-Za-z0-9_.-]+$");
|
||||
cmsys::RegularExpression targetNameValidator;
|
||||
// The ':' is supported to allow use with IMPORTED targets. At least
|
||||
// Qt 4 and 5 IMPORTED targets use ':' as the namespace delimiter.
|
||||
targetNameValidator.compile("^[A-Za-z0-9_.:-]+$");
|
||||
cmsys::RegularExpression propertyNameValidator;
|
||||
propertyNameValidator.compile("^[A-Za-z0-9_]+$");
|
||||
|
||||
cmGeneratorTarget* target = context->Target;
|
||||
std::string propertyName = *parameters.begin();
|
||||
|
@ -301,9 +305,9 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
|||
|
||||
std::string targetName = parameters.front();
|
||||
propertyName = parameters[1];
|
||||
if (!nameValidator.find(targetName.c_str()))
|
||||
if (!targetNameValidator.find(targetName.c_str()))
|
||||
{
|
||||
if (!nameValidator.find(propertyName.c_str()))
|
||||
if (!propertyNameValidator.find(propertyName.c_str()))
|
||||
{
|
||||
::reportError(context, content->GetOriginalExpression(),
|
||||
"Target name and property name not supported.");
|
||||
|
@ -335,7 +339,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
|||
return std::string();
|
||||
}
|
||||
|
||||
if (!nameValidator.find(propertyName.c_str()))
|
||||
if (!propertyNameValidator.find(propertyName.c_str()))
|
||||
{
|
||||
::reportError(context, content->GetOriginalExpression(),
|
||||
"Property name not supported.");
|
||||
|
@ -480,7 +484,8 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
|
|||
std::string name = *parameters.begin();
|
||||
|
||||
cmsys::RegularExpression targetValidator;
|
||||
targetValidator.compile("^[A-Za-z0-9_.-]+$");
|
||||
// The ':' is supported to allow use with IMPORTED targets.
|
||||
targetValidator.compile("^[A-Za-z0-9_.:-]+$");
|
||||
if (!targetValidator.find(name.c_str()))
|
||||
{
|
||||
::reportError(context, content->GetOriginalExpression(),
|
||||
|
|
|
@ -1108,6 +1108,16 @@ void cmGlobalGenerator::CreateGeneratorTargets()
|
|||
this->ComputeTargetObjects(gt);
|
||||
generatorTargets[t] = gt;
|
||||
}
|
||||
|
||||
for(std::vector<cmTarget*>::const_iterator
|
||||
j = mf->GetOwnedImportedTargets().begin();
|
||||
j != mf->GetOwnedImportedTargets().end(); ++j)
|
||||
{
|
||||
cmGeneratorTarget* gt = new cmGeneratorTarget(*j);
|
||||
this->GeneratorTargets[*j] = gt;
|
||||
generatorTargets[*j] = gt;
|
||||
}
|
||||
|
||||
mf->SetGeneratorTargets(generatorTargets);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -495,8 +495,12 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
|
|||
(this->CurrentReRunCMakeMakefile.c_str());
|
||||
makefileStream.SetCopyIfDifferent(true);
|
||||
makefileStream << "# Generated by CMake, DO NOT EDIT\n";
|
||||
makefileStream << cmake::GetCMakeFilesDirectoryPostSlash();
|
||||
makefileStream << "cmake.check_cache: ";
|
||||
std::string checkCache = mf->GetHomeOutputDirectory();
|
||||
checkCache += "/";
|
||||
checkCache += cmake::GetCMakeFilesDirectoryPostSlash();
|
||||
checkCache += "cmake.check_cache";
|
||||
makefileStream << this->ConvertToRelativeForMake(checkCache.c_str())
|
||||
<< ": ";
|
||||
for(std::vector<std::string>::const_iterator i = lfiles.begin();
|
||||
i != lfiles.end(); ++i)
|
||||
{
|
||||
|
|
|
@ -177,3 +177,14 @@ void cmIDEOptions::RemoveFlag(const char* flag)
|
|||
{
|
||||
this->FlagMap.erase(flag);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmIDEOptions::GetFlag(const char* flag)
|
||||
{
|
||||
std::map<cmStdString, cmStdString>::iterator i = this->FlagMap.find(flag);
|
||||
if(i != this->FlagMap.end())
|
||||
{
|
||||
return i->second.c_str();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
void AddDefines(const char* defines);
|
||||
void AddFlag(const char* flag, const char* value);
|
||||
void RemoveFlag(const char* flag);
|
||||
const char* GetFlag(const char* flag);
|
||||
|
||||
protected:
|
||||
// create a map of xml tags to the values they should have in the output
|
||||
|
|
|
@ -745,6 +745,10 @@ void cmLocalGenerator
|
|||
for(cmGeneratorTargetsType::iterator l = tgts.begin();
|
||||
l != tgts.end(); l++)
|
||||
{
|
||||
if (l->first->IsImported())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
cmGeneratorTarget& target = *l->second;
|
||||
switch(target.GetType())
|
||||
{
|
||||
|
|
|
@ -519,6 +519,10 @@ public:
|
|||
* Get the list of targets, const version
|
||||
*/
|
||||
const cmTargets &GetTargets() const { return this->Targets; }
|
||||
const std::vector<cmTarget*> &GetOwnedImportedTargets() const
|
||||
{
|
||||
return this->ImportedTargetsOwned;
|
||||
}
|
||||
|
||||
const cmGeneratorTargetsType &GetGeneratorTargets() const
|
||||
{
|
||||
|
|
|
@ -182,8 +182,8 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
|
|||
{"SupportUnloadOfDelayLoadedDLL", "DELAY:UNLOAD", "", "true", 0},
|
||||
{"SupportNobindOfDelayLoadedDLL", "DELAY:NOBIND", "", "true", 0},
|
||||
{"Profile", "PROFILE", "", "true", 0},
|
||||
{"DelaySign", "DELAYSIGN:NO", "", "false", 0},
|
||||
{"DelaySign", "DELAYSIGN", "", "true", 0},
|
||||
{"LinkDelaySign", "DELAYSIGN:NO", "", "false", 0},
|
||||
{"LinkDelaySign", "DELAYSIGN", "", "true", 0},
|
||||
{"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0},
|
||||
{"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK", "", "true", 0},
|
||||
{"ImageHasSafeExceptionHandlers", "SAFESEH:NO", "", "false", 0},
|
||||
|
@ -294,7 +294,7 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
|
|||
{"MergeSections", "MERGE:",
|
||||
"Merge Sections",
|
||||
"", cmVS7FlagTable::UserValue},
|
||||
{"KeyFile", "KEYFILE:",
|
||||
{"LinkKeyFile", "KEYFILE:",
|
||||
"Key File",
|
||||
"", cmVS7FlagTable::UserValue},
|
||||
{"KeyContainer", "KEYCONTAINER:",
|
||||
|
|
|
@ -109,6 +109,11 @@ cmVisualStudio10TargetGenerator::~cmVisualStudio10TargetGenerator()
|
|||
{
|
||||
delete i->second;
|
||||
}
|
||||
for(OptionsMap::iterator i = this->LinkOptions.begin();
|
||||
i != this->LinkOptions.end(); ++i)
|
||||
{
|
||||
delete i->second;
|
||||
}
|
||||
if(!this->BuildFileStream)
|
||||
{
|
||||
return;
|
||||
|
@ -181,6 +186,10 @@ void cmVisualStudio10TargetGenerator::Generate()
|
|||
{
|
||||
return;
|
||||
}
|
||||
if(!this->ComputeLinkOptions())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
cmMakefile* mf = this->Target->GetMakefile();
|
||||
std::string path = mf->GetStartOutputDirectory();
|
||||
|
@ -1077,7 +1086,6 @@ void
|
|||
cmVisualStudio10TargetGenerator::
|
||||
OutputLinkIncremental(std::string const& configName)
|
||||
{
|
||||
std::string CONFIG = cmSystemTools::UpperCase(configName);
|
||||
// static libraries and things greater than modules do not need
|
||||
// to set this option
|
||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY
|
||||
|
@ -1085,72 +1093,36 @@ OutputLinkIncremental(std::string const& configName)
|
|||
{
|
||||
return;
|
||||
}
|
||||
const char* linkType = "SHARED";
|
||||
if(this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
{
|
||||
linkType = "EXE";
|
||||
}
|
||||
Options& linkOptions = *(this->LinkOptions[configName]);
|
||||
|
||||
// assume incremental linking
|
||||
const char* incremental = "true";
|
||||
const char* linkLanguage =
|
||||
this->Target->GetLinkerLanguage(configName.c_str());
|
||||
if(!linkLanguage)
|
||||
{
|
||||
cmSystemTools::Error
|
||||
("CMake can not determine linker language for target:",
|
||||
this->Name.c_str());
|
||||
return;
|
||||
}
|
||||
std::string linkFlagVarBase = "CMAKE_";
|
||||
linkFlagVarBase += linkType;
|
||||
linkFlagVarBase += "_LINKER_FLAGS";
|
||||
std::string flags = this->
|
||||
Target->GetMakefile()->GetRequiredDefinition(linkFlagVarBase.c_str());
|
||||
std::string linkFlagVar = linkFlagVarBase + "_" + CONFIG;
|
||||
flags += this->
|
||||
Target->GetMakefile()->GetRequiredDefinition(linkFlagVar.c_str());
|
||||
if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0
|
||||
|| strcmp(linkLanguage, "Fortran") == 0)
|
||||
{
|
||||
std::string baseFlagVar = "CMAKE_";
|
||||
baseFlagVar += linkLanguage;
|
||||
baseFlagVar += "_FLAGS";
|
||||
flags += this->
|
||||
Target->GetMakefile()->GetRequiredDefinition(baseFlagVar.c_str());
|
||||
std::string flagVar = baseFlagVar + std::string("_") + CONFIG;
|
||||
flags +=
|
||||
Target->GetMakefile()->GetRequiredDefinition(flagVar.c_str());
|
||||
}
|
||||
const char* targetLinkFlags = this->Target->GetProperty("LINK_FLAGS");
|
||||
if(targetLinkFlags)
|
||||
{
|
||||
flags += " ";
|
||||
flags += targetLinkFlags;
|
||||
}
|
||||
std::string flagsProp = "LINK_FLAGS_";
|
||||
flagsProp += CONFIG;
|
||||
if(const char* flagsConfig = this->Target->GetProperty(flagsProp.c_str()))
|
||||
{
|
||||
flags += " ";
|
||||
flags += flagsConfig;
|
||||
}
|
||||
if(flags.find("INCREMENTAL:NO") != flags.npos)
|
||||
{
|
||||
incremental = "false";
|
||||
}
|
||||
const char* incremental = linkOptions.GetFlag("LinkIncremental");
|
||||
this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 3);
|
||||
*this->BuildFileStream << incremental
|
||||
*this->BuildFileStream << (incremental?incremental:"true")
|
||||
<< "</LinkIncremental>\n";
|
||||
linkOptions.RemoveFlag("LinkIncremental");
|
||||
|
||||
const char* manifest = "true";
|
||||
if(flags.find("MANIFEST:NO") != flags.npos)
|
||||
{
|
||||
manifest = "false";
|
||||
}
|
||||
const char* manifest = linkOptions.GetFlag("GenerateManifest");
|
||||
this->WritePlatformConfigTag("GenerateManifest", configName.c_str(), 3);
|
||||
*this->BuildFileStream << manifest
|
||||
*this->BuildFileStream << (manifest?manifest:"true")
|
||||
<< "</GenerateManifest>\n";
|
||||
linkOptions.RemoveFlag("GenerateManifest");
|
||||
|
||||
// Some link options belong here. Use them now and remove them so that
|
||||
// WriteLinkOptions does not use them.
|
||||
const char* flags[] = {
|
||||
"LinkDelaySign",
|
||||
"LinkKeyFile",
|
||||
0};
|
||||
for(const char** f = flags; *f; ++f)
|
||||
{
|
||||
const char* flag = *f;
|
||||
if(const char* value = linkOptions.GetFlag(flag))
|
||||
{
|
||||
this->WritePlatformConfigTag(flag, configName.c_str(), 3);
|
||||
*this->BuildFileStream << value << "</" << flag << ">\n";
|
||||
linkOptions.RemoveFlag(flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -1343,18 +1315,36 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
||||
config)
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmVisualStudio10TargetGenerator::ComputeLinkOptions()
|
||||
{
|
||||
|
||||
// static libraries and things greater than modules do not need
|
||||
// to set this option
|
||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY
|
||||
|| this->Target->GetType() > cmTarget::MODULE_LIBRARY)
|
||||
if(this->Target->GetType() == cmTarget::EXECUTABLE ||
|
||||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
std::vector<std::string> const* configs =
|
||||
this->GlobalGenerator->GetConfigurations();
|
||||
for(std::vector<std::string>::const_iterator i = configs->begin();
|
||||
i != configs->end(); ++i)
|
||||
{
|
||||
if(!this->ComputeLinkOptions(*i))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||
{
|
||||
cmsys::auto_ptr<Options> pOptions(
|
||||
new Options(this->LocalGenerator, Options::Linker,
|
||||
cmVSGetLinkFlagTable(this->LocalGenerator), 0, this));
|
||||
Options& linkOptions = *pOptions;
|
||||
|
||||
const char* linkLanguage =
|
||||
this->Target->GetLinkerLanguage(config.c_str());
|
||||
if(!linkLanguage)
|
||||
|
@ -1362,10 +1352,9 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
|||
cmSystemTools::Error
|
||||
("CMake can not determine linker language for target:",
|
||||
this->Name.c_str());
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
this->WriteString("<Link>\n", 2);
|
||||
std::string CONFIG = cmSystemTools::UpperCase(config);
|
||||
|
||||
const char* linkType = "SHARED";
|
||||
|
@ -1387,7 +1376,6 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
|||
flags += " ";
|
||||
flags += stackVal;
|
||||
}
|
||||
// assume incremental linking
|
||||
std::string linkFlagVarBase = "CMAKE_";
|
||||
linkFlagVarBase += linkType;
|
||||
linkFlagVarBase += "_LINKER_FLAGS";
|
||||
|
@ -1411,10 +1399,6 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
|||
flags += " ";
|
||||
flags += flagsConfig;
|
||||
}
|
||||
cmVisualStudioGeneratorOptions
|
||||
linkOptions(this->LocalGenerator,
|
||||
cmVisualStudioGeneratorOptions::Linker,
|
||||
cmVSGetLinkFlagTable(this->LocalGenerator), 0, this);
|
||||
if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") )
|
||||
{
|
||||
flags += " /SUBSYSTEM:WINDOWS";
|
||||
|
@ -1423,8 +1407,6 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
|||
{
|
||||
flags += " /SUBSYSTEM:CONSOLE";
|
||||
}
|
||||
cmSystemTools::ReplaceString(flags, "/INCREMENTAL:YES", "");
|
||||
cmSystemTools::ReplaceString(flags, "/INCREMENTAL:NO", "");
|
||||
std::string standardLibsVar = "CMAKE_";
|
||||
standardLibsVar += linkLanguage;
|
||||
standardLibsVar += "_STANDARD_LIBRARIES";
|
||||
|
@ -1452,7 +1434,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
|||
cmSystemTools::Error
|
||||
("CMake can not compute cmComputeLinkInformation for target:",
|
||||
this->Name.c_str());
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
// add the libraries for the target to libs string
|
||||
cmComputeLinkInformation& cli = *pcli;
|
||||
|
@ -1521,7 +1503,22 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
|||
this->GeneratorTarget->ModuleDefinitionFile.c_str());
|
||||
}
|
||||
|
||||
linkOptions.RemoveFlag("GenerateManifest");
|
||||
this->LinkOptions[config] = pOptions.release();
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void
|
||||
cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& config)
|
||||
{
|
||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY
|
||||
|| this->Target->GetType() > cmTarget::MODULE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Options& linkOptions = *(this->LinkOptions[config]);
|
||||
this->WriteString("<Link>\n", 2);
|
||||
|
||||
linkOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
|
||||
linkOptions.OutputFlagMap(*this->BuildFileStream, " ");
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ private:
|
|||
std::vector<std::string> const & includes);
|
||||
void WriteRCOptions(std::string const& config,
|
||||
std::vector<std::string> const & includes);
|
||||
bool ComputeLinkOptions();
|
||||
bool ComputeLinkOptions(std::string const& config);
|
||||
void WriteLinkOptions(std::string const& config);
|
||||
void WriteMidlOptions(std::string const& config,
|
||||
std::vector<std::string> const & includes);
|
||||
|
@ -95,6 +97,7 @@ private:
|
|||
typedef cmVisualStudioGeneratorOptions Options;
|
||||
typedef std::map<cmStdString, Options*> OptionsMap;
|
||||
OptionsMap ClOptions;
|
||||
OptionsMap LinkOptions;
|
||||
std::string PathToVcxproj;
|
||||
cmTarget* Target;
|
||||
cmGeneratorTarget* GeneratorTarget;
|
||||
|
|
|
@ -70,8 +70,9 @@ endmacro()
|
|||
# If any of these modules reported that it was found a version number should have been
|
||||
# reported.
|
||||
|
||||
foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HG HSPELL
|
||||
JASPER LIBLZMA LIBXML2 LIBXSLT PERL PKG_CONFIG PostgreSQL TIFF ZLIB)
|
||||
foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HG
|
||||
HSPELL ICOTOOL JASPER LIBLZMA LIBXML2 LIBXSLT PERL PKG_CONFIG
|
||||
PostgreSQL TIFF ZLIB)
|
||||
check_version_string(${VTEST} ${VTEST}_VERSION_STRING)
|
||||
endforeach()
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ endif()
|
|||
|
||||
add_CMakeOnly_test(AllFindModules)
|
||||
|
||||
add_CMakeOnly_test(SelectLibraryConfigurations)
|
||||
|
||||
add_CMakeOnly_test(TargetScope)
|
||||
|
||||
add_CMakeOnly_test(find_library)
|
||||
|
@ -36,3 +38,21 @@ add_test(CMakeOnly.ProjectInclude ${CMAKE_CMAKE_COMMAND}
|
|||
-DCMAKE_ARGS=-DCMAKE_PROJECT_ProjectInclude_INCLUDE=${CMAKE_CURRENT_SOURCE_DIR}/ProjectInclude/include.cmake
|
||||
-P ${CMAKE_CURRENT_BINARY_DIR}/Test.cmake
|
||||
)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/Modules/CMakeParseArguments.cmake)
|
||||
|
||||
function(add_major_test module)
|
||||
cmake_parse_arguments(MAJOR_TEST "NOLANG" "VERSION_VAR" "VERSIONS" ${ARGN})
|
||||
foreach (_version IN LISTS MAJOR_TEST_VERSIONS)
|
||||
add_test(CMakeOnly.MajorVersionSelection-${module}_${_version}
|
||||
${CMAKE_CMAKE_COMMAND}
|
||||
-DTEST=MajorVersionSelection-${module}_${_version}
|
||||
-DTEST_SOURCE=MajorVersionSelection
|
||||
"-DCMAKE_ARGS=-DMAJOR_TEST_MODULE=${module};-DMAJOR_TEST_VERSION=${_version};-DMAJOR_TEST_NO_LANGUAGES=${MAJOR_TEST_NOLANG};-DMAJOR_TEST_VERSION_VAR=${MAJOR_TEST_VERSION_VAR}"
|
||||
-P ${CMAKE_CURRENT_BINARY_DIR}/Test.cmake
|
||||
)
|
||||
endforeach ()
|
||||
endfunction()
|
||||
|
||||
add_major_test(PythonLibs VERSIONS 2 3 VERSION_VAR PYTHONLIBS_VERSION_STRING)
|
||||
add_major_test(PythonInterp NOLANG VERSIONS 2 3 VERSION_VAR PYTHON_VERSION_STRING)
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
if (NOT MAJOR_TEST_MODULE OR NOT MAJOR_TEST_VERSION)
|
||||
message(FATAL_ERROR "test selection variables not set up")
|
||||
endif ()
|
||||
|
||||
if (MAJOR_TEST_NO_LANGUAGES)
|
||||
project(major_detect_${MAJOR_TEST_MODULE}_${MAJOR_TEST_VERSION} NONE)
|
||||
else ()
|
||||
project(major_detect_${MAJOR_TEST_MODULE}_${MAJOR_TEST_VERSION})
|
||||
endif ()
|
||||
|
||||
find_package(${MAJOR_TEST_MODULE} ${MAJOR_TEST_VERSION})
|
||||
|
||||
if (MAJOR_TEST_VERSION_VAR)
|
||||
set(VERSION_VAR "${MAJOR_TEST_VERSION_VAR}")
|
||||
else ()
|
||||
set(VERSION_VAR "${MAJOR_TEST_MODULE}_VERSION_STRING")
|
||||
endif ()
|
||||
|
||||
string(TOUPPER "${MAJOR_TEST_MODULE}" MODULE_UPPER)
|
||||
|
||||
if ( ( ${MAJOR_TEST_MODULE}_FOUND OR ${MODULE_UPPER}_FOUND ) AND "${VERSION_VAR}")
|
||||
message(STATUS "${VERSION_VAR} is '${${VERSION_VAR}}'")
|
||||
if ("${VERSION_VAR}" VERSION_LESS MAJOR_TEST_VERSION)
|
||||
message(SEND_ERROR "Found version ${${VERSION_VAR}} is less than requested major version ${MAJOR_TEST_VERSION}")
|
||||
endif ()
|
||||
math(EXPR V_PLUS_ONE "${MAJOR_TEST_VERSION} + 1")
|
||||
if ("${VERSION_VAR}" VERSION_GREATER V_PLUS_ONE)
|
||||
message(SEND_ERROR "Found version ${${VERSION_VAR}} is greater than requested major version ${MAJOR_TEST_VERSION}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if ( ( ${MAJOR_TEST_MODULE}_FOUND OR ${MODULE_UPPER}_FOUND ) AND ${MAJOR_TEST_MODULE}_VERSION_MAJOR)
|
||||
message(STATUS "${MAJOR_TEST_MODULE}_VERSION_MAJOR is '${${MAJOR_TEST_MODULE}_VERSION_MAJOR}'")
|
||||
if (NOT ${MAJOR_TEST_VERSION} EQUAL ${MAJOR_TEST_MODULE}_VERSION_MAJOR)
|
||||
message(SEND_ERROR "We requested major version ${MAJOR_TEST_VERSION} but ${MAJOR_TEST_MODULE} set ${MAJOR_TEST_MODULE}_VERSION_MAJOR to ${${MAJOR_TEST_MODULE}_VERSION_MAJOR}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if ( ( ${MAJOR_TEST_MODULE}_FOUND OR ${MODULE_UPPER}_FOUND ) AND ${MODULE_UPPER}_VERSION_MAJOR)
|
||||
message(STATUS "${MODULE_UPPER}_VERSION_MAJOR is '${${MODULE_UPPER}_VERSION_MAJOR}'")
|
||||
if (NOT ${MAJOR_TEST_VERSION} EQUAL ${MODULE_UPPER}_VERSION_MAJOR)
|
||||
message(SEND_ERROR "We requested major version ${MAJOR_TEST_VERSION} but ${MAJOR_TEST_MODULE} set ${MODULE_UPPER}_VERSION_MAJOR to ${${MODULE_UPPER}_VERSION_MAJOR}")
|
||||
endif ()
|
||||
endif ()
|
|
@ -0,0 +1,64 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(SelectLibraryConfigurations NONE)
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
|
||||
macro(check_slc basename expect)
|
||||
message(STATUS "checking select_library_configurations(${basename})")
|
||||
select_library_configurations(${basename})
|
||||
if (NOT ${basename}_LIBRARY STREQUAL "${expect}")
|
||||
message(SEND_ERROR "select_library_configurations(${basename}) returned '${${basename}_LIBRARY}' but '${expect}' was expected")
|
||||
endif ()
|
||||
if (NOT ${basename}_LIBRARY STREQUAL "${${basename}_LIBRARIES}")
|
||||
message(SEND_ERROR "select_library_configurations(${basename}) LIBRARY: '${${basename}_LIBRARY}' LIBRARIES: '${${basename}_LIBRARIES}'")
|
||||
endif ()
|
||||
endmacro(check_slc)
|
||||
|
||||
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
set(NOTYPE_RELONLY_LIBRARY_RELEASE "opt")
|
||||
check_slc(NOTYPE_RELONLY "opt")
|
||||
|
||||
set(NOTYPE_DBGONLY_LIBRARY_DEBUG "dbg")
|
||||
check_slc(NOTYPE_DBGONLY "dbg")
|
||||
|
||||
set(NOTYPE_RELDBG_LIBRARY_RELEASE "opt")
|
||||
set(NOTYPE_RELDBG_LIBRARY_DEBUG "dbg")
|
||||
check_slc(NOTYPE_RELDBG "opt")
|
||||
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif ()
|
||||
|
||||
check_slc(empty "")
|
||||
|
||||
set(OPTONLY_LIBRARY_RELEASE "opt")
|
||||
check_slc(OPTONLY "opt")
|
||||
|
||||
set(DBGONLY_LIBRARY_RELEASE "dbg")
|
||||
check_slc(DBGONLY "dbg")
|
||||
|
||||
set(SAME_LIBRARY_RELEASE "same")
|
||||
set(SAME_LIBRARY_DEBUG "same")
|
||||
check_slc(SAME "same")
|
||||
|
||||
set(OPTONLYLIST_LIBRARY_RELEASE "opt1;opt2")
|
||||
check_slc(OPTONLYLIST "opt1;opt2")
|
||||
|
||||
set(DBGONLYLIST_LIBRARY_RELEASE "dbg1;dbg2")
|
||||
check_slc(DBGONLYLIST "dbg1;dbg2")
|
||||
|
||||
set(OPT1DBG1_LIBRARY_RELEASE "opt")
|
||||
set(OPT1DBG1_LIBRARY_DEBUG "dbg")
|
||||
check_slc(OPT1DBG1 "optimized;opt;debug;dbg")
|
||||
|
||||
set(OPT1DBG2_LIBRARY_RELEASE "opt")
|
||||
set(OPT1DBG2_LIBRARY_DEBUG "dbg1;dbg2")
|
||||
check_slc(OPT1DBG2 "optimized;opt;debug;dbg1;debug;dbg2")
|
||||
|
||||
set(OPT2DBG1_LIBRARY_RELEASE "opt1;opt2")
|
||||
set(OPT2DBG1_LIBRARY_DEBUG "dbg")
|
||||
check_slc(OPT2DBG1 "optimized;opt1;optimized;opt2;debug;dbg")
|
||||
|
||||
set(OPT2DBG2_LIBRARY_RELEASE "opt1;opt2")
|
||||
set(OPT2DBG2_LIBRARY_DEBUG "dbg1;dbg2")
|
||||
check_slc(OPT2DBG2 "optimized;opt1;optimized;opt2;debug;dbg1;debug;dbg2")
|
|
@ -1,4 +1,8 @@
|
|||
set(source_dir "@CMAKE_CURRENT_SOURCE_DIR@/${TEST}")
|
||||
if (NOT TEST_SOURCE)
|
||||
set(TEST_SOURCE "${TEST}")
|
||||
endif ()
|
||||
|
||||
set(source_dir "@CMAKE_CURRENT_SOURCE_DIR@/${TEST_SOURCE}")
|
||||
set(binary_dir "@CMAKE_CURRENT_BINARY_DIR@/${TEST}-build")
|
||||
file(REMOVE_RECURSE "${binary_dir}")
|
||||
file(MAKE_DIRECTORY "${binary_dir}")
|
||||
|
|
|
@ -3,34 +3,34 @@ project(FindLibraryTest NONE)
|
|||
|
||||
set(CMAKE_FIND_DEBUG_MODE 1)
|
||||
|
||||
macro(test_find_library expected)
|
||||
get_filename_component(dir ${expected} PATH)
|
||||
get_filename_component(name ${expected} NAME)
|
||||
string(REGEX REPLACE "lib/?64" "lib" dir "${dir}")
|
||||
macro(test_find_library desc expected)
|
||||
unset(LIB CACHE)
|
||||
find_library(LIB
|
||||
NAMES ${name}
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/${dir}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(LIB ${ARGN} NO_DEFAULT_PATH)
|
||||
if(LIB)
|
||||
# Convert to relative path for comparison to expected location.
|
||||
file(RELATIVE_PATH REL_LIB "${CMAKE_CURRENT_SOURCE_DIR}" "${LIB}")
|
||||
|
||||
# Debugging output.
|
||||
if(CMAKE_FIND_DEBUG_MODE)
|
||||
message(STATUS "Library ${expected} searched as ${dir}, found as [${REL_LIB}].")
|
||||
endif()
|
||||
|
||||
# Check and report failure.
|
||||
if(NOT "${REL_LIB}" STREQUAL "${expected}")
|
||||
message(SEND_ERROR "Library ${l} should have been [${expected}] but was [${REL_LIB}]")
|
||||
message(SEND_ERROR "Library ${expected} found as [${REL_LIB}]${desc}")
|
||||
elseif(CMAKE_FIND_DEBUG_MODE)
|
||||
message(STATUS "Library ${expected} found as [${REL_LIB}]${desc}")
|
||||
endif()
|
||||
else()
|
||||
message(SEND_ERROR "Library ${expected} searched as ${dir}, NOT FOUND!")
|
||||
message(SEND_ERROR "Library ${expected} NOT FOUND${desc}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(test_find_library_subst expected)
|
||||
get_filename_component(dir ${expected} PATH)
|
||||
get_filename_component(name ${expected} NAME)
|
||||
string(REGEX REPLACE "lib/?64" "lib" dir "${dir}")
|
||||
test_find_library(", searched as ${dir}" "${expected}"
|
||||
NAMES ${name}
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/${dir}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
|
||||
|
@ -44,7 +44,7 @@ foreach(lib
|
|||
lib/libtest3.a
|
||||
lib/libtest3.a
|
||||
)
|
||||
test_find_library(${lib})
|
||||
test_find_library_subst(${lib})
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_SIZEOF_VOID_P 8)
|
||||
|
@ -57,5 +57,18 @@ foreach(lib64
|
|||
lib64/A/libtest1.a
|
||||
lib64/libtest1.a
|
||||
)
|
||||
test_find_library(${lib64})
|
||||
test_find_library_subst(${lib64})
|
||||
endforeach()
|
||||
|
||||
test_find_library("" A/libtestA.a
|
||||
NAMES testA testB
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
|
||||
)
|
||||
test_find_library("" B/libtestB.a
|
||||
NAMES testB testA
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
|
||||
)
|
||||
test_find_library("" A/libtestA.a
|
||||
NAMES testB testA NAMES_PER_DIR
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
|
||||
)
|
||||
|
|
|
@ -14,6 +14,9 @@ add_custom_target(check ALL
|
|||
-Dtest_and_1=$<AND:1>
|
||||
-Dtest_and_1_0=$<AND:1,0>
|
||||
-Dtest_and_1_1=$<AND:1,1>
|
||||
# Ordinarily, the 'invalidcontent' would cause an error, but
|
||||
# the '0' makes the AND abort early.
|
||||
-Dtest_and_0_invalidcontent=$<AND:0,invalidcontent>
|
||||
-Dtest_config_0=$<CONFIG:$<CONFIGURATION>x>
|
||||
-Dtest_config_1=$<CONFIG:$<CONFIGURATION>>
|
||||
-Dtest_not_0=$<NOT:0>
|
||||
|
@ -24,6 +27,7 @@ add_custom_target(check ALL
|
|||
-Dtest_or_1=$<OR:1>
|
||||
-Dtest_or_1_0=$<OR:1,0>
|
||||
-Dtest_or_1_1=$<OR:1,1>
|
||||
-Dtest_or_1_invalidcontent=$<OR:1,invalidcontent>
|
||||
-Dtest_bool_notfound=$<BOOL:NOTFOUND>
|
||||
-Dtest_bool_foo_notfound=$<BOOL:Foo-NOTFOUND>
|
||||
-Dtest_bool_true=$<BOOL:True>
|
||||
|
|
|
@ -15,6 +15,7 @@ check(test_and_0_1 "0")
|
|||
check(test_and_1 "1")
|
||||
check(test_and_1_0 "0")
|
||||
check(test_and_1_1 "1")
|
||||
check(test_and_0_invalidcontent "0")
|
||||
check(test_config_0 "0")
|
||||
check(test_config_1 "1")
|
||||
check(test_not_0 "1")
|
||||
|
@ -25,6 +26,7 @@ check(test_or_0_1 "1")
|
|||
check(test_or_1 "1")
|
||||
check(test_or_1_0 "1")
|
||||
check(test_or_1_1 "1")
|
||||
check(test_or_1_invalidcontent "1")
|
||||
check(test_bool_notfound "0")
|
||||
check(test_bool_foo_notfound "0")
|
||||
check(test_bool_true "1")
|
||||
|
|
|
@ -17,6 +17,7 @@ create_header(bing)
|
|||
create_header(bung)
|
||||
create_header(arguments)
|
||||
create_header(list)
|
||||
create_header(target)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
|
@ -24,6 +25,7 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/bar")
|
|||
include_directories("$<1:${CMAKE_CURRENT_BINARY_DIR}/bang>")
|
||||
|
||||
add_executable(TargetIncludeDirectories main.cpp)
|
||||
|
||||
set_property(TARGET TargetIncludeDirectories APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/bat")
|
||||
set_property(TARGET TargetIncludeDirectories APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/foo")
|
||||
set_property(TARGET TargetIncludeDirectories APPEND PROPERTY
|
||||
|
@ -34,3 +36,12 @@ include_directories("$<1:${CMAKE_CURRENT_BINARY_DIR}/bung>")
|
|||
include_directories("sing$<1:/ting>")
|
||||
|
||||
include_directories("$<1:${CMAKE_CURRENT_BINARY_DIR}/arguments;${CMAKE_CURRENT_BINARY_DIR}/list>")
|
||||
|
||||
add_library(somelib::withcolons UNKNOWN IMPORTED)
|
||||
set_property(TARGET somelib::withcolons PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/target")
|
||||
set_property(TARGET somelib::withcolons PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/target")
|
||||
|
||||
set_property(TARGET TargetIncludeDirectories
|
||||
APPEND PROPERTY INCLUDE_DIRECTORIES
|
||||
"$<TARGET_PROPERTY:somelib::withcolons,INTERFACE_INCLUDE_DIRECTORIES>"
|
||||
)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "ting.h"
|
||||
#include "arguments.h"
|
||||
#include "list.h"
|
||||
#include "target.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
|
|
|
@ -39,6 +39,15 @@ CMake Error at BadAND.cmake:1 \(add_custom_target\):
|
|||
|
||||
\$<AND:nothing>
|
||||
|
||||
Parameters to \$<AND> must resolve to either '0' or '1'.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
+
|
||||
CMake Error at BadAND.cmake:1 \(add_custom_target\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<AND:1,nothing>
|
||||
|
||||
Parameters to \$<AND> must resolve to either '0' or '1'.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)$
|
||||
|
|
|
@ -4,4 +4,5 @@ add_custom_target(check ALL COMMAND check
|
|||
$<AND:,>
|
||||
$<AND:01>
|
||||
$<AND:nothing>
|
||||
$<AND:1,nothing>
|
||||
VERBATIM)
|
||||
|
|
|
@ -39,6 +39,15 @@ CMake Error at BadOR.cmake:1 \(add_custom_target\):
|
|||
|
||||
\$<OR:nothing>
|
||||
|
||||
Parameters to \$<OR> must resolve to either '0' or '1'.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
+
|
||||
CMake Error at BadOR.cmake:1 \(add_custom_target\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<OR:0,nothing>
|
||||
|
||||
Parameters to \$<OR> must resolve to either '0' or '1'.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)$
|
||||
|
|
|
@ -4,4 +4,5 @@ add_custom_target(check ALL COMMAND check
|
|||
$<OR:,>
|
||||
$<OR:01>
|
||||
$<OR:nothing>
|
||||
$<OR:0,nothing>
|
||||
VERBATIM)
|
||||
|
|
|
@ -414,6 +414,10 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
|
|||
#elif defined(__SYSC_ZARCH__)
|
||||
# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
|
||||
|
||||
/* VAX */
|
||||
#elif defined(__vax__)
|
||||
# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
|
||||
|
||||
/* Unknown CPU */
|
||||
#elif !defined(@KWIML@_ABI_NO_ERROR_ENDIAN)
|
||||
# error "Byte order of target CPU unknown."
|
||||
|
|
21
bootstrap
21
bootstrap
|
@ -93,6 +93,19 @@ else
|
|||
cmake_system_openvms=false
|
||||
fi
|
||||
|
||||
# Determine whether this is Linux
|
||||
if echo "${cmake_system}" | grep Linux >/dev/null 2>&1; then
|
||||
cmake_system_linux=true
|
||||
# find out if it is a HP PA-RISC machine
|
||||
if uname -m | grep parisc >/dev/null 2>&1; then
|
||||
cmake_machine_parisc=true
|
||||
else
|
||||
cmake_machine_parisc=false
|
||||
fi
|
||||
else
|
||||
cmake_system_linux=false
|
||||
fi
|
||||
|
||||
# Choose the generator to use for bootstrapping.
|
||||
if ${cmake_system_mingw}; then
|
||||
# Bootstrapping from an MSYS prompt.
|
||||
|
@ -678,6 +691,14 @@ if ${cmake_system_haiku}; then
|
|||
cmake_ld_flags="${LDFLAGS} -lroot -lbe"
|
||||
fi
|
||||
|
||||
if ${cmake_system_linux}; then
|
||||
# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
|
||||
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
|
||||
if ${cmake_machine_parisc}; then
|
||||
cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*"
|
||||
fi
|
||||
fi
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Detect known toolchains on some platforms.
|
||||
cmake_toolchains=''
|
||||
|
|
Loading…
Reference in New Issue