summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt34
-rw-r--r--ChangeLog.manual410
-rw-r--r--Modules/CMakeCInformation.cmake2
-rw-r--r--Modules/CMakeCXXInformation.cmake2
-rw-r--r--Modules/CMakeDetermineSystem.cmake6
-rw-r--r--Modules/CMakeDetermineVSServicePack.cmake6
-rw-r--r--Modules/CMakeFortranInformation.cmake2
-rw-r--r--Modules/CMakeGenericSystem.cmake102
-rw-r--r--Modules/CPackDeb.cmake38
-rw-r--r--Modules/CPackRPM.cmake6
-rw-r--r--Modules/CTest.cmake6
-rw-r--r--Modules/CheckCCompilerFlag.cmake3
-rw-r--r--Modules/CheckCXXCompilerFlag.cmake3
-rw-r--r--Modules/ExternalProject.cmake21
-rw-r--r--Modules/FeatureSummary.cmake14
-rw-r--r--Modules/FindALSA.cmake2
-rw-r--r--Modules/FindASPELL.cmake2
-rw-r--r--Modules/FindAVIFile.cmake2
-rw-r--r--Modules/FindBISON.cmake17
-rw-r--r--Modules/FindBZip2.cmake2
-rw-r--r--Modules/FindBoost.cmake375
-rw-r--r--Modules/FindBullet.cmake2
-rw-r--r--Modules/FindCUDA.cmake35
-rw-r--r--Modules/FindCURL.cmake2
-rw-r--r--Modules/FindCVS.cmake2
-rw-r--r--Modules/FindCoin3D.cmake2
-rw-r--r--Modules/FindCurses.cmake2
-rw-r--r--Modules/FindCxxTest.cmake2
-rw-r--r--Modules/FindDCMTK.cmake2
-rw-r--r--Modules/FindDart.cmake2
-rw-r--r--Modules/FindDevIL.cmake2
-rw-r--r--Modules/FindDoxygen.cmake2
-rw-r--r--Modules/FindEXPAT.cmake2
-rw-r--r--Modules/FindFLEX.cmake8
-rw-r--r--Modules/FindFLTK.cmake7
-rw-r--r--Modules/FindFLTK2.cmake4
-rw-r--r--Modules/FindFreetype.cmake2
-rw-r--r--Modules/FindGDAL.cmake2
-rw-r--r--Modules/FindGIF.cmake2
-rw-r--r--Modules/FindGTK2.cmake15
-rw-r--r--Modules/FindGTest.cmake2
-rw-r--r--Modules/FindGit.cmake2
-rw-r--r--Modules/FindGnuTLS.cmake2
-rw-r--r--Modules/FindGnuplot.cmake2
-rw-r--r--Modules/FindHDF5.cmake4
-rw-r--r--Modules/FindHSPELL.cmake2
-rw-r--r--Modules/FindImageMagick.cmake2
-rw-r--r--Modules/FindJNI.cmake2
-rw-r--r--Modules/FindJPEG.cmake2
-rw-r--r--Modules/FindJasper.cmake2
-rw-r--r--Modules/FindJava.cmake2
-rw-r--r--Modules/FindLibArchive.cmake2
-rw-r--r--Modules/FindLibXml2.cmake2
-rw-r--r--Modules/FindLibXslt.cmake2
-rw-r--r--Modules/FindLua50.cmake2
-rw-r--r--Modules/FindLua51.cmake2
-rw-r--r--Modules/FindMPEG.cmake2
-rw-r--r--Modules/FindMPEG2.cmake2
-rw-r--r--Modules/FindMPI.cmake7
-rw-r--r--Modules/FindMotif.cmake2
-rw-r--r--Modules/FindOpenAL.cmake2
-rw-r--r--Modules/FindOpenMP.cmake2
-rw-r--r--Modules/FindOpenSSL.cmake2
-rw-r--r--Modules/FindOpenSceneGraph.cmake2
-rw-r--r--Modules/FindOpenThreads.cmake2
-rw-r--r--Modules/FindPHP4.cmake2
-rw-r--r--Modules/FindPNG.cmake2
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake2
-rw-r--r--Modules/FindPerl.cmake2
-rw-r--r--Modules/FindPerlLibs.cmake30
-rw-r--r--Modules/FindPhysFS.cmake2
-rw-r--r--Modules/FindProducer.cmake2
-rw-r--r--Modules/FindProtobuf.cmake2
-rw-r--r--Modules/FindPythonInterp.cmake7
-rw-r--r--Modules/FindPythonLibs.cmake11
-rw-r--r--Modules/FindQt4.cmake81
-rw-r--r--Modules/FindQuickTime.cmake2
-rw-r--r--Modules/FindRTI.cmake2
-rw-r--r--Modules/FindRuby.cmake2
-rw-r--r--Modules/FindSWIG.cmake2
-rw-r--r--Modules/FindSubversion.cmake23
-rw-r--r--Modules/FindTCL.cmake2
-rw-r--r--Modules/FindTIFF.cmake2
-rw-r--r--Modules/FindTclsh.cmake2
-rw-r--r--Modules/FindThreads.cmake4
-rw-r--r--Modules/FindWget.cmake2
-rw-r--r--Modules/FindZLIB.cmake2
-rw-r--r--Modules/Findosg.cmake2
-rw-r--r--Modules/FindosgAnimation.cmake2
-rw-r--r--Modules/FindosgDB.cmake2
-rw-r--r--Modules/FindosgFX.cmake2
-rw-r--r--Modules/FindosgGA.cmake2
-rw-r--r--Modules/FindosgIntrospection.cmake2
-rw-r--r--Modules/FindosgManipulator.cmake2
-rw-r--r--Modules/FindosgParticle.cmake2
-rw-r--r--Modules/FindosgProducer.cmake2
-rw-r--r--Modules/FindosgShadow.cmake2
-rw-r--r--Modules/FindosgSim.cmake2
-rw-r--r--Modules/FindosgTerrain.cmake2
-rw-r--r--Modules/FindosgText.cmake2
-rw-r--r--Modules/FindosgUtil.cmake2
-rw-r--r--Modules/FindosgViewer.cmake2
-rw-r--r--Modules/FindosgVolume.cmake2
-rw-r--r--Modules/FindosgWidget.cmake2
-rw-r--r--Modules/FindwxWidgets.cmake2
-rw-r--r--Modules/GetPrerequisites.cmake51
-rw-r--r--Modules/Platform/Windows-GNU-Fortran.cmake1
-rw-r--r--Modules/Platform/Windows-GNU.cmake35
-rw-r--r--Modules/Platform/Windows-df.cmake2
-rw-r--r--Modules/Qt4Macros.cmake7
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx52
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.h3
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx44
-rw-r--r--Source/CPack/cmCPackGenerator.cxx24
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx3
-rw-r--r--Source/CTest/cmCTestRunTest.cxx10
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx14
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h5
-rw-r--r--Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake347
-rw-r--r--Source/QtDialog/CMakeLists.txt32
-rw-r--r--Source/QtDialog/CMakeSetup.cxx14
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx175
-rw-r--r--Source/cmAddCustomCommandCommand.h3
-rw-r--r--Source/cmCTest.cxx4
-rw-r--r--Source/cmDocumentVariables.cxx114
-rw-r--r--Source/cmELF.cxx3
-rw-r--r--Source/cmExportCommand.cxx12
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx4
-rw-r--r--Source/cmFileCommand.cxx103
-rw-r--r--Source/cmGlobalGenerator.cxx5
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx172
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h1
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx12
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h16
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx380
-rw-r--r--Source/cmInstallGenerator.cxx7
-rw-r--r--Source/cmLocalGenerator.cxx38
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx11
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx6
-rw-r--r--Source/cmMakefile.cxx90
-rw-r--r--Source/cmMakefile.h6
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx34
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx25
-rw-r--r--Source/cmMakefileTargetGenerator.cxx38
-rw-r--r--Source/cmMakefileTargetGenerator.h3
-rw-r--r--Source/cmSourceFile.cxx15
-rw-r--r--Source/cmSourceFile.h4
-rw-r--r--Source/cmSystemTools.cxx15
-rw-r--r--Source/cmTarget.cxx64
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx138
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h4
-rw-r--r--Source/cmXCodeObject.cxx2
-rw-r--r--Source/cmake.cxx20
-rw-r--r--Source/kwsys/SystemInformation.cxx21
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake4
-rw-r--r--Tests/BuildDepends/CMakeLists.txt23
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt5
-rw-r--r--Tests/BuildDepends/Project/linkdep.cxx4
-rw-r--r--Tests/CMakeLists.txt54
-rw-r--r--Tests/CMakeTests/GetPrerequisitesTest.cmake.in22
-rw-r--r--Tests/CMakeTests/IncludeTest.cmake.in4
-rw-r--r--Tests/CheckCompilerRelatedVariables/CMakeLists.txt3
-rw-r--r--Tests/Contracts/cse-snapshot/CMakeLists.txt114
-rw-r--r--Tests/Contracts/cse-snapshot/Dashboard.cmake.in76
-rw-r--r--Tests/Contracts/cse-snapshot/RunTest.cmake3
-rw-r--r--Tests/Contracts/vtk542/CMakeLists.txt30
-rw-r--r--Tests/Contracts/vtk542/RunTest.cmake1
-rw-r--r--Tests/CustomCommand/CMakeLists.txt24
-rw-r--r--Tests/CxxOnly/CMakeLists.txt4
-rw-r--r--Tests/EmptyLibrary/CMakeLists.txt4
-rw-r--r--Tests/EmptyLibrary/subdir/CMakeLists.txt1
-rw-r--r--Tests/EmptyLibrary/subdir/test.h1
-rw-r--r--Tests/ExternalProject/CMakeLists.txt16
-rw-r--r--Tests/FunctionTest/CMakeLists.txt8
-rw-r--r--Tests/MissingSourceFile/CMakeLists.txt3
-rw-r--r--Utilities/CMakeLists.txt4
-rw-r--r--Utilities/Release/README31
-rw-r--r--Utilities/Release/create-cmake-release.cmake7
-rw-r--r--Utilities/Release/dash2win64_cygwin.cmake3
-rw-r--r--Utilities/Release/dashsgi1_release.cmake11
-rw-r--r--Utilities/Release/dashsgi1_release64.cmake15
-rw-r--r--Utilities/Release/destiny_release.cmake12
-rw-r--r--Utilities/Release/muse_release.cmake10
-rw-r--r--Utilities/Release/muse_release64.cmake14
-rw-r--r--Utilities/Release/r15n65_aix_release.cmake22
-rw-r--r--Utilities/Release/r36n11_aix_release.cmake22
-rw-r--r--Utilities/Release/release_cmake.cmake6
-rwxr-xr-xUtilities/Release/release_cmake.sh.in2
-rw-r--r--Utilities/Release/v20n17_aix_release.cmake22
-rw-r--r--Utilities/Release/v60n177_aix_release.cmake21
-rw-r--r--Utilities/Release/vogon_cygwin.cmake11
-rw-r--r--Utilities/Release/vogon_release.cmake17
-rw-r--r--Utilities/Release/vogon_release_qt.cmake16
-rw-r--r--Utilities/cmbzip2/bzlib_private.h3
-rw-r--r--Utilities/cmcurl/setup.h4
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt8
-rw-r--r--Utilities/cmlibarchive/build/cmake/config.h.in3
-rw-r--r--Utilities/cmlibarchive/libarchive/archive.h8
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_check_magic.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_endian.h2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry.h6
-rwxr-xr-xbootstrap2
203 files changed, 2671 insertions, 1643 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6e8b928..98bde02 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,15 +180,33 @@ MACRO(CMAKE_SETUP_TESTING)
ENDMACRO(CMAKE_SETUP_TESTING)
+# Provide a way for Visual Studio Express users to turn OFF the new FOLDER
+# organization feature. Default to ON for non-Express users. Express users must
+# explicitly turn off this option to build CMake in the Express IDE...
+#
+OPTION(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
+MARK_AS_ADVANCED(CMAKE_USE_FOLDERS)
+
+
+#-----------------------------------------------------------------------
+# a macro that only sets the FOLDER target property if it's
+# "appropriate"
+#-----------------------------------------------------------------------
MACRO(CMAKE_SET_TARGET_FOLDER tgt folder)
- # Really, I just want this to be an "if(TARGET ${tgt})" ...
- # but I'm not sure that our min req'd., CMake 2.4.5 can handle
- # that... so I'm just activating this for now, with a version
- # compare, and only for MSVC builds.
- IF(MSVC)
- IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8)
- SET_PROPERTY(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
+ IF(CMAKE_USE_FOLDERS)
+ SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
+
+ # Really, I just want this to be an "if(TARGET ${tgt})" ...
+ # but I'm not sure that our min req'd., CMake 2.4.5 can handle
+ # that... so I'm just activating this for now, with a version
+ # compare, and only for MSVC builds.
+ IF(MSVC)
+ IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8)
+ SET_PROPERTY(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
+ ENDIF()
ENDIF()
+ ELSE()
+ SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS OFF)
ENDIF()
ENDMACRO(CMAKE_SET_TARGET_FOLDER)
@@ -400,7 +418,7 @@ ENDIF()
# The CMake version number.
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8)
-SET(CMake_VERSION_PATCH 2)
+SET(CMake_VERSION_PATCH 3)
#SET(CMake_VERSION_TWEAK 0)
#SET(CMake_VERSION_RC 1)
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 7b0a901..c2e2cdf 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,413 @@
+No changes in CMake 2.8.3 since 2.8.3-rc4.
+
+Changes in CMake 2.8.3-rc4 (since 2.8.3-rc3)
+--------------------------------------------
+Bill Hoffman (1):
+ When processing DartMeasurements use the tests working directory.
+
+David Cole (2):
+ ExternalProject: No svn --username if empty (#11173)
+ Avoid problem reading jni.h on Macs.
+
+David Partyka (5):
+ Fixed appending PATH to dumpbin tool from growing without bounds.
+ Switch to CMAKE_PATH when doing PATH comparisons on Windows.
+ Remove unecessary TO_CMAKE_PATH for gp_cmd_dir.
+ Append the gp_tool path to the system PATH using native slashes.
+ Fixes to GetPrerequisites for cygwin
+
+Eric NOULARD (1):
+ CPackDeb Added several optional debian binary package fields
+
+Marcus D. Hanwell (2):
+ ENH: Added case for Python 2.7.
+ Fixed parallel build for generators with EXTRA.
+
+Changes in CMake 2.8.3-rc3 (since 2.8.3-rc2)
+--------------------------------------------
+Alex Neundorf (4):
+ Remove trailing whitespace
+ Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
+ Use absolute path to FindPackageHandleStandardArgs.cmake everywhere
+ CodeBlocks Generator: Do not omit files in the project file listing.
+
+Brad King (4):
+ VS10: Order .vcxproj dependencies deterministically (#10502)
+ Document ENABLE_EXPORTS behavior on Mac (#11295)
+ FindHDF5: Fix typo in parallel-IO support check (#11291)
+ Xcode: Recognize .hh as C++ (#11307)
+
+Clinton Stimpson (1):
+ Find imports dir in Qt 4.7
+
+David Partyka (1):
+ Update module to locate newely released MS MPI HPC Pack R2.
+
+Philip Lowman (1):
+ Remove superfluous variable Boost_COMPAT_STATIC_RUNTIME.
+
+Rolf Eike Beer (2):
+ FindSubversion: Fix for German localized client (#11273)
+ FindSubversion: Use C locale to detect version (#11273)
+
+Changes in CMake 2.8.3-rc2 (since 2.8.3-rc1)
+--------------------------------------------
+Alex Neundorf (5):
+ APPEND and not-APPEND mode of feature_summary() were swapped
+ Set a default DESCRIPTION if none is given for ALL mode of feature_summary()
+ Close ENDFUNCTION() properly with the same name as FUNCTION()
+ Make cmake-gui remember whether the "Advanced" checkbox was checked or not
+ Also store the required version number in the details message.
+
+Ben Boeckel (3):
+ Add test that CMake errors with empty libs
+ Fix which string is checked for in the test
+ XCode generation should fail if lang isn't known
+
+Bill Hoffman (5):
+ Fix the name of the variable being tested.
+ Fix KWStyle line length issues.
+ Add a delay after untar on windows to make external project work on windows 7
+ Add a new line to the end of the generated main.cxx for the hpux compiler.
+ Fix for bug #11274, VS10 custom commands that create files in INTDIR fix.
+
+Brad King (12):
+ Evaluate <OBJECT_DIR> rule variable for executables
+ ccmake: Fix search with '/'
+ MinGW: Support long object file lists
+ Document IMPORTED_NO_SONAME target property
+ FindMPI: Recoginze -f flags from mpicc (#10771)
+ Add module-dir flag for Compaq Visual Fortran (#11248)
+ FindPythonInterp: Look for python2.7 interpreter
+ VS10: Use $(IntDir) for per-source output directory (#11270)
+ Reset platform/compiler info status for each language
+ Remove trailing whitespace from Xcode generator source
+ VS10: Skip targets with no linker language (#11230)
+ VS10: Encode custom command comments for echo (#11283)
+
+Clinton Stimpson (1):
+ Fix regression in cross-compile patches with finding Qt libs.
+
+David Cole (7):
+ Enable calling commands with : in argv[1] (#9963)
+ No extra spaces in CustomCommand test (#9963)
+ Avoid CustomCommand test failure on VS71 (#9963)
+ Update release scripts.
+ Avoid CustomCommand test failure on VS71 (#9963)
+ Honor MAKECOMMAND value saved in cache (#11026)
+ New USE_FOLDERS property OFF by default. (#3796)
+
+David Gobbi (1):
+ Set the module prefix, updated Windows suffix.
+
+Eric NOULARD (2):
+ InstallGen/CPack fix handling absolute installed file regression
+ CPackRPM Handle parenthesis in CPACK_SYSTEM_NAME (fix bug 10737)
+
+James Bigler (2):
+ Fix for bug 0011263.
+ Allow -g3 for CUDA v3.0+.
+
+Mikkel Krautz (2):
+ Xcode: Avoid trailing space in ARCHS list (#11244)
+ Xcode: Quote string values containing '$' (#11244)
+
+Philip Lowman (12):
+ FindBoost.cmake fixes for issues 11204 & 8529
+ FindBoost.cmake: Miscellaneous changes and refactoring
+ FindBoost.cmake: Add Boost_NO_SYSTEM_PATHS option
+ FindBoost.cmake: Fix compiling against a boost source tree
+ FindBoost.cmake: Fixes 11246
+ FindBoost.cmake: Fixes 11121
+ FindBoost.cmake: Fixes 10436
+ FindBoost.cmake: Implements 11160
+ Fix 11136: [patch] FindThreads.cmake documents the wrong variable
+ FindBoost.cmake: Fix library search path glitch introduced in earlier commit
+ FindFLEX.cmake: Fix issue 11249
+ Fixes issue 11279: CMakeDetermineVSServicePack support for VS10
+
+Yaakov Selkowitz (2):
+ FindFLTK*: Use Cygwin fltk on Cygwin (#11290)
+ Use 'uname -m' for processor on Cygwin (#10774)
+
+Changes in CMake 2.8.3-rc1 (since 2.8.2)
+----------------------------------------
+Alex Neundorf (39):
+ fix build on SUSE 11.2 in cmcurl due to ssize_t
+ -add an additional name for finding libtiff on Windows
+ -fix typo in docs of deprecated MacroAddFileDependencies.cmake
+ add 2nd, more powerful mode to find_package_handle_standard_args()
+ -fix indentation of the documentation
+ Add version checking support to FindFlex and FindPerlLibs
+ FindSquish doesn't detect the version, remove that from the documentation
+ Improved version checking for FindRuby using the new mode of FPHSA()
+ Improved version checking for FindJava using the new FPHSA() mode
+ Fix DETAILS string with version number in FHPSA()
+ Improved version checking for FindSubversion using the new mode of FPHSA()
+ Improved version checking for FindCUDA using the new mode of FPHSA
+ Use FPHSA() in FindSWIG, including version checking.
+ Change documentation of Subversion_FOUND and SUBVERSION_FOUND.
+ Add macro CMakeParseArguments() and use it in FPHSA()
+ Fix ZLIB version parsing if no TWEAK version exists
+ Fix EclipseCDT include path parsing with spaces (#10868)
+ Fix EclipseCDT parsing of builtin macros with spaces (#10868)
+ Remove trailing spaces
+ Detect a COMPILER_ID also for ASM.
+ Add timeout to execute_process() in CMAKE_DETERMINE_COMPILER_ID().
+ Fix parsing of builtin macros so Eclipse handles them properly (#10868)
+ Log the required package version and major improvement to FeatureSummary
+ Improve documentation.
+ Improve wording of the documentation.
+ Add macro ADD_FEATURE_INFO() and improve docs.
+ Remove trailing whitespace
+ Make target_link_libraries() complain if bad target name is used
+ Just warn in case of a bad target as only argument for t_l_l()
+ Remove trailing whitespace
+ New CMP0016 for deciding whether an unknown target in TLL() is an error.
+ Record all considered Config files and their versions.
+ Improve error message in Config-mode when no appropriate version was found
+ Replace the two vector<string,string> with one vector<struct{string,string}>
+ Small cleanup of FindPackageHandleStandardArgs.cmake
+ Don't create an empty element at the end of Foo_CONSIDERED_CONFIGS/VERSIONS
+ Add option CONFIG_MODE to FPHSA()
+ Improve version notice in the generated message
+ Improve wording of the error message of find_package() in config-mode
+
+Andrew Maclean (3):
+ Adding a FindPostgreSQL.cmake module
+ Forgot the copyright notice.
+ Changed ADDITIONAL_SEARCH_PATHS to PostgreSQL_ADDITIONAL_SEARCH_PATHS.
+
+Arjen Verweij (1):
+ Pass objects to Intel linker using a response file
+
+Bill Hoffman (9):
+ Disable gcc 33 on OpenBSD because it crashes CPack by default.
+ Fix for bug#10483, INCLUDE_EXTERNAL_MSPROJECT: ProjectGUID now ProjectGuid
+ Remove the ctest submit larget output test.
+ Let CMake recognize .CPP .CXX and .C++ as c++ files.
+ Fix for bug 10388, fix various default flags.
+ Only use .CPP .CXX and .C++ do not work by default with g+++.
+ Fix targets with . in the name for VS 10 IDE.
+ Only test for .CPP on Microsoft compilers which will handle .CPP as c++.
+ Allow testing of .CPP on WIN32 as it is a case insensitive OS and should work.
+
+Brad King (69):
+ ExternalProject: Add LOG_* options to hide step output
+ FindMPI: Do not parse -l in middle of library name
+ FindMPI: Parse mpicc flags more carefully (#9093)
+ Fix or cast integer conversions in cmake
+ Begin post-2.8.2 development
+ FindMPI: Failure is not an error if not REQUIRED
+ FindMPI: Trust mpicc -showme on BlueGene/L
+ VS: Always separate preprocessor defs by semicolon (#10902)
+ KWSys: Cleanup putenv leak option implementation
+ KWSys: Pass ptrdiff_t check result to System.c
+ Fix or cast more integer conversions in cmake
+ Use same type in both cases of '?:' operator
+ FindMPI: Fix parsing of mpicc -Wl,-L link flags (#9093)
+ Fix signed/unsigned comparison warnings in ccmake
+ Fix integer conversions in cpack
+ bootstrap: Detect known C/C++ compiler toolchains
+ KWSys: Use short fallback timeout for Process tests
+ KWSys: Optionally suppress consistent test failures
+ KWSys: Avoid Clang optimizer bug in testProcess-[45]
+ Poison GCC 3.3 on OpenBSD a bit later
+ KWSys: Avoid undefined behavior in Process crash tests
+ Optionally use system bzip2 library (#10932)
+ ctest_update: Abort if Git FETCH_HEAD has no candidates
+ ctest_update: Support ".git file" work trees
+ ctest_update: Run 'git submodule' at top level
+ FindBoost: Search for Boost 1.42
+ Add FindLibArchive module (#10923)
+ Add option CMAKE_USE_SYSTEM_LIBARCHIVE (#10923)
+ Refer to self with CMake_(SOURCE|BINARY)_DIR (#10046)
+ ExternalProject: Fix $(MAKE) with cygpath on Windows
+ FindBoost: Search for Boost 1.43 and 1.44
+ Include headers from chosen libarchive (#10923)
+ No response files with GNU ld <= 2.16 (#10913)
+ Create class cmArchiveWrite to wrap libarchive (#11020)
+ Include entries for directories in tarballs (#11020)
+ cmArchiveWrite: Fix signed/unsigned compare/convert
+ cmArchiveWrite: Fix signed/unsigned again
+ CPack: Avoid member shadowing after API refactor
+ KWSys: Fix SplitPath for leading '\' on Windows
+ KWSys: Fix GetActualCaseForPath for UNC paths
+ ModuleNoticesTest: Do not require "Kitware" copyright
+ Modules: Fix CMakeParseArguments copyright notice
+ FortranCInterface: Fix doc typo FC.h -> FCMangle.h
+ CTest: Avoid use of old EscapeSpaces method
+ Remove cmSystemTools::EscapeSpaces method
+ Clarify install(TARGETS) docs for EXPORT option
+ Factor out global generator ComputeTargetDepends method
+ Factor out duplicate VS target dependency code
+ Refactor VS <= 7.1 utility-depends workaround
+ Restore GetTargetDirectDepends const return
+ Split notion of node lists and edge lists
+ Distinguish "strong" and "weak" target dependency edges
+ Honor strong intra-component target dependencies
+ libarchive: Remove SCHILY dev,ino,nlink attributes (#11176)
+ Fix unused parameter warning in VS 7.1 generator
+ KWSys: Avoid empty string dereference in SplitString
+ KWSys: Improve SplitPath method documentation
+ KWSys: Use SplitPath in GetActualCaseForPath
+ Add whitespace=tab-in-indent attribute for sources
+ Search MacPorts /opt/local prefix on Mac
+ HP-UX: Always add /usr/lib to rpath (#10571)
+ No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)
+ KWSys: Suppress -Wcast-align warning in MD5.c
+ Suppress -Wcast-align in curl and bzip2
+ libarchive: Fix purposeful crash
+ bootstrap: Honor CFLAGS during "make" test (#10545)
+ file(DOWNLOAD): Fix error message formatting
+ Fix line-too-long style errors
+ Report missing source files with context of target
+
+Clinton Stimpson (10):
+ Fix performance issue with getting version from zlib.h
+ Fix bug 10418 - GetPrerequisites returning "not" as a dependency.
+ Fix regression in 5e6634fd77969433a87c150a2fb3f2079131484f for Windows.
+ Change Qt4ConfigDependentSettings to use more standard find modules.
+ Add cross-compiling support to FindQt4.cmake
+ Tweak for cygwin, don't convert : to ;
+ Fix some issues with refinding when qmake executable is changed.
+ Find correct Qt plugins for cross-compiling.
+ Fix mingw/VS warning message with cross compile re-org.
+ Make sure moc parameters file goes in binary directory.
+
+David Cole (20):
+ CheckSourceTree test: read UpdateCommand from Update.xml.
+ Eliminate -Wconversion warnings.
+ Detect CMake warnings and errors in build output.
+ Activate retry code on any curl submit failure.
+ Add another expected output for the failed submit tests.
+ ExternalProject: Use $(MAKE) whenever possible.
+ Copy Resources in Frameworks during fixup_bundle (#10020)
+ Update path to git. dashmacmini2 was "upgraded."
+ ExternalProject: Remove 'unknown keyword' warning (#11034)
+ Add documentation for CPACK_PROJECT_CONFIG_FILE.
+ Add STEP_TARGETS to ExternalProject module.
+ Refine formatting for cmake --help-module output.
+ Improve documentation of OPTION command.
+ Add FOLDER target property, for IDEs (#3796)
+ Avoid adding self as prerequisite. (#10417)
+ Correct CMAKE_INSTALL_PREFIX value for Win64 apps (#9992)
+ Preserve timestamps on files on tar extract.
+ Use QUIET to avoid Java status messages.
+ VS2010: Honor PROJECT_LABEL target property (#10611)
+ VS2010: Set IntDir for utility and global targets.
+
+David Genest (1):
+ Honor CMAKE_USER_MAKE_RULES_OVERRIDE in try_compile (#10902)
+
+Eric NOULARD (20):
+ CPackRPM:: Replace - with _ in RPM Version (fix bug 0010934)
+ Provides default changelog if no file is provided
+ CPackRPM:: Quote every filenames in %file section (see bugs 10701,10871,10345)
+ CPackRPM:: [partially] support relocatable package
+ CPackDEB: merge wrong installed size patch. see bugs 10296 (and 10292)
+ CPackDeb optionally generates auto-dependency list part fix of bug 10292
+ Proposal for bash-completion support file
+ CPack: Refactor API in order to handle multi-file packages
+ CPack: Avoid member shadowing after API refactor (part2)
+ Improve cmake-completion (install doc, ctest -R completion)
+ Add ZIP archive format and LZMA compress support to libarchive-wrapper
+ Add XZ compress support to libarchive-wrapper
+ Add Compress compress support to libarchive-wrapper
+ CPack Backward-compatibly enforce DESTDIR for DEB and RPM
+ CPack Enable better handling of absolute installed files
+ CPackArchiveGenerator use cmArchiveWrite wrapper
+ CPackArchiveGenerator add component supports
+ CPackArchiveGenerator improve usability and robustness
+ CPack fix broken compilation for CygwinSource generator
+ CPack handle symlinks in CPACK_INSTALLED_DIRECTORIES fix for bug5430
+
+James Bigler (1):
+ Added CUDA 3.2 directory changes. Disable emulation mode for CUDA 3.1+.
+
+Kai Wasserbäch (1):
+ Fix spelling errors reported by Lintian.
+
+Kovarththanan Rajaratnam (4):
+ FindZLIB: optimize zlib.h version parsing
+ FindCygwin: add new registry entry for Cygwin 1.7 (#10951)
+ FindZLIB: use the FPHSA version mode
+ FindSubversion: set compatibility variables based on FPHSA()
+
+Marcel Loose (1):
+ Issue 10199: Fixed code documentation and now set <prefix>_WC_ROOT
+
+Marcus D. Hanwell (1):
+ Bug with default library type of Python modules.
+
+Mathieu Malaterre (3):
+ Add missing PATHS to find_path commands to fix openssl searching
+ BUG: 0009611 Fix Arch independent FindJNI.cmake on Linux
+ Fix 11035 : debug/release library configuration mistake
+
+Michael Wild (2):
+ Improve documentation of BundleUtilities.cmake
+ Improve documentation of GetPrerequisites.cmake
+
+Miguel A. Figueroa-Villanueva (7):
+ ENH: #9775 Added support for new wxWidgets 2.9 libraries.
+ BUG: #9775 Fixed patch FindwxWidgets-fixed-bug-9775.
+ BUG #10658: FindwxWidgets USE_FILE should not include .cmake extension.
+ STYLE: Clarified/Fixed documentation of UsewxWidgets.
+ BUG #11123: Generic include dir should come after config specific one.
+ BUG #8184: Fixed FindwxWidgets wrong order of default libs for MinGW.
+ ENH #8993: FindwxWidgets add support for wx-config custom options.
+
+Mike McQuaid (1):
+ Make bundle items writable before fixup (#9284)
+
+Modestas Vainius (1):
+ CTestTestFailedSubmit-xmlrpc: Pass with "Submission problem"
+
+Patrick Gansterer (4):
+ VS: Convert PlatformName member to a virtual method
+ VS: Add more TargetMachine option values
+ VS: Map /ENTRY linker option to EntryPointSymbol
+ VS: Add ArchitectureId to VS 8 and 9 generators
+
+Philip Lowman (7):
+ Fixes problem finding libraries under Boost (#9510)
+ Add detection for new pangommconfig.h header file
+ Several fixes needed to improve Windows support
+ 11041: Improve FindCxxTest to use Python or Perl automatically; custom flags
+ 10241: FindBISON.cmake clears wrong variable
+ 10688: FindGTK2.cmake doesn't auto-detect macports
+ Merge patch for detecting gdk-pixbuf library
+
+Pino Toscano (1):
+ GNU/Hurd platform support fixes (#9873)
+
+Robert Goulet (1):
+ VS2010: Disable PDBs when there is no debug info
+
+Rolf Eike Beer (2):
+ clean up some stuff in CPack RPM script
+ Set MSVC_VERSION for MSVC 6, 7, 7.1 (#7944)
+
+Todd Gamblin (3):
+ Modules: Fix spelling 'To distributed' -> 'To distribute'
+ Teach find_* commands to ignore some paths
+ Add platform files for BlueGene/P systems
+
+Zach Mullen (12):
+ Checksums on CTest submit files, and retry timed out submissions.
+ Cross-platform fixes for checksum/retry code
+ Fix subscript out of range crash
+ CTest should resubmit in the checksum failed case
+ Testing for CTest checksum
+ Mock checksum failure output for old CDash versions
+ Checksum test should use CMAKE_TESTS_CDASH_SERVER
+ Fix cycle detection for test dependencies
+ More robust cost-based scheduling impl
+ Fix hard-coded CDash URI in version query
+ Added CTest command --print-labels
+ We shouldn't ask CDash for its version info until/unless we actually need it.
+
No changes in CMake 2.8.2 since 2.8.2-rc4.
Changes in CMake 2.8.2-rc4 (since 2.8.2-rc3)
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 578aff9..86a824a 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -26,6 +26,8 @@ ELSE(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
+SET(_INCLUDED_FILE 0)
+
# Load compiler-specific information.
IF(CMAKE_C_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 869894c..680f8fd 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -26,6 +26,8 @@ ELSE(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
+SET(_INCLUDED_FILE 0)
+
# Load compiler-specific information.
IF(CMAKE_CXX_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index 5589dfc..0e65bce 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -47,17 +47,17 @@ IF(CMAKE_HOST_UNIX)
IF(CMAKE_UNAME)
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
- IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
+ IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
- ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
+ ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
IF("${val}" GREATER 0)
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
ENDIF("${val}" GREATER 0)
- ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
+ ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
# check the return of the last uname -m or -p
IF("${val}" GREATER 0)
SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
diff --git a/Modules/CMakeDetermineVSServicePack.cmake b/Modules/CMakeDetermineVSServicePack.cmake
index 8e4eb34..a877e6e 100644
--- a/Modules/CMakeDetermineVSServicePack.cmake
+++ b/Modules/CMakeDetermineVSServicePack.cmake
@@ -23,8 +23,8 @@
# ===========================
#=============================================================================
-# Copyright 2009 Kitware, Inc.
-# Copyright 2009 Philip Lowman <philip@yhbt.com>
+# Copyright 2009-2010 Kitware, Inc.
+# Copyright 2009-2010 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -47,6 +47,8 @@ function(_DetermineVSServicePackFromCompiler _OUT_VAR _cl_version)
set(_version "vc90")
elseif(${_cl_version} VERSION_EQUAL "15.00.30729.01")
set(_version "vc90sp1")
+ elseif(${_cl_version} VERSION_EQUAL "16.00.30319.01")
+ set(_version "vc100")
else()
set(_version "")
endif()
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index cdb8038..f6a52c6 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -16,6 +16,8 @@
# It also loads the available platform file for the system-compiler
# if it exists.
+SET(_INCLUDED_FILE 0)
+
# Load compiler-specific information.
IF(CMAKE_Fortran_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 7d2d8cd..b5d3072 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -52,6 +52,94 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
ENDIF(DEFINED CMAKE_RULE_MESSAGES)
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
+
+# GetDefaultWindowsPrefixBase
+#
+# Compute the base directory for CMAKE_INSTALL_PREFIX based on:
+# - is this 32-bit or 64-bit Windows
+# - is this 32-bit or 64-bit CMake running
+# - what architecture targets will be built
+#
+function(GetDefaultWindowsPrefixBase var)
+
+ # Try to guess what architecture targets will end up being built as,
+ # even if CMAKE_SIZEOF_VOID_P is not computed yet... We need to know
+ # the architecture of the targets being built to choose the right
+ # default value for CMAKE_INSTALL_PREFIX.
+ #
+ if("${CMAKE_GENERATOR}" MATCHES "Win64")
+ set(arch_hint "x64")
+ elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
+ set(arch_hint "x64")
+ elseif("$ENV{LIB}" MATCHES "(amd64|ia64)")
+ set(arch_hint "x64")
+ endif()
+
+ if(NOT arch_hint)
+ set(arch_hint "x86")
+ endif()
+
+ # default env in a 64-bit app on Win64:
+ # ProgramFiles=C:\Program Files
+ # ProgramFiles(x86)=C:\Program Files (x86)
+ # ProgramW6432=C:\Program Files
+ #
+ # default env in a 32-bit app on Win64:
+ # ProgramFiles=C:\Program Files (x86)
+ # ProgramFiles(x86)=C:\Program Files (x86)
+ # ProgramW6432=C:\Program Files
+ #
+ # default env in a 32-bit app on Win32:
+ # ProgramFiles=C:\Program Files
+ # ProgramFiles(x86) NOT DEFINED
+ # ProgramW6432 NOT DEFINED
+
+ # By default, use the ProgramFiles env var as the base value of
+ # CMAKE_INSTALL_PREFIX:
+ #
+ set(_PREFIX_ENV_VAR "ProgramFiles")
+
+ if ("$ENV{ProgramW6432}" STREQUAL "")
+ # running on 32-bit Windows
+ # must be a 32-bit CMake, too...
+ #message("guess: this is a 32-bit CMake running on 32-bit Windows")
+ else()
+ # running on 64-bit Windows
+ if ("$ENV{ProgramW6432}" STREQUAL "$ENV{ProgramFiles}")
+ # 64-bit CMake
+ #message("guess: this is a 64-bit CMake running on 64-bit Windows")
+ if(NOT "${arch_hint}" STREQUAL "x64")
+ # building 32-bit targets
+ set(_PREFIX_ENV_VAR "ProgramFiles(x86)")
+ endif()
+ else()
+ # 32-bit CMake
+ #message("guess: this is a 32-bit CMake running on 64-bit Windows")
+ if("${arch_hint}" STREQUAL "x64")
+ # building 64-bit targets
+ set(_PREFIX_ENV_VAR "ProgramW6432")
+ endif()
+ endif()
+ endif()
+
+ #if("${arch_hint}" STREQUAL "x64")
+ # message("guess: you are building a 64-bit app")
+ #else()
+ # message("guess: you are building a 32-bit app")
+ #endif()
+
+ if(NOT "$ENV{${_PREFIX_ENV_VAR}}" STREQUAL "")
+ file(TO_CMAKE_PATH "$ENV{${_PREFIX_ENV_VAR}}" _base)
+ elseif(NOT "$ENV{SystemDrive}" STREQUAL "")
+ set(_base "$ENV{SystemDrive}/Program Files")
+ else()
+ set(_base "C:/Program Files")
+ endif()
+
+ set(${var} "${_base}" PARENT_SCOPE)
+endfunction()
+
+
# Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
# was initialized by the block below. This is useful for user
# projects to change the default prefix while still allowing the
@@ -65,23 +153,11 @@ IF(CMAKE_HOST_UNIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local"
CACHE PATH "Install path prefix, prepended onto install directories.")
ELSE(CMAKE_HOST_UNIX)
- IF("$ENV{ProgramFiles}" MATCHES "^$")
- IF("$ENV{SystemDrive}" MATCHES "^$")
- SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files")
- ELSE("$ENV{SystemDrive}" MATCHES "^$")
- SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{SystemDrive}/Program Files")
- ENDIF("$ENV{SystemDrive}" MATCHES "^$")
- ELSE("$ENV{ProgramFiles}" MATCHES "^$")
- SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{ProgramFiles}")
- ENDIF("$ENV{ProgramFiles}" MATCHES "^$")
+ GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
SET(CMAKE_INSTALL_PREFIX
"${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
CACHE PATH "Install path prefix, prepended onto install directories.")
SET(CMAKE_GENERIC_PROGRAM_FILES)
-
- # Make sure the prefix uses forward slashes.
- STRING(REGEX REPLACE "\\\\" "/"
- CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
ENDIF(CMAKE_HOST_UNIX)
MARK_AS_ADVANCED(
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 07d6ff9..98d40d6 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -62,7 +62,43 @@
# Default : -
# May be set when invoking cpack in order to trace debug informations
# during CPackDeb run.
-
+# CPACK_DEBIAN_PACKAGE_PREDEPENDS
+# Mandatory : NO
+# Default : -
+# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+# This field is like Depends, except that it also forces dpkg to complete installation of
+# the packages named before even starting the installation of the package which declares
+# the pre-dependency.
+# CPACK_DEBIAN_PACKAGE_ENHANCES
+# Mandatory : NO
+# Default : -
+# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+# This field is similar to Suggests but works in the opposite direction.
+# It is used to declare that a package can enhance the functionality of another package.
+# CPACK_DEBIAN_PACKAGE_BREAKS
+# Mandatory : NO
+# Default : -
+# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+# When one binary package declares that it breaks another, dpkg will refuse to allow the
+# package which declares Breaks be installed unless the broken package is deconfigured first,
+# and it will refuse to allow the broken package to be reconfigured.
+# CPACK_DEBIAN_PACKAGE_CONFLICTS
+# Mandatory : NO
+# Default : -
+# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+# When one binary package declares a conflict with another using a Conflicts field,
+# dpkg will refuse to allow them to be installed on the system at the same time.
+# CPACK_DEBIAN_PACKAGE_PROVIDES
+# Mandatory : NO
+# Default : -
+# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+# A virtual package is one which appears in the Provides control field of another package.
+# CPACK_DEBIAN_PACKAGE_REPLACES
+# Mandatory : NO
+# Default : -
+# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+# Packages can declare in their control file that they should overwrite
+# files in certain other packages, or completely replace other packages.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 3ade3aa..e2d78802 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -548,16 +548,16 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
# We do only save CPack installed tree in _prepr
# and then restore it in build.
%prep
-mv $RPM_BUILD_ROOT \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot
+mv $RPM_BUILD_ROOT \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\"
#p build
%install
if [ -e $RPM_BUILD_ROOT ];
then
- mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/* $RPM_BUILD_ROOT
+ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/*\" $RPM_BUILD_ROOT
else
- mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot $RPM_BUILD_ROOT
+ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
fi
%clean
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index e3157fa..bb76ddd 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -228,8 +228,10 @@ IF(BUILD_TESTING)
ENDIF(NOT BUILDNAME)
# the build command
- BUILD_COMMAND(MAKECOMMAND CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}")
- SET(MAKECOMMAND ${MAKECOMMAND} CACHE STRING "Command to build the project")
+ BUILD_COMMAND(MAKECOMMAND_DEFAULT_VALUE
+ CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}")
+ SET(MAKECOMMAND ${MAKECOMMAND_DEFAULT_VALUE}
+ CACHE STRING "Command to build the project")
# the default build configuration the ctest build handler will use
# if there is no -C arg given to ctest:
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 0068617..cf519b1 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -7,7 +7,7 @@
# that can modify the build.
#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006-2010 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
@@ -29,6 +29,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
# Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option" # MSVC
+ FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index d8e4715..788bf35 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -7,7 +7,7 @@
# modify the build.
#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006-2010 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
@@ -29,6 +29,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
# Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option" # MSVC
+ FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index d76796f..997164a 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -597,8 +597,7 @@ function(_ep_get_build_command name step cmd_var)
# CMake project. Select build command based on generator.
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
if("${CMAKE_GENERATOR}" MATCHES "Make" AND
- ("${cmake_generator}" STREQUAL "${CMAKE_GENERATOR}" OR
- NOT cmake_generator))
+ ("${cmake_generator}" MATCHES "Make" OR NOT cmake_generator))
# The project uses the same Makefile generator. Use recursive make.
set(cmd "$(MAKE)")
if(step STREQUAL "INSTALL")
@@ -985,8 +984,15 @@ function(_ep_add_download_command name)
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
set(comment "Performing download step (SVN checkout) for '${name}'")
+ set(svn_user_pw_args "")
+ if(svn_username)
+ set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
+ endif()
+ if(svn_password)
+ set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}")
+ endif()
set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}
- --username=${svn_username} --password=${svn_password} ${src_name})
+ ${svn_user_pw_args} ${src_name})
list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)
elseif(git_repository)
find_package(Git)
@@ -1125,8 +1131,15 @@ function(_ep_add_update_command name)
get_property(svn_revision TARGET ${name} PROPERTY _EP_SVN_REVISION)
get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
+ set(svn_user_pw_args "")
+ if(svn_username)
+ set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
+ endif()
+ if(svn_password)
+ set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}")
+ endif()
set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision}
- --username=${svn_username} --password=${svn_password})
+ ${svn_user_pw_args})
set(always 1)
elseif(git_repository)
if(NOT GIT_EXECUTABLE)
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 594e2e7..f7bfe27 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -120,7 +120,7 @@ FUNCTION(ADD_FEATURE_INFO _name _enabled _desc)
ENDIF ()
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
-ENDFUNCTION(SET_FEATURE_INFO)
+ENDFUNCTION(ADD_FEATURE_INFO)
FUNCTION(SET_FEATURE_INFO)
@@ -199,21 +199,25 @@ FUNCTION(FEATURE_SUMMARY)
OR "${_FS_WHAT}" STREQUAL "PACKAGES_FOUND"
OR "${_FS_WHAT}" STREQUAL "PACKAGES_NOT_FOUND")
_FS_GET_FEATURE_SUMMARY( ${_FS_WHAT} _featureSummary)
+ SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
ELSEIF("${_FS_WHAT}" STREQUAL "ALL")
_FS_GET_FEATURE_SUMMARY( PACKAGES_FOUND _tmp1)
_FS_GET_FEATURE_SUMMARY( PACKAGES_NOT_FOUND _tmp2)
SET(_featureSummary "${_tmp1}${_tmp2}")
+ IF(_FS_DESCRIPTION)
+ SET(_fullText "${_FS_DESCRIPTION}${_tmp1}${_tmp2}\n")
+ ELSE(_FS_DESCRIPTION)
+ SET(_fullText "-- Found the following packages:${_tmp1}\n-- Did not find the following packages:${_tmp2}\n")
+ ENDIF(_FS_DESCRIPTION)
ELSE()
MESSAGE(FATAL_ERROR "The WHAT argument of FEATURE_SUMMARY() is set to ${_FS_WHAT}, which is not a valid value.")
ENDIF()
- SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
-
IF(_FS_FILENAME)
IF(_FS_APPEND)
- FILE(WRITE "${_FS_FILENAME}" "${_fullText}")
- ELSE(_FS_APPEND)
FILE(APPEND "${_FS_FILENAME}" "${_fullText}")
+ ELSE(_FS_APPEND)
+ FILE(WRITE "${_FS_FILENAME}" "${_fullText}")
ENDIF(_FS_APPEND)
ELSE(_FS_FILENAME)
diff --git a/Modules/FindALSA.cmake b/Modules/FindALSA.cmake
index 40bd6f3..0ad7643 100644
--- a/Modules/FindALSA.cmake
+++ b/Modules/FindALSA.cmake
@@ -35,7 +35,7 @@ find_library(ALSA_LIBRARY NAMES asound
# handle the QUIETLY and REQUIRED arguments and set ALSA_FOUND to TRUE if
# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALSA DEFAULT_MSG ALSA_LIBRARY ALSA_INCLUDE_DIR)
if(ALSA_FOUND)
diff --git a/Modules/FindASPELL.cmake b/Modules/FindASPELL.cmake
index 63ffdf9..3319caa 100644
--- a/Modules/FindASPELL.cmake
+++ b/Modules/FindASPELL.cmake
@@ -26,7 +26,7 @@ FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell)
# handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR)
MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES)
diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake
index 90885ac..afd3800 100644
--- a/Modules/FindAVIFile.cmake
+++ b/Modules/FindAVIFile.cmake
@@ -37,7 +37,7 @@ ENDIF (UNIX)
# handle the QUIETLY and REQUIRED arguments and set AVIFILE_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(AVIFile DEFAULT_MSG AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
IF (AVIFILE_FOUND)
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index 6021b12..a3308da 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -51,12 +51,19 @@ FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
MARK_AS_ADVANCED(BISON_EXECUTABLE)
IF(BISON_EXECUTABLE)
+ # the bison commands should be executed with the C locale, otherwise
+ # the message (which are parsed) may be translated
+ SET(_Bison_SAVED_LC_ALL "$ENV{LC_ALL}")
+ SET(ENV{LC_ALL} C)
EXECUTE_PROCESS(COMMAND ${BISON_EXECUTABLE} --version
OUTPUT_VARIABLE BISON_version_output
ERROR_VARIABLE BISON_version_error
RESULT_VARIABLE BISON_version_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ SET(ENV{LC_ALL} ${_Bison_SAVED_LC_ALL})
+
IF(NOT ${BISON_version_result} EQUAL 0)
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
ELSE()
@@ -115,7 +122,7 @@ IF(BISON_EXECUTABLE)
IF("${ARGV5}" STREQUAL "VERBOSE")
BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV6}")
ENDIF()
-
+
IF("${ARGV5}" STREQUAL "COMPILE_FLAGS")
BISON_TARGET_option_extraopts("${ARGV6}")
ENDIF()
@@ -125,10 +132,10 @@ IF(BISON_EXECUTABLE)
LIST(APPEND BISON_TARGET_cmdopt "-d")
STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
STRING(REPLACE "c" "h" _fileext ${_fileext})
- STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
+ STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
BISON_${Name}_OUTPUT_HEADER "${ARGV2}")
LIST(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
-
+
ADD_CUSTOM_COMMAND(OUTPUT ${BISON_TARGET_outputs}
${BISON_TARGET_extraoutputs}
COMMAND ${BISON_EXECUTABLE}
@@ -136,7 +143,7 @@ IF(BISON_EXECUTABLE)
DEPENDS ${ARGV1}
COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
+
# define target variables
SET(BISON_${Name}_DEFINED TRUE)
SET(BISON_${Name}_INPUT ${ARGV1})
@@ -151,7 +158,7 @@ IF(BISON_EXECUTABLE)
ENDIF(BISON_EXECUTABLE)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE
VERSION_VAR BISON_VERSION)
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index e671f93..0ef87fa 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -26,7 +26,7 @@ FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2 )
# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 DEFAULT_MSG BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
IF (BZIP2_FOUND)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 1a1b168..28296f1 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -17,8 +17,9 @@
#
# == Using actual libraries from within Boost: ==
#
-# set(Boost_USE_STATIC_LIBS ON)
-# set(Boost_USE_MULTITHREADED ON)
+# set(Boost_USE_STATIC_LIBS ON)
+# set(Boost_USE_MULTITHREADED ON)
+# set(Boost_USE_STATIC_RUNTIME OFF)
# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
#
# if(Boost_FOUND)
@@ -84,6 +85,37 @@
# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static
# boost libraries. Defaults to OFF.
#
+# Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching in system
+# paths (or other locations outside of BOOST_ROOT
+# or BOOST_INCLUDEDIR). Useful when specifying
+# BOOST_ROOT. Defaults to OFF.
+# [Since CMake 2.8.3]
+#
+# Boost_USE_STATIC_RUNTIME If enabled, searches for boost libraries
+# linked against a static C++ standard library
+# ('s' ABI tag). This option should be set to
+# ON or OFF because the default behavior
+# if not specified is platform dependent
+# for backwards compatibility.
+# [Since CMake 2.8.3]
+#
+# Boost_USE_DEBUG_PYTHON If enabled, searches for boost libraries
+# compiled against a special debug build of
+# Python ('y' ABI tag). Defaults to OFF.
+# [Since CMake 2.8.3]
+#
+# Boost_USE_STLPORT If enabled, searches for boost libraries
+# compiled against the STLPort standard
+# library ('p' ABI tag). Defaults to OFF.
+# [Since CMake 2.8.3]
+#
+# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
+# If enabled, searches for boost libraries
+# compiled against the deprecated STLPort
+# "native iostreams" feature ('n' ABI tag).
+# Defaults to OFF.
+# [Since CMake 2.8.3]
+#
# Other Variables used by this module which you may want to set.
#
# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching
@@ -106,11 +138,37 @@
# (e.g. "-gcc43") if FindBoost has problems finding
# the proper Boost installation
#
+# Boost_THREADAPI When building boost.thread, sometimes the name of the
+# library contains an additional "pthread" or "win32"
+# string known as the threadapi. This can happen when
+# compiling against pthreads on Windows or win32 threads
+# on Cygwin. You may specify this variable and if set
+# when FindBoost searches for the Boost threading library
+# it will first try to match the threadapi you specify.
+# For Example: libboost_thread_win32-mgw45-mt-1_43.a
+# might be found if you specified "win32" here before
+# falling back on libboost_thread-mgw45-mt-1_43.a.
+# [Since CMake 2.8.3]
+#
+# Boost_REALPATH Resolves symbolic links for discovered boost libraries
+# to assist with packaging. For example, instead of
+# Boost_SYSTEM_LIBRARY_RELEASE being resolved to
+# "/usr/lib/libboost_system.so" it would be
+# "/usr/lib/libboost_system.so.1.42.0" instead.
+# This does not affect linking and should not be
+# enabled unless the user needs this information.
+# [Since CMake 2.8.3]
+#
+
+
+#
# These last three variables are available also as environment variables:
#
# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for
# Boost. Set this if the module has problems finding
-# the proper Boost installation.
+# the proper Boost installation. To prevent falling
+# back on the system paths, set Boost_NO_SYSTEM_PATHS
+# to true.
#
# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the
# module has problems finding the proper Boost installation
@@ -165,7 +223,7 @@
# Copyright 2007 Wengo
# Copyright 2007 Mike Jackson
# Copyright 2008 Andreas Pakulat <apaku@gmx.de>
-# Copyright 2008-2009 Philip Lowman <philip@yhbt.com>
+# Copyright 2008-2010 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -276,6 +334,28 @@ function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no)
endfunction()
#
+# Take a list of libraries with "thread" in it
+# and prepend duplicates with "thread_${Boost_THREADAPI}"
+# at the front of the list
+#
+function(_Boost_PREPEND_LIST_WITH_THREADAPI _output)
+ set(_orig_libnames ${ARGN})
+ string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames ${_orig_libnames})
+ set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE)
+endfunction()
+
+#
+# If a library is found, replace its cache entry with its REALPATH
+#
+function(_Boost_SWAP_WITH_REALPATH _library _docstring)
+ if(${_library})
+ get_filename_component(_boost_filepathreal ${${_library}} REALPATH)
+ unset(${_library} CACHE)
+ set(${_library} ${_boost_filepathreal} CACHE FILEPATH "${_docstring}")
+ endif()
+endfunction()
+
+#
# End functions/macros
#
#-------------------------------------------------------------------------------
@@ -366,7 +446,7 @@ IF (_boost_IN_CACHE)
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} "
- "is already in the cache. For debugging messages, please clear the cache.")
+ "is already in the cache. To view debugging messages, please clear the cache.")
endif()
ELSE (_boost_IN_CACHE)
# Need to search for boost
@@ -380,6 +460,12 @@ ELSE (_boost_IN_CACHE)
"Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}")
endif()
IF(WIN32)
@@ -404,7 +490,7 @@ ELSE (_boost_IN_CACHE)
"-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
ENDIF(WIN32)
- SET(_boost_INCLUDE_SEARCH_DIRS
+ set(_boost_INCLUDE_SEARCH_DIRS_SYSTEM
C:/boost/include
C:/boost
"$ENV{ProgramFiles}/boost/include"
@@ -412,6 +498,13 @@ ELSE (_boost_IN_CACHE)
/sw/local/include
)
+ # If Boost_ROOT was defined, gently correct the user
+ if(Boost_ROOT)
+ message("WARNING: Boost_ROOT was set which is incorrect and is being ignored. "
+ "You need to use BOOST_ROOT instead. "
+ "Also, we suggest setting Boost_NO_SYSTEM_PATHS.")
+ endif()
+
# If BOOST_ROOT was defined in the environment, use it.
if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
set(BOOST_ROOT $ENV{BOOST_ROOT})
@@ -449,18 +542,25 @@ ELSE (_boost_IN_CACHE)
"_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
endif()
- IF( BOOST_ROOT )
- SET(_boost_INCLUDE_SEARCH_DIRS
- ${BOOST_ROOT}/include
+ if( Boost_NO_SYSTEM_PATHS)
+ set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
+ else()
+ set(_boost_INCLUDE_SEARCH_DIRS ${_boost_INCLUDE_SEARCH_DIRS_SYSTEM})
+ endif()
+
+ if( BOOST_ROOT )
+ set(_boost_INCLUDE_SEARCH_DIRS
+ ${BOOST_ROOT}/include
${BOOST_ROOT}
${_boost_INCLUDE_SEARCH_DIRS})
- ENDIF( BOOST_ROOT )
+ endif()
- IF( BOOST_INCLUDEDIR )
+ # prepend BOOST_INCLUDEDIR to search path if specified
+ if( BOOST_INCLUDEDIR )
file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR)
- SET(_boost_INCLUDE_SEARCH_DIRS
+ set(_boost_INCLUDE_SEARCH_DIRS
${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
- ENDIF( BOOST_INCLUDEDIR )
+ endif( BOOST_INCLUDEDIR )
# ------------------------------------------------------------------------
# Search for Boost include DIR
@@ -486,10 +586,7 @@ ELSE (_boost_IN_CACHE)
ENDIF()
list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
- if(WIN32)
- # For BoostPro's underscores (and others?)
- list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
- endif()
+ list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
ENDFOREACH(_boost_VER)
@@ -507,6 +604,7 @@ ELSE (_boost_IN_CACHE)
NAMES boost/config.hpp
HINTS ${_boost_INCLUDE_SEARCH_DIRS}
PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
+ ${_boost_FIND_OPTIONS}
)
ENDIF( NOT Boost_INCLUDE_DIR )
@@ -637,7 +735,7 @@ ELSE (_boost_IN_CACHE)
endif()
endif(Boost_COMPILER)
- SET (_boost_MULTITHREADED "-mt")
+ set (_boost_MULTITHREADED "-mt")
if( NOT Boost_USE_MULTITHREADED )
set (_boost_MULTITHREADED "")
endif()
@@ -646,32 +744,67 @@ ELSE (_boost_IN_CACHE)
"_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
endif()
- SET( _boost_STATIC_TAG "")
- set( _boost_ABI_TAG "")
- IF (WIN32)
- IF(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
+ #======================
+ # Systematically build up the Boost ABI tag
+ # http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
+ set( _boost_RELEASE_ABI_TAG "-")
+ set( _boost_DEBUG_ABI_TAG "-")
+ # Key Use this library when:
+ # s linking statically to the C++ standard library and
+ # compiler runtime support libraries.
+ if(Boost_USE_STATIC_RUNTIME)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}s")
+ endif()
+ # g using debug versions of the standard and runtime
+ # support libraries
+ if(WIN32)
+ if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
- SET (_boost_ABI_TAG "g")
- ENDIF()
- IF( Boost_USE_STATIC_LIBS )
- SET( _boost_STATIC_TAG "-s")
- ENDIF( Boost_USE_STATIC_LIBS )
- ENDIF(WIN32)
- SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
+ set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
+ endif()
+ endif()
+ # y using special debug build of python
+ if(Boost_USE_DEBUG_PYTHON)
+ set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y")
+ endif()
+ # d using a debug version of your code
+ set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d")
+ # p using the STLport standard library rather than the
+ # default one supplied with your compiler
+ if(Boost_USE_STLPORT)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p")
+ endif()
+ # n using the STLport deprecated "native iostreams" feature
+ if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n")
+ endif()
+
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_STATIC_TAG = ${_boost_STATIC_TAG}")
+ "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_ABI_TAG = ${_boost_ABI_TAG}")
+ "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}")
endif()
# ------------------------------------------------------------------------
# Begin finding boost libraries
# ------------------------------------------------------------------------
- SET(_boost_LIBRARIES_SEARCH_DIRS
+ if(BOOST_ROOT)
+ set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS
+ ${BOOST_ROOT}/lib
+ ${BOOST_ROOT}/stage/lib)
+ endif()
+ set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS
+ ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS}
${Boost_INCLUDE_DIR}/lib
${Boost_INCLUDE_DIR}/../lib
+ ${Boost_INCLUDE_DIR}/stage/lib
+ )
+ set(_boost_LIBRARY_SEARCH_DIRS_SYSTEM
C:/boost/lib
C:/boost
"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
@@ -680,67 +813,147 @@ ELSE (_boost_IN_CACHE)
"$ENV{ProgramFiles}/boost"
/sw/local/lib
)
- IF( BOOST_ROOT )
- SET(_boost_LIBRARIES_SEARCH_DIRS
- ${BOOST_ROOT}/lib
- ${BOOST_ROOT}/stage/lib
- ${_boost_LIBRARIES_SEARCH_DIRS})
- ENDIF( BOOST_ROOT )
+ set(_boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS})
+ if( Boost_NO_SYSTEM_PATHS )
+ set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
+ else()
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_SYSTEM})
+ endif()
- IF( BOOST_LIBRARYDIR )
+ # prepend BOOST_LIBRARYDIR to search path if specified
+ if( BOOST_LIBRARYDIR )
file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR)
- SET(_boost_LIBRARIES_SEARCH_DIRS
- ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
- ENDIF( BOOST_LIBRARYDIR )
+ set(_boost_LIBRARY_SEARCH_DIRS
+ ${BOOST_LIBRARYDIR} ${_boost_LIBRARY_SEARCH_DIRS})
+ endif()
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}")
+ "_boost_LIBRARY_SEARCH_DIRS = ${_boost_LIBRARY_SEARCH_DIRS}")
endif()
- FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
- STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
- SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
- SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
- SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
-
- # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
- IF( Boost_USE_STATIC_LIBS )
- SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
- IF(WIN32)
- SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
- ELSE(WIN32)
- SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
- ENDIF(WIN32)
- ENDIF( Boost_USE_STATIC_LIBS )
-
- FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
- NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}
- HINTS ${_boost_LIBRARIES_SEARCH_DIRS}
+ # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
+ if( Boost_USE_STATIC_LIBS )
+ set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ if(WIN32)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ else()
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
+ endif()
+ endif()
+
+ # We want to use the tag inline below without risking double dashes
+ if(_boost_RELEASE_ABI_TAG)
+ if(${_boost_RELEASE_ABI_TAG} STREQUAL "-")
+ set(_boost_RELEASE_ABI_TAG "")
+ endif()
+ endif()
+ if(_boost_DEBUG_ABI_TAG)
+ if(${_boost_DEBUG_ABI_TAG} STREQUAL "-")
+ set(_boost_DEBUG_ABI_TAG "")
+ endif()
+ endif()
+
+ # The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled
+ # on WIN32 was to:
+ # 1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found)
+ # 2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found)
+ # We maintain this behavior since changing it could break people's builds.
+ # To disable the ambiguous behavior, the user need only
+ # set Boost_USE_STATIC_RUNTIME either ON or OFF.
+ set(_boost_STATIC_RUNTIME_WORKAROUND false)
+ if(WIN32 AND Boost_USE_STATIC_LIBS)
+ if(NOT DEFINED Boost_USE_STATIC_RUNTIME)
+ set(_boost_STATIC_RUNTIME_WORKAROUND true)
+ endif()
+ endif()
+
+
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ set( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
+ set( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
+ set( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
+
+ set( _boost_docstring_release "Boost ${COMPONENT} library (release)")
+ set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)")
+
+ #
+ # Find RELEASE libraries
+ #
+ set(_boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+ _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
+ endif()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}")
+ endif()
+ find_library(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
+ NAMES ${_boost_RELEASE_NAMES}
+ HINTS ${_boost_LIBRARY_SEARCH_DIRS}
+ ${_boost_FIND_OPTIONS}
+ DOC "${_boost_docstring_release}"
)
- FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
- NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
- HINTS ${_boost_LIBRARIES_SEARCH_DIRS}
+ #
+ # Find DEBUG libraries
+ #
+ set(_boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+ _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
+ endif()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}")
+ endif()
+ find_library(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
+ NAMES ${_boost_DEBUG_NAMES}
+ HINTS ${_boost_LIBRARY_SEARCH_DIRS}
+ ${_boost_FIND_OPTIONS}
+ DOC "${_boost_docstring_debug}"
)
+ if(Boost_REALPATH)
+ _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "${_boost_docstring_release}")
+ _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "${_boost_docstring_debug}" )
+ endif()
+
_Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
- IF( Boost_USE_STATIC_LIBS )
- SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
- ENDIF( Boost_USE_STATIC_LIBS )
- ENDFOREACH(COMPONENT)
+
+ endforeach(COMPONENT)
+
+ # Restore the original find library ordering
+ if( Boost_USE_STATIC_LIBS )
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+ endif()
# ------------------------------------------------------------------------
# End finding boost libraries
# ------------------------------------------------------------------------
diff --git a/Modules/FindBullet.cmake b/Modules/FindBullet.cmake
index d10a388..50c8527 100644
--- a/Modules/FindBullet.cmake
+++ b/Modules/FindBullet.cmake
@@ -69,7 +69,7 @@ _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_d)
# handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if
# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Bullet DEFAULT_MSG
BULLET_DYNAMICS_LIBRARY BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY
BULLET_SOFTBODY_LIBRARY BULLET_INCLUDE_DIR)
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index d9b9d54..91215d5 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -514,11 +514,19 @@ set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(_cuda_64bit_lib_dir "${CUDA_TOOLKIT_ROOT_DIR}/lib64")
+ # CUDA 3.2+ on Windows moved the library directoryies, so we need the new
+ # and old paths.
+ set(_cuda_64bit_lib_dir
+ "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64"
+ "${CUDA_TOOLKIT_ROOT_DIR}/lib64"
+ )
endif()
+ # CUDA 3.2+ on Windows moved the library directories, so we need to new
+ # (lib/Win32) and the old path (lib).
find_library(${_var}
NAMES ${_names}
PATHS ${_cuda_64bit_lib_dir}
+ "${CUDA_TOOLKIT_ROOT_DIR}/lib/Win32"
"${CUDA_TOOLKIT_ROOT_DIR}/lib"
ENV CUDA_LIB_PATH
DOC ${_doc}
@@ -578,9 +586,20 @@ macro(FIND_CUDA_HELPER_LIBS _name)
mark_as_advanced(CUDA_${_name}_LIBRARY)
endmacro(FIND_CUDA_HELPER_LIBS)
+#######################
+# Disable emulation for v3.1 onward
+if(CUDA_VERSION VERSION_GREATER "3.0")
+ if(CUDA_BUILD_EMULATION)
+ message(FATAL_ERROR "CUDA_BUILD_EMULATION is not supported in version 3.1 and onwards. You must disable it to proceed. You have version ${CUDA_VERSION}.")
+ endif()
+endif()
+
# Search for cufft and cublas libraries.
-find_cuda_helper_libs(cufftemu)
-find_cuda_helper_libs(cublasemu)
+if(CUDA_VERSION VERSION_LESS "3.1")
+ # Emulation libraries aren't available in version 3.1 onward.
+ find_cuda_helper_libs(cufftemu)
+ find_cuda_helper_libs(cublasemu)
+endif()
find_cuda_helper_libs(cufft)
find_cuda_helper_libs(cublas)
@@ -593,8 +612,10 @@ else()
endif()
########################
-# Look for the SDK stuff
+# Look for the SDK stuff. As of CUDA 3.0 NVSDKCUDA_ROOT has been replaced with
+# NVSDKCOMPUTE_ROOT with the old CUDA C contents moved into the C subdirectory
find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h
+ "$ENV{NVSDKCOMPUTE_ROOT}/C"
"$ENV{NVSDKCUDA_ROOT}"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]"
"/Developer/GPU\ Computing/C"
@@ -663,7 +684,7 @@ set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL
set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL
"This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
find_package_handle_standard_args(CUDA
REQUIRED_VARS
CUDA_TOOLKIT_ROOT_DIR
@@ -922,8 +943,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# we convert the strings to lists (like we want).
if(CUDA_PROPAGATE_HOST_FLAGS)
- # nvcc chokes on -g3, so replace it with -g
- if(CMAKE_COMPILER_IS_GNUCC)
+ # nvcc chokes on -g3 in versions previous to 3.0, so replace it with -g
+ if(CMAKE_COMPILER_IS_GNUCC AND CUDA_VERSION VERSION_LESS "3.0")
string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
else()
set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index 07835fa..68aca2d 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -34,7 +34,7 @@ MARK_AS_ADVANCED(CURL_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)
IF(CURL_FOUND)
diff --git a/Modules/FindCVS.cmake b/Modules/FindCVS.cmake
index 2769111..844a485 100644
--- a/Modules/FindCVS.cmake
+++ b/Modules/FindCVS.cmake
@@ -65,5 +65,5 @@ mark_as_advanced(CVS_EXECUTABLE)
# Handle the QUIETLY and REQUIRED arguments and set CVS_FOUND to TRUE if
# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
find_package_handle_standard_args(CVS DEFAULT_MSG CVS_EXECUTABLE)
diff --git a/Modules/FindCoin3D.cmake b/Modules/FindCoin3D.cmake
index 47d0c55..d8b103a 100644
--- a/Modules/FindCoin3D.cmake
+++ b/Modules/FindCoin3D.cmake
@@ -76,7 +76,7 @@ ENDIF (WIN32)
# handle the QUIETLY and REQUIRED arguments and set COIN3D_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Coin3D DEFAULT_MSG COIN3D_LIBRARIES COIN3D_INCLUDE_DIRS)
MARK_AS_ADVANCED(COIN3D_INCLUDE_DIRS COIN3D_LIBRARIES )
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 4485f43..4fb6c36 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -155,7 +155,7 @@ SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG
CURSES_LIBRARY CURSES_INCLUDE_PATH)
diff --git a/Modules/FindCxxTest.cmake b/Modules/FindCxxTest.cmake
index 6a66d21..4ff6eba 100644
--- a/Modules/FindCxxTest.cmake
+++ b/Modules/FindCxxTest.cmake
@@ -160,7 +160,7 @@ find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl
PATHS ${CXXTEST_INCLUDE_DIR})
if(PYTHONINTERP_FOUND OR PERL_FOUND)
- include(FindPackageHandleStandardArgs)
+ include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
if(PYTHONINTERP_FOUND AND (CXXTEST_USE_PYTHON OR NOT PERL_FOUND))
set(CXXTEST_TESTGEN_EXECUTABLE ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE})
diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake
index 3bed97f..0bd8481 100644
--- a/Modules/FindDCMTK.cmake
+++ b/Modules/FindDCMTK.cmake
@@ -132,7 +132,7 @@ if(DCMTK_ofstd_INCLUDE_DIR)
mark_as_advanced(DCMTK_dcmtk_INCLUDE_DIR)
endif()
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
find_package_handle_standard_args(DCMTK DEFAULT_MSG
DCMTK_config_INCLUDE_DIR
DCMTK_ofstd_INCLUDE_DIR
diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake
index 90f71bd..afe5cf1 100644
--- a/Modules/FindDart.cmake
+++ b/Modules/FindDart.cmake
@@ -30,7 +30,7 @@ FIND_PATH(DART_ROOT README.INSTALL
# handle the QUIETLY and REQUIRED arguments and set DART_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Dart DEFAULT_MSG DART_ROOT)
MARK_AS_ADVANCED(DART_ROOT)
diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake
index c87e736..72d70d5 100644
--- a/Modules/FindDevIL.cmake
+++ b/Modules/FindDevIL.cmake
@@ -25,7 +25,7 @@
# TODO: Add version support.
# Tested under Linux and Windows (MSVC)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PATH(IL_INCLUDE_DIR il.h
PATH_SUFFIXES include IL
diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake
index aa4973d..cc69d60 100644
--- a/Modules/FindDoxygen.cmake
+++ b/Modules/FindDoxygen.cmake
@@ -76,7 +76,7 @@ FIND_PROGRAM(DOXYGEN_EXECUTABLE
DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen DEFAULT_MSG DOXYGEN_EXECUTABLE)
#
diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake
index 3c04b4c..e97c31e 100644
--- a/Modules/FindEXPAT.cmake
+++ b/Modules/FindEXPAT.cmake
@@ -26,7 +26,7 @@ FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat)
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT DEFAULT_MSG EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
# Copy the results to the output variables.
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index 55b5639..272cdc7 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -78,7 +78,11 @@ IF(FLEX_EXECUTABLE)
RESULT_VARIABLE FLEX_version_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
IF(NOT ${FLEX_version_result} EQUAL 0)
- MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_error}")
+ IF(FLEX_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}")
+ ELSE()
+ MESSAGE("Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}\nFLEX_VERSION will not be available")
+ ENDIF()
ELSE()
STRING(REGEX REPLACE "^flex (.*)$" "\\1"
FLEX_VERSION "${FLEX_version_output}")
@@ -139,7 +143,7 @@ IF(FLEX_EXECUTABLE)
ENDIF(FLEX_EXECUTABLE)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLEX REQUIRED_VARS FLEX_EXECUTABLE
VERSION_VAR FLEX_VERSION)
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index 6d51277..eb5db81 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -67,11 +67,6 @@ IF(APPLE)
SET( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
ENDIF(APPLE)
-IF(CYGWIN)
- FIND_LIBRARY(FLTK_MATH_LIBRARY m)
- SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ ${FLTK_MATH_LIBRARY} -lgdi32)
-ENDIF(CYGWIN)
-
# If FLTK_INCLUDE_DIR is already defined we assigne its value to FLTK_DIR
IF(FLTK_INCLUDE_DIR)
SET(FLTK_DIR ${FLTK_INCLUDE_DIR})
@@ -297,7 +292,7 @@ ENDIF(NOT FLTK_DIR)
ENDIF()
LIST(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY})
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
IF(FLTK_SKIP_FLUID)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR)
ELSE()
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index 43409d3..436e280 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -45,10 +45,6 @@ IF(APPLE)
SET( FLTK2_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
ENDIF(APPLE)
-IF(CYGWIN)
- SET( FLTK2_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32)
-ENDIF(CYGWIN)
-
# If FLTK2_INCLUDE_DIR is already defined we assigne its value to FLTK2_DIR
IF(FLTK2_INCLUDE_DIR)
SET(FLTK2_DIR ${FLTK2_INCLUDE_DIR})
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index 7762684..0adfdc2 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -88,7 +88,7 @@ SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake
index 2050c72..4bc1580 100644
--- a/Modules/FindGDAL.cmake
+++ b/Modules/FindGDAL.cmake
@@ -100,7 +100,7 @@ FIND_LIBRARY(GDAL_LIBRARY
/usr/freeware
)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR)
set(GDAL_LIBRARIES ${GDAL_LIBRARY})
diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake
index e0d25e1..784b4ec 100644
--- a/Modules/FindGIF.cmake
+++ b/Modules/FindGIF.cmake
@@ -60,7 +60,7 @@ SET(GIF_LIBRARIES ${GIF_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF DEFAULT_MSG GIF_LIBRARY GIF_INCLUDE_DIR)
MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY)
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index e437e1c..1e59946 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -66,6 +66,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+# Version 1.3 (11/9/2010) (CMake 2.8.4)
+# * 11429: Add support for detecting GTK2 built with Visual Studio 10.
+# Thanks to Vincent Levesque for the patch.
+
# Version 1.2 (8/30/2010) (CMake 2.8.3)
# * Merge patch for detecting gdk-pixbuf library (split off
# from core GTK in 2.21). Thanks to Vincent Untz for the patch
@@ -237,15 +241,16 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
set(_library ${_lib})
- if(_expand_vc)
- # Add vc80/vc90 midfixes
+ if(_expand_vc AND MSVC)
+ # Add vc80/vc90/vc100 midfixes
if(MSVC80)
set(_library ${_library}-vc80)
- set(_library_d ${_library}-d)
elseif(MSVC90)
set(_library ${_library}-vc90)
- set(_library_d ${_library}-d)
+ elseif(MSVC10)
+ set(_library ${_library}-vc100)
endif()
+ set(_library_d ${_library}-d)
endif()
if(GTK2_DEBUG)
@@ -516,7 +521,7 @@ endif()
set(_GTK2_did_we_find_everything true) # This gets set to GTK2_FOUND
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
string(TOUPPER ${_GTK2_component} _COMPONENT_UPPER)
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index ef2852a..720591a 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -146,7 +146,7 @@ else()
_gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind)
endif()
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTest DEFAULT_MSG GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
if(GTEST_FOUND)
diff --git a/Modules/FindGit.cmake b/Modules/FindGit.cmake
index 06df3b0..8188715 100644
--- a/Modules/FindGit.cmake
+++ b/Modules/FindGit.cmake
@@ -42,5 +42,5 @@ mark_as_advanced(GIT_EXECUTABLE)
# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
diff --git a/Modules/FindGnuTLS.cmake b/Modules/FindGnuTLS.cmake
index 5c41253..4363bf7 100644
--- a/Modules/FindGnuTLS.cmake
+++ b/Modules/FindGnuTLS.cmake
@@ -56,7 +56,7 @@ MARK_AS_ADVANCED(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS DEFAULT_MSG GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
IF(GNUTLS_FOUND)
diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake
index 364d725..e7375d4 100644
--- a/Modules/FindGnuplot.cmake
+++ b/Modules/FindGnuplot.cmake
@@ -34,7 +34,7 @@ SET(GNUPLOT ${GNUPLOT_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot DEFAULT_MSG GNUPLOT_EXECUTABLE)
MARK_AS_ADVANCED( GNUPLOT_EXECUTABLE )
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 467b09f..90c9de4 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -57,7 +57,7 @@
# This module is maintained by Will Dicharry <wdicharry@stellarscience.com>.
include(SelectLibraryConfigurations)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
# List of the valid HDF5 components
set( HDF5_VALID_COMPONENTS
@@ -293,7 +293,7 @@ else()
# If the HDF5 include directory was found, open H5pubconf.h to determine if
# HDF5 was compiled with parallel IO support
set( HDF5_IS_PARALLEL FALSE )
- foreach( _dir HDF5_INCLUDE_DIRS )
+ foreach( _dir IN LISTS HDF5_INCLUDE_DIRS )
if( EXISTS "${_dir}/H5pubconf.h" )
file( STRINGS "${_dir}/H5pubconf.h"
HDF5_HAVE_PARALLEL_DEFINE
diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake
index 3a8943f..2838027 100644
--- a/Modules/FindHSPELL.cmake
+++ b/Modules/FindHSPELL.cmake
@@ -36,7 +36,7 @@ ENDIF()
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL DEFAULT_MSG HSPELL_LIBRARIES HSPELL_INCLUDE_DIR)
MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index 3afcb1c..774b2ad 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -171,7 +171,7 @@ SET(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES})
#---------------------------------------------------------------------
# Standard Package Output
#---------------------------------------------------------------------
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
ImageMagick DEFAULT_MSG ImageMagick_FOUND
)
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 5d70f0b..d9395b8 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -232,7 +232,7 @@ FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
${JAVA_INCLUDE_PATH}
)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JNI DEFAULT_MSG JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake
index 1f37483..721f400 100644
--- a/Modules/FindJPEG.cmake
+++ b/Modules/FindJPEG.cmake
@@ -27,7 +27,7 @@ FIND_LIBRARY(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR)
IF(JPEG_FOUND)
diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake
index 8aaa373..fde5165 100644
--- a/Modules/FindJasper.cmake
+++ b/Modules/FindJasper.cmake
@@ -27,7 +27,7 @@ FIND_LIBRARY(JASPER_LIBRARY NAMES jasper libjasper)
# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper DEFAULT_MSG JASPER_LIBRARY JASPER_INCLUDE_DIR JPEG_LIBRARIES)
IF (JASPER_FOUND)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 1599433..acdbb70 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -150,7 +150,7 @@ FIND_PROGRAM(Java_JAVAC_EXECUTABLE
PATHS ${_JAVA_PATHS}
)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
if(Java_FIND_COMPONENTS)
foreach(component ${Java_FIND_COMPONENTS})
# User just want to execute some Java byte-compiled
diff --git a/Modules/FindLibArchive.cmake b/Modules/FindLibArchive.cmake
index e7c2706..2104e70 100644
--- a/Modules/FindLibArchive.cmake
+++ b/Modules/FindLibArchive.cmake
@@ -50,7 +50,7 @@ endif()
# Handle the QUIETLY and REQUIRED arguments and set LIBARCHIVE_FOUND
# to TRUE if all listed variables are TRUE.
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
find_package_handle_standard_args(LibArchive DEFAULT_MSG
LibArchive_LIBRARY LibArchive_INCLUDE_DIR
)
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index 250c20a..6152bfd 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -46,7 +46,7 @@ SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)
diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake
index 0fcfbf5..cb05b63 100644
--- a/Modules/FindLibXslt.cmake
+++ b/Modules/FindLibXslt.cmake
@@ -40,7 +40,7 @@ FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES)
diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake
index 091e596..cb979f1 100644
--- a/Modules/FindLua50.cmake
+++ b/Modules/FindLua50.cmake
@@ -87,7 +87,7 @@ ELSE(${LUA_LIBRARY_lua} MATCHES "framework")
ENDIF(${LUA_LIBRARY_lua} MATCHES "framework")
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua50 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR)
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
index e67d545..ea3e8f6 100644
--- a/Modules/FindLua51.cmake
+++ b/Modules/FindLua51.cmake
@@ -66,7 +66,7 @@ IF(LUA_LIBRARY)
ENDIF(UNIX AND NOT APPLE)
ENDIF(LUA_LIBRARY)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR)
diff --git a/Modules/FindMPEG.cmake b/Modules/FindMPEG.cmake
index 9d44ac4..6de6ce3 100644
--- a/Modules/FindMPEG.cmake
+++ b/Modules/FindMPEG.cmake
@@ -34,7 +34,7 @@ FIND_LIBRARY( MPEG_vo_LIBRARY vo
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
IF(MPEG_FOUND)
diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake
index bc1cf2b..6961e87 100644
--- a/Modules/FindMPEG2.cmake
+++ b/Modules/FindMPEG2.cmake
@@ -36,7 +36,7 @@ FIND_LIBRARY( MPEG2_vo_LIBRARY vo
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
IF(MPEG2_FOUND)
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 45d6bff..78699cc 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -81,6 +81,7 @@ set(_MPI_PACKAGE_DIR
lib/openmpi
"MPICH/SDK"
"Microsoft Compute Cluster Pack"
+ "Microsoft HPC Pack 2008 R2"
)
set(_MPI_PREFIX_PATH)
@@ -188,7 +189,7 @@ if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
# the cache, and we don't want to override those settings.
elseif (MPI_COMPILE_CMDLINE)
# Extract compile flags from the compile command line.
- string(REGEX MATCHALL "(^| )-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
+ string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
set(MPI_COMPILE_FLAGS_WORK)
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
if (MPI_COMPILE_FLAGS_WORK)
@@ -306,7 +307,7 @@ else (MPI_COMPILE_CMDLINE)
# No MPI compiler to interogate so attempt to find everything with find functions.
find_path(MPI_INCLUDE_PATH mpi.h
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES include
+ PATH_SUFFIXES include Inc
)
# Decide between 32-bit and 64-bit libraries for Microsoft's MPI
@@ -345,7 +346,7 @@ else (MPI_INCLUDE_PATH AND MPI_LIBRARY)
set(MPI_FOUND FALSE)
endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
# handle the QUIETLY and REQUIRED arguments
find_package_handle_standard_args(MPI DEFAULT_MSG MPI_LIBRARY MPI_INCLUDE_PATH)
diff --git a/Modules/FindMotif.cmake b/Modules/FindMotif.cmake
index f101545..8247afd 100644
--- a/Modules/FindMotif.cmake
+++ b/Modules/FindMotif.cmake
@@ -34,7 +34,7 @@ ENDIF(UNIX)
# handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake
index 8f79436..982b4fd 100644
--- a/Modules/FindOpenAL.cmake
+++ b/Modules/FindOpenAL.cmake
@@ -97,7 +97,7 @@ FIND_LIBRARY(OPENAL_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
MARK_AS_ADVANCED(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index f149d9f..30eb37a 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -26,7 +26,7 @@
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
set(OpenMP_C_FLAG_CANDIDATES
#Gnu
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index d3d7fc2..b599d99 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -113,7 +113,7 @@ ELSE(WIN32 AND NOT CYGWIN)
ENDIF(WIN32 AND NOT CYGWIN)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
find_package_handle_standard_args(OpenSSL DEFAULT_MSG
OPENSSL_LIBRARIES
OPENSSL_INCLUDE_DIR
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake
index 8e6abdb..c4048bd 100644
--- a/Modules/FindOpenSceneGraph.cmake
+++ b/Modules/FindOpenSceneGraph.cmake
@@ -231,7 +231,7 @@ else()
endif()
endif()
- include(FindPackageHandleStandardArgs)
+ include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSceneGraph DEFAULT_MSG OPENSCENEGRAPH_LIBRARIES OPENSCENEGRAPH_INCLUDE_DIR)
endif()
diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake
index e1fe937..74aaa50 100644
--- a/Modules/FindOpenThreads.cmake
+++ b/Modules/FindOpenThreads.cmake
@@ -118,6 +118,6 @@ else()
set(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY})
endif()
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenThreads DEFAULT_MSG
OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)
diff --git a/Modules/FindPHP4.cmake b/Modules/FindPHP4.cmake
index 3b21f89..8a20063 100644
--- a/Modules/FindPHP4.cmake
+++ b/Modules/FindPHP4.cmake
@@ -81,5 +81,5 @@ IF(APPLE)
ENDFOREACH(symbol)
ENDIF(APPLE)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHP4 DEFAULT_MSG PHP4_EXECUTABLE PHP4_INCLUDE_PATH)
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 4fb218b..c137172 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -55,7 +55,7 @@ endif(ZLIB_FOUND)
# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
find_package_handle_standard_args(PNG DEFAULT_MSG PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index cd33aa3..1acb021 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -232,7 +232,7 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
ENDIF (${_NAME}_FIND_VERSION)
IF(VERSION_OK)
- SET(DETAILS "${DETAILS}[v${VERSION}]")
+ SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
ELSE(VERSION_OK)
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(VERSION_OK)
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake
index 87d1ff9..85172d0 100644
--- a/Modules/FindPerl.cmake
+++ b/Modules/FindPerl.cmake
@@ -44,7 +44,7 @@ SET(PERL ${PERL_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl DEFAULT_MSG PERL_EXECUTABLE)
MARK_AS_ADVANCED(PERL_EXECUTABLE)
diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake
index d9b0e2b..0d620e3 100644
--- a/Modules/FindPerlLibs.cmake
+++ b/Modules/FindPerlLibs.cmake
@@ -147,6 +147,32 @@ if (PERL_EXECUTABLE)
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORLIB ${PERL_VENDORLIB_OUTPUT_VARIABLE})
endif (NOT PERL_VENDORLIB_RESULT_VARIABLE)
+ macro(perl_adjust_darwin_lib_variable varname)
+ string( TOUPPER PERL_${varname} FINDPERL_VARNAME )
+ string( TOLOWER install${varname} PERL_VARNAME )
+
+ if (NOT PERL_MINUSV_OUTPUT_VARIABLE)
+ execute_process(
+ COMMAND
+ ${PERL_EXECUTABLE} -V
+ OUTPUT_VARIABLE
+ PERL_MINUSV_OUTPUT_VARIABLE
+ RESULT_VARIABLE
+ PERL_MINUSV_RESULT_VARIABLE
+ )
+ endif()
+
+ if (NOT PERL_MINUSV_RESULT_VARIABLE)
+ string(REGEX MATCH "(${PERL_VARNAME}.*points? to the Updates directory)"
+ PERL_NEEDS_ADJUSTMENT ${PERL_MINUSV_OUTPUT_VARIABLE})
+
+ if (PERL_NEEDS_ADJUSTMENT)
+ string(REGEX REPLACE "(.*)/Updates/" "/System/\\1/" ${FINDPERL_VARNAME} ${${FINDPERL_VARNAME}})
+ endif (PERL_NEEDS_ADJUSTMENT)
+
+ endif (NOT PERL_MINUSV_RESULT_VARIABLE)
+ endmacro()
+
### PERL_ARCHLIB
execute_process(
COMMAND
@@ -158,6 +184,7 @@ if (PERL_EXECUTABLE)
)
if (NOT PERL_ARCHLIB_RESULT_VARIABLE)
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE})
+ perl_adjust_darwin_lib_variable( ARCHLIB )
endif (NOT PERL_ARCHLIB_RESULT_VARIABLE)
### PERL_PRIVLIB
@@ -171,6 +198,7 @@ if (PERL_EXECUTABLE)
)
if (NOT PERL_PRIVLIB_RESULT_VARIABLE)
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_PRIVLIB ${PERL_PRIVLIB_OUTPUT_VARIABLE})
+ perl_adjust_darwin_lib_variable( PRIVLIB )
endif (NOT PERL_PRIVLIB_RESULT_VARIABLE)
@@ -230,7 +258,7 @@ endif (PERL_EXECUTABLE)
# handle the QUIETLY and REQUIRED arguments and set PERLLIBS_FOUND to TRUE if
# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
find_package_handle_standard_args(PerlLibs REQUIRED_VARS PERL_LIBRARY PERL_INCLUDE_PATH
VERSION_VAR PERL_VERSION)
diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake
index c38f4bc..5694c1e 100644
--- a/Modules/FindPhysFS.cmake
+++ b/Modules/FindPhysFS.cmake
@@ -56,6 +56,6 @@ FIND_LIBRARY(PHYSFS_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
diff --git a/Modules/FindProducer.cmake b/Modules/FindProducer.cmake
index d5aefb9..fcee1d9 100644
--- a/Modules/FindProducer.cmake
+++ b/Modules/FindProducer.cmake
@@ -77,6 +77,6 @@ FIND_LIBRARY(PRODUCER_LIBRARY
/opt
)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Producer DEFAULT_MSG
PRODUCER_LIBRARY PRODUCER_INCLUDE_DIR)
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index c9823c2..e79ae26 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -111,7 +111,7 @@ if(WIN32)
set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES}")
endif()
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROTOBUF DEFAULT_MSG
PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR)
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index ed6ade6..645ca79 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -7,7 +7,7 @@
#
#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
+# Copyright 2005-2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -20,8 +20,9 @@
# License text for the above reference.)
FIND_PROGRAM(PYTHON_EXECUTABLE
- NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
+ NAMES python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
PATHS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
@@ -35,7 +36,7 @@ FIND_PROGRAM(PYTHON_EXECUTABLE
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp DEFAULT_MSG PYTHON_EXECUTABLE)
MARK_AS_ADVANCED(PYTHON_EXECUTABLE)
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index d12f14a..10e9241 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -27,7 +27,7 @@ INCLUDE(CMakeFindFrameworks)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
-FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
IF(WIN32)
FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
@@ -98,7 +98,7 @@ SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
@@ -128,6 +128,13 @@ FUNCTION(PYTHON_ADD_MODULE _NAME )
ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES})
+ IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+ SET_TARGET_PROPERTIES(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
+ IF(WIN32 AND NOT CYGWIN)
+ SET_TARGET_PROPERTIES(${_NAME} PROPERTIES SUFFIX ".pyd")
+ ENDIF(WIN32 AND NOT CYGWIN)
+ ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+
ENDIF(PYTHON_ENABLE_MODULE_${_NAME})
ENDFUNCTION(PYTHON_ADD_MODULE)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 0a36710..6129329 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -242,6 +242,7 @@
# QT_LIBRARY_DIR Path to "lib" of Qt4
# QT_PLUGINS_DIR Path to "plugins" for Qt4
# QT_TRANSLATIONS_DIR Path to "translations" of Qt4
+# QT_IMPORTS_DIR Path to "imports" of Qt4
# QT_DOC_DIR Path to "doc" of Qt4
# QT_MKSPECS_DIR Path to "mkspecs" of Qt4
#
@@ -445,6 +446,14 @@ MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR)
ENDMACRO (_QT4_ADJUST_LIB_VARS)
+function(_QT4_QUERY_QMAKE VAR RESULT)
+ exec_program(${QT_QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output )
+ if(NOT return_code)
+ file(TO_CMAKE_PATH "${output}" output)
+ set(${RESULT} ${output} PARENT_SCOPE)
+ endif(NOT return_code)
+endfunction(_QT4_QUERY_QMAKE)
+
SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
@@ -470,10 +479,10 @@ IF (QT_QMAKE_EXECUTABLE)
SET(QT4_QMAKE_FOUND FALSE)
- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
+ _qt4_query_qmake(QT_VERSION QTVERSION)
# check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
- IF("${QTVERSION}" MATCHES "Unknown")
+ IF(NOT QTVERSION)
SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
@@ -482,10 +491,9 @@ IF (QT_QMAKE_EXECUTABLE)
DOC "The qmake executable for the Qt installation to use"
)
IF(QT_QMAKE_EXECUTABLE)
- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
+ _qt4_query_qmake(QT_VERSION QTVERSION)
ENDIF(QT_QMAKE_EXECUTABLE)
- ENDIF("${QTVERSION}" MATCHES "Unknown")
+ ENDIF(NOT QTVERSION)
# check that we found the Qt4 qmake, Qt3 qmake output won't match here
STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
@@ -559,9 +567,7 @@ IF (QT4_QMAKE_FOUND)
# ask qmake for the mkspecs directory
# we do this first because QT_LIBINFIX might be set
IF (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QMAKE_MKSPECS"
- OUTPUT_VARIABLE qt_mkspecs_dirs )
+ _qt4_query_qmake(QMAKE_MKSPECS qt_mkspecs_dirs)
# do not replace : on windows as it might be a drive letter
# and windows should already use ; as a separator
IF(NOT WIN32)
@@ -592,20 +598,18 @@ IF (QT4_QMAKE_FOUND)
# ask qmake for the library dir as a hint, then search for QtCore library and use that as a reference for finding the
# others and for setting QT_LIBRARY_DIR
IF (NOT QT_QTCORE_LIBRARY OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_LIBS"
- OUTPUT_VARIABLE QT_LIBRARY_DIR_TMP )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${QT_LIBRARY_DIR_TMP}" QT_LIBRARY_DIR_TMP)
+ _qt4_query_qmake(QT_INSTALL_LIBS QT_LIBRARY_DIR_TMP)
SET(QT_QTCORE_LIBRARY_RELEASE NOTFOUND)
SET(QT_QTCORE_LIBRARY_DEBUG NOTFOUND)
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
HINTS ${QT_LIBRARY_DIR_TMP}
+ NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
)
FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
HINTS ${QT_LIBRARY_DIR_TMP}
+ NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
)
# try dropping a hint if trying to use Visual Studio with Qt built by mingw
@@ -630,7 +634,7 @@ IF (QT4_QMAKE_FOUND)
SET(QT_QTCORE_FOUND 1)
ELSE()
MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}")
- MESSAGE("Warning: But QtCore couldn't be found. Qt must NOT be installed correctly.")
+ MESSAGE("Warning: But QtCore couldn't be found. Qt must NOT be installed correctly, or it wasn't found for cross compiling.")
IF(Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
ENDIF(Qt4_FIND_REQUIRED)
@@ -647,21 +651,13 @@ IF (QT4_QMAKE_FOUND)
# ask qmake for the binary dir
IF (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_BINS"
- OUTPUT_VARIABLE qt_bins )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins)
- SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
+ _qt4_query_qmake(QT_INSTALL_BINS qt_bins)
+ SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
ENDIF (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
# ask qmake for the include dir
IF (QT_LIBRARY_DIR AND (NOT QT_QTCORE_INCLUDE_DIR OR NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED))
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_HEADERS"
- OUTPUT_VARIABLE qt_headers )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers)
+ _qt4_query_qmake(QT_INSTALL_HEADERS qt_headers)
SET(QT_QTCORE_INCLUDE_DIR NOTFOUND)
FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
HINTS ${qt_headers}
@@ -701,22 +697,14 @@ IF (QT4_QMAKE_FOUND)
# ask qmake for the documentation directory
IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_DOCS"
- OUTPUT_VARIABLE qt_doc_dir )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir)
+ _qt4_query_qmake(QT_INSTALL_DOCS qt_doc_dir)
SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
# ask qmake for the plugins directory
IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_PLUGINS"
- OUTPUT_VARIABLE qt_plugins_dir )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir)
+ _qt4_query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir)
SET(QT_PLUGINS_DIR NOTFOUND)
foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/plugins")
@@ -728,14 +716,27 @@ IF (QT4_QMAKE_FOUND)
# ask qmake for the translations directory
IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_TRANSLATIONS"
- OUTPUT_VARIABLE qt_translations_dir )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_translations_dir}" qt_translations_dir)
+ _qt4_query_qmake(QT_INSTALL_TRANSLATIONS qt_translations_dir)
SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE)
ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
+ # ask qmake for the imports directory
+ IF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
+ _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir)
+ if(qt_imports_dir)
+ SET(QT_IMPORTS_DIR NOTFOUND)
+ foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
+ set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports")
+ endforeach(qt_cross_path)
+ FIND_PATH(QT_IMPORTS_DIR NAMES Qt
+ HINTS ${qt_cross_paths} ${qt_imports_dir}
+ DOC "The location of the Qt imports"
+ NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
+ NO_CMAKE_SYSTEM_PATH)
+ mark_as_advanced(QT_IMPORTS_DIR)
+ endif(qt_imports_dir)
+ ENDIF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
+
# Make variables changeble to the advanced user
MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR
QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
diff --git a/Modules/FindQuickTime.cmake b/Modules/FindQuickTime.cmake
index b86a59f..3638e77 100644
--- a/Modules/FindQuickTime.cmake
+++ b/Modules/FindQuickTime.cmake
@@ -43,5 +43,5 @@ ENDIF(APPLE)
# handle the QUIETLY and REQUIRED arguments and set QUICKTIME_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QuickTime DEFAULT_MSG QUICKTIME_LIBRARY QUICKTIME_INCLUDE_DIR)
diff --git a/Modules/FindRTI.cmake b/Modules/FindRTI.cmake
index b27eaa7..9a01cde 100644
--- a/Modules/FindRTI.cmake
+++ b/Modules/FindRTI.cmake
@@ -95,7 +95,7 @@ ENDIF (RTI_INCLUDE_DIR)
# Set the modified system variables back to the original value.
SET(CMAKE_FIND_LIBRARY_PREFIXES "${RTI_OLD_FIND_LIBRARY_PREFIXES}")
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RTI DEFAULT_MSG
RTI_LIBRARY RTI_INCLUDE_DIR)
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index 2e78d85..c54d5a1 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -209,7 +209,7 @@ ENDIF(WIN32)
FIND_LIBRARY(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
SET(_RUBY_REQUIRED_VARS RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
IF(_RUBY_VERSION_SHORT_NODOT GREATER 18)
LIST(APPEND _RUBY_REQUIRED_VARS RUBY_CONFIG_INCLUDE_DIR)
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake
index 68a913d..028fef5 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -62,6 +62,6 @@ IF(SWIG_EXECUTABLE)
ENDIF(SWIG_swiglib_result)
ENDIF(SWIG_EXECUTABLE)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SWIG REQUIRED_VARS SWIG_EXECUTABLE SWIG_DIR
VERSION_VAR SWIG_VERSION )
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
index 9bad3b1..11f66b0 100644
--- a/Modules/FindSubversion.cmake
+++ b/Modules/FindSubversion.cmake
@@ -8,18 +8,22 @@
# The minimum required version of Subversion can be specified using the
# standard syntax, e.g. FIND_PACKAGE(Subversion 1.4)
#
-# If the command line client executable is found the macro
+# If the command line client executable is found two macros are defined:
# Subversion_WC_INFO(<dir> <var-prefix>)
-# is defined to extract information of a subversion working copy at
-# a given location. The macro defines the following variables:
+# Subversion_WC_LOG(<dir> <var-prefix>)
+# Subversion_WC_INFO extracts information of a subversion working copy at
+# a given location. This macro defines the following variables:
# <var-prefix>_WC_URL - url of the repository (at <dir>)
# <var-prefix>_WC_ROOT - root url of the repository
# <var-prefix>_WC_REVISION - current revision
# <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit
# <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit
# <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit
-# <var-prefix>_WC_LAST_CHANGED_LOG - last log of base revision
# <var-prefix>_WC_INFO - output of command `svn info <dir>'
+# Subversion_WC_LOG retrieves the log message of the base revision of a
+# subversion working copy at a given location. This macro defines the
+# variable:
+# <var-prefix>_LAST_CHANGED_LOG - last log of base revision
# Example usage:
# FIND_PACKAGE(Subversion)
# IF(SUBVERSION_FOUND)
@@ -48,11 +52,18 @@ FIND_PROGRAM(Subversion_SVN_EXECUTABLE svn
MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE)
IF(Subversion_SVN_EXECUTABLE)
+ # the subversion commands should be executed with the C locale, otherwise
+ # the message (which are parsed) may be translated, Alex
+ SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
+ SET(ENV{LC_ALL} C)
EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version
OUTPUT_VARIABLE Subversion_VERSION_SVN
OUTPUT_STRIP_TRAILING_WHITESPACE)
+ # restore the previous LC_ALL
+ SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
+
STRING(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*"
"\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}")
@@ -74,6 +85,8 @@ IF(Subversion_SVN_EXECUTABLE)
STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
"\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}")
+ STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
+ "\\2" ${prefix}_WC_ROOT "${${prefix}_WC_INFO}")
STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
"\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}")
STRING(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*"
@@ -109,7 +122,7 @@ IF(Subversion_SVN_EXECUTABLE)
ENDIF(Subversion_SVN_EXECUTABLE)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Subversion REQUIRED_VARS Subversion_SVN_EXECUTABLE
VERSION_VAR Subversion_VERSION_SVN )
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index 314d706..8d780c1 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -197,7 +197,7 @@ FIND_PATH(TK_INCLUDE_PATH
# handle the QUIETLY and REQUIRED arguments and set TCL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)
SET(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake
index 6f06ff1..a5a4d24 100644
--- a/Modules/FindTIFF.cmake
+++ b/Modules/FindTIFF.cmake
@@ -27,7 +27,7 @@ FIND_LIBRARY(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR)
IF(TIFF_FOUND)
diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake
index 322c3a9..390a68e 100644
--- a/Modules/FindTclsh.cmake
+++ b/Modules/FindTclsh.cmake
@@ -84,7 +84,7 @@ FIND_PROGRAM(TCL_TCLSH
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh DEFAULT_MSG TCL_TCLSH)
MARK_AS_ADVANCED(TCL_TCLSH)
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index 25d48d1..488bbd5 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -6,7 +6,7 @@
# CMAKE_USE_PTHREADS_INIT - are we using pthreads
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
# For systems with multiple thread libraries, caller can set
-# CMAKE_THREAD_PREFER_PTHREADS
+# CMAKE_THREAD_PREFER_PTHREAD
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
@@ -153,5 +153,5 @@ IF(CMAKE_USE_PTHREADS_INIT)
ENDIF()
ENDIF(CMAKE_USE_PTHREADS_INIT)
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND)
diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake
index 97c4302..ef4623f 100644
--- a/Modules/FindWget.cmake
+++ b/Modules/FindWget.cmake
@@ -26,7 +26,7 @@ FIND_PROGRAM(WGET_EXECUTABLE
# handle the QUIETLY and REQUIRED arguments and set WGET_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Wget DEFAULT_MSG WGET_EXECUTABLE)
MARK_AS_ADVANCED( WGET_EXECUTABLE )
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 1ac6c2c..9d4fc0e 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -66,7 +66,7 @@ ENDIF()
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_INCLUDE_DIR ZLIB_LIBRARY
VERSION_VAR ZLIB_VERSION_STRING)
diff --git a/Modules/Findosg.cmake b/Modules/Findosg.cmake
index 76f202f..3c884d4 100644
--- a/Modules/Findosg.cmake
+++ b/Modules/Findosg.cmake
@@ -50,5 +50,5 @@ include(Findosg_functions)
OSG_FIND_PATH (OSG osg/PositionAttitudeTransform)
OSG_FIND_LIBRARY(OSG osg)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osg DEFAULT_MSG OSG_LIBRARY OSG_INCLUDE_DIR)
diff --git a/Modules/FindosgAnimation.cmake b/Modules/FindosgAnimation.cmake
index 83e669a..6cfc784 100644
--- a/Modules/FindosgAnimation.cmake
+++ b/Modules/FindosgAnimation.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGANIMATION osgAnimation/Animation)
OSG_FIND_LIBRARY(OSGANIMATION osgAnimation)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgAnimation DEFAULT_MSG
OSGANIMATION_LIBRARY OSGANIMATION_INCLUDE_DIR)
diff --git a/Modules/FindosgDB.cmake b/Modules/FindosgDB.cmake
index f1cdfa5..1da6cc0 100644
--- a/Modules/FindosgDB.cmake
+++ b/Modules/FindosgDB.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGDB osgDB/DatabasePager)
OSG_FIND_LIBRARY(OSGDB osgDB)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgDB DEFAULT_MSG
OSGDB_LIBRARY OSGDB_INCLUDE_DIR)
diff --git a/Modules/FindosgFX.cmake b/Modules/FindosgFX.cmake
index 64cbda8..dd8d6d8 100644
--- a/Modules/FindosgFX.cmake
+++ b/Modules/FindosgFX.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGFX osgFX/BumpMapping)
OSG_FIND_LIBRARY(OSGFX osgFX)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgFX DEFAULT_MSG
OSGFX_LIBRARY OSGFX_INCLUDE_DIR)
diff --git a/Modules/FindosgGA.cmake b/Modules/FindosgGA.cmake
index 00fc313..ae96f81 100644
--- a/Modules/FindosgGA.cmake
+++ b/Modules/FindosgGA.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGGA osgGA/FlightManipulator)
OSG_FIND_LIBRARY(OSGGA osgGA)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgGA DEFAULT_MSG
OSGGA_LIBRARY OSGGA_INCLUDE_DIR)
diff --git a/Modules/FindosgIntrospection.cmake b/Modules/FindosgIntrospection.cmake
index 919523b..b540cc0 100644
--- a/Modules/FindosgIntrospection.cmake
+++ b/Modules/FindosgIntrospection.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGINTROSPECTION osgIntrospection/Reflection)
OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgIntrospection DEFAULT_MSG
OSGINTROSPECTION_LIBRARY OSGINTROSPECTION_INCLUDE_DIR)
diff --git a/Modules/FindosgManipulator.cmake b/Modules/FindosgManipulator.cmake
index 93d4bac..b7cc02f 100644
--- a/Modules/FindosgManipulator.cmake
+++ b/Modules/FindosgManipulator.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGMANIPULATOR osgManipulator/TrackballDragger)
OSG_FIND_LIBRARY(OSGMANIPULATOR osgManipulator)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgManipulator DEFAULT_MSG
OSGMANIPULATOR_LIBRARY OSGMANIPULATOR_INCLUDE_DIR)
diff --git a/Modules/FindosgParticle.cmake b/Modules/FindosgParticle.cmake
index a0d7516..e204597 100644
--- a/Modules/FindosgParticle.cmake
+++ b/Modules/FindosgParticle.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGPARTICLE osgParticle/FireEffect)
OSG_FIND_LIBRARY(OSGPARTICLE osgParticle)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgParticle DEFAULT_MSG
OSGPARTICLE_LIBRARY OSGPARTICLE_INCLUDE_DIR)
diff --git a/Modules/FindosgProducer.cmake b/Modules/FindosgProducer.cmake
index e4e57f3..ea6b33a 100644
--- a/Modules/FindosgProducer.cmake
+++ b/Modules/FindosgProducer.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGPRODUCER osgProducer/OsgSceneHandler)
OSG_FIND_LIBRARY(OSGPRODUCER osgProducer)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgProducer DEFAULT_MSG
OSGPRODUCER_LIBRARY OSGPRODUCER_INCLUDE_DIR)
diff --git a/Modules/FindosgShadow.cmake b/Modules/FindosgShadow.cmake
index 86a339c..e569602 100644
--- a/Modules/FindosgShadow.cmake
+++ b/Modules/FindosgShadow.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGSHADOW osgShadow/ShadowTexture)
OSG_FIND_LIBRARY(OSGSHADOW osgShadow)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgShadow DEFAULT_MSG
OSGSHADOW_LIBRARY OSGSHADOW_INCLUDE_DIR)
diff --git a/Modules/FindosgSim.cmake b/Modules/FindosgSim.cmake
index b66a991..865cb0b 100644
--- a/Modules/FindosgSim.cmake
+++ b/Modules/FindosgSim.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGSIM osgSim/ImpostorSprite)
OSG_FIND_LIBRARY(OSGSIM osgSim)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgSim DEFAULT_MSG
OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR)
diff --git a/Modules/FindosgTerrain.cmake b/Modules/FindosgTerrain.cmake
index 04559cf..4dc961d 100644
--- a/Modules/FindosgTerrain.cmake
+++ b/Modules/FindosgTerrain.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGTERRAIN osgTerrain/Terrain)
OSG_FIND_LIBRARY(OSGTERRAIN osgTerrain)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgTerrain DEFAULT_MSG
OSGTERRAIN_LIBRARY OSGTERRAIN_INCLUDE_DIR)
diff --git a/Modules/FindosgText.cmake b/Modules/FindosgText.cmake
index 6d20336..ba78755 100644
--- a/Modules/FindosgText.cmake
+++ b/Modules/FindosgText.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGTEXT osgText/Text)
OSG_FIND_LIBRARY(OSGTEXT osgText)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgText DEFAULT_MSG
OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR)
diff --git a/Modules/FindosgUtil.cmake b/Modules/FindosgUtil.cmake
index 2faa7d4..4f93e43 100644
--- a/Modules/FindosgUtil.cmake
+++ b/Modules/FindosgUtil.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGUTIL osgUtil/SceneView)
OSG_FIND_LIBRARY(OSGUTIL osgUtil)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgUtil DEFAULT_MSG
OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR)
diff --git a/Modules/FindosgViewer.cmake b/Modules/FindosgViewer.cmake
index 30b9926..f434fe4 100644
--- a/Modules/FindosgViewer.cmake
+++ b/Modules/FindosgViewer.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGVIEWER osgViewer/Viewer)
OSG_FIND_LIBRARY(OSGVIEWER osgViewer)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgViewer DEFAULT_MSG
OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR)
diff --git a/Modules/FindosgVolume.cmake b/Modules/FindosgVolume.cmake
index f916667..4a46d1e 100644
--- a/Modules/FindosgVolume.cmake
+++ b/Modules/FindosgVolume.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGVOLUME osgVolume/Volume)
OSG_FIND_LIBRARY(OSGVOLUME osgVolume)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgVolume DEFAULT_MSG
OSGVOLUME_LIBRARY OSGVOLUME_INCLUDE_DIR)
diff --git a/Modules/FindosgWidget.cmake b/Modules/FindosgWidget.cmake
index 5f84873..e722c2d 100644
--- a/Modules/FindosgWidget.cmake
+++ b/Modules/FindosgWidget.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGWIDGET osgWidget/Widget)
OSG_FIND_LIBRARY(OSGWIDGET osgWidget)
-include(FindPackageHandleStandardArgs)
+include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgWidget DEFAULT_MSG
OSGWIDGET_LIBRARY OSGWIDGET_INCLUDE_DIR)
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index d991cd4..b82ccd0 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -827,7 +827,7 @@ DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}")
#=====================================================================
#=====================================================================
-INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND)
# Maintain consistency with all other variables.
SET(wxWidgets_FOUND ${WXWIDGETS_FOUND})
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index c83da4f..853b1a1 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -146,7 +146,7 @@ function(is_file_executable file result_var)
# If file name ends in .exe on Windows, *assume* executable:
#
- if(WIN32)
+ if(WIN32 AND NOT UNIX)
if("${file_full_lower}" MATCHES "\\.exe$")
set(${result_var} 1 PARENT_SCOPE)
return()
@@ -156,7 +156,7 @@ function(is_file_executable file result_var)
# to determine ${result_var}. In 99%+? practical cases, the exe name
# match will be sufficient...
#
- endif(WIN32)
+ endif(WIN32 AND NOT UNIX)
# Use the information returned from the Unix shell command "file" to
# determine if ${file_full} should be considered an executable file...
@@ -335,7 +335,7 @@ function(gp_resolve_item context item exepath dirs resolved_item_var)
# Using find_program on Windows will find dll files that are in the PATH.
# (Converting simple file names into full path names if found.)
#
- if(WIN32)
+ if(WIN32 AND NOT UNIX)
if(NOT resolved)
set(ri "ri-NOTFOUND")
find_program(ri "${item}" PATHS "${exepath};${dirs}" NO_DEFAULT_PATH)
@@ -347,7 +347,7 @@ function(gp_resolve_item context item exepath dirs resolved_item_var)
set(ri "ri-NOTFOUND")
endif(ri)
endif(NOT resolved)
- endif(WIN32)
+ endif(WIN32 AND NOT UNIX)
# Provide a hook so that projects can override item resolution
# by whatever logic they choose:
@@ -413,7 +413,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
string(TOLOWER "${resolved_file}" lower)
if(UNIX)
- if(resolved_file MATCHES "^(/lib/|/lib32/|/lib64/|/usr/lib/|/usr/lib32/|/usr/lib64/|/usr/X11R6/)")
+ if(resolved_file MATCHES "^(/lib/|/lib32/|/lib64/|/usr/lib/|/usr/lib32/|/usr/lib64/|/usr/X11R6/|/usr/bin/)")
set(is_system 1)
endif()
endif()
@@ -434,7 +434,27 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
if(lower MATCHES "^(${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*msvc[^/]+dll)")
set(is_system 1)
endif()
- endif()
+
+ if(UNIX)
+ # if cygwin, we can get the properly formed windows paths from cygpath
+ find_program(CYGPATH_EXECUTABLE cygpath)
+
+ if(CYGPATH_EXECUTABLE)
+ execute_process(COMMAND ${CYGPATH_EXECUTABLE} -W
+ OUTPUT_VARIABLE env_windir
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND ${CYGPATH_EXECUTABLE} -S
+ OUTPUT_VARIABLE env_sysdir
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(TOLOWER "${env_windir}" windir)
+ string(TOLOWER "${env_sysdir}" sysroot)
+
+ if(lower MATCHES "^(${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*msvc[^/]+dll)")
+ set(is_system 1)
+ endif()
+ endif(CYGPATH_EXECUTABLE)
+ endif(UNIX)
+ endif(WIN32)
if(NOT is_system)
get_filename_component(original_path "${original_lower}" PATH)
@@ -519,9 +539,9 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
if(APPLE)
set(gp_tool "otool")
endif(APPLE)
- if(WIN32)
+ if(WIN32 AND NOT UNIX) # This is how to check for cygwin, har!
set(gp_tool "dumpbin")
- endif(WIN32)
+ endif(WIN32 AND NOT UNIX)
endif("${gp_tool}" STREQUAL "")
set(gp_tool_known 0)
@@ -587,11 +607,22 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
#
get_filename_component(gp_cmd_dir "${gp_cmd}" PATH)
get_filename_component(gp_cmd_dlls_dir "${gp_cmd_dir}/../../Common7/IDE" ABSOLUTE)
+ # Use cmake paths as a user may have a PATH element ending with a backslash.
+ # This will escape the list delimiter and create havoc!
if(EXISTS "${gp_cmd_dlls_dir}")
# only add to the path if it is not already in the path
- if(NOT "$ENV{PATH}" MATCHES "${gp_cmd_dlls_dir}")
+ set(gp_found_cmd_dlls_dir 0)
+ file(TO_CMAKE_PATH "$ENV{PATH}" env_path)
+ foreach(gp_env_path_element ${env_path})
+ if("${gp_env_path_element}" STREQUAL "${gp_cmd_dlls_dir}")
+ set(gp_found_cmd_dlls_dir 1)
+ endif()
+ endforeach(gp_env_path_element)
+
+ if(NOT gp_found_cmd_dlls_dir)
+ file(TO_NATIVE_PATH "${gp_cmd_dlls_dir}" gp_cmd_dlls_dir)
set(ENV{PATH} "$ENV{PATH};${gp_cmd_dlls_dir}")
- endif(NOT "$ENV{PATH}" MATCHES "${gp_cmd_dlls_dir}")
+ endif()
endif(EXISTS "${gp_cmd_dlls_dir}")
endif("${gp_tool}" STREQUAL "dumpbin")
#
diff --git a/Modules/Platform/Windows-GNU-Fortran.cmake b/Modules/Platform/Windows-GNU-Fortran.cmake
index 8273a19..c66feed 100644
--- a/Modules/Platform/Windows-GNU-Fortran.cmake
+++ b/Modules/Platform/Windows-GNU-Fortran.cmake
@@ -1,3 +1,2 @@
include(Platform/Windows-GNU)
__windows_compiler_gnu(Fortran)
-set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 0)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index 79b2f80..ac635a5 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -76,7 +76,23 @@ macro(__windows_compiler_gnu lang)
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on Windows
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE})
- set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-Wl,@")
+
+ # We prefer "@" for response files but it is not supported by gcc 3.
+ execute_process(COMMAND ${CMAKE_${lang}_COMPILER} --version OUTPUT_VARIABLE _ver ERROR_VARIABLE _ver)
+ if("${_ver}" MATCHES "\\(GCC\\) 3\\.")
+ if("${lang}" STREQUAL "Fortran")
+ # The GNU Fortran compiler reports an error:
+ # no input files; unwilling to write output files
+ # when the response file is passed with "-Wl,@".
+ set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 0)
+ else()
+ # Use "-Wl,@" to pass the response file to the linker.
+ set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-Wl,@")
+ endif()
+ elseif(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS)
+ # Use "@" to pass the response file to the front-end.
+ set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "@")
+ endif()
# Binary link rules.
set(CMAKE_${lang}_CREATE_SHARED_MODULE
@@ -85,4 +101,21 @@ macro(__windows_compiler_gnu lang)
"<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
+
+ # Support very long lists of object files.
+ if("${CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG}" STREQUAL "@")
+ foreach(rule CREATE_SHARED_MODULE CREATE_SHARED_LIBRARY LINK_EXECUTABLE)
+ # The gcc/collect2/ld toolchain does not use response files
+ # internally so we cannot pass long object lists. Instead pass
+ # the object file list in a response file to the archiver to put
+ # them in a temporary archive. Hand the archive to the linker.
+ string(REPLACE "<OBJECTS>" "-Wl,--whole-archive <OBJECT_DIR>/objects.a -Wl,--no-whole-archive"
+ CMAKE_${lang}_${rule} "${CMAKE_${lang}_${rule}}")
+ set(CMAKE_${lang}_${rule}
+ "<CMAKE_COMMAND> -E remove -f <OBJECT_DIR>/objects.a"
+ "<CMAKE_AR> cr <OBJECT_DIR>/objects.a <OBJECTS>"
+ "${CMAKE_${lang}_${rule}}"
+ )
+ endforeach()
+ endif()
endmacro()
diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake
index 753b198..f5046bf 100644
--- a/Modules/Platform/Windows-df.cmake
+++ b/Modules/Platform/Windows-df.cmake
@@ -10,6 +10,8 @@ ELSE(CMAKE_VERBOSE_MAKEFILE)
SET(CMAKE_CL_NOLOGO "/nologo")
ENDIF(CMAKE_VERBOSE_MAKEFILE)
+SET(CMAKE_Fortran_MODDIR_FLAG "-module:")
+
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 700d3a2..df07d25 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -196,11 +196,16 @@ MACRO (QT4_ADD_RESOURCES outfiles )
ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
ENDFOREACH(_RC_FILE)
+ # Since this cmake macro is doing the dependency scanning for these files,
+ # let's make a configured file and add it as a dependency so cmake is run
+ # again when dependencies need to be recomputed.
+ QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
+ CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
- DEPENDS ${_RC_DEPENDS})
+ DEPENDS ${_RC_DEPENDS} "${out_depends}")
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH (it)
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 79ccdd9..c86434e 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -58,9 +58,11 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive,
// Change to local toplevel
cmSystemTools::ChangeDirectory(localToplevel.c_str());
std::vector<std::string>::const_iterator fileIt;
- for (fileIt = component->Files.begin(); fileIt != component->Files.end(); ++fileIt )
+ for (fileIt = component->Files.begin(); fileIt != component->Files.end();
+ ++fileIt )
{
- cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: " << (*fileIt) << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: "
+ << (*fileIt) << std::endl);
archive.Add(*fileIt);
if (!archive)
{
@@ -85,7 +87,8 @@ cmGeneratedFileStream gf; \
gf.Open(filename.c_str(), false, true); \
if (!GenerateHeader(&gf)) \
{ \
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to generate Header for archive < " \
+ cmCPackLogger(cmCPackLog::LOG_ERROR, \
+ "Problem to generate Header for archive < " \
<< filename \
<< ">." << std::endl); \
return 0; \
@@ -118,7 +121,9 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
<< std::endl);
// Begin the archive for this group
std::string packageFileName= std::string(toplevel);
- packageFileName += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-"+compGIt->first + this->GetOutputExtension();
+ packageFileName += "/"
+ +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ +"-"+compGIt->first + this->GetOutputExtension();
// open a block in order to automatically close archive
// at the end of the block
{
@@ -142,13 +147,16 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
else
{
std::map<std::string, cmCPackComponent>::iterator compIt;
- for (compIt=this->Components.begin();compIt!=this->Components.end(); ++compIt )
+ for (compIt=this->Components.begin();
+ compIt!=this->Components.end(); ++compIt )
{
std::string localToplevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
std::string packageFileName = std::string(toplevel);
localToplevel += "/"+ compIt->first;
- packageFileName += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-"+compIt->first + this->GetOutputExtension();
+ packageFileName += "/"
+ +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ +"-"+compIt->first + this->GetOutputExtension();
{
DECLARE_AND_OPEN_ARCHIVE(packageFileName,archive);
// Add the files of this component to the archive
@@ -167,8 +175,12 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
// reset the package file names
packageFileNames.clear();
packageFileNames.push_back(std::string(toplevel));
- packageFileNames[0] += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-ALL" + this->GetOutputExtension();
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging all groups in one package...(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)"
+ packageFileNames[0] += "/"
+ +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ +"-ALL" + this->GetOutputExtension();
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Packaging all groups in one package..."
+ "(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)"
<< std::endl);
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
@@ -197,7 +209,8 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
else
{
std::map<std::string, cmCPackComponent>::iterator compIt;
- for (compIt=this->Components.begin();compIt!=this->Components.end(); ++compIt )
+ for (compIt=this->Components.begin();compIt!=this->Components.end();
+ ++compIt )
{
// Add the files of this component to the archive
addOneComponentToArchive(archive,&(compIt->second));
@@ -215,9 +228,15 @@ int cmCPackArchiveGenerator::PackageFiles()
// The default behavior is to create 1 package by component group
// unless the user asked to put all COMPONENTS in a single package
- bool allGroupInOne = (NULL != (this->GetOption("CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE")));
- bool allComponentInOne = (NULL != (this->GetOption("CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE")));
- bool ignoreComponentGroup = ( NULL != (this->GetOption("CPACK_COMPONENTS_IGNORE_GROUPS")));
+ bool allGroupInOne = (NULL !=
+ (this->GetOption(
+ "CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE")));
+ bool allComponentInOne = (NULL !=
+ (this->GetOption(
+ "CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE")));
+ bool ignoreComponentGroup = ( NULL !=
+ (this->GetOption(
+ "CPACK_COMPONENTS_IGNORE_GROUPS")));
std::string groupingType;
@@ -248,13 +267,15 @@ int cmCPackArchiveGenerator::PackageFiles()
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " requested component grouping type <"<< groupingType
- << "> UNKNOWN not in (ALL_GROUP_IN_ONE,ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl);
+ << "> UNKNOWN not in (ALL_GROUP_IN_ONE,"
+ "ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl);
}
}
// Some components were defined but NO group
// force ignoreGroups
- if (this->ComponentGroups.empty() && (!this->Components.empty()) && (!ignoreComponentGroup)) {
+ if (this->ComponentGroups.empty() && (!this->Components.empty())
+ && (!ignoreComponentGroup)) {
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " Some Components defined but NO component group:"
@@ -286,7 +307,8 @@ int cmCPackArchiveGenerator::PackageFiles()
for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
{
// Get the relative path to the file
- std::string rp = cmSystemTools::RelativePath(toplevel.c_str(), fileIt->c_str());
+ std::string rp = cmSystemTools::RelativePath(toplevel.c_str(),
+ fileIt->c_str());
archive.Add(rp);
if(!archive)
{
diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h
index ae545c8..6e173bd 100644
--- a/Source/CPack/cmCPackArchiveGenerator.h
+++ b/Source/CPack/cmCPackArchiveGenerator.h
@@ -45,7 +45,8 @@ protected:
* @param[in,out] archive the archive object
* @param[in] component the component whose file will be added to archive
*/
- int addOneComponentToArchive(cmArchiveWrite& archive, cmCPackComponent* component);
+ int addOneComponentToArchive(cmArchiveWrite& archive,
+ cmCPackComponent* component);
/**
* The main package file method.
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index ac2e151..47a1ff6 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -94,6 +94,18 @@ int cmCPackDebGenerator::PackageFiles()
this->GetOption("CPACK_DEBIAN_PACKAGE_SUGGESTS");
const char* debian_pkg_url =
this->GetOption("CPACK_DEBIAN_PACKAGE_HOMEPAGE");
+ const char* debian_pkg_predep =
+ this->GetOption("CPACK_DEBIAN_PACKAGE_PREDEPENDS");
+ const char* debian_pkg_enhances =
+ this->GetOption("CPACK_DEBIAN_PACKAGE_ENHANCES");
+ const char* debian_pkg_breaks =
+ this->GetOption("CPACK_DEBIAN_PACKAGE_BREAKS");
+ const char* debian_pkg_conflicts =
+ this->GetOption("CPACK_DEBIAN_PACKAGE_CONFLICTS");
+ const char* debian_pkg_provides =
+ this->GetOption("CPACK_DEBIAN_PACKAGE_PROVIDES");
+ const char* debian_pkg_replaces =
+ this->GetOption("CPACK_DEBIAN_PACKAGE_REPLACES");
{ // the scope is needed for cmGeneratedFileStream
cmGeneratedFileStream out(ctlfilename.c_str());
@@ -102,22 +114,46 @@ int cmCPackDebGenerator::PackageFiles()
out << "Section: " << debian_pkg_section << "\n";
out << "Priority: " << debian_pkg_priority << "\n";
out << "Architecture: " << debian_pkg_arch << "\n";
- if(debian_pkg_dep)
+ if(debian_pkg_dep && *debian_pkg_dep)
{
out << "Depends: " << debian_pkg_dep << "\n";
}
- if(debian_pkg_rec)
+ if(debian_pkg_rec && *debian_pkg_rec)
{
out << "Recommends: " << debian_pkg_rec << "\n";
}
- if(debian_pkg_sug)
+ if(debian_pkg_sug && *debian_pkg_sug)
{
out << "Suggests: " << debian_pkg_sug << "\n";
}
- if(debian_pkg_url)
+ if(debian_pkg_url && *debian_pkg_url)
{
out << "Homepage: " << debian_pkg_url << "\n";
}
+ if (debian_pkg_predep && *debian_pkg_predep)
+ {
+ out << "Pre-Depends: " << debian_pkg_predep << "\n";
+ }
+ if (debian_pkg_enhances && *debian_pkg_enhances)
+ {
+ out << "Enhances: " << debian_pkg_enhances << "\n";
+ }
+ if (debian_pkg_breaks && *debian_pkg_breaks)
+ {
+ out << "Breaks: " << debian_pkg_breaks << "\n";
+ }
+ if (debian_pkg_conflicts && *debian_pkg_conflicts)
+ {
+ out << "Conflicts: " << debian_pkg_conflicts << "\n";
+ }
+ if (debian_pkg_provides && *debian_pkg_provides)
+ {
+ out << "Provides: " << debian_pkg_provides << "\n";
+ }
+ if (debian_pkg_replaces && *debian_pkg_replaces)
+ {
+ out << "Replaces: " << debian_pkg_replaces << "\n";
+ }
unsigned long totalSize = 0;
{
std::string dirName = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 7c3ff1d..c39aea4 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -172,7 +172,8 @@ int cmCPackGenerator::InstallProject()
= this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
std::string tempInstallDirectoryStr = bareTempInstallDirectory;
bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR"))
- | cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"));
+ | cmSystemTools::IsInternallyOn(
+ this->GetOption("CPACK_SET_DESTDIR"));
if (!setDestDir)
{
tempInstallDirectoryStr += this->GetPackagingInstallPrefix();
@@ -694,9 +695,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
// CPACK_PACKAGING_INSTALL_PREFIX
// I know this is tricky and awkward but it's the price for
// CPACK_SET_DESTDIR backward compatibility.
- if (cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR")))
+ if (cmSystemTools::IsInternallyOn(
+ this->GetOption("CPACK_SET_DESTDIR")))
{
- this->SetOption("CPACK_INSTALL_PREFIX",this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"));
+ this->SetOption("CPACK_INSTALL_PREFIX",
+ this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"));
}
std::string dir;
if (this->GetOption("CPACK_INSTALL_PREFIX"))
@@ -782,7 +785,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
if (absoluteDestFiles.length()>0) {
absoluteDestFiles +=";";
}
- absoluteDestFiles += mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
+ absoluteDestFiles +=
+ mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Got some ABSOLUTE DESTINATION FILES: "
<< absoluteDestFiles << std::endl);
@@ -794,7 +798,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
}
}
}
- this->SetOption("CPACK_ABSOLUTE_DESTINATION_FILES",absoluteDestFiles.c_str());
+ this->SetOption("CPACK_ABSOLUTE_DESTINATION_FILES",
+ absoluteDestFiles.c_str());
return 1;
}
@@ -921,8 +926,9 @@ int cmCPackGenerator::DoPackage()
// beware we cannot just use tempDirectory as before
// because some generator will "CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
// we really want "CPACK_TEMPORARY_DIRECTORY"
- std::string fileN = cmSystemTools::RelativePath(this->GetOption("CPACK_TEMPORARY_DIRECTORY"),
- it->c_str());
+ std::string fileN =
+ cmSystemTools::RelativePath(
+ this->GetOption("CPACK_TEMPORARY_DIRECTORY"), it->c_str());
// Determine which component we are in.
std::string componentName = fileN.substr(0, fileN.find('/'));
@@ -932,7 +938,9 @@ int cmCPackGenerator::DoPackage()
// Add this file to the list of files for the component.
this->Components[componentName].Files.push_back(fileN);
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <" <<fileN<<"> to component <"<<componentName<<">"<<std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"
+ <<fileN<<"> to component <"
+ <<componentName<<">"<<std::endl);
}
}
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index f6f9fbc..d0eda81 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -93,7 +93,8 @@ int cmCPackNSISGenerator::PackageFiles()
for ( sit = dirs.begin(); sit != dirs.end(); ++ sit )
{
std::string componentName;
- std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(), sit->c_str());
+ std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(),
+ sit->c_str());
if ( fileN.empty() )
{
continue;
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 6570d0e..76ff23a 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -264,7 +264,17 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
{
*this->TestHandler->LogFile << "Test time = " << buf << std::endl;
}
+
+ // Set the working directory to the tests directory
+ std::string oldpath = cmSystemTools::GetCurrentWorkingDirectory();
+ cmSystemTools::ChangeDirectory(this->TestProperties->Directory.c_str());
+
this->DartProcessing();
+
+ // restore working directory
+ cmSystemTools::ChangeDirectory(oldpath.c_str());
+
+
// if this is doing MemCheck then all the output needs to be put into
// Output since that is what is parsed by cmCTestMemCheckHandler
if(!this->TestHandler->MemCheck && started)
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 389ec7f..7f3e360 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -902,7 +902,7 @@ void cmCursesMainForm::HandleInput()
this->SearchMode = false;
if ( this->SearchString.size() > 0 )
{
- this->JumpToCacheEntry(-1, this->SearchString.c_str());
+ this->JumpToCacheEntry(this->SearchString.c_str());
this->OldSearchString = this->SearchString;
}
this->SearchString = "";
@@ -1076,7 +1076,7 @@ void cmCursesMainForm::HandleInput()
{
if ( this->OldSearchString.size() > 0 )
{
- this->JumpToCacheEntry(-1, this->OldSearchString.c_str());
+ this->JumpToCacheEntry(this->OldSearchString.c_str());
}
}
// switch advanced on/off
@@ -1191,7 +1191,7 @@ int cmCursesMainForm::LoadCache(const char *)
return r;
}
-void cmCursesMainForm::JumpToCacheEntry(int idx, const char* astr)
+void cmCursesMainForm::JumpToCacheEntry(const char* astr)
{
std::string str;
if ( astr )
@@ -1199,18 +1199,14 @@ void cmCursesMainForm::JumpToCacheEntry(int idx, const char* astr)
str = cmSystemTools::LowerCase(astr);
}
- if ( size_t(idx) > this->NumberOfVisibleEntries )
- {
- return;
- }
- if ( idx < 0 && str.size() == 0)
+ if(str.empty())
{
return;
}
FIELD* cur = current_field(this->Form);
int start_index = field_index(cur);
int findex = start_index;
- while ( (findex / 3) != idx )
+ for(;;)
{
if ( str.size() > 0 )
{
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index 4084415..3e191b4 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -122,9 +122,8 @@ protected:
// Remove an entry from the interface and the cache.
void RemoveEntry(const char* value);
- // Jump to the cache value with index idx. If string str is
- // specified, it will stop on widget that contain that string.
- void JumpToCacheEntry(int idx, const char* str);
+ // Jump to the cache entry whose name matches the string.
+ void JumpToCacheEntry(const char* str);
// Copies of cache entries stored in the user interface
std::vector<cmCursesCacheEntryComposite*>* Entries;
diff --git a/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake b/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake
deleted file mode 100644
index 9f5cf00..0000000
--- a/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake
+++ /dev/null
@@ -1,347 +0,0 @@
-#
-# CMakeIngestOSXBundleLibraries.cmake
-#
-# Only for the Mac build.
-#
-# Depends on OS tools:
-# otool
-# install_name_tool
-#
-# This script ingests libraries and frameworks into an existing .app bundle and
-# then uses install_name_tool to fixup the references to the newly embedded
-# libraries so that they all refer to each other via "@executable_path."
-#
-# The main intent (and simplifying assumption used for developing the script)
-# is to have a single executable .app bundle that becomes "self-contained" by
-# copying all non-system libs that it depends on into itself. The further
-# assumption is that all such dependencies are simple .dylib shared library
-# files or Mac Framework libraries.
-#
-# This script can be used as part of the build via ADD_CUSTOM_COMMAND, or used
-# only during make install via INSTALL SCRIPT.
-#
-if(NOT DEFINED input_file)
- message(FATAL_ERROR "
-${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): error: Variable input_file is not defined.
-
-Use a command line like this to use this script:
- cmake \"-Dinput_file=filename\" \"-Dextra_libs=/path/to/lib1;/path/to/lib2\" \"-Dlib_path=/path/to/unqualified/libs\" -P \"${CMAKE_CURRENT_LIST_FILE}\"
-
-'input_file' should be the main executable inside a Mac bundle directory structure.
-For example, use 'bin/paraview.app/Contents/MacOS/paraview' from a ParaView binary dir.
-
-'extra_libs' should be a semi-colon separated list of full path names to extra libraries
-to copy into the bundle that cannot be derived from otool -L output. For example, you may
-also want to fixup dynamically loaded plugins from your build tree and copy them into the
-bundle.
-
-'lib_path' should be the path where to find libraries referenced without a path name in
-otool -L output.
-
-")
-endif(NOT DEFINED input_file)
-message("ingest ${input_file}")
-set(eol_char "E")
-
-if(APPLE)
- set(dep_tool "otool")
- set(dep_cmd_args "-L")
- set(dep_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$")
-endif(APPLE)
-
-message("")
-message("# Script \"${CMAKE_CURRENT_LIST_FILE}\" running...")
-message("")
-message("input_file: '${input_file}'")
-message("extra_libs: '${extra_libs}'")
-message("lib_path: '${lib_path}'")
-message("")
-
-get_filename_component(input_file_full "${input_file}" ABSOLUTE)
-message("input_file_full: '${input_file_full}'")
-
-get_filename_component(bundle "${input_file_full}/../../.." ABSOLUTE)
-message("bundle: '${bundle}'")
-
-
-find_program(dep_cmd ${dep_tool})
-
-# find the full path to the framework in path set the result
-# in pathout
-macro(find_framework_full_path path pathout)
- set(${pathout} "${path}")
- if(NOT EXISTS "${path}")
- set(FRAMEWORK_SEARCH "/Library/Frameworks"
- "/System/Library/Frameworks" )
- set(__FOUND FALSE)
- foreach(f ${FRAMEWORK_SEARCH})
- set(newd "${f}/${path}")
- if(EXISTS "${newd}" AND NOT __FOUND)
- set(${pathout} "${newd}")
- set(__FOUND TRUE)
- endif(EXISTS "${newd}" AND NOT __FOUND)
- endforeach(f)
- endif(NOT EXISTS "${path}")
-endmacro(find_framework_full_path)
-
-
-macro(append_unique au_list_var au_value)
- set(${au_list_var} ${${au_list_var}} "${au_value}")
-endmacro(append_unique)
-
-
-macro(gather_dependents gd_target gd_dependents_var)
- execute_process(
- COMMAND ${dep_cmd} ${dep_cmd_args} ${gd_target}
- OUTPUT_VARIABLE dep_tool_ov
- )
-
- string(REGEX REPLACE ";" "\\\\;" dep_candidates "${dep_tool_ov}")
- string(REGEX REPLACE "\n" "${eol_char};" dep_candidates "${dep_candidates}")
-
- set(${gd_dependents_var} "")
-
- foreach(candidate ${dep_candidates})
- if("${candidate}" MATCHES "${dep_regex}")
- string(REGEX REPLACE "${dep_regex}" "\\1" raw_item "${candidate}")
- string(REGEX REPLACE "${dep_regex}" "\\2" raw_compat_version "${candidate}")
- string(REGEX REPLACE "${dep_regex}" "\\3" raw_current_version "${candidate}")
-
- set(item "${raw_item}")
-
- string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1" compat_major_version "${raw_compat_version}")
- string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\2" compat_minor_version "${raw_compat_version}")
- string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\3" compat_patch_version "${raw_compat_version}")
-
- string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1" current_major_version "${raw_current_version}")
- string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\2" current_minor_version "${raw_current_version}")
- string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\3" current_patch_version "${raw_current_version}")
-
- #message("${raw_item} - compat ${raw_compat_version} - current ${raw_current_version}")
- append_unique("${gd_dependents_var}" "${item}")
- else("${candidate}" MATCHES "${dep_regex}")
- if("${candidate}" STREQUAL "${gd_target}:${eol_char}")
- #message("info: ignoring target name...")
- else("${candidate}" STREQUAL "${gd_target}:${eol_char}")
- message("error: candidate='${candidate}'")
- endif("${candidate}" STREQUAL "${gd_target}:${eol_char}")
- endif("${candidate}" MATCHES "${dep_regex}")
- endforeach(candidate)
-endmacro(gather_dependents)
-
-
-message("Gathering dependent libraries for '${input_file_full}'...")
-gather_dependents("${input_file_full}" deps)
-message("")
-
-
-# Order lexicographically:
-#
-list(SORT deps)
-
-
-# Split into separate lists, "system" "embedded" and "nonsystem" libraries.
-# System libs are assumed to be available on all target runtime Macs and do not
-# need to be copied/fixed-up by this script. Embedded libraries are assumed to
-# be in the bundle and fixed-up already. Only non-system, non-embedded libs
-# need copying and fixing up...
-#
-set(system_deps "")
-set(embedded_deps "")
-set(nonsystem_deps "")
-
-foreach(d ${deps})
- set(d_is_embedded_lib 0)
- set(d_is_system_lib 0)
-
- if("${d}" MATCHES "^(/System/Library|/usr/lib)")
- set(d_is_system_lib 1)
- else("${d}" MATCHES "^(/System/Library|/usr/lib)")
- if("${d}" MATCHES "^@executable_path")
- set(d_is_embedded_lib 1)
- endif("${d}" MATCHES "^@executable_path")
- endif("${d}" MATCHES "^(/System/Library|/usr/lib)")
-
- if(d_is_system_lib)
- set(system_deps ${system_deps} "${d}")
- else(d_is_system_lib)
- if(d_is_embedded_lib)
- set(embedded_deps ${embedded_deps} "${d}")
- else(d_is_embedded_lib)
- set(nonsystem_deps ${nonsystem_deps} "${d}")
- endif(d_is_embedded_lib)
- endif(d_is_system_lib)
-endforeach(d)
-
-message("")
-message("system_deps:")
-foreach(d ${system_deps})
- message("${d}")
-endforeach(d ${system_deps})
-
-message("")
-message("embedded_deps:")
-foreach(d ${embedded_deps})
- message("${d}")
-endforeach(d ${embedded_deps})
-
-message("")
-message("nonsystem_deps:")
-foreach(d ${nonsystem_deps})
- message("${d}")
-endforeach(d ${nonsystem_deps})
-
-message("")
-
-
-macro(copy_library_into_bundle clib_bundle clib_libsrc clib_dstlibs clib_fixups)
- #
- # If the source library is a framework, copy just the shared lib bit of the framework
- # into the bundle under "${clib_bundle}/Contents/Frameworks" - if it is just a dylib
- # copy it into the same directory with the main bundle executable under
- # "${clib_bundle}/Contents/MacOS"
- #
- if("${clib_libsrc}" MATCHES ".framework/.*/.*/.*")
- # make sure clib_libsrc is a full path to the framework as a framework
- # maybe linked in with relative paths in some cases
- find_framework_full_path("${clib_libsrc}" fw_full_src)
- get_filename_component(fw_src "${fw_full_src}" ABSOLUTE)
- get_filename_component(fw_srcdir "${clib_libsrc}/../../.." ABSOLUTE)
- get_filename_component(fwdirname "${fw_srcdir}" NAME)
- string(REGEX REPLACE "^(.*)\\.framework$" "\\1" fwname "${fwdirname}")
- string(REGEX REPLACE "^.*/${fwname}\\.framework/(.*)$" "\\1" fwlibname "${clib_libsrc}")
- set(fw_dstdir "${clib_bundle}/Contents/Frameworks")
-
-# message("")
-# message("fwdirname: '${fwdirname}'")
-# message("fwname: '${fwname}'")
-# message("fwlibname: '${fwlibname}'")
-# message("fw_src: '${fw_src}'")
-# message("fw_srcdir: '${fw_srcdir}'")
-# message("fw_dstdir: '${fw_dstdir}'")
-# message("new_name: '@executable_path/../Frameworks/${fwdirname}/${fwlibname}'")
-# message("")
-
- message("Copying ${fw_srcdir} into bundle...")
-
- # This command copies the *entire* framework recursively:
- #
-# execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory
-# "${fw_srcdir}" "${fw_dstdir}"
-# )
-
- # This command copies just the main shared lib of the framework:
- # (This technique will not work for frameworks that have necessary
- # resource or auxiliary files...)
- #
- message("fw_src = [${fw_src}] fw_full_src = [${fw_full_src}]")
- message("Copy: ${CMAKE_COMMAND} -E copy \"${fw_src}\" \"${fw_dstdir}/${fwlibname}\"")
- execute_process(COMMAND ${CMAKE_COMMAND} -E copy
- "${fw_src}" "${fw_dstdir}/${fwlibname}"
- )
-
- get_filename_component(fw_src_path "${fw_src}" PATH)
- message("Checking ${fw_src_path}/Resources")
- if(EXISTS "${fw_src_path}/Resources")
- message("Copy: ${CMAKE_COMMAND} -E copy_directory \"${fw_src_path}/Resources/\" \"${fw_dstdir}/Resources/\"")
- execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory
- "${fw_src_path}/Resources/" "${fw_dstdir}/${fwdirname}/Resources/")
- endif(EXISTS "${fw_src_path}/Resources")
-
- execute_process(COMMAND install_name_tool
- -id "@executable_path/../Frameworks/${fwlibname}"
- "${clib_bundle}/Contents/Frameworks/${fwlibname}"
- )
- set(${clib_dstlibs} ${${clib_dstlibs}}
- "${clib_bundle}/Contents/Frameworks/${fwlibname}"
- )
- set(${clib_fixups} ${${clib_fixups}}
- "-change"
- "${clib_libsrc}"
- "@executable_path/../Frameworks/${fwlibname}"
- )
- else("${clib_libsrc}" MATCHES ".framework/.*/.*/.*")
- if("${clib_libsrc}" MATCHES "/")
- set(clib_libsrcfull "${clib_libsrc}")
- else("${clib_libsrc}" MATCHES "/")
- set(clib_libsrcfull "${lib_path}/${clib_libsrc}")
- if(NOT EXISTS "${clib_libsrcfull}")
- message(FATAL_ERROR "error: '${clib_libsrcfull}' does not exist...")
- endif(NOT EXISTS "${clib_libsrcfull}")
- endif("${clib_libsrc}" MATCHES "/")
-
- get_filename_component(dylib_src "${clib_libsrcfull}" ABSOLUTE)
- get_filename_component(dylib_name "${dylib_src}" NAME)
- set(dylib_dst "${clib_bundle}/Contents/MacOS/${dylib_name}")
-
-# message("dylib_src: ${dylib_src}")
-# message("dylib_dst: ${dylib_dst}")
-# message("new_name: '@executable_path/${dylib_name}'")
-
- message("Copying ${dylib_src} into bundle...")
- execute_process(COMMAND ${CMAKE_COMMAND} -E copy
- "${dylib_src}" "${dylib_dst}")
- execute_process(COMMAND install_name_tool
- -id "@executable_path/${dylib_name}"
- "${dylib_dst}"
- )
- set(${clib_dstlibs} ${${clib_dstlibs}}
- "${dylib_dst}"
- )
- set(${clib_fixups} ${${clib_fixups}}
- "-change"
- "${clib_libsrc}"
- "@executable_path/${dylib_name}"
- )
- endif("${clib_libsrc}" MATCHES ".framework/.*/.*/.*")
-endmacro(copy_library_into_bundle)
-
-
-# Copy dependent "nonsystem" libraries into the bundle:
-#
-message("Copying dependent libraries into bundle...")
-set(srclibs ${nonsystem_deps} ${extra_libs})
-set(dstlibs "")
-set(fixups "")
-foreach(d ${srclibs})
- message("copy it --- ${d}")
- copy_library_into_bundle("${bundle}" "${d}" dstlibs fixups)
-endforeach(d)
-
-message("")
-message("dstlibs='${dstlibs}'")
-message("")
-message("fixups='${fixups}'")
-message("")
-
-
-# Fixup references to copied libraries in the main bundle executable and in the
-# copied libraries themselves:
-#
-if(NOT "${fixups}" STREQUAL "")
- message("Fixing up references...")
- foreach(d ${dstlibs} "${input_file_full}")
- message("fixing up references in: '${d}'")
- execute_process(COMMAND install_name_tool ${fixups} "${d}")
- endforeach(d)
- message("")
-endif(NOT "${fixups}" STREQUAL "")
-
-
-# List all references to eyeball them and make sure they look right:
-#
-message("Listing references...")
-foreach(d ${dstlibs} "${input_file_full}")
- execute_process(COMMAND otool -L "${d}")
- message("")
-endforeach(d)
-message("")
-
-
-# Output file:
-#
-#get_filename_component(script_name "${CMAKE_CURRENT_LIST_FILE}" NAME)
-#file(WRITE "${input_file_full}_${script_name}" "# Script \"${CMAKE_CURRENT_LIST_FILE}\" completed.\n")
-message("")
-message("# Script \"${CMAKE_CURRENT_LIST_FILE}\" completed.")
-message("")
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 405c952..4785188 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -19,13 +19,6 @@ ELSE(NOT QT4_FOUND)
INCLUDE(${QT_USE_FILE})
SET(CMAKE_PACKAGE_QTGUI TRUE)
- # i don't want to install or package the qt gui on windows
- # unless qt is static
- IF(WIN32 AND NOT QT_CONFIG MATCHES "static")
- SET(CMAKE_PACKAGE_QTGUI FALSE)
- MESSAGE(STATUS
- "WARNING: QtDialog requires a static built qt for installation.")
- ENDIF(WIN32 AND NOT QT_CONFIG MATCHES "static")
SET(SRCS
AddCacheEntry.cxx
AddCacheEntry.h
@@ -86,12 +79,8 @@ ELSE(NOT QT4_FOUND)
SET(CMAKE_INSTALL_DESTINATION_ARGS
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
- # if qt is not static and we are on windows then skip the install
- # I don't want to distribute qt dlls
- IF(CMAKE_PACKAGE_QTGUI)
- INSTALL(TARGETS cmake-gui RUNTIME DESTINATION bin
- ${CMAKE_INSTALL_DESTINATION_ARGS})
- ENDIF(CMAKE_PACKAGE_QTGUI)
+
+ INSTALL(TARGETS cmake-gui RUNTIME DESTINATION bin ${CMAKE_INSTALL_DESTINATION_ARGS})
IF(UNIX)
# install a desktop file so CMake appears in the application start menu
@@ -112,10 +101,21 @@ ELSE(NOT QT4_FOUND)
"${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh")
INSTALL(CODE "execute_process(COMMAND ln -s \"../MacOS/${CMAKE_BUNDLE_NAME}\" cmake-gui
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
- INSTALL(CODE "set(input_file
- \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}\")")
- INSTALL(SCRIPT "${CMake_SOURCE_DIR}/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake")
ENDIF(APPLE)
+
+ if(APPLE OR WIN32)
+ # install rules for including 3rd party libs such as Qt
+ # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
+ set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
+ if(APPLE)
+ set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}")
+ endif(APPLE)
+ install(CODE "
+ include(\"${CMake_SOURCE_DIR}/Modules/BundleUtilities.cmake\")
+ fixup_bundle(\"${fixup_exe}\" \"\" \"${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
+ ")
+ endif(APPLE OR WIN32)
+
CONFIGURE_FILE("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
"${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)
ENDIF(NOT QT4_FOUND)
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index 28f4697..7ba7f51 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -165,13 +165,25 @@ int main(int argc, char** argv)
if(args.count() == 2)
{
cmsys_stl::string filePath = cmSystemTools::CollapseFullPath(args[1].toAscii().data());
+
+ // check if argument is a directory containing CMakeCache.txt
cmsys_stl::string buildFilePath =
cmSystemTools::CollapseFullPath("CMakeCache.txt", filePath.c_str());
+
+ // check if argument is a CMakeCache.txt file
+ if(cmSystemTools::GetFilenameName(filePath) == "CMakeCache.txt" &&
+ cmSystemTools::FileExists(filePath.c_str()))
+ {
+ buildFilePath = filePath;
+ }
+
+ // check if argument is a directory containing CMakeLists.txt
cmsys_stl::string srcFilePath =
cmSystemTools::CollapseFullPath("CMakeLists.txt", filePath.c_str());
+
if(cmSystemTools::FileExists(buildFilePath.c_str()))
{
- dialog.setBinaryDirectory(filePath.c_str());
+ dialog.setBinaryDirectory(cmSystemTools::GetFilenamePath(buildFilePath).c_str());
}
else if(cmSystemTools::FileExists(srcFilePath.c_str()))
{
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 74a3d35..29fcfc0 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -34,7 +34,7 @@
#include "FirstConfigure.h"
#include "cmVersion.h"
-QCMakeThread::QCMakeThread(QObject* p)
+QCMakeThread::QCMakeThread(QObject* p)
: QThread(p), CMakeInstance(NULL)
{
}
@@ -76,7 +76,7 @@ CMakeSetupDialog::CMakeSetupDialog()
this->ProgressBar->reset();
this->RemoveEntry->setEnabled(false);
this->AddEntry->setEnabled(false);
-
+
QByteArray p = settings.value("SplitterSizes").toByteArray();
this->Splitter->restoreState(p);
@@ -84,50 +84,54 @@ CMakeSetupDialog::CMakeSetupDialog()
this->setGroupedView(groupView);
this->groupedCheck->setCheckState(groupView ? Qt::Checked : Qt::Unchecked);
+ bool advancedView = settings.value("AdvancedView", false).toBool();
+ this->setAdvancedView(advancedView);
+ this->advancedCheck->setCheckState(advancedView?Qt::Checked : Qt::Unchecked);
+
QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache"));
- QObject::connect(this->ReloadCacheAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->ReloadCacheAction, SIGNAL(triggered(bool)),
this, SLOT(doReloadCache()));
this->DeleteCacheAction = FileMenu->addAction(tr("&Delete Cache"));
- QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)),
this, SLOT(doDeleteCache()));
this->ExitAction = FileMenu->addAction(tr("E&xit"));
- QObject::connect(this->ExitAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->ExitAction, SIGNAL(triggered(bool)),
this, SLOT(close()));
QMenu* ToolsMenu = this->menuBar()->addMenu(tr("&Tools"));
this->ConfigureAction = ToolsMenu->addAction(tr("&Configure"));
// prevent merging with Preferences menu item on Mac OS X
this->ConfigureAction->setMenuRole(QAction::NoRole);
- QObject::connect(this->ConfigureAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->ConfigureAction, SIGNAL(triggered(bool)),
this, SLOT(doConfigure()));
this->GenerateAction = ToolsMenu->addAction(tr("&Generate"));
- QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)),
this, SLOT(doGenerate()));
QAction* showChangesAction = ToolsMenu->addAction(tr("&Show My Changes"));
- QObject::connect(showChangesAction, SIGNAL(triggered(bool)),
+ QObject::connect(showChangesAction, SIGNAL(triggered(bool)),
this, SLOT(showUserChanges()));
#if defined(Q_WS_MAC)
- this->InstallForCommandLineAction
+ this->InstallForCommandLineAction
= ToolsMenu->addAction(tr("&Install For Command Line Use"));
- QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)),
this, SLOT(doInstallForCommandLine()));
-#endif
+#endif
QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options"));
this->SuppressDevWarningsAction = OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)"));
this->SuppressDevWarningsAction->setCheckable(true);
QAction* debugAction = OptionsMenu->addAction(tr("&Debug Output"));
debugAction->setCheckable(true);
- QObject::connect(debugAction, SIGNAL(toggled(bool)),
+ QObject::connect(debugAction, SIGNAL(toggled(bool)),
this, SLOT(setDebugOutput(bool)));
-
+
OptionsMenu->addSeparator();
QAction* expandAction = OptionsMenu->addAction(tr("&Expand Grouped Entries"));
- QObject::connect(expandAction, SIGNAL(triggered(bool)),
+ QObject::connect(expandAction, SIGNAL(triggered(bool)),
this->CacheValues, SLOT(expandAll()));
QAction* collapseAction = OptionsMenu->addAction(tr("&Collapse Grouped Entries"));
- QObject::connect(collapseAction, SIGNAL(triggered(bool)),
+ QObject::connect(collapseAction, SIGNAL(triggered(bool)),
this->CacheValues, SLOT(collapseAll()));
QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
@@ -137,17 +141,17 @@ CMakeSetupDialog::CMakeSetupDialog()
a = HelpMenu->addAction(tr("Help"));
QObject::connect(a, SIGNAL(triggered(bool)),
this, SLOT(doHelp()));
-
+
QShortcut* filterShortcut = new QShortcut(QKeySequence::Find, this);
- QObject::connect(filterShortcut, SIGNAL(activated()),
+ QObject::connect(filterShortcut, SIGNAL(activated()),
this, SLOT(startSearch()));
-
+
this->setAcceptDrops(true);
-
+
// get the saved binary directories
QStringList buildPaths = this->loadBuildPaths();
this->BinaryDirectory->addItems(buildPaths);
-
+
this->BinaryDirectory->setCompleter(new QCMakeFileCompleter(this, true));
this->SourceDirectory->setCompleter(new QCMakeFileCompleter(this, true));
@@ -159,23 +163,23 @@ CMakeSetupDialog::CMakeSetupDialog()
// start the cmake worker thread
this->CMakeThread = new QCMakeThread(this);
QObject::connect(this->CMakeThread, SIGNAL(cmakeInitialized()),
- this, SLOT(initialize()), Qt::QueuedConnection);
+ this, SLOT(initialize()), Qt::QueuedConnection);
this->CMakeThread->start();
-
+
this->enterState(ReadyConfigure);
}
void CMakeSetupDialog::initialize()
{
// now the cmake worker thread is running, lets make our connections to it
- QObject::connect(this->CMakeThread->cmakeInstance(),
+ QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(propertiesChanged(const QCMakePropertyList&)),
this->CacheValues->cacheModel(),
SLOT(setProperties(const QCMakePropertyList&)));
QObject::connect(this->ConfigureButton, SIGNAL(clicked(bool)),
this, SLOT(doConfigure()));
- QObject::connect(this->CMakeThread->cmakeInstance(),
+ QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(configureDone(int)),
this, SLOT(finishConfigure(int)));
QObject::connect(this->CMakeThread->cmakeInstance(),
@@ -184,12 +188,12 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->GenerateButton, SIGNAL(clicked(bool)),
this, SLOT(doGenerate()));
-
+
QObject::connect(this->BrowseSourceDirectoryButton, SIGNAL(clicked(bool)),
this, SLOT(doSourceBrowse()));
QObject::connect(this->BrowseBinaryDirectoryButton, SIGNAL(clicked(bool)),
this, SLOT(doBinaryBrowse()));
-
+
QObject::connect(this->BinaryDirectory, SIGNAL(editTextChanged(QString)),
this, SLOT(onBinaryDirectoryChanged(QString)));
QObject::connect(this->SourceDirectory, SIGNAL(textChanged(QString)),
@@ -201,11 +205,11 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(binaryDirChanged(QString)),
this, SLOT(updateBinaryDirectory(QString)));
-
+
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(progressChanged(QString, float)),
this, SLOT(showProgress(QString,float)));
-
+
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(errorMessage(QString)),
this, SLOT(error(QString)));
@@ -218,29 +222,29 @@ void CMakeSetupDialog::initialize()
this, SLOT(setGroupedView(bool)));
QObject::connect(this->advancedCheck, SIGNAL(toggled(bool)),
this, SLOT(setAdvancedView(bool)));
- QObject::connect(this->Search, SIGNAL(textChanged(QString)),
+ QObject::connect(this->Search, SIGNAL(textChanged(QString)),
this, SLOT(setSearchFilter(QString)));
-
+
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(generatorChanged(QString)),
this, SLOT(updateGeneratorLabel(QString)));
this->updateGeneratorLabel(QString());
-
+
QObject::connect(this->CacheValues->cacheModel(),
- SIGNAL(dataChanged(QModelIndex,QModelIndex)),
+ SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(setCacheModified()));
-
+
QObject::connect(this->CacheValues->selectionModel(),
- SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+ SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(selectionChanged()));
- QObject::connect(this->RemoveEntry, SIGNAL(clicked(bool)),
+ QObject::connect(this->RemoveEntry, SIGNAL(clicked(bool)),
this, SLOT(removeSelectedCacheEntries()));
- QObject::connect(this->AddEntry, SIGNAL(clicked(bool)),
+ QObject::connect(this->AddEntry, SIGNAL(clicked(bool)),
this, SLOT(addCacheEntry()));
- QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)),
this->CMakeThread->cmakeInstance(), SLOT(setSuppressDevWarnings(bool)));
-
+
if(!this->SourceDirectory->text().isEmpty() ||
!this->BinaryDirectory->lineEdit()->text().isEmpty())
{
@@ -265,7 +269,7 @@ CMakeSetupDialog::~CMakeSetupDialog()
this->CMakeThread->quit();
this->CMakeThread->wait(2000);
}
-
+
void CMakeSetupDialog::doConfigure()
{
if(this->CurrentState == Configuring)
@@ -287,7 +291,7 @@ void CMakeSetupDialog::doConfigure()
msg += bindir;
QString title = tr("Create Directory");
QMessageBox::StandardButton btn;
- btn = QMessageBox::information(this, title, msg,
+ btn = QMessageBox::information(this, title, msg,
QMessageBox::Yes | QMessageBox::No);
if(btn == QMessageBox::No)
{
@@ -295,8 +299,8 @@ void CMakeSetupDialog::doConfigure()
}
if(!dir.mkpath("."))
{
- QMessageBox::information(this, tr("Create Directory Failed"),
- QString(tr("Failed to create directory %1")).arg(dir.path()),
+ QMessageBox::information(this, tr("Create Directory Failed"),
+ QString(tr("Failed to create directory %1")).arg(dir.path()),
QMessageBox::Ok);
return;
@@ -314,12 +318,12 @@ void CMakeSetupDialog::doConfigure()
// remember path
this->addBinaryPath(dir.absolutePath());
-
+
this->enterState(Configuring);
this->CacheValues->selectionModel()->clear();
QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
- "setProperties", Qt::QueuedConnection,
+ "setProperties", Qt::QueuedConnection,
Q_ARG(QCMakePropertyList,
this->CacheValues->cacheModel()->properties()));
QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
@@ -337,11 +341,11 @@ void CMakeSetupDialog::finishConfigure(int err)
this->enterState(ReadyConfigure);
this->CacheValues->scrollToTop();
}
-
+
if(err != 0)
{
- QMessageBox::critical(this, tr("Error"),
- tr("Error in configuration process, project files may be invalid"),
+ QMessageBox::critical(this, tr("Error"),
+ tr("Error in configuration process, project files may be invalid"),
QMessageBox::Ok);
}
}
@@ -351,7 +355,7 @@ void CMakeSetupDialog::finishGenerate(int err)
this->enterState(ReadyConfigure);
if(err != 0)
{
- QMessageBox::critical(this, tr("Error"),
+ QMessageBox::critical(this, tr("Error"),
tr("Error in generation process, project files may be invalid"),
QMessageBox::Ok);
}
@@ -375,7 +379,7 @@ void CMakeSetupDialog::doGenerate()
QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
"generate", Qt::QueuedConnection);
}
-
+
void CMakeSetupDialog::closeEvent(QCloseEvent* e)
{
// prompt for close if there are unsaved changes, and we're not busy
@@ -466,7 +470,7 @@ void CMakeSetupDialog::doInterrupt()
void CMakeSetupDialog::doSourceBrowse()
{
- QString dir = QFileDialog::getExistingDirectory(this,
+ QString dir = QFileDialog::getExistingDirectory(this,
tr("Enter Path to Source"), this->SourceDirectory->text());
if(!dir.isEmpty())
{
@@ -496,7 +500,7 @@ void CMakeSetupDialog::updateBinaryDirectory(const QString& dir)
void CMakeSetupDialog::doBinaryBrowse()
{
- QString dir = QFileDialog::getExistingDirectory(this,
+ QString dir = QFileDialog::getExistingDirectory(this,
tr("Enter Path to Build"), this->BinaryDirectory->currentText());
if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText())
{
@@ -585,7 +589,7 @@ bool CMakeSetupDialog::setupFirstConfigure()
{
dialog.saveToSettings();
this->CMakeThread->cmakeInstance()->setGenerator(dialog.getGenerator());
-
+
QCMakeCacheModel* m = this->CacheValues->cacheModel();
if(dialog.compilerSetup())
@@ -593,20 +597,20 @@ bool CMakeSetupDialog::setupFirstConfigure()
QString fortranCompiler = dialog.getFortranCompiler();
if(!fortranCompiler.isEmpty())
{
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
"Fortran compiler.", fortranCompiler, false);
}
QString cxxCompiler = dialog.getCXXCompiler();
if(!cxxCompiler.isEmpty())
{
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
"CXX compiler.", cxxCompiler, false);
}
-
+
QString cCompiler = dialog.getCCompiler();
if(!cCompiler.isEmpty())
{
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
"C compiler.", cCompiler, false);
}
}
@@ -615,38 +619,38 @@ bool CMakeSetupDialog::setupFirstConfigure()
QString fortranCompiler = dialog.getFortranCompiler();
if(!fortranCompiler.isEmpty())
{
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
"Fortran compiler.", fortranCompiler, false);
}
QString mode = dialog.getCrossIncludeMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE",
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE",
"CMake Find Include Mode", mode, false);
mode = dialog.getCrossLibraryMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY",
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY",
"CMake Find Library Mode", mode, false);
mode = dialog.getCrossProgramMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM",
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM",
"CMake Find Program Mode", mode, false);
-
+
QString rootPath = dialog.getCrossRoot();
- m->insertProperty(QCMakeProperty::PATH, "CMAKE_FIND_ROOT_PATH",
+ m->insertProperty(QCMakeProperty::PATH, "CMAKE_FIND_ROOT_PATH",
"CMake Find Root Path", rootPath, false);
QString systemName = dialog.getSystemName();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_NAME",
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_NAME",
"CMake System Name", systemName, false);
QString cxxCompiler = dialog.getCXXCompiler();
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
"CXX compiler.", cxxCompiler, false);
QString cCompiler = dialog.getCCompiler();
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
"C compiler.", cCompiler, false);
}
else if(dialog.crossCompilerToolChainFile())
{
QString toolchainFile = dialog.getCrossCompilerToolChainFile();
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_TOOLCHAIN_FILE",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_TOOLCHAIN_FILE",
"Cross Compile ToolChain File", toolchainFile, false);
}
return true;
@@ -676,11 +680,11 @@ void CMakeSetupDialog::doReloadCache()
}
void CMakeSetupDialog::doDeleteCache()
-{
+{
QString title = tr("Delete Cache");
QString msg = "Are you sure you want to delete the cache?";
QMessageBox::StandardButton btn;
- btn = QMessageBox::information(this, title, msg,
+ btn = QMessageBox::information(this, title, msg,
QMessageBox::Yes | QMessageBox::No);
if(btn == QMessageBox::No)
{
@@ -721,7 +725,7 @@ void CMakeSetupDialog::setExitAfterGenerate(bool b)
void CMakeSetupDialog::addBinaryPath(const QString& path)
{
QString cleanpath = QDir::cleanPath(path);
-
+
// update UI
this->BinaryDirectory->blockSignals(true);
int idx = this->BinaryDirectory->findText(cleanpath);
@@ -732,7 +736,7 @@ void CMakeSetupDialog::addBinaryPath(const QString& path)
this->BinaryDirectory->insertItem(0, cleanpath);
this->BinaryDirectory->setCurrentIndex(0);
this->BinaryDirectory->blockSignals(false);
-
+
// save to registry
QStringList buildPaths = this->loadBuildPaths();
buildPaths.removeAll(cleanpath);
@@ -742,7 +746,7 @@ void CMakeSetupDialog::addBinaryPath(const QString& path)
void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e)
{
- if(!(this->CurrentState == ReadyConfigure ||
+ if(!(this->CurrentState == ReadyConfigure ||
this->CurrentState == ReadyGenerate))
{
e->ignore();
@@ -752,7 +756,7 @@ void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e)
const QMimeData* dat = e->mimeData();
QList<QUrl> urls = dat->urls();
QString file = urls.count() ? urls[0].toLocalFile() : QString();
- if(!file.isEmpty() &&
+ if(!file.isEmpty() &&
(file.endsWith("CMakeCache.txt", Qt::CaseInsensitive) ||
file.endsWith("CMakeLists.txt", Qt::CaseInsensitive) ) )
{
@@ -766,7 +770,7 @@ void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e)
void CMakeSetupDialog::dropEvent(QDropEvent* e)
{
- if(!(this->CurrentState == ReadyConfigure ||
+ if(!(this->CurrentState == ReadyConfigure ||
this->CurrentState == ReadyGenerate))
{
return;
@@ -801,7 +805,7 @@ QStringList CMakeSetupDialog::loadBuildPaths()
QStringList buildPaths;
for(int i=0; i<10; i++)
- {
+ {
QString p = settings.value(QString("WhereBuild%1").arg(i)).toString();
if(!p.isEmpty())
{
@@ -823,11 +827,11 @@ void CMakeSetupDialog::saveBuildPaths(const QStringList& paths)
}
for(int i=0; i<num; i++)
- {
+ {
settings.setValue(QString("WhereBuild%1").arg(i), paths[i]);
}
}
-
+
void CMakeSetupDialog::setCacheModified()
{
this->CacheModified = true;
@@ -851,8 +855,8 @@ void CMakeSetupDialog::removeSelectedCacheEntries()
void CMakeSetupDialog::selectionChanged()
{
QModelIndexList idxs = this->CacheValues->selectionModel()->selectedRows();
- if(idxs.count() &&
- (this->CurrentState == ReadyConfigure ||
+ if(idxs.count() &&
+ (this->CurrentState == ReadyConfigure ||
this->CurrentState == ReadyGenerate) )
{
this->RemoveEntry->setEnabled(true);
@@ -862,7 +866,7 @@ void CMakeSetupDialog::selectionChanged()
this->RemoveEntry->setEnabled(false);
}
}
-
+
void CMakeSetupDialog::enterState(CMakeSetupDialog::State s)
{
if(s == this->CurrentState)
@@ -953,16 +957,19 @@ void CMakeSetupDialog::setGroupedView(bool v)
{
this->CacheValues->cacheModel()->setViewType(v ? QCMakeCacheModel::GroupView : QCMakeCacheModel::FlatView);
this->CacheValues->setRootIsDecorated(v);
-
+
QSettings settings;
settings.beginGroup("Settings/StartPath");
settings.setValue("GroupView", v);
-
+
}
void CMakeSetupDialog::setAdvancedView(bool v)
{
this->CacheValues->setShowAdvanced(v);
+ QSettings settings;
+ settings.beginGroup("Settings/StartPath");
+ settings.setValue("AdvancedView", v);
}
void CMakeSetupDialog::showUserChanges()
@@ -984,7 +991,7 @@ void CMakeSetupDialog::showUserChanges()
QString command;
QString cache;
-
+
foreach(QCMakeProperty prop, changes)
{
QString type;
@@ -1020,13 +1027,13 @@ void CMakeSetupDialog::showUserChanges()
command += QString("-D%1\"%2\" ").arg(line).arg(value);
cache += QString("%1%2\n").arg(line).arg(value);
}
-
+
textedit->append(tr("Commandline options:"));
textedit->append(command);
textedit->append("\n");
textedit->append(tr("Cache file:"));
textedit->append(cache);
-
+
dialog.exec();
}
diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h
index c67caa5..6c5e1af 100644
--- a/Source/cmAddCustomCommandCommand.h
+++ b/Source/cmAddCustomCommandCommand.h
@@ -152,6 +152,9 @@ public:
"If any dependency is an OUTPUT of another custom command in the "
"same directory (CMakeLists.txt file) CMake automatically brings the "
"other custom command into the target in which this command is built. "
+ "If DEPENDS is not specified the command will run whenever the OUTPUT "
+ "is missing; if the command does not actually create the OUTPUT then "
+ "the rule will always run. "
"If DEPENDS specifies any target (created by an ADD_* command) "
"a target-level dependency is created to make sure the target is "
"built before any target using this custom command. Additionally, "
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index dcdc8e1..2e05883 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -490,10 +490,6 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
return 0;
}
- // call this so that the information is cached up front
- // and not the first time EndTest is called.
- this->ShouldCompressTestOutput();
-
if ( this->ProduceXML )
{
// Verify "Testing" directory exists:
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 9617355..a877680 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -2,7 +2,7 @@
#include "cmake.h"
void cmDocumentVariables::DefineVariables(cmake* cm)
-{
+{
// Subsection: variables defined by cmake, that give
// information about the project, and cmake
cm->DefineProperty
@@ -18,21 +18,21 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is the full path to the CMake executable cmake which is "
"useful from custom commands that want to use the cmake -E "
"option for portable system commands. "
- "(e.g. /usr/local/bin/cmake", false,
+ "(e.g. /usr/local/bin/cmake", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_BINARY_DIR", cmProperty::VARIABLE,
"The path to the top level of the build tree.",
"This is the full path to the top level of the current CMake "
"build tree. For an in-source build, this would be the same "
- "as CMAKE_SOURCE_DIR. ", false,
+ "as CMAKE_SOURCE_DIR. ", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_SOURCE_DIR", cmProperty::VARIABLE,
"The path to the top level of the source tree.",
"This is the full path to the top level of the current CMake "
"source tree. For an in-source build, this would be the same "
- "as CMAKE_BINARY_DIR. ", false,
+ "as CMAKE_BINARY_DIR. ", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CURRENT_BINARY_DIR", cmProperty::VARIABLE,
@@ -42,13 +42,13 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"add_subdirectory will create a binary directory in the build "
"tree, and as it is being processed this variable will be set. "
"For in-source builds this is the current source directory "
- "being processed.", false,
+ "being processed.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CURRENT_SOURCE_DIR", cmProperty::VARIABLE,
"The path to the source directory currently being processed.",
"This the full path to the source directory that is currently "
- "being processed by cmake. ", false,
+ "being processed by cmake. ", false,
"Variables that Provide Information");
cm->DefineProperty
@@ -74,8 +74,28 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_CURRENT_LIST_LINE", cmProperty::VARIABLE,
"The line number of the current file being processed.",
"This is the line number of the file currently being"
- " processed by cmake.", false,
+ " processed by cmake.", false,
"Variables that Provide Information");
+
+ cm->DefineProperty
+ ("CMAKE_CURRENT_LIST_DIR", cmProperty::VARIABLE,
+ "Full directory of the listfile currently being processed.",
+ "As CMake processes the listfiles in your project this "
+ "variable will always be set to the directory where the listfile which "
+ "is currently being processed (CMAKE_CURRENT_LIST_FILE) is located. "
+ "The value has dynamic scope. "
+ "When CMake starts processing commands in a source file "
+ "it sets this variable to the directory where this file is located. "
+ "When CMake finishes processing commands from the file it "
+ "restores the previous value. "
+ "Therefore the value of the variable inside a macro or "
+ "function is the directory of the file invoking the bottom-most entry on "
+ "the call stack, not the directory of the file containing the macro or "
+ "function definition."
+ "\n"
+ "See also CMAKE_CURRENT_LIST_FILE.",false,
+ "Variables that Provide Information");
+
cm->DefineProperty
("CMAKE_BUILD_TOOL", cmProperty::VARIABLE,
"Tool used for the actual build process.",
@@ -87,7 +107,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"and for Visual Studio 7 it set to devenv. For "
"Nmake Makefiles the value is nmake. This can be "
"useful for adding special flags and commands based"
- " on the final build environment. ", false,
+ " on the final build environment. ", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CROSSCOMPILING", cmProperty::VARIABLE,
@@ -101,7 +121,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"The directory with the CMakeCache.txt file.",
"This is the full path to the directory that has the "
"CMakeCache.txt file in it. This is the same as "
- "CMAKE_BINARY_DIR.", false,
+ "CMAKE_BINARY_DIR.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CACHE_MAJOR_VERSION", cmProperty::VARIABLE,
@@ -109,7 +129,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is stores the major version of CMake used to "
"write a CMake cache file. It is only different when "
"a different version of CMake is run on a previously "
- "created cache file.", false,
+ "created cache file.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CACHE_MINOR_VERSION", cmProperty::VARIABLE,
@@ -117,18 +137,18 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is stores the minor version of CMake used to "
"write a CMake cache file. It is only different when "
"a different version of CMake is run on a previously "
- "created cache file.", false,
+ "created cache file.", false,
"Variables that Provide Information");
-
+
cm->DefineProperty
("CMAKE_CACHE_PATCH_VERSION", cmProperty::VARIABLE,
"Patch version of CMake used to create the CMakeCache.txt file",
"This is stores the patch version of CMake used to "
"write a CMake cache file. It is only different when "
"a different version of CMake is run on a previously "
- "created cache file.", false,
+ "created cache file.", false,
"Variables that Provide Information");
-
+
cm->DefineProperty
("CMAKE_CFG_INTDIR", cmProperty::VARIABLE,
"Build-time reference to per-configuration output subdirectory.",
@@ -168,7 +188,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"is passed as the value of preprocessor symbol \"CMAKE_INTDIR\" to "
"the compilation of all source files.",false,
"Variables that Provide Information");
-
+
cm->DefineProperty
("CMAKE_CTEST_COMMAND", cmProperty::VARIABLE,
"Full path to ctest command installed with cmake.",
@@ -442,7 +462,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Variables that Provide Information");
- // Variables defined by cmake, that change the behavior
+ // Variables defined by cmake, that change the behavior
// of cmake
cm->DefineProperty
("CMAKE_FIND_LIBRARY_PREFIXES", cmProperty::VARIABLE,
@@ -665,7 +685,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"to override any variables that need to be changed "
"for some special project. ",false,
"Variables That Change Behavior");
-
+
cm->DefineProperty
("BUILD_SHARED_LIBS", cmProperty::VARIABLE,
"Global flag to cause add_library to create shared libraries if on.",
@@ -676,14 +696,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"they want to build the project using shared or static "
"libraries.",false,
"Variables That Change Behavior");
-
+
cm->DefineProperty
("CMAKE_NOT_USING_CONFIG_FLAGS", cmProperty::VARIABLE,
"Skip _BUILD_TYPE flags if true.",
"This is an internal flag used by the generators in "
"CMake to tell CMake to skip the _BUILD_TYPE flags.",false,
"Variables That Change Behavior");
-
+
cm->DefineProperty
("CMAKE_MFC_FLAG", cmProperty::VARIABLE,
"Tell cmake to use MFC for an executable or dll.",
@@ -774,19 +794,19 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"True if running on Mac OSX.",
"Set to true on Mac OSX.",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("BORLAND", cmProperty::VARIABLE,
"True of the borland compiler is being used.",
"This is set to true if the Borland compiler is being used.",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("CYGWIN", cmProperty::VARIABLE,
"True for cygwin.",
"Set to true when using CYGWIN.",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("MSVC", cmProperty::VARIABLE,
"True when using Microsoft Visual C",
@@ -838,7 +858,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Set to true when the target system is UNIX or UNIX like "
"(i.e. APPLE and CYGWIN).",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("WIN32", cmProperty::VARIABLE,
"True on windows systems, including win64.",
@@ -865,7 +885,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Set to true when the host system is UNIX or UNIX like "
"(i.e. APPLE and CYGWIN).",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("CMAKE_HOST_WIN32", cmProperty::VARIABLE,
"True on windows systems, including win64.",
@@ -890,7 +910,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"The value must be an integer no less than 128.",false,
"Variables That Describe the System");
- // Variables that affect the building of object files and
+ // Variables that affect the building of object files and
// targets.
//
cm->DefineProperty
@@ -1106,7 +1126,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is the command that will be used as the <LANG> compiler. "
"Once set, you can not change this variable.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_COMPILER_ID", cmProperty::VARIABLE,
"An internal variable subject to change.",
@@ -1150,54 +1170,54 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"If the selected <LANG> compiler is the GNU "
"compiler then this is TRUE, if not it is FALSE.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_DEBUG", cmProperty::VARIABLE,
"Flags for Debug build type or configuration.",
"<LANG> flags used when CMAKE_BUILD_TYPE is Debug.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_MINSIZEREL", cmProperty::VARIABLE,
"Flags for MinSizeRel build type or configuration.",
"<LANG> flags used when CMAKE_BUILD_TYPE is MinSizeRel."
"Short for minimum size release.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_RELEASE", cmProperty::VARIABLE,
"Flags for Release build type or configuration.",
"<LANG> flags used when CMAKE_BUILD_TYPE is Release",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_RELWITHDEBINFO", cmProperty::VARIABLE,
"Flags for RelWithDebInfo type or configuration.",
"<LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. "
"Short for Release With Debug Information.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_COMPILE_OBJECT", cmProperty::VARIABLE,
"Rule variable to compile a single object file.",
"This is a rule variable that tells CMake how to "
"compile a single object file for for the language <LANG>.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_CREATE_SHARED_LIBRARY", cmProperty::VARIABLE,
"Rule variable to create a shared library.",
"This is a rule variable that tells CMake how to "
"create a shared library for the language <LANG>.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_CREATE_SHARED_MODULE", cmProperty::VARIABLE,
"Rule variable to create a shared module.",
"This is a rule variable that tells CMake how to "
"create a shared library for the language <LANG>.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_CREATE_STATIC_LIBRARY", cmProperty::VARIABLE,
"Rule variable to create a static library.",
@@ -1289,20 +1309,20 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"See also the CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES variable.",
false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_LINK_EXECUTABLE ", cmProperty::VARIABLE,
"Rule variable to link and executable.",
"Rule variable to link and executable for the given language.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_OUTPUT_EXTENSION", cmProperty::VARIABLE,
"Extension for the output of a compile for a single file.",
"This is the extension for an object file for "
"the given <LANG>. For example .obj for C on Windows.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS", cmProperty::VARIABLE,
"Extensions of source files for the given language.",
@@ -1317,16 +1337,16 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
false,"Variables for Languages");
// variables that are used by cmake but not to be documented
- cm->DefineProperty("CMAKE_MATCH_0", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_1", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_2", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_3", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_4", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_5", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_6", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_7", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_8", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_9", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_0", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_1", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_2", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_3", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_4", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_5", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_6", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_7", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_8", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_9", cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_<LANG>_COMPILER_ARG1",
cmProperty::VARIABLE,0,0);
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index c198727..1158fc0 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -687,7 +687,8 @@ cmELFInternalImpl<Types>::GetDynamicSectionString(int tag)
// The value has been read successfully. Report it.
se.Position = static_cast<unsigned long>(strtab.sh_offset + first);
se.Size = last - first;
- se.IndexInSection = static_cast<int>(di - this->DynamicSectionEntries.begin());
+ se.IndexInSection =
+ static_cast<int>(di - this->DynamicSectionEntries.begin());
return &se;
}
}
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 48c5c6e..cb614d4 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -152,11 +152,10 @@ bool cmExportCommand
ebfg.SetCommand(this);
// Compute the set of configurations exported.
- if(const char* types =
- this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
+ std::vector<std::string> configurationTypes;
+ this->Makefile->GetConfigurations(configurationTypes);
+ if(!configurationTypes.empty())
{
- std::vector<std::string> configurationTypes;
- cmSystemTools::ExpandListArgument(types, configurationTypes);
for(std::vector<std::string>::const_iterator
ci = configurationTypes.begin();
ci != configurationTypes.end(); ++ci)
@@ -164,11 +163,6 @@ bool cmExportCommand
ebfg.AddConfiguration(ci->c_str());
}
}
- else if(const char* config =
- this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"))
- {
- ebfg.AddConfiguration(config);
- }
else
{
ebfg.AddConfiguration("");
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 4cb2b48..e6d7a6d 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -289,14 +289,10 @@ void cmExtraCodeBlocksGenerator
std::string fileName = *(splitted.end()-1);
splitted.erase(splitted.end() - 1, splitted.end());
- // We don't want paths with ".." in them
- // reasons are that we don't want files outside the project
- // TODO: the path should be normalized first though
// We don't want paths with CMakeFiles in them
// or do we?
// In speedcrunch those where purely internal
if (splitted.size() >= 1
- && relative.find("..") == std::string::npos
&& relative.find("CMakeFiles") == std::string::npos)
{
tree.InsertPath(splitted, 1, fileName);
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 133c1a1..8ebd41f 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2571,8 +2571,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
std::vector<std::string>::const_iterator i = args.begin();
if(args.size() < 3)
{
- this->SetError("FILE(DOWNLOAD url file) must be called with "
- "at least three arguments.");
+ this->SetError("DOWNLOAD must be called with at least three arguments.");
return false;
}
++i; // Get rid of subcommand
@@ -2598,8 +2597,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
}
else
{
- this->SetError("FILE(DOWNLOAD url file TIMEOUT time) missing "
- "time for TIMEOUT.");
+ this->SetError("DOWNLOAD missing time for TIMEOUT.");
return false;
}
}
@@ -2608,8 +2606,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
++i;
if( i == args.end())
{
- this->SetError("FILE(DOWNLOAD url file LOG VAR) missing "
- "VAR for LOG.");
+ this->SetError("DOWNLOAD missing VAR for LOG.");
return false;
}
verboseLog = *i;
@@ -2619,8 +2616,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
++i;
if( i == args.end())
{
- this->SetError("FILE(DOWNLOAD url file STATUS VAR) missing "
- "VAR for STATUS.");
+ this->SetError("DOWNLOAD missing VAR for STATUS.");
return false;
}
statusVar = *i;
@@ -2630,8 +2626,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
++i;
if( i == args.end())
{
- this->SetError("FILE(DOWNLOAD url file EXPECTED_MD5 sum) missing "
- "sum value for EXPECTED_MD5.");
+ this->SetError("DOWNLOAD missing sum value for EXPECTED_MD5.");
return false;
}
expectedMD5sum = cmSystemTools::LowerCase(*i);
@@ -2654,8 +2649,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (!cmSystemTools::ComputeFileMD5(file.c_str(), computedMD5))
{
- this->SetError("FILE(DOWNLOAD ) error; cannot compute MD5 sum on "
- "pre-existing file");
+ this->SetError("DOWNLOAD cannot compute MD5 sum on pre-existing file");
return false;
}
@@ -2665,7 +2659,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (expectedMD5sum == actualMD5sum)
{
this->Makefile->DisplayStatus(
- "FILE(DOWNLOAD ) returning early: file already exists with "
+ "FILE(DOWNLOAD) returning early: file already exists with "
"expected MD5 sum", -1);
if(statusVar.size())
@@ -2698,8 +2692,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
std::ofstream fout(file.c_str(), std::ios::binary);
if(!fout)
{
- this->SetError("FILE(DOWNLOAD url file TIMEOUT time) can not open "
- "file for write.");
+ this->SetError("DOWNLOAD cannot open file for write.");
return false;
}
@@ -2708,8 +2701,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
curl = ::curl_easy_init();
if(!curl)
{
- this->SetError("FILE(DOWNLOAD ) error "
- "initializing curl.");
+ this->SetError("DOWNLOAD error initializing curl.");
return false;
}
@@ -2718,9 +2710,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set url: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set url: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
@@ -2728,10 +2720,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
cmFileCommandWriteMemoryCallback);
if (res != CURLE_OK)
{
- std::string errstring =
- "FILE(DOWNLOAD ) error; cannot set write function: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set write function: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
@@ -2739,10 +2730,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
cmFileCommandCurlDebugCallback);
if (res != CURLE_OK)
{
- std::string errstring =
- "FILE(DOWNLOAD ) error; cannot set debug function: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set debug function: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
@@ -2752,27 +2742,27 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set write data: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set write data: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
res = ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug);
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set debug data: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set debug data: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set follow-redirect option: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set follow-redirect option: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
@@ -2782,9 +2772,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set verbose: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set verbose: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
}
@@ -2795,9 +2785,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set timeout: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set timeout: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
}
@@ -2815,9 +2805,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
CURLOPT_NOPROGRESS, 0);
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set noprogress value: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set noprogress value: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
@@ -2825,9 +2815,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
CURLOPT_PROGRESSFUNCTION, cmFileCommandCurlProgressCallback);
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set progress function: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set progress function: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
@@ -2835,9 +2825,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
CURLOPT_PROGRESSDATA, reinterpret_cast<void*>(&helper));
if (res != CURLE_OK)
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot set progress data: ";
- errstring += ::curl_easy_strerror(res);
- this->SetError(errstring.c_str());
+ std::string e = "DOWNLOAD cannot set progress data: ";
+ e += ::curl_easy_strerror(res);
+ this->SetError(e.c_str());
return false;
}
}
@@ -2871,8 +2861,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (!cmSystemTools::ComputeFileMD5(file.c_str(), computedMD5))
{
- this->SetError("FILE(DOWNLOAD ) error; cannot compute MD5 sum on "
- "downloaded file");
+ this->SetError("DOWNLOAD cannot compute MD5 sum on downloaded file");
return false;
}
@@ -2882,8 +2871,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (expectedMD5sum != actualMD5sum)
{
cmOStringStream oss;
- oss << "FILE(DOWNLOAD ) error; expected and actual MD5 sums differ"
- << std::endl
+ oss << "DOWNLOAD MD5 mismatch" << std::endl
<< " for file: [" << file << "]" << std::endl
<< " expected MD5 sum: [" << expectedMD5sum << "]" << std::endl
<< " actual MD5 sum: [" << actualMD5sum << "]" << std::endl
@@ -2913,8 +2901,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
return true;
#else
- this->SetError("FILE(DOWNLOAD ) "
- "not supported in bootstrap cmake ");
+ this->SetError("DOWNLOAD not supported by bootstrap cmake.");
return false;
#endif
}
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 820d225..15abd02 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1870,9 +1870,10 @@ bool cmGlobalGenerator::UseFolderProperty()
return cmSystemTools::IsOn(prop);
}
- // By default, this feature is ON:
+ // By default, this feature is OFF, since it is not supported in the
+ // Visual Studio Express editions:
//
- return true;
+ return false;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 4e8e7e6..08eb391 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -25,6 +25,7 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
this->ToolSupportsColor = true;
this->ForceVerboseMakefiles = false;
+ this->NoRuleMessages = false;
#if defined(_WIN32) || defined(__VMS)
this->UseLinkScript = false;
@@ -144,39 +145,48 @@ void cmGlobalUnixMakefileGenerator3::Generate()
// first do superclass method
this->cmGlobalGenerator::Generate();
- // initialize progress
- unsigned long total = 0;
- for(ProgressMapType::const_iterator pmi = this->ProgressMap.begin();
- pmi != this->ProgressMap.end(); ++pmi)
+ cmake* cm = this->GetCMakeInstance();
+ if(const char* ruleStatus = cm->GetProperty("RULE_MESSAGES"))
{
- total += pmi->second.NumberOfActions;
+ this->NoRuleMessages = cmSystemTools::IsOff(ruleStatus);
}
- // write each target's progress.make this loop is done twice. Bascially the
- // Generate pass counts all the actions, the first loop below determines
- // how many actions have progress updates for each target and writes to
- // corrrect variable values for everything except the all targets. The
- // second loop actually writes out correct values for the all targets as
- // well. This is because the all targets require more information that is
- // computed in the first loop.
- unsigned long current = 0;
- for(ProgressMapType::iterator pmi = this->ProgressMap.begin();
- pmi != this->ProgressMap.end(); ++pmi)
+ if(!this->NoRuleMessages)
{
- pmi->second.WriteProgressVariables(total, current);
- }
- for(unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
- {
- cmLocalUnixMakefileGenerator3 *lg =
- static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
- std::string markFileName = lg->GetMakefile()->GetStartOutputDirectory();
- markFileName += "/";
- markFileName += cmake::GetCMakeFilesDirectory();
- markFileName += "/progress.marks";
- cmGeneratedFileStream markFile(markFileName.c_str());
- markFile << this->CountProgressMarksInAll(lg) << "\n";
+ // initialize progress
+ unsigned long total = 0;
+ for(ProgressMapType::const_iterator pmi = this->ProgressMap.begin();
+ pmi != this->ProgressMap.end(); ++pmi)
+ {
+ total += pmi->second.NumberOfActions;
+ }
+
+ // write each target's progress.make this loop is done twice. Bascially the
+ // Generate pass counts all the actions, the first loop below determines
+ // how many actions have progress updates for each target and writes to
+ // corrrect variable values for everything except the all targets. The
+ // second loop actually writes out correct values for the all targets as
+ // well. This is because the all targets require more information that is
+ // computed in the first loop.
+ unsigned long current = 0;
+ for(ProgressMapType::iterator pmi = this->ProgressMap.begin();
+ pmi != this->ProgressMap.end(); ++pmi)
+ {
+ pmi->second.WriteProgressVariables(total, current);
+ }
+ for(unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
+ {
+ cmLocalUnixMakefileGenerator3 *lg =
+ static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
+ std::string markFileName = lg->GetMakefile()->GetStartOutputDirectory();
+ markFileName += "/";
+ markFileName += cmake::GetCMakeFilesDirectory();
+ markFileName += "/progress.marks";
+ cmGeneratedFileStream markFile(markFileName.c_str());
+ markFile << this->CountProgressMarksInAll(lg) << "\n";
+ }
}
-
+
// write the main makefile
this->WriteMainMakefile2();
this->WriteMainCMakefile();
@@ -738,31 +748,35 @@ cmGlobalUnixMakefileGenerator3
// Write the rule.
localName += "/all";
depends.clear();
+ std::string progressDir;
- std::string progressDir =
- lg->GetMakefile()->GetHomeOutputDirectory();
- progressDir += cmake::GetCMakeFilesDirectory();
+ if(!this->NoRuleMessages)
{
- cmOStringStream progCmd;
- progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
- // all target counts
- progCmd << lg->Convert(progressDir.c_str(),
- cmLocalGenerator::FULL,
- cmLocalGenerator::SHELL);
- progCmd << " ";
- std::vector<unsigned long>& progFiles =
- this->ProgressMap[&t->second].Marks;
- for (std::vector<unsigned long>::iterator i = progFiles.begin();
- i != progFiles.end(); ++i)
+ progressDir =
+ lg->GetMakefile()->GetHomeOutputDirectory();
+ progressDir += cmake::GetCMakeFilesDirectory();
{
- progCmd << " " << *i;
+ cmOStringStream progCmd;
+ progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
+ // all target counts
+ progCmd << lg->Convert(progressDir.c_str(),
+ cmLocalGenerator::FULL,
+ cmLocalGenerator::SHELL);
+ progCmd << " ";
+ std::vector<unsigned long>& progFiles =
+ this->ProgressMap[&t->second].Marks;
+ for (std::vector<unsigned long>::iterator i = progFiles.begin();
+ i != progFiles.end(); ++i)
+ {
+ progCmd << " " << *i;
+ }
+ commands.push_back(progCmd.str());
}
- commands.push_back(progCmd.str());
+ progressDir = "Built target ";
+ progressDir += t->first;
+ lg->AppendEcho(commands,progressDir.c_str());
}
- progressDir = "Built target ";
- progressDir += t->first;
- lg->AppendEcho(commands,progressDir.c_str());
-
+
this->AppendGlobalTargetDepends(depends,t->second);
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
localName.c_str(), depends, commands, true);
@@ -776,39 +790,43 @@ cmGlobalUnixMakefileGenerator3
lg->WriteMakeRule(ruleFileStream, "Include target in all.",
"all", depends, commands, true);
}
-
- // Write the rule.
- commands.clear();
- progressDir = lg->GetMakefile()->GetHomeOutputDirectory();
- progressDir += cmake::GetCMakeFilesDirectory();
-
- {
- // TODO: Convert the total progress count to a make variable.
- cmOStringStream progCmd;
- progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
- // # in target
- progCmd << lg->Convert(progressDir.c_str(),
- cmLocalGenerator::FULL,
- cmLocalGenerator::SHELL);
- //
- std::set<cmTarget *> emitted;
- progCmd << " "
- << this->CountProgressMarksInTarget(&t->second, emitted);
- commands.push_back(progCmd.str());
- }
+
+ if(!this->NoRuleMessages)
+ {
+ // Write the rule.
+ commands.clear();
+ progressDir = lg->GetMakefile()->GetHomeOutputDirectory();
+ progressDir += cmake::GetCMakeFilesDirectory();
+
+ {
+ // TODO: Convert the total progress count to a make variable.
+ cmOStringStream progCmd;
+ progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
+ // # in target
+ progCmd << lg->Convert(progressDir.c_str(),
+ cmLocalGenerator::FULL,
+ cmLocalGenerator::SHELL);
+ //
+ std::set<cmTarget *> emitted;
+ progCmd << " "
+ << this->CountProgressMarksInTarget(&t->second, emitted);
+ commands.push_back(progCmd.str());
+ }
+ }
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
tmp += "Makefile2";
commands.push_back(lg->GetRecursiveMakeCall
(tmp.c_str(),localName.c_str()));
- {
- cmOStringStream progCmd;
- progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
- progCmd << lg->Convert(progressDir.c_str(),
- cmLocalGenerator::FULL,
- cmLocalGenerator::SHELL);
- progCmd << " 0";
- commands.push_back(progCmd.str());
- }
+ if(!this->NoRuleMessages)
+ {
+ cmOStringStream progCmd;
+ progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
+ progCmd << lg->Convert(progressDir.c_str(),
+ cmLocalGenerator::FULL,
+ cmLocalGenerator::SHELL);
+ progCmd << " 0";
+ commands.push_back(progCmd.str());
+ }
depends.clear();
depends.push_back("cmake_check_build_system");
localName = lg->GetRelativeTargetDirectory(t->second);
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index f499536..01f5fac 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -170,6 +170,7 @@ protected:
std::string EmptyRuleHackCommand;
bool ForceVerboseMakefiles;
+ bool NoRuleMessages;
// Store per-target progress counters.
struct TargetProgress
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 751dc24..2b9e5ba 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -323,7 +323,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
if (cumulativePath.empty())
{
- cumulativePath = *iter;
+ cumulativePath = "CMAKE_FOLDER_GUID_" + *iter;
}
else
{
@@ -431,14 +431,22 @@ void cmGlobalVisualStudio7Generator
//----------------------------------------------------------------------------
void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout)
{
+ const char *prefix = "CMAKE_FOLDER_GUID_";
+ const std::string::size_type skip_prefix = strlen(prefix);
std::string guidProjectTypeFolder = "2150E333-8FDC-42A3-9474-1A3956D46DE8";
for(std::map<std::string,std::set<std::string> >::iterator iter =
VisualStudioFolders.begin(); iter != VisualStudioFolders.end(); ++iter)
{
std::string fullName = iter->first;
std::string guid = this->GetGUID(fullName.c_str());
- std::string nameOnly = cmSystemTools::GetFilenameName(fullName);
+
cmSystemTools::ReplaceString(fullName, "/", "\\");
+ if (cmSystemTools::StringStartsWith(fullName.c_str(), prefix))
+ {
+ fullName = fullName.substr(skip_prefix);
+ }
+
+ std::string nameOnly = cmSystemTools::GetFilenameName(fullName);
fout << "Project(\"{" <<
guidProjectTypeFolder << "}\") = \"" <<
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 48f9003..76d01e7 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -260,8 +260,8 @@ cmGlobalVisualStudio8Generator
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
- fout << "\t\t" << *i << "|" << this->GetPlatformName() << " = " << *i << "|"
- << this->GetPlatformName() << "\n";
+ fout << "\t\t" << *i << "|" << this->GetPlatformName()
+ << " = " << *i << "|" << this->GetPlatformName() << "\n";
}
fout << "\tEndGlobalSection\n";
}
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index daa6b3a..c8ea339 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -69,14 +69,6 @@ public:
i.e. "Can I build Debug and Release in the same tree?" */
virtual bool IsMultiConfig() { return true; }
-protected:
- // Does this VS version link targets to each other if there are
- // dependencies in the SLN file? This was done for VS versions
- // below 8.
- virtual bool VSLinksDependencies() const { return true; }
-
- virtual const char* GetIDEVersion() = 0;
-
struct TargetCompare
{
bool operator()(cmTarget const* l, cmTarget const* r) const;
@@ -87,6 +79,14 @@ protected:
OrderedTargetDependSet(cmGlobalGenerator::TargetDependSet const&);
};
+protected:
+ // Does this VS version link targets to each other if there are
+ // dependencies in the SLN file? This was done for VS versions
+ // below 8.
+ virtual bool VSLinksDependencies() const { return true; }
+
+ virtual const char* GetIDEVersion() = 0;
+
virtual bool ComputeTargetDepends();
class VSDependSet: public std::set<cmStdString> {};
class VSDependMap: public std::map<cmTarget*, VSDependSet> {};
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 537a88f..2f7bc44 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -131,8 +131,8 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(std::string const& version)
//----------------------------------------------------------------------------
cmGlobalGenerator* cmGlobalXCodeGenerator::New()
-{
-#if defined(CMAKE_BUILD_WITH_CMAKE)
+{
+#if defined(CMAKE_BUILD_WITH_CMAKE)
cmXcodeVersionParser parser;
parser.ParseFile
("/Developer/Applications/Xcode.app/Contents/version.plist");
@@ -156,7 +156,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::New()
void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
lang,
cmMakefile * mf, bool optional)
-{
+{
mf->AddDefinition("XCODE","1");
mf->AddDefinition("XCODE_VERSION", this->VersionString.c_str());
if(this->XcodeVersion == 15)
@@ -175,12 +175,12 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
mf->AddDefinition("CMAKE_GENERATOR_CC", "gcc");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "g++");
mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
- // initialize Architectures so it can be used by
+ // initialize Architectures so it can be used by
// GetTargetObjectFileDirectories
this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
- const char* osxArch =
+ const char* osxArch =
mf->GetDefinition("CMAKE_OSX_ARCHITECTURES");
- const char* sysroot =
+ const char* sysroot =
mf->GetDefinition("CMAKE_OSX_SYSROOT");
if(osxArch && sysroot)
{
@@ -193,10 +193,10 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
//----------------------------------------------------------------------------
std::string cmGlobalXCodeGenerator
::GenerateBuildCommand(const char* makeProgram,
- const char *projectName,
- const char* additionalOptions,
+ const char *projectName,
+ const char* additionalOptions,
const char *targetName,
- const char* config,
+ const char* config,
bool ignoreErrors,
bool)
{
@@ -210,7 +210,7 @@ std::string cmGlobalXCodeGenerator
"Generator cannot find the appropriate make command.");
return "";
}
- std::string makeCommand =
+ std::string makeCommand =
cmSystemTools::ConvertToOutputPath(makeProgram);
std::string lowerCaseCommand = makeCommand;
cmSystemTools::LowerCase(lowerCaseCommand);
@@ -284,7 +284,7 @@ void cmGlobalXCodeGenerator::Generate()
// make sure extra targets are added before calling
// the parent generate which will call trace depends
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
- {
+ {
cmLocalGenerator* root = it->second[0];
this->SetGenerationRoot(root);
// add ALL_BUILD, INSTALL, etc
@@ -293,7 +293,7 @@ void cmGlobalXCodeGenerator::Generate()
this->ForceLinkerLanguages();
this->cmGlobalGenerator::Generate();
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
- {
+ {
cmLocalGenerator* root = it->second[0];
this->SetGenerationRoot(root);
// now create the project
@@ -319,8 +319,8 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root)
}
//----------------------------------------------------------------------------
-void
-cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
+void
+cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& gens)
{
cmMakefile* mf = root->GetMakefile();
@@ -339,7 +339,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
listfile += "CMakeLists.txt";
allbuild->AddSource(listfile.c_str());
- // Add XCODE depend helper
+ // Add XCODE depend helper
std::string dir = mf->GetCurrentOutputDirectory();
cmCustomCommandLine makecommand;
makecommand.push_back("make");
@@ -361,7 +361,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
for(std::vector<cmLocalGenerator*>::iterator i = gens.begin();
i != gens.end(); ++i)
{
- cmLocalGenerator* lg = *i;
+ cmLocalGenerator* lg = *i;
if(this->IsExcluded(root, *i))
{
continue;
@@ -370,7 +370,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
{
cmTarget& target = l->second;
- // make all exe, shared libs and modules
+ // make all exe, shared libs and modules
// run the depend check makefile as a post build rule
// this will make sure that when the next target is built
// things are up-to-date
@@ -385,7 +385,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
cmTarget::POST_BUILD,
"Depend check for xcode",
dir.c_str());
-
+
}
if(!target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
{
@@ -407,8 +407,8 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
cmMakefile* mf = root->GetMakefile();
std::vector<std::string> lfiles = mf->GetListFiles();
// sort the array
- std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
- std::vector<std::string>::iterator new_end =
+ std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
+ std::vector<std::string>::iterator new_end =
std::unique(lfiles.begin(), lfiles.end());
lfiles.erase(new_end, lfiles.end());
std::string dir = mf->GetHomeOutputDirectory();
@@ -428,7 +428,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
makefileStream << "\\\n" << this->ConvertToRelativeForMake(i->c_str());
}
std::string cmake = mf->GetRequiredDefinition("CMAKE_COMMAND");
- makefileStream << "\n\t" << this->ConvertToRelativeForMake(cmake.c_str())
+ makefileStream << "\n\t" << this->ConvertToRelativeForMake(cmake.c_str())
<< " -H" << this->ConvertToRelativeForMake(
mf->GetHomeDirectory())
<< " -B" << this->ConvertToRelativeForMake(
@@ -451,7 +451,7 @@ void cmGlobalXCodeGenerator::ClearXCodeObjects()
}
//----------------------------------------------------------------------------
-cmXCodeObject*
+cmXCodeObject*
cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::PBXType ptype)
{
cmXCodeObject* obj;
@@ -468,7 +468,7 @@ cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::PBXType ptype)
}
//----------------------------------------------------------------------------
-cmXCodeObject*
+cmXCodeObject*
cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::Type type)
{
cmXCodeObject* obj = new cmXCodeObject(cmXCodeObject::None, type);
@@ -539,7 +539,7 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
buildFile->SetComment(fileRef->GetComment());
buildFile->AddAttribute("fileRef", this->CreateObjectReference(fileRef));
- cmXCodeObject* settings =
+ cmXCodeObject* settings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
settings->AddAttribute("COMPILER_FLAGS", this->CreateString(flags.c_str()));
@@ -608,7 +608,7 @@ cmGlobalXCodeGenerator::CreateXCodeFileReference(cmSourceFile* sf,
}
fileRef->AddAttribute("fileEncoding", this->CreateString("4"));
- const char* lang =
+ const char* lang =
this->CurrentLocalGenerator->GetSourceFileLanguage(*sf);
std::string sourcecode = "sourcecode";
std::string ext = sf->GetExtension();
@@ -643,7 +643,7 @@ cmGlobalXCodeGenerator::CreateXCodeFileReference(cmSourceFile* sf,
sourcecode += ".c.h";
}
else if(ext == "hxx" || ext == "hpp" || ext == "txx"
- || ext == "pch")
+ || ext == "pch" || ext == "hh")
{
sourcecode += ".cpp.h";
}
@@ -675,7 +675,7 @@ cmGlobalXCodeGenerator::CreateXCodeFileReference(cmSourceFile* sf,
// // valid lastKnownFileType value.
// }
- fileRef->AddAttribute("lastKnownFileType",
+ fileRef->AddAttribute("lastKnownFileType",
this->CreateString(sourcecode.c_str()));
// Store the file path relative to the top of the source tree.
@@ -717,31 +717,15 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
std::string outdir =
cmSystemTools::CollapseFullPath(this->CurrentMakefile->
GetCurrentOutputDirectory());
- cmSystemTools::SplitPath(outdir.c_str(),
+ cmSystemTools::SplitPath(outdir.c_str(),
this->CurrentOutputDirectoryComponents);
// Select the current set of configuration types.
this->CurrentConfigurationTypes.clear();
- if(this->XcodeVersion > 20)
- {
- if(const char* types =
- this->CurrentMakefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
- {
- cmSystemTools::ExpandListArgument(types,
- this->CurrentConfigurationTypes);
- }
- }
+ this->CurrentMakefile->GetConfigurations(this->CurrentConfigurationTypes);
if(this->CurrentConfigurationTypes.empty())
{
- if(const char* buildType =
- this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE"))
- {
- this->CurrentConfigurationTypes.push_back(buildType);
- }
- else
- {
- this->CurrentConfigurationTypes.push_back("");
- }
+ this->CurrentConfigurationTypes.push_back("");
}
}
@@ -783,7 +767,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
this->CreateXCodeSourceFile(this->CurrentLocalGenerator,
*i, cmtarget);
cmXCodeObject* fr = xsf->GetObject("fileRef");
- cmXCodeObject* filetype =
+ cmXCodeObject* filetype =
fr->GetObject()->GetObject("lastKnownFileType");
cmTarget::SourceFileFlags tsFlags =
@@ -829,7 +813,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
sourceBuildPhase =
this->CreateObject(cmXCodeObject::PBXSourcesBuildPhase);
sourceBuildPhase->SetComment("Sources");
- sourceBuildPhase->AddAttribute("buildActionMask",
+ sourceBuildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
for(std::vector<cmXCodeObject*>::iterator i = sourceFiles.begin();
@@ -838,7 +822,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
buildFiles->AddObject(*i);
}
sourceBuildPhase->AddAttribute("files", buildFiles);
- sourceBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
+ sourceBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
this->CreateString("0"));
}
@@ -931,7 +915,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
for ( sfIt = mit->second.begin(); sfIt != mit->second.end(); ++ sfIt )
{
cmXCodeObject* xsf =
- this->CreateXCodeSourceFile(this->CurrentLocalGenerator,
+ this->CreateXCodeSourceFile(this->CurrentLocalGenerator,
*sfIt, cmtarget);
buildFiles->AddObject(xsf);
}
@@ -955,12 +939,12 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
{
buildFiles->AddObject(*i);
}
- frameworkBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
+ frameworkBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
this->CreateString("0"));
}
// create list of build phases and create the XCode target
- cmXCodeObject* buildPhases =
+ cmXCodeObject* buildPhases =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
this->CreateCustomCommands(buildPhases, sourceBuildPhase,
@@ -1049,15 +1033,15 @@ cmGlobalXCodeGenerator::CreateBuildPhase(const char* name,
{
return 0;
}
- cmXCodeObject* buildPhase =
+ cmXCodeObject* buildPhase =
this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
buildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
buildPhase->AddAttribute("files", buildFiles);
- buildPhase->AddAttribute("name",
+ buildPhase->AddAttribute("name",
this->CreateString(name));
- buildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
+ buildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
this->CreateString("0"));
buildPhase->AddAttribute("shellPath",
this->CreateString("/bin/sh"));
@@ -1080,16 +1064,16 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
frameworkBuildPhase,
cmTarget& cmtarget)
{
- std::vector<cmCustomCommand> const & prebuild
+ std::vector<cmCustomCommand> const & prebuild
= cmtarget.GetPreBuildCommands();
- std::vector<cmCustomCommand> const & prelink
+ std::vector<cmCustomCommand> const & prelink
= cmtarget.GetPreLinkCommands();
- std::vector<cmCustomCommand> const & postbuild
+ std::vector<cmCustomCommand> const & postbuild
= cmtarget.GetPostBuildCommands();
std::vector<cmSourceFile*>const &classes = cmtarget.GetSourceFiles();
// add all the sources
std::vector<cmCustomCommand> commands;
- for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
+ for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
i != classes.end(); ++i)
{
if((*i)->GetCustomCommand())
@@ -1098,7 +1082,7 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
}
}
std::vector<cmCustomCommand> reruncom;
- cmXCodeObject* cmakeReRunPhase =
+ cmXCodeObject* cmakeReRunPhase =
this->CreateBuildPhase("CMake ReRun", "cmakeReRunPhase",
cmtarget, reruncom);
buildPhases->AddObject(cmakeReRunPhase);
@@ -1108,15 +1092,15 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
"cmakeRulesBuildPhase",
cmtarget, commands);
// create prebuild phase
- cmXCodeObject* preBuildPhase =
+ cmXCodeObject* preBuildPhase =
this->CreateBuildPhase("CMake PreBuild Rules", "preBuildCommands",
cmtarget, prebuild);
// create prelink phase
- cmXCodeObject* preLinkPhase =
+ cmXCodeObject* preLinkPhase =
this->CreateBuildPhase("CMake PreLink Rules", "preLinkCommands",
cmtarget, prelink);
// create postbuild phase
- cmXCodeObject* postBuildPhase =
+ cmXCodeObject* postBuildPhase =
this->CreateBuildPhase("CMake PostBuild Rules", "postBuildPhase",
cmtarget, postbuild);
@@ -1183,10 +1167,10 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag,
}
//----------------------------------------------------------------------------
-void
+void
cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
cmTarget& target,
- std::vector<cmCustomCommand>
+ std::vector<cmCustomCommand>
const & commands,
const char* name)
{
@@ -1197,7 +1181,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
std::string makecmd = "make -C ";
makecmd += cdir;
makecmd += " -f ";
- makecmd +=
+ makecmd +=
this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefile.c_str());
cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ ");
buildphase->AddAttribute("shellScript",
@@ -1211,7 +1195,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
for(std::vector<cmCustomCommand>::const_iterator i = commands.begin();
i != commands.end(); ++i)
{
- cmCustomCommand const& cc = *i;
+ cmCustomCommand const& cc = *i;
if(!cc.GetCommandLines().empty())
{
const std::vector<std::string>& outputs = cc.GetOutputs();
@@ -1229,7 +1213,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
}
}
}
-
+
std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory();
dir += "/CMakeScripts";
cmSystemTools::MakeDirectory(dir.c_str());
@@ -1239,19 +1223,19 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
makefile += "_";
makefile += name;
makefile += ".make";
-
- for (std::vector<std::string>::const_iterator currentConfig=
+
+ for (std::vector<std::string>::const_iterator currentConfig=
this->CurrentConfigurationTypes.begin();
currentConfig!=this->CurrentConfigurationTypes.end();
currentConfig++ )
{
- this->CreateCustomRulesMakefile(makefile.c_str(),
- target,
- commands,
+ this->CreateCustomRulesMakefile(makefile.c_str(),
+ target,
+ commands,
currentConfig->c_str(),
multipleOutputPairs);
}
-
+
std::string cdir = this->CurrentMakefile->GetCurrentOutputDirectory();
cdir = this->ConvertToRelativeForXCode(cdir.c_str());
std::string makecmd = "make -C ";
@@ -1265,18 +1249,18 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
}
makecmd += " all";
cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ ");
- buildphase->AddAttribute("shellScript",
+ buildphase->AddAttribute("shellScript",
this->CreateString(makecmd.c_str()));
}
//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator
-::CreateCustomRulesMakefile(const char* makefileBasename,
- cmTarget& target,
- std::vector<cmCustomCommand>
+::CreateCustomRulesMakefile(const char* makefileBasename,
+ cmTarget& target,
+ std::vector<cmCustomCommand>
const & commands,
const char* configName,
- const std::map<cmStdString,
+ const std::map<cmStdString,
cmStdString>& multipleOutputPairs
)
{
@@ -1293,7 +1277,7 @@ void cmGlobalXCodeGenerator
makefileStream.SetCopyIfDifferent(true);
makefileStream << "# Generated by CMake, DO NOT EDIT\n";
makefileStream << "# Custom rules for " << target.GetName() << "\n";
-
+
// have all depend on all outputs
makefileStream << "all: ";
std::map<const cmCustomCommand*, cmStdString> tname;
@@ -1301,7 +1285,7 @@ void cmGlobalXCodeGenerator
for(std::vector<cmCustomCommand>::const_iterator i = commands.begin();
i != commands.end(); ++i)
{
- cmCustomCommand const& cc = *i;
+ cmCustomCommand const& cc = *i;
if(!cc.GetCommandLines().empty())
{
const std::vector<std::string>& outputs = cc.GetOutputs();
@@ -1315,10 +1299,10 @@ void cmGlobalXCodeGenerator
}
}
else
- {
+ {
cmOStringStream str;
str << "_buildpart_" << count++ ;
- tname[&cc] = std::string(target.GetName()) + str.str();
+ tname[&cc] = std::string(target.GetName()) + str.str();
makefileStream << "\\\n\t" << tname[&cc];
}
}
@@ -1327,7 +1311,7 @@ void cmGlobalXCodeGenerator
for(std::vector<cmCustomCommand>::const_iterator i = commands.begin();
i != commands.end(); ++i)
{
- cmCustomCommand const& cc = *i;
+ cmCustomCommand const& cc = *i;
if(!cc.GetCommandLines().empty())
{
bool escapeOldStyle = cc.GetEscapeOldStyle();
@@ -1346,7 +1330,7 @@ void cmGlobalXCodeGenerator
// There are no outputs. Use the generated force rule name.
makefileStream << tname[&cc] << ": ";
}
- for(std::vector<std::string>::const_iterator d =
+ for(std::vector<std::string>::const_iterator d =
cc.GetDepends().begin();
d != cc.GetDepends().end(); ++d)
{
@@ -1367,7 +1351,7 @@ void cmGlobalXCodeGenerator
}
// Add each command line to the set of commands.
- for(cmCustomCommandLines::const_iterator cl =
+ for(cmCustomCommandLines::const_iterator cl =
cc.GetCommandLines().begin();
cl != cc.GetCommandLines().end(); ++cl)
{
@@ -1375,7 +1359,7 @@ void cmGlobalXCodeGenerator
const cmCustomCommandLine& commandLine = *cl;
std::string cmd2 = this->CurrentLocalGenerator
->GetRealLocation(commandLine[0].c_str(), configName);
-
+
cmSystemTools::ReplaceString(cmd2, "/./", "/");
cmd2 = this->ConvertToRelativeForMake(cmd2.c_str());
std::string cmd;
@@ -1409,7 +1393,7 @@ void cmGlobalXCodeGenerator
// Add rules to deal with multiple outputs of custom commands.
if(!multipleOutputPairs.empty())
{
- makefileStream <<
+ makefileStream <<
"\n# Dependencies of multiple outputs to their primary outputs \n";
for(std::map<cmStdString, cmStdString>::const_iterator o =
@@ -1440,6 +1424,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string defFlags;
bool shared = ((target.GetType() == cmTarget::SHARED_LIBRARY) ||
(target.GetType() == cmTarget::MODULE_LIBRARY));
+ bool binary = ((target.GetType() == cmTarget::STATIC_LIBRARY) ||
+ (target.GetType() == cmTarget::EXECUTABLE) ||
+ shared);
const char* lang = target.GetLinkerLanguage(configName);
std::string cflags;
@@ -1454,10 +1441,17 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
// Add language-specific flags.
this->CurrentLocalGenerator->AddLanguageFlags(flags, lang, configName);
-
+
// Add shared-library flags if needed.
this->CurrentLocalGenerator->AddSharedFlags(flags, lang, shared);
}
+ else if(binary)
+ {
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
+ target.GetName());
+ return;
+ }
// Add define flags
this->CurrentLocalGenerator->
@@ -1492,11 +1486,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string extraLinkOptions;
if(target.GetType() == cmTarget::EXECUTABLE)
{
- extraLinkOptions =
+ extraLinkOptions =
this->CurrentMakefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS");
std::string var = "CMAKE_EXE_LINKER_FLAGS_";
var += cmSystemTools::UpperCase(configName);
- std::string val =
+ std::string val =
this->CurrentMakefile->GetSafeDefinition(var.c_str());
if(val.size())
{
@@ -1595,9 +1589,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
this->CreateString(pndir.c_str()));
pndir = target.GetDirectory(configName);
}
- buildSettings->AddAttribute("EXECUTABLE_PREFIX",
+ buildSettings->AddAttribute("EXECUTABLE_PREFIX",
this->CreateString(pnprefix.c_str()));
- buildSettings->AddAttribute("EXECUTABLE_SUFFIX",
+ buildSettings->AddAttribute("EXECUTABLE_SUFFIX",
this->CreateString(pnsuffix.c_str()));
}
buildSettings->AddAttribute("SYMROOT",
@@ -1608,20 +1602,20 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
case cmTarget::STATIC_LIBRARY:
{
- buildSettings->AddAttribute("LIBRARY_STYLE",
+ buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("STATIC"));
break;
}
-
+
case cmTarget::MODULE_LIBRARY:
{
- buildSettings->AddAttribute("LIBRARY_STYLE",
+ buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("BUNDLE"));
if(this->XcodeVersion >= 22)
{
- buildSettings->AddAttribute("MACH_O_TYPE",
+ buildSettings->AddAttribute("MACH_O_TYPE",
this->CreateString("mh_bundle"));
- buildSettings->AddAttribute("GCC_DYNAMIC_NO_PIC",
+ buildSettings->AddAttribute("GCC_DYNAMIC_NO_PIC",
this->CreateString("NO"));
// Add the flags to create an executable.
std::string createFlags =
@@ -1706,7 +1700,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
plist.c_str());
std::string path =
this->ConvertToRelativeForXCode(plist.c_str());
- buildSettings->AddAttribute("INFOPLIST_FILE",
+ buildSettings->AddAttribute("INFOPLIST_FILE",
this->CreateString(path.c_str()));
}
@@ -1717,7 +1711,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
if(this->XcodeVersion >= 22)
{
- buildSettings->AddAttribute("PREBINDING",
+ buildSettings->AddAttribute("PREBINDING",
this->CreateString("NO"));
}
@@ -1742,7 +1736,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
else
{
- std::string incpath =
+ std::string incpath =
this->XCodeEscapePath(i->c_str());
dirs.Add(incpath.c_str());
}
@@ -1761,12 +1755,12 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
if(!fdirs.IsEmpty())
{
- buildSettings->AddAttribute("FRAMEWORK_SEARCH_PATHS",
+ buildSettings->AddAttribute("FRAMEWORK_SEARCH_PATHS",
fdirs.CreateList());
}
if(!dirs.IsEmpty())
{
- buildSettings->AddAttribute("HEADER_SEARCH_PATHS",
+ buildSettings->AddAttribute("HEADER_SEARCH_PATHS",
dirs.CreateList());
}
std::string oflagc = this->ExtractFlag("-O", cflags);
@@ -1808,11 +1802,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
if(gflagc.size() ==0 && gflag.size() == 0)
{
debugStr = "NO";
- }
+ }
buildSettings->AddAttribute("GCC_GENERATE_DEBUGGING_SYMBOLS",
this->CreateString(debugStr));
- buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL",
+ buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL",
this->CreateString(optLevel));
buildSettings->AddAttribute("GCC_SYMBOLS_PRIVATE_EXTERN",
this->CreateString("NO"));
@@ -1822,11 +1816,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
flags += " ";
flags += defFlags;
- buildSettings->AddAttribute("OTHER_CPLUSPLUSFLAGS",
+ buildSettings->AddAttribute("OTHER_CPLUSPLUSFLAGS",
this->CreateString(flags.c_str()));
cflags += " ";
cflags += defFlags;
- buildSettings->AddAttribute("OTHER_CFLAGS",
+ buildSettings->AddAttribute("OTHER_CFLAGS",
this->CreateString(cflags.c_str()));
}
@@ -1834,7 +1828,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
flags += " ";
flags += defFlags;
- buildSettings->AddAttribute("OTHER_CFLAGS",
+ buildSettings->AddAttribute("OTHER_CFLAGS",
this->CreateString(flags.c_str()));
}
@@ -1862,9 +1856,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
buildSettings->AddAttribute("INSTALL_PATH",
this->CreateString(install_name_dir.c_str()));
- buildSettings->AddAttribute("OTHER_LDFLAGS",
+ buildSettings->AddAttribute("OTHER_LDFLAGS",
this->CreateString(extraLinkOptions.c_str()));
- buildSettings->AddAttribute("OTHER_REZFLAGS",
+ buildSettings->AddAttribute("OTHER_REZFLAGS",
this->CreateString(""));
buildSettings->AddAttribute("SECTORDER_FLAGS",
this->CreateString(""));
@@ -1934,12 +1928,12 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
//----------------------------------------------------------------------------
-cmXCodeObject*
+cmXCodeObject*
cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
{
cmXCodeObject* shellBuildPhase =
this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
- shellBuildPhase->AddAttribute("buildActionMask",
+ shellBuildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
shellBuildPhase->AddAttribute("files", buildFiles);
@@ -1954,10 +1948,10 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
shellBuildPhase->AddAttribute("shellScript",
this->CreateString(
"# shell script goes here\nexit 0"));
- cmXCodeObject* target =
+ cmXCodeObject* target =
this->CreateObject(cmXCodeObject::PBXAggregateTarget);
target->SetComment(cmtarget.GetName());
- cmXCodeObject* buildPhases =
+ cmXCodeObject* buildPhases =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
std::vector<cmXCodeObject*> emptyContentVector;
this->CreateCustomCommands(buildPhases, 0, 0, 0, emptyContentVector, 0,
@@ -1976,7 +1970,7 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
this->CreateBuildSettings(cmtarget, buildSettings, theConfig);
target->AddAttribute("buildSettings", buildSettings);
}
- cmXCodeObject* dependencies =
+ cmXCodeObject* dependencies =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
target->AddAttribute("dependencies", dependencies);
target->AddAttribute("name", this->CreateString(cmtarget.GetName()));
@@ -2004,13 +1998,13 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
cmTarget& cmtarget)
{
- std::string configTypes =
+ std::string configTypes =
this->CurrentMakefile->GetRequiredDefinition("CMAKE_CONFIGURATION_TYPES");
std::vector<std::string> configVectorIn;
std::vector<std::string> configVector;
configVectorIn.push_back(configTypes);
cmSystemTools::ExpandList(configVectorIn, configVector);
- cmXCodeObject* configlist =
+ cmXCodeObject* configlist =
this->CreateObject(cmXCodeObject::XCConfigurationList);
cmXCodeObject* buildConfigurations =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -2021,11 +2015,11 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
comment += cmtarget.GetName();
comment += "\"";
configlist->SetComment(comment.c_str());
- target->AddAttribute("buildConfigurationList",
+ target->AddAttribute("buildConfigurationList",
this->CreateObjectReference(configlist));
for(unsigned int i = 0; i < configVector.size(); ++i)
{
- cmXCodeObject* config =
+ cmXCodeObject* config =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
buildConfigurations->AddObject(config);
cmXCodeObject* buildSettings =
@@ -2038,9 +2032,9 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
}
if(configVector.size())
{
- configlist->AddAttribute("defaultConfigurationName",
+ configlist->AddAttribute("defaultConfigurationName",
this->CreateString(configVector[0].c_str()));
- configlist->AddAttribute("defaultConfigurationIsVisible",
+ configlist->AddAttribute("defaultConfigurationIsVisible",
this->CreateString("0"));
return configVector[0];
}
@@ -2095,7 +2089,7 @@ cmXCodeObject*
cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
cmXCodeObject* buildPhases)
{
- cmXCodeObject* target =
+ cmXCodeObject* target =
this->CreateObject(cmXCodeObject::PBXNativeTarget);
target->AddAttribute("buildPhases", buildPhases);
cmXCodeObject* buildRules = this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -2113,13 +2107,13 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
this->CreateBuildSettings(cmtarget, buildSettings, defConfig.c_str());
target->AddAttribute("buildSettings", buildSettings);
}
- cmXCodeObject* dependencies =
+ cmXCodeObject* dependencies =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
target->AddAttribute("dependencies", dependencies);
target->AddAttribute("name", this->CreateString(cmtarget.GetName()));
target->AddAttribute("productName",this->CreateString(cmtarget.GetName()));
- cmXCodeObject* fileRef =
+ cmXCodeObject* fileRef =
this->CreateObject(cmXCodeObject::PBXFileReference);
if(const char* fileType = this->GetTargetFileType(cmtarget))
{
@@ -2131,7 +2125,7 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
fileRef->AddAttribute("sourceTree",
this->CreateString("BUILT_PRODUCTS_DIR"));
fileRef->SetComment(cmtarget.GetName());
- target->AddAttribute("productReference",
+ target->AddAttribute("productReference",
this->CreateObjectReference(fileRef));
if(const char* productType = this->GetTargetProductType(cmtarget))
{
@@ -2172,20 +2166,20 @@ void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target,
// now avoid circular references if dependTarget already
// depends on target then skip it. Circular references crashes
// xcode
- cmXCodeObject* dependTargetDepends =
+ cmXCodeObject* dependTargetDepends =
dependTarget->GetObject("dependencies");
if(dependTargetDepends)
{
if(dependTargetDepends->HasObject(target->GetPBXTargetDependency()))
- {
+ {
return;
}
}
-
+
cmXCodeObject* targetdep = dependTarget->GetPBXTargetDependency();
if(!targetdep)
{
- cmXCodeObject* container =
+ cmXCodeObject* container =
this->CreateObject(cmXCodeObject::PBXContainerItemProxy);
container->SetComment("PBXContainerItemProxy");
container->AddAttribute("containerPortal",
@@ -2193,25 +2187,25 @@ void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target,
container->AddAttribute("proxyType", this->CreateString("1"));
container->AddAttribute("remoteGlobalIDString",
this->CreateObjectReference(dependTarget));
- container->AddAttribute("remoteInfo",
+ container->AddAttribute("remoteInfo",
this->CreateString(
dependTarget->GetTarget()->GetName()));
- targetdep =
+ targetdep =
this->CreateObject(cmXCodeObject::PBXTargetDependency);
targetdep->SetComment("PBXTargetDependency");
targetdep->AddAttribute("target",
this->CreateObjectReference(dependTarget));
- targetdep->AddAttribute("targetProxy",
+ targetdep->AddAttribute("targetProxy",
this->CreateObjectReference(container));
dependTarget->SetPBXTargetDependency(targetdep);
}
-
+
cmXCodeObject* depends = target->GetObject("dependencies");
if(!depends)
{
cmSystemTools::
Error("target does not have dependencies attribute error..");
-
+
}
else
{
@@ -2259,14 +2253,14 @@ void cmGlobalXCodeGenerator
{
// There are multiple configurations. Add the setting to the
// buildSettings of the configuration name given.
- cmXCodeObject* configurationList =
+ cmXCodeObject* configurationList =
target->GetObject("buildConfigurationList")->GetObject();
- cmXCodeObject* buildConfigs =
+ cmXCodeObject* buildConfigs =
configurationList->GetObject("buildConfigurations");
std::vector<cmXCodeObject*> list = buildConfigs->GetObjectList();
- // each configuration and the target itself has a buildSettings in it
+ // each configuration and the target itself has a buildSettings in it
//list.push_back(target);
- for(std::vector<cmXCodeObject*>::iterator i = list.begin();
+ for(std::vector<cmXCodeObject*>::iterator i = list.begin();
i != list.end(); ++i)
{
if(configName)
@@ -2428,7 +2422,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
std::vector<cmSourceGroup> sourceGroups = mf->GetSourceGroups();
cmTargets &tgts = mf->GetTargets();
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
- {
+ {
cmTarget& cmtarget = l->second;
// Same skipping logic here as in CreateXCodeTargets so that we do not
@@ -2451,21 +2445,21 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
std::vector<cmSourceFile*> classes = cmtarget.GetSourceFiles();
- for(std::vector<cmSourceFile*>::const_iterator s = classes.begin();
+ for(std::vector<cmSourceFile*>::const_iterator s = classes.begin();
s != classes.end(); s++)
{
cmSourceFile* sf = *s;
// Add the file to the list of sources.
std::string const& source = sf->GetFullPath();
- cmSourceGroup& sourceGroup =
+ cmSourceGroup& sourceGroup =
mf->FindSourceGroup(source.c_str(), sourceGroups);
- cmXCodeObject* pbxgroup =
+ cmXCodeObject* pbxgroup =
this->CreateOrGetPBXGroup(cmtarget, &sourceGroup);
cmStdString key = GetGroupMapKey(cmtarget, sf);
this->GroupMap[key] = pbxgroup;
}
}
- }
+ }
}
//----------------------------------------------------------------------------
@@ -2491,7 +2485,7 @@ cmXCodeObject* cmGlobalXCodeGenerator
{
tgroup = this->CreateObject(cmXCodeObject::PBXGroup);
this->TargetGroup[cmtarget.GetName()] = tgroup;
- cmXCodeObject* tgroupChildren =
+ cmXCodeObject* tgroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
tgroup->AddAttribute("name", this->CreateString(cmtarget.GetName()));
tgroup->AddAttribute("children", tgroupChildren);
@@ -2514,7 +2508,7 @@ cmXCodeObject* cmGlobalXCodeGenerator
cmXCodeObject* tgroupChildren = tgroup->GetObject("children");
cmXCodeObject* group = this->CreateObject(cmXCodeObject::PBXGroup);
- cmXCodeObject* groupChildren =
+ cmXCodeObject* groupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
group->AddAttribute("name", this->CreateString(sg->GetName()));
group->AddAttribute("children", groupChildren);
@@ -2534,19 +2528,19 @@ void cmGlobalXCodeGenerator
std::vector<cmLocalGenerator*>&
generators)
{
- this->ClearXCodeObjects();
+ this->ClearXCodeObjects();
this->RootObject = 0;
this->SourcesGroupChildren = 0;
this->ResourcesGroupChildren = 0;
this->MainGroupChildren = 0;
cmXCodeObject* group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
- cmXCodeObject* developBuildStyle =
+ cmXCodeObject* developBuildStyle =
this->CreateObject(cmXCodeObject::PBXBuildStyle);
cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST);
if(this->XcodeVersion == 15)
{
- developBuildStyle->AddAttribute("name",
+ developBuildStyle->AddAttribute("name",
this->CreateString("Development"));
developBuildStyle->AddAttribute("buildSettings", group);
listObjs->AddObject(developBuildStyle);
@@ -2562,7 +2556,7 @@ void cmGlobalXCodeGenerator
{
for(unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i)
{
- cmXCodeObject* buildStyle =
+ cmXCodeObject* buildStyle =
this->CreateObject(cmXCodeObject::PBXBuildStyle);
const char* name = this->CurrentConfigurationTypes[i].c_str();
buildStyle->AddAttribute("name", this->CreateString(name));
@@ -2576,7 +2570,7 @@ void cmGlobalXCodeGenerator
}
cmXCodeObject* mainGroup = this->CreateObject(cmXCodeObject::PBXGroup);
- this->MainGroupChildren =
+ this->MainGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
mainGroup->AddAttribute("children", this->MainGroupChildren);
if(this->XcodeVersion == 15)
@@ -2586,7 +2580,7 @@ void cmGlobalXCodeGenerator
mainGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
cmXCodeObject* sourcesGroup = this->CreateObject(cmXCodeObject::PBXGroup);
- this->SourcesGroupChildren =
+ this->SourcesGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
sourcesGroup->AddAttribute("name", this->CreateString("Sources"));
sourcesGroup->AddAttribute("children", this->SourcesGroupChildren);
@@ -2609,7 +2603,7 @@ void cmGlobalXCodeGenerator
resourcesGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
this->MainGroupChildren->AddObject(resourcesGroup);
- // now create the cmake groups
+ // now create the cmake groups
this->CreateGroups(root, generators);
cmXCodeObject* productGroup = this->CreateObject(cmXCodeObject::PBXGroup);
@@ -2619,16 +2613,16 @@ void cmGlobalXCodeGenerator
productGroup->AddAttribute("refType", this->CreateString("4"));
}
productGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
- cmXCodeObject* productGroupChildren =
+ cmXCodeObject* productGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
productGroup->AddAttribute("children", productGroupChildren);
this->MainGroupChildren->AddObject(productGroup);
-
-
+
+
this->RootObject = this->CreateObject(cmXCodeObject::PBXProject);
this->RootObject->SetComment("Project object");
group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
- this->RootObject->AddAttribute("mainGroup",
+ this->RootObject->AddAttribute("mainGroup",
this->CreateObjectReference(mainGroup));
this->RootObject->AddAttribute("buildSettings", group);
this->RootObject->AddAttribute("buildStyles", listObjs);
@@ -2655,18 +2649,18 @@ void cmGlobalXCodeGenerator
this->CreateString(pdir.c_str()));
this->RootObject->AddAttribute("projectRoot", this->CreateString(""));
}
- cmXCodeObject* configlist =
+ cmXCodeObject* configlist =
this->CreateObject(cmXCodeObject::XCConfigurationList);
cmXCodeObject* buildConfigurations =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
std::vector<cmXCodeObject*> configs;
if(this->XcodeVersion == 15)
{
- cmXCodeObject* configDebug =
+ cmXCodeObject* configDebug =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
configDebug->AddAttribute("name", this->CreateString("Debug"));
configs.push_back(configDebug);
- cmXCodeObject* configRelease =
+ cmXCodeObject* configRelease =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
configRelease->AddAttribute("name", this->CreateString("Release"));
configs.push_back(configRelease);
@@ -2676,7 +2670,7 @@ void cmGlobalXCodeGenerator
for(unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i)
{
const char* name = this->CurrentConfigurationTypes[i].c_str();
- cmXCodeObject* config =
+ cmXCodeObject* config =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
config->AddAttribute("name", this->CreateString(name));
configs.push_back(config);
@@ -2694,13 +2688,13 @@ void cmGlobalXCodeGenerator
comment += this->CurrentProject;
comment += "\"";
configlist->SetComment(comment.c_str());
- configlist->AddAttribute("defaultConfigurationIsVisible",
+ configlist->AddAttribute("defaultConfigurationIsVisible",
this->CreateString("0"));
- configlist->AddAttribute("defaultConfigurationName",
+ configlist->AddAttribute("defaultConfigurationName",
this->CreateString("Debug"));
cmXCodeObject* buildSettings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
- const char* osxArch =
+ const char* osxArch =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_ARCHITECTURES");
if(strlen(osxArch) == 0)
{
@@ -2725,11 +2719,11 @@ void cmGlobalXCodeGenerator
this->CreateString("YES"));
}
- const char* sysroot =
+ const char* sysroot =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT");
- const char* sysrootDefault =
+ const char* sysrootDefault =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
- const char* deploymentTarget =
+ const char* deploymentTarget =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
if(osxArch && sysroot)
{
@@ -2739,22 +2733,24 @@ void cmGlobalXCodeGenerator
cmSystemTools::ExpandListArgument(std::string(osxArch),
this->Architectures);
flagsUsed = true;
- buildSettings->AddAttribute("SDKROOT",
+ buildSettings->AddAttribute("SDKROOT",
this->CreateString(sysroot));
std::string archString;
- for( std::vector<std::string>::iterator i =
+ const char* sep = "";
+ for( std::vector<std::string>::iterator i =
this->Architectures.begin();
i != this->Architectures.end(); ++i)
{
+ archString += sep;
archString += *i;
- archString += " ";
+ sep = " ";
}
- buildSettings->AddAttribute("ARCHS",
+ buildSettings->AddAttribute("ARCHS",
this->CreateString(archString.c_str()));
if(!flagsUsed && sysrootDefault &&
strcmp(sysroot, sysrootDefault) != 0)
{
- buildSettings->AddAttribute("SDKROOT",
+ buildSettings->AddAttribute("SDKROOT",
this->CreateString(sysroot));
}
}
@@ -2790,7 +2786,7 @@ void cmGlobalXCodeGenerator
(*i)->AddAttribute("buildSettings", buildSettings);
}
- this->RootObject->AddAttribute("buildConfigurationList",
+ this->RootObject->AddAttribute("buildConfigurationList",
this->CreateObjectReference(configlist));
std::vector<cmXCodeObject*> targets;
@@ -2815,7 +2811,7 @@ void cmGlobalXCodeGenerator
cmXCodeObject* allTargets = this->CreateObject(cmXCodeObject::OBJECT_LIST);
for(std::vector<cmXCodeObject*>::iterator i = targets.begin();
i != targets.end(); ++i)
- {
+ {
cmXCodeObject* t = *i;
allTargets->AddObject(t);
cmXCodeObject* productRef = t->GetObject("productReference");
@@ -2828,11 +2824,11 @@ void cmGlobalXCodeGenerator
}
//----------------------------------------------------------------------------
-void
+void
cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
std::vector<cmXCodeObject*>& targets)
-{
- cmGeneratedFileStream
+{
+ cmGeneratedFileStream
makefileStream(this->CurrentXCodeHackMakefile.c_str());
if(!makefileStream)
{
@@ -2878,9 +2874,9 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
this->ConvertToRelativeForMake(tfull.c_str());
}
}
- makefileStream << "\n\n";
+ makefileStream << "\n\n";
}
- makefileStream
+ makefileStream
<< "# For each target create a dummy rule "
"so the target does not have to exist\n";
std::set<cmStdString> emitted;
@@ -2890,7 +2886,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
cmXCodeObject* target = *i;
std::map<cmStdString, cmXCodeObject::StringVec> const& deplibs =
target->GetDependLibraries();
- for(std::map<cmStdString, cmXCodeObject::StringVec>::const_iterator ci
+ for(std::map<cmStdString, cmXCodeObject::StringVec>::const_iterator ci
= deplibs.begin(); ci != deplibs.end(); ++ci)
{
for(cmXCodeObject::StringVec::const_iterator d = ci->second.begin();
@@ -2898,7 +2894,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
{
if(emitted.insert(*d).second)
{
- makefileStream <<
+ makefileStream <<
this->ConvertToRelativeForMake(d->c_str()) << ":\n";
}
}
@@ -2907,10 +2903,10 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
makefileStream << "\n\n";
// Write rules to help Xcode relink things at the right time.
- makefileStream <<
+ makefileStream <<
"# Rules to remove targets that are older than anything to which they\n"
"# link. This forces Xcode to relink the targets from scratch. It\n"
- "# does not seem to check these dependencies itself.\n";
+ "# does not seem to check these dependencies itself.\n";
for(std::vector<std::string>::const_iterator
ct = this->CurrentConfigurationTypes.begin();
ct != this->CurrentConfigurationTypes.end(); ++ct)
@@ -2931,7 +2927,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
{
// Create a rule for this target.
std::string tfull = t->GetFullPath(configName);
- makefileStream << this->ConvertToRelativeForMake(tfull.c_str())
+ makefileStream << this->ConvertToRelativeForMake(tfull.c_str())
<< ":";
// List dependencies if any exist.
@@ -2943,7 +2939,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
for(std::vector<cmStdString>::const_iterator d = deplibs.begin();
d != deplibs.end(); ++d)
{
- makefileStream << "\\\n\t" <<
+ makefileStream << "\\\n\t" <<
this->ConvertToRelativeForMake(d->c_str());
}
}
@@ -2965,7 +2961,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
universal += "/";
universal += t->GetName();
universal += ".build/Objects-normal/";
- for( std::vector<std::string>::iterator arch =
+ for( std::vector<std::string>::iterator arch =
this->Architectures.begin();
arch != this->Architectures.end(); ++arch)
{
@@ -2974,7 +2970,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
universalFile += "/";
universalFile += t->GetFullName(configName);
makefileStream << "\t/bin/rm -f "
- <<
+ <<
this->ConvertToRelativeForMake(universalFile.c_str())
<< "\n";
}
@@ -2988,7 +2984,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
//----------------------------------------------------------------------------
void
cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
- std::vector<cmLocalGenerator*>&
+ std::vector<cmLocalGenerator*>&
generators)
{
if(generators.size() == 0)
@@ -3028,7 +3024,7 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
}
//----------------------------------------------------------------------------
-void
+void
cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
cmLocalGenerator* ,
std::vector<cmLocalGenerator*>& )
@@ -3086,7 +3082,7 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake(const char* p)
}
else
{
- std::string ret =
+ std::string ret =
this->CurrentLocalGenerator->
ConvertToRelativePath(this->CurrentOutputDirectoryComponents, p);
return cmSystemTools::ConvertToOutputPath(ret.c_str());
@@ -3102,7 +3098,7 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForXCode(const char* p)
}
else
{
- std::string ret =
+ std::string ret =
this->CurrentLocalGenerator->
ConvertToRelativePath(this->ProjectOutputDirectoryComponents, p);
return cmSystemTools::ConvertToOutputPath(ret.c_str());
@@ -3142,7 +3138,7 @@ std::string cmGlobalXCodeGenerator::XCodeEscapePath(const char* p)
//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator::
GetTargetObjectFileDirectories(cmTarget* target,
- std::vector<std::string>&
+ std::vector<std::string>&
dirs)
{
std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory();
@@ -3156,7 +3152,7 @@ GetTargetObjectFileDirectories(cmTarget* target,
std::string dirsave = dir;
if(this->Architectures.size())
{
- for(std::vector<std::string>::iterator i = this->Architectures.begin();
+ for(std::vector<std::string>::iterator i = this->Architectures.begin();
i != this->Architectures.end(); ++i)
{
dir += *i;
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx
index 9d5e416..d7505dc 100644
--- a/Source/cmInstallGenerator.cxx
+++ b/Source/cmInstallGenerator.cxx
@@ -67,8 +67,11 @@ void cmInstallGenerator
for(std::vector<std::string>::const_iterator fi = files.begin();
fi != files.end(); ++fi)
{
- if (fi!=files.begin()) os << ";";
- os << dest << cmSystemTools::ConvertToOutputPath("/");
+ if (fi!=files.begin())
+ {
+ os << ";";
+ }
+ os << dest << "/";
if (rename && *rename)
{
os << rename;
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index bac0223..5bffd52 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -278,16 +278,8 @@ void cmLocalGenerator::GenerateTestFiles()
// Compute the set of configurations.
std::vector<std::string> configurationTypes;
- if(const char* types =
- this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
- {
- cmSystemTools::ExpandListArgument(types, configurationTypes);
- }
- const char* config = 0;
- if(configurationTypes.empty())
- {
- config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
- }
+ const char* config =
+ this->Makefile->GetConfigurations(configurationTypes, false);
std::string file = this->Makefile->GetStartOutputDirectory();
file += "/";
@@ -383,16 +375,8 @@ void cmLocalGenerator::GenerateInstallRules()
// Compute the set of configurations.
std::vector<std::string> configurationTypes;
- if(const char* types =
- this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
- {
- cmSystemTools::ExpandListArgument(types, configurationTypes);
- }
- const char* config = 0;
- if(configurationTypes.empty())
- {
- config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
- }
+ const char* config =
+ this->Makefile->GetConfigurations(configurationTypes, false);
// Choose a default install configuration.
const char* default_config = config;
@@ -546,19 +530,7 @@ void cmLocalGenerator::GenerateTargetManifest()
{
// Collect the set of configuration types.
std::vector<std::string> configNames;
- if(const char* configurationTypes =
- this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
- {
- cmSystemTools::ExpandListArgument(configurationTypes, configNames);
- }
- else if(const char* buildType =
- this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"))
- {
- if(*buildType)
- {
- configNames.push_back(buildType);
- }
- }
+ this->Makefile->GetConfigurations(configNames);
// Add our targets to the manifest for each configuration.
cmTargets& targets = this->Makefile->GetTargets();
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 004d19a..f04d0a0 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1062,9 +1062,16 @@ cmLocalUnixMakefileGenerator3
}
}
}
- if (useCall && launcher.empty())
+ if (launcher.empty())
{
- cmd = "call " + cmd;
+ if (useCall)
+ {
+ cmd = "call " + cmd;
+ }
+ else if (this->NMake && cmd[0]=='"')
+ {
+ cmd = "echo >nul && " + cmd;
+ }
}
commands1.push_back(cmd);
}
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 539816d..eb4e4a4 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1187,7 +1187,8 @@ void cmLocalVisualStudio6Generator
extraLinkOptionsMinSizeRel += targetLinkFlags;
}
- if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
+ if(const char* targetLinkFlags =
+ target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
{
extraLinkOptionsRelWithDebInfo += " ";
extraLinkOptionsRelWithDebInfo += targetLinkFlags;
@@ -1304,7 +1305,8 @@ void cmLocalVisualStudio6Generator
optionsRelease);
this->ComputeLinkOptions(target, "MinSizeRel", extraLinkOptionsMinSizeRel,
optionsMinSizeRel);
- this->ComputeLinkOptions(target, "RelWithDebInfo", extraLinkOptionsRelWithDebInfo,
+ this->ComputeLinkOptions(target, "RelWithDebInfo",
+ extraLinkOptionsRelWithDebInfo,
optionsRelWithDebInfo);
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8eece6b..56e0ed9 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -353,7 +353,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
// No error.
return result;
}
-
+
std::string name = lff.Name;
// Place this call on the call stack.
@@ -377,7 +377,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
cmOStringStream msg;
msg << lff.FilePath << "(" << lff.Line << "): ";
msg << lff.Name << "(";
- for(std::vector<cmListFileArgument>::const_iterator i =
+ for(std::vector<cmListFileArgument>::const_iterator i =
lff.Arguments.begin(); i != lff.Arguments.end(); ++i)
{
msg << i->Value;
@@ -610,6 +610,8 @@ bool cmMakefile::ReadListFile(const char* filename_in,
}
this->AddDefinition("CMAKE_CURRENT_LIST_FILE", filenametoread);
+ this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
+ cmSystemTools::GetFilenamePath(filenametoread).c_str());
// try to see if the list file is the top most
// list file for a project, and if it is, then it
@@ -643,6 +645,8 @@ bool cmMakefile::ReadListFile(const char* filename_in,
}
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
+ this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
+ cmSystemTools::GetFilenamePath(currentFile).c_str());
return false;
}
// add this list file to the list of dependencies
@@ -683,6 +687,8 @@ bool cmMakefile::ReadListFile(const char* filename_in,
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
+ this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
+ cmSystemTools::GetFilenamePath(currentFile).c_str());
// pop the listfile off the stack
this->ListFileStack.pop_back();
@@ -894,6 +900,14 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
// Construct a rule file associated with the first output produced.
std::string outName = outputs[0];
outName += ".rule";
+ const char* dir =
+ this->LocalGenerator->GetGlobalGenerator()->
+ GetCMakeCFGInitDirectory();
+ if(dir && dir[0] == '$')
+ {
+ cmSystemTools::ReplaceString(outName, dir,
+ cmake::GetCMakeFilesDirectory());
+ }
// Check if the rule file already exists.
file = this->GetSource(outName.c_str());
if(file && file->GetCustomCommand() && !replace)
@@ -1436,16 +1450,7 @@ void cmMakefile::InitializeFromParent()
this->SetProperty("COMPILE_DEFINITIONS",
parent->GetProperty("COMPILE_DEFINITIONS"));
std::vector<std::string> configs;
- if(const char* configTypes =
- this->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
- {
- cmSystemTools::ExpandListArgument(configTypes, configs);
- }
- else if(const char* buildType =
- this->GetDefinition("CMAKE_BUILD_TYPE"))
- {
- configs.push_back(buildType);
- }
+ this->GetConfigurations(configs);
for(std::vector<std::string>::const_iterator ci = configs.begin();
ci != configs.end(); ++ci)
{
@@ -1743,8 +1748,8 @@ void cmMakefile::AddLibrary(const char* lname, cmTarget::TargetType type,
bool excludeFromAll)
{
// wrong type ? default to STATIC
- if ( (type != cmTarget::STATIC_LIBRARY)
- && (type != cmTarget::SHARED_LIBRARY)
+ if ( (type != cmTarget::STATIC_LIBRARY)
+ && (type != cmTarget::SHARED_LIBRARY)
&& (type != cmTarget::MODULE_LIBRARY))
{
type = cmTarget::STATIC_LIBRARY;
@@ -2326,14 +2331,14 @@ void cmMakefile::AddDefaultDefinitions()
{
/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set.
With CMake must separate between target and host platform. In most cases
- the tests for WIN32, UNIX and APPLE will be for the target system, so an
+ the tests for WIN32, UNIX and APPLE will be for the target system, so an
additional set of variables for the host system is required ->
CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE.
- WIN32, UNIX and APPLE are now set in the platform files in
+ WIN32, UNIX and APPLE are now set in the platform files in
Modules/Platforms/.
To keep cmake scripts (-P) and custom language and compiler modules
working, these variables are still also set here in this place, but they
- will be reset in CMakeSystemSpecificInformation.cmake before the platform
+ will be reset in CMakeSystemSpecificInformation.cmake before the platform
files are executed. */
#if defined(_WIN32) || defined(__CYGWIN__)
this->AddDefinition("WIN32", "1");
@@ -2367,6 +2372,31 @@ void cmMakefile::AddDefaultDefinitions()
cmake::GetCMakeFilesDirectory());
}
+//----------------------------------------------------------------------------
+const char*
+cmMakefile::GetConfigurations(std::vector<std::string>& configs,
+ bool single) const
+{
+ if(this->LocalGenerator->GetGlobalGenerator()->IsMultiConfig())
+ {
+ if(const char* configTypes =
+ this->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
+ {
+ cmSystemTools::ExpandListArgument(configTypes, configs);
+ }
+ return 0;
+ }
+ else
+ {
+ const char* buildType = this->GetDefinition("CMAKE_BUILD_TYPE");
+ if(single && buildType && *buildType)
+ {
+ configs.push_back(buildType);
+ }
+ return buildType;
+ }
+}
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
/**
* Find a source group whose regular expression matches the filename
@@ -2619,13 +2649,13 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName,
}
}
-void cmMakefile::EnableLanguage(std::vector<std::string> const & lang,
+void cmMakefile::EnableLanguage(std::vector<std::string> const & lang,
bool optional)
{
this->AddDefinition("CMAKE_CFG_INTDIR",
this->LocalGenerator->GetGlobalGenerator()
->GetCMakeCFGInitDirectory());
- this->LocalGenerator->GetGlobalGenerator()->EnableLanguage(lang, this,
+ this->LocalGenerator->GetGlobalGenerator()->EnableLanguage(lang, this,
optional);
}
@@ -2701,7 +2731,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
{
cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS",
"FALSE", "", cmCacheManager::INTERNAL);
- }
+ }
if (cm.Configure() != 0)
{
cmSystemTools::Error(
@@ -2989,7 +3019,7 @@ void cmMakefile::SetProperty(const char* prop, const char* value)
{
return;
}
-
+
// handle special props
std::string propname = prop;
if ( propname == "INCLUDE_DIRECTORIES" )
@@ -3013,7 +3043,7 @@ void cmMakefile::SetProperty(const char* prop, const char* value)
this->SetLinkDirectories(varArgsExpanded);
return;
}
-
+
if ( propname == "INCLUDE_REGULAR_EXPRESSION" )
{
this->SetIncludeRegularExpression(value);
@@ -3023,7 +3053,7 @@ void cmMakefile::SetProperty(const char* prop, const char* value)
if ( propname == "ADDITIONAL_MAKE_CLEAN_FILES" )
{
// This property is not inherrited
- if ( strcmp(this->GetCurrentDirectory(),
+ if ( strcmp(this->GetCurrentDirectory(),
this->GetStartDirectory()) != 0 )
{
return;
@@ -3144,14 +3174,14 @@ const char *cmMakefile::GetProperty(const char* prop,
return output.c_str();
}
else if (!strcmp("DEFINITIONS",prop))
- {
+ {
output += this->DefineFlagsOrig;
return output.c_str();
}
else if (!strcmp("INCLUDE_DIRECTORIES",prop) )
{
cmOStringStream str;
- for (std::vector<std::string>::const_iterator
+ for (std::vector<std::string>::const_iterator
it = this->GetIncludeDirectories().begin();
it != this->GetIncludeDirectories().end();
++ it )
@@ -3168,7 +3198,7 @@ const char *cmMakefile::GetProperty(const char* prop,
else if (!strcmp("LINK_DIRECTORIES",prop))
{
cmOStringStream str;
- for (std::vector<std::string>::const_iterator
+ for (std::vector<std::string>::const_iterator
it = this->GetLinkDirectories().begin();
it != this->GetLinkDirectories().end();
++ it )
@@ -3582,7 +3612,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
msg = e.str();
return false;
}
- else
+ else
{
// target names must be globally unique
switch (this->GetPolicyStatus(cmPolicies::CMP0002))
@@ -3601,7 +3631,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
case cmPolicies::NEW:
break;
}
-
+
// The conflict is with a non-imported target.
// Allow this if the user has requested support.
cmake* cm =
@@ -3750,7 +3780,7 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id)
return this->GetPolicies()->GetPolicyStatus(id);
}
-bool cmMakefile::SetPolicy(const char *id,
+bool cmMakefile::SetPolicy(const char *id,
cmPolicies::PolicyStatus status)
{
cmPolicies::PolicyID pid;
@@ -3880,7 +3910,7 @@ bool cmMakefile::SetPolicyVersion(const char *version)
}
cmPolicies *cmMakefile::GetPolicies()
-{
+{
if (!this->GetCMakeInstance())
{
return 0;
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 4fae7ee..8b8a3f8 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -309,7 +309,11 @@ public:
{
return this->ProjectName.c_str();
}
-
+
+ /** Get the configurations to be generated. */
+ const char* GetConfigurations(std::vector<std::string>& configs,
+ bool single = true) const;
+
/**
* Set the name of the library.
*/
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 93c981a..4426241 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -82,34 +82,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
{
std::vector<std::string> commands;
- std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath();
- std::string objTarget;
-
// Build list of dependencies.
std::vector<std::string> depends;
- for(std::vector<std::string>::const_iterator obj = this->Objects.begin();
- obj != this->Objects.end(); ++obj)
- {
- objTarget = relPath;
- objTarget += *obj;
- depends.push_back(objTarget);
- }
-
- // Add dependencies on targets that must be built first.
- this->AppendTargetDepends(depends);
-
- // Add a dependency on the rule file itself.
- this->LocalGenerator->AppendRuleDepend(depends,
- this->BuildFileNameFull.c_str());
-
- for(std::vector<std::string>::const_iterator obj =
- this->ExternalObjects.begin();
- obj != this->ExternalObjects.end(); ++obj)
- {
- depends.push_back(*obj);
- }
-
- // from here up is the same for exe or lib
+ this->AppendLinkDepends(depends);
// Get the name of the executable to generate.
std::string targetName;
@@ -345,6 +320,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
vars.CMTarget = this->Target;
vars.Language = linkLanguage;
vars.Objects = buildObjs.c_str();
+ std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
+ objdir += this->Target->GetName();
+ objdir += ".dir";
+ objdir = this->Convert(objdir.c_str(),
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::SHELL);
+ vars.ObjectDir = objdir.c_str();
vars.Target = targetOutPathReal.c_str();
vars.TargetPDB = targetOutPathPDB.c_str();
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index dff91fe..049a338 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -308,33 +308,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
// code duplication.
std::vector<std::string> commands;
- std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath();
- std::string objTarget;
-
// Build list of dependencies.
std::vector<std::string> depends;
- for(std::vector<std::string>::const_iterator obj = this->Objects.begin();
- obj != this->Objects.end(); ++obj)
- {
- objTarget = relPath;
- objTarget += *obj;
- depends.push_back(objTarget);
- }
+ this->AppendLinkDepends(depends);
- // Add dependencies on targets that must be built first.
- this->AppendTargetDepends(depends);
-
- // Add a dependency on the rule file itself.
- this->LocalGenerator->AppendRuleDepend(depends,
- this->BuildFileNameFull.c_str());
-
- for(std::vector<std::string>::const_iterator obj
- = this->ExternalObjects.begin();
- obj != this->ExternalObjects.end(); ++obj)
- {
- depends.push_back(*obj);
- }
-
// Get the language to use for linking this library.
const char* linkLanguage =
this->Target->GetLinkerLanguage(this->ConfigName);
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index d5d6585..9153f3a 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1507,6 +1507,44 @@ void cmMakefileTargetGenerator
//----------------------------------------------------------------------------
void cmMakefileTargetGenerator
+::AppendLinkDepends(std::vector<std::string>& depends)
+{
+ // Add dependencies on the compiled object files.
+ std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath();
+ std::string objTarget;
+ for(std::vector<std::string>::const_iterator obj = this->Objects.begin();
+ obj != this->Objects.end(); ++obj)
+ {
+ objTarget = relPath;
+ objTarget += *obj;
+ depends.push_back(objTarget);
+ }
+
+ // Add dependencies on targets that must be built first.
+ this->AppendTargetDepends(depends);
+
+ // Add a dependency on the rule file itself.
+ this->LocalGenerator->AppendRuleDepend(depends,
+ this->BuildFileNameFull.c_str());
+
+ // Add dependencies on the external object files.
+ for(std::vector<std::string>::const_iterator obj
+ = this->ExternalObjects.begin();
+ obj != this->ExternalObjects.end(); ++obj)
+ {
+ depends.push_back(*obj);
+ }
+
+ // Add user-specified dependencies.
+ if(const char* linkDepends =
+ this->Target->GetProperty("LINK_DEPENDS"))
+ {
+ cmSystemTools::ExpandListArgument(linkDepends, depends);
+ }
+}
+
+//----------------------------------------------------------------------------
+void cmMakefileTargetGenerator
::CloseFileStreams()
{
delete this->BuildFileStream;
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index 4ee2b39..c9aede2 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -115,6 +115,9 @@ protected:
// append intertarget dependencies
void AppendTargetDepends(std::vector<std::string>& depends);
+ // Append link rule dependencies (objects, etc.).
+ void AppendLinkDepends(std::vector<std::string>& depends);
+
/** In order to support parallel builds for custom commands with
multiple outputs the outputs are given a serial order, and only
the first output actually has the build rule. Other outputs
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index bc52d7f..b793cd5 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -101,11 +101,11 @@ cmSourceFileLocation const& cmSourceFile::GetLocation() const
}
//----------------------------------------------------------------------------
-std::string const& cmSourceFile::GetFullPath()
+std::string const& cmSourceFile::GetFullPath(std::string* error)
{
if(this->FullPath.empty())
{
- if(this->FindFullPath())
+ if(this->FindFullPath(error))
{
this->CheckExtension();
}
@@ -120,7 +120,7 @@ std::string const& cmSourceFile::GetFullPath() const
}
//----------------------------------------------------------------------------
-bool cmSourceFile::FindFullPath()
+bool cmSourceFile::FindFullPath(std::string* error)
{
// If thie method has already failed once do not try again.
if(this->FindFullPathFailed)
@@ -199,7 +199,14 @@ bool cmSourceFile::FindFullPath()
{
e << " ." << *ext;
}
- this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str());
+ if(error)
+ {
+ *error = e.str();
+ }
+ else
+ {
+ this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str());
+ }
this->FindFullPathFailed = true;
return false;
}
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index 937e4b7..2dc8488 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -60,7 +60,7 @@ public:
* horrible interface, but is necessary for backwards
* compatibility).
*/
- std::string const& GetFullPath();
+ std::string const& GetFullPath(std::string* error = 0);
std::string const& GetFullPath() const;
/**
@@ -108,7 +108,7 @@ private:
std::string FullPath;
bool FindFullPathFailed;
- bool FindFullPath();
+ bool FindFullPath(std::string* error);
bool TryFullPath(const char* tryPath, const char* ext);
void CheckExtension();
void CheckLanguage(std::string const& ext);
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 8378922..7bc89a4 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1176,7 +1176,8 @@ bool cmSystemTools::ComputeFileMD5(const char* source, char* md5out)
// Should be efficient enough on most system:
const int bufferSize = 4096;
char buffer[bufferSize];
- unsigned char const* buffer_uc = reinterpret_cast<unsigned char const*>(buffer);
+ unsigned char const* buffer_uc =
+ reinterpret_cast<unsigned char const*>(buffer);
// This copy loop is very sensitive on certain platforms with
// slightly broken stream libraries (like HPUX). Normally, it is
// incorrect to not check the error condition on the fin.read()
@@ -1931,12 +1932,20 @@ bool extract_tar(const char* outFileName, bool verbose,
}
if(extract)
{
+ r = archive_write_disk_set_options(ext, ARCHIVE_EXTRACT_TIME);
+ if (r != ARCHIVE_OK)
+ {
+ cmSystemTools::Error(
+ "Problem with archive_write_disk_set_options(): ",
+ archive_error_string(ext));
+ }
+
r = archive_write_header(ext, entry);
if (r != ARCHIVE_OK)
{
cmSystemTools::Error("Problem with archive_write_header(): ",
- archive_error_string(a));
- cmSystemTools::Error("Curren file:",
+ archive_error_string(ext));
+ cmSystemTools::Error("Current file:",
archive_entry_pathname(entry));
}
else
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 9611912..ca61b1f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -393,6 +393,24 @@ void cmTarget::DefineProperties(cmake *cm)
"from which the target is imported.");
cm->DefineProperty
+ ("IMPORTED_NO_SONAME", cmProperty::TARGET,
+ "Specifies that an IMPORTED shared library target has no \"soname\". ",
+ "Set this property to true for an imported shared library file that "
+ "has no \"soname\" field. "
+ "CMake may adjust generated link commands for some platforms to prevent "
+ "the linker from using the path to the library in place of its missing "
+ "soname. "
+ "Ignored for non-imported targets.");
+
+ cm->DefineProperty
+ ("IMPORTED_NO_SONAME_<CONFIG>", cmProperty::TARGET,
+ "Per-configuration version of IMPORTED_NO_SONAME property.",
+ "This property is used when loading settings for the <CONFIG> "
+ "configuration of an imported target. "
+ "Configuration names correspond to those provided by the project "
+ "from which the target is imported.");
+
+ cm->DefineProperty
("EXCLUDE_FROM_ALL", cmProperty::TARGET,
"Exclude the target from the all target.",
"A property on a target that indicates if the target is excluded "
@@ -514,6 +532,18 @@ void cmTarget::DefineProperties(cmake *cm)
"configurations explicitly.");
cm->DefineProperty
+ ("LINK_DEPENDS", cmProperty::TARGET,
+ "Additional files on which a target binary depends for linking.",
+ "Specifies a semicolon-separated list of full-paths to files on which "
+ "the link rule for this target depends. "
+ "The target binary will be linked if any of the named files is newer "
+ "than it."
+ "\n"
+ "This property is ignored by non-Makefile generators. "
+ "It is intended to specify dependencies on \"linker scripts\" for "
+ "custom Makefile link rules.");
+
+ cm->DefineProperty
("LINK_INTERFACE_LIBRARIES", cmProperty::TARGET,
"List public interface libraries for a shared library or executable.",
"By default linking to a shared library target transitively "
@@ -816,12 +846,16 @@ void cmTarget::DefineProperties(cmake *cm)
"executable with the TARGET_LINK_LIBRARIES command. "
"On all platforms a target-level dependency on the executable is "
"created for targets that link to it. "
- "For non-DLL platforms the link rule is simply ignored since "
- "the dynamic loader will automatically bind symbols when the "
- "module is loaded. "
"For DLL platforms an import library will be created for the "
"exported symbols and then used for linking. "
- "All Windows-based systems including Cygwin are DLL platforms.");
+ "All Windows-based systems including Cygwin are DLL platforms. "
+ "For non-DLL platforms that require all symbols to be resolved at "
+ "link time, such as Mac OS X, the module will \"link\" to the "
+ "executable using a flag like \"-bundle_loader\". "
+ "For other non-DLL platforms the link rule is simply ignored since "
+ "the dynamic loader will automatically bind symbols when the "
+ "module is loaded. "
+ );
cm->DefineProperty
("Fortran_MODULE_DIRECTORY", cmProperty::TARGET,
@@ -1040,18 +1074,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
// Collect the set of configuration types.
std::vector<std::string> configNames;
- if(const char* configurationTypes =
- mf->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
- {
- cmSystemTools::ExpandListArgument(configurationTypes, configNames);
- }
- else if(const char* buildType = mf->GetDefinition("CMAKE_BUILD_TYPE"))
- {
- if(*buildType)
- {
- configNames.push_back(buildType);
- }
- }
+ mf->GetConfigurations(configNames);
// Setup per-configuration property default values.
const char* configProps[] = {
@@ -1439,8 +1462,15 @@ bool cmTarget::FindSourceFiles()
si = this->SourceFiles.begin();
si != this->SourceFiles.end(); ++si)
{
- if((*si)->GetFullPath().empty())
+ std::string e;
+ if((*si)->GetFullPath(&e).empty())
{
+ if(!e.empty())
+ {
+ cmake* cm = this->Makefile->GetCMakeInstance();
+ cm->IssueMessage(cmake::FATAL_ERROR, e,
+ this->GetBacktrace());
+ }
return false;
}
}
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 70680ad..524be8b 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -32,6 +32,30 @@ static std::string cmVS10EscapeXML(std::string arg)
return arg;
}
+static std::string cmVS10EscapeComment(std::string comment)
+{
+ // MSBuild takes the CDATA of a <Message></Message> element and just
+ // does "echo $CDATA" with no escapes. We must encode the string.
+ // http://technet.microsoft.com/en-us/library/cc772462%28WS.10%29.aspx
+ std::string echoable;
+ for(std::string::iterator c = comment.begin(); c != comment.end(); ++c)
+ {
+ switch (*c)
+ {
+ case '\r': break;
+ case '\n': echoable += '\t'; break;
+ case '"': /* no break */
+ case '|': /* no break */
+ case '&': /* no break */
+ case '<': /* no break */
+ case '>': /* no break */
+ case '^': echoable += '^'; /* no break */
+ default: echoable += *c; break;
+ }
+ }
+ return echoable;
+}
+
cmVisualStudio10TargetGenerator::
cmVisualStudio10TargetGenerator(cmTarget* target,
cmGlobalVisualStudio10Generator* gg)
@@ -125,7 +149,10 @@ void cmVisualStudio10TargetGenerator::Generate()
".vcxproj");
if(this->Target->GetType() <= cmTarget::MODULE_LIBRARY)
{
- this->ComputeClOptions();
+ if(!this->ComputeClOptions())
+ {
+ return;
+ }
}
cmMakefile* mf = this->Target->GetMakefile();
std::string path = mf->GetStartOutputDirectory();
@@ -155,6 +182,13 @@ void cmVisualStudio10TargetGenerator::Generate()
this->WriteString("<Keyword>Win32Proj</Keyword>\n", 2);
this->WriteString("<Platform>", 2);
(*this->BuildFileStream) << this->Platform << "</Platform>\n";
+ const char* projLabel = this->Target->GetProperty("PROJECT_LABEL");
+ if(!projLabel)
+ {
+ projLabel = this->Name.c_str();
+ }
+ this->WriteString("<ProjectName>", 2);
+ (*this->BuildFileStream) << projLabel << "</ProjectName>\n";
this->WriteString("</PropertyGroup>\n", 1);
this->WriteString("<Import Project="
"\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n",
@@ -318,6 +352,7 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
}
cmLocalVisualStudio7Generator* lg = this->LocalGenerator;
std::string comment = lg->ConstructComment(command);
+ comment = cmVS10EscapeComment(comment);
std::vector<std::string> *configs =
static_cast<cmGlobalVisualStudio7Generator *>
(this->GlobalGenerator)->GetConfigurations();
@@ -340,7 +375,7 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
command.GetEscapeAllowMakeVars())
);
this->WritePlatformConfigTag("Message",i->c_str(), 3);
- (*this->BuildFileStream ) << comment << "</Message>\n";
+ (*this->BuildFileStream ) << cmVS10EscapeXML(comment) << "</Message>\n";
this->WritePlatformConfigTag("Command", i->c_str(), 3);
(*this->BuildFileStream ) << script << "</Command>\n";
this->WritePlatformConfigTag("AdditionalInputs", i->c_str(), 3);
@@ -760,7 +795,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
hasFlags = true;
this->WriteString("<ObjectFileName>", 3);
(*this->BuildFileStream )
- << "$(Configuration)/" << objectName << "</ObjectFileName>\n";
+ << "$(IntDir)/" << objectName << "</ObjectFileName>\n";
}
std::vector<std::string> *configs =
static_cast<cmGlobalVisualStudio7Generator *>
@@ -807,10 +842,12 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
{
- if(this->Target->GetType() > cmTarget::MODULE_LIBRARY)
+ cmTarget::TargetType ttype = this->Target->GetType();
+ if(ttype > cmTarget::GLOBAL_TARGET)
{
return;
}
+
this->WriteString("<PropertyGroup>\n", 2);
this->WriteString("<_ProjectFileVersion>10.0.20506.1"
"</_ProjectFileVersion>\n", 3);
@@ -820,36 +857,50 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
for(std::vector<std::string>::iterator config = configs->begin();
config != configs->end(); ++config)
{
- std::string targetNameFull =
- this->Target->GetFullName(config->c_str());
- std::string intermediateDir = this->LocalGenerator->
- GetTargetDirectory(*this->Target);
- intermediateDir += "/";
- intermediateDir += *config;
- intermediateDir += "/";
- this->ConvertToWindowsSlash(intermediateDir);
- std::string outDir = this->Target->GetDirectory(config->c_str());
- this->ConvertToWindowsSlash(outDir);
- this->WritePlatformConfigTag("OutDir", config->c_str(), 3);
- *this->BuildFileStream << outDir
- << "\\"
- << "</OutDir>\n";
- this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
- *this->BuildFileStream << intermediateDir
- << "</IntDir>\n";
- this->WritePlatformConfigTag("TargetName", config->c_str(), 3);
- *this->BuildFileStream << cmSystemTools::GetFilenameWithoutExtension(
- targetNameFull.c_str())
- << "</TargetName>\n";
-
- this->WritePlatformConfigTag("TargetExt", config->c_str(), 3);
- *this->BuildFileStream << cmSystemTools::GetFilenameLastExtension(
- targetNameFull.c_str())
- << "</TargetExt>\n";
- this->OutputLinkIncremental(*config);
+ if(ttype >= cmTarget::UTILITY)
+ {
+ this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
+ *this->BuildFileStream
+ << "$(Platform)\\$(Configuration)\\$(ProjectName)\\"
+ << "</IntDir>\n";
+ }
+ else
+ {
+ std::string targetNameFull =
+ this->Target->GetFullName(config->c_str());
+ std::string intermediateDir = this->LocalGenerator->
+ GetTargetDirectory(*this->Target);
+ intermediateDir += "/";
+ intermediateDir += *config;
+ intermediateDir += "/";
+ this->ConvertToWindowsSlash(intermediateDir);
+ std::string outDir = this->Target->GetDirectory(config->c_str());
+ this->ConvertToWindowsSlash(outDir);
+
+ this->WritePlatformConfigTag("OutDir", config->c_str(), 3);
+ *this->BuildFileStream << outDir
+ << "\\"
+ << "</OutDir>\n";
+
+ this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
+ *this->BuildFileStream << intermediateDir
+ << "</IntDir>\n";
+
+ this->WritePlatformConfigTag("TargetName", config->c_str(), 3);
+ *this->BuildFileStream
+ << cmSystemTools::GetFilenameWithoutLastExtension(
+ targetNameFull.c_str())
+ << "</TargetName>\n";
+
+ this->WritePlatformConfigTag("TargetExt", config->c_str(), 3);
+ *this->BuildFileStream
+ << cmSystemTools::GetFilenameLastExtension(targetNameFull.c_str())
+ << "</TargetExt>\n";
+
+ this->OutputLinkIncremental(*config);
+ }
}
this->WriteString("</PropertyGroup>\n", 2);
-
}
@@ -926,19 +977,23 @@ OutputLinkIncremental(std::string const& configName)
}
//----------------------------------------------------------------------------
-void cmVisualStudio10TargetGenerator::ComputeClOptions()
+bool cmVisualStudio10TargetGenerator::ComputeClOptions()
{
std::vector<std::string> const* configs =
this->GlobalGenerator->GetConfigurations();
for(std::vector<std::string>::const_iterator i = configs->begin();
i != configs->end(); ++i)
{
- this->ComputeClOptions(*i);
+ if(!this->ComputeClOptions(*i))
+ {
+ return false;
+ }
}
+ return true;
}
//----------------------------------------------------------------------------
-void cmVisualStudio10TargetGenerator::ComputeClOptions(
+bool cmVisualStudio10TargetGenerator::ComputeClOptions(
std::string const& configName)
{
// much of this was copied from here:
@@ -961,7 +1016,7 @@ void cmVisualStudio10TargetGenerator::ComputeClOptions(
cmSystemTools::Error
("CMake can not determine linker language for target:",
this->Name.c_str());
- return;
+ return false;
}
if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0
|| strcmp(linkLanguage, "Fortran") == 0)
@@ -1021,6 +1076,7 @@ void cmVisualStudio10TargetGenerator::ComputeClOptions(
}
this->ClOptions[configName] = pOptions.release();
+ return true;
}
//----------------------------------------------------------------------------
@@ -1410,8 +1466,9 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
command.GetEscapeAllowMakeVars())
);
}
+ comment = cmVS10EscapeComment(comment);
this->WriteString("<Message>",3);
- (*this->BuildFileStream ) << comment << "</Message>\n";
+ (*this->BuildFileStream ) << cmVS10EscapeXML(comment) << "</Message>\n";
this->WriteString("<Command>", 3);
(*this->BuildFileStream ) << script;
(*this->BuildFileStream ) << "</Command>" << "\n";
@@ -1422,10 +1479,13 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
void cmVisualStudio10TargetGenerator::WriteProjectReferences()
{
- cmGlobalGenerator::TargetDependSet const& depends
+ cmGlobalGenerator::TargetDependSet const& unordered
= this->GlobalGenerator->GetTargetDirectDepends(*this->Target);
+ typedef cmGlobalVisualStudioGenerator::OrderedTargetDependSet
+ OrderedTargetDependSet;
+ OrderedTargetDependSet depends(unordered);
this->WriteString("<ItemGroup>\n", 1);
- for( cmGlobalGenerator::TargetDependSet::const_iterator i = depends.begin();
+ for( OrderedTargetDependSet::const_iterator i = depends.begin();
i != depends.end(); ++i)
{
cmTarget* dt = *i;
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 64b2361..c3c27f4 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -50,8 +50,8 @@ private:
void WriteObjSources();
void WritePathAndIncrementalLinkOptions();
void WriteItemDefinitionGroups();
- void ComputeClOptions();
- void ComputeClOptions(std::string const& configName);
+ bool ComputeClOptions();
+ bool ComputeClOptions(std::string const& configName);
void WriteClOptions(std::string const& config,
std::vector<std::string> const & includes);
void WriteRCOptions(std::string const& config,
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 07c7b8c..5920470 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -236,7 +236,7 @@ void cmXCodeObject::PrintString(std::ostream& os) const
// considered special by the Xcode project file parser.
bool needQuote =
(this->String.empty() ||
- this->String.find_first_of(" <>.+-=@") != this->String.npos);
+ this->String.find_first_of(" <>.+-=@$") != this->String.npos);
const char* quote = needQuote? "\"" : "";
// Print the string, quoted and escaped as necessary.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e6c7bb0..2ebd165 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1574,6 +1574,24 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
cmSystemTools::Error("Problem extracting tar: ", outFile.c_str());
return 1;
}
+#ifdef WIN32
+ // OK, on windows 7 after we untar some files,
+ // sometimes we can not rename the directory after
+ // the untar is done. This breaks the external project
+ // untar and rename code. So, by default we will wait
+ // 1/10th of a second after the untar. If CMAKE_UNTAR_DELAY
+ // is set in the env, its value will be used instead of 100.
+ int delay = 100;
+ const char* delayVar = cmSystemTools::GetEnv("CMAKE_UNTAR_DELAY");
+ if(delayVar)
+ {
+ delay = atoi(delayVar);
+ }
+ if(delay)
+ {
+ cmSystemTools::Delay(delay);
+ }
+#endif
}
return 0;
}
@@ -3486,7 +3504,7 @@ void cmake::DefineProperties(cmake *cm)
cm->DefineProperty
("USE_FOLDERS", cmProperty::GLOBAL,
"Use the FOLDER target property to organize targets into folders.",
- "If not set, CMake treats this property as ON by default. "
+ "If not set, CMake treats this property as OFF by default. "
"CMake generators that are capable of organizing into a "
"hierarchy of folders use the values of the FOLDER target "
"property to name those folders. See also the documentation "
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 936c1f7..4818ce9 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -3304,28 +3304,37 @@ bool SystemInformationImplementation::QueryOSInformation()
{
case VER_PLATFORM_WIN32_NT:
// Test for the product.
- if (osvi.dwMajorVersion <= 4)
+ if (osvi.dwMajorVersion <= 4)
{
this->OSRelease = "NT";
}
- if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
+ if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
{
this->OSRelease = "2000";
}
- if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1)
+ if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1)
+ {
+ this->OSRelease = "XP";
+ }
+ // XP Professional x64
+ if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2)
{
this->OSRelease = "XP";
}
#ifdef VER_NT_WORKSTATION
// Test for product type.
- if (bOsVersionInfoEx)
+ if (bOsVersionInfoEx)
{
- if (osvi.wProductType == VER_NT_WORKSTATION)
+ if (osvi.wProductType == VER_NT_WORKSTATION)
{
- if (osvi.dwMajorVersion == 6)
+ if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0)
{
this->OSRelease = "Vista";
}
+ if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1)
+ {
+ this->OSRelease = "7";
+ }
// VER_SUITE_PERSONAL may not be defined
#ifdef VER_SUITE_PERSONAL
else
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 4b0fb02..a55a18c 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
SET(KWSYS_DATE_STAMP_YEAR 2010)
# KWSys version date month component. Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 09)
+SET(KWSYS_DATE_STAMP_MONTH 11)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 10)
+SET(KWSYS_DATE_STAMP_DAY 12)
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 8714640..31392b5 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -34,6 +34,12 @@ if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")
set(_cmake_options "-DCMAKE_EXE_LINKER_FLAGS=")
endif()
+if("${CMAKE_GENERATOR}" MATCHES "Make")
+ set(TEST_LINK_DEPENDS ${BuildDepends_BINARY_DIR}/Project/linkdep.txt)
+ file(WRITE ${TEST_LINK_DEPENDS} "1")
+endif()
+list(APPEND _cmake_options "-DTEST_LINK_DEPENDS=${TEST_LINK_DEPENDS}")
+
file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project)
message("Creating Project/foo.cxx")
write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
@@ -131,6 +137,10 @@ file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_dir.hxx
file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_tgt.hxx
"static const char* zot_macro_tgt = \"zot_macro_tgt changed\";\n")
+if(TEST_LINK_DEPENDS)
+ file(WRITE ${TEST_LINK_DEPENDS} "2")
+endif()
+
help_xcode_depends()
message("Building project second time")
@@ -194,3 +204,16 @@ if("${out}" STREQUAL "${VALUE_CHANGED}")
else("${out}" STREQUAL "${VALUE_CHANGED}")
message(SEND_ERROR "Project did not rebuild properly!")
endif("${out}" STREQUAL "${VALUE_CHANGED}")
+
+if(TEST_LINK_DEPENDS)
+ set(linkdep ${BuildDepends_BINARY_DIR}/Project/linkdep${CMAKE_EXECUTABLE_SUFFIX})
+ if(${linkdep} IS_NEWER_THAN ${TEST_LINK_DEPENDS})
+ message("LINK_DEPENDS worked")
+ else()
+ message(SEND_ERROR "LINK_DEPENDS failed. Executable
+ ${linkdep}
+is not newer than dependency
+ ${TEST_LINK_DEPENDS}
+")
+ endif()
+endif()
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index e9d1296..70a2f37 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -80,3 +80,8 @@ set_property(
DIRECTORY
PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM "ZOT_DIR(%)=<zot_%_dir.hxx>"
)
+
+if(TEST_LINK_DEPENDS)
+ add_executable(linkdep linkdep.cxx)
+ set_property(TARGET linkdep PROPERTY LINK_DEPENDS ${TEST_LINK_DEPENDS})
+endif()
diff --git a/Tests/BuildDepends/Project/linkdep.cxx b/Tests/BuildDepends/Project/linkdep.cxx
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/BuildDepends/Project/linkdep.cxx
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 8e8d0ca..04f0774 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -11,7 +11,7 @@ MACRO(ADD_TEST_MACRO NAME COMMAND)
--build-generator ${CMAKE_TEST_GENERATOR}
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project ${proj}
- --test-command ${COMMAND})
+ --test-command ${COMMAND} ${ARGN})
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}")
ENDMACRO(ADD_TEST_MACRO)
@@ -21,7 +21,11 @@ IF(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME)
FILE(MAKE_DIRECTORY "${TEST_HOME}")
FILE(WRITE "${TEST_HOME}/.cvspass" ":pserver:anoncvs@www.cmake.org:/cvsroot/KWSys A\n")
SET(TEST_HOME_ENV_CODE "# Fake a user home directory to avoid polluting the real one.
-SET(ENV{HOME} \"${TEST_HOME}\")")
+# But provide original ENV{HOME} value in ENV{CTEST_REAL_HOME} for tests that
+# need access to the real HOME directory.
+SET(ENV{CTEST_REAL_HOME} \"\$ENV{HOME}\")
+SET(ENV{HOME} \"${TEST_HOME}\")
+")
ENDIF()
# Choose a default configuration for CTest tests.
@@ -129,6 +133,9 @@ IF(BUILD_TESTING)
ADD_TEST_MACRO(MathTest MathTest)
ADD_TEST_MACRO(Simple Simple)
ADD_TEST_MACRO(PreOrder PreOrder)
+ ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
+ SET_TESTS_PROPERTIES(MissingSourceFile PROPERTIES
+ PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file \"MissingSourceFile.c\"")
ADD_TEST_MACRO(COnly COnly)
ADD_TEST_MACRO(CxxOnly CxxOnly)
ADD_TEST_MACRO(IPO COnly/COnly)
@@ -150,6 +157,9 @@ IF(BUILD_TESTING)
ADD_TEST_MACRO(ExportImport ExportImport)
ADD_TEST_MACRO(Unset Unset)
ADD_TEST_MACRO(PolicyScope PolicyScope)
+ ADD_TEST_MACRO(EmptyLibrary EmptyLibrary)
+ SET_TESTS_PROPERTIES(EmptyLibrary PROPERTIES
+ PASS_REGULAR_EXPRESSION "CMake Error: CMake can not determine linker language for target:test")
ADD_TEST_MACRO(CrossCompile CrossCompile)
SET_TESTS_PROPERTIES(CrossCompile PROPERTIES
PASS_REGULAR_EXPRESSION "TRY_RUN.. invoked in cross-compiling mode")
@@ -1629,8 +1639,16 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
ENDIF()
ENDIF()
- IF(NOT CMAKE_TEST_GENERATOR MATCHES "Xcode")
- INCLUDE(FindJava)
+ if(NOT DEFINED CTEST_RUN_Java)
+ if(APPLE)
+ set(CTEST_RUN_Java OFF)
+ else()
+ set(CTEST_RUN_Java ON)
+ endif()
+ endif()
+
+ IF(CTEST_RUN_Java)
+ find_package(Java QUIET)
IF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW)
GET_FILENAME_COMPONENT(JNIPATH ${JAVA_COMPILE} PATH)
FIND_FILE(JNI_H jni.h
@@ -1653,7 +1671,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
ENDIF("${JNI_FILE}" MATCHES "JDK1_2")
ENDIF(JNI_H)
ENDIF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW)
- ENDIF(NOT CMAKE_TEST_GENERATOR MATCHES "Xcode")
+ ENDIF(CTEST_RUN_Java)
# add some cross compiler tests, for now only with makefile based generators
IF(CMAKE_TEST_GENERATOR MATCHES "Makefiles" OR CMAKE_TEST_GENERATOR MATCHES "KDevelop")
@@ -1754,6 +1772,32 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
-D source_dir:STRING=${CMAKE_CURRENT_SOURCE_DIR}/Tutorial/Step3
-D CMAKE_CTEST_COMMAND:STRING=${CMAKE_CTEST_COMMAND}
-P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeWizardTest.cmake)
+ # If the cache variable CMAKE_CONTRACT_PROJECTS is set
+ # then the dashboard will run a contract with CMake test of that
+ # name. For example CMAKE_CONTRACT_PROJECTS = vtk542 would run
+ # the vtk542 contract test.
+ # For each Contract test, the project should provide a directory
+ # with at least one CMakeLists.txt file that uses ExternalProject
+ # to download and configure the project. The directory should also
+ # contain a RunTest.cmake file that has a single set of the format:
+ # SET(project_RUN_TEST testToRun)
+ # The testToRun should be a test executable that can be run to
+ # smoke test the build.
+ FOREACH(project ${CMAKE_CONTRACT_PROJECTS})
+ INCLUDE(Contracts/${project}/RunTest.cmake)
+ ADD_TEST_MACRO(Contracts.${project}
+ ${${project}_RUN_TEST})
+ # Contract test timeout in seconds.
+ # Default to 6 hours.
+ IF(DEFINED ${project}_TEST_TIMEOUT)
+ SET(timeout ${${project}_TEST_TIMEOUT})
+ ELSEIF(CMAKE_CONTRACT_TEST_TIMEOUT_DEFAULT)
+ SET(timeout ${CMAKE_CONTRACT_TEST_TIMEOUT_DEFAULT})
+ ELSE()
+ SET(timeout 21600)
+ ENDIF()
+ SET_TESTS_PROPERTIES(Contracts.${project} PROPERTIES TIMEOUT ${timeout})
+ ENDFOREACH()
ENDIF(BUILD_TESTING)
SUBDIRS(CMakeTests)
diff --git a/Tests/CMakeTests/GetPrerequisitesTest.cmake.in b/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
index e8bfb47..daf467b 100644
--- a/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
+++ b/Tests/CMakeTests/GetPrerequisitesTest.cmake.in
@@ -77,6 +77,11 @@ message(STATUS "")
list_prerequisites("${CMAKE_COMMAND}" 0 0 1)
message(STATUS "")
+message(STATUS "=============================================================================")
+string(LENGTH "$ENV{PATH}" PATH_LENGTH_BEGIN)
+message(STATUS "Begin PATH length is: ${PATH_LENGTH_BEGIN}")
+message(STATUS "")
+
# Leave the code for these tests in here, but turn them off by default... they
# take longer than they're worth during development...
@@ -116,11 +121,11 @@ message(STATUS "")
message(STATUS "=============================================================================")
message(STATUS "Test overriding 'gp_tool' with value unlikely to be found")
message(STATUS "")
-if(WIN32 OR APPLE)
- set(gp_tool "ldd")
-else(WIN32 OR APPLE)
+if(APPLE)
+ set(gp_tool "dumpbin")
+else()
set(gp_tool "otool")
-endif(WIN32 OR APPLE)
+endif()
set(gp_cmd "gp_cmd-NOTFOUND")
list_prerequisites("${CMAKE_COMMAND}" 0 0 0)
set(gp_cmd)
@@ -139,6 +144,15 @@ foreach(v ${vs})
endforeach(v)
message(STATUS "")
+message(STATUS "=============================================================================")
+string(LENGTH "$ENV{PATH}" PATH_LENGTH_END)
+message(STATUS "Final PATH length is: ${PATH_LENGTH_END}")
+
+if(PATH_LENGTH_END GREATER ${PATH_LENGTH_BEGIN})
+ message(FATAL_ERROR "list_prerequisties is endlessly appending the path of gp_tool to the PATH.")
+endif()
+message(STATUS "")
+
message(STATUS "=============================================================================")
message(STATUS "End of test")
diff --git a/Tests/CMakeTests/IncludeTest.cmake.in b/Tests/CMakeTests/IncludeTest.cmake.in
index 01cec38..eca679b 100644
--- a/Tests/CMakeTests/IncludeTest.cmake.in
+++ b/Tests/CMakeTests/IncludeTest.cmake.in
@@ -35,3 +35,7 @@ if(NOT "${fileOne}" STREQUAL "${fileTwo}")
message(FATAL_ERROR "Wrong CMake.cmake was included: \"${fileOne}\" expected \"${fileTwo}\"")
endif(NOT "${fileOne}" STREQUAL "${fileTwo}")
+# Check that CMAKE_CURRENT_LIST_DIR is working:
+# Needs to be a file in the build tree, which is correct cmake script
+# but doesn't do a lot, if possible only set() commands:
+include(${CMAKE_CURRENT_LIST_DIR}/../../CTestCustom.cmake)
diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
index 7206f1d..8095a1c 100644
--- a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
+++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
@@ -76,7 +76,8 @@ endif()
file(WRITE
"${CMAKE_CURRENT_BINARY_DIR}/main.cxx"
- "int main() { return 0; }"
+ "int main() { return 0; }
+"
)
add_executable(
diff --git a/Tests/Contracts/cse-snapshot/CMakeLists.txt b/Tests/Contracts/cse-snapshot/CMakeLists.txt
new file mode 100644
index 0000000..9134210
--- /dev/null
+++ b/Tests/Contracts/cse-snapshot/CMakeLists.txt
@@ -0,0 +1,114 @@
+cmake_minimum_required(VERSION 2.8)
+project(cse-snapshot)
+
+include(ExternalProject)
+
+include("${CMAKE_CURRENT_SOURCE_DIR}/LocalOverrides.cmake" OPTIONAL)
+include("${CMAKE_CURRENT_BINARY_DIR}/LocalOverrides.cmake" OPTIONAL)
+
+if(NOT DEFINED HOME)
+ if(DEFINED ENV{CTEST_REAL_HOME})
+ set(HOME "$ENV{CTEST_REAL_HOME}")
+ else()
+ set(HOME "$ENV{HOME}")
+ endif()
+endif()
+message(STATUS "HOME='${HOME}'")
+
+if(NOT DEFINED repo)
+ set(repo "git://public.kitware.com/cse.git")
+endif()
+message(STATUS "repo='${repo}'")
+
+if(NOT DEFINED tag)
+ set(tag "cc1dcb95439a21ab1d58f444d93481598414196e")
+endif()
+message(STATUS "tag='${tag}'")
+
+string(SUBSTRING "${tag}" 0 8 shorttag)
+
+set(base_dir "${HOME}/.cmake/Contracts/${PROJECT_NAME}/${shorttag}")
+set(binary_dir "${base_dir}/build")
+set(script_dir "${base_dir}")
+set(source_dir "${base_dir}/src")
+
+if(NOT DEFINED BUILDNAME)
+ set(BUILDNAME "CMakeContract-${shorttag}")
+endif()
+message(STATUS "BUILDNAME='${BUILDNAME}'")
+
+if(NOT DEFINED SITE)
+ site_name(SITE)
+endif()
+message(STATUS "SITE='${SITE}'")
+
+if(NOT DEFINED PROCESSOR_COUNT)
+ # Unknown:
+ set(PROCESSOR_COUNT 0)
+
+ # Linux:
+ set(cpuinfo_file "/proc/cpuinfo")
+ if(EXISTS "${cpuinfo_file}")
+ file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$")
+ list(LENGTH procs PROCESSOR_COUNT)
+ endif()
+
+ # Mac:
+ if(APPLE)
+ find_program(cmd_sysctl "sysctl")
+ if(cmd_sysctl)
+ execute_process(COMMAND ${cmd_sysctl} -n hw.ncpu
+ OUTPUT_VARIABLE PROCESSOR_COUNT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ endif()
+ endif()
+
+ # Windows:
+ if(WIN32)
+ set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}")
+ endif()
+endif()
+message(STATUS "PROCESSOR_COUNT='${PROCESSOR_COUNT}'")
+
+find_package(Git)
+if(NOT GIT_EXECUTABLE)
+ message(FATAL_ERROR "error: could not find git")
+ # adjust PATH to find git, or set GIT_EXECUTABLE in LocalOverrides.cmake
+endif()
+message(STATUS "GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
+
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/Dashboard.cmake.in"
+ "${script_dir}/Dashboard.cmake"
+ @ONLY)
+
+# Source dir for this project exists outside the CMake build tree because it
+# is absolutely huge.
+#
+if(EXISTS "${source_dir}/.git")
+ # If it exists already, download is a complete no-op:
+ ExternalProject_Add(download-${PROJECT_NAME}
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ )
+else()
+ # If it does not yet exist, download clones the git repository:
+ ExternalProject_Add(download-${PROJECT_NAME}
+ SOURCE_DIR "${source_dir}"
+ GIT_REPOSITORY "${repo}"
+ GIT_TAG "${tag}"
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ )
+endif()
+
+ExternalProject_Add(build-${PROJECT_NAME}
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ${CMAKE_CTEST_COMMAND} -S "${script_dir}/Dashboard.cmake"
+ INSTALL_COMMAND ""
+ DEPENDS download-${PROJECT_NAME}
+ )
diff --git a/Tests/Contracts/cse-snapshot/Dashboard.cmake.in b/Tests/Contracts/cse-snapshot/Dashboard.cmake.in
new file mode 100644
index 0000000..138eb3f
--- /dev/null
+++ b/Tests/Contracts/cse-snapshot/Dashboard.cmake.in
@@ -0,0 +1,76 @@
+# This "ctest -S" script may be configured to drive a nightly dashboard on any
+# Linux machine.
+#
+set(CTEST_BINARY_DIRECTORY "@binary_dir@")
+set(CTEST_BUILD_NAME "@BUILDNAME@")
+set(CTEST_SITE "@SITE@")
+set(CTEST_SOURCE_DIRECTORY "@source_dir@")
+set(PROCESSOR_COUNT "@PROCESSOR_COUNT@")
+
+# Assume a Linux build, with a make that supports -j. Modify this script if
+# assumption is ever invalid.
+#
+if(PROCESSOR_COUNT)
+ set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}")
+endif()
+
+set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
+
+message("Cleaning binary dir '${CTEST_BINARY_DIRECTORY}'")
+ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
+
+# Intentionally no ctest_update step in this script. This script is run as a
+# "Contract" test on a CMake dashboard submission using the just-built ctest
+# as the driver. The download step in the Contract CMakeLists file takes care
+# of setting up the source tree before calling this ctest -S script. The idea
+# is that the source tree will be the same every day, so there should not be
+# an "update" step for this build.
+
+message("Configuring CSE in binary dir '${CTEST_BINARY_DIRECTORY}'")
+set_property(GLOBAL PROPERTY SubProject "CSE-toplevel")
+set_property(GLOBAL PROPERTY Label "CSE-toplevel")
+
+ctest_start("Experimental")
+
+set(CSE_TOPLEVEL_OPTIONS
+ -DEXTERNAL_PROJECT_DASHBOARD_BUILD:BOOL=ON
+ -DEXTERNAL_PROJECT_TESTS:BOOL=ON
+ -DCSE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY}/built
+ -DCSE_SUBSET:STRING=ALL
+ -DCTEST_SITE:STRING=${CTEST_SITE}
+)
+
+ctest_configure(OPTIONS "${CSE_TOPLEVEL_OPTIONS}")
+
+# The configure step produces a file listing the CSE packages and dependencies.
+# This file also generates Project.xml and stores it in ${PROJECT_XML}.
+#
+set(subprojects "")
+if(EXISTS "${CTEST_BINARY_DIRECTORY}/CSEBuildtimeDepends.cmake")
+ message("Including CSEBuildtimeDepends.cmake")
+ include("${CTEST_BINARY_DIRECTORY}/CSEBuildtimeDepends.cmake")
+ set(subprojects ${CSE_ALL_SORTED})
+ message("Submitting Project.xml")
+ ctest_submit(FILES ${PROJECT_XML})
+endif()
+
+message("Submitting CSE configure results")
+ctest_submit()
+
+if(subprojects)
+ message("Building by looping over subprojects...")
+ foreach(subproject ${subprojects})
+ message("########## ${subproject} ##########")
+ set_property(GLOBAL PROPERTY SubProject "${subproject}")
+ set_property(GLOBAL PROPERTY Label "${subproject}")
+ ctest_build(TARGET "${subproject}" APPEND)
+ message("Submitting ${subproject} build results")
+ ctest_submit(PARTS build)
+ endforeach()
+else()
+ message("Building all...")
+ ctest_build(APPEND)
+ message("Submitting build results")
+ ctest_submit(PARTS build)
+endif()
diff --git a/Tests/Contracts/cse-snapshot/RunTest.cmake b/Tests/Contracts/cse-snapshot/RunTest.cmake
new file mode 100644
index 0000000..7eb6301
--- /dev/null
+++ b/Tests/Contracts/cse-snapshot/RunTest.cmake
@@ -0,0 +1,3 @@
+set(exe "$ENV{HOME}/.cmake/Contracts/cse-snapshot/510345e4/build/built/Release/git-1.6.5.2/bin/git")
+set(args help clone)
+set(cse-snapshot_RUN_TEST ${exe} ${args})
diff --git a/Tests/Contracts/vtk542/CMakeLists.txt b/Tests/Contracts/vtk542/CMakeLists.txt
new file mode 100644
index 0000000..cfb8b16
--- /dev/null
+++ b/Tests/Contracts/vtk542/CMakeLists.txt
@@ -0,0 +1,30 @@
+# The VTK external project for CMake
+# ---------------------------------------------------------------------------
+cmake_minimum_required(VERSION 2.8)
+project(vtk542)
+include(ExternalProject)
+
+
+set(vtk_source "${CMAKE_CURRENT_BINARY_DIR}/VTK-source")
+set(vtk_binary "${CMAKE_CURRENT_BINARY_DIR}/VTK-build")
+
+ExternalProject_Add(VTK
+ DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}
+ URL "http://www.vtk.org/files/release/5.4/vtk-5.4.2.tar.gz"
+ URL_MD5 c2c797091d4b2128d9a1bd32c4b78227
+ SOURCE_DIR ${vtk_source}
+ BINARY_DIR ${vtk_binary}
+ CMAKE_GENERATOR "${CMAKE_GENERATOR}"
+ CMAKE_ARGS
+ -DBUILD_EXAMPLES:BOOL=ON
+ -DBUILD_TESTING:BOOL=ON
+ INSTALL_COMMAND ""
+ )
+# make it so that each build will run make in the VTK build tree
+ExternalProject_Add_Step(VTK forcebuild
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${CMAKE_CURRENT_BUILD_DIR}/VTK-prefix/src/VTK-stamp/VTK-build
+ DEPENDEES configure
+ DEPENDERS build
+ ALWAYS 1
+ )
diff --git a/Tests/Contracts/vtk542/RunTest.cmake b/Tests/Contracts/vtk542/RunTest.cmake
new file mode 100644
index 0000000..4f48e5c
--- /dev/null
+++ b/Tests/Contracts/vtk542/RunTest.cmake
@@ -0,0 +1 @@
+SET(vtk542_RUN_TEST VTK-build/bin/CommonCxxTests otherArrays)
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index 4fc9fb5..76208d4 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -9,12 +9,16 @@ ADD_SUBDIRECTORY(GeneratedHeader)
#
# Lib and exe path
#
-SET (LIBRARY_OUTPUT_PATH
- ${PROJECT_BINARY_DIR}/bin/ CACHE INTERNAL
+IF(NOT DEFINED bin_dir)
+ SET(bin_dir "bin")
+ENDIF()
+
+SET (LIBRARY_OUTPUT_PATH
+ ${PROJECT_BINARY_DIR}/${bin_dir} CACHE INTERNAL
"Single output directory for building all libraries.")
-SET (EXECUTABLE_OUTPUT_PATH
- ${PROJECT_BINARY_DIR}/bin/ CACHE INTERNAL
+SET (EXECUTABLE_OUTPUT_PATH
+ ${PROJECT_BINARY_DIR}/${bin_dir} CACHE INTERNAL
"Single output directory for building all executables.")
################################################################
@@ -220,7 +224,12 @@ ADD_CUSTOM_COMMAND(OUTPUT gen_redirect.c
##############################################################################
# Test non-trivial command line arguments in custom commands.
SET(EXPECTED_ARGUMENTS)
+SET(CHECK_ARGS)
+IF(NOT MSVC71)
+ SET(CHECK_ARGS -DPATH=c:/posix/path)
+ENDIF()
SET(CHECK_ARGS
+ ${CHECK_ARGS}
c:/posix/path
c:\\windows\\path
'single-quotes'
@@ -359,13 +368,16 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/check_command_line.c.in
@ONLY IMMEDIATE)
ADD_EXECUTABLE(check_command_line
${CMAKE_CURRENT_BINARY_DIR}/check_command_line.c)
+SET(output_name "check_command_line")
+SET_PROPERTY(TARGET check_command_line
+ PROPERTY OUTPUT_NAME ${output_name})
# SET_TARGET_PROPERTIES(check_command_line PROPERTIES
# COMPILE_FLAGS -DCHECK_COMMAND_LINE_VERBOSE)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/command_line_check
COMMAND ${CMAKE_COMMAND} -DMARK_FILE=${CMAKE_CURRENT_BINARY_DIR}/check_mark.txt
-P ${CMAKE_CURRENT_SOURCE_DIR}/check_mark.cmake
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${output_name}
${CHECK_ARGS} ""
VERBATIM
COMMENT "Checking custom command line escapes (single'quote)"
@@ -375,7 +387,7 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/command_line_check
ADD_CUSTOM_TARGET(do_check_command_line ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/command_line_check
COMMAND ${CMAKE_COMMAND} -E echo "Checking custom target command escapes"
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${output_name}
${CHECK_ARGS} ""
VERBATIM
COMMENT "Checking custom target command line escapes ($dollar-signs$)"
diff --git a/Tests/CxxOnly/CMakeLists.txt b/Tests/CxxOnly/CMakeLists.txt
index d621499..5d27890 100644
--- a/Tests/CxxOnly/CMakeLists.txt
+++ b/Tests/CxxOnly/CMakeLists.txt
@@ -5,7 +5,7 @@ set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
if(WIN32)
set(EXTRA_SRCS test.CPP)
endif()
-add_library(testcxx1 STATIC libcxx1.cxx ${EXTRA_SRCS})
+add_library(testcxx1.my STATIC libcxx1.cxx ${EXTRA_SRCS})
add_library(testcxx2 SHARED libcxx2.cxx)
add_executable (CxxOnly cxxonly.cxx)
-target_link_libraries(CxxOnly testcxx1 testcxx2)
+target_link_libraries(CxxOnly testcxx1.my testcxx2)
diff --git a/Tests/EmptyLibrary/CMakeLists.txt b/Tests/EmptyLibrary/CMakeLists.txt
new file mode 100644
index 0000000..baddbbf
--- /dev/null
+++ b/Tests/EmptyLibrary/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 2.6)
+project(TestEmptyLibrary)
+
+add_subdirectory(subdir)
diff --git a/Tests/EmptyLibrary/subdir/CMakeLists.txt b/Tests/EmptyLibrary/subdir/CMakeLists.txt
new file mode 100644
index 0000000..e273f8d
--- /dev/null
+++ b/Tests/EmptyLibrary/subdir/CMakeLists.txt
@@ -0,0 +1 @@
+add_library(test test.h)
diff --git a/Tests/EmptyLibrary/subdir/test.h b/Tests/EmptyLibrary/subdir/test.h
new file mode 100644
index 0000000..8511f53
--- /dev/null
+++ b/Tests/EmptyLibrary/subdir/test.h
@@ -0,0 +1 @@
+extern int dummy;
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index bf90a52..a878194 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -7,6 +7,13 @@ find_package(CVS)
find_package(Subversion)
find_package(Git)
+option(ExternalProjectTest_USE_FOLDERS "Enable folder grouping in IDEs." ON)
+if(ExternalProjectTest_USE_FOLDERS)
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+else()
+ set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
+endif()
+
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER
"CMakePredefinedTargets-in-ExternalProjectTest")
@@ -61,6 +68,15 @@ ExternalProject_Add(${proj}
INSTALL_COMMAND ""
)
+set(proj TargetNameSameAsFolder)
+ExternalProject_Add(${proj}
+ BUILD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ DOWNLOAD_COMMAND ""
+ INSTALL_COMMAND ""
+)
+set_property(TARGET ${proj} PROPERTY FOLDER "${proj}")
+
set(proj MinimalNoOpProject)
ExternalProject_Add(${proj}
BUILD_COMMAND ""
diff --git a/Tests/FunctionTest/CMakeLists.txt b/Tests/FunctionTest/CMakeLists.txt
index ef55173..5d4f42d 100644
--- a/Tests/FunctionTest/CMakeLists.txt
+++ b/Tests/FunctionTest/CMakeLists.txt
@@ -166,3 +166,11 @@ ELSE(DEFINED SUBDIR_DEFINED)
ENDIF(DEFINED SUBDIR_DEFINED)
ADD_EXECUTABLE(FunctionTest functionTest.c)
+
+# Use the PROJECT_LABEL property: in IDEs, the project label should appear
+# in the UI rather than the target name. If this were a good test of the
+# property rather than just a smoke test, it would verify that the label
+# actually appears in the UI of the IDE... Or at least that the text appears
+# somewhere in the generated project files.
+SET_PROPERTY(TARGET miniFunctionTest
+ PROPERTY PROJECT_LABEL "Test de Fonctionnement")
diff --git a/Tests/MissingSourceFile/CMakeLists.txt b/Tests/MissingSourceFile/CMakeLists.txt
new file mode 100644
index 0000000..42b7c51
--- /dev/null
+++ b/Tests/MissingSourceFile/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(MissingSourceFile C)
+add_executable(MissingSourceFile MissingSourceFile.c)
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index 4c9202c..8b3e7f6 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -152,10 +152,6 @@ if(BUILD_TESTING)
${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout --nonet --path .
${HTML_FILES}
)
- else()
- add_test(CMake.HTML
- ${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout ${HTML_FILES}
- )
endif()
endif()
endif()
diff --git a/Utilities/Release/README b/Utilities/Release/README
index 75cdf48..12eafe1 100644
--- a/Utilities/Release/README
+++ b/Utilities/Release/README
@@ -1,28 +1,21 @@
-To create a cmake release, first test the branch:
+To create a cmake release, make sure the "release" tag is pointing to the
+expected git commit:
-mkdir 2-4
-cd 2-4
-cmake -DCMAKE_CREATE_VERSION=CMake-2-4 -P ../create-cmake-release.cmake
-./create-CMake-2-4.sh
+http://cmake.org/gitweb?p=cmake.git;a=shortlog;h=refs/heads/release
-If that works:
-EDIT CMakeLists.txt and remove the RC setting!
-commit that.
+Then as kitware@hythloth, using an up-to-date CMake:
-Then tag the minor release:
-cvs tag 2-4-7
+ cd ~/CMakeReleases/cmake/Utilities/Release
+ mkdir 283rc1
+ cd 283rc1
+ ~/CMakeReleases/build/bin/cmake -DCMAKE_CREATE_VERSION=release -P ../create-cmake-release.cmake
+ ./create-release.sh
-Then create a release from the tag:
-mkdir 2-4-7
-cd 2-4-7
-cmake -DCMAKE_CREATE_VERSION=CMake-2-4-7 -P ../create-cmake-release.cmake
-./create-CMake-2-4.sh
-
-create-cmake-release.cmake: script to run to create release sh script
-To add or remove machines this file should be edited.
+create-cmake-release.cmake: script to run to create release sh scripts
+Add or remove machines in create-cmake-release.cmake.
Cygwin -> directory that contains cpack cygwin package files used in
- CMakeCPack.cmake)
+ CMakeCPack.cmake
machine_release.cmake : config files for each machine
diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake
index 66753ce..fd91665 100644
--- a/Utilities/Release/create-cmake-release.cmake
+++ b/Utilities/Release/create-cmake-release.cmake
@@ -5,17 +5,14 @@ endif(NOT DEFINED CMAKE_CREATE_VERSION)
set(RELEASE_SCRIPTS
dashmacmini2_release.cmake # Mac Darwin universal
dashsun1_release.cmake # SunOS
- destiny_release.cmake # HPUX
+# destiny_release.cmake # HPUX -- destiny is dead; long live destiny
magrathea_release.cmake # Linux
dash2win64_release.cmake # Windows
# dash2win64_cygwin.cmake # Cygwin
# blight_cygwin.cmake # Cygwin
v20n250_aix_release.cmake # AIX 5.3
-# vogon_cygwin.cmake # Cygwin
ferrari_sgi64_release.cmake # IRIX 64
ferrari_sgi_release.cmake # IRIX 64
-# r36n11_aix_release.cmake # AIX 5.3
-# r15n65_aix_release.cmake # AIX 5.2
)
file(WRITE create-${CMAKE_CREATE_VERSION}.sh "#!/bin/bash")
@@ -29,5 +26,3 @@ ${CMAKE_COMMAND} -DCMAKE_CREATE_VERSION=${CMAKE_CREATE_VERSION} -P ${CMAKE_ROOT}
endforeach(f)
execute_process(COMMAND chmod a+x create-${CMAKE_CREATE_VERSION}.sh)
message("Run ./create-${CMAKE_CREATE_VERSION}.sh")
-
-
diff --git a/Utilities/Release/dash2win64_cygwin.cmake b/Utilities/Release/dash2win64_cygwin.cmake
index d866896..64099a9 100644
--- a/Utilities/Release/dash2win64_cygwin.cmake
+++ b/Utilities/Release/dash2win64_cygwin.cmake
@@ -6,12 +6,13 @@ set(HOST dash2win64)
set(CPACK_BINARY_GENERATORS "CygwinBinary")
set(CPACK_SOURCE_GENERATORS "CygwinSource")
set(MAKE_PROGRAM "make")
-set(CVS_COMMAND /usr/bin/cvs)
set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE
")
set(CXX g++)
set(CC gcc)
set(SCRIPT_NAME dash2win64cygwin)
+set(GIT_COMMAND git)
+set(GIT_EXTRA "git config core.autocrlf true")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/dashsgi1_release.cmake b/Utilities/Release/dashsgi1_release.cmake
deleted file mode 100644
index 0af5ca7..0000000
--- a/Utilities/Release/dashsgi1_release.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/usr/people/kitware/CMakeReleaseDirectory")
-set(PROCESSORS 2)
-set(HOST dashsgi1)
-set(MAKE_PROGRAM "make")
-set(MAKE "${MAKE_PROGRAM} -P")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CPACK_SYSTEM_NAME:STRING=IRIX64-n32
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/dashsgi1_release64.cmake b/Utilities/Release/dashsgi1_release64.cmake
deleted file mode 100644
index 133f478..0000000
--- a/Utilities/Release/dashsgi1_release64.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/usr/people/kitware/CMakeReleaseDirectory64")
-set(PROCESSORS 2)
-set(CFLAGS "-64")
-set(CXXFLAGS "-64")
-set(LDFLAGS="-64")
-set(HOST dashsgi1)
-set(SCRIPT_NAME dashsgi164)
-set(MAKE_PROGRAM "make")
-set(MAKE "${MAKE_PROGRAM} -P")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CPACK_SYSTEM_NAME:STRING=IRIX64-64
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/destiny_release.cmake b/Utilities/Release/destiny_release.cmake
deleted file mode 100644
index 886909f..0000000
--- a/Utilities/Release/destiny_release.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-set(PROCESSORS 1)
-set(RUN_SHELL "/usr/local/bin/zsh -l -c /bin/sh")
-set(CVS_COMMAND "/usr/local/bin/cvs")
-set(HOST destiny)
-set(MAKE_PROGRAM "/usr/local/bin/gmake")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CMAKE_EXE_LINKER_FLAGS:STRING=-Wl,-a,archive_shared
-CMAKE_C_FLAGS:STRING=+DAportable
-CMAKE_CXX_FLAGS:STRING=-Wl,+vnocompatwarnings +W740,749 +DAportable -D__HPACC_STRICTER_ANSI__")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/muse_release.cmake b/Utilities/Release/muse_release.cmake
deleted file mode 100644
index 9fd41c4..0000000
--- a/Utilities/Release/muse_release.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/home/collab/itk/CMakeReleaseDirectory" )
-set(PROCESSORS 20)
-set(HOST muse)
-set(MAKE_PROGRAM "gmake")
-set(MAKE "${MAKE_PROGRAM} -j20")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/muse_release64.cmake b/Utilities/Release/muse_release64.cmake
deleted file mode 100644
index cd87f51..0000000
--- a/Utilities/Release/muse_release64.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/home/collab/itk/CMakeReleaseDirectory64" )
-set(PROCESSORS 20)
-set(CFLAGS "-64")
-set(CXXFLAGS "-64")
-set(LDFLAGS="-64")
-set(HOST muse)
-set(SCRIPT_NAME muse64)
-set(MAKE_PROGRAM "gmake")
-set(MAKE "${MAKE_PROGRAM} -j20")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/r15n65_aix_release.cmake b/Utilities/Release/r15n65_aix_release.cmake
deleted file mode 100644
index 74d6d0b..0000000
--- a/Utilities/Release/r15n65_aix_release.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" )
-set(FINAL_PATH /u/noibm34/cmake-release)
-set(PROCESSORS 2)
-set(CVS_COMMAND /vol/local/bin/cvs)
-set(HOST "sshserv.centers.ihost.com" )
-set(EXTRA_HOP "rsh r15n65" )
-set(MAKE_PROGRAM "make")
-set(CC "xlc")
-set(CXX "xlC")
-set(FC "xlf")
-set(INITIAL_CACHE "
-CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-set(EXTRA_COPY "
-rm -rf ~/cmake-release
-mkdir ~/cmake-release
-mv *.sh ~/cmake-release
-mv *.Z ~/cmake-release
-mv *.gz ~/cmake-release")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/r36n11_aix_release.cmake b/Utilities/Release/r36n11_aix_release.cmake
deleted file mode 100644
index 60c8459..0000000
--- a/Utilities/Release/r36n11_aix_release.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" )
-set(FINAL_PATH /u/noibm34/cmake-release)
-set(PROCESSORS 2)
-set(CVS_COMMAND /vol/local/bin/cvs)
-set(HOST "sshserv.centers.ihost.com" )
-set(EXTRA_HOP "ssh r36n11" )
-set(MAKE_PROGRAM "make")
-set(CC "xlc")
-set(CXX "xlC")
-set(FC "xlf")
-set(INITIAL_CACHE "
-CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-set(EXTRA_COPY "
-rm -rf ~/cmake-release
-mkdir ~/cmake-release
-mv *.sh ~/cmake-release
-mv *.Z ~/cmake-release
-mv *.gz ~/cmake-release")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake
index 6fd1372..3a35ec3 100644
--- a/Utilities/Release/release_cmake.cmake
+++ b/Utilities/Release/release_cmake.cmake
@@ -34,7 +34,11 @@ if(NOT DEFINED CVS_COMMAND)
set(CVS_COMMAND cvs)
endif(NOT DEFINED CVS_COMMAND)
-set(GIT_BRANCH ${CMAKE_CREATE_VERSION})
+if(${CMAKE_CREATE_VERSION} MATCHES "^(release|maint|next)$")
+ set(GIT_BRANCH origin/${CMAKE_CREATE_VERSION})
+else()
+ set(GIT_BRANCH ${CMAKE_CREATE_VERSION})
+endif()
set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -d ${CVSROOT} co -d ${CMAKE_CREATE_VERSION} ${CMAKE_CREATE_VERSION}")
diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in
index 4189728..8455e92 100755
--- a/Utilities/Release/release_cmake.sh.in
+++ b/Utilities/Release/release_cmake.sh.in
@@ -89,7 +89,7 @@ if [ ! -z "@GIT_COMMAND@" ]; then
@GIT_EXTRA@
check_exit_value $? "git extra cmake source" || exit 1
# now checkout a copy on the local branch working
- @GIT_COMMAND@ checkout -b working origin/@GIT_BRANCH@
+ @GIT_COMMAND@ checkout -b working @GIT_BRANCH@
check_exit_value $? "git checkout" || exit 1
cd ..
else
diff --git a/Utilities/Release/v20n17_aix_release.cmake b/Utilities/Release/v20n17_aix_release.cmake
deleted file mode 100644
index b7494bb..0000000
--- a/Utilities/Release/v20n17_aix_release.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" )
-set(FINAL_PATH /u/noibm34/cmake-release)
-set(PROCESSORS 2)
-set(CVS_COMMAND /vol/local/bin/cvs)
-set(HOST "sshserv.centers.ihost.com" )
-set(EXTRA_HOP "rsh v20n17" )
-set(MAKE_PROGRAM "make")
-set(CC "xlc")
-set(CXX "xlC")
-set(FC "xlf")
-set(INITIAL_CACHE "
-CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-set(EXTRA_COPY "
-rm -rf ~/cmake-release
-mkdir ~/cmake-release
-mv *.sh ~/cmake-release
-mv *.Z ~/cmake-release
-mv *.gz ~/cmake-release")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/v60n177_aix_release.cmake b/Utilities/Release/v60n177_aix_release.cmake
deleted file mode 100644
index 9ed42ad..0000000
--- a/Utilities/Release/v60n177_aix_release.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" )
-set(FINAL_PATH /u/noibm34/cmake-release)
-set(PROCESSORS 2)
-set(CVS_COMMAND /vol/local/bin/cvs)
-set(HOST "sshserv.centers.ihost.com" )
-set(EXTRA_HOP "rsh v60n177" )
-set(MAKE_PROGRAM "make")
-set(CC "xlc")
-set(CXX "xlC")
-set(INITIAL_CACHE "
-CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-set(EXTRA_COPY "
-rm -rf ~/cmake-release
-mkdir ~/cmake-release
-mv *.sh ~/cmake-release
-mv *.Z ~/cmake-release
-mv *.gz ~/cmake-release")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/vogon_cygwin.cmake b/Utilities/Release/vogon_cygwin.cmake
deleted file mode 100644
index 0506f2a..0000000
--- a/Utilities/Release/vogon_cygwin.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseCygwin")
-set(PROCESSORS 2)
-set(HOST vogon)
-set(CPACK_BINARY_GENERATORS "CygwinBinary")
-set(CPACK_SOURCE_GENERATORS "CygwinSource")
-set(MAKE_PROGRAM "make")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-Subversion_SVNADMIN_EXECUTABLE:STRING=FALSE
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/vogon_release.cmake b/Utilities/Release/vogon_release.cmake
deleted file mode 100644
index 41245a5..0000000
--- a/Utilities/Release/vogon_release.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseDirectory")
-set(CONFIGURE_WITH_CMAKE TRUE)
-set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files/CMake\\ 2.7/bin/cmake.exe")
-set(PROCESSORS 1)
-set(HOST vogon)
-set(CPACK_BINARY_GENERATORS "NSIS ZIP")
-set(CPACK_SOURCE_GENERATORS "ZIP")
-set(MAKE_PROGRAM "nmake")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CMAKE_GENERATOR:INTERNAL=NMake Makefiles
-CMAKE_MT_EXECUTABLE:STRING=mt
-BUILD_QtDialog:BOOL:=TRUE
-QT_QMAKE_EXECUTABLE:FILEPATH=C:/QT/qt-win-opensource-src-4.5.0/bin/qmake.exe
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/vogon_release_qt.cmake b/Utilities/Release/vogon_release_qt.cmake
deleted file mode 100644
index 1772006..0000000
--- a/Utilities/Release/vogon_release_qt.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseDirectory")
-set(CONFIGURE_WITH_CMAKE TRUE)
-set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files/CMake\\ 2.6/bin/cmake.exe")
-set(PROCESSORS 1)
-set(HOST vogon)
-set(CPACK_BINARY_GENERATORS "NSIS ZIP")
-set(CPACK_SOURCE_GENERATORS "ZIP")
-set(MAKE_PROGRAM "nmake")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CMAKE_GENERATOR:INTERNAL=NMake Makefiles
-CMAKE_MT_EXECUTABLE:STRING=mt
-QT_QMAKE_EXECUTABLE:FILEPATH=C:/QT/qt-win-opensource-src-4.5.0/bin/qmake.exe
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/cmbzip2/bzlib_private.h b/Utilities/cmbzip2/bzlib_private.h
index 147dbb8..02a667f 100644
--- a/Utilities/cmbzip2/bzlib_private.h
+++ b/Utilities/cmbzip2/bzlib_private.h
@@ -47,6 +47,9 @@
/* warning C4127: conditional expression is constant*/
# pragma warning(disable:4127)
#endif
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wcast-align"
+#endif
/*-- General stuff. --*/
diff --git a/Utilities/cmcurl/setup.h b/Utilities/cmcurl/setup.h
index c49e63d..e302f35 100644
--- a/Utilities/cmcurl/setup.h
+++ b/Utilities/cmcurl/setup.h
@@ -42,6 +42,10 @@
#define WIN32
#endif
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wcast-align"
+#endif
+
/*
* Include configuration script results or hand-crafted
* configuration file for platforms which lack config tool.
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index e95935a..8c10b21 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -512,6 +512,8 @@ CHECK_TYPE_SIZE(int64_t INT64_T)
IF(NOT HAVE_INT64_T)
IF(WIN32)
SET(int64_t "__int64")
+ ELSE(WIN32)
+ SET(int64_t "long long")
ENDIF(WIN32)
ENDIF(NOT HAVE_INT64_T)
#
@@ -568,9 +570,7 @@ ENDIF(NOT HAVE_UINT16_T)
#
CHECK_TYPE_SIZE(uint32_t UINT32_T)
IF(NOT HAVE_UINT32_T)
- IF(WIN32)
- SET(uint32_t "unsigned int")
- ENDIF(WIN32)
+ SET(uint32_t "unsigned int")
ENDIF(NOT HAVE_UINT32_T)
CHECK_TYPE_SIZE(int32_t INT32_T)
IF(NOT HAVE_INT32_T)
@@ -581,6 +581,8 @@ CHECK_TYPE_SIZE(uint64_t UINT64_T)
IF(NOT HAVE_UINT64_T)
IF(WIN32)
SET(uint64_t "unsigned __int64")
+ ELSE(WIN32)
+ SET(uint64_t "unsigned long long")
ENDIF(WIN32)
ENDIF(NOT HAVE_UINT64_T)
#
diff --git a/Utilities/cmlibarchive/build/cmake/config.h.in b/Utilities/cmlibarchive/build/cmake/config.h.in
index 9af45a0..34dbce3 100644
--- a/Utilities/cmlibarchive/build/cmake/config.h.in
+++ b/Utilities/cmlibarchive/build/cmake/config.h.in
@@ -1,4 +1,7 @@
/* config.h. Generated from config.h.cmake by cmake configure */
+#if defined(__osf__)
+# define _OSF_SOURCE
+#endif
/* Version number of bsdcpio */
#cmakedefine BSDCPIO_VERSION_STRING "${BSDCPIO_VERSION_STRING}"
diff --git a/Utilities/cmlibarchive/libarchive/archive.h b/Utilities/cmlibarchive/libarchive/archive.h
index 9d84121..9b918a8 100644
--- a/Utilities/cmlibarchive/libarchive/archive.h
+++ b/Utilities/cmlibarchive/libarchive/archive.h
@@ -37,7 +37,7 @@
*/
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560
# define __LA_STDINT_H <stdint.h>
-#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__)
+#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) && !defined(__osf__)
# define __LA_STDINT_H <inttypes.h>
#endif
@@ -68,7 +68,11 @@
# endif
#else
#include <unistd.h> /* ssize_t, uid_t, and gid_t */
-#define __LA_INT64_T int64_t
+#if defined(__osf__)
+# define __LA_INT64_T long long
+#else
+# define __LA_INT64_T int64_t
+#endif
#define __LA_SSIZE_T ssize_t
#define __LA_UID_T uid_t
#define __LA_GID_T gid_t
diff --git a/Utilities/cmlibarchive/libarchive/archive_check_magic.c b/Utilities/cmlibarchive/libarchive/archive_check_magic.c
index a9177d7..e9dbe51 100644
--- a/Utilities/cmlibarchive/libarchive/archive_check_magic.c
+++ b/Utilities/cmlibarchive/libarchive/archive_check_magic.c
@@ -69,7 +69,7 @@ diediedie(void)
/* Cause a breakpoint exception */
DebugBreak();
#endif
- *(char *)0 = 1; /* Deliberately segfault and force a coredump. */
+ *(char *)1 = 1; /* Deliberately segfault and force a coredump. */
_exit(1); /* If that didn't work, just exit with an error. */
}
diff --git a/Utilities/cmlibarchive/libarchive/archive_endian.h b/Utilities/cmlibarchive/libarchive/archive_endian.h
index 067312d..58abee6 100644
--- a/Utilities/cmlibarchive/libarchive/archive_endian.h
+++ b/Utilities/cmlibarchive/libarchive/archive_endian.h
@@ -48,7 +48,7 @@
*/
#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__) || defined(__SUNPRO_C)
#define inline
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) || defined(__osf__)
#define inline __inline
#endif
diff --git a/Utilities/cmlibarchive/libarchive/archive_entry.h b/Utilities/cmlibarchive/libarchive/archive_entry.h
index 9c7cd43..e85285f 100644
--- a/Utilities/cmlibarchive/libarchive/archive_entry.h
+++ b/Utilities/cmlibarchive/libarchive/archive_entry.h
@@ -61,7 +61,11 @@
# endif
#else
# include <unistd.h>
-#define __LA_INT64_T int64_t
+#ifdef __osf__
+# define __LA_INT64_T long long
+#else
+# define __LA_INT64_T int64_t
+#endif
#define __LA_UID_T uid_t
#define __LA_GID_T gid_t
#define __LA_DEV_T dev_t
diff --git a/bootstrap b/bootstrap
index 01d9e15..0da868d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -839,7 +839,7 @@ mkdir "${cmake_bootstrap_dir}/${TMPFILE}"
cd "${cmake_bootstrap_dir}/${TMPFILE}"
echo '
test: test.c
- "'"${cmake_c_compiler}"'" -o test test.c
+ "'"${cmake_c_compiler}"'" '"${cmake_ld_flags} ${cmake_c_flags}"' -o test test.c
'>"Makefile"
echo '
#include <stdio.h>