Merge branch 'MakeCodeBlocksGeneratorNonVerbose2' into rule-messages
Conflicts: Source/cmGlobalUnixMakefileGenerator3.cxx Source/cmGlobalUnixMakefileGenerator3.h
This commit is contained in:
commit
dca304ec8d
|
@ -418,7 +418,7 @@ ENDIF()
|
||||||
# The CMake version number.
|
# The CMake version number.
|
||||||
SET(CMake_VERSION_MAJOR 2)
|
SET(CMake_VERSION_MAJOR 2)
|
||||||
SET(CMake_VERSION_MINOR 8)
|
SET(CMake_VERSION_MINOR 8)
|
||||||
SET(CMake_VERSION_PATCH 2)
|
SET(CMake_VERSION_PATCH 3)
|
||||||
#SET(CMake_VERSION_TWEAK 0)
|
#SET(CMake_VERSION_TWEAK 0)
|
||||||
#SET(CMake_VERSION_RC 1)
|
#SET(CMake_VERSION_RC 1)
|
||||||
|
|
||||||
|
|
410
ChangeLog.manual
410
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.
|
No changes in CMake 2.8.2 since 2.8.2-rc4.
|
||||||
|
|
||||||
Changes in CMake 2.8.2-rc4 (since 2.8.2-rc3)
|
Changes in CMake 2.8.2-rc4 (since 2.8.2-rc3)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# that can modify the build.
|
# that can modify the build.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2006-2009 Kitware, Inc.
|
# Copyright 2006-2010 Kitware, Inc.
|
||||||
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
|
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
|
||||||
#
|
#
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
# 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
|
# Some compilers do not fail with a bad flag
|
||||||
FAIL_REGEX "unrecognized .*option" # GNU
|
FAIL_REGEX "unrecognized .*option" # GNU
|
||||||
FAIL_REGEX "ignoring unknown option" # MSVC
|
FAIL_REGEX "ignoring unknown option" # MSVC
|
||||||
|
FAIL_REGEX "warning D9002" # MSVC, any lang
|
||||||
FAIL_REGEX "[Uu]nknown option" # HP
|
FAIL_REGEX "[Uu]nknown option" # HP
|
||||||
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
|
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
|
||||||
FAIL_REGEX "command option .* is not recognized" # XL
|
FAIL_REGEX "command option .* is not recognized" # XL
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# modify the build.
|
# modify the build.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2006-2009 Kitware, Inc.
|
# Copyright 2006-2010 Kitware, Inc.
|
||||||
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
|
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
|
||||||
#
|
#
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
# 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
|
# Some compilers do not fail with a bad flag
|
||||||
FAIL_REGEX "unrecognized .*option" # GNU
|
FAIL_REGEX "unrecognized .*option" # GNU
|
||||||
FAIL_REGEX "ignoring unknown option" # MSVC
|
FAIL_REGEX "ignoring unknown option" # MSVC
|
||||||
|
FAIL_REGEX "warning D9002" # MSVC, any lang
|
||||||
FAIL_REGEX "[Uu]nknown option" # HP
|
FAIL_REGEX "[Uu]nknown option" # HP
|
||||||
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
|
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
|
||||||
FAIL_REGEX "command option .* is not recognized" # XL
|
FAIL_REGEX "command option .* is not recognized" # XL
|
||||||
|
|
|
@ -51,12 +51,19 @@ FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
|
||||||
MARK_AS_ADVANCED(BISON_EXECUTABLE)
|
MARK_AS_ADVANCED(BISON_EXECUTABLE)
|
||||||
|
|
||||||
IF(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
|
EXECUTE_PROCESS(COMMAND ${BISON_EXECUTABLE} --version
|
||||||
OUTPUT_VARIABLE BISON_version_output
|
OUTPUT_VARIABLE BISON_version_output
|
||||||
ERROR_VARIABLE BISON_version_error
|
ERROR_VARIABLE BISON_version_error
|
||||||
RESULT_VARIABLE BISON_version_result
|
RESULT_VARIABLE BISON_version_result
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
SET(ENV{LC_ALL} ${_Bison_SAVED_LC_ALL})
|
||||||
|
|
||||||
IF(NOT ${BISON_version_result} EQUAL 0)
|
IF(NOT ${BISON_version_result} EQUAL 0)
|
||||||
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
|
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
|
||||||
ELSE()
|
ELSE()
|
||||||
|
@ -115,7 +122,7 @@ IF(BISON_EXECUTABLE)
|
||||||
IF("${ARGV5}" STREQUAL "VERBOSE")
|
IF("${ARGV5}" STREQUAL "VERBOSE")
|
||||||
BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV6}")
|
BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV6}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF("${ARGV5}" STREQUAL "COMPILE_FLAGS")
|
IF("${ARGV5}" STREQUAL "COMPILE_FLAGS")
|
||||||
BISON_TARGET_option_extraopts("${ARGV6}")
|
BISON_TARGET_option_extraopts("${ARGV6}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -125,10 +132,10 @@ IF(BISON_EXECUTABLE)
|
||||||
LIST(APPEND BISON_TARGET_cmdopt "-d")
|
LIST(APPEND BISON_TARGET_cmdopt "-d")
|
||||||
STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
|
STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
|
||||||
STRING(REPLACE "c" "h" _fileext ${_fileext})
|
STRING(REPLACE "c" "h" _fileext ${_fileext})
|
||||||
STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
|
STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
|
||||||
BISON_${Name}_OUTPUT_HEADER "${ARGV2}")
|
BISON_${Name}_OUTPUT_HEADER "${ARGV2}")
|
||||||
LIST(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
|
LIST(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT ${BISON_TARGET_outputs}
|
ADD_CUSTOM_COMMAND(OUTPUT ${BISON_TARGET_outputs}
|
||||||
${BISON_TARGET_extraoutputs}
|
${BISON_TARGET_extraoutputs}
|
||||||
COMMAND ${BISON_EXECUTABLE}
|
COMMAND ${BISON_EXECUTABLE}
|
||||||
|
@ -136,7 +143,7 @@ IF(BISON_EXECUTABLE)
|
||||||
DEPENDS ${ARGV1}
|
DEPENDS ${ARGV1}
|
||||||
COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
|
COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
# define target variables
|
# define target variables
|
||||||
SET(BISON_${Name}_DEFINED TRUE)
|
SET(BISON_${Name}_DEFINED TRUE)
|
||||||
SET(BISON_${Name}_INPUT ${ARGV1})
|
SET(BISON_${Name}_INPUT ${ARGV1})
|
||||||
|
|
|
@ -916,6 +916,7 @@ ELSE (_boost_IN_CACHE)
|
||||||
${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_VERSION}
|
||||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
|
${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_VERSION}
|
||||||
|
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
|
||||||
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
|
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
|
||||||
${Boost_LIB_PREFIX}boost_${COMPONENT} )
|
${Boost_LIB_PREFIX}boost_${COMPONENT} )
|
||||||
if(_boost_STATIC_RUNTIME_WORKAROUND)
|
if(_boost_STATIC_RUNTIME_WORKAROUND)
|
||||||
|
|
|
@ -66,6 +66,10 @@
|
||||||
# (To distribute this file outside of CMake, substitute the full
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# 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)
|
# Version 1.2 (8/30/2010) (CMake 2.8.3)
|
||||||
# * Merge patch for detecting gdk-pixbuf library (split off
|
# * Merge patch for detecting gdk-pixbuf library (split off
|
||||||
# from core GTK in 2.21). Thanks to Vincent Untz for the patch
|
# 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})
|
set(_library ${_lib})
|
||||||
|
|
||||||
if(_expand_vc)
|
if(_expand_vc AND MSVC)
|
||||||
# Add vc80/vc90 midfixes
|
# Add vc80/vc90/vc100 midfixes
|
||||||
if(MSVC80)
|
if(MSVC80)
|
||||||
set(_library ${_library}-vc80)
|
set(_library ${_library}-vc80)
|
||||||
set(_library_d ${_library}-d)
|
|
||||||
elseif(MSVC90)
|
elseif(MSVC90)
|
||||||
set(_library ${_library}-vc90)
|
set(_library ${_library}-vc90)
|
||||||
set(_library_d ${_library}-d)
|
elseif(MSVC10)
|
||||||
|
set(_library ${_library}-vc100)
|
||||||
endif()
|
endif()
|
||||||
|
set(_library_d ${_library}-d)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(GTK2_DEBUG)
|
if(GTK2_DEBUG)
|
||||||
|
|
|
@ -147,6 +147,32 @@ if (PERL_EXECUTABLE)
|
||||||
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORLIB ${PERL_VENDORLIB_OUTPUT_VARIABLE})
|
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORLIB ${PERL_VENDORLIB_OUTPUT_VARIABLE})
|
||||||
endif (NOT PERL_VENDORLIB_RESULT_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
|
### PERL_ARCHLIB
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND
|
COMMAND
|
||||||
|
@ -158,6 +184,7 @@ if (PERL_EXECUTABLE)
|
||||||
)
|
)
|
||||||
if (NOT PERL_ARCHLIB_RESULT_VARIABLE)
|
if (NOT PERL_ARCHLIB_RESULT_VARIABLE)
|
||||||
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_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)
|
endif (NOT PERL_ARCHLIB_RESULT_VARIABLE)
|
||||||
|
|
||||||
### PERL_PRIVLIB
|
### PERL_PRIVLIB
|
||||||
|
@ -171,6 +198,7 @@ if (PERL_EXECUTABLE)
|
||||||
)
|
)
|
||||||
if (NOT PERL_PRIVLIB_RESULT_VARIABLE)
|
if (NOT PERL_PRIVLIB_RESULT_VARIABLE)
|
||||||
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_PRIVLIB ${PERL_PRIVLIB_OUTPUT_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)
|
endif (NOT PERL_PRIVLIB_RESULT_VARIABLE)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -482,7 +482,7 @@ IF (QT_QMAKE_EXECUTABLE)
|
||||||
_qt4_query_qmake(QT_VERSION QTVERSION)
|
_qt4_query_qmake(QT_VERSION QTVERSION)
|
||||||
|
|
||||||
# check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
|
# 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)
|
SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
|
||||||
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
|
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
|
||||||
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
|
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
|
||||||
|
@ -493,7 +493,7 @@ IF (QT_QMAKE_EXECUTABLE)
|
||||||
IF(QT_QMAKE_EXECUTABLE)
|
IF(QT_QMAKE_EXECUTABLE)
|
||||||
_qt4_query_qmake(QT_VERSION QTVERSION)
|
_qt4_query_qmake(QT_VERSION QTVERSION)
|
||||||
ENDIF(QT_QMAKE_EXECUTABLE)
|
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
|
# 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}")
|
STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
|
||||||
|
|
|
@ -196,11 +196,16 @@ MACRO (QT4_ADD_RESOURCES outfiles )
|
||||||
ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
|
ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
|
||||||
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||||
ENDFOREACH(_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}
|
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||||
COMMAND ${QT_RCC_EXECUTABLE}
|
COMMAND ${QT_RCC_EXECUTABLE}
|
||||||
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
||||||
MAIN_DEPENDENCY ${infile}
|
MAIN_DEPENDENCY ${infile}
|
||||||
DEPENDS ${_RC_DEPENDS})
|
DEPENDS ${_RC_DEPENDS} "${out_depends}")
|
||||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||||
ENDFOREACH (it)
|
ENDFOREACH (it)
|
||||||
|
|
||||||
|
|
|
@ -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("")
|
|
|
@ -19,13 +19,6 @@ ELSE(NOT QT4_FOUND)
|
||||||
|
|
||||||
INCLUDE(${QT_USE_FILE})
|
INCLUDE(${QT_USE_FILE})
|
||||||
SET(CMAKE_PACKAGE_QTGUI TRUE)
|
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
|
SET(SRCS
|
||||||
AddCacheEntry.cxx
|
AddCacheEntry.cxx
|
||||||
AddCacheEntry.h
|
AddCacheEntry.h
|
||||||
|
@ -86,12 +79,8 @@ ELSE(NOT QT4_FOUND)
|
||||||
SET(CMAKE_INSTALL_DESTINATION_ARGS
|
SET(CMAKE_INSTALL_DESTINATION_ARGS
|
||||||
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
|
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
|
||||||
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
|
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
|
INSTALL(TARGETS cmake-gui RUNTIME DESTINATION bin ${CMAKE_INSTALL_DESTINATION_ARGS})
|
||||||
IF(CMAKE_PACKAGE_QTGUI)
|
|
||||||
INSTALL(TARGETS cmake-gui RUNTIME DESTINATION bin
|
|
||||||
${CMAKE_INSTALL_DESTINATION_ARGS})
|
|
||||||
ENDIF(CMAKE_PACKAGE_QTGUI)
|
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
# install a desktop file so CMake appears in the application start menu
|
# 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")
|
"${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh")
|
||||||
INSTALL(CODE "execute_process(COMMAND ln -s \"../MacOS/${CMAKE_BUNDLE_NAME}\" cmake-gui
|
INSTALL(CODE "execute_process(COMMAND ln -s \"../MacOS/${CMAKE_BUNDLE_NAME}\" cmake-gui
|
||||||
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
|
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)
|
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"
|
CONFIGURE_FILE("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
|
||||||
"${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)
|
"${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)
|
||||||
ENDIF(NOT QT4_FOUND)
|
ENDIF(NOT QT4_FOUND)
|
||||||
|
|
|
@ -165,13 +165,25 @@ int main(int argc, char** argv)
|
||||||
if(args.count() == 2)
|
if(args.count() == 2)
|
||||||
{
|
{
|
||||||
cmsys_stl::string filePath = cmSystemTools::CollapseFullPath(args[1].toAscii().data());
|
cmsys_stl::string filePath = cmSystemTools::CollapseFullPath(args[1].toAscii().data());
|
||||||
|
|
||||||
|
// check if argument is a directory containing CMakeCache.txt
|
||||||
cmsys_stl::string buildFilePath =
|
cmsys_stl::string buildFilePath =
|
||||||
cmSystemTools::CollapseFullPath("CMakeCache.txt", filePath.c_str());
|
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 =
|
cmsys_stl::string srcFilePath =
|
||||||
cmSystemTools::CollapseFullPath("CMakeLists.txt", filePath.c_str());
|
cmSystemTools::CollapseFullPath("CMakeLists.txt", filePath.c_str());
|
||||||
|
|
||||||
if(cmSystemTools::FileExists(buildFilePath.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()))
|
else if(cmSystemTools::FileExists(srcFilePath.c_str()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -152,6 +152,9 @@ public:
|
||||||
"If any dependency is an OUTPUT of another custom command in the "
|
"If any dependency is an OUTPUT of another custom command in the "
|
||||||
"same directory (CMakeLists.txt file) CMake automatically brings the "
|
"same directory (CMakeLists.txt file) CMake automatically brings the "
|
||||||
"other custom command into the target in which this command is built. "
|
"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) "
|
"If DEPENDS specifies any target (created by an ADD_* command) "
|
||||||
"a target-level dependency is created to make sure the target is "
|
"a target-level dependency is created to make sure the target is "
|
||||||
"built before any target using this custom command. Additionally, "
|
"built before any target using this custom command. Additionally, "
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <cmsys/SystemTools.hxx>
|
#include <cmsys/SystemTools.hxx>
|
||||||
|
|
||||||
/* Some useful URLs:
|
/* Some useful URLs:
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.codeblocks.org
|
http://www.codeblocks.org
|
||||||
|
|
||||||
File format docs:
|
File format docs:
|
||||||
|
@ -63,16 +63,6 @@ cmExtraCodeBlocksGenerator::cmExtraCodeBlocksGenerator()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cmExtraCodeBlocksGenerator::SetGlobalGenerator(
|
|
||||||
cmGlobalGenerator* generator)
|
|
||||||
{
|
|
||||||
cmExternalMakefileProjectGenerator::SetGlobalGenerator(generator);
|
|
||||||
cmGlobalUnixMakefileGenerator3* mf = (cmGlobalUnixMakefileGenerator3*)
|
|
||||||
generator;
|
|
||||||
mf->SetToolSupportsColor(false);
|
|
||||||
mf->SetForceVerboseMakefiles(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cmExtraCodeBlocksGenerator::Generate()
|
void cmExtraCodeBlocksGenerator::Generate()
|
||||||
{
|
{
|
||||||
// for each sub project in the project create a codeblocks project
|
// for each sub project in the project create a codeblocks project
|
||||||
|
@ -107,7 +97,7 @@ void cmExtraCodeBlocksGenerator::CreateProjectFile(
|
||||||
/* Tree is used to create a "Virtual Folder" in CodeBlocks, in which all
|
/* Tree is used to create a "Virtual Folder" in CodeBlocks, in which all
|
||||||
CMake files this project depends on will be put. This means additionally
|
CMake files this project depends on will be put. This means additionally
|
||||||
to the "Sources" and "Headers" virtual folders of CodeBlocks, there will
|
to the "Sources" and "Headers" virtual folders of CodeBlocks, there will
|
||||||
now also be a "CMake Files" virtual folder.
|
now also be a "CMake Files" virtual folder.
|
||||||
Patch by Daniel Teske <daniel.teske AT nokia.com> (which use C::B project
|
Patch by Daniel Teske <daniel.teske AT nokia.com> (which use C::B project
|
||||||
files in QtCreator).*/
|
files in QtCreator).*/
|
||||||
struct Tree
|
struct Tree
|
||||||
|
@ -115,24 +105,24 @@ struct Tree
|
||||||
std::string path; //only one component of the path
|
std::string path; //only one component of the path
|
||||||
std::vector<Tree> folders;
|
std::vector<Tree> folders;
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
void InsertPath(const std::vector<std::string>& splitted,
|
void InsertPath(const std::vector<std::string>& splitted,
|
||||||
std::vector<std::string>::size_type start,
|
std::vector<std::string>::size_type start,
|
||||||
const std::string& fileName);
|
const std::string& fileName);
|
||||||
void BuildVirtualFolder(std::string& virtualFolders) const;
|
void BuildVirtualFolder(std::string& virtualFolders) const;
|
||||||
void BuildVirtualFolderImpl(std::string& virtualFolders,
|
void BuildVirtualFolderImpl(std::string& virtualFolders,
|
||||||
const std::string& prefix) const;
|
const std::string& prefix) const;
|
||||||
void BuildUnit(std::string& unitString, const std::string& fsPath) const;
|
void BuildUnit(std::string& unitString, const std::string& fsPath) const;
|
||||||
void BuildUnitImpl(std::string& unitString,
|
void BuildUnitImpl(std::string& unitString,
|
||||||
const std::string& virtualFolderPath,
|
const std::string& virtualFolderPath,
|
||||||
const std::string& fsPath) const;
|
const std::string& fsPath) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void Tree::InsertPath(const std::vector<std::string>& splitted,
|
void Tree::InsertPath(const std::vector<std::string>& splitted,
|
||||||
std::vector<std::string>::size_type start,
|
std::vector<std::string>::size_type start,
|
||||||
const std::string& fileName)
|
const std::string& fileName)
|
||||||
{
|
{
|
||||||
if (start == splitted.size())
|
if (start == splitted.size())
|
||||||
{
|
{
|
||||||
files.push_back(fileName);
|
files.push_back(fileName);
|
||||||
return;
|
return;
|
||||||
|
@ -301,7 +291,7 @@ void cmExtraCodeBlocksGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now build a virtual tree string
|
// Now build a virtual tree string
|
||||||
std::string virtualFolders;
|
std::string virtualFolders;
|
||||||
tree.BuildVirtualFolder(virtualFolders);
|
tree.BuildVirtualFolder(virtualFolders);
|
||||||
// And one for <Unit>
|
// And one for <Unit>
|
||||||
std::string unitFiles;
|
std::string unitFiles;
|
||||||
|
@ -323,7 +313,7 @@ void cmExtraCodeBlocksGenerator
|
||||||
|
|
||||||
this->AppendTarget(fout, "all", 0, make.c_str(), mf, compiler.c_str());
|
this->AppendTarget(fout, "all", 0, make.c_str(), mf, compiler.c_str());
|
||||||
|
|
||||||
// add all executable and library targets and some of the GLOBAL
|
// add all executable and library targets and some of the GLOBAL
|
||||||
// and UTILITY targets
|
// and UTILITY targets
|
||||||
for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin();
|
for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin();
|
||||||
lg!=lgs.end(); lg++)
|
lg!=lgs.end(); lg++)
|
||||||
|
@ -338,9 +328,9 @@ void cmExtraCodeBlocksGenerator
|
||||||
case cmTarget::GLOBAL_TARGET:
|
case cmTarget::GLOBAL_TARGET:
|
||||||
{
|
{
|
||||||
bool insertTarget = false;
|
bool insertTarget = false;
|
||||||
// Only add the global targets from CMAKE_BINARY_DIR,
|
// Only add the global targets from CMAKE_BINARY_DIR,
|
||||||
// not from the subdirs
|
// not from the subdirs
|
||||||
if (strcmp(makefile->GetStartOutputDirectory(),
|
if (strcmp(makefile->GetStartOutputDirectory(),
|
||||||
makefile->GetHomeOutputDirectory())==0)
|
makefile->GetHomeOutputDirectory())==0)
|
||||||
{
|
{
|
||||||
insertTarget = true;
|
insertTarget = true;
|
||||||
|
@ -362,7 +352,7 @@ void cmExtraCodeBlocksGenerator
|
||||||
}
|
}
|
||||||
if (insertTarget)
|
if (insertTarget)
|
||||||
{
|
{
|
||||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
this->AppendTarget(fout, ti->first.c_str(), 0,
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,13 +362,13 @@ void cmExtraCodeBlocksGenerator
|
||||||
// Experimental-"sub"targets as e.g. NightlyStart
|
// Experimental-"sub"targets as e.g. NightlyStart
|
||||||
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
||||||
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|
||||||
|| ((ti->first.find("Experimental")==0)
|
|| ((ti->first.find("Experimental")==0)
|
||||||
&& (ti->first!="Experimental")))
|
&& (ti->first!="Experimental")))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
this->AppendTarget(fout, ti->first.c_str(), 0,
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
break;
|
break;
|
||||||
case cmTarget::EXECUTABLE:
|
case cmTarget::EXECUTABLE:
|
||||||
|
@ -386,11 +376,11 @@ void cmExtraCodeBlocksGenerator
|
||||||
case cmTarget::SHARED_LIBRARY:
|
case cmTarget::SHARED_LIBRARY:
|
||||||
case cmTarget::MODULE_LIBRARY:
|
case cmTarget::MODULE_LIBRARY:
|
||||||
{
|
{
|
||||||
this->AppendTarget(fout, ti->first.c_str(), &ti->second,
|
this->AppendTarget(fout, ti->first.c_str(), &ti->second,
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
std::string fastTarget = ti->first;
|
std::string fastTarget = ti->first;
|
||||||
fastTarget += "/fast";
|
fastTarget += "/fast";
|
||||||
this->AppendTarget(fout, fastTarget.c_str(), &ti->second,
|
this->AppendTarget(fout, fastTarget.c_str(), &ti->second,
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -437,7 +427,7 @@ void cmExtraCodeBlocksGenerator
|
||||||
{
|
{
|
||||||
for(std::vector<std::string>::const_iterator
|
for(std::vector<std::string>::const_iterator
|
||||||
ext = mf->GetSourceExtensions().begin();
|
ext = mf->GetSourceExtensions().begin();
|
||||||
ext != mf->GetSourceExtensions().end();
|
ext != mf->GetSourceExtensions().end();
|
||||||
++ext)
|
++ext)
|
||||||
{
|
{
|
||||||
if ((*si)->GetExtension() == *ext)
|
if ((*si)->GetExtension() == *ext)
|
||||||
|
@ -467,11 +457,11 @@ void cmExtraCodeBlocksGenerator
|
||||||
|
|
||||||
// The following loop tries to add header files matching to implementation
|
// The following loop tries to add header files matching to implementation
|
||||||
// files to the project. It does that by iterating over all source files,
|
// files to the project. It does that by iterating over all source files,
|
||||||
// replacing the file name extension with ".h" and checks whether such a
|
// replacing the file name extension with ".h" and checks whether such a
|
||||||
// file exists. If it does, it is inserted into the map of files.
|
// file exists. If it does, it is inserted into the map of files.
|
||||||
// A very similar version of that code exists also in the kdevelop
|
// A very similar version of that code exists also in the kdevelop
|
||||||
// project generator.
|
// project generator.
|
||||||
for (std::map<std::string, cmSourceFile*>::const_iterator
|
for (std::map<std::string, cmSourceFile*>::const_iterator
|
||||||
sit=cFiles.begin();
|
sit=cFiles.begin();
|
||||||
sit!=cFiles.end();
|
sit!=cFiles.end();
|
||||||
++sit)
|
++sit)
|
||||||
|
@ -483,7 +473,7 @@ void cmExtraCodeBlocksGenerator
|
||||||
// check if there's a matching header around
|
// check if there's a matching header around
|
||||||
for(std::vector<std::string>::const_iterator
|
for(std::vector<std::string>::const_iterator
|
||||||
ext = mf->GetHeaderExtensions().begin();
|
ext = mf->GetHeaderExtensions().begin();
|
||||||
ext != mf->GetHeaderExtensions().end();
|
ext != mf->GetHeaderExtensions().end();
|
||||||
++ext)
|
++ext)
|
||||||
{
|
{
|
||||||
std::string hname=headerBasename;
|
std::string hname=headerBasename;
|
||||||
|
@ -506,7 +496,7 @@ void cmExtraCodeBlocksGenerator
|
||||||
|
|
||||||
// insert all source files in the CodeBlocks project
|
// insert all source files in the CodeBlocks project
|
||||||
// first the C/C++ implementation files, then all others
|
// first the C/C++ implementation files, then all others
|
||||||
for (std::map<std::string, cmSourceFile*>::const_iterator
|
for (std::map<std::string, cmSourceFile*>::const_iterator
|
||||||
sit=cFiles.begin();
|
sit=cFiles.begin();
|
||||||
sit!=cFiles.end();
|
sit!=cFiles.end();
|
||||||
++sit)
|
++sit)
|
||||||
|
@ -514,7 +504,7 @@ void cmExtraCodeBlocksGenerator
|
||||||
fout<<" <Unit filename=\""<< sit->first <<"\">\n"
|
fout<<" <Unit filename=\""<< sit->first <<"\">\n"
|
||||||
" </Unit>\n";
|
" </Unit>\n";
|
||||||
}
|
}
|
||||||
for (std::set<std::string>::const_iterator
|
for (std::set<std::string>::const_iterator
|
||||||
sit=otherFiles.begin();
|
sit=otherFiles.begin();
|
||||||
sit!=otherFiles.end();
|
sit!=otherFiles.end();
|
||||||
++sit)
|
++sit)
|
||||||
|
@ -577,7 +567,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
||||||
" <Option compiler=\"" << compiler << "\" />\n"
|
" <Option compiler=\"" << compiler << "\" />\n"
|
||||||
" <Compiler>\n";
|
" <Compiler>\n";
|
||||||
// the include directories for this target
|
// the include directories for this target
|
||||||
const std::vector<std::string>& incDirs =
|
const std::vector<std::string>& incDirs =
|
||||||
target->GetMakefile()->GetIncludeDirectories();
|
target->GetMakefile()->GetIncludeDirectories();
|
||||||
for(std::vector<std::string>::const_iterator dirIt=incDirs.begin();
|
for(std::vector<std::string>::const_iterator dirIt=incDirs.begin();
|
||||||
dirIt != incDirs.end();
|
dirIt != incDirs.end();
|
||||||
|
@ -589,27 +579,27 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
||||||
}
|
}
|
||||||
else // e.g. all and the GLOBAL and UTILITY targets
|
else // e.g. all and the GLOBAL and UTILITY targets
|
||||||
{
|
{
|
||||||
fout<<" <Option working_dir=\""
|
fout<<" <Option working_dir=\""
|
||||||
<< makefile->GetStartOutputDirectory() << "\" />\n"
|
<< makefile->GetStartOutputDirectory() << "\" />\n"
|
||||||
<<" <Option type=\"" << 4 << "\" />\n";
|
<<" <Option type=\"" << 4 << "\" />\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
fout<<" <MakeCommands>\n"
|
fout<<" <MakeCommands>\n"
|
||||||
" <Build command=\""
|
" <Build command=\""
|
||||||
<< this->BuildMakeCommand(make, makefileName.c_str(), targetName)
|
<< this->BuildMakeCommand(make, makefileName.c_str(), targetName)
|
||||||
<< "\" />\n"
|
<< "\" />\n"
|
||||||
" <CompileFile command=\""
|
" <CompileFile command=\""
|
||||||
<< this->BuildMakeCommand(make, makefileName.c_str(),""$file"")
|
<< this->BuildMakeCommand(make, makefileName.c_str(),""$file"")
|
||||||
<< "\" />\n"
|
<< "\" />\n"
|
||||||
" <Clean command=\""
|
" <Clean command=\""
|
||||||
<< this->BuildMakeCommand(make, makefileName.c_str(), "clean")
|
<< this->BuildMakeCommand(make, makefileName.c_str(), "clean")
|
||||||
<< "\" />\n"
|
<< "\" />\n"
|
||||||
" <DistClean command=\""
|
" <DistClean command=\""
|
||||||
<< this->BuildMakeCommand(make, makefileName.c_str(), "clean")
|
<< this->BuildMakeCommand(make, makefileName.c_str(), "clean")
|
||||||
<< "\" />\n"
|
<< "\" />\n"
|
||||||
" </MakeCommands>\n"
|
" </MakeCommands>\n"
|
||||||
" </Target>\n";
|
" </Target>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -675,7 +665,7 @@ int cmExtraCodeBlocksGenerator::GetCBTargetType(cmTarget* target)
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else if ((target->GetType()==cmTarget::SHARED_LIBRARY)
|
else if ((target->GetType()==cmTarget::SHARED_LIBRARY)
|
||||||
|| (target->GetType()==cmTarget::MODULE_LIBRARY))
|
|| (target->GetType()==cmTarget::MODULE_LIBRARY))
|
||||||
{
|
{
|
||||||
return 3;
|
return 3;
|
||||||
|
@ -695,16 +685,18 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand(
|
||||||
command += " /NOLOGO /f "";
|
command += " /NOLOGO /f "";
|
||||||
command += makefileName;
|
command += makefileName;
|
||||||
command += "" ";
|
command += "" ";
|
||||||
|
command += " VERBOSE=1 ";
|
||||||
command += target;
|
command += target;
|
||||||
}
|
}
|
||||||
else if (strcmp(this->GlobalGenerator->GetName(), "MinGW Makefiles")==0)
|
else if (strcmp(this->GlobalGenerator->GetName(), "MinGW Makefiles")==0)
|
||||||
{
|
{
|
||||||
// no escaping of spaces in this case, see
|
// no escaping of spaces in this case, see
|
||||||
// http://public.kitware.com/Bug/view.php?id=10014
|
// http://public.kitware.com/Bug/view.php?id=10014
|
||||||
std::string makefileName = makefile;
|
std::string makefileName = makefile;
|
||||||
command += " -f "";
|
command += " -f "";
|
||||||
command += makefileName;
|
command += makefileName;
|
||||||
command += "" ";
|
command += "" ";
|
||||||
|
command += " VERBOSE=1 ";
|
||||||
command += target;
|
command += target;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -713,6 +705,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand(
|
||||||
command += " -f "";
|
command += " -f "";
|
||||||
command += makefileName;
|
command += makefileName;
|
||||||
command += "" ";
|
command += "" ";
|
||||||
|
command += " VERBOSE=1 ";
|
||||||
command += target;
|
command += target;
|
||||||
}
|
}
|
||||||
return command;
|
return command;
|
||||||
|
|
|
@ -22,22 +22,19 @@ class cmGeneratedFileStream;
|
||||||
|
|
||||||
/** \class cmExtraCodeBlocksGenerator
|
/** \class cmExtraCodeBlocksGenerator
|
||||||
* \brief Write CodeBlocks project files for Makefile based projects
|
* \brief Write CodeBlocks project files for Makefile based projects
|
||||||
*
|
|
||||||
* This generator is in early alpha stage.
|
|
||||||
*/
|
*/
|
||||||
class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
|
class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmExtraCodeBlocksGenerator();
|
cmExtraCodeBlocksGenerator();
|
||||||
virtual void SetGlobalGenerator(cmGlobalGenerator* generator);
|
|
||||||
|
|
||||||
virtual const char* GetName() const
|
virtual const char* GetName() const
|
||||||
{ return cmExtraCodeBlocksGenerator::GetActualName();}
|
{ return cmExtraCodeBlocksGenerator::GetActualName();}
|
||||||
static const char* GetActualName() { return "CodeBlocks";}
|
static const char* GetActualName() { return "CodeBlocks";}
|
||||||
static cmExternalMakefileProjectGenerator* New()
|
static cmExternalMakefileProjectGenerator* New()
|
||||||
{ return new cmExtraCodeBlocksGenerator; }
|
{ return new cmExtraCodeBlocksGenerator; }
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
||||||
const char* fullName) const;
|
const char* fullName) const;
|
||||||
|
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
@ -49,7 +46,7 @@ private:
|
||||||
const std::string& filename);
|
const std::string& filename);
|
||||||
std::string GetCBCompilerId(const cmMakefile* mf);
|
std::string GetCBCompilerId(const cmMakefile* mf);
|
||||||
int GetCBTargetType(cmTarget* target);
|
int GetCBTargetType(cmTarget* target);
|
||||||
std::string BuildMakeCommand(const std::string& make, const char* makefile,
|
std::string BuildMakeCommand(const std::string& make, const char* makefile,
|
||||||
const char* target);
|
const char* target);
|
||||||
void AppendTarget(cmGeneratedFileStream& fout,
|
void AppendTarget(cmGeneratedFileStream& fout,
|
||||||
const char* targetName,
|
const char* targetName,
|
||||||
|
|
|
@ -51,16 +51,6 @@ void cmExtraEclipseCDT4Generator
|
||||||
"the default make target. A \"make install\" target is also provided.";
|
"the default make target. A \"make install\" target is also provided.";
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
void cmExtraEclipseCDT4Generator
|
|
||||||
::SetGlobalGenerator(cmGlobalGenerator* generator)
|
|
||||||
{
|
|
||||||
cmExternalMakefileProjectGenerator::SetGlobalGenerator(generator);
|
|
||||||
cmGlobalUnixMakefileGenerator3* mf
|
|
||||||
= static_cast<cmGlobalUnixMakefileGenerator3*>(generator);
|
|
||||||
mf->SetToolSupportsColor(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmExtraEclipseCDT4Generator::Generate()
|
void cmExtraEclipseCDT4Generator::Generate()
|
||||||
{
|
{
|
||||||
|
@ -73,7 +63,7 @@ void cmExtraEclipseCDT4Generator::Generate()
|
||||||
|
|
||||||
this->IsOutOfSourceBuild = (this->HomeDirectory!=this->HomeOutputDirectory);
|
this->IsOutOfSourceBuild = (this->HomeDirectory!=this->HomeOutputDirectory);
|
||||||
|
|
||||||
this->GenerateSourceProject = (this->IsOutOfSourceBuild &&
|
this->GenerateSourceProject = (this->IsOutOfSourceBuild &&
|
||||||
mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT"));
|
mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT"));
|
||||||
|
|
||||||
// NOTE: This is not good, since it pollutes the source tree. However,
|
// NOTE: This is not good, since it pollutes the source tree. However,
|
||||||
|
@ -109,7 +99,7 @@ void cmExtraEclipseCDT4Generator::CreateSourceProjectFile() const
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fout <<
|
fout <<
|
||||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||||
"<projectDescription>\n"
|
"<projectDescription>\n"
|
||||||
"\t<name>" << name << "</name>\n"
|
"\t<name>" << name << "</name>\n"
|
||||||
|
@ -129,7 +119,7 @@ void cmExtraEclipseCDT4Generator::CreateSourceProjectFile() const
|
||||||
void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
|
void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
|
||||||
const char* envVar, cmMakefile* mf)
|
const char* envVar, cmMakefile* mf)
|
||||||
{
|
{
|
||||||
// get the variables from the environment and from the cache and then
|
// get the variables from the environment and from the cache and then
|
||||||
// figure out which one to use:
|
// figure out which one to use:
|
||||||
|
|
||||||
const char* envVarValue = getenv(envVar);
|
const char* envVarValue = getenv(envVar);
|
||||||
|
@ -148,7 +138,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
|
||||||
}
|
}
|
||||||
else if (envVarValue!=0 && cacheValue==0)
|
else if (envVarValue!=0 && cacheValue==0)
|
||||||
{
|
{
|
||||||
// The variable is in the env, but not in the cache. Use it and put it
|
// The variable is in the env, but not in the cache. Use it and put it
|
||||||
// in the cache
|
// in the cache
|
||||||
valueToUse = envVarValue;
|
valueToUse = envVarValue;
|
||||||
mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
|
mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
|
||||||
|
@ -206,7 +196,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
|
||||||
compilerId = mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID");
|
compilerId = mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID");
|
||||||
}
|
}
|
||||||
|
|
||||||
fout <<
|
fout <<
|
||||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||||
"<projectDescription>\n"
|
"<projectDescription>\n"
|
||||||
"\t<name>" <<
|
"\t<name>" <<
|
||||||
|
@ -225,7 +215,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
|
||||||
;
|
;
|
||||||
|
|
||||||
// use clean target
|
// use clean target
|
||||||
fout <<
|
fout <<
|
||||||
"\t\t\t\t<dictionary>\n"
|
"\t\t\t\t<dictionary>\n"
|
||||||
"\t\t\t\t\t<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>\n"
|
"\t\t\t\t\t<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>\n"
|
||||||
"\t\t\t\t\t<value>clean</value>\n"
|
"\t\t\t\t\t<value>clean</value>\n"
|
||||||
|
@ -246,7 +236,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
|
||||||
|
|
||||||
// set the make command
|
// set the make command
|
||||||
std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
||||||
fout <<
|
fout <<
|
||||||
"\t\t\t\t<dictionary>\n"
|
"\t\t\t\t<dictionary>\n"
|
||||||
"\t\t\t\t\t<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>\n"
|
"\t\t\t\t\t<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>\n"
|
||||||
"\t\t\t\t\t<value>true</value>\n"
|
"\t\t\t\t\t<value>true</value>\n"
|
||||||
|
@ -296,7 +286,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
|
||||||
else if (compilerId == "Intel")
|
else if (compilerId == "Intel")
|
||||||
{
|
{
|
||||||
// if the env.var is set, use this one and put it in the cache
|
// if the env.var is set, use this one and put it in the cache
|
||||||
// if the env.var is not set, but the value is in the cache,
|
// if the env.var is not set, but the value is in the cache,
|
||||||
// use it from the cache:
|
// use it from the cache:
|
||||||
AddEnvVar(fout, "INTEL_LICENSE_FILE", mf);
|
AddEnvVar(fout, "INTEL_LICENSE_FILE", mf);
|
||||||
}
|
}
|
||||||
|
@ -392,9 +382,9 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
|
||||||
{
|
{
|
||||||
fout << "\t<linkedResources>\n";
|
fout << "\t<linkedResources>\n";
|
||||||
// create a linked resource to CMAKE_SOURCE_DIR
|
// create a linked resource to CMAKE_SOURCE_DIR
|
||||||
// (this is not done anymore for each project because of
|
// (this is not done anymore for each project because of
|
||||||
// http://public.kitware.com/Bug/view.php?id=9978 and because I found it
|
// http://public.kitware.com/Bug/view.php?id=9978 and because I found it
|
||||||
// actually quite confusing in bigger projects with many directories and
|
// actually quite confusing in bigger projects with many directories and
|
||||||
// projects, Alex
|
// projects, Alex
|
||||||
|
|
||||||
std::string sourceLinkedResourceName = "[Source directory]";
|
std::string sourceLinkedResourceName = "[Source directory]";
|
||||||
|
@ -440,7 +430,7 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
|
||||||
if(emittedDirs.find(dir) == emittedDirs.end())
|
if(emittedDirs.find(dir) == emittedDirs.end())
|
||||||
{
|
{
|
||||||
emittedDirs.insert(dir);
|
emittedDirs.insert(dir);
|
||||||
fout << "<pathentry include=\""
|
fout << "<pathentry include=\""
|
||||||
<< cmExtraEclipseCDT4Generator::GetEclipsePath(dir)
|
<< cmExtraEclipseCDT4Generator::GetEclipsePath(dir)
|
||||||
<< "\" kind=\"inc\" path=\"\" system=\"true\"/>\n";
|
<< "\" kind=\"inc\" path=\"\" system=\"true\"/>\n";
|
||||||
}
|
}
|
||||||
|
@ -452,7 +442,7 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
|
||||||
void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
{
|
{
|
||||||
std::set<std::string> emmited;
|
std::set<std::string> emmited;
|
||||||
|
|
||||||
const cmMakefile* mf
|
const cmMakefile* mf
|
||||||
= this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
|
= this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
|
||||||
|
|
||||||
|
@ -465,7 +455,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
}
|
}
|
||||||
|
|
||||||
// add header
|
// add header
|
||||||
fout <<
|
fout <<
|
||||||
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
|
||||||
"<?fileVersion 4.0.0?>\n\n"
|
"<?fileVersion 4.0.0?>\n\n"
|
||||||
"<cproject>\n"
|
"<cproject>\n"
|
||||||
|
@ -475,7 +465,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
fout << "<cconfiguration id=\"org.eclipse.cdt.core.default.config.1\">\n";
|
fout << "<cconfiguration id=\"org.eclipse.cdt.core.default.config.1\">\n";
|
||||||
|
|
||||||
// Configuration settings...
|
// Configuration settings...
|
||||||
fout <<
|
fout <<
|
||||||
"<storageModule"
|
"<storageModule"
|
||||||
" buildSystemId=\"org.eclipse.cdt.core.defaultConfigDataProvider\""
|
" buildSystemId=\"org.eclipse.cdt.core.defaultConfigDataProvider\""
|
||||||
" id=\"org.eclipse.cdt.core.default.config.1\""
|
" id=\"org.eclipse.cdt.core.default.config.1\""
|
||||||
|
@ -536,9 +526,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
fout << "</extensions>\n"
|
fout << "</extensions>\n"
|
||||||
"</storageModule>\n"
|
"</storageModule>\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
// ???
|
// ???
|
||||||
fout <<
|
fout <<
|
||||||
"<storageModule moduleId=\"org.eclipse.cdt.core.language.mapping\">\n"
|
"<storageModule moduleId=\"org.eclipse.cdt.core.language.mapping\">\n"
|
||||||
"<project-mappings/>\n"
|
"<project-mappings/>\n"
|
||||||
"</storageModule>\n"
|
"</storageModule>\n"
|
||||||
|
@ -619,13 +609,13 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
// we have -DFOO
|
// we have -DFOO
|
||||||
def = *di;
|
def = *di;
|
||||||
}
|
}
|
||||||
|
|
||||||
// insert the definition if not already added.
|
// insert the definition if not already added.
|
||||||
if(emmited.find(def) == emmited.end())
|
if(emmited.find(def) == emmited.end())
|
||||||
{
|
{
|
||||||
emmited.insert(def);
|
emmited.insert(def);
|
||||||
fout << "<pathentry kind=\"mac\" name=\"" << def
|
fout << "<pathentry kind=\"mac\" name=\"" << def
|
||||||
<< "\" path=\"\" value=\"" << this->EscapeForXML(val)
|
<< "\" path=\"\" value=\"" << this->EscapeForXML(val)
|
||||||
<< "\"/>\n";
|
<< "\"/>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -712,8 +702,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
= (*it)->GetMakefile()->GetIncludeDirectories();
|
= (*it)->GetMakefile()->GetIncludeDirectories();
|
||||||
this->AppendIncludeDirectories(fout, includeDirs, emmited);
|
this->AppendIncludeDirectories(fout, includeDirs, emmited);
|
||||||
}
|
}
|
||||||
// now also the system include directories, in case we found them in
|
// now also the system include directories, in case we found them in
|
||||||
// CMakeSystemSpecificInformation.cmake. This makes Eclipse find the
|
// CMakeSystemSpecificInformation.cmake. This makes Eclipse find the
|
||||||
// standard headers.
|
// standard headers.
|
||||||
mf->GetDefinition("CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS");
|
mf->GetDefinition("CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS");
|
||||||
std::string compiler = mf->GetSafeDefinition("CMAKE_C_COMPILER");
|
std::string compiler = mf->GetSafeDefinition("CMAKE_C_COMPILER");
|
||||||
|
@ -738,7 +728,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
fout << "</storageModule>\n";
|
fout << "</storageModule>\n";
|
||||||
|
|
||||||
// add build targets
|
// add build targets
|
||||||
fout <<
|
fout <<
|
||||||
"<storageModule moduleId=\"org.eclipse.cdt.make.core.buildtargets\">\n"
|
"<storageModule moduleId=\"org.eclipse.cdt.make.core.buildtargets\">\n"
|
||||||
"<buildTargets>\n"
|
"<buildTargets>\n"
|
||||||
;
|
;
|
||||||
|
@ -746,7 +736,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
||||||
cmGlobalGenerator* generator
|
cmGlobalGenerator* generator
|
||||||
= const_cast<cmGlobalGenerator*>(this->GlobalGenerator);
|
= const_cast<cmGlobalGenerator*>(this->GlobalGenerator);
|
||||||
|
|
||||||
std::string allTarget;
|
std::string allTarget;
|
||||||
std::string cleanTarget;
|
std::string cleanTarget;
|
||||||
if (generator->GetAllTargetName())
|
if (generator->GetAllTargetName())
|
||||||
|
@ -758,7 +748,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
cleanTarget = generator->GetCleanTargetName();
|
cleanTarget = generator->GetCleanTargetName();
|
||||||
}
|
}
|
||||||
|
|
||||||
// add all executable and library targets and some of the GLOBAL
|
// add all executable and library targets and some of the GLOBAL
|
||||||
// and UTILITY targets
|
// and UTILITY targets
|
||||||
for (std::vector<cmLocalGenerator*>::const_iterator
|
for (std::vector<cmLocalGenerator*>::const_iterator
|
||||||
it = this->GlobalGenerator->GetLocalGenerators().begin();
|
it = this->GlobalGenerator->GetLocalGenerators().begin();
|
||||||
|
@ -781,7 +771,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
case cmTarget::GLOBAL_TARGET:
|
case cmTarget::GLOBAL_TARGET:
|
||||||
{
|
{
|
||||||
bool insertTarget = false;
|
bool insertTarget = false;
|
||||||
// Only add the global targets from CMAKE_BINARY_DIR,
|
// Only add the global targets from CMAKE_BINARY_DIR,
|
||||||
// not from the subdirs
|
// not from the subdirs
|
||||||
if (subdir.empty())
|
if (subdir.empty())
|
||||||
{
|
{
|
||||||
|
@ -813,7 +803,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
// Experimental-"sub"targets as e.g. NightlyStart
|
// Experimental-"sub"targets as e.g. NightlyStart
|
||||||
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
||||||
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|
|| ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
|
||||||
|| ((ti->first.find("Experimental")==0)
|
|| ((ti->first.find("Experimental")==0)
|
||||||
&& (ti->first!="Experimental")))
|
&& (ti->first!="Experimental")))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
@ -842,7 +832,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// insert the all and clean targets in every subdir
|
// insert the all and clean targets in every subdir
|
||||||
if (!allTarget.empty())
|
if (!allTarget.empty())
|
||||||
{
|
{
|
||||||
|
@ -955,7 +945,7 @@ std::string cmExtraEclipseCDT4Generator::EscapeForXML(const std::string& value)
|
||||||
// Helper functions
|
// Helper functions
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmExtraEclipseCDT4Generator
|
void cmExtraEclipseCDT4Generator
|
||||||
::AppendStorageScanners(cmGeneratedFileStream& fout,
|
::AppendStorageScanners(cmGeneratedFileStream& fout,
|
||||||
const cmMakefile& makefile)
|
const cmMakefile& makefile)
|
||||||
{
|
{
|
||||||
// we need the "make" and the C (or C++) compiler which are used, Alex
|
// we need the "make" and the C (or C++) compiler which are used, Alex
|
||||||
|
@ -972,7 +962,7 @@ void cmExtraEclipseCDT4Generator
|
||||||
|
|
||||||
|
|
||||||
// the following right now hardcodes gcc behaviour :-/
|
// the following right now hardcodes gcc behaviour :-/
|
||||||
fout <<
|
fout <<
|
||||||
"<storageModule moduleId=\"scannerConfiguration\">\n"
|
"<storageModule moduleId=\"scannerConfiguration\">\n"
|
||||||
"<autodiscovery enabled=\"true\" problemReportingEnabled=\"true\""
|
"<autodiscovery enabled=\"true\" problemReportingEnabled=\"true\""
|
||||||
" selectedProfileId="
|
" selectedProfileId="
|
||||||
|
@ -996,8 +986,8 @@ void cmExtraEclipseCDT4Generator
|
||||||
// of that is to sort the targets in the view of Eclipse, so that at first
|
// of that is to sort the targets in the view of Eclipse, so that at first
|
||||||
// the global/utility/all/clean targets appear ": ", then the executable
|
// the global/utility/all/clean targets appear ": ", then the executable
|
||||||
// targets "[exe] ", then the libraries "[lib]", then the rules for the
|
// targets "[exe] ", then the libraries "[lib]", then the rules for the
|
||||||
// object files "[obj]", then for preprocessing only "[pre] " and
|
// object files "[obj]", then for preprocessing only "[pre] " and
|
||||||
// finally the assembly files "[to asm] ". Note the "to" in "to asm",
|
// finally the assembly files "[to asm] ". Note the "to" in "to asm",
|
||||||
// without it, "asm" would be the first targets in the list, with the "to"
|
// without it, "asm" would be the first targets in the list, with the "to"
|
||||||
// they are the last targets, which makes more sense.
|
// they are the last targets, which makes more sense.
|
||||||
void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
|
void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
|
||||||
|
@ -1006,7 +996,7 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
|
||||||
const std::string& path,
|
const std::string& path,
|
||||||
const char* prefix)
|
const char* prefix)
|
||||||
{
|
{
|
||||||
fout <<
|
fout <<
|
||||||
"<target name=\"" << prefix << target << "\""
|
"<target name=\"" << prefix << target << "\""
|
||||||
" path=\"" << path.c_str() << "\""
|
" path=\"" << path.c_str() << "\""
|
||||||
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
|
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
|
||||||
|
@ -1033,7 +1023,7 @@ void cmExtraEclipseCDT4Generator
|
||||||
bool runActionUseDefault,
|
bool runActionUseDefault,
|
||||||
bool sipParserEnabled)
|
bool sipParserEnabled)
|
||||||
{
|
{
|
||||||
fout <<
|
fout <<
|
||||||
"<profile id=\"" << profileID << "\">\n"
|
"<profile id=\"" << profileID << "\">\n"
|
||||||
"<buildOutputProvider>\n"
|
"<buildOutputProvider>\n"
|
||||||
"<openAction enabled=\"" << (openActionEnabled ? "true" : "false")
|
"<openAction enabled=\"" << (openActionEnabled ? "true" : "false")
|
||||||
|
|
|
@ -21,8 +21,6 @@ class cmGeneratedFileStream;
|
||||||
|
|
||||||
/** \class cmExtraEclipseCDT4Generator
|
/** \class cmExtraEclipseCDT4Generator
|
||||||
* \brief Write Eclipse project files for Makefile based projects
|
* \brief Write Eclipse project files for Makefile based projects
|
||||||
*
|
|
||||||
* This generator is in early alpha stage.
|
|
||||||
*/
|
*/
|
||||||
class cmExtraEclipseCDT4Generator : public cmExternalMakefileProjectGenerator
|
class cmExtraEclipseCDT4Generator : public cmExternalMakefileProjectGenerator
|
||||||
{
|
{
|
||||||
|
@ -42,8 +40,6 @@ public:
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
||||||
const char* fullName) const;
|
const char* fullName) const;
|
||||||
|
|
||||||
virtual void SetGlobalGenerator(cmGlobalGenerator* generator);
|
|
||||||
|
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -70,7 +66,7 @@ private:
|
||||||
static std::string EscapeForXML(const std::string& value);
|
static std::string EscapeForXML(const std::string& value);
|
||||||
|
|
||||||
// Helper functions
|
// Helper functions
|
||||||
static void AppendStorageScanners(cmGeneratedFileStream& fout,
|
static void AppendStorageScanners(cmGeneratedFileStream& fout,
|
||||||
const cmMakefile& makefile);
|
const cmMakefile& makefile);
|
||||||
static void AppendTarget (cmGeneratedFileStream& fout,
|
static void AppendTarget (cmGeneratedFileStream& fout,
|
||||||
const std::string& target,
|
const std::string& target,
|
||||||
|
@ -100,7 +96,7 @@ private:
|
||||||
const std::vector<std::string>& includeDirs,
|
const std::vector<std::string>& includeDirs,
|
||||||
std::set<std::string>& emittedDirs);
|
std::set<std::string>& emittedDirs);
|
||||||
|
|
||||||
static void AddEnvVar(cmGeneratedFileStream& fout, const char* envVar,
|
static void AddEnvVar(cmGeneratedFileStream& fout, const char* envVar,
|
||||||
cmMakefile* mf);
|
cmMakefile* mf);
|
||||||
|
|
||||||
std::vector<std::string> SrcLinkedResources;
|
std::vector<std::string> SrcLinkedResources;
|
||||||
|
|
|
@ -38,31 +38,31 @@ public:
|
||||||
///! Free any memory allocated with the GlobalGenerator
|
///! Free any memory allocated with the GlobalGenerator
|
||||||
cmGlobalGenerator();
|
cmGlobalGenerator();
|
||||||
virtual ~cmGlobalGenerator();
|
virtual ~cmGlobalGenerator();
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||||
|
|
||||||
///! Get the name for this generator
|
///! Get the name for this generator
|
||||||
virtual const char *GetName() const { return "Generic"; };
|
virtual const char *GetName() const { return "Generic"; };
|
||||||
|
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create LocalGenerators and process the CMakeLists files. This does not
|
* Create LocalGenerators and process the CMakeLists files. This does not
|
||||||
* actually produce any makefiles, DSPs, etc.
|
* actually produce any makefiles, DSPs, etc.
|
||||||
*/
|
*/
|
||||||
virtual void Configure();
|
virtual void Configure();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the all required files for building this project/tree. This
|
* Generate the all required files for building this project/tree. This
|
||||||
* basically creates a series of LocalGenerators for each directory and
|
* basically creates a series of LocalGenerators for each directory and
|
||||||
* requests that they Generate.
|
* requests that they Generate.
|
||||||
*/
|
*/
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set/Get and Clear the enabled languages.
|
* Set/Get and Clear the enabled languages.
|
||||||
*/
|
*/
|
||||||
void SetLanguageEnabled(const char*, cmMakefile* mf);
|
void SetLanguageEnabled(const char*, cmMakefile* mf);
|
||||||
bool GetLanguageEnabled(const char*) const;
|
bool GetLanguageEnabled(const char*) const;
|
||||||
|
@ -70,7 +70,7 @@ public:
|
||||||
void GetEnabledLanguages(std::vector<std::string>& lang);
|
void GetEnabledLanguages(std::vector<std::string>& lang);
|
||||||
/**
|
/**
|
||||||
* Try to determine system infomation such as shared library
|
* Try to determine system infomation such as shared library
|
||||||
* extension, pthreads, byte order etc.
|
* extension, pthreads, byte order etc.
|
||||||
*/
|
*/
|
||||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
||||||
cmMakefile *, bool optional);
|
cmMakefile *, bool optional);
|
||||||
|
@ -88,7 +88,7 @@ public:
|
||||||
const char *projectName, const char *targetName,
|
const char *projectName, const char *targetName,
|
||||||
bool fast, std::string *output, cmMakefile* mf);
|
bool fast, std::string *output, cmMakefile* mf);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a file given the following information. This is a more direct call
|
* Build a file given the following information. This is a more direct call
|
||||||
* that is used by both CTest and TryCompile. If target name is NULL or
|
* that is used by both CTest and TryCompile. If target name is NULL or
|
||||||
|
@ -104,28 +104,28 @@ public:
|
||||||
const char* extraOptions = 0,
|
const char* extraOptions = 0,
|
||||||
std::vector<std::string> const& nativeOptions =
|
std::vector<std::string> const& nativeOptions =
|
||||||
std::vector<std::string>());
|
std::vector<std::string>());
|
||||||
|
|
||||||
virtual std::string GenerateBuildCommand(
|
virtual std::string GenerateBuildCommand(
|
||||||
const char* makeProgram,
|
const char* makeProgram,
|
||||||
const char *projectName, const char* additionalOptions,
|
const char *projectName, const char* additionalOptions,
|
||||||
const char *targetName,
|
const char *targetName,
|
||||||
const char* config, bool ignoreErrors, bool fast);
|
const char* config, bool ignoreErrors, bool fast);
|
||||||
|
|
||||||
|
|
||||||
///! Set the CMake instance
|
///! Set the CMake instance
|
||||||
void SetCMakeInstance(cmake *cm);
|
void SetCMakeInstance(cmake *cm);
|
||||||
|
|
||||||
///! Get the CMake instance
|
///! Get the CMake instance
|
||||||
cmake *GetCMakeInstance() { return this->CMakeInstance; };
|
cmake *GetCMakeInstance() { return this->CMakeInstance; };
|
||||||
|
|
||||||
void SetConfiguredFilesPath(cmGlobalGenerator* gen);
|
void SetConfiguredFilesPath(cmGlobalGenerator* gen);
|
||||||
const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
|
const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
|
||||||
return this->LocalGenerators;}
|
return this->LocalGenerators;}
|
||||||
|
|
||||||
cmLocalGenerator* GetCurrentLocalGenerator()
|
cmLocalGenerator* GetCurrentLocalGenerator()
|
||||||
{return this->CurrentLocalGenerator;}
|
{return this->CurrentLocalGenerator;}
|
||||||
|
|
||||||
void SetCurrentLocalGenerator(cmLocalGenerator* lg)
|
void SetCurrentLocalGenerator(cmLocalGenerator* lg)
|
||||||
{this->CurrentLocalGenerator = lg;}
|
{this->CurrentLocalGenerator = lg;}
|
||||||
|
|
||||||
void AddLocalGenerator(cmLocalGenerator *lg);
|
void AddLocalGenerator(cmLocalGenerator *lg);
|
||||||
|
@ -138,11 +138,11 @@ public:
|
||||||
|
|
||||||
void AddInstallComponent(const char* component);
|
void AddInstallComponent(const char* component);
|
||||||
|
|
||||||
const std::set<cmStdString>* GetInstallComponents() const
|
const std::set<cmStdString>* GetInstallComponents() const
|
||||||
{ return &InstallComponents; }
|
{ return &InstallComponents; }
|
||||||
|
|
||||||
///! Add one installed target to the sets of the exports
|
///! Add one installed target to the sets of the exports
|
||||||
void AddTargetToExports(const char* exportSet, cmTarget* target,
|
void AddTargetToExports(const char* exportSet, cmTarget* target,
|
||||||
cmInstallTargetGenerator* archive,
|
cmInstallTargetGenerator* archive,
|
||||||
cmInstallTargetGenerator* runTime,
|
cmInstallTargetGenerator* runTime,
|
||||||
cmInstallTargetGenerator* library,
|
cmInstallTargetGenerator* library,
|
||||||
|
@ -158,10 +158,9 @@ public:
|
||||||
void EnableInstallTarget();
|
void EnableInstallTarget();
|
||||||
|
|
||||||
int TryCompileTimeout;
|
int TryCompileTimeout;
|
||||||
|
|
||||||
bool GetForceUnixPaths() {return this->ForceUnixPaths;}
|
bool GetForceUnixPaths() {return this->ForceUnixPaths;}
|
||||||
bool GetToolSupportsColor() { return this->ToolSupportsColor; }
|
bool GetToolSupportsColor() { return this->ToolSupportsColor; }
|
||||||
void SetToolSupportsColor(bool enable) { this->ToolSupportsColor = enable; }
|
|
||||||
|
|
||||||
///! return the language for the given extension
|
///! return the language for the given extension
|
||||||
const char* GetLanguageFromExtension(const char* ext);
|
const char* GetLanguageFromExtension(const char* ext);
|
||||||
|
@ -254,7 +253,7 @@ public:
|
||||||
bool BinaryDirectoryIsNew(const char* dir)
|
bool BinaryDirectoryIsNew(const char* dir)
|
||||||
{
|
{
|
||||||
return this->BinaryDirectories.insert(dir).second;
|
return this->BinaryDirectories.insert(dir).second;
|
||||||
}
|
}
|
||||||
/** Supported systems creates a GUID for the given name */
|
/** Supported systems creates a GUID for the given name */
|
||||||
virtual void CreateGUID(const char*) {}
|
virtual void CreateGUID(const char*) {}
|
||||||
|
|
||||||
|
@ -281,7 +280,7 @@ protected:
|
||||||
|
|
||||||
bool CheckTargets();
|
bool CheckTargets();
|
||||||
|
|
||||||
// Fill the ProjectMap, this must be called after LocalGenerators
|
// Fill the ProjectMap, this must be called after LocalGenerators
|
||||||
// has been populated.
|
// has been populated.
|
||||||
void FillProjectMap();
|
void FillProjectMap();
|
||||||
void CheckLocalGenerators();
|
void CheckLocalGenerators();
|
||||||
|
@ -328,13 +327,13 @@ protected:
|
||||||
private:
|
private:
|
||||||
float FirstTimeProgress;
|
float FirstTimeProgress;
|
||||||
// If you add a new map here, make sure it is copied
|
// If you add a new map here, make sure it is copied
|
||||||
// in EnableLanguagesFromGenerator
|
// in EnableLanguagesFromGenerator
|
||||||
std::map<cmStdString, bool> IgnoreExtensions;
|
std::map<cmStdString, bool> IgnoreExtensions;
|
||||||
std::map<cmStdString, bool> LanguageEnabled;
|
std::map<cmStdString, bool> LanguageEnabled;
|
||||||
std::map<cmStdString, cmStdString> OutputExtensions;
|
std::map<cmStdString, cmStdString> OutputExtensions;
|
||||||
std::map<cmStdString, cmStdString> LanguageToOutputExtension;
|
std::map<cmStdString, cmStdString> LanguageToOutputExtension;
|
||||||
std::map<cmStdString, cmStdString> ExtensionToLanguage;
|
std::map<cmStdString, cmStdString> ExtensionToLanguage;
|
||||||
std::map<cmStdString, int> LanguageToLinkerPreference;
|
std::map<cmStdString, int> LanguageToLinkerPreference;
|
||||||
|
|
||||||
// Record hashes for rules and outputs.
|
// Record hashes for rules and outputs.
|
||||||
struct RuleHash { char Data[32]; };
|
struct RuleHash { char Data[32]; };
|
||||||
|
|
|
@ -24,7 +24,6 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
|
||||||
this->ForceUnixPaths = true;
|
this->ForceUnixPaths = true;
|
||||||
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
|
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
|
||||||
this->ToolSupportsColor = true;
|
this->ToolSupportsColor = true;
|
||||||
this->ForceVerboseMakefiles = false;
|
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__VMS)
|
#if defined(_WIN32) || defined(__VMS)
|
||||||
this->UseLinkScript = false;
|
this->UseLinkScript = false;
|
||||||
|
@ -34,8 +33,8 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalUnixMakefileGenerator3
|
void cmGlobalUnixMakefileGenerator3
|
||||||
::EnableLanguage(std::vector<std::string>const& languages,
|
::EnableLanguage(std::vector<std::string>const& languages,
|
||||||
cmMakefile *mf,
|
cmMakefile *mf,
|
||||||
bool optional)
|
bool optional)
|
||||||
{
|
{
|
||||||
this->cmGlobalGenerator::EnableLanguage(languages, mf, optional);
|
this->cmGlobalGenerator::EnableLanguage(languages, mf, optional);
|
||||||
|
@ -51,17 +50,17 @@ void cmGlobalUnixMakefileGenerator3
|
||||||
std::string langComp = "CMAKE_";
|
std::string langComp = "CMAKE_";
|
||||||
langComp += lang;
|
langComp += lang;
|
||||||
langComp += "_COMPILER";
|
langComp += "_COMPILER";
|
||||||
|
|
||||||
if(!mf->GetDefinition(langComp.c_str()))
|
if(!mf->GetDefinition(langComp.c_str()))
|
||||||
{
|
{
|
||||||
if(!optional)
|
if(!optional)
|
||||||
{
|
{
|
||||||
cmSystemTools::Error(langComp.c_str(),
|
cmSystemTools::Error(langComp.c_str(),
|
||||||
" not set, after EnableLanguage");
|
" not set, after EnableLanguage");
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const char* name = mf->GetRequiredDefinition(langComp.c_str());
|
const char* name = mf->GetRequiredDefinition(langComp.c_str());
|
||||||
if(!cmSystemTools::FileIsFullPath(name))
|
if(!cmSystemTools::FileIsFullPath(name))
|
||||||
{
|
{
|
||||||
path = cmSystemTools::FindProgram(name);
|
path = cmSystemTools::FindProgram(name);
|
||||||
|
@ -70,7 +69,7 @@ void cmGlobalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
path = name;
|
path = name;
|
||||||
}
|
}
|
||||||
if((path.size() == 0 || !cmSystemTools::FileExists(path.c_str()))
|
if((path.size() == 0 || !cmSystemTools::FileExists(path.c_str()))
|
||||||
&& (optional==false))
|
&& (optional==false))
|
||||||
{
|
{
|
||||||
std::string message = "your ";
|
std::string message = "your ";
|
||||||
|
@ -96,8 +95,8 @@ void cmGlobalUnixMakefileGenerator3
|
||||||
cmSystemTools::ConvertToUnixSlashes(cnameString);
|
cmSystemTools::ConvertToUnixSlashes(cnameString);
|
||||||
cmSystemTools::ConvertToUnixSlashes(pathString);
|
cmSystemTools::ConvertToUnixSlashes(pathString);
|
||||||
if (cnameString != pathString)
|
if (cnameString != pathString)
|
||||||
{
|
{
|
||||||
const char* cvars =
|
const char* cvars =
|
||||||
this->GetCMakeInstance()->GetProperty(
|
this->GetCMakeInstance()->GetProperty(
|
||||||
"__CMAKE_DELETE_CACHE_CHANGE_VARS_");
|
"__CMAKE_DELETE_CACHE_CHANGE_VARS_");
|
||||||
if(cvars)
|
if(cvars)
|
||||||
|
@ -139,7 +138,7 @@ void cmGlobalUnixMakefileGenerator3
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalUnixMakefileGenerator3::Generate()
|
void cmGlobalUnixMakefileGenerator3::Generate()
|
||||||
{
|
{
|
||||||
// first do superclass method
|
// first do superclass method
|
||||||
this->cmGlobalGenerator::Generate();
|
this->cmGlobalGenerator::Generate();
|
||||||
|
@ -187,7 +186,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
|
||||||
// Open the output file. This should not be copy-if-different
|
// Open the output file. This should not be copy-if-different
|
||||||
// because the check-build-system step compares the makefile time to
|
// because the check-build-system step compares the makefile time to
|
||||||
// see if the build system must be regenerated.
|
// see if the build system must be regenerated.
|
||||||
std::string makefileName =
|
std::string makefileName =
|
||||||
this->GetCMakeInstance()->GetHomeOutputDirectory();
|
this->GetCMakeInstance()->GetHomeOutputDirectory();
|
||||||
makefileName += cmake::GetCMakeFilesDirectory();
|
makefileName += cmake::GetCMakeFilesDirectory();
|
||||||
makefileName += "/Makefile2";
|
makefileName += "/Makefile2";
|
||||||
|
@ -196,11 +195,11 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get a local generator for some useful methods
|
// get a local generator for some useful methods
|
||||||
cmLocalUnixMakefileGenerator3 *lg =
|
cmLocalUnixMakefileGenerator3 *lg =
|
||||||
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);
|
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);
|
||||||
|
|
||||||
// Write the do not edit header.
|
// Write the do not edit header.
|
||||||
lg->WriteDisclaimer(makefileStream);
|
lg->WriteDisclaimer(makefileStream);
|
||||||
|
|
||||||
|
@ -229,8 +228,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write and empty all:
|
// Write and empty all:
|
||||||
lg->WriteMakeRule(makefileStream,
|
lg->WriteMakeRule(makefileStream,
|
||||||
"The main recursive all target", "all",
|
"The main recursive all target", "all",
|
||||||
depends, no_commands, true);
|
depends, no_commands, true);
|
||||||
|
|
||||||
// Write an empty preinstall:
|
// Write an empty preinstall:
|
||||||
|
@ -240,12 +239,12 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
|
||||||
|
|
||||||
// Write out the "special" stuff
|
// Write out the "special" stuff
|
||||||
lg->WriteSpecialTargetsTop(makefileStream);
|
lg->WriteSpecialTargetsTop(makefileStream);
|
||||||
|
|
||||||
// write the target convenience rules
|
// write the target convenience rules
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
||||||
{
|
{
|
||||||
lg =
|
lg =
|
||||||
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
||||||
this->WriteConvenienceRules2(makefileStream,lg);
|
this->WriteConvenienceRules2(makefileStream,lg);
|
||||||
}
|
}
|
||||||
|
@ -261,7 +260,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
// Open the output file. This should not be copy-if-different
|
// Open the output file. This should not be copy-if-different
|
||||||
// because the check-build-system step compares the makefile time to
|
// because the check-build-system step compares the makefile time to
|
||||||
// see if the build system must be regenerated.
|
// see if the build system must be regenerated.
|
||||||
std::string cmakefileName =
|
std::string cmakefileName =
|
||||||
this->GetCMakeInstance()->GetHomeOutputDirectory();
|
this->GetCMakeInstance()->GetHomeOutputDirectory();
|
||||||
cmakefileName += cmake::GetCMakeFilesDirectory();
|
cmakefileName += cmake::GetCMakeFilesDirectory();
|
||||||
cmakefileName += "/Makefile.cmake";
|
cmakefileName += "/Makefile.cmake";
|
||||||
|
@ -271,14 +270,14 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string makefileName =
|
std::string makefileName =
|
||||||
this->GetCMakeInstance()->GetHomeOutputDirectory();
|
this->GetCMakeInstance()->GetHomeOutputDirectory();
|
||||||
makefileName += "/Makefile";
|
makefileName += "/Makefile";
|
||||||
|
|
||||||
// get a local generator for some useful methods
|
// get a local generator for some useful methods
|
||||||
cmLocalUnixMakefileGenerator3 *lg =
|
cmLocalUnixMakefileGenerator3 *lg =
|
||||||
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);
|
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);
|
||||||
|
|
||||||
// Write the do not edit header.
|
// Write the do not edit header.
|
||||||
lg->WriteDisclaimer(cmakefileStream);
|
lg->WriteDisclaimer(cmakefileStream);
|
||||||
|
|
||||||
|
@ -291,9 +290,9 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
std::vector<std::string> lfiles;
|
std::vector<std::string> lfiles;
|
||||||
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
|
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
|
||||||
{
|
{
|
||||||
lg =
|
lg =
|
||||||
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
||||||
|
|
||||||
// Get the list of files contributing to this generation step.
|
// Get the list of files contributing to this generation step.
|
||||||
lfiles.insert(lfiles.end(),lg->GetMakefile()->GetListFiles().begin(),
|
lfiles.insert(lfiles.end(),lg->GetMakefile()->GetListFiles().begin(),
|
||||||
lg->GetMakefile()->GetListFiles().end());
|
lg->GetMakefile()->GetListFiles().end());
|
||||||
|
@ -301,7 +300,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
// Sort the list and remove duplicates.
|
// Sort the list and remove duplicates.
|
||||||
std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
|
std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
|
||||||
#if !defined(__VMS) // The Compaq STL on VMS crashes, so accept duplicates.
|
#if !defined(__VMS) // The Compaq STL on VMS crashes, so accept duplicates.
|
||||||
std::vector<std::string>::iterator new_end =
|
std::vector<std::string>::iterator new_end =
|
||||||
std::unique(lfiles.begin(),lfiles.end());
|
std::unique(lfiles.begin(),lfiles.end());
|
||||||
lfiles.erase(new_end, lfiles.end());
|
lfiles.erase(new_end, lfiles.end());
|
||||||
#endif
|
#endif
|
||||||
|
@ -317,14 +316,14 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
cmakefileStream
|
cmakefileStream
|
||||||
<< "# The top level Makefile was generated from the following files:\n"
|
<< "# The top level Makefile was generated from the following files:\n"
|
||||||
<< "SET(CMAKE_MAKEFILE_DEPENDS\n"
|
<< "SET(CMAKE_MAKEFILE_DEPENDS\n"
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(cache.c_str(),
|
<< lg->Convert(cache.c_str(),
|
||||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
||||||
for(std::vector<std::string>::const_iterator i = lfiles.begin();
|
for(std::vector<std::string>::const_iterator i = lfiles.begin();
|
||||||
i != lfiles.end(); ++i)
|
i != lfiles.end(); ++i)
|
||||||
{
|
{
|
||||||
cmakefileStream
|
cmakefileStream
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT).c_str()
|
<< lg->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT).c_str()
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
|
@ -340,10 +339,10 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
cmakefileStream
|
cmakefileStream
|
||||||
<< "# The corresponding makefile is:\n"
|
<< "# The corresponding makefile is:\n"
|
||||||
<< "SET(CMAKE_MAKEFILE_OUTPUTS\n"
|
<< "SET(CMAKE_MAKEFILE_OUTPUTS\n"
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(makefileName.c_str(),
|
<< lg->Convert(makefileName.c_str(),
|
||||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"
|
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(check.c_str(),
|
<< lg->Convert(check.c_str(),
|
||||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
||||||
cmakefileStream << " )\n\n";
|
cmakefileStream << " )\n\n";
|
||||||
|
@ -367,19 +366,19 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
std::string tmpStr;
|
std::string tmpStr;
|
||||||
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
|
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
|
||||||
{
|
{
|
||||||
lg =
|
lg =
|
||||||
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
||||||
tmpStr = lg->GetMakefile()->GetStartOutputDirectory();
|
tmpStr = lg->GetMakefile()->GetStartOutputDirectory();
|
||||||
tmpStr += cmake::GetCMakeFilesDirectory();
|
tmpStr += cmake::GetCMakeFilesDirectory();
|
||||||
tmpStr += "/CMakeDirectoryInformation.cmake";
|
tmpStr += "/CMakeDirectoryInformation.cmake";
|
||||||
cmakefileStream << " \"" <<
|
cmakefileStream << " \"" <<
|
||||||
lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
|
lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
cmakefileStream << " )\n\n";
|
cmakefileStream << " )\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
this->WriteMainCMakefileLanguageRules(cmakefileStream,
|
this->WriteMainCMakefileLanguageRules(cmakefileStream,
|
||||||
this->LocalGenerators);
|
this->LocalGenerators);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,7 +457,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
|
|
||||||
// The directory-level rule should depend on the directory-level
|
// The directory-level rule should depend on the directory-level
|
||||||
// rules of the subdirectories.
|
// rules of the subdirectories.
|
||||||
for(std::vector<cmLocalGenerator*>::iterator sdi =
|
for(std::vector<cmLocalGenerator*>::iterator sdi =
|
||||||
lg->GetChildren().begin(); sdi != lg->GetChildren().end(); ++sdi)
|
lg->GetChildren().begin(); sdi != lg->GetChildren().end(); ++sdi)
|
||||||
{
|
{
|
||||||
cmLocalUnixMakefileGenerator3* slg =
|
cmLocalUnixMakefileGenerator3* slg =
|
||||||
|
@ -518,7 +517,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
|
|
||||||
|
|
||||||
std::string cmGlobalUnixMakefileGenerator3
|
std::string cmGlobalUnixMakefileGenerator3
|
||||||
::GenerateBuildCommand(const char* makeProgram, const char *projectName,
|
::GenerateBuildCommand(const char* makeProgram, const char *projectName,
|
||||||
const char* additionalOptions, const char *targetName,
|
const char* additionalOptions, const char *targetName,
|
||||||
const char* config, bool ignoreErrors, bool fast)
|
const char* config, bool ignoreErrors, bool fast)
|
||||||
{
|
{
|
||||||
|
@ -526,9 +525,9 @@ std::string cmGlobalUnixMakefileGenerator3
|
||||||
(void)projectName;
|
(void)projectName;
|
||||||
(void)config;
|
(void)config;
|
||||||
|
|
||||||
std::string makeCommand =
|
std::string makeCommand =
|
||||||
cmSystemTools::ConvertToUnixOutputPath(makeProgram);
|
cmSystemTools::ConvertToUnixOutputPath(makeProgram);
|
||||||
|
|
||||||
// Since we have full control over the invocation of nmake, let us
|
// Since we have full control over the invocation of nmake, let us
|
||||||
// make it quiet.
|
// make it quiet.
|
||||||
if ( strcmp(this->GetName(), "NMake Makefiles") == 0 )
|
if ( strcmp(this->GetName(), "NMake Makefiles") == 0 )
|
||||||
|
@ -563,7 +562,7 @@ std::string cmGlobalUnixMakefileGenerator3
|
||||||
(this->CMakeInstance->GetStartOutputDirectory());
|
(this->CMakeInstance->GetStartOutputDirectory());
|
||||||
lg->GetMakefile()->MakeStartDirectoriesCurrent();
|
lg->GetMakefile()->MakeStartDirectoriesCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
makeCommand += " \"";
|
makeCommand += " \"";
|
||||||
std::string tname = targetName;
|
std::string tname = targetName;
|
||||||
if(fast)
|
if(fast)
|
||||||
|
@ -585,14 +584,14 @@ std::string cmGlobalUnixMakefileGenerator3
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
cmGlobalUnixMakefileGenerator3
|
cmGlobalUnixMakefileGenerator3
|
||||||
::WriteConvenienceRules(std::ostream& ruleFileStream,
|
::WriteConvenienceRules(std::ostream& ruleFileStream,
|
||||||
std::set<cmStdString> &emitted)
|
std::set<cmStdString> &emitted)
|
||||||
{
|
{
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
std::vector<std::string> commands;
|
std::vector<std::string> commands;
|
||||||
|
|
||||||
depends.push_back("cmake_check_build_system");
|
depends.push_back("cmake_check_build_system");
|
||||||
|
|
||||||
// write the target convenience rules
|
// write the target convenience rules
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
cmLocalUnixMakefileGenerator3 *lg;
|
cmLocalUnixMakefileGenerator3 *lg;
|
||||||
|
@ -622,7 +621,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
ruleFileStream
|
ruleFileStream
|
||||||
<< "# Target rules for targets named "
|
<< "# Target rules for targets named "
|
||||||
<< t->second.GetName() << "\n\n";
|
<< t->second.GetName() << "\n\n";
|
||||||
|
|
||||||
// Write the rule.
|
// Write the rule.
|
||||||
commands.clear();
|
commands.clear();
|
||||||
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
|
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
|
||||||
|
@ -631,16 +630,16 @@ cmGlobalUnixMakefileGenerator3
|
||||||
(tmp.c_str(),t->second.GetName()));
|
(tmp.c_str(),t->second.GetName()));
|
||||||
depends.clear();
|
depends.clear();
|
||||||
depends.push_back("cmake_check_build_system");
|
depends.push_back("cmake_check_build_system");
|
||||||
lg->WriteMakeRule(ruleFileStream,
|
lg->WriteMakeRule(ruleFileStream,
|
||||||
"Build rule for target.",
|
"Build rule for target.",
|
||||||
t->second.GetName(), depends, commands,
|
t->second.GetName(), depends, commands,
|
||||||
true);
|
true);
|
||||||
|
|
||||||
// Add a fast rule to build the target
|
// Add a fast rule to build the target
|
||||||
std::string localName = lg->GetRelativeTargetDirectory(t->second);
|
std::string localName = lg->GetRelativeTargetDirectory(t->second);
|
||||||
std::string makefileName;
|
std::string makefileName;
|
||||||
makefileName = localName;
|
makefileName = localName;
|
||||||
makefileName += "/build.make";
|
makefileName += "/build.make";
|
||||||
depends.clear();
|
depends.clear();
|
||||||
commands.clear();
|
commands.clear();
|
||||||
std::string makeTargetName = localName;
|
std::string makeTargetName = localName;
|
||||||
|
@ -677,10 +676,10 @@ cmGlobalUnixMakefileGenerator3
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
cmGlobalUnixMakefileGenerator3
|
cmGlobalUnixMakefileGenerator3
|
||||||
::WriteConvenienceRules2(std::ostream& ruleFileStream,
|
::WriteConvenienceRules2(std::ostream& ruleFileStream,
|
||||||
cmLocalUnixMakefileGenerator3 *lg)
|
cmLocalUnixMakefileGenerator3 *lg)
|
||||||
{
|
{
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
std::vector<std::string> commands;
|
std::vector<std::string> commands;
|
||||||
std::string localName;
|
std::string localName;
|
||||||
std::string makeTargetName;
|
std::string makeTargetName;
|
||||||
|
@ -688,7 +687,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
|
|
||||||
// write the directory level rules for this local gen
|
// write the directory level rules for this local gen
|
||||||
this->WriteDirectoryRules2(ruleFileStream,lg);
|
this->WriteDirectoryRules2(ruleFileStream,lg);
|
||||||
|
|
||||||
depends.push_back("cmake_check_build_system");
|
depends.push_back("cmake_check_build_system");
|
||||||
|
|
||||||
// for each target Generate the rule files for each target.
|
// for each target Generate the rule files for each target.
|
||||||
|
@ -708,15 +707,15 @@ cmGlobalUnixMakefileGenerator3
|
||||||
localName = lg->GetRelativeTargetDirectory(t->second);
|
localName = lg->GetRelativeTargetDirectory(t->second);
|
||||||
makefileName = localName;
|
makefileName = localName;
|
||||||
makefileName += "/build.make";
|
makefileName += "/build.make";
|
||||||
|
|
||||||
bool needRequiresStep = this->NeedRequiresStep(t->second);
|
bool needRequiresStep = this->NeedRequiresStep(t->second);
|
||||||
|
|
||||||
lg->WriteDivider(ruleFileStream);
|
lg->WriteDivider(ruleFileStream);
|
||||||
ruleFileStream
|
ruleFileStream
|
||||||
<< "# Target rules for target "
|
<< "# Target rules for target "
|
||||||
<< localName << "\n\n";
|
<< localName << "\n\n";
|
||||||
|
|
||||||
commands.clear();
|
commands.clear();
|
||||||
makeTargetName = localName;
|
makeTargetName = localName;
|
||||||
makeTargetName += "/depend";
|
makeTargetName += "/depend";
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
|
@ -734,7 +733,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
makeTargetName += "/build";
|
makeTargetName += "/build";
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(),makeTargetName.c_str()));
|
(makefileName.c_str(),makeTargetName.c_str()));
|
||||||
|
|
||||||
// Write the rule.
|
// Write the rule.
|
||||||
localName += "/all";
|
localName += "/all";
|
||||||
depends.clear();
|
depends.clear();
|
||||||
|
@ -766,7 +765,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
this->AppendGlobalTargetDepends(depends,t->second);
|
this->AppendGlobalTargetDepends(depends,t->second);
|
||||||
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
|
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName.c_str(), depends, commands, true);
|
||||||
|
|
||||||
// add the all/all dependency
|
// add the all/all dependency
|
||||||
if(!this->IsExcluded(this->LocalGenerators[0], t->second))
|
if(!this->IsExcluded(this->LocalGenerators[0], t->second))
|
||||||
{
|
{
|
||||||
|
@ -813,17 +812,17 @@ cmGlobalUnixMakefileGenerator3
|
||||||
depends.push_back("cmake_check_build_system");
|
depends.push_back("cmake_check_build_system");
|
||||||
localName = lg->GetRelativeTargetDirectory(t->second);
|
localName = lg->GetRelativeTargetDirectory(t->second);
|
||||||
localName += "/rule";
|
localName += "/rule";
|
||||||
lg->WriteMakeRule(ruleFileStream,
|
lg->WriteMakeRule(ruleFileStream,
|
||||||
"Build rule for subdir invocation for target.",
|
"Build rule for subdir invocation for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName.c_str(), depends, commands, true);
|
||||||
|
|
||||||
// Add a target with the canonical name (no prefix, suffix or path).
|
// Add a target with the canonical name (no prefix, suffix or path).
|
||||||
commands.clear();
|
commands.clear();
|
||||||
depends.clear();
|
depends.clear();
|
||||||
depends.push_back(localName);
|
depends.push_back(localName);
|
||||||
lg->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
lg->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
||||||
t->second.GetName(), depends, commands, true);
|
t->second.GetName(), depends, commands, true);
|
||||||
|
|
||||||
// Add rules to prepare the target for installation.
|
// Add rules to prepare the target for installation.
|
||||||
if(t->second.NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
|
if(t->second.NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
|
||||||
{
|
{
|
||||||
|
@ -833,7 +832,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
commands.clear();
|
commands.clear();
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(), localName.c_str()));
|
(makefileName.c_str(), localName.c_str()));
|
||||||
lg->WriteMakeRule(ruleFileStream,
|
lg->WriteMakeRule(ruleFileStream,
|
||||||
"Pre-install relink rule for target.",
|
"Pre-install relink rule for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName.c_str(), depends, commands, true);
|
||||||
|
|
||||||
|
@ -846,7 +845,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
"preinstall", depends, commands, true);
|
"preinstall", depends, commands, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add the clean rule
|
// add the clean rule
|
||||||
localName = lg->GetRelativeTargetDirectory(t->second);
|
localName = lg->GetRelativeTargetDirectory(t->second);
|
||||||
makeTargetName = localName;
|
makeTargetName = localName;
|
||||||
|
@ -987,7 +986,7 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule
|
||||||
lg->AppendEcho(commands,"... all (the default if no target is provided)");
|
lg->AppendEcho(commands,"... all (the default if no target is provided)");
|
||||||
lg->AppendEcho(commands,"... clean");
|
lg->AppendEcho(commands,"... clean");
|
||||||
lg->AppendEcho(commands,"... depend");
|
lg->AppendEcho(commands,"... depend");
|
||||||
|
|
||||||
// Keep track of targets already listed.
|
// Keep track of targets already listed.
|
||||||
std::set<cmStdString> emittedTargets;
|
std::set<cmStdString> emittedTargets;
|
||||||
|
|
||||||
|
@ -996,7 +995,7 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule
|
||||||
cmLocalUnixMakefileGenerator3 *lg2;
|
cmLocalUnixMakefileGenerator3 *lg2;
|
||||||
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
||||||
{
|
{
|
||||||
lg2 =
|
lg2 =
|
||||||
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
|
||||||
// for the passed in makefile or if this is the top Makefile wripte out
|
// for the passed in makefile or if this is the top Makefile wripte out
|
||||||
// the targets
|
// the targets
|
||||||
|
|
|
@ -22,19 +22,19 @@ class cmLocalUnixMakefileGenerator3;
|
||||||
* \brief Write a Unix makefiles.
|
* \brief Write a Unix makefiles.
|
||||||
*
|
*
|
||||||
* cmGlobalUnixMakefileGenerator3 manages UNIX build process for a tree
|
* cmGlobalUnixMakefileGenerator3 manages UNIX build process for a tree
|
||||||
|
|
||||||
|
|
||||||
The basic approach of this generator is to produce Makefiles that will all
|
The basic approach of this generator is to produce Makefiles that will all
|
||||||
be run with the current working directory set to the Home Output
|
be run with the current working directory set to the Home Output
|
||||||
directory. The one exception to this is the subdirectory Makefiles which are
|
directory. The one exception to this is the subdirectory Makefiles which are
|
||||||
created as a convenience and just cd up to the Home Output directory and
|
created as a convenience and just cd up to the Home Output directory and
|
||||||
invoke the main Makefiles.
|
invoke the main Makefiles.
|
||||||
|
|
||||||
The make process starts with Makefile. Makefile should only contain the
|
The make process starts with Makefile. Makefile should only contain the
|
||||||
targets the user is likely to invoke directly from a make command line. No
|
targets the user is likely to invoke directly from a make command line. No
|
||||||
internal targets should be in this file. Makefile2 contains the internal
|
internal targets should be in this file. Makefile2 contains the internal
|
||||||
targets that are required to make the process work.
|
targets that are required to make the process work.
|
||||||
|
|
||||||
Makefile2 in turn will recursively make targets in the correct order. Each
|
Makefile2 in turn will recursively make targets in the correct order. Each
|
||||||
target has its own directory <target>.dir and its own makefile build.make in
|
target has its own directory <target>.dir and its own makefile build.make in
|
||||||
that directory. Also in that directory is a couple makefiles per source file
|
that directory. Also in that directory is a couple makefiles per source file
|
||||||
|
@ -47,7 +47,7 @@ class cmLocalUnixMakefileGenerator3;
|
||||||
rescanned.
|
rescanned.
|
||||||
|
|
||||||
Rules for custom commands follow the same model as rules for source files.
|
Rules for custom commands follow the same model as rules for source files.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class cmGlobalUnixMakefileGenerator3 : public cmGlobalGenerator
|
class cmGlobalUnixMakefileGenerator3 : public cmGlobalGenerator
|
||||||
|
@ -64,13 +64,13 @@ public:
|
||||||
|
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator3
|
///! Create a local generator appropriate to this Global Generator3
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system infomation such as shared library
|
* Try to determine system infomation such as shared library
|
||||||
* extension, pthreads, byte order etc.
|
* extension, pthreads, byte order etc.
|
||||||
*/
|
*/
|
||||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
||||||
cmMakefile *, bool optional);
|
cmMakefile *, bool optional);
|
||||||
|
@ -78,11 +78,11 @@ public:
|
||||||
/**
|
/**
|
||||||
* Generate the all required files for building this project/tree. This
|
* Generate the all required files for building this project/tree. This
|
||||||
* basically creates a series of LocalGenerators for each directory and
|
* basically creates a series of LocalGenerators for each directory and
|
||||||
* requests that they Generate.
|
* requests that they Generate.
|
||||||
*/
|
*/
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
|
|
||||||
void WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream,
|
void WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream,
|
||||||
std::vector<cmLocalGenerator *> &);
|
std::vector<cmLocalGenerator *> &);
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public:
|
||||||
cmLocalUnixMakefileGenerator3 *);
|
cmLocalUnixMakefileGenerator3 *);
|
||||||
|
|
||||||
// write the top lvel target rules
|
// write the top lvel target rules
|
||||||
void WriteConvenienceRules(std::ostream& ruleFileStream,
|
void WriteConvenienceRules(std::ostream& ruleFileStream,
|
||||||
std::set<cmStdString> &emitted);
|
std::set<cmStdString> &emitted);
|
||||||
|
|
||||||
/** Get the command to use for a target that has no rule. This is
|
/** Get the command to use for a target that has no rule. This is
|
||||||
|
@ -105,23 +105,13 @@ public:
|
||||||
// change the build command for speed
|
// change the build command for speed
|
||||||
virtual std::string GenerateBuildCommand
|
virtual std::string GenerateBuildCommand
|
||||||
(const char* makeProgram,
|
(const char* makeProgram,
|
||||||
const char *projectName, const char* additionalOptions,
|
const char *projectName, const char* additionalOptions,
|
||||||
const char *targetName,
|
const char *targetName,
|
||||||
const char* config, bool ignoreErrors, bool fast);
|
const char* config, bool ignoreErrors, bool fast);
|
||||||
|
|
||||||
/** Record per-target progress information. */
|
/** Record per-target progress information. */
|
||||||
void RecordTargetProgress(cmMakefileTargetGenerator* tg);
|
void RecordTargetProgress(cmMakefileTargetGenerator* tg);
|
||||||
|
|
||||||
/**
|
|
||||||
* If true, the CMake variable CMAKE_VERBOSE_MAKEFILES doesn't have effect
|
|
||||||
* anymore. Set it to true when writing a generator where short output
|
|
||||||
* doesn't make sense, e.g. because the full output is parsed by an
|
|
||||||
* IDE/editor.
|
|
||||||
*/
|
|
||||||
bool GetForceVerboseMakefiles() { return this->ForceVerboseMakefiles; }
|
|
||||||
void SetForceVerboseMakefiles(bool enable)
|
|
||||||
{this->ForceVerboseMakefiles=enable;}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void WriteMainMakefile2();
|
void WriteMainMakefile2();
|
||||||
void WriteMainCMakefile();
|
void WriteMainCMakefile();
|
||||||
|
@ -169,8 +159,6 @@ protected:
|
||||||
// in the rule to satisfy the make program.
|
// in the rule to satisfy the make program.
|
||||||
std::string EmptyRuleHackCommand;
|
std::string EmptyRuleHackCommand;
|
||||||
|
|
||||||
bool ForceVerboseMakefiles;
|
|
||||||
|
|
||||||
// Store per-target progress counters.
|
// Store per-target progress counters.
|
||||||
struct TargetProgress
|
struct TargetProgress
|
||||||
{
|
{
|
||||||
|
|
|
@ -140,7 +140,7 @@ void cmLocalUnixMakefileGenerator3::Generate()
|
||||||
|
|
||||||
// write the local Makefile
|
// write the local Makefile
|
||||||
this->WriteLocalMakefile();
|
this->WriteLocalMakefile();
|
||||||
|
|
||||||
// Write the cmake file with information for this directory.
|
// Write the cmake file with information for this directory.
|
||||||
this->WriteDirectoryInformationFile();
|
this->WriteDirectoryInformationFile();
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ void cmLocalUnixMakefileGenerator3::Generate()
|
||||||
void cmLocalUnixMakefileGenerator3::GetIndividualFileTargets
|
void cmLocalUnixMakefileGenerator3::GetIndividualFileTargets
|
||||||
(std::vector<std::string>& targets)
|
(std::vector<std::string>& targets)
|
||||||
{
|
{
|
||||||
for (std::map<cmStdString, LocalObjectInfo>::iterator lo =
|
for (std::map<cmStdString, LocalObjectInfo>::iterator lo =
|
||||||
this->LocalObjectFiles.begin();
|
this->LocalObjectFiles.begin();
|
||||||
lo != this->LocalObjectFiles.end(); ++lo)
|
lo != this->LocalObjectFiles.end(); ++lo)
|
||||||
{
|
{
|
||||||
|
@ -188,10 +188,10 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile()
|
||||||
{
|
{
|
||||||
ruleFileStream.SetCopyIfDifferent(true);
|
ruleFileStream.SetCopyIfDifferent(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// write the all rules
|
// write the all rules
|
||||||
this->WriteLocalAllRules(ruleFileStream);
|
this->WriteLocalAllRules(ruleFileStream);
|
||||||
|
|
||||||
// only write local targets unless at the top Keep track of targets already
|
// only write local targets unless at the top Keep track of targets already
|
||||||
// listed.
|
// listed.
|
||||||
std::set<cmStdString> emittedTargets;
|
std::set<cmStdString> emittedTargets;
|
||||||
|
@ -203,7 +203,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmGlobalUnixMakefileGenerator3 *gg =
|
cmGlobalUnixMakefileGenerator3 *gg =
|
||||||
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
||||||
gg->WriteConvenienceRules(ruleFileStream,emittedTargets);
|
gg->WriteConvenienceRules(ruleFileStream,emittedTargets);
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile()
|
||||||
|
|
||||||
// now write out the object rules
|
// now write out the object rules
|
||||||
// for each object file name
|
// for each object file name
|
||||||
for (std::map<cmStdString, LocalObjectInfo>::iterator lo =
|
for (std::map<cmStdString, LocalObjectInfo>::iterator lo =
|
||||||
this->LocalObjectFiles.begin();
|
this->LocalObjectFiles.begin();
|
||||||
lo != this->LocalObjectFiles.end(); ++lo)
|
lo != this->LocalObjectFiles.end(); ++lo)
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile()
|
||||||
// add a help target as long as there isn;t a real target named help
|
// add a help target as long as there isn;t a real target named help
|
||||||
if(emittedTargets.insert("help").second)
|
if(emittedTargets.insert("help").second)
|
||||||
{
|
{
|
||||||
cmGlobalUnixMakefileGenerator3 *gg =
|
cmGlobalUnixMakefileGenerator3 *gg =
|
||||||
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
||||||
gg->WriteHelpRule(ruleFileStream,this);
|
gg->WriteHelpRule(ruleFileStream,this);
|
||||||
}
|
}
|
||||||
|
@ -353,7 +353,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
localName += "/rule";
|
localName += "/rule";
|
||||||
commands.clear();
|
commands.clear();
|
||||||
depends.clear();
|
depends.clear();
|
||||||
|
|
||||||
// Build the target for this pass.
|
// Build the target for this pass.
|
||||||
std::string makefile2 = cmake::GetCMakeFilesDirectoryPostSlash();
|
std::string makefile2 = cmake::GetCMakeFilesDirectoryPostSlash();
|
||||||
makefile2 += "Makefile2";
|
makefile2 += "Makefile2";
|
||||||
|
@ -364,7 +364,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmLocalGenerator::START_OUTPUT);
|
||||||
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName.c_str(), depends, commands, true);
|
||||||
|
|
||||||
// Add a target with the canonical name (no prefix, suffix or path).
|
// Add a target with the canonical name (no prefix, suffix or path).
|
||||||
if(localName != t->second.GetName())
|
if(localName != t->second.GetName())
|
||||||
{
|
{
|
||||||
|
@ -378,7 +378,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
std::string makefileName = this->GetRelativeTargetDirectory(t->second);
|
std::string makefileName = this->GetRelativeTargetDirectory(t->second);
|
||||||
makefileName += "/build.make";
|
makefileName += "/build.make";
|
||||||
// make sure the makefile name is suitable for a makefile
|
// make sure the makefile name is suitable for a makefile
|
||||||
std::string makeTargetName =
|
std::string makeTargetName =
|
||||||
this->GetRelativeTargetDirectory(t->second);
|
this->GetRelativeTargetDirectory(t->second);
|
||||||
makeTargetName += "/build";
|
makeTargetName += "/build";
|
||||||
localName = t->second.GetName();
|
localName = t->second.GetName();
|
||||||
|
@ -647,7 +647,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
makefileStream
|
makefileStream
|
||||||
<< "# The CMake executable.\n"
|
<< "# The CMake executable.\n"
|
||||||
<< "CMAKE_COMMAND = "
|
<< "CMAKE_COMMAND = "
|
||||||
<< this->Convert(cmakecommand.c_str(), FULL, SHELL).c_str()
|
<< this->Convert(cmakecommand.c_str(), FULL, SHELL).c_str()
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
makefileStream
|
makefileStream
|
||||||
|
@ -656,7 +656,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
<< this->Convert(cmakecommand.c_str(),FULL,SHELL).c_str()
|
<< this->Convert(cmakecommand.c_str(),FULL,SHELL).c_str()
|
||||||
<< " -E remove -f\n"
|
<< " -E remove -f\n"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
|
||||||
if(const char* edit_cmd =
|
if(const char* edit_cmd =
|
||||||
this->Makefile->GetDefinition("CMAKE_EDIT_COMMAND"))
|
this->Makefile->GetDefinition("CMAKE_EDIT_COMMAND"))
|
||||||
{
|
{
|
||||||
|
@ -722,8 +722,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
// "VERBOSE=1" to be added as a make variable which will change the
|
// "VERBOSE=1" to be added as a make variable which will change the
|
||||||
// name of this special target. This gives a make-time choice to
|
// name of this special target. This gives a make-time choice to
|
||||||
// the user.
|
// the user.
|
||||||
if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|
if(this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|
||||||
|| (gg->GetForceVerboseMakefiles()))
|
|
||||||
{
|
{
|
||||||
makefileStream
|
makefileStream
|
||||||
<< "# Produce verbose output by default.\n"
|
<< "# Produce verbose output by default.\n"
|
||||||
|
@ -872,7 +871,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
// Add a dependency on the rule file itself unless an option to skip
|
// Add a dependency on the rule file itself unless an option to skip
|
||||||
// it is specifically enabled by the user or project.
|
// it is specifically enabled by the user or project.
|
||||||
const char* nodep =
|
const char* nodep =
|
||||||
this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY");
|
this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY");
|
||||||
if(!nodep || cmSystemTools::IsOff(nodep))
|
if(!nodep || cmSystemTools::IsOff(nodep))
|
||||||
{
|
{
|
||||||
|
@ -969,7 +968,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
// Build the command line in a single string.
|
// Build the command line in a single string.
|
||||||
const cmCustomCommandLine& commandLine = *cl;
|
const cmCustomCommandLine& commandLine = *cl;
|
||||||
std::string cmd = GetRealLocation(commandLine[0].c_str(),
|
std::string cmd = GetRealLocation(commandLine[0].c_str(),
|
||||||
this->ConfigurationName.c_str());
|
this->ConfigurationName.c_str());
|
||||||
if (cmd.size())
|
if (cmd.size())
|
||||||
{
|
{
|
||||||
|
@ -1283,7 +1282,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
|
|
||||||
// see if the variable has been defined before and return
|
// see if the variable has been defined before and return
|
||||||
// the modified version of the variable
|
// the modified version of the variable
|
||||||
std::map<cmStdString, cmStdString>::iterator i =
|
std::map<cmStdString, cmStdString>::iterator i =
|
||||||
this->MakeVariableMap.find(unmodified);
|
this->MakeVariableMap.find(unmodified);
|
||||||
if(i != this->MakeVariableMap.end())
|
if(i != this->MakeVariableMap.end())
|
||||||
{
|
{
|
||||||
|
@ -1404,7 +1403,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(const char* tgtInfo,
|
||||||
dirInfoFile += "/CMakeDirectoryInformation.cmake";
|
dirInfoFile += "/CMakeDirectoryInformation.cmake";
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
if(!ftc->FileTimeCompare(internalDependFile.c_str(),
|
if(!ftc->FileTimeCompare(internalDependFile.c_str(),
|
||||||
dirInfoFile.c_str(), &result) || result < 0)
|
dirInfoFile.c_str(), &result) || result < 0)
|
||||||
{
|
{
|
||||||
if(verbose)
|
if(verbose)
|
||||||
|
@ -1418,7 +1417,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(const char* tgtInfo,
|
||||||
needRescanDirInfo = true;
|
needRescanDirInfo = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the implicit dependencies to see if they are up to date.
|
// Check the implicit dependencies to see if they are up to date.
|
||||||
// The build.make file may have explicit dependencies for the object
|
// The build.make file may have explicit dependencies for the object
|
||||||
// files but these will not affect the scanning process so they need
|
// files but these will not affect the scanning process so they need
|
||||||
|
@ -1433,11 +1432,11 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(const char* tgtInfo,
|
||||||
// cmDependsC::Check() fills the vector validDependencies() with the
|
// cmDependsC::Check() fills the vector validDependencies() with the
|
||||||
// dependencies for those files where they are still valid, i.e. neither
|
// dependencies for those files where they are still valid, i.e. neither
|
||||||
// the files themselves nor any files they depend on have changed.
|
// the files themselves nor any files they depend on have changed.
|
||||||
// We don't do that if the CMakeDirectoryInformation.cmake file has
|
// We don't do that if the CMakeDirectoryInformation.cmake file has
|
||||||
// changed, because then potentially all dependencies have changed.
|
// changed, because then potentially all dependencies have changed.
|
||||||
// This information is given later on to cmDependsC, which then only
|
// This information is given later on to cmDependsC, which then only
|
||||||
// rescans the files where it did not get valid dependencies via this
|
// rescans the files where it did not get valid dependencies via this
|
||||||
// dependency vector. This means that in the normal case, when only
|
// dependency vector. This means that in the normal case, when only
|
||||||
// few or one file have been edited, then also only this one file is
|
// few or one file have been edited, then also only this one file is
|
||||||
// actually scanned again, instead of all files for this target.
|
// actually scanned again, instead of all files for this target.
|
||||||
needRescanDependencies = !checker.Check(dependFile.c_str(),
|
needRescanDependencies = !checker.Check(dependFile.c_str(),
|
||||||
|
@ -1485,7 +1484,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
haveDirectoryInfo = true;
|
haveDirectoryInfo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup useful directory information.
|
// Lookup useful directory information.
|
||||||
if(haveDirectoryInfo)
|
if(haveDirectoryInfo)
|
||||||
{
|
{
|
||||||
|
@ -1545,11 +1544,11 @@ cmLocalUnixMakefileGenerator3
|
||||||
this->WriteDisclaimer(ruleFileStream);
|
this->WriteDisclaimer(ruleFileStream);
|
||||||
this->WriteDisclaimer(internalRuleFileStream);
|
this->WriteDisclaimer(internalRuleFileStream);
|
||||||
|
|
||||||
// for each language we need to scan, scan it
|
// for each language we need to scan, scan it
|
||||||
const char *langStr = mf->GetSafeDefinition("CMAKE_DEPENDS_LANGUAGES");
|
const char *langStr = mf->GetSafeDefinition("CMAKE_DEPENDS_LANGUAGES");
|
||||||
std::vector<std::string> langs;
|
std::vector<std::string> langs;
|
||||||
cmSystemTools::ExpandListArgument(langStr, langs);
|
cmSystemTools::ExpandListArgument(langStr, langs);
|
||||||
for (std::vector<std::string>::iterator li =
|
for (std::vector<std::string>::iterator li =
|
||||||
langs.begin(); li != langs.end(); ++li)
|
langs.begin(); li != langs.end(); ++li)
|
||||||
{
|
{
|
||||||
// construct the checker
|
// construct the checker
|
||||||
|
@ -1572,7 +1571,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
scanner = new cmDependsJava();
|
scanner = new cmDependsJava();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (scanner)
|
if (scanner)
|
||||||
{
|
{
|
||||||
scanner->SetLocalGenerator(this);
|
scanner->SetLocalGenerator(this);
|
||||||
|
@ -1686,25 +1685,25 @@ void cmLocalUnixMakefileGenerator3
|
||||||
cmLocalUnixMakefileGenerator3::EchoGlobal);
|
cmLocalUnixMakefileGenerator3::EchoGlobal);
|
||||||
|
|
||||||
// Global targets store their rules in pre- and post-build commands.
|
// Global targets store their rules in pre- and post-build commands.
|
||||||
this->AppendCustomDepends(depends,
|
this->AppendCustomDepends(depends,
|
||||||
glIt->second.GetPreBuildCommands());
|
glIt->second.GetPreBuildCommands());
|
||||||
this->AppendCustomDepends(depends,
|
this->AppendCustomDepends(depends,
|
||||||
glIt->second.GetPostBuildCommands());
|
glIt->second.GetPostBuildCommands());
|
||||||
this->AppendCustomCommands(commands,
|
this->AppendCustomCommands(commands,
|
||||||
glIt->second.GetPreBuildCommands(),
|
glIt->second.GetPreBuildCommands(),
|
||||||
&glIt->second,
|
&glIt->second,
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmLocalGenerator::START_OUTPUT);
|
||||||
this->AppendCustomCommands(commands,
|
this->AppendCustomCommands(commands,
|
||||||
glIt->second.GetPostBuildCommands(),
|
glIt->second.GetPostBuildCommands(),
|
||||||
&glIt->second,
|
&glIt->second,
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmLocalGenerator::START_OUTPUT);
|
||||||
std::string targetName = glIt->second.GetName();
|
std::string targetName = glIt->second.GetName();
|
||||||
this->WriteMakeRule(ruleFileStream, targetString.c_str(),
|
this->WriteMakeRule(ruleFileStream, targetString.c_str(),
|
||||||
targetName.c_str(), depends, commands, true);
|
targetName.c_str(), depends, commands, true);
|
||||||
|
|
||||||
// Provide a "/fast" version of the target.
|
// Provide a "/fast" version of the target.
|
||||||
depends.clear();
|
depends.clear();
|
||||||
if((targetName == "install")
|
if((targetName == "install")
|
||||||
|| (targetName == "install_local")
|
|| (targetName == "install_local")
|
||||||
|| (targetName == "install_strip"))
|
|| (targetName == "install_strip"))
|
||||||
{
|
{
|
||||||
|
@ -1738,7 +1737,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
progressDir += cmake::GetCMakeFilesDirectory();
|
progressDir += cmake::GetCMakeFilesDirectory();
|
||||||
{
|
{
|
||||||
cmOStringStream progCmd;
|
cmOStringStream progCmd;
|
||||||
progCmd <<
|
progCmd <<
|
||||||
"$(CMAKE_COMMAND) -E cmake_progress_start ";
|
"$(CMAKE_COMMAND) -E cmake_progress_start ";
|
||||||
progCmd << this->Convert(progressDir.c_str(),
|
progCmd << this->Convert(progressDir.c_str(),
|
||||||
cmLocalGenerator::FULL,
|
cmLocalGenerator::FULL,
|
||||||
|
@ -1833,8 +1832,8 @@ void cmLocalUnixMakefileGenerator3
|
||||||
this->CreateCDCommand(commands,
|
this->CreateCDCommand(commands,
|
||||||
this->Makefile->GetHomeOutputDirectory(),
|
this->Makefile->GetHomeOutputDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmLocalGenerator::START_OUTPUT);
|
||||||
this->WriteMakeRule(ruleFileStream, "clear depends",
|
this->WriteMakeRule(ruleFileStream, "clear depends",
|
||||||
"depend",
|
"depend",
|
||||||
depends, commands, true);
|
depends, commands, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2048,7 +2047,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
cmd += "$(MAKE) -f ";
|
cmd += "$(MAKE) -f ";
|
||||||
cmd += this->Convert(makefile,NONE,SHELL);
|
cmd += this->Convert(makefile,NONE,SHELL);
|
||||||
cmd += " ";
|
cmd += " ";
|
||||||
|
|
||||||
// Pass down verbosity level.
|
// Pass down verbosity level.
|
||||||
if(this->GetMakeSilentFlag().size())
|
if(this->GetMakeSilentFlag().size())
|
||||||
{
|
{
|
||||||
|
@ -2125,7 +2124,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
std::string
|
std::string
|
||||||
cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p)
|
cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Split the path into its components.
|
// Split the path into its components.
|
||||||
std::vector<std::string> components;
|
std::vector<std::string> components;
|
||||||
cmSystemTools::SplitPath(p, components);
|
cmSystemTools::SplitPath(p, components);
|
||||||
|
@ -2224,7 +2223,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this->UnixCD)
|
if(!this->UnixCD)
|
||||||
{
|
{
|
||||||
// On Windows we must perform each step separately and then change
|
// On Windows we must perform each step separately and then change
|
||||||
|
|
|
@ -82,34 +82,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||||
{
|
{
|
||||||
std::vector<std::string> commands;
|
std::vector<std::string> commands;
|
||||||
|
|
||||||
std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath();
|
|
||||||
std::string objTarget;
|
|
||||||
|
|
||||||
// Build list of dependencies.
|
// Build list of dependencies.
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
for(std::vector<std::string>::const_iterator obj = this->Objects.begin();
|
this->AppendLinkDepends(depends);
|
||||||
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
|
|
||||||
|
|
||||||
// Get the name of the executable to generate.
|
// Get the name of the executable to generate.
|
||||||
std::string targetName;
|
std::string targetName;
|
||||||
|
|
|
@ -308,33 +308,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||||
// code duplication.
|
// code duplication.
|
||||||
std::vector<std::string> commands;
|
std::vector<std::string> commands;
|
||||||
|
|
||||||
std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath();
|
|
||||||
std::string objTarget;
|
|
||||||
|
|
||||||
// Build list of dependencies.
|
// Build list of dependencies.
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
for(std::vector<std::string>::const_iterator obj = this->Objects.begin();
|
this->AppendLinkDepends(depends);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the language to use for linking this library.
|
// Get the language to use for linking this library.
|
||||||
const char* linkLanguage =
|
const char* linkLanguage =
|
||||||
this->Target->GetLinkerLanguage(this->ConfigName);
|
this->Target->GetLinkerLanguage(this->ConfigName);
|
||||||
|
|
|
@ -1505,6 +1505,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
|
void cmMakefileTargetGenerator
|
||||||
::CloseFileStreams()
|
::CloseFileStreams()
|
||||||
|
|
|
@ -115,6 +115,9 @@ protected:
|
||||||
// append intertarget dependencies
|
// append intertarget dependencies
|
||||||
void AppendTargetDepends(std::vector<std::string>& depends);
|
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
|
/** In order to support parallel builds for custom commands with
|
||||||
multiple outputs the outputs are given a serial order, and only
|
multiple outputs the outputs are given a serial order, and only
|
||||||
the first output actually has the build rule. Other outputs
|
the first output actually has the build rule. Other outputs
|
||||||
|
|
|
@ -531,6 +531,18 @@ void cmTarget::DefineProperties(cmake *cm)
|
||||||
"Use the MAP_IMPORTED_CONFIG_<CONFIG> property to map imported "
|
"Use the MAP_IMPORTED_CONFIG_<CONFIG> property to map imported "
|
||||||
"configurations explicitly.");
|
"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
|
cm->DefineProperty
|
||||||
("LINK_INTERFACE_LIBRARIES", cmProperty::TARGET,
|
("LINK_INTERFACE_LIBRARIES", cmProperty::TARGET,
|
||||||
"List public interface libraries for a shared library or executable.",
|
"List public interface libraries for a shared library or executable.",
|
||||||
|
|
|
@ -3304,28 +3304,37 @@ bool SystemInformationImplementation::QueryOSInformation()
|
||||||
{
|
{
|
||||||
case VER_PLATFORM_WIN32_NT:
|
case VER_PLATFORM_WIN32_NT:
|
||||||
// Test for the product.
|
// Test for the product.
|
||||||
if (osvi.dwMajorVersion <= 4)
|
if (osvi.dwMajorVersion <= 4)
|
||||||
{
|
{
|
||||||
this->OSRelease = "NT";
|
this->OSRelease = "NT";
|
||||||
}
|
}
|
||||||
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
|
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
|
||||||
{
|
{
|
||||||
this->OSRelease = "2000";
|
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";
|
this->OSRelease = "XP";
|
||||||
}
|
}
|
||||||
#ifdef VER_NT_WORKSTATION
|
#ifdef VER_NT_WORKSTATION
|
||||||
// Test for product type.
|
// 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";
|
this->OSRelease = "Vista";
|
||||||
}
|
}
|
||||||
|
if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1)
|
||||||
|
{
|
||||||
|
this->OSRelease = "7";
|
||||||
|
}
|
||||||
// VER_SUITE_PERSONAL may not be defined
|
// VER_SUITE_PERSONAL may not be defined
|
||||||
#ifdef VER_SUITE_PERSONAL
|
#ifdef VER_SUITE_PERSONAL
|
||||||
else
|
else
|
||||||
|
|
|
@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010)
|
||||||
SET(KWSYS_DATE_STAMP_MONTH 11)
|
SET(KWSYS_DATE_STAMP_MONTH 11)
|
||||||
|
|
||||||
# KWSys version date day component. Format is DD.
|
# KWSys version date day component. Format is DD.
|
||||||
SET(KWSYS_DATE_STAMP_DAY 03)
|
SET(KWSYS_DATE_STAMP_DAY 11)
|
||||||
|
|
|
@ -34,6 +34,12 @@ if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")
|
||||||
set(_cmake_options "-DCMAKE_EXE_LINKER_FLAGS=")
|
set(_cmake_options "-DCMAKE_EXE_LINKER_FLAGS=")
|
||||||
endif()
|
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)
|
file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project)
|
||||||
message("Creating Project/foo.cxx")
|
message("Creating Project/foo.cxx")
|
||||||
write_file(${BuildDepends_BINARY_DIR}/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
|
file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_tgt.hxx
|
||||||
"static const char* zot_macro_tgt = \"zot_macro_tgt changed\";\n")
|
"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()
|
help_xcode_depends()
|
||||||
|
|
||||||
message("Building project second time")
|
message("Building project second time")
|
||||||
|
@ -194,3 +204,16 @@ if("${out}" STREQUAL "${VALUE_CHANGED}")
|
||||||
else("${out}" STREQUAL "${VALUE_CHANGED}")
|
else("${out}" STREQUAL "${VALUE_CHANGED}")
|
||||||
message(SEND_ERROR "Project did not rebuild properly!")
|
message(SEND_ERROR "Project did not rebuild properly!")
|
||||||
endif("${out}" STREQUAL "${VALUE_CHANGED}")
|
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()
|
||||||
|
|
|
@ -80,3 +80,8 @@ set_property(
|
||||||
DIRECTORY
|
DIRECTORY
|
||||||
PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM "ZOT_DIR(%)=<zot_%_dir.hxx>"
|
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()
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -11,7 +11,7 @@ MACRO(ADD_TEST_MACRO NAME COMMAND)
|
||||||
--build-generator ${CMAKE_TEST_GENERATOR}
|
--build-generator ${CMAKE_TEST_GENERATOR}
|
||||||
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
|
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
|
||||||
--build-project ${proj}
|
--build-project ${proj}
|
||||||
--test-command ${COMMAND})
|
--test-command ${COMMAND} ${ARGN})
|
||||||
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}")
|
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}")
|
||||||
ENDMACRO(ADD_TEST_MACRO)
|
ENDMACRO(ADD_TEST_MACRO)
|
||||||
|
|
||||||
|
@ -21,7 +21,11 @@ IF(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME)
|
||||||
FILE(MAKE_DIRECTORY "${TEST_HOME}")
|
FILE(MAKE_DIRECTORY "${TEST_HOME}")
|
||||||
FILE(WRITE "${TEST_HOME}/.cvspass" ":pserver:anoncvs@www.cmake.org:/cvsroot/KWSys A\n")
|
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(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()
|
ENDIF()
|
||||||
|
|
||||||
# Choose a default configuration for CTest tests.
|
# Choose a default configuration for CTest tests.
|
||||||
|
@ -1768,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 source_dir:STRING=${CMAKE_CURRENT_SOURCE_DIR}/Tutorial/Step3
|
||||||
-D CMAKE_CTEST_COMMAND:STRING=${CMAKE_CTEST_COMMAND}
|
-D CMAKE_CTEST_COMMAND:STRING=${CMAKE_CTEST_COMMAND}
|
||||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeWizardTest.cmake)
|
-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)
|
ENDIF(BUILD_TESTING)
|
||||||
|
|
||||||
SUBDIRS(CMakeTests)
|
SUBDIRS(CMakeTests)
|
||||||
|
|
|
@ -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}
|
||||||
|
)
|
|
@ -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()
|
|
@ -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})
|
|
@ -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
|
||||||
|
)
|
|
@ -0,0 +1 @@
|
||||||
|
SET(vtk542_RUN_TEST VTK-build/bin/CommonCxxTests otherArrays)
|
|
@ -152,10 +152,6 @@ if(BUILD_TESTING)
|
||||||
${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout --nonet --path .
|
${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout --nonet --path .
|
||||||
${HTML_FILES}
|
${HTML_FILES}
|
||||||
)
|
)
|
||||||
else()
|
|
||||||
add_test(CMake.HTML
|
|
||||||
${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout ${HTML_FILES}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -512,6 +512,8 @@ CHECK_TYPE_SIZE(int64_t INT64_T)
|
||||||
IF(NOT HAVE_INT64_T)
|
IF(NOT HAVE_INT64_T)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(int64_t "__int64")
|
SET(int64_t "__int64")
|
||||||
|
ELSE(WIN32)
|
||||||
|
SET(int64_t "long long")
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
ENDIF(NOT HAVE_INT64_T)
|
ENDIF(NOT HAVE_INT64_T)
|
||||||
#
|
#
|
||||||
|
@ -568,9 +570,7 @@ ENDIF(NOT HAVE_UINT16_T)
|
||||||
#
|
#
|
||||||
CHECK_TYPE_SIZE(uint32_t UINT32_T)
|
CHECK_TYPE_SIZE(uint32_t UINT32_T)
|
||||||
IF(NOT HAVE_UINT32_T)
|
IF(NOT HAVE_UINT32_T)
|
||||||
IF(WIN32)
|
SET(uint32_t "unsigned int")
|
||||||
SET(uint32_t "unsigned int")
|
|
||||||
ENDIF(WIN32)
|
|
||||||
ENDIF(NOT HAVE_UINT32_T)
|
ENDIF(NOT HAVE_UINT32_T)
|
||||||
CHECK_TYPE_SIZE(int32_t INT32_T)
|
CHECK_TYPE_SIZE(int32_t INT32_T)
|
||||||
IF(NOT HAVE_INT32_T)
|
IF(NOT HAVE_INT32_T)
|
||||||
|
@ -581,6 +581,8 @@ CHECK_TYPE_SIZE(uint64_t UINT64_T)
|
||||||
IF(NOT HAVE_UINT64_T)
|
IF(NOT HAVE_UINT64_T)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(uint64_t "unsigned __int64")
|
SET(uint64_t "unsigned __int64")
|
||||||
|
ELSE(WIN32)
|
||||||
|
SET(uint64_t "unsigned long long")
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
ENDIF(NOT HAVE_UINT64_T)
|
ENDIF(NOT HAVE_UINT64_T)
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
/* config.h. Generated from config.h.cmake by cmake configure */
|
/* config.h. Generated from config.h.cmake by cmake configure */
|
||||||
|
#if defined(__osf__)
|
||||||
|
# define _OSF_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Version number of bsdcpio */
|
/* Version number of bsdcpio */
|
||||||
#cmakedefine BSDCPIO_VERSION_STRING "${BSDCPIO_VERSION_STRING}"
|
#cmakedefine BSDCPIO_VERSION_STRING "${BSDCPIO_VERSION_STRING}"
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560
|
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560
|
||||||
# define __LA_STDINT_H <stdint.h>
|
# 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>
|
# define __LA_STDINT_H <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -68,7 +68,11 @@
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#include <unistd.h> /* ssize_t, uid_t, and gid_t */
|
#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_SSIZE_T ssize_t
|
||||||
#define __LA_UID_T uid_t
|
#define __LA_UID_T uid_t
|
||||||
#define __LA_GID_T gid_t
|
#define __LA_GID_T gid_t
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
*/
|
*/
|
||||||
#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__) || defined(__SUNPRO_C)
|
#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__) || defined(__SUNPRO_C)
|
||||||
#define inline
|
#define inline
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER) || defined(__osf__)
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,11 @@
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# include <unistd.h>
|
# 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_UID_T uid_t
|
||||||
#define __LA_GID_T gid_t
|
#define __LA_GID_T gid_t
|
||||||
#define __LA_DEV_T dev_t
|
#define __LA_DEV_T dev_t
|
||||||
|
|
Loading…
Reference in New Issue