Merge branch 'dev/add_test-working-directory' into dev/strict-mode

Conflicts:
	Tests/CMakeLists.txt
This commit is contained in:
Brad King 2011-01-27 14:39:55 -05:00
commit dd2f81491e
157 changed files with 2855 additions and 1428 deletions

View File

@ -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)

View File

@ -24,6 +24,7 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
"is not used for resolving any symbol" "is not used for resolving any symbol"
"Clock skew detected" "Clock skew detected"
"remark\\(1209" "remark\\(1209"
"remark: .*LOOP WAS VECTORIZED"
"LINK : warning LNK4089: all references to.*ADVAPI32.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*ADVAPI32.dll.*discarded by /OPT:REF"
"LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF"
"Warning: library was too large for page size.*" "Warning: library was too large for page size.*"

View File

@ -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)

21
Docs/cmake-help.vim Normal file
View File

@ -0,0 +1,21 @@
nmap ,hc :call OpenCmakeHelp()<CR>
function! OpenCmakeHelp()
let s = getline( '.' )
let i = col( '.' ) - 1
while i > 0 && strpart( s, i, 1 ) =~ '[A-Za-z0-9_]'
let i = i - 1
endwhile
while i < col('$') && strpart( s, i, 1 ) !~ '[A-Za-z0-9_]'
let i = i + 1
endwhile
let start = match( s, '[A-Za-z0-9_]\+', i )
let end = matchend( s, '[A-Za-z0-9_]\+', i )
let ident = strpart( s, start, end - start )
execute "vertical new"
execute "%!cmake --help-command ".ident
set nomodified
set readonly
endfunction
autocmd BufRead,BufNewFile *.cmake,CMakeLists.txt,*.cmake.in nmap <F1> :call OpenCmakeHelp()<CR>

View File

@ -27,6 +27,11 @@
# drag-n-drop copied to another machine and run on that machine as long as all # drag-n-drop copied to another machine and run on that machine as long as all
# of the system libraries are compatible. # of the system libraries are compatible.
# #
# If you pass plugins to fixup_bundle as the libs parameter, you should install
# them or copy them into the bundle before calling fixup_bundle. The "libs"
# parameter is a list of libraries that must be fixed up, but that cannot be
# determined by otool output analysis. (i.e., plugins)
#
# Gather all the keys for all the executables and libraries in a bundle, and # Gather all the keys for all the executables and libraries in a bundle, and
# then, for each key, copy each prerequisite into the bundle. Then fix each one # then, for each key, copy each prerequisite into the bundle. Then fix each one
# up according to its own list of prerequisites. # up according to its own list of prerequisites.
@ -112,6 +117,13 @@
# _EMBEDDED_ITEM keyed variable for that prerequisite. (Most likely changing to # _EMBEDDED_ITEM keyed variable for that prerequisite. (Most likely changing to
# an "@executable_path" style reference.) # an "@executable_path" style reference.)
# #
# This function requires that the resolved_embedded_item be "inside" the bundle
# already. In other words, if you pass plugins to fixup_bundle as the libs
# parameter, you should install them or copy them into the bundle before
# calling fixup_bundle. The "libs" parameter is a list of libraries that must
# be fixed up, but that cannot be determined by otool output analysis. (i.e.,
# plugins)
#
# Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM # Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM
# value. # value.
# #
@ -472,11 +484,11 @@ function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
else() else()
#message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy ${resolved_item} ${resolved_embedded_item}") #message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy ${resolved_item} ${resolved_embedded_item}")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}") execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}")
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
endif(UNIX AND NOT APPLE)
endif() endif()
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
endif(UNIX AND NOT APPLE)
endfunction(copy_resolved_item_into_bundle) endfunction(copy_resolved_item_into_bundle)
@ -514,11 +526,11 @@ function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_ite
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${resolved_resources}" "${resolved_embedded_resources}") execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${resolved_resources}" "${resolved_embedded_resources}")
endif() endif()
endif() endif()
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
endif(UNIX AND NOT APPLE)
endif() endif()
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
endif(UNIX AND NOT APPLE)
endfunction(copy_resolved_framework_into_bundle) endfunction(copy_resolved_framework_into_bundle)
@ -527,6 +539,24 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
# #
get_item_key("${resolved_embedded_item}" ikey) get_item_key("${resolved_embedded_item}" ikey)
# Ensure the item is "inside the .app bundle" -- it should not be fixed up if
# it is not in the .app bundle... Otherwise, we'll modify files in the build
# tree, or in other varied locations around the file system, with our call to
# install_name_tool. Make sure that doesn't happen here:
#
get_dotapp_dir("${exepath}" exe_dotapp_dir)
string(LENGTH "${exe_dotapp_dir}/" exe_dotapp_dir_length)
string(SUBSTRING "${resolved_embedded_item}" 0 ${exe_dotapp_dir_length} item_substring)
if(NOT "${exe_dotapp_dir}/" STREQUAL "${item_substring}")
message(" exe_dotapp_dir/='${exe_dotapp_dir}/'")
message(" item_substring='${item_substring}'")
message(" resolved_embedded_item='${resolved_embedded_item}'")
message("")
message("Install or copy the item into the bundle before calling fixup_bundle")
message("")
message(FATAL_ERROR "cannot fixup an item that is not in the bundle...")
endif()
set(prereqs "") set(prereqs "")
get_prerequisites("${resolved_embedded_item}" prereqs 1 0 "${exepath}" "${dirs}") get_prerequisites("${resolved_embedded_item}" prereqs 1 0 "${exepath}" "${dirs}")

View File

@ -0,0 +1,46 @@
#=============================================================================
# Copyright 2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# support for the nasm assembler
set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS nasm asm)
if(NOT CMAKE_ASM_NASM_OBJECT_FORMAT)
if(WIN32)
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
SET(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
else()
SET(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
endif()
elseif(APPLE)
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
else()
SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho)
endif()
else()
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
else()
SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf)
endif()
endif()
endif()
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
# Load the generic ASMInformation file:
set(ASM_DIALECT "_NASM")
include(CMakeASMInformation)
set(ASM_DIALECT)

View File

@ -42,6 +42,9 @@
#elif defined(__PATHSCALE__) #elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale" # define COMPILER_ID "PathScale"
#elif defined(_CRAYC)
# define COMPILER_ID "Cray"
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define COMPILER_ID "GNU" # define COMPILER_ID "GNU"

View File

@ -44,6 +44,9 @@
#elif defined(__PATHSCALE__) #elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale" # define COMPILER_ID "PathScale"
#elif defined(_CRAYC)
# define COMPILER_ID "Cray"
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define COMPILER_ID "GNU" # define COMPILER_ID "GNU"

View File

@ -65,6 +65,7 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "GNU assembler") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "GNU assembler")
INCLUDE(CMakeDetermineCompilerId)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT}) CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)

View File

@ -0,0 +1,27 @@
#=============================================================================
# Copyright 2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible
SET(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm)
IF(NOT CMAKE_ASM_NASM_COMPILER)
FIND_PROGRAM(CMAKE_ASM_NASM_COMPILER nasm
"$ENV{ProgramFiles}/NASM")
ENDIF(NOT CMAKE_ASM_NASM_COMPILER)
# Load the generic DetermineASM compiler file with the DIALECT set properly:
SET(ASM_DIALECT "_NASM")
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)

View File

@ -78,7 +78,8 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
AND NOT MULTI_ARCH AND NOT MULTI_ARCH
# Skip this with Xcode for now. # Skip this with Xcode for now.
AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode) AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log) CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
"${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n") "Parsed ${lang} implicit link information from above output:\n${log}\n\n")
ENDIF() ENDIF()

View File

@ -169,6 +169,9 @@ IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq) LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq)
SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what") SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what")
SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_Compaq "Compaq Visual Fortran") SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_Compaq "Compaq Visual Fortran")
LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS NAG) # Numerical Algorithms Group
SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_NAG "-V")
SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_NAG "NAG Fortran Compiler")
# Try to identify the compiler. # Try to identify the compiler.
SET(CMAKE_Fortran_COMPILER_ID) SET(CMAKE_Fortran_COMPILER_ID)

View File

@ -17,6 +17,12 @@
FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable") FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable")
# This variable is used by the Eclipse generator and appended to the make invocation commands.
SET(CMAKE_ECLIPSE_MAKE_ARGUMENTS "" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
# This variable is used by the Eclipse generator in out-of-source builds only.
SET(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
MARK_AS_ADVANCED(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT)
# The Eclipse generator needs to know the standard include path # The Eclipse generator needs to know the standard include path
# so that Eclipse ca find the headers at runtime and parsing etc. works better # so that Eclipse ca find the headers at runtime and parsing etc. works better

View File

@ -6,6 +6,8 @@
PRINT *, 'INFO:compiler[Intel]' PRINT *, 'INFO:compiler[Intel]'
#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95) #elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
PRINT *, 'INFO:compiler[SunPro]' PRINT *, 'INFO:compiler[SunPro]'
#elif defined(_CRAYFTN)
PRINT *, 'INFO:compiler[Cray]'
#elif defined(__G95__) #elif defined(__G95__)
PRINT *, 'INFO:compiler[G95]' PRINT *, 'INFO:compiler[G95]'
#elif defined(__PATHSCALE__) #elif defined(__PATHSCALE__)

View File

@ -67,29 +67,29 @@ SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
# Create a set of shared library variable specific to Fortran # Create a set of shared library variable specific to Fortran
# For 90% of the systems, these are the same flags as the C versions # For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version # so if these are not set just copy the flags from the c version
IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS) IF(NOT DEFINED CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS) ENDIF()
IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS) IF(NOT DEFINED CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS) ENDIF()
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) ENDIF()
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG) IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG) ENDIF()
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP) IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP) ENDIF()
IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG) IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG}) SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG) ENDIF()
IF(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG) IF(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG)
SET(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG}) SET(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
@ -100,25 +100,25 @@ IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG)
ENDIF() ENDIF()
# repeat for modules # repeat for modules
IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS) IF(NOT DEFINED CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS) ENDIF()
IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS) IF(NOT DEFINED CMAKE_SHARED_MODULE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS) ENDIF()
IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG) IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG}) SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG) ENDIF()
IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP) IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP}) SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP) ENDIF()
IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG) IF(NOT DEFINED CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG}) SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG) ENDIF()
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH) IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH}) SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})

View File

@ -16,7 +16,7 @@
# This is used internally by CMake and should not be included by user # This is used internally by CMake and should not be included by user
# code. # code.
function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var) function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
set(implicit_libs_tmp "") set(implicit_libs_tmp "")
set(implicit_dirs_tmp) set(implicit_dirs_tmp)
set(log "") set(log "")
@ -59,6 +59,11 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var)
# Unix library full path. # Unix library full path.
list(APPEND implicit_libs_tmp ${arg}) list(APPEND implicit_libs_tmp ${arg})
set(log "${log} arg [${arg}] ==> lib [${arg}]\n") set(log "${log} arg [${arg}] ==> lib [${arg}]\n")
elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.o$"
AND obj_regex AND "${arg}" MATCHES "${obj_regex}")
# Object file full path.
list(APPEND implicit_libs_tmp ${arg})
set(log "${log} arg [${arg}] ==> obj [${arg}]\n")
elseif("${arg}" MATCHES "^-Y(P,)?") elseif("${arg}" MATCHES "^-Y(P,)?")
# Sun search path. # Sun search path.
string(REGEX REPLACE "^-Y(P,)?" "" dirs "${arg}") string(REGEX REPLACE "^-Y(P,)?" "" dirs "${arg}")

View File

@ -83,7 +83,7 @@
#endif #endif
/* For windows compilers MSVC and Intel we can determine /* For windows compilers MSVC and Intel we can determine
the architecture of the compiler being used. This is becase the architecture of the compiler being used. This is because
the compilers do not have flags that can change the architecture, the compilers do not have flags that can change the architecture,
but rather depend on which compiler is being used but rather depend on which compiler is being used
*/ */

View File

@ -13,10 +13,10 @@
# License text for the above reference.) # License text for the above reference.)
# This file is used by EnableLanguage in cmGlobalGenerator to # This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected ASM-ATT compiler can actually compile # determine that the selected ASM-ATT "compiler" works.
# and link the most basic of programs. If not, a fatal error # For assembler this can only check whether the compiler has been found,
# is set and cmake stops processing commands and will not generate # because otherwise there would have to be a separate assembler source file
# any makefiles or projects. # for each assembler on every architecture.
SET(ASM_DIALECT "-ATT") SET(ASM_DIALECT "-ATT")
INCLUDE(CMakeTestASMCompiler) INCLUDE(CMakeTestASMCompiler)

View File

@ -13,10 +13,11 @@
# License text for the above reference.) # License text for the above reference.)
# This file is used by EnableLanguage in cmGlobalGenerator to # This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected ASM compiler can actually compile # determine that the selected ASM compiler works.
# and link the most basic of programs. If not, a fatal error # For assembler this can only check whether the compiler has been found,
# is set and cmake stops processing commands and will not generate # because otherwise there would have to be a separate assembler source file
# any makefiles or projects. # for each assembler on every architecture.
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER) IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 1 CACHE INTERNAL "") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 1 CACHE INTERNAL "")
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER) ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER)

View File

@ -14,9 +14,9 @@
# This file is used by EnableLanguage in cmGlobalGenerator to # This file is used by EnableLanguage in cmGlobalGenerator to
# determine that the selected ASM_MASM "compiler" (should be masm or masm64) # determine that the selected ASM_MASM "compiler" (should be masm or masm64)
# can actually "compile" and link the most basic of programs. If not, a # works. For assembler this can only check whether the compiler has been found,
# fatal error is set and cmake stops processing commands and will not generate # because otherwise there would have to be a separate assembler source file
# any makefiles or projects. # for each assembler on every architecture.
SET(ASM_DIALECT "_MASM") SET(ASM_DIALECT "_MASM")
INCLUDE(CMakeTestASMCompiler) INCLUDE(CMakeTestASMCompiler)

View File

@ -0,0 +1,23 @@
#=============================================================================
# Copyright 2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that the selected ASM_NASM "compiler" works.
# For assembler this can only check whether the compiler has been found,
# because otherwise there would have to be a separate assembler source file
# for each assembler on every architecture.
SET(ASM_DIALECT "_NASM")
INCLUDE(CMakeTestASMCompiler)
SET(ASM_DIALECT)

View File

@ -80,7 +80,7 @@ then
if [ "x${cpack_skip_license}x" != "xTRUEx" ] if [ "x${cpack_skip_license}x" != "xTRUEx" ]
then then
more << ____cpack__here_doc____ more << '____cpack__here_doc____'
@CPACK_RESOURCE_FILE_LICENSE_CONTENT@ @CPACK_RESOURCE_FILE_LICENSE_CONTENT@
____cpack__here_doc____ ____cpack__here_doc____
echo echo

View File

@ -331,7 +331,7 @@ ELSE(CPACK_RPM_COMPRESSION_TYPE)
ENDIF(CPACK_RPM_COMPRESSION_TYPE) ENDIF(CPACK_RPM_COMPRESSION_TYPE)
if(CPACK_PACKAGE_RELOCATABLE) if(CPACK_PACKAGE_RELOCATABLE)
set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE) set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
endif(CPACK_PACKAGE_RELOCATABLE) endif(CPACK_PACKAGE_RELOCATABLE)
if(CPACK_RPM_PACKAGE_RELOCATABLE) if(CPACK_RPM_PACKAGE_RELOCATABLE)
if(CPACK_RPM_PACKAGE_DEBUG) if(CPACK_RPM_PACKAGE_DEBUG)
@ -453,6 +453,17 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") #STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
# Are we packaging components ?
IF(CPACK_RPM_PACKAGE_COMPONENT)
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
ELSE(CPACK_RPM_PACKAGE_COMPONENT)
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
# Use files tree to construct files command (spec file) # Use files tree to construct files command (spec file)
# We should not forget to include symlinks (thus -o -type l) # We should not forget to include symlinks (thus -o -type l)
# We must remove the './' due to the local search and escape the # We must remove the './' due to the local search and escape the
@ -460,10 +471,10 @@ SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
# Then we must authorize any man pages extension (adding * at the end) # Then we must authorize any man pages extension (adding * at the end)
# because rpmbuild may automatically compress those files # because rpmbuild may automatically compress those files
EXECUTE_PROCESS(COMMAND find -type f -o -type l EXECUTE_PROCESS(COMMAND find -type f -o -type l
COMMAND sed {s:.*/man.*/.*:&*:} COMMAND sed {s:.*/man.*/.*:&*:}
COMMAND sed {s/\\.\\\(.*\\\)/\"\\1\"/} COMMAND sed {s/\\.\\\(.*\\\)/\"\\1\"/}
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}" WORKING_DIRECTORY "${WDIR}"
OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES) OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
if (CPACK_ABSOLUTE_DESTINATION_FILES) if (CPACK_ABSOLUTE_DESTINATION_FILES)
IF(CPACK_RPM_PACKAGE_DEBUG) IF(CPACK_RPM_PACKAGE_DEBUG)
@ -494,7 +505,7 @@ if (CPACK_ABSOLUTE_DESTINATION_FILES)
endif(CPACK_ABSOLUTE_DESTINATION_FILES) endif(CPACK_ABSOLUTE_DESTINATION_FILES)
# The name of the final spec file to be used by rpmbuild # The name of the final spec file to be used by rpmbuild
SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec") SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec")
# Print out some debug information if we were asked for that # Print out some debug information if we were asked for that
IF(CPACK_RPM_PACKAGE_DEBUG) IF(CPACK_RPM_PACKAGE_DEBUG)
@ -517,7 +528,7 @@ ENDIF(CPACK_RPM_PACKAGE_DEBUG)
IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE) IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
"# -*- rpm-spec -*- "# -*- rpm-spec -*-
BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@ BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@
Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@ Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@
Name: \@CPACK_RPM_PACKAGE_NAME\@ Name: \@CPACK_RPM_PACKAGE_NAME\@
Version: \@CPACK_RPM_PACKAGE_VERSION\@ Version: \@CPACK_RPM_PACKAGE_VERSION\@
@ -555,10 +566,9 @@ mv $RPM_BUILD_ROOT \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\"
%install %install
if [ -e $RPM_BUILD_ROOT ]; if [ -e $RPM_BUILD_ROOT ];
then then
mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/*\" $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
else
mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
fi fi
mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
%clean %clean
@ -608,15 +618,15 @@ IF(RPMBUILD_EXECUTABLE)
# Now call rpmbuild using the SPECFILE # Now call rpmbuild using the SPECFILE
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND "${RPMBUILD_EXECUTABLE}" -bb COMMAND "${RPMBUILD_EXECUTABLE}" -bb
--buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}" --buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
"${CPACK_RPM_BINARY_SPECFILE}" "${CPACK_RPM_BINARY_SPECFILE}"
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}" WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err" ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err"
OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.out") OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
IF(CPACK_RPM_PACKAGE_DEBUG) IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: You may consult rpmbuild logs in: ") MESSAGE("CPackRPM:Debug: You may consult rpmbuild logs in: ")
MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err") MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err")
MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.out") MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
ENDIF(CPACK_RPM_PACKAGE_DEBUG) ENDIF(CPACK_RPM_PACKAGE_DEBUG)
ELSE(RPMBUILD_EXECUTABLE) ELSE(RPMBUILD_EXECUTABLE)
IF(ALIEN_EXECUTABLE) IF(ALIEN_EXECUTABLE)

View File

@ -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

View File

@ -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

View File

@ -0,0 +1 @@
set(CMAKE_C_VERBOSE_FLAG "-v")

View File

@ -0,0 +1 @@
set(CMAKE_CXX_VERBOSE_FLAG "-v")

View File

@ -0,0 +1,4 @@
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_MODOUT_FLAG -em)
set(CMAKE_Fortran_MODDIR_FLAG -J)
set(CMAKE_Fortran_MODDIR_DEFAULT .)

View File

@ -0,0 +1,32 @@
# Help CMAKE_PARSE_IMPLICIT_LINK_INFO detect NAG Fortran object files.
if(NOT CMAKE_Fortran_COMPILER_WORKS AND NOT CMAKE_Fortran_COMPILER_FORCED)
message(STATUS "Detecting NAG Fortran directory")
# Run with -dryrun to see sample "link" line.
execute_process(
COMMAND ${CMAKE_Fortran_COMPILER} dummy.o -dryrun
OUTPUT_VARIABLE _dryrun
ERROR_VARIABLE _dryrun
)
# Match an object file.
string(REGEX MATCH "/[^ ]*/[^ /][^ /]*\\.o" _nag_obj "${_dryrun}")
if(_nag_obj)
# Parse object directory and convert to a regex.
string(REGEX REPLACE "/[^/]*$" "" _nag_dir "${_nag_obj}")
string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" _nag_regex "${_nag_dir}")
set(CMAKE_Fortran_IMPLICIT_OBJECT_REGEX "^${_nag_regex}/")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Detecting NAG Fortran directory with -dryrun found\n"
" object: ${_nag_obj}\n"
" directory: ${_nag_dir}\n"
" regex: ${CMAKE_Fortran_IMPLICIT_OBJECT_REGEX}\n"
"from output:\n${_dryrun}\n\n")
message(STATUS "Detecting NAG Fortran directory - ${_nag_dir}")
else()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Detecting NAG Fortran directory with -dryrun failed:\n${_dryrun}\n\n")
message(STATUS "Detecting NAG Fortran directory - failed")
endif()
endif()
set(CMAKE_Fortran_MODDIR_FLAG "-mdir ")
set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-PIC")

View File

@ -32,6 +32,7 @@
# [CMAKE_COMMAND /.../cmake] # Specify alternative cmake executable # [CMAKE_COMMAND /.../cmake] # Specify alternative cmake executable
# [CMAKE_GENERATOR gen] # Specify generator for native build # [CMAKE_GENERATOR gen] # Specify generator for native build
# [CMAKE_ARGS args...] # Arguments to CMake command line # [CMAKE_ARGS args...] # Arguments to CMake command line
# [CMAKE_CACHE_ARGS args...] # Initial cache arguments, of the form -Dvar:string=on
# #--Build step----------------- # #--Build step-----------------
# [BINARY_DIR dir] # Specify build dir location # [BINARY_DIR dir] # Specify build dir location
# [BUILD_COMMAND cmd...] # Command to drive the native build # [BUILD_COMMAND cmd...] # Command to drive the native build
@ -549,6 +550,47 @@ function(_ep_set_directories name)
endforeach() endforeach()
endfunction(_ep_set_directories) endfunction(_ep_set_directories)
function(_ep_write_initial_cache script_filename args)
# Write out values into an initial cache, that will be passed to CMake with -C
set(script_initial_cache "")
set(regex "^([^:]+):([^=]+)=(.*)$")
set(setArg "")
foreach(line ${args})
if("${line}" MATCHES "^-D")
if(setArg)
# This is required to build up lists in variables, or complete an entry
set(setArg "${setArg}${accumulator}\" CACHE ${type} \"Initial cache\" FORCE)")
set(script_initial_cache "${script_initial_cache}\n${setArg}")
set(accumulator "")
set(setArg "")
endif()
string(REGEX REPLACE "^-D" "" line ${line})
if("${line}" MATCHES "${regex}")
string(REGEX MATCH "${regex}" match "${line}")
set(name "${CMAKE_MATCH_1}")
set(type "${CMAKE_MATCH_2}")
set(value "${CMAKE_MATCH_3}")
set(setArg "set(${name} \"${value}")
else()
message(WARNING "Line '${line}' does not match regex. Ignoring.")
endif()
else()
# Assume this is a list to append to the last var
set(accumulator "${accumulator};${line}")
endif()
endforeach()
# Catch the final line of the args
if(setArg)
set(setArg "${setArg}${accumulator}\" CACHE ${type} \"Initial cache\" FORCE)")
set(script_initial_cache "${script_initial_cache}\n${setArg}")
endif()
# Write out the initial cache file to the location specified.
if(NOT EXISTS "${script_filename}.in")
file(WRITE "${script_filename}.in" "\@script_initial_cache\@\n")
endif()
configure_file("${script_filename}.in" "${script_filename}")
endfunction(_ep_write_initial_cache)
function(ExternalProject_Get_Property name) function(ExternalProject_Get_Property name)
foreach(var ${ARGN}) foreach(var ${ARGN})
@ -1224,11 +1266,24 @@ function(_ep_add_configure_command name)
get_property(cmake_args TARGET ${name} PROPERTY _EP_CMAKE_ARGS) get_property(cmake_args TARGET ${name} PROPERTY _EP_CMAKE_ARGS)
list(APPEND cmd ${cmake_args}) list(APPEND cmd ${cmake_args})
# If there are any CMAKE_CACHE_ARGS, write an initial cache and use it
get_property(cmake_cache_args TARGET ${name} PROPERTY _EP_CMAKE_CACHE_ARGS)
if(cmake_cache_args)
set(_ep_cache_args_script "${tmp_dir}/${name}-cache.cmake")
_ep_write_initial_cache("${_ep_cache_args_script}" "${cmake_cache_args}")
list(APPEND cmd "-C${_ep_cache_args_script}")
endif()
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR) get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
if(cmake_generator) if(cmake_generator)
list(APPEND cmd "-G${cmake_generator}" "${source_dir}") list(APPEND cmd "-G${cmake_generator}" "${source_dir}")
else() else()
list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}") if(CMAKE_EXTRA_GENERATOR)
list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}"
"${source_dir}")
else()
list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
endif()
endif() endif()
endif() endif()
@ -1237,10 +1292,11 @@ function(_ep_add_configure_command name)
# Fixes issue http://public.kitware.com/Bug/view.php?id=10258 # Fixes issue http://public.kitware.com/Bug/view.php?id=10258
# #
if(NOT EXISTS ${tmp_dir}/${name}-cfgcmd.txt.in) if(NOT EXISTS ${tmp_dir}/${name}-cfgcmd.txt.in)
file(WRITE ${tmp_dir}/${name}-cfgcmd.txt.in "cmd='@cmd@'\n") file(WRITE ${tmp_dir}/${name}-cfgcmd.txt.in "cmd='\@cmd\@'\n")
endif() endif()
configure_file(${tmp_dir}/${name}-cfgcmd.txt.in ${tmp_dir}/${name}-cfgcmd.txt) configure_file(${tmp_dir}/${name}-cfgcmd.txt.in ${tmp_dir}/${name}-cfgcmd.txt)
list(APPEND file_deps ${tmp_dir}/${name}-cfgcmd.txt) list(APPEND file_deps ${tmp_dir}/${name}-cfgcmd.txt)
list(APPEND file_deps ${_ep_cache_args_script})
get_property(log TARGET ${name} PROPERTY _EP_LOG_CONFIGURE) get_property(log TARGET ${name} PROPERTY _EP_LOG_CONFIGURE)
if(log) if(log)

View File

@ -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()

View File

@ -64,7 +64,8 @@
# Currently this module searches for the following version numbers: # Currently this module searches for the following version numbers:
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, # 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0, # 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0,
# 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0 # 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0,
# 1.45, 1.45.0, 1.46, 1.46.0
# #
# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should # NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
# add both 1.x and 1.x.0 as shown above. Official Boost include directories # add both 1.x and 1.x.0 as shown above. Official Boost include directories
@ -377,7 +378,7 @@ else(Boost_FIND_VERSION_EXACT)
# The user has not requested an exact version. Among known # The user has not requested an exact version. Among known
# versions, find those that are acceptable to the user request. # versions, find those that are acceptable to the user request.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
"1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42" "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42"
"1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
"1.34" "1.33.1" "1.33.0" "1.33") "1.34" "1.33.1" "1.33.0" "1.33")
@ -412,9 +413,7 @@ IF(Boost_INCLUDE_DIR)
# On versions < 1.35, remove the System library from the considered list # On versions < 1.35, remove the System library from the considered list
# since it wasn't added until 1.35. # since it wasn't added until 1.35.
if(Boost_VERSION AND Boost_FIND_COMPONENTS) if(Boost_VERSION AND Boost_FIND_COMPONENTS)
math(EXPR _boost_maj "${Boost_VERSION} / 100000") if(Boost_VERSION LESS 103500)
math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
list(REMOVE_ITEM Boost_FIND_COMPONENTS system) list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
endif() endif()
endif() endif()
@ -916,6 +915,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)
@ -1142,4 +1142,3 @@ ELSE (_boost_IN_CACHE)
Boost_LIBRARY_DIRS Boost_LIBRARY_DIRS
) )
ENDIF(_boost_IN_CACHE) ENDIF(_boost_IN_CACHE)

View File

@ -31,7 +31,7 @@ macro(_FIND_BULLET_LIBRARY _var)
find_library(${_var} find_library(${_var}
NAMES NAMES
${ARGN} ${ARGN}
PATHS HINTS
${BULLET_ROOT} ${BULLET_ROOT}
${BULLET_ROOT}/out/release8/libs ${BULLET_ROOT}/out/release8/libs
${BULLET_ROOT}/out/debug8/libs ${BULLET_ROOT}/out/debug8/libs
@ -50,9 +50,10 @@ macro(_BULLET_APPEND_LIBRARIES _list _release)
endmacro() endmacro()
find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
PATHS HINTS
${BULLET_ROOT}/include ${BULLET_ROOT}/include
${BULLET_ROOT}/src ${BULLET_ROOT}/src
PATH_SUFFIXES bullet
) )
# Find the libraries # Find the libraries

View File

@ -97,6 +97,11 @@
# (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.4 (11/18/10) (CMake 2.8.4)
# Issue 11384: Added support to the CXX_ADD_TEST macro so header
# files (containing the tests themselves) show up in
# Visual Studio and other IDEs.
#
# Version 1.3 (8/19/10) (CMake 2.8.3) # Version 1.3 (8/19/10) (CMake 2.8.3)
# Included patch by Simone Rossetto to check if either Python or Perl # Included patch by Simone Rossetto to check if either Python or Perl
# are present in the system. Whichever intepreter that is detected # are present in the system. Whichever intepreter that is detected
@ -131,7 +136,7 @@ macro(CXXTEST_ADD_TEST _cxxtest_testname _cxxtest_outfname)
) )
set_source_files_properties(${_cxxtest_real_outfname} PROPERTIES GENERATED true) set_source_files_properties(${_cxxtest_real_outfname} PROPERTIES GENERATED true)
add_executable(${_cxxtest_testname} ${_cxxtest_real_outfname}) add_executable(${_cxxtest_testname} ${_cxxtest_real_outfname} ${ARGN})
if(CMAKE_RUNTIME_OUTPUT_DIRECTORY) if(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
add_test(${_cxxtest_testname} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_cxxtest_testname}) add_test(${_cxxtest_testname} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_cxxtest_testname})

View File

@ -36,8 +36,8 @@
# find_package(BISON) # find_package(BISON)
# find_package(FLEX) # find_package(FLEX)
# #
# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp # BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
# FLEX_TARGET(MyScanner lexer.l ${CMAKE_CURRENT_BIANRY_DIR}/lexer.cpp) # FLEX_TARGET(MyScanner lexer.l ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
# ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser) # ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
# #
# include_directories(${CMAKE_CURRENT_BINARY_DIR}) # include_directories(${CMAKE_CURRENT_BINARY_DIR})

View File

@ -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)

View File

@ -21,7 +21,7 @@
# instead. # instead.
#============================================================================= #=============================================================================
# Copyright 2001-2009 Kitware, Inc. # Copyright 2001-2010 Kitware, Inc.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -33,67 +33,23 @@
# (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.)
SET(ITK_DIR_STRING "directory containing ITKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/InsightToolkit for an installation.") # Use the Config mode of the find_package() command to find ITKConfig.
# If this succeeds (possibly because ITK_DIR is already set), the
# command will have already loaded ITKConfig.cmake and set ITK_FOUND.
IF(NOT ITK_FOUND)
FIND_PACKAGE(ITK QUIET NO_MODULE
NAMES ITK InsightToolkit
CONFIGS ITKConfig.cmake
)
ENDIF()
# Search only if the location is not already known. SET(ITK_DIR_MESSAGE "Please set ITK_DIR to the directory containing ITKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/InsightToolkit for an installation.")
IF(NOT ITK_DIR)
# Get the system search path as a list.
IF(UNIX)
STRING(REGEX MATCHALL "[^:]+" ITK_DIR_SEARCH1 "$ENV{PATH}")
ELSE(UNIX)
STRING(REGEX REPLACE "\\\\" "/" ITK_DIR_SEARCH1 "$ENV{PATH}")
ENDIF(UNIX)
STRING(REGEX REPLACE "/;" ";" ITK_DIR_SEARCH2 ${ITK_DIR_SEARCH1})
# Construct a set of paths relative to the system search path.
SET(ITK_DIR_SEARCH "")
FOREACH(dir ${ITK_DIR_SEARCH2})
SET(ITK_DIR_SEARCH ${ITK_DIR_SEARCH} "${dir}/../lib/InsightToolkit")
ENDFOREACH(dir)
#
# Look for an installation or build tree.
#
FIND_PATH(ITK_DIR ITKConfig.cmake
# Look for an environment variable ITK_DIR.
$ENV{ITK_DIR}
# Look in places relative to the system executable search path.
${ITK_DIR_SEARCH}
# Look in standard UNIX install locations.
/usr/local/lib/InsightToolkit
/usr/lib/InsightToolkit
# Read from the CMakeSetup registry entries. It is likely that
# ITK will have been recently built.
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
# Help the user find it if we cannot.
DOC "The ${ITK_DIR_STRING}"
)
ENDIF(NOT ITK_DIR)
# If ITK was found, load the configuration file to get the rest of the
# settings.
IF(ITK_DIR)
SET(ITK_FOUND 1)
INCLUDE(${ITK_DIR}/ITKConfig.cmake)
IF(ITK_FOUND)
# Set USE_ITK_FILE for backward-compatability. # Set USE_ITK_FILE for backward-compatability.
SET(USE_ITK_FILE ${ITK_USE_FILE}) SET(USE_ITK_FILE ${ITK_USE_FILE})
ELSE(ITK_DIR) ELSEIF(ITK_FIND_REQUIRED)
SET(ITK_FOUND 0) MESSAGE(FATAL_ERROR ${ITK_DIR_MESSAGE})
IF(ITK_FIND_REQUIRED) ELSEIF(NOT ITK_FIND_QUIETLY)
MESSAGE(FATAL_ERROR "Please set ITK_DIR to the ${ITK_DIR_STRING}") MESSAGE(STATUS ${ITK_DIR_MESSAGE})
ENDIF(ITK_FIND_REQUIRED) ENDIF()
ENDIF(ITK_DIR)

View File

@ -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)

View File

@ -242,9 +242,9 @@ IF (QT_MIN_VERSION)
ENDIF (QT_MIN_VERSION) ENDIF (QT_MIN_VERSION)
# if the include a library are found then we have it # if the include a library are found then we have it
IF(QT_INCLUDE_DIR AND QT_QT_LIBRARY) INCLUDE(FindPackageHandleStandardArgs)
SET( QT_FOUND "YES" ) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt3 DEFAULT_MSG QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
ENDIF(QT_INCLUDE_DIR AND QT_QT_LIBRARY) SET(QT_FOUND ${QT3_FOUND} )
IF(QT_FOUND) IF(QT_FOUND)
SET( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} ) SET( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} )

View File

@ -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}")

View File

@ -104,7 +104,7 @@ ENDIF(WIN32)
FIND_LIBRARY(TCL_LIBRARY FIND_LIBRARY(TCL_LIBRARY
NAMES NAMES
tcl tcl
tcl${TK_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION} tcl${TCL_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION}
tcl86 tcl8.6 tcl86 tcl8.6
tcl85 tcl8.5 tcl85 tcl8.5
tcl84 tcl8.4 tcl84 tcl8.4
@ -117,7 +117,7 @@ FIND_LIBRARY(TCL_LIBRARY
FIND_LIBRARY(TK_LIBRARY FIND_LIBRARY(TK_LIBRARY
NAMES NAMES
tk tk
tk${TCL_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION} tk${TK_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION}
tk86 tk8.6 tk86 tk8.6
tk85 tk8.5 tk85 tk8.5
tk84 tk8.4 tk84 tk8.4

View File

@ -45,10 +45,12 @@ set(module_symbols
my_module_mp_my_sub_ # Intel my_module_mp_my_sub_ # Intel
MY_MODULE_mp_MY_SUB # Intel on Windows MY_MODULE_mp_MY_SUB # Intel on Windows
my_module_my_sub_ # PGI my_module_my_sub_ # PGI
my_module_MP_my_sub # NAG
mymodule$mysub # HP mymodule$mysub # HP
mymodule_mp_mysub_ # Intel mymodule_mp_mysub_ # Intel
MYMODULE_mp_MYSUB # Intel on Windows MYMODULE_mp_MYSUB # Intel on Windows
mymodule_mysub_ # PGI mymodule_mysub_ # PGI
mymodule_MP_mysub # NAG
${FortranCInterface_MODULE_SYMBOLS} ${FortranCInterface_MODULE_SYMBOLS}
) )
list(REMOVE_DUPLICATES module_symbols) list(REMOVE_DUPLICATES module_symbols)

View File

@ -3,7 +3,7 @@ SET(CYGWIN 1)
SET(CMAKE_SHARED_LIBRARY_PREFIX "cyg") SET(CMAKE_SHARED_LIBRARY_PREFIX "cyg")
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
SET(CMAKE_SHARED_MODULE_PREFIX "lib") SET(CMAKE_SHARED_MODULE_PREFIX "cyg")
SET(CMAKE_SHARED_MODULE_SUFFIX ".dll") SET(CMAKE_SHARED_MODULE_SUFFIX ".dll")
SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib") SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a") SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")

View File

@ -0,0 +1,5 @@
set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
# Need -fpp explicitly on case-insensitive filesystem.
set(CMAKE_Fortran_COMPILE_OBJECT
"<CMAKE_Fortran_COMPILER> -fpp -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")

View File

@ -33,8 +33,8 @@ SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names") SET(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names") SET(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")
IF(HAVE_FLAG_SEARCH_PATHS_FIRST) IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
SET(CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") SET(CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
@ -42,8 +42,8 @@ IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
ENDIF(HAVE_FLAG_SEARCH_PATHS_FIRST) ENDIF(HAVE_FLAG_SEARCH_PATHS_FIRST)
SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1) SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names") SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
SET(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") SET(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
SET(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") SET(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")

View File

@ -0,0 +1,10 @@
set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
# Need one "-Wl," level to send flag through to gcc.
# Use "-Xlinker" to get through gcc to real linker.
set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-Wl,-shared")
set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-Xlinker,-rpath,-Xlinker,")
set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG "-Wl,-Xlinker,-rpath-link,-Xlinker,")
set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-Xlinker,-soname,-Xlinker,")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-rdynamic")

View File

@ -212,6 +212,8 @@ SET (CMAKE_EXE_LINKER_FLAGS_INIT
SET( MSVC_INCREMENTAL_YES_FLAG "") SET( MSVC_INCREMENTAL_YES_FLAG "")
IF(NOT MSVC_INCREMENTAL_DEFAULT) IF(NOT MSVC_INCREMENTAL_DEFAULT)
SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES")
ELSE()
SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" )
ENDIF() ENDIF()
IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE) IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)

View File

@ -35,10 +35,10 @@ SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY})
IF(Q_WS_WIN) IF(Q_WS_WIN)
# On Windows, qconfig.pri has "static" for static library builds # On Windows, qconfig.pri has "shared" for shared library builds
IF(QT_CONFIG MATCHES "static") IF(NOT QT_CONFIG MATCHES "shared")
SET(QT_IS_STATIC 1) SET(QT_IS_STATIC 1)
ENDIF(QT_CONFIG MATCHES "static") ENDIF(NOT QT_CONFIG MATCHES "shared")
ELSE(Q_WS_WIN) ELSE(Q_WS_WIN)
# On other platforms, check file extension to know if its static # On other platforms, check file extension to know if its static
IF(QT_QTCORE_LIBRARY_RELEASE) IF(QT_QTCORE_LIBRARY_RELEASE)
@ -75,6 +75,23 @@ IF(QT_QCONFIG MATCHES "system-png")
SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${PNG_LIBRARY}) SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${PNG_LIBRARY})
ENDIF(QT_QCONFIG MATCHES "system-png") ENDIF(QT_QCONFIG MATCHES "system-png")
## system jpeg
IF(QT_QCONFIG MATCHES "system-jpeg")
find_package(JPEG)
SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${JPEG_LIBRARIES})
ENDIF(QT_QCONFIG MATCHES "system-jpeg")
## system tiff
IF(QT_QCONFIG MATCHES "system-tiff")
find_package(TIFF)
SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${TIFF_LIBRARIES})
ENDIF(QT_QCONFIG MATCHES "system-tiff")
## system mng
IF(QT_QCONFIG MATCHES "system-mng")
find_library(MNG_LIBRARY NAMES mng)
SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${MNG_LIBRARY})
ENDIF(QT_QCONFIG MATCHES "system-mng")
# for X11, get X11 library directory # for X11, get X11 library directory
IF(Q_WS_X11) IF(Q_WS_X11)

View File

@ -71,12 +71,12 @@ MACRO (QT4_GET_MOC_FLAGS _moc_flags)
GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES) GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
FOREACH(_current ${_inc_DIRS}) FOREACH(_current ${_inc_DIRS})
IF("${_current}" MATCHES ".framework/?$") IF("${_current}" MATCHES "\\.framework/?$")
STRING(REGEX REPLACE "/[^/]+.framework" "" framework_path "${_current}") STRING(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")
SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}") SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
ELSE("${_current}" MATCHES ".framework/?$") ELSE("${_current}" MATCHES "\\.framework/?$")
SET(${_moc_flags} ${${_moc_flags}} "-I${_current}") SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
ENDIF("${_current}" MATCHES ".framework/?$") ENDIF("${_current}" MATCHES "\\.framework/?$")
ENDFOREACH(_current ${_inc_DIRS}) ENDFOREACH(_current ${_inc_DIRS})
GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS) GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)
@ -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)

View File

@ -105,12 +105,12 @@ if (!archive) \
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup) int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
{ {
packageFileNames.clear(); packageFileNames.clear();
// The default behavior is to have one package by component group // The default behavior is to have one package by component group
// unless CPACK_COMPONENTS_IGNORE_GROUP is specified. // unless CPACK_COMPONENTS_IGNORE_GROUP is specified.
if (!ignoreComponentGroup) if (!ignoreGroup)
{ {
std::map<std::string, cmCPackComponentGroup>::iterator compGIt; std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
for (compGIt=this->ComponentGroups.begin(); for (compGIt=this->ComponentGroups.begin();
@ -170,7 +170,7 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne) int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponent)
{ {
// reset the package file names // reset the package file names
packageFileNames.clear(); packageFileNames.clear();
@ -185,7 +185,7 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive); DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
// The ALL GROUP in ONE package case // The ALL GROUP in ONE package case
if (! allComponentInOne) { if (! allComponent) {
// iterate over the component groups // iterate over the component groups
std::map<std::string, cmCPackComponentGroup>::iterator compGIt; std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
for (compGIt=this->ComponentGroups.begin(); for (compGIt=this->ComponentGroups.begin();
@ -226,79 +226,28 @@ int cmCPackArchiveGenerator::PackageFiles()
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: " cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: "
<< toplevel << std::endl); << toplevel << std::endl);
// The default behavior is to create 1 package by component group PrepareGroupingKind();
// unless the user asked to put all COMPONENTS in a single package
bool allGroupInOne = (NULL !=
(this->GetOption(
"CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE")));
bool allComponentInOne = (NULL !=
(this->GetOption(
"CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE")));
bool ignoreComponentGroup = ( NULL !=
(this->GetOption(
"CPACK_COMPONENTS_IGNORE_GROUPS")));
std::string groupingType; if (SupportsComponentInstallation()) {
// CASE 1 : COMPONENT ALL-IN-ONE package
// Second way to specify grouping // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
if (NULL != this->GetOption("CPACK_COMPONENTS_GROUPING")) { // then the package file is unique and should be open here.
groupingType = this->GetOption("CPACK_COMPONENTS_GROUPING"); if (allComponentInOne ||
(allGroupInOne && (!this->ComponentGroups.empty()))
)
{
return PackageComponentsAllInOne(allComponentInOne);
}
// CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one)
// There will be 1 package for each component group
// however one may require to ignore component group and
// in this case you'll get 1 package for each component.
else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup))
{
return PackageComponents(ignoreComponentGroup);
}
} }
if (groupingType.length()>0)
{
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
<< this->Name << "]"
<< " requested component grouping = "<< groupingType <<std::endl);
if (groupingType == "ALL_GROUP_IN_ONE")
{
allGroupInOne = true;
}
else if (groupingType == "ALL_COMPONENT_IN_ONE")
{
allComponentInOne = true;
}
else if (groupingType == "IGNORE")
{
ignoreComponentGroup = true;
}
else
{
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " requested component grouping type <"<< groupingType
<< "> UNKNOWN not in (ALL_GROUP_IN_ONE,"
"ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl);
}
}
// Some components were defined but NO group
// force ignoreGroups
if (this->ComponentGroups.empty() && (!this->Components.empty())
&& (!ignoreComponentGroup)) {
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " Some Components defined but NO component group:"
<< " Ignoring component group."
<< std::endl);
ignoreComponentGroup = true;
}
// CASE 1 : COMPONENT ALL-IN-ONE package
// If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
// then the package file is unique and should be open here.
if (allComponentInOne || (allGroupInOne && (!this->ComponentGroups.empty())))
{
return PackageComponentsAllInOne(allComponentInOne);
}
// CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one)
// There will be 1 package for each component group
// however one may require to ignore component group and
// in this case you'll get 1 package for each component.
else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup))
{
return PackageComponents(ignoreComponentGroup);
}
// CASE 3 : NON COMPONENT package. // CASE 3 : NON COMPONENT package.
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive); DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
std::vector<std::string>::const_iterator fileIt; std::vector<std::string>::const_iterator fileIt;
@ -333,5 +282,15 @@ int cmCPackArchiveGenerator::GenerateHeader(std::ostream*)
} }
bool cmCPackArchiveGenerator::SupportsComponentInstallation() const { bool cmCPackArchiveGenerator::SupportsComponentInstallation() const {
return true; // The Component installation support should only
// be activated if explicitly requested by the user
// (for backward compatibility reason)
if (IsOn("CPACK_ARCHIVE_COMPONENT_INSTALL"))
{
return true;
}
else
{
return false;
}
} }

View File

@ -60,12 +60,12 @@ protected:
* install is used. This will create one * install is used. This will create one
* archive for each component group. * archive for each component group.
*/ */
int PackageComponents(bool ignoreComponentGroup); int PackageComponents(bool ignoreGroup);
/** /**
* Special case of component install where all * Special case of component install where all
* components will be put in a single installer. * components will be put in a single installer.
*/ */
int PackageComponentsAllInOne(bool allComponentInOne); int PackageComponentsAllInOne(bool allComponent);
virtual const char* GetOutputExtension() = 0; virtual const char* GetOutputExtension() = 0;
cmArchiveWrite::Compress Compress; cmArchiveWrite::Compress Compress;
cmArchiveWrite::Type Archive; cmArchiveWrite::Type Archive;

View File

@ -35,6 +35,9 @@ cmCPackGenerator::cmCPackGenerator()
this->GeneratorVerbose = false; this->GeneratorVerbose = false;
this->MakefileMap = 0; this->MakefileMap = 0;
this->Logger = 0; this->Logger = 0;
this->allGroupInOne = false;
this->allComponentInOne = false;
this->ignoreComponentGroup = false;
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -220,7 +223,7 @@ int cmCPackGenerator::InstallProject()
// If the CPackConfig file sets CPACK_INSTALLED_DIRECTORIES // If the CPackConfig file sets CPACK_INSTALLED_DIRECTORIES
// then glob it and copy it to CPACK_TEMPORARY_DIRECTORY // then glob it and copy it to CPACK_TEMPORARY_DIRECTORY
// This is used in Source packageing // This is used in Source packaging
if ( !this->InstallProjectViaInstalledDirectories( if ( !this->InstallProjectViaInstalledDirectories(
setDestDir, tempInstallDirectory) ) setDestDir, tempInstallDirectory) )
{ {
@ -548,7 +551,14 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
std::vector<std::string> componentsVector; std::vector<std::string> componentsVector;
bool componentInstall = false; bool componentInstall = false;
if (this->SupportsComponentInstallation()) /*
* We do a component install iff
* - the CPack generator support component
* - the user did not request Monolithic install
* (this works at CPack time too)
*/
if (this->SupportsComponentInstallation() &
!(this->IsSet("CPACK_MONOLITHIC_INSTALL")))
{ {
// Determine the installation types for this project (if provided). // Determine the installation types for this project (if provided).
std::string installTypesVar = "CPACK_" std::string installTypesVar = "CPACK_"
@ -691,7 +701,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
// //
// If DESTDIR has been 'internally set ON' this means that // If DESTDIR has been 'internally set ON' this means that
// the underlying CPack specific generator did ask for that // the underlying CPack specific generator did ask for that
// In this case we may overrode CPACK_INSTALL_PREFIX with // In this case we may override CPACK_INSTALL_PREFIX with
// CPACK_PACKAGING_INSTALL_PREFIX // CPACK_PACKAGING_INSTALL_PREFIX
// I know this is tricky and awkward but it's the price for // I know this is tricky and awkward but it's the price for
// CPACK_SET_DESTDIR backward compatibility. // CPACK_SET_DESTDIR backward compatibility.
@ -727,7 +737,20 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
{ {
dir = tempInstallDirectory + "/" + dir; dir = tempInstallDirectory + "/" + dir;
} }
/*
* We must re-set DESTDIR for each component
* We must not add the CPACK_INSTALL_PREFIX part because
* it will be added using the override of CMAKE_INSTALL_PREFIX
* The main reason for this awkward trick is that
* are using DESTDIR for 2 different reasons:
* - Because it was asked by the CPack Generator or the user
* using CPACK_SET_DESTDIR
* - Because it was already used for component install
* in order to put things in subdirs...
*/
cmSystemTools::PutEnv(
(std::string("DESTDIR=")+tempInstallDirectory).c_str()
);
cmCPackLogger(cmCPackLog::LOG_DEBUG, cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Creating directory: '" << dir << "'" << std::endl); "- Creating directory: '" << dir << "'" << std::endl);
@ -1047,7 +1070,13 @@ bool cmCPackGenerator::IsSet(const char* name) const
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
const char* cmCPackGenerator::GetOption(const char* op) bool cmCPackGenerator::IsOn(const char* name) const
{
return cmSystemTools::IsOn(GetOption(name));
}
//----------------------------------------------------------------------
const char* cmCPackGenerator::GetOption(const char* op) const
{ {
const char* ret = this->MakefileMap->GetDefinition(op); const char* ret = this->MakefileMap->GetDefinition(op);
if(!ret) if(!ret)
@ -1195,6 +1224,70 @@ int cmCPackGenerator::CleanTemporaryDirectory()
return 1; return 1;
} }
//----------------------------------------------------------------------
int cmCPackGenerator::PrepareGroupingKind()
{
// The default behavior is to create 1 package by component group
// unless the user asked to put all COMPONENTS in a single package
allGroupInOne = (NULL !=
(this->GetOption(
"CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE")));
allComponentInOne = (NULL !=
(this->GetOption(
"CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE")));
ignoreComponentGroup = (NULL !=
(this->GetOption(
"CPACK_COMPONENTS_IGNORE_GROUPS")));
std::string groupingType;
// Second way to specify grouping
if (NULL != this->GetOption("CPACK_COMPONENTS_GROUPING")) {
groupingType = this->GetOption("CPACK_COMPONENTS_GROUPING");
}
if (groupingType.length()>0)
{
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
<< this->Name << "]"
<< " requested component grouping = "<< groupingType <<std::endl);
if (groupingType == "ALL_GROUP_IN_ONE")
{
allGroupInOne = true;
}
else if (groupingType == "ALL_COMPONENT_IN_ONE")
{
allComponentInOne = true;
}
else if (groupingType == "IGNORE")
{
ignoreComponentGroup = true;
}
else
{
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " requested component grouping type <"<< groupingType
<< "> UNKNOWN not in (ALL_GROUP_IN_ONE,"
"ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl);
}
}
// Some components were defined but NO group
// force ignoreGroups
if (this->ComponentGroups.empty() && (!this->Components.empty())
&& (!ignoreComponentGroup)) {
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " Some Components defined but NO component group:"
<< " Ignoring component group."
<< std::endl);
ignoreComponentGroup = true;
}
return 1;
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool cmCPackGenerator::SupportsComponentInstallation() const bool cmCPackGenerator::SupportsComponentInstallation() const
{ {

View File

@ -88,8 +88,9 @@ public:
//! Set and get the options //! Set and get the options
void SetOption(const char* op, const char* value); void SetOption(const char* op, const char* value);
void SetOptionIfNotSet(const char* op, const char* value); void SetOptionIfNotSet(const char* op, const char* value);
const char* GetOption(const char* op); const char* GetOption(const char* op) const;
bool IsSet(const char* name) const; bool IsSet(const char* name) const;
bool IsOn(const char* name) const;
//! Set all the variables //! Set all the variables
int SetCMakeRoot(); int SetCMakeRoot();
@ -119,6 +120,17 @@ protected:
virtual const char* GetOutputExtension() { return ".cpack"; } virtual const char* GetOutputExtension() { return ".cpack"; }
virtual const char* GetOutputPostfix() { return 0; } virtual const char* GetOutputPostfix() { return 0; }
/**
* Prepare requested grouping kind from CPACK_xxx vars
* CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE
* CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE
* CPACK_COMPONENTS_IGNORE_GROUPS
* or
* CPACK_COMPONENTS_GROUPING
* @return 1 on success 0 on failure.
*/
virtual int PrepareGroupingKind();
/** /**
* Package the list of files and/or components which * Package the list of files and/or components which
* has been prepared by the beginning of DoPackage. * has been prepared by the beginning of DoPackage.
@ -200,6 +212,20 @@ protected:
*/ */
std::map<std::string, cmCPackComponent> Components; std::map<std::string, cmCPackComponent> Components;
std::map<std::string, cmCPackComponentGroup> ComponentGroups; std::map<std::string, cmCPackComponentGroup> ComponentGroups;
/**
* If true All component groups will be put in a single package.
*/
bool allGroupInOne;
/**
* If true All component will be put in a single package.
*/
bool allComponentInOne;
/**
* If true component grouping will be ignored.
* You will still get 1 package for each component unless
* allComponentInOne is true.
*/
bool ignoreComponentGroup;
cmCPackLog* Logger; cmCPackLog* Logger;
private: private:

View File

@ -37,13 +37,84 @@ int cmCPackRPMGenerator::InitializeInternal()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int cmCPackRPMGenerator::PackageFiles() int cmCPackRPMGenerator::PackageFiles()
{ {
this->ReadListFile("CPackRPM.cmake"); int retval = 1;
/* Digest Component grouping specification */
retval = PrepareGroupingKind();
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: "
<< toplevel << std::endl);
/* Are we in the component packaging case */
if (SupportsComponentInstallation() & (!this->ComponentGroups.empty()))
{
/* Reset package file name list it will be populated during the
* component packaging run*/
packageFileNames.clear();
std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
/* One Package per component CASE */
/* Iterate over components */
std::map<std::string, cmCPackComponent>::iterator compIt;
for (compIt=this->Components.begin();
compIt!=this->Components.end(); ++compIt )
{
std::string localToplevel(initialTopLevel);
std::string packageFileName(
cmSystemTools::GetParentDirectory(toplevel.c_str())
);
std::string outputFileName(
std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")
)
+"-"+compIt->first + this->GetOutputExtension());
localToplevel += "/"+ compIt->first;
/* replace the TEMP DIRECTORY with the component one */
this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
packageFileName += "/"+ outputFileName;
/* replace proposed CPACK_OUTPUT_FILE_NAME */
this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
/* replace the TEMPORARY package file name */
this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
packageFileName.c_str());
this->SetOption("CPACK_RPM_PACKAGE_COMPONENT",compIt->first.c_str());
if (!this->ReadListFile("CPackRPM.cmake"))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error while execution CPackRPM.cmake" << std::endl);
retval = 0;
}
// add the generated package to package file names list
packageFileNames.push_back(packageFileName);
}
}
/* This is the non component case */
else
{
if (!this->ReadListFile("CPackRPM.cmake"))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error while execution CPackRPM.cmake" << std::endl);
retval = 0;
}
}
if (!this->IsSet("RPMBUILD_EXECUTABLE")) if (!this->IsSet("RPMBUILD_EXECUTABLE"))
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl); cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl);
return 0; retval = 0;
} }
return 1; return retval;
} }
bool cmCPackRPMGenerator::SupportsComponentInstallation() const
{
if (IsOn("CPACK_RPM_COMPONENT_INSTALL"))
{
return true;
}
else
{
return false;
}
}

View File

@ -39,6 +39,7 @@ protected:
virtual int InitializeInternal(); virtual int InitializeInternal();
virtual int PackageFiles(); virtual int PackageFiles();
virtual const char* GetOutputExtension() { return ".rpm"; } virtual const char* GetOutputExtension() { return ".rpm"; }
virtual bool SupportsComponentInstallation() const;
}; };

View File

@ -275,12 +275,6 @@ void cmCTestMultiProcessHandler::StartNextTests()
} }
numToStart -= processors; numToStart -= processors;
} }
else
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
<< "Test did not start waiting on depends to finish: "
<< *test << "\n");
}
if(numToStart == 0) if(numToStart == 0)
{ {
return; return;

View File

@ -63,11 +63,10 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ctest_sleep( seconds )\n" " ctest_sleep(<seconds>)\n"
" ctest_sleep( time1 duration time2 )\n" "Sleep for given number of seconds.\n"
"With one argument it will sleep for a given number of seconds. " " ctest_sleep(<time1> <duration> <time2>)\n"
"With three arguments it will wait for time2 - time1 - duration " "Sleep for t=(time1 + duration - time2) seconds if t > 0.";
"seconds.";
} }
cmTypeMacro(cmCTestSleepCommand, cmCTestCommand); cmTypeMacro(cmCTestSleepCommand, cmCTestCommand);

View File

@ -2190,7 +2190,6 @@ bool cmCTestTestHandler::SetTestsProperties(
{ {
rtit->Labels.push_back(*crit); rtit->Labels.push_back(*crit);
} }
} }
if ( key == "MEASUREMENT" ) if ( key == "MEASUREMENT" )
{ {
@ -2219,6 +2218,10 @@ bool cmCTestTestHandler::SetTestsProperties(
std::string(crit->c_str()))); std::string(crit->c_str())));
} }
} }
if ( key == "WORKING_DIRECTORY" )
{
rtit->Directory = val;
}
} }
} }
} }

View File

@ -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("")

View File

@ -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)

View File

@ -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()))
{ {

View File

@ -161,6 +161,7 @@ bool cmAddCustomCommandCommand
filename += "/"; filename += "/";
} }
filename += copy; filename += copy;
cmSystemTools::ConvertToUnixSlashes(filename);
break; break;
case doing_source: case doing_source:
// We do not want to convert the argument to SOURCE because // We do not want to convert the argument to SOURCE because

View File

@ -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, "

View File

@ -24,11 +24,7 @@ bool cmAddDependenciesCommand
} }
std::string target_name = args[0]; std::string target_name = args[0];
if(cmTarget* target = this->Makefile->FindTargetToUse(target_name.c_str()))
cmTarget* target =
this->GetMakefile()->GetLocalGenerator()->
GetGlobalGenerator()->FindTarget(0, target_name.c_str());
if(target)
{ {
std::vector<std::string>::const_iterator s = args.begin(); std::vector<std::string>::const_iterator s = args.begin();
++s; // skip over target_name ++s; // skip over target_name

View File

@ -62,6 +62,8 @@ public:
"top-level target is one created by ADD_EXECUTABLE, ADD_LIBRARY, " "top-level target is one created by ADD_EXECUTABLE, ADD_LIBRARY, "
"or ADD_CUSTOM_TARGET. Adding dependencies with this command " "or ADD_CUSTOM_TARGET. Adding dependencies with this command "
"can be used to make sure one target is built before another target. " "can be used to make sure one target is built before another target. "
"Dependencies added to an IMPORTED target are followed transitively "
"in its place since the target itself does not build. "
"See the DEPENDS option of ADD_CUSTOM_TARGET " "See the DEPENDS option of ADD_CUSTOM_TARGET "
"and ADD_CUSTOM_COMMAND for adding file-level dependencies in custom " "and ADD_CUSTOM_COMMAND for adding file-level dependencies in custom "
"rules. See the OBJECT_DEPENDS option in " "rules. See the OBJECT_DEPENDS option in "

View File

@ -93,14 +93,14 @@ bool cmCacheManager::LoadCache(const char* path,
return this->LoadCache(path, internal, emptySet, emptySet); return this->LoadCache(path, internal, emptySet, emptySet);
} }
bool cmCacheManager::ParseEntry(const char* entry, static bool ParseEntryWithoutType(const char* entry,
std::string& var, std::string& var,
std::string& value) std::string& value)
{ {
// input line is: key:type=value // input line is: key=value
static cmsys::RegularExpression reg( static cmsys::RegularExpression reg(
"^([^:]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); "^([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
// input line is: "key":type=value // input line is: "key"=value
static cmsys::RegularExpression regQuoted( static cmsys::RegularExpression regQuoted(
"^\"([^\"]*)\"=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); "^\"([^\"]*)\"=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
bool flag = false; bool flag = false;
@ -169,6 +169,11 @@ bool cmCacheManager::ParseEntry(const char* entry,
value.size() - 2); value.size() - 2);
} }
if (!flag)
{
return ParseEntryWithoutType(entry, var, value);
}
return flag; return flag;
} }
@ -336,7 +341,7 @@ bool cmCacheManager::LoadCache(const char* path,
std::string("The current CMakeCache.txt directory ") + std::string("The current CMakeCache.txt directory ") +
currentcwd + std::string(" is different than the directory ") + currentcwd + std::string(" is different than the directory ") +
std::string(this->GetCacheValue("CMAKE_CACHEFILE_DIR")) + std::string(this->GetCacheValue("CMAKE_CACHEFILE_DIR")) +
std::string(" where CMackeCache.txt was created. This may result " std::string(" where CMakeCache.txt was created. This may result "
"in binaries being created in the wrong place. If you " "in binaries being created in the wrong place. If you "
"are not sure, reedit the CMakeCache.txt"); "are not sure, reedit the CMakeCache.txt");
cmSystemTools::Error(message.c_str()); cmSystemTools::Error(message.c_str());

View File

@ -139,10 +139,6 @@ public:
std::string& value, std::string& value,
CacheEntryType& type); CacheEntryType& type);
static bool ParseEntry(const char* entry,
std::string& var,
std::string& value);
///! Get a value from the cache given a key ///! Get a value from the cache given a key
const char* GetCacheValue(const char* key) const; const char* GetCacheValue(const char* key) const;

View File

@ -923,7 +923,7 @@ void cmComputeLinkInformation::ComputeItemParserInfo()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmComputeLinkInformation::AddLinkPrefix(const char* p) void cmComputeLinkInformation::AddLinkPrefix(const char* p)
{ {
if(p) if(p && *p)
{ {
this->LinkPrefixes.insert(p); this->LinkPrefixes.insert(p);
} }

View File

@ -144,7 +144,7 @@ bool cmComputeTargetDepends::Compute()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void void
cmComputeTargetDepends::GetTargetDirectDepends(cmTarget* t, cmComputeTargetDepends::GetTargetDirectDepends(cmTarget* t,
std::set<cmTarget*>& deps) cmTargetDependSet& deps)
{ {
// Lookup the index for this target. All targets should be known by // Lookup the index for this target. All targets should be known by
// this point. // this point.
@ -156,7 +156,9 @@ cmComputeTargetDepends::GetTargetDirectDepends(cmTarget* t,
EdgeList const& nl = this->FinalGraph[i]; EdgeList const& nl = this->FinalGraph[i];
for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
{ {
deps.insert(this->Targets[*ni]); cmTarget* dep = this->Targets[*ni];
cmTargetDependSet::iterator di = deps.insert(dep).first;
di->SetType(ni->IsStrong());
} }
} }
@ -244,13 +246,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
// Check the target's makefile first. // Check the target's makefile first.
cmTarget* dependee = cmTarget* dependee =
depender->GetMakefile()->FindTarget(dependee_name); depender->GetMakefile()->FindTargetToUse(dependee_name);
// Then search globally.
if(!dependee)
{
dependee = this->GlobalGenerator->FindTarget(0, dependee_name);
}
// Skip targets that will not really be linked. This is probably a // Skip targets that will not really be linked. This is probably a
// name conflict between an external library and an executable // name conflict between an external library and an executable
@ -262,25 +258,42 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
dependee = 0; dependee = 0;
} }
// If not found then skip then the dependee. if(dependee)
if(!dependee)
{ {
return; this->AddTargetDepend(depender_index, dependee, linking);
} }
}
// No imported targets should have been found. //----------------------------------------------------------------------------
assert(!dependee->IsImported()); void cmComputeTargetDepends::AddTargetDepend(int depender_index,
cmTarget* dependee,
bool linking)
{
if(dependee->IsImported())
{
// Skip imported targets but follow their utility dependencies.
std::set<cmStdString> const& utils = dependee->GetUtilities();
for(std::set<cmStdString>::const_iterator i = utils.begin();
i != utils.end(); ++i)
{
cmTarget* transitive_dependee =
dependee->GetMakefile()->FindTargetToUse(i->c_str());
this->AddTargetDepend(depender_index, transitive_dependee, false);
}
}
else
{
// Lookup the index for this target. All targets should be known by
// this point.
std::map<cmTarget*, int>::const_iterator tii =
this->TargetIndex.find(dependee);
assert(tii != this->TargetIndex.end());
int dependee_index = tii->second;
// Lookup the index for this target. All targets should be known by // Add this entry to the dependency graph.
// this point. this->InitialGraph[depender_index].push_back(
std::map<cmTarget*, int>::const_iterator tii = cmGraphEdge(dependee_index, !linking));
this->TargetIndex.find(dependee); }
assert(tii != this->TargetIndex.end());
int dependee_index = tii->second;
// Add this entry to the dependency graph.
this->InitialGraph[depender_index].push_back(
cmGraphEdge(dependee_index, !linking));
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -445,7 +458,7 @@ cmComputeTargetDepends
int j = *ei; int j = *ei;
if(cmap[j] == c && ei->IsStrong()) if(cmap[j] == c && ei->IsStrong())
{ {
this->FinalGraph[i].push_back(j); this->FinalGraph[i].push_back(cmGraphEdge(j, true));
if(!this->IntraComponent(cmap, c, j, head, emitted, visited)) if(!this->IntraComponent(cmap, c, j, head, emitted, visited))
{ {
return false; return false;
@ -456,7 +469,7 @@ cmComputeTargetDepends
// Prepend to a linear linked-list of intra-component edges. // Prepend to a linear linked-list of intra-component edges.
if(*head >= 0) if(*head >= 0)
{ {
this->FinalGraph[i].push_back(*head); this->FinalGraph[i].push_back(cmGraphEdge(*head, false));
} }
else else
{ {
@ -515,7 +528,7 @@ cmComputeTargetDepends
int dependee_component = *ni; int dependee_component = *ni;
int dependee_component_head = this->ComponentHead[dependee_component]; int dependee_component_head = this->ComponentHead[dependee_component];
this->FinalGraph[depender_component_tail] this->FinalGraph[depender_component_tail]
.push_back(dependee_component_head); .push_back(cmGraphEdge(dependee_component_head, ni->IsStrong()));
} }
} }
return true; return true;

View File

@ -21,6 +21,7 @@
class cmComputeComponentGraph; class cmComputeComponentGraph;
class cmGlobalGenerator; class cmGlobalGenerator;
class cmTarget; class cmTarget;
class cmTargetDependSet;
/** \class cmComputeTargetDepends /** \class cmComputeTargetDepends
* \brief Compute global interdependencies among targets. * \brief Compute global interdependencies among targets.
@ -38,13 +39,14 @@ public:
bool Compute(); bool Compute();
std::vector<cmTarget*> const& GetTargets() const { return this->Targets; } std::vector<cmTarget*> const& GetTargets() const { return this->Targets; }
void GetTargetDirectDepends(cmTarget* t, std::set<cmTarget*>& deps); void GetTargetDirectDepends(cmTarget* t, cmTargetDependSet& deps);
private: private:
void CollectTargets(); void CollectTargets();
void CollectDepends(); void CollectDepends();
void CollectTargetDepends(int depender_index); void CollectTargetDepends(int depender_index);
void AddTargetDepend(int depender_index, const char* dependee_name, void AddTargetDepend(int depender_index, const char* dependee_name,
bool linking); bool linking);
void AddTargetDepend(int depender_index, cmTarget* dependee, bool linking);
bool ComputeFinalDepends(cmComputeComponentGraph const& ccg); bool ComputeFinalDepends(cmComputeComponentGraph const& ccg);
cmGlobalGenerator* GlobalGenerator; cmGlobalGenerator* GlobalGenerator;

View File

@ -169,8 +169,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
const char* lang =(this->Makefile->GetCMakeInstance()->GetGlobalGenerator() const char* lang =(this->Makefile->GetCMakeInstance()->GetGlobalGenerator()
->GetLanguageFromExtension(ext.c_str())); ->GetLanguageFromExtension(ext.c_str()));
const char* def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH"); const char* def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH");
fprintf(fout, "cmake_minimum_required(VERSION %u.%u)\n", fprintf(fout, "cmake_minimum_required(VERSION %u.%u.%u.%u)\n",
cmVersion::GetMajorVersion(), cmVersion::GetMinorVersion()); cmVersion::GetMajorVersion(), cmVersion::GetMinorVersion(),
cmVersion::GetPatchVersion(), cmVersion::GetTweakVersion());
if(def) if(def)
{ {
fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def); fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def);
@ -394,28 +395,18 @@ void cmCoreTryCompile::CleanupFiles(const char* binDir)
} }
else else
{ {
if(!cmSystemTools::RemoveFile(fullPath.c_str())) // Sometimes anti-virus software hangs on to new files so we
// cannot delete them immediately. Try a few times.
int tries = 5;
while(!cmSystemTools::RemoveFile(fullPath.c_str()) &&
--tries && cmSystemTools::FileExists(fullPath.c_str()))
{ {
bool removed = false; cmSystemTools::Delay(500);
int numAttempts = 0; }
// sometimes anti-virus software hangs on to if(tries == 0)
// new files and we can not delete them, so try {
// 5 times with .5 second delay between tries. std::string m = "Remove failed on file: " + fullPath;
while(!removed && numAttempts < 5) cmSystemTools::ReportLastSystemError(m.c_str());
{
cmSystemTools::Delay(500);
if(cmSystemTools::RemoveFile(fullPath.c_str()))
{
removed = true;
}
numAttempts++;
}
if(!removed)
{
std::string m = "Remove failed on file: ";
m += fullPath;
cmSystemTools::ReportLastSystemError(m.c_str());
}
} }
} }
} }

View File

@ -1336,6 +1336,29 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"this variable is defined to 1.", "this variable is defined to 1.",
false,"Variables for Languages"); false,"Variables for Languages");
cm->DefineProperty(
"CMAKE_Fortran_MODDIR_FLAG", cmProperty::VARIABLE,
"Fortran flag for module output directory.",
"This stores the flag needed to pass the value of the "
"Fortran_MODULE_DIRECTORY target property to the compiler.",
false,"Variables for Languages");
cm->DefineProperty(
"CMAKE_Fortran_MODDIR_DEFAULT", cmProperty::VARIABLE,
"Fortran default module output directory.",
"Most Fortran compilers write .mod files to the current working "
"directory. "
"For those that do not, this is set to \".\" and used when the "
"Fortran_MODULE_DIRECTORY target property is not set.",
false,"Variables for Languages");
cm->DefineProperty(
"CMAKE_Fortran_MODOUT_FLAG", cmProperty::VARIABLE,
"Fortran flag to enable module output.",
"Most Fortran compilers write .mod files out by default. "
"For others, this stores the flag needed to enable module output.",
false,"Variables for Languages");
// variables that are used by cmake but not to be documented // variables that are used by cmake but not to be documented
cm->DefineProperty("CMAKE_MATCH_0", cmProperty::VARIABLE,0,0); cm->DefineProperty("CMAKE_MATCH_0", cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_MATCH_1", cmProperty::VARIABLE,0,0); cm->DefineProperty("CMAKE_MATCH_1", cmProperty::VARIABLE,0,0);

View File

@ -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
@ -695,6 +685,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand(
command += " /NOLOGO /f &quot;"; command += " /NOLOGO /f &quot;";
command += makefileName; command += makefileName;
command += "&quot; "; command += "&quot; ";
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)
@ -705,6 +696,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand(
command += " -f &quot;"; command += " -f &quot;";
command += makefileName; command += makefileName;
command += "&quot; "; command += "&quot; ";
command += " VERBOSE=1 ";
command += target; command += target;
} }
else else
@ -713,6 +705,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand(
command += " -f &quot;"; command += " -f &quot;";
command += makefileName; command += makefileName;
command += "&quot; "; command += "&quot; ";
command += " VERBOSE=1 ";
command += target; command += target;
} }
return command; return command;

View File

@ -22,14 +22,11 @@ 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();}

View File

@ -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()
{ {
@ -744,6 +734,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
; ;
emmited.clear(); emmited.clear();
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
const std::string makeArgs = mf->GetSafeDefinition(
"CMAKE_ECLIPSE_MAKE_ARGUMENTS");
cmGlobalGenerator* generator cmGlobalGenerator* generator
= const_cast<cmGlobalGenerator*>(this->GlobalGenerator); = const_cast<cmGlobalGenerator*>(this->GlobalGenerator);
@ -804,7 +796,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
} }
if (insertTarget) if (insertTarget)
{ {
this->AppendTarget(fout, ti->first, make, subdir, ": "); this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
} }
} }
break; break;
@ -819,7 +811,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
break; break;
} }
this->AppendTarget(fout, ti->first, make, subdir, ": "); this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
break; break;
case cmTarget::EXECUTABLE: case cmTarget::EXECUTABLE:
case cmTarget::STATIC_LIBRARY: case cmTarget::STATIC_LIBRARY:
@ -828,10 +820,10 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
{ {
const char* prefix = (ti->second.GetType()==cmTarget::EXECUTABLE ? const char* prefix = (ti->second.GetType()==cmTarget::EXECUTABLE ?
"[exe] " : "[lib] "); "[exe] " : "[lib] ");
this->AppendTarget(fout, ti->first, make, subdir, prefix); this->AppendTarget(fout, ti->first, make, makeArgs, subdir, prefix);
std::string fastTarget = ti->first; std::string fastTarget = ti->first;
fastTarget += "/fast"; fastTarget += "/fast";
this->AppendTarget(fout, fastTarget, make, subdir, prefix); this->AppendTarget(fout, fastTarget, make, makeArgs, subdir, prefix);
} }
break; break;
// ignore these: // ignore these:
@ -846,11 +838,11 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
// insert the all and clean targets in every subdir // insert the all and clean targets in every subdir
if (!allTarget.empty()) if (!allTarget.empty())
{ {
this->AppendTarget(fout, allTarget, make, subdir, ": "); this->AppendTarget(fout, allTarget, make, makeArgs, subdir, ": ");
} }
if (!cleanTarget.empty()) if (!cleanTarget.empty())
{ {
this->AppendTarget(fout, cleanTarget, make, subdir, ": "); this->AppendTarget(fout, cleanTarget, make, makeArgs, subdir, ": ");
} }
//insert rules for compiling, preprocessing and assembling individual files //insert rules for compiling, preprocessing and assembling individual files
@ -870,7 +862,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
{ {
prefix = "[pre] "; prefix = "[pre] ";
} }
this->AppendTarget(fout, *fit, make, subdir, prefix); this->AppendTarget(fout, *fit, make, makeArgs, subdir, prefix);
} }
} }
@ -1003,6 +995,7 @@ void cmExtraEclipseCDT4Generator
void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout, void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
const std::string& target, const std::string& target,
const std::string& make, const std::string& make,
const std::string& makeArgs,
const std::string& path, const std::string& path,
const char* prefix) const char* prefix)
{ {
@ -1013,7 +1006,7 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
"<buildCommand>" "<buildCommand>"
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make) << cmExtraEclipseCDT4Generator::GetEclipsePath(make)
<< "</buildCommand>\n" << "</buildCommand>\n"
"<buildArguments/>\n" "<buildArguments>" << makeArgs << "</buildArguments>\n"
"<buildTarget>" << target << "</buildTarget>\n" "<buildTarget>" << target << "</buildTarget>\n"
"<stopOnError>true</stopOnError>\n" "<stopOnError>true</stopOnError>\n"
"<useDefaultCommand>false</useDefaultCommand>\n" "<useDefaultCommand>false</useDefaultCommand>\n"

View File

@ -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:
@ -75,6 +71,7 @@ private:
static void AppendTarget (cmGeneratedFileStream& fout, static void AppendTarget (cmGeneratedFileStream& fout,
const std::string& target, const std::string& target,
const std::string& make, const std::string& make,
const std::string& makeArguments,
const std::string& path, const std::string& path,
const char* prefix = ""); const char* prefix = "");
static void AppendScannerProfile (cmGeneratedFileStream& fout, static void AppendScannerProfile (cmGeneratedFileStream& fout,

View File

@ -13,10 +13,16 @@
cmFindBase::cmFindBase() cmFindBase::cmFindBase()
{ {
cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder,
"FIND_ARGS_XXX", "<VAR> NAMES name");
this->AlreadyInCache = false; this->AlreadyInCache = false;
this->AlreadyInCacheWithoutMetaInfo = false; this->AlreadyInCacheWithoutMetaInfo = false;
}
//----------------------------------------------------------------------------
void cmFindBase::GenerateDocumentation()
{
this->cmFindCommon::GenerateDocumentation();
cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder,
"FIND_ARGS_XXX", "<VAR> NAMES name");
this->GenericDocumentation = this->GenericDocumentation =
" FIND_XXX(<VAR> name1 [path1 path2 ...])\n" " FIND_XXX(<VAR> name1 [path1 path2 ...])\n"
"This is the short-hand signature for the command that " "This is the short-hand signature for the command that "
@ -98,6 +104,17 @@ cmFindBase::cmFindBase()
this->GenericDocumentation += this->GenericDocumentationPathsOrder; this->GenericDocumentation += this->GenericDocumentationPathsOrder;
} }
//----------------------------------------------------------------------------
const char* cmFindBase::GetFullDocumentation()
{
if(this->GenericDocumentation.empty())
{
this->GenerateDocumentation();
}
return this->GenericDocumentation.c_str();
}
//----------------------------------------------------------------------------
bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn) bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
{ {
if(argsIn.size() < 2 ) if(argsIn.size() < 2 )
@ -147,6 +164,11 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
} }
} }
} }
if(args.size() < 2 )
{
this->SetError("called with incorrect number of arguments");
return false;
}
this->VariableName = args[0]; this->VariableName = args[0];
if(this->CheckForVariableInCache()) if(this->CheckForVariableInCache())
{ {

View File

@ -31,10 +31,10 @@ public:
virtual bool ParseArguments(std::vector<std::string> const& args); virtual bool ParseArguments(std::vector<std::string> const& args);
cmTypeMacro(cmFindBase, cmFindCommon); cmTypeMacro(cmFindBase, cmFindCommon);
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation();
{return this->GenericDocumentation.c_str();}
protected: protected:
virtual void GenerateDocumentation();
void PrintFindStuff(); void PrintFindStuff();
void ExpandPaths(); void ExpandPaths();
void AddPathSuffixes(); void AddPathSuffixes();

View File

@ -34,7 +34,11 @@ cmFindCommon::cmFindCommon()
this->SearchFrameworkLast = false; this->SearchFrameworkLast = false;
this->SearchAppBundleOnly = false; this->SearchAppBundleOnly = false;
this->SearchAppBundleLast = false; this->SearchAppBundleLast = false;
}
//----------------------------------------------------------------------------
void cmFindCommon::GenerateDocumentation()
{
// Documentation components. // Documentation components.
this->GenericDocumentationMacPolicy = this->GenericDocumentationMacPolicy =
"On Darwin or systems supporting OS X Frameworks, the cmake variable" "On Darwin or systems supporting OS X Frameworks, the cmake variable"

View File

@ -56,6 +56,8 @@ protected:
/** Compute the current default bundle/framework search policy. */ /** Compute the current default bundle/framework search policy. */
void SelectDefaultMacMode(); void SelectDefaultMacMode();
virtual void GenerateDocumentation();
cmStdString CMakePathName; cmStdString CMakePathName;
RootPathMode FindRootPathMode; RootPathMode FindRootPathMode;

View File

@ -15,11 +15,16 @@
cmFindFileCommand::cmFindFileCommand() cmFindFileCommand::cmFindFileCommand()
{ {
this->IncludeFileInPath = true; this->IncludeFileInPath = true;
}
void cmFindFileCommand::GenerateDocumentation()
{
this->cmFindPathCommand::GenerateDocumentation();
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
"find_path", "find_file"); "find_path", "find_file");
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
"directory containing the named file", "directory containing the named file",
"full path to named file"); "full path to named file");
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
"file in a directory", "full path to a file"); "file in a directory", "full path to a file");
} }

View File

@ -44,6 +44,8 @@ public:
} }
cmTypeMacro(cmFindFileCommand, cmFindPathCommand); cmTypeMacro(cmFindFileCommand, cmFindPathCommand);
protected:
virtual void GenerateDocumentation();
}; };

View File

@ -16,6 +16,13 @@
cmFindLibraryCommand::cmFindLibraryCommand() cmFindLibraryCommand::cmFindLibraryCommand()
{ {
this->EnvironmentPath = "LIB";
}
//----------------------------------------------------------------------------
void cmFindLibraryCommand::GenerateDocumentation()
{
this->cmFindBase::GenerateDocumentation();
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
"FIND_XXX", "find_library"); "FIND_XXX", "find_library");
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
@ -40,8 +47,6 @@ cmFindLibraryCommand::cmFindLibraryCommand()
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
"CMAKE_FIND_ROOT_PATH_MODE_XXX", "CMAKE_FIND_ROOT_PATH_MODE_XXX",
"CMAKE_FIND_ROOT_PATH_MODE_LIBRARY"); "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY");
this->EnvironmentPath = "LIB";
this->GenericDocumentation += this->GenericDocumentation +=
"\n" "\n"
"If the library found is a framework, then VAR will be set to " "If the library found is a framework, then VAR will be set to "

View File

@ -64,6 +64,7 @@ protected:
void AddArchitecturePaths(const char* suffix); void AddArchitecturePaths(const char* suffix);
void AddLib64Paths(); void AddLib64Paths();
std::string FindLibrary(); std::string FindLibrary();
virtual void GenerateDocumentation();
private: private:
std::string FindNormalLibrary(); std::string FindNormalLibrary();
std::string FindFrameworkLibrary(); std::string FindFrameworkLibrary();

View File

@ -51,13 +51,6 @@ void cmFindPackageNeedBackwardsCompatibility(const std::string& variable,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmFindPackageCommand::cmFindPackageCommand() cmFindPackageCommand::cmFindPackageCommand()
{ {
cmSystemTools::ReplaceString(this->GenericDocumentationRootPath,
"CMAKE_FIND_ROOT_PATH_MODE_XXX",
"CMAKE_FIND_ROOT_PATH_MODE_PACKAGE");
cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder,
"FIND_ARGS_XXX", "<package>");
cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder,
"FIND_XXX", "find_package");
this->CMakePathName = "PACKAGE"; this->CMakePathName = "PACKAGE";
this->Quiet = false; this->Quiet = false;
this->Required = false; this->Required = false;
@ -78,6 +71,19 @@ cmFindPackageCommand::cmFindPackageCommand()
this->VersionFoundPatch = 0; this->VersionFoundPatch = 0;
this->VersionFoundTweak = 0; this->VersionFoundTweak = 0;
this->VersionFoundCount = 0; this->VersionFoundCount = 0;
}
//----------------------------------------------------------------------------
void cmFindPackageCommand::GenerateDocumentation()
{
this->cmFindCommon::GenerateDocumentation();
cmSystemTools::ReplaceString(this->GenericDocumentationRootPath,
"CMAKE_FIND_ROOT_PATH_MODE_XXX",
"CMAKE_FIND_ROOT_PATH_MODE_PACKAGE");
cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder,
"FIND_ARGS_XXX", "<package>");
cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder,
"FIND_XXX", "find_package");
this->CommandDocumentation = this->CommandDocumentation =
" find_package(<package> [version] [EXACT] [QUIET]\n" " find_package(<package> [version] [EXACT] [QUIET]\n"
" [[REQUIRED|COMPONENTS] [components...]]\n" " [[REQUIRED|COMPONENTS] [components...]]\n"
@ -318,6 +324,10 @@ cmFindPackageCommand::cmFindPackageCommand()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
const char* cmFindPackageCommand::GetFullDocumentation() const char* cmFindPackageCommand::GetFullDocumentation()
{ {
if(this->CommandDocumentation.empty())
{
this->GenerateDocumentation();
}
return this->CommandDocumentation.c_str(); return this->CommandDocumentation.c_str();
} }

View File

@ -65,6 +65,8 @@ public:
virtual const char* GetFullDocumentation(); virtual const char* GetFullDocumentation();
cmTypeMacro(cmFindPackageCommand, cmFindCommon); cmTypeMacro(cmFindPackageCommand, cmFindCommon);
protected:
virtual void GenerateDocumentation();
private: private:
void AppendSuccessInformation(); void AppendSuccessInformation();
void AppendToProperty(const char* propertyName); void AppendToProperty(const char* propertyName);

View File

@ -18,6 +18,11 @@ cmFindPathCommand::cmFindPathCommand()
{ {
this->EnvironmentPath = "INCLUDE"; this->EnvironmentPath = "INCLUDE";
this->IncludeFileInPath = false; this->IncludeFileInPath = false;
}
void cmFindPathCommand::GenerateDocumentation()
{
this->cmFindBase::GenerateDocumentation();
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
"FIND_XXX", "find_path"); "FIND_XXX", "find_path");
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
@ -43,13 +48,7 @@ cmFindPathCommand::cmFindPathCommand()
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
"CMAKE_FIND_ROOT_PATH_MODE_XXX", "CMAKE_FIND_ROOT_PATH_MODE_XXX",
"CMAKE_FIND_ROOT_PATH_MODE_INCLUDE"); "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE");
if(!this->IncludeFileInPath)
this->ExtraDocAdded = false;
}
const char* cmFindPathCommand::GetFullDocumentation()
{
if(!this->ExtraDocAdded && !this->IncludeFileInPath)
{ {
this->GenericDocumentation += this->GenericDocumentation +=
"\n" "\n"
@ -59,9 +58,7 @@ const char* cmFindPathCommand::GetFullDocumentation()
"If that is found the path will be set to the path to the framework. " "If that is found the path will be set to the path to the framework. "
"CMake will convert this to the correct -F option to include the " "CMake will convert this to the correct -F option to include the "
"file. "; "file. ";
this->ExtraDocAdded = true;
} }
return this->GenericDocumentation.c_str();
} }
// cmFindPathCommand // cmFindPathCommand

View File

@ -59,10 +59,10 @@ public:
return "Find the directory containing a file."; return "Find the directory containing a file.";
} }
virtual const char* GetFullDocumentation();
cmTypeMacro(cmFindPathCommand, cmFindBase); cmTypeMacro(cmFindPathCommand, cmFindBase);
bool IncludeFileInPath; bool IncludeFileInPath;
bool ExtraDocAdded; protected:
virtual void GenerateDocumentation();
private: private:
std::string FindHeaderInFramework(std::string const& file, std::string FindHeaderInFramework(std::string const& file,
std::string const& dir); std::string const& dir);

View File

@ -17,8 +17,9 @@
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
cmFindProgramCommand::cmFindProgramCommand() void cmFindProgramCommand::GenerateDocumentation()
{ {
this->cmFindBase::GenerateDocumentation();
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,
"FIND_XXX", "find_program"); "FIND_XXX", "find_program");
cmSystemTools::ReplaceString(this->GenericDocumentation, cmSystemTools::ReplaceString(this->GenericDocumentation,

View File

@ -25,7 +25,6 @@
class cmFindProgramCommand : public cmFindBase class cmFindProgramCommand : public cmFindBase
{ {
public: public:
cmFindProgramCommand();
/** /**
* This is a virtual constructor for the command. * This is a virtual constructor for the command.
*/ */
@ -63,6 +62,7 @@ public:
protected: protected:
std::string FindProgram(std::vector<std::string> names); std::string FindProgram(std::vector<std::string> names);
virtual void GenerateDocumentation();
private: private:
std::string FindAppBundle(std::vector<std::string> names); std::string FindAppBundle(std::vector<std::string> names);

View File

@ -699,9 +699,8 @@ bool cmGlobalGenerator::IsDependedOn(const char* project,
l != targets.end(); l++) l != targets.end(); l++)
{ {
cmTarget& target = l->second; cmTarget& target = l->second;
std::set<cmStdString>::const_iterator pos = TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(target);
target.GetUtilities().find(targetIn->GetName()); if(tgtdeps.count(targetIn))
if(pos != target.GetUtilities().end())
{ {
return true; return true;
} }
@ -815,22 +814,9 @@ void cmGlobalGenerator::Generate()
// For each existing cmLocalGenerator // For each existing cmLocalGenerator
unsigned int i; unsigned int i;
// Consolidate global targets // Put a copy of each global target in every directory.
cmTargets globalTargets; cmTargets globalTargets;
this->CreateDefaultGlobalTargets(&globalTargets); this->CreateDefaultGlobalTargets(&globalTargets);
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
cmTargets* targets =
&(this->LocalGenerators[i]->GetMakefile()->GetTargets());
cmTargets::iterator tarIt;
for ( tarIt = targets->begin(); tarIt != targets->end(); ++ tarIt )
{
if ( tarIt->second.GetType() == cmTarget::GLOBAL_TARGET )
{
globalTargets[tarIt->first] = tarIt->second;
}
}
}
for (i = 0; i < this->LocalGenerators.size(); ++i) for (i = 0; i < this->LocalGenerators.size(); ++i)
{ {
cmMakefile* mf = this->LocalGenerators[i]->GetMakefile(); cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
@ -1884,8 +1870,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
const char* name, const char* message, const char* name, const char* message,
const cmCustomCommandLines* commandLines, const cmCustomCommandLines* commandLines,
std::vector<std::string> depends, std::vector<std::string> depends,
const char* workingDirectory, const char* workingDirectory)
bool depends_on_all /* = false */)
{ {
// Package // Package
cmTarget target; cmTarget target;
@ -1900,10 +1885,6 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
workingDirectory); workingDirectory);
target.GetPostBuildCommands().push_back(cc); target.GetPostBuildCommands().push_back(cc);
target.SetProperty("EchoString", message); target.SetProperty("EchoString", message);
if ( depends_on_all )
{
target.AddUtility("all");
}
std::vector<std::string>::iterator dit; std::vector<std::string>::iterator dit;
for ( dit = depends.begin(); dit != depends.end(); ++ dit ) for ( dit = depends.begin(); dit != depends.end(); ++ dit )
{ {

View File

@ -16,6 +16,7 @@
#include "cmStandardIncludes.h" #include "cmStandardIncludes.h"
#include "cmTarget.h" // For cmTargets #include "cmTarget.h" // For cmTargets
#include "cmTargetDepend.h" // For cmTargetDependSet
class cmake; class cmake;
class cmMakefile; class cmMakefile;
@ -161,7 +162,6 @@ public:
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);
@ -234,7 +234,7 @@ public:
virtual const char* GetCleanTargetName() { return 0; } virtual const char* GetCleanTargetName() { return 0; }
// Class to track a set of dependencies. // Class to track a set of dependencies.
class TargetDependSet: public std::set<cmTarget*> {}; typedef cmTargetDependSet TargetDependSet;
// what targets does the specified target depend on directly // what targets does the specified target depend on directly
// via a target_link_libraries or add_dependencies // via a target_link_libraries or add_dependencies
@ -291,8 +291,7 @@ protected:
void CreateDefaultGlobalTargets(cmTargets* targets); void CreateDefaultGlobalTargets(cmTargets* targets);
cmTarget CreateGlobalTarget(const char* name, const char* message, cmTarget CreateGlobalTarget(const char* name, const char* message,
const cmCustomCommandLines* commandLines, const cmCustomCommandLines* commandLines,
std::vector<std::string> depends, const char* workingDir, std::vector<std::string> depends, const char* workingDir);
bool depends_on_all = false);
bool NeedSymbolicMark; bool NeedSymbolicMark;
bool UseLinkScript; bool UseLinkScript;

View File

@ -24,7 +24,7 @@ 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; this->NoRuleMessages = false;
#if defined(_WIN32) || defined(__VMS) #if defined(_WIN32) || defined(__VMS)
this->UseLinkScript = false; this->UseLinkScript = false;
@ -144,37 +144,46 @@ void cmGlobalUnixMakefileGenerator3::Generate()
// first do superclass method // first do superclass method
this->cmGlobalGenerator::Generate(); this->cmGlobalGenerator::Generate();
// initialize progress cmake* cm = this->GetCMakeInstance();
unsigned long total = 0; if(const char* ruleStatus = cm->GetProperty("RULE_MESSAGES"))
for(ProgressMapType::const_iterator pmi = this->ProgressMap.begin();
pmi != this->ProgressMap.end(); ++pmi)
{ {
total += pmi->second.NumberOfActions; this->NoRuleMessages = cmSystemTools::IsOff(ruleStatus);
} }
// write each target's progress.make this loop is done twice. Bascially the if(!this->NoRuleMessages)
// Generate pass counts all the actions, the first loop below determines
// how many actions have progress updates for each target and writes to
// corrrect variable values for everything except the all targets. The
// second loop actually writes out correct values for the all targets as
// well. This is because the all targets require more information that is
// computed in the first loop.
unsigned long current = 0;
for(ProgressMapType::iterator pmi = this->ProgressMap.begin();
pmi != this->ProgressMap.end(); ++pmi)
{ {
pmi->second.WriteProgressVariables(total, current); // initialize progress
} unsigned long total = 0;
for(unsigned int i = 0; i < this->LocalGenerators.size(); ++i) for(ProgressMapType::const_iterator pmi = this->ProgressMap.begin();
{ pmi != this->ProgressMap.end(); ++pmi)
cmLocalUnixMakefileGenerator3 *lg = {
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]); total += pmi->second.NumberOfActions;
std::string markFileName = lg->GetMakefile()->GetStartOutputDirectory(); }
markFileName += "/";
markFileName += cmake::GetCMakeFilesDirectory(); // write each target's progress.make this loop is done twice. Bascially the
markFileName += "/progress.marks"; // Generate pass counts all the actions, the first loop below determines
cmGeneratedFileStream markFile(markFileName.c_str()); // how many actions have progress updates for each target and writes to
markFile << this->CountProgressMarksInAll(lg) << "\n"; // corrrect variable values for everything except the all targets. The
// second loop actually writes out correct values for the all targets as
// well. This is because the all targets require more information that is
// computed in the first loop.
unsigned long current = 0;
for(ProgressMapType::iterator pmi = this->ProgressMap.begin();
pmi != this->ProgressMap.end(); ++pmi)
{
pmi->second.WriteProgressVariables(total, current);
}
for(unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
{
cmLocalUnixMakefileGenerator3 *lg =
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
std::string markFileName = lg->GetMakefile()->GetStartOutputDirectory();
markFileName += "/";
markFileName += cmake::GetCMakeFilesDirectory();
markFileName += "/progress.marks";
cmGeneratedFileStream markFile(markFileName.c_str());
markFile << this->CountProgressMarksInAll(lg) << "\n";
}
} }
// write the main makefile // write the main makefile
@ -738,30 +747,34 @@ cmGlobalUnixMakefileGenerator3
// Write the rule. // Write the rule.
localName += "/all"; localName += "/all";
depends.clear(); depends.clear();
std::string progressDir;
std::string progressDir = if(!this->NoRuleMessages)
lg->GetMakefile()->GetHomeOutputDirectory();
progressDir += cmake::GetCMakeFilesDirectory();
{ {
cmOStringStream progCmd; progressDir =
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; lg->GetMakefile()->GetHomeOutputDirectory();
// all target counts progressDir += cmake::GetCMakeFilesDirectory();
progCmd << lg->Convert(progressDir.c_str(),
cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
progCmd << " ";
std::vector<unsigned long>& progFiles =
this->ProgressMap[&t->second].Marks;
for (std::vector<unsigned long>::iterator i = progFiles.begin();
i != progFiles.end(); ++i)
{ {
progCmd << " " << *i; cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
// all target counts
progCmd << lg->Convert(progressDir.c_str(),
cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
progCmd << " ";
std::vector<unsigned long>& progFiles =
this->ProgressMap[&t->second].Marks;
for (std::vector<unsigned long>::iterator i = progFiles.begin();
i != progFiles.end(); ++i)
{
progCmd << " " << *i;
}
commands.push_back(progCmd.str());
} }
commands.push_back(progCmd.str()); progressDir = "Built target ";
progressDir += t->first;
lg->AppendEcho(commands,progressDir.c_str());
} }
progressDir = "Built target ";
progressDir += t->first;
lg->AppendEcho(commands,progressDir.c_str());
this->AppendGlobalTargetDepends(depends,t->second); this->AppendGlobalTargetDepends(depends,t->second);
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.", lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
@ -777,38 +790,42 @@ cmGlobalUnixMakefileGenerator3
"all", depends, commands, true); "all", depends, commands, true);
} }
// Write the rule. if(!this->NoRuleMessages)
commands.clear(); {
progressDir = lg->GetMakefile()->GetHomeOutputDirectory(); // Write the rule.
progressDir += cmake::GetCMakeFilesDirectory(); commands.clear();
progressDir = lg->GetMakefile()->GetHomeOutputDirectory();
progressDir += cmake::GetCMakeFilesDirectory();
{ {
// TODO: Convert the total progress count to a make variable. // TODO: Convert the total progress count to a make variable.
cmOStringStream progCmd; cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
// # in target // # in target
progCmd << lg->Convert(progressDir.c_str(), progCmd << lg->Convert(progressDir.c_str(),
cmLocalGenerator::FULL, cmLocalGenerator::FULL,
cmLocalGenerator::SHELL); cmLocalGenerator::SHELL);
// //
std::set<cmTarget *> emitted; std::set<cmTarget *> emitted;
progCmd << " " progCmd << " "
<< this->CountProgressMarksInTarget(&t->second, emitted); << this->CountProgressMarksInTarget(&t->second, emitted);
commands.push_back(progCmd.str()); commands.push_back(progCmd.str());
} }
}
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash(); std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
tmp += "Makefile2"; tmp += "Makefile2";
commands.push_back(lg->GetRecursiveMakeCall commands.push_back(lg->GetRecursiveMakeCall
(tmp.c_str(),localName.c_str())); (tmp.c_str(),localName.c_str()));
{ if(!this->NoRuleMessages)
cmOStringStream progCmd; {
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0 cmOStringStream progCmd;
progCmd << lg->Convert(progressDir.c_str(), progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
cmLocalGenerator::FULL, progCmd << lg->Convert(progressDir.c_str(),
cmLocalGenerator::SHELL); cmLocalGenerator::FULL,
progCmd << " 0"; cmLocalGenerator::SHELL);
commands.push_back(progCmd.str()); progCmd << " 0";
} commands.push_back(progCmd.str());
}
depends.clear(); depends.clear();
depends.push_back("cmake_check_build_system"); depends.push_back("cmake_check_build_system");
localName = lg->GetRelativeTargetDirectory(t->second); localName = lg->GetRelativeTargetDirectory(t->second);

View File

@ -112,16 +112,6 @@ public:
/** 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,7 +159,7 @@ 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; bool NoRuleMessages;
// Store per-target progress counters. // Store per-target progress counters.
struct TargetProgress struct TargetProgress

View File

@ -19,6 +19,10 @@
cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator() cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator()
{ {
this->FindMakeProgramFile = "CMakeVS10FindMake.cmake"; this->FindMakeProgramFile = "CMakeVS10FindMake.cmake";
std::string vc10Express;
this->ExpressEdition = cmSystemTools::ReadRegistryValue(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0\\Setup\\VC;"
"ProductDir", vc10Express, cmSystemTools::KeyWOW64_32);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -62,6 +66,16 @@ void cmGlobalVisualStudio10Generator
cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional);
} }
//----------------------------------------------------------------------------
const char* cmGlobalVisualStudio10Generator::GetPlatformToolset()
{
if(!this->PlatformToolset.empty())
{
return this->PlatformToolset.c_str();
}
return 0;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
std::string cmGlobalVisualStudio10Generator::GetUserMacrosDirectory() std::string cmGlobalVisualStudio10Generator::GetUserMacrosDirectory()
{ {

View File

@ -54,6 +54,12 @@ public:
cmMakefile *, bool optional); cmMakefile *, bool optional);
virtual void WriteSLNHeader(std::ostream& fout); virtual void WriteSLNHeader(std::ostream& fout);
/** Is the installed VS an Express edition? */
bool IsExpressEdition() const { return this->ExpressEdition; }
/** The toolset name for the target platform. */
const char* GetPlatformToolset();
/** /**
* Where does this version of Visual Studio look for macros for the * Where does this version of Visual Studio look for macros for the
* current user? Returns the empty string if this version of Visual * current user? Returns the empty string if this version of Visual
@ -70,5 +76,9 @@ public:
{ return "$(Configuration)";} { return "$(Configuration)";}
protected: protected:
virtual const char* GetIDEVersion() { return "10.0"; } virtual const char* GetIDEVersion() { return "10.0"; }
std::string PlatformToolset;
private:
bool ExpressEdition;
}; };
#endif #endif

View File

@ -36,3 +36,52 @@ void cmGlobalVisualStudio10Win64Generator
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64"); mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64"); mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
} }
//----------------------------------------------------------------------------
bool cmGlobalVisualStudio10Win64Generator::Find64BitTools(cmMakefile* mf)
{
if(!this->PlatformToolset.empty())
{
return true;
}
// This edition does not come with 64-bit tools. Look for them.
//
// TODO: Detect available tools? x64\v100 exists but does not work?
// KHLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\4.0;VCTargetsPath
// c:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/Platforms/
// {Itanium,Win32,x64}/PlatformToolsets/{v100,v90,Windows7.1SDK}
std::string winSDK_7_1;
if(cmSystemTools::ReadRegistryValue(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\"
"Windows\\v7.1;InstallationFolder", winSDK_7_1))
{
cmOStringStream m;
m << "Found Windows SDK v7.1: " << winSDK_7_1;
mf->DisplayStatus(m.str().c_str(), -1);
this->PlatformToolset = "Windows7.1SDK";
return true;
}
else
{
cmOStringStream e;
e << "Cannot enable 64-bit tools with Visual Studio 2010 Express.\n"
<< "Install the Microsoft Windows SDK v7.1 to get 64-bit tools:\n"
<< " http://msdn.microsoft.com/en-us/windows/bb980924.aspx";
mf->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
cmSystemTools::SetFatalErrorOccured();
return false;
}
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10Win64Generator
::EnableLanguage(std::vector<std::string> const& languages,
cmMakefile* mf, bool optional)
{
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
{
return;
}
this->cmGlobalVisualStudio10Generator
::EnableLanguage(languages, mf, optional);
}

View File

@ -34,5 +34,8 @@ public:
virtual void AddPlatformDefinitions(cmMakefile* mf); virtual void AddPlatformDefinitions(cmMakefile* mf);
bool Find64BitTools(cmMakefile* mf);
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);
}; };
#endif #endif

View File

@ -197,8 +197,6 @@ void cmGlobalVisualStudio6Generator
this->GetTargetSets(projectTargets, originalTargets, root, generators); this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets); OrderedTargetDependSet orderedProjectTargets(projectTargets);
std::string rootdir = root->GetMakefile()->GetStartOutputDirectory();
rootdir += "/";
for(OrderedTargetDependSet::const_iterator for(OrderedTargetDependSet::const_iterator
tt = orderedProjectTargets.begin(); tt = orderedProjectTargets.begin();
tt != orderedProjectTargets.end(); ++tt) tt != orderedProjectTargets.end(); ++tt)

View File

@ -110,7 +110,7 @@ void cmGlobalVisualStudio71Generator
this->GetTargetSets(projectTargets, originalTargets, root, generators); this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets); OrderedTargetDependSet orderedProjectTargets(projectTargets);
this->WriteTargetsToSolution(fout, root, orderedProjectTargets); this->WriteTargetsToSolution(fout, orderedProjectTargets);
bool useFolderProperty = this->UseFolderProperty(); bool useFolderProperty = this->UseFolderProperty();
if (useFolderProperty) if (useFolderProperty)

Some files were not shown because too many files have changed in this diff Show More