Imported Upstream version 2.8.12

ci/unstable
Modestas Vainius 11 years ago
parent ec3a31f420
commit 355c9d4a87

@ -113,6 +113,8 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
include(Utilities/Release/Cygwin/CMakeLists.txt) include(Utilities/Release/Cygwin/CMakeLists.txt)
endif() endif()
set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991")
# Set the options file that needs to be included inside CMakeCPackOptions.cmake # Set the options file that needs to be included inside CMakeCPackOptions.cmake
set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake) set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in" configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"

@ -34,7 +34,7 @@ if(CPACK_GENERATOR MATCHES "NSIS")
set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_MODIFY_PATH ON)
endif() endif()
# include the cpack options for qt dialog if they exisit # include the cpack options for qt dialog if they exist
# they might not if qt was not enabled for the build # they might not if qt was not enabled for the build
include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL) include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL)

@ -231,7 +231,7 @@ macro (CMAKE_BUILD_UTILITIES)
set(KWSYS_USE_Process 1) set(KWSYS_USE_Process 1)
set(KWSYS_USE_CommandLineArguments 1) set(KWSYS_USE_CommandLineArguments 1)
set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source) set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
set(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}") set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}")
add_subdirectory(Source/kwsys) add_subdirectory(Source/kwsys)
set(kwsys_folder "Utilities/KWSys") set(kwsys_folder "Utilities/KWSys")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}")
@ -460,26 +460,27 @@ set(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
# install tree. # install tree.
set(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.") set(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
set(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING set(CMAKE_DATA_DIR "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
"Install location for data (relative to prefix).") "Install location for data (relative to prefix).")
set(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING set(CMAKE_DOC_DIR "doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
"Install location for documentation (relative to prefix).") "Install location for documentation (relative to prefix).")
set(CMAKE_MAN_DIR "/man" CACHE STRING set(CMAKE_MAN_DIR "man" CACHE STRING
"Install location for man pages (relative to prefix).") "Install location for man pages (relative to prefix).")
mark_as_advanced(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR) mark_as_advanced(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR)
if(CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") if(CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# Force doc, data and man dirs to conform to cygwin layout. # Force doc, data and man dirs to conform to cygwin layout.
set(CMAKE_DOC_DIR "/share/doc/cmake-${CMake_VERSION}") set(CMAKE_DOC_DIR "share/doc/cmake-${CMake_VERSION}")
set(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}") set(CMAKE_DATA_DIR "share/cmake-${CMake_VERSION}")
set(CMAKE_MAN_DIR "/share/man") set(CMAKE_MAN_DIR "share/man")
# let the user know we just forced these values # let the user know we just forced these values
message(STATUS "Setup for Cygwin packaging") message(STATUS "Setup for Cygwin packaging")
message(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}") message(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}")
message(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}") message(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}")
message(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}") message(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}")
endif() endif()
string(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}") string(REGEX REPLACE "^/" "" CMAKE_DATA_DIR "${CMAKE_DATA_DIR}")
string(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}") string(REGEX REPLACE "^/" "" CMAKE_DOC_DIR "${CMAKE_DOC_DIR}")
string(REGEX REPLACE "^/" "" CMAKE_MAN_DIR "${CMAKE_MAN_DIR}")
if(BUILD_TESTING) if(BUILD_TESTING)
include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake) include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
@ -625,12 +626,12 @@ add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
--system-information -G "${CMAKE_TEST_GENERATOR}" ) --system-information -G "${CMAKE_TEST_GENERATOR}" )
# Install license file as it requires. # Install license file as it requires.
install(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST}) install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR})
# Install script directories. # Install script directories.
install( install(
DIRECTORY Modules Templates DIRECTORY Modules Templates
DESTINATION "${CMake_DATA_DEST}" DESTINATION ${CMAKE_DATA_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE GROUP_READ GROUP_EXECUTE

@ -1,3 +1,578 @@
Changes in CMake 2.8.12 (since 2.8.12-rc4)
------------------------------------------
Brad King (4):
Xcode: Fix test architecture selection for Xcode >= 5
Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failure
Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5
Xcode: Fix OBJECT library support for Xcode 5 (#14254)
Stephen Kelly (1):
Genex: Fix processing multiple include directories for relative paths
Changes in CMake 2.8.12-rc4 (since 2.8.12-rc3)
----------------------------------------------
Brad King (8):
VS: Future-proof Intel project format selection
MSVC: Drop /link from executable link lines with Ninja
FindCUDA: Always list custom command outputs in their targets
FindPNG: Honor old PNG_LIBRARY if provided (#14398)
FindHDF5: Fix regression in per-configuration library selection
bash-completion: Future-proof --help-*-list "cXXXX version" filtering
OS X: Search system SDKs for frameworks
Use first custom command for the same output (#14446)
Patrick Gansterer (3):
MSVC: Fix version test for linking corelibc on Windows CE (#14420)
MSVC: Fix WinCE arch family preprocessor symbol (#14436)
VS: Use version-specific subsystem for WinCE compiler id (#14440)
Rolf Eike Beer (1):
bootstrap: try better workaround for builds on Linux/HPPA
Stephen Kelly (3):
Add differing target property content to policy CMP0022 warning
Fix CMP0022 warning when no old-style property is set
genex: Fix preprocessing with incomplete content (#14410).
Changes in CMake 2.8.12-rc3 (since 2.8.12-rc2)
----------------------------------------------
Robert Maynard (1):
cmMakefile: Do not track CMake temporary files.
Changes in CMake 2.8.12-rc2 (since 2.8.12-rc1)
----------------------------------------------
Brad King (2):
Fix RunCMake.Configure test expectation newline matching
Clean up install rules of CMake itself (#14371)
Clinton Stimpson (1):
OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.
Eric Bélanger (1):
FindImageMagick: Find libraries named with HDRI support (#14348)
Raphael Kubo da Costa (1):
FindTCL: Add BSD paths for Tcl/Tk 8.6
Robert Maynard (2):
VS: Generate ToolsVersion matching each VS version
cmMakefile: Do not track configured files known to be temporary
Rolf Eike Beer (1):
CheckC*CompilerFlag: add documentation what to expect from a positive result
Stephen Kelly (6):
Fix OLD behavior of CMP0021.
try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIES
try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES
Genex: Fix evaluation of MAP_IMPORTED_CONFIG_<CONFIG>
Fix some whitespace errors in docs.
Normalize system directories from the interface target property
Yury G. Kudryashov (1):
CPack: Fix a typo in documentation
Zack Galbreath (1):
CTest: Fix GTM coverage parsing line offset bug
Changes in CMake 2.8.12-rc1 (since 2.8.11.2)
--------------------------------------------
Adam J. Weigold (1):
CPackWIX: Add support for custom WiX templates
Alex Neundorf (12):
CMakeSystem: include toolchain file after setting CMAKE_HOST_ (#13796)
Add support files for C, C++ and ASM for the IAR toolchain.
Add regexps for the IAR toolchain to the vendor list.
Add IAR to the CMakeDetectC(XX)CompilerID.c(pp).in
cmake-gui: use shortcut F only for "Find in Output"
Eclipse: fix #14204 and #14205: no file links to directories
automoc: add a global AUTOMOC_TARGETS_FOLDER property
install: do not strip dll import libraries (#14123)
ExportTargets: add one more comment to the generated file.
Add documentation for the --graphviz support
graphvizoptions: add copyright notice
add macros cmake_print_properties() and cmake_print_variables()
Alexander Mohr (1):
VS: Detect MSVC compiler id on ARM toolchain
Andreas Mohr (10):
Fix spelling and typos (affecting users)
Fix spelling and typos (affecting binary data / module messages)
Fix spelling and typos (non-binary)
Fix spelling and typos (product names)
FindwxWidgets: add DOC strings with usual style
Explain distribution of Win9x binary on all Windows versions.
VS10: add detailed comment about MIDL processing
Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES)
Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames
Docs: Clarify wording "flag used" => "flag (to|will) be used"
Ben Boeckel (12):
set_property: Do not remove a property when APPENDing nothing
Tests/RunCMake: Document stripping of expected output
export: Error when exporting a target without a language
variable_watch: Store client data as pointers
variable_watch: Add a deleter for the client data
variable_watch: Match client_data when finding duplicates
variable_watch: Allow specifying the data to match in RemoveWatch
variable_watch: Prevent making extra entries in the watch map
variable_watch: Fix a typo in the error message
variable_watch: Don't share memory for callbacks
variable_watch: Check newValue for NULL
variable_watch: Add test for watching a variable multiple times
Bill Hoffman (1):
Do not set CMAKE_MATCH_ variables when not neeeded
Bjoern Thiel (1):
SelectLibraryConfigurations: Fix for cached <base>_LIBRARY
Brad King (91):
VS: Separate compiler and linker PDB files (#11899, #14062)
MSVC: Invoke 'link' directly for executables
Ninja: Fix OBJECT_DIR placeholder path conversion
VS 10: Escape ; as %3B in preprocessor definitions (#14073)
CTest: Simplify ctest_* command source/build dir lookup
get_filename_component: Add explicit unit tests
get_filename_component: Add DIRECTORY option (#14091)
Xcode: Use explicitFileType to mark source types (#14093)
Check{C,CXX}CompilerFlag: Test using C locale (#14102)
Windows: Search '/' prefix only when cross compiling (#10994)
Recognize ld with toolchain prefix (#13960)
VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
Begin post-2.8.11 development
Sanitize linker name to parse implicit link line (#14154)
VS: Allow /Fa to set AssemblerListingLocation (#14153)
Tests/IncludeDirectories: Avoid shared library with no symbols
if: Add test for IS_DIRECTORY
try_compile: Add test for bad call error cases
try_compile: Refactor argument processing
variable_watch: Add test for MODIFIED_ACCESS report
bootstrap: Compile KWSys SystemTools with UTIME(S|NSAT) values
variable_watch: Remove leftover debugging code (#14187)
variable_watch: Print accesses as "CMake Debug Log" messages
Docs: Clarify CMAKE_PARENT_LIST_FILE (#14194)
get_filename_component: Test ABSOLUTE of .. after root component
try_compile: Add signature to allow multiple SOURCES
enable_language: Clarify documentation
Split cmBootstrapCommands.cxx into two sources
Document CMAKE_INSTALL_PREFIX in CMAKE_SYSTEM_PREFIX_PATH
cmake: Document "-E tar" support for .zip (#14225)
FindBoost: Clarify failure on missing 'static' libs (#14235)
CMakeDetermineVSServicePack: Improve documentation
CMakeDetermineVSServicePack: Add VS 11 update 1 and 2 (#14239)
Document ENV syntax as a "variable" (#14245)
Embarcadero: Use response files only for includes, objects, and libs
Escape target flags taken from COMPILE_OPTIONS
Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handling
CMakeDetermineVSServicePack: Add VS 11 update 3
Document removal of 'register' from flex/bison output
VS12: Find proper MSBuild for VSProjectInSubdir test
Fortran: Use explicit type in Fortran 90 check
project: Document top-level CMakeLists.txt requirement
ExternalProject: Document multiple COMMAND lines
include: Clarify variable access scope for included file
VS: Fix /MAP:mapfile flag mapping (#14282)
cmake: On configure error suggest looking at CMake*.log files
try_compile: Escape CMAKE_<lang>_FLAGS in test projects (#14268)
try_compile: Add COPY_FILE_ERROR option to capture failure
FindPNG: Add versioned library names for 1.6 (#14289)
cmake: Fix resource leak reported by cppcheck
VS,Xcode: Drop incorrect legacy dependency trace (#14291)
OS X: Add copyright notices to Darwin-*-Fortran.cmake
VS: Avoid leaking child process output back to IDE (#14266)
Fix ExportImport test cmp0022NEW build on Watcom
add_test: Document test name restrictions (#14298)
UseJava: Update notice of copyright by Kitware
add_custom_command: Manage backtrace memory correctly (#14299)
Teach compiler ABI check to tolerate try_compile COPY_FILE failure
Test COMPILE_DEFINITIONS target property get/set/get round-trip
Check*CompilerFlag: Document use of CMAKE_REQUIRED_DEFINITIONS (#14309)
sha2: Avoid type-punned pointer dereference (#14314)
VS 6: Tell BuildDepends test to tolerate ninjadep failure
cmMakefile: Do not track configured files known to be temporary
libarchive: Update README-CMake.txt for new snapshot
libarchive: Include cm_zlib.h to get zlib used by CMake
libarchive: Silence API deprecation warnings
libarchive: Avoid struct init with variable
libarchive: Remove build options not used by CMake
libarchive: Backport to CMake 2.8.2
VS10: Honor user-specified /SUBSYSTEM: flag (#14326)
VS10: Escape include paths in XML project files (#14331)
OS X: Search for SDK based on deployment target (#14324)
bootstrap: Do not suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot (#14324)
OS X: Enable command-line build without tools in PATH
VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput
cmake-gui: Fix build rules for Qt5 on Windows
Include cmMakefile.h before cm*Lexer.h to get stdint.h first
Skip CTestLimitDashJ test on Borland
Add RunCMake.Syntax test to cover argument parsing
cmListFileLexer: Fix line number after backslash in string
cmListFileLexer: Split normal and legacy unquoted arguments
cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum
Add RunCMake.Syntax test cases for command invocation styles
cmListFileCache: Convert CMake language parser to class
Warn about arguments not separated by whitespace
Warn about unquoted arguments that look like long brackets
cmListFileLexer: Modify flex output to avoid Borland warning
Cygwin: Avoid legacy warnings in RunCMake.* tests
Update version introducing CMP0021, CMP0022, and CMP0023
OS X: Do not default to non-existent deployment target SDK
Do not warn about left paren not separated by a space
Christian Maaser (1):
VS: Add support for .NET target framework version
Clinton Stimpson (12):
Improve documentation for CPACK_PACKAGE_INSTALL_REGISTRY_KEY.
Refactor how bundles and frameworks are supported.
Xcode: Add support for shared library versioning
OS X: Fix getting of CFBundle LOCATION property.
OS X: Add RPATH support for Mac.
Xcode: Add rpath support in Xcode generator.
OS X: Add support for @rpath in export files.
OS X: Add test for rpaths on Mac.
OS X: Improvements for getting install name of dylib.
OS X: Enable rpath support on Mac OS X when find_library() is used.
OS X: Fix regression handling frameworks for Ninja
OS X: If necessary, use xcrun to help find otool used to query install names.
Cédric OCHS (1):
Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
Daniele E. Domenichelli (15):
FindGTK2: Move check for pangocairo in gtk module
FindGTK2: Detect gthread library
FindFreetype: Detect Freetype installed by GtkMM installer for win
FindGTK2: Do not fail on MSVC11 if vc100 libraries are available
FindGTK2: Add GTK2_DEFINITIONS variable
SelectLibraryConfigurations: Do not cache the _LIBRARY variable
SelectLibraryConfigurations: Use -NOTFOUND instead of copying the vars
FindGTK2: Use GTK_XXX_LIBRARY_DEBUG libraries in debug mode
FindGTK2: Append _LIBRARY to var name in _GTK2_FIND_LIBRARY
FindGTK2: Append _INCLUDE_DIR to var name in _GTK2_FIND_INCLUDE_DIR
FindGTK2: Update local changelog
FindGTK2: Remove GTK2_SKIP_MARK_AS_ADVANCED option
FindGTK2: gthread-2.0 folder does not exist
FindGTK2: Detect gmodule library
FindGTK2: Detect pangoft2 and pangoxft libraries
David Coppa (1):
OpenBSD: Enable ELF parsing and editing (#14241)
David Golub (1):
CPack/NSIS: Obtain path from which to uninstall from registry (#14124)
Eric NOULARD (5):
Add support for componentized USER spec file
CPackRPM add mechanism to remove path from generated list of file in RPM spec.
CPackRPM add /usr/lib64 to the list of builtin to-be-excluded path
CPackRPM protect '@' character in filename processed in the spec file.
CPackRPM make the changelog line conform to expected format
Fredrik Axelsson (1):
CPackWIX: Handle CPACK_PACKAGE_EXECUTABLES (#13967)
Funda Wang (1):
FindImageMagick: Find v6 include dir (#14174)
Graham Markall (2):
OS X: Add Fortran library version flags (#14249)
UseJava: Pass sources to javac using response file (#13028)
Gregoire Lejeune (1):
Allow using Java in a cross-compilation toolchain
Ian Monroe (2):
Ninja: use cd /D to set directory on Windows
CPackWIX: Fix MSI package layout regression from parent
Igor Murzov (2):
bash-completion: Add -S,-SP options arguments completion
bash-completion: Fix/improve generator names extraction
Jack O'Connor (1):
Eclipse: Add a missing space in the documentation
Jason Spiro (1):
MinGW: Find mingw32-make included with Code::Blocks IDE (#14302)
John Farrier (2):
VS: Add Windows Forms Support
VS: Add VS_GLOBAL_ROOTNAMESPACE target property
Jonas Andersen (1):
VS: Add Resx configuration to the vcxproj file
LibArchive Upstream (1):
libarchive 3.1.2 (reduced)
Marc Bartholomaeus (4):
cmake-gui: Add search functions for Output window (#9733)
cmake-gui: Add search functions to the context menu of the Output widget
cmake-gui: Change shortcut of the search field from Ctrl-F to Alt-E
cmake-gui: Add function for going to next error message in Output window
Marcel Loose (1):
FindCUDA: Remove duplicate entries from INCLUDE_DIRECTORIES.
Marius Schamschula (1):
FindX11: Search in /opt/X11 for OS X 10.8 (#14232)
Mathias Gaunard (1):
FindCUDA: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir.
Matt McCormick (1):
ExternalProject: Allow blank SVN_USERNAME/SVN_PASSWORD (#14128)
Matthew Bentham (1):
Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)
Matthew Woehlke (3):
UseJava.cmake: fully use cmake_parse_arguments in add_jar
FindProtobuf: also find pthread
UseJava.cmake: document add_jar compat shim
Nicolas Despres (1):
Optimize custom command full-path dependency lookup
Nils Gladitz (1):
Add cmake_host_system_information command
Patrick Gansterer (20):
Add option to use stdout/stderr of original terminal in cmake --build
Unify the way the flags of a static library are read
Add support for CMAKE_STATIC_LINKER_FLAGS
Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables
Add additonal tests for the linker flags
VS6: Add handling of CMAKE_*_LINKER_FLAGS_<CONFIG> variables
VS6: Hardcode id_machine_6 for compiler detection
VS10: Do not set the TargetMachine when detecting the compiler
VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too
VS: Replace ArchitectureId with PlatformName
VS12: Remove duplicated overload of UseFolderProperty()
Fix detection of WinCE SDKs with 64bit verion of CMake
VS: Unify how the name of the generator is specified
VS10: Add support for assembler code (#11536)
WIN: Use COFF file header header for architecture detection (#14083)
Improve const-correctness in cmVisualStudioGeneratorOptions
Fix setting of the entry point symbol for Windows CE (#14088)
Add support for new Windows CE compiler
VS11: Add support for Windows CE SDKs
Paul Kunysch (1):
CTest: Add test for running many tests in parallel
Pavel Shramov (1):
cmDependsC: Collapse relative include paths
Petr Kmoch (5):
Add projectDir parameter to GenerateBuildCommand
VS: Create parser for Visual Studio .sln files
VS: Use .sln parser to build targets in subdirs with msbuild (#13623)
VS: Add test for building MSBuild project in subdir
ctest_build: Pass projectDir to GenerateBuildCommand
Reid Kleckner (1):
Ninja: Make cmcldeps depfile output more consistent with 'ninja -t msvc'
Richard Ulrich (3):
CPackWIX: Handle multiple shortcuts in the start menu
CPackWIX: Add option to specify the language(s) of the installer
CMakeCPack: Provide an upgrade guid for WiX
Robert Maynard (9):
cmMakefile: Refactor AddCMakeDependFile and AddCMakeOutputFile.
Ninja: Track configured files so we can regenerate them.
cmMakefile: Track configured files so we can regenerate them (#13582)
Add a test to expose a bug with add_custom_command and ninja.
Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static
Ninja: Custom Command file depends don't need to exist before building
FindCUDA: Search for libraries in <prefix>/lib/<arch>/nvidida-current.
Ninja: Properly convert all paths to unix style before we do set intersection.
Ninja: Update BuildDepends test to verify cmcldeps depfiles.
Robin Lee (1):
FindOpenSSL: Fix spelling of CMAKE_CROSSCOMPILING (#14075)
Rolf Eike Beer (25):
FindOpenGL: simplify OS selection code
FindOpenGL: require headers to be found on non-Windows platforms (#13746)
Tests: create output files for all memory checkers
CTest: use an output file for Valgrind (#14110)
CTest: remove unreachable code and CTestTestMemcheckUnknown test
Tests: remove code duplication in CTestTestMemCheck tests
Tests: verify that memory checker output files are always present
CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
Tests: add test for non-existent Valgrind suppression file
CTest: fix comment documenting cmBoundsCheckerParser class
Tests: add a test with custom options passed to valgrind
CTest: make sure never to report negative test times (#14132)
Doc: fix example for FAIL_REGULAR_EXPRESSION
CTest: break after first regex match on output
Tests: ignore Guard Malloc messages in MemChecker tests
CTest: avoid useless changing of directory
Tests: fix build of dummy memtester on AIX
wizard: fix warnings
wizard: simplify control flow
cmTarget: drop the unused local typedef LinkLine
Tests: ignore GuardMalloc messages on all Apple build, not just XCode ones
replace string(... MATCHES "^const$) with string(... STREQUAL "const")
Revert "CTest: fix pre and post test commands with spaces" (#13887)
FindPNG: improve library detection (#14301)
CTest: create one output file per memcheck (#14303)
Sean McBride (1):
Remove some uses of obsolete 'register' storage specifier
Sebastian Leske (1):
Document CMAKE_<LANG>_FLAGS variable (#14305)
Stephen Kelly (126):
Make the QtAutomoc test compile with either Qt 4 or Qt 5
Add a test for Qt5Automoc
Remove an endif() followed by an if() for the same condition.
Fix some copyastos in the DetermineRCCompiler file.
Test transitive includes from setting the LINK_LIBRARIES property.
Test the use of target transitive compile definitions with moc.
Fix handling of commas in arbitrary content in genexes.
Fix style.
Remove unused marker for a variable which is now used.
Extract the ProcessArbitraryContent method.
Rename the method determining if a genex accepts arbitrary content.
Make it possible for any genex to have arbitrary content at the end.
Add the JOIN generator expression.
Test that linking using the debug keyword to tll works.
automoc: Read target defines unconditionally
Remove unused typedef.
Fix brace indentation.
Add EXPORT_NAME property.
Remove unused vector population.
Sublime: Honor source-level COMPILE_FLAGS property
Docs: cmake -G selects a "build system" generator
Recognize shared library files with a numerical suffix
FindQt4: Fix QUIET failure with Qt 5 but not Qt 4
Error on relative path in INCLUDE_DIRECTORIES target property.
include_directories: Fix handling of empty or space-only entries
CTest: Read CTEST_PARALLEL_LEVEL from environment
string: Add MAKE_C_IDENTIFIER subcommand
GenerateExportHeader: Add newlines to separate the compiler output.
GenerateExportHeader: Allow use of of this macro with MODULEs.
file: Add GENERATE command to produce files at generate time
Tests/Module/GenerateExportHeader: Test exported free-function
Add $<LINK_LANGUAGE> generator expression
GenerateExportHeader: Generate only C identifiers as defines
Tests/CompileDefinitions: Avoid spaces in defines on VS 6
Use the qt5::moc imported target instead of a variable.
QtAutomoc: Get the Qt version through the target link interface
Fix indentation.
VS6: Rename some variables to correspond to config values.
Add cmLocalGenerator::GetCompileOptions.
Add <LANG>_COMPILER_ID generator expressions.
cmTarget: Rename struct to be more re-usable.
cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries
Add COMPILE_OPTIONS target property.
Add target_compile_options command.
Introduce target property <LANG>_VISIBILITY_PRESET
Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
Qt4Macros: Allow specifying a TARGET in invokations of macros.
Introduce add_compile_options command.
Remove unused cmAddDefinitionsCommand::ParseDefinition method.
Add some spaces to the INCLUDE_DIRECTORIES documentation.
CLI: Suppress the unused warning if the key value pair is cached.
Use --sysroot when cross compiling.
Add missing 'seen' check for evaluating COMPILE_OPTIONS.
Find targets in INTERFACE_COMPILE_OPTIONS when exporting for try_compile.
Use a preprocessor loop to manage the valid transitive properties.
Generate INTERFACE_COMPILE_OPTIONS on export.
Genex: Fix indentation in docs.
cmSystemTools: Fix typo in comment.
Style: Don't put an else after a return.
Add compiler target compile options.
QtAutomoc: Fix handling of list separator for compile definitions.
QtAutomoc: Use config-dependent compile definitions and includes.
De-duplicate version comparison code.
Add generator expressions for version comparision.
Don't run the WarnUnusedCliUnused test on Windows.
Add whitespace after colons in error messages.
Add missing return after error report.
Genex: Make LINK_LANGUAGE report an error when evaluating link libraries.
Genex: Extend EvaluatingLinkLibraries to also check the top target name.
Genex: Report error if a target file is needed to evaluate link libraries.
Add generator expressions for compiler versions.
Split the GeneratorExpression test into a third part.
Remove unused variable.
Add Target API to determine if an include is a system include.
Store system include directories in the cmTarget.
Extend the cmTargetPropCommandBase interface property handling.
Add a SYSTEM parameter to target_include_directories (#14180)
Add entire link interface transitive closure as target depends.
Test non-IMPORTED libraries in the INTERFACE of IMPORTED libraries.
GenexEval: Add abstracted access to link interface for a target.
Introduce the LINK_ONLY generator expression.
Introduce the INTERFACE_LINK_LIBRARIES property.
Export: Generate INTERFACE_LINK_LIBRARIES property on targets.
TLL: Don't populate old link interface if CMP0022 is NEW.
Overload cmLocalGenerator::AppendDefines to add a list.
Add an overload of cmIDEOptions::AddDefines taking a vector of strings.
Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.
Document some variables for deprecation control.
Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICY
Revert "Use --sysroot when cross compiling."
Add target property debugging for COMPILE_DEFINITIONS
Mark qt4_use_modules and qt4_automoc as obsolete.
Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.
Don't add trailing whitespace to error message.
Remove TODO to uniq COMPILE_OPTIONS
Remove the LINK_LANGUAGE generator expression.
Genex: Fix $<CONFIG> with IMPORTED targets and multiple locations.
FindQt4: Don't use Qt component _FOUND vars before they're defined (#14286)
Add a convenient way to add the includes install dir to the INTERFACE.
Use linked frameworks as a source of include directories.
target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature
FindQt4: Re-add QAxServer to the QT_MODULES.
FindQt4: Populate the INTERFACE_LINK_LIBRARIES of IMPORTED targets.
Genex: Allow relative paths in INSTALL_INTERFACE.
cmTarget: Fix property name typo in docs.
Docs: Document file(GENERATE) CONDITION as optional.
Qt4Macros: Remove unneeded generate CONDITION.
Qt4Macros: Remove undefined varible use.
Qt4Macros: Simplify some variable population.
Docs: Document existing target property debugging options.
Docs: Trim trailing whitespace in generated doc.
Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs.
Docs: Document variables for default visibility values.
Export: Fix typo of LINK_INTERFACE_LIBRARIES.
cmTarget: Remove duplicates when printing traces of tll signatures
cmTarget: Fix iface libraries and languages for static libraries.
Genex: Disallow LINKER_LANGUAGE only when used on a static library.
install: Remove error condition using INCLUDES DESTINATION without EXPORT.
Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES.
Allow target commands to be invoked with no items (#14325).
Docs: Fix typo in CMAKE_DEBUG_TARGET_PROPERTIES
cmTarget: Add NAME property
Export: Process generator expressions from INCLUDES DESTINATION.
Add the ALIAS target concept for libraries and executables.
Revert "Add compiler target compile options."
Genex: Fix segfault when parsing ends with parameter expectation.
Vadim Zhukov (1):
Add cmake_reset_check_state() macro
Victor Zverovich (1):
Use GmakeErrorParser instead of deprecated MakeErrorParser (fixes bug 0013699)
Yichao Yu (1):
variable_watch: Add missing string enumeration entry (#14188)
Ömer Fadıl USTA (3):
ccmake: Add missing initializers reported by cppcheck
libarchive: Fix free() order to avoid accessing freed memory
cmcurl: Fix resource leak reported by cppcheck
Changes in CMake 2.8.11.2 (since 2.8.11.1) Changes in CMake 2.8.11.2 (since 2.8.11.1)
------------------------------------------ ------------------------------------------
Alex Neundorf (1): Alex Neundorf (1):

@ -1,4 +1,3 @@
string(REGEX REPLACE "^/(.*)" "\\1" REL_CMAKE_DATA_DIR "${CMAKE_DATA_DIR}") install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${CMAKE_DATA_DIR}/editors/vim)
install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${REL_CMAKE_DATA_DIR}/editors/vim) install(FILES cmake-mode.el DESTINATION ${CMAKE_DATA_DIR}/editors/emacs)
install(FILES cmake-mode.el DESTINATION ${REL_CMAKE_DATA_DIR}/editors/emacs)
add_subdirectory (bash-completion) add_subdirectory (bash-completion)

@ -5,4 +5,4 @@
# add symlinks to the files in appropriate places # add symlinks to the files in appropriate places
# /etc/bash_completion.d/ # /etc/bash_completion.d/
# DATADIR/completions (may be /usr/share/<package>/completions # DATADIR/completions (may be /usr/share/<package>/completions
install(FILES cmake cpack ctest DESTINATION ${REL_CMAKE_DATA_DIR}/completions) install(FILES cmake cpack ctest DESTINATION ${CMAKE_DATA_DIR}/completions)

@ -100,21 +100,23 @@ _cmake()
return return
;; ;;
-G) -G)
# FIXME: doesn't work properly
local IFS=$'\n' local IFS=$'\n'
local quoted
printf -v quoted %q "$cur"
COMPREPLY=( $( compgen -W '$( cmake --help 2>/dev/null | sed -n \ COMPREPLY=( $( compgen -W '$( cmake --help 2>/dev/null | sed -n \
"/^.*[^ ].*= Generates/{s|^ *\(.*[^ ]\) *= Generates.*$|\1|;s| |\\\\ |g;p}" \ -e "1,/^Generators/d" \
2>/dev/null )' -- "$cur" ) ) -e "/^ *[^ =]/{s|^ *\([^=]*[^ =]\).*$|\1|;s| |\\\\ |g;p}" \
2>/dev/null )' -- "$quoted" ) )
return return
;; ;;
--help-command) --help-command)
COMPREPLY=( $( compgen -W '$( cmake --help-command-list 2>/dev/null| COMPREPLY=( $( compgen -W '$( cmake --help-command-list 2>/dev/null|
tail -n +2 )' -- "$cur" ) ) grep -v "^cmake version " )' -- "$cur" ) )
return return
;; ;;
--help-module) --help-module)
COMPREPLY=( $( compgen -W '$( cmake --help-module-list 2>/dev/null| COMPREPLY=( $( compgen -W '$( cmake --help-module-list 2>/dev/null|
tail -n +2 )' -- "$cur" ) ) grep -v "^cmake version " )' -- "$cur" ) )
return return
;; ;;
--help-policy) --help-policy)
@ -124,12 +126,12 @@ _cmake()
;; ;;
--help-property) --help-property)
COMPREPLY=( $( compgen -W '$( cmake --help-property-list \ COMPREPLY=( $( compgen -W '$( cmake --help-property-list \
2>/dev/null | tail -n +2 )' -- "$cur" ) ) 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) )
return return
;; ;;
--help-variable) --help-variable)
COMPREPLY=( $( compgen -W '$( cmake --help-variable-list \ COMPREPLY=( $( compgen -W '$( cmake --help-variable-list \
2>/dev/null | tail -n +2 )' -- "$cur" ) ) 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) )
return return
;; ;;
esac esac

@ -8,8 +8,8 @@ _cpack()
case "$prev" in case "$prev" in
-G) -G)
COMPREPLY=( $( compgen -W '$( cpack --help 2>/dev/null | COMPREPLY=( $( compgen -W '$( cpack --help 2>/dev/null |
grep "^ .*= .*" 2> /dev/null | grep -v "^ -" 2>/dev/null | sed -e "1,/^Generators/d" -e "s|^ *\([^ ]*\) .*$|\1|" \
cut -d" " -f 3 )' -- "$cur" ) ) 2>/dev/null )' -- "$cur" ) )
return return
;; ;;
-C) -C)
@ -20,7 +20,7 @@ _cpack()
-D) -D)
[[ $cur == *=* ]] && return # no completion for values [[ $cur == *=* ]] && return # no completion for values
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \ COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
2>/dev/null | tail -n +2 )' -S = -- "$cur" ) ) 2>/dev/null | grep -v "^cpack version " )' -S = -- "$cur" ) )
compopt -o nospace compopt -o nospace
return return
;; ;;
@ -38,12 +38,12 @@ _cpack()
;; ;;
--help-command) --help-command)
COMPREPLY=( $( compgen -W '$( cpack --help-command-list 2>/dev/null| COMPREPLY=( $( compgen -W '$( cpack --help-command-list 2>/dev/null|
tail -n +2 )' -- "$cur" ) ) grep -v "^cpack version " )' -- "$cur" ) )
return return
;; ;;
--help-variable) --help-variable)
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \ COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
2>/dev/null | tail -n +2 )' -- "$cur" ) ) 2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) )
return return
;; ;;
esac esac

@ -54,7 +54,7 @@ _ctest()
return return
;; ;;
-S|--script|-SP|--script-new-process) -S|--script|-SP|--script-new-process)
# FIXME ? _filedir '@(cmake|ctest)'
return return
;; ;;
--interactive-debug-mode) --interactive-debug-mode)
@ -63,7 +63,7 @@ _ctest()
;; ;;
--help-command) --help-command)
COMPREPLY=( $( compgen -W '$( ctest --help-command-list 2>/dev/null| COMPREPLY=( $( compgen -W '$( ctest --help-command-list 2>/dev/null|
tail -n +2 )' -- "$cur" ) ) grep -v "^ctest version " )' -- "$cur" ) )
return return
;; ;;
esac esac

@ -6,10 +6,9 @@ set(AM_MOC_OPTIONS @_moc_options@)
set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@") set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@")
set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/") set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/")
set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/") set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/")
set(AM_QT_MOC_EXECUTABLE "@QT_MOC_EXECUTABLE@") set(AM_QT_MOC_EXECUTABLE "@_qt_moc_executable@")
set(AM_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/") set(AM_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/")
set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/") set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/")
set(AM_QT_VERSION_MAJOR "@QT_VERSION_MAJOR@" ) set(AM_QT_VERSION_MAJOR "@_target_qt_version@")
set(AM_Qt5Core_VERSION_MAJOR "@Qt5Core_VERSION_MAJOR@" )
set(AM_TARGET_NAME @_moc_target_name@) set(AM_TARGET_NAME @_moc_target_name@)
set(AM_RELAXED_MODE "@_moc_relaxed_mode@") set(AM_RELAXED_MODE "@_moc_relaxed_mode@")

@ -55,7 +55,7 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN) TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
include (FindX11) include (FindX11)
if("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$") if("${X11_X11_INCLUDE_PATH}" STREQUAL "/usr/include")
set (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.") set (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.")
else() else()
set (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING set (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING

@ -160,10 +160,9 @@
# define COMPILER_ID "ADSP" # define COMPILER_ID "ADSP"
/* IAR Systems compiler for embedded systems. /* IAR Systems compiler for embedded systems.
http://www.iar.com http://www.iar.com */
Not supported yet by CMake #elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
#elif defined(__IAR_SYSTEMS_ICC__) # define COMPILER_ID "IAR"
# define COMPILER_ID "IAR" */
/* sdcc, the small devices C compiler for embedded systems, /* sdcc, the small devices C compiler for embedded systems,
http://sdcc.sourceforge.net */ http://sdcc.sourceforge.net */

@ -161,6 +161,11 @@
#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
# define COMPILER_ID "ADSP" # define COMPILER_ID "ADSP"
/* IAR Systems compiler for embedded systems.
http://www.iar.com */
#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
# define COMPILER_ID "IAR"
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
# define COMPILER_ID "MIPSpro" # define COMPILER_ID "MIPSpro"
# if defined(_SGI_COMPILER_VERSION) # if defined(_SGI_COMPILER_VERSION)

@ -68,6 +68,19 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING ${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.") "Flags used by the linker during Release with Debug Info builds.")
set (CMAKE_STATIC_LINKER_FLAGS_DEBUG ${CMAKE_STATIC_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
set (CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL ${CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
set (CMAKE_STATIC_LINKER_FLAGS_RELEASE ${CMAKE_STATIC_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
set (CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
endif() endif()
# shared linker flags # shared linker flags
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
@ -77,6 +90,10 @@ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}" set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker during the creation of modules.") CACHE STRING "Flags used by the linker during the creation of modules.")
# static linker flags
set (CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS_INIT}"
CACHE STRING "Flags used by the linker during the creation of static libraries.")
set(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL set(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
"What is the target build tool cmake is generating for.") "What is the target build tool cmake is generating for.")
@ -103,5 +120,10 @@ CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
) )

@ -103,6 +103,10 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI "-h") set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI "-h")
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI "Texas Instruments") set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI "Texas Instruments")
list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU IAR)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_IAR )
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_IAR "IAR Assembler")
include(CMakeDetermineCompilerId) include(CMakeDetermineCompilerId)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT}) CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})

@ -120,6 +120,13 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
set(CMAKE_C_COMPILER_ID) set(CMAKE_C_COMPILER_ID)
file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_C_COMPILER_ID_PLATFORM_CONTENT) CMAKE_C_COMPILER_ID_PLATFORM_CONTENT)
# The IAR compiler produces weird output.
# See http://www.cmake.org/Bug/view.php?id=10176#c19598
list(APPEND CMAKE_C_COMPILER_ID_VENDORS IAR)
set(CMAKE_C_COMPILER_ID_VENDOR_FLAGS_IAR )
set(CMAKE_C_COMPILER_ID_VENDOR_REGEX_IAR "IAR .+ Compiler")
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c) CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)

@ -116,6 +116,13 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
set(CMAKE_CXX_COMPILER_ID) set(CMAKE_CXX_COMPILER_ID)
file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT) CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT)
# The IAR compiler produces weird output.
# See http://www.cmake.org/Bug/view.php?id=10176#c19598
list(APPEND CMAKE_CXX_COMPILER_ID_VENDORS IAR)
set(CMAKE_CXX_COMPILER_ID_VENDOR_FLAGS_IAR )
set(CMAKE_CXX_COMPILER_ID_VENDOR_REGEX_IAR "IAR .+ Compiler")
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp) CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp)

@ -69,4 +69,17 @@ macro(_cmake_find_compiler lang)
endif() endif()
unset(_${lang}_COMPILER_HINTS) unset(_${lang}_COMPILER_HINTS)
unset(_languages) unset(_languages)
# Look for a make tool provided by Xcode
if(CMAKE_${lang}_COMPILER STREQUAL "CMAKE_${lang}_COMPILER-NOTFOUND" AND CMAKE_HOST_APPLE)
foreach(comp ${CMAKE_${lang}_COMPILER_LIST})
execute_process(COMMAND xcrun --find ${comp}
OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_VARIABLE _xcrun_err)
if(_xcrun_out)
set_property(CACHE CMAKE_${lang}_COMPILER PROPERTY VALUE "${_xcrun_out}")
break()
endif()
endforeach()
endif()
endmacro() endmacro()

@ -38,6 +38,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
"--no-warn-unused-cli" "--no-warn-unused-cli"
OUTPUT_VARIABLE OUTPUT OUTPUT_VARIABLE OUTPUT
COPY_FILE "${BIN}" COPY_FILE "${BIN}"
COPY_FILE_ERROR _copy_error
) )
# Move result from cache to normal variable. # Move result from cache to normal variable.
set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED}) set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED})
@ -45,7 +46,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED} PARENT_SCOPE) set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED} PARENT_SCOPE)
# Load the resulting information strings. # Load the resulting information strings.
if(CMAKE_${lang}_ABI_COMPILED) if(CMAKE_${lang}_ABI_COMPILED AND NOT _copy_error)
message(STATUS "Detecting ${lang} compiler ABI info - done") message(STATUS "Detecting ${lang} compiler ABI info - done")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n") "Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n")
@ -128,7 +129,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
else() else()
message(STATUS "Detecting ${lang} compiler ABI info - failed") message(STATUS "Detecting ${lang} compiler ABI info - failed")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n\n") "Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n${_copy_error}\n\n")
endif() endif()
endif() endif()
endfunction() endfunction()

@ -109,12 +109,9 @@ Id flags: ${testflags}
# Compile the compiler identification source. # Compile the compiler identification source.
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)") if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)")
set(vs_version ${CMAKE_MATCH_1}) set(vs_version ${CMAKE_MATCH_1})
set(id_arch ${CMAKE_VS_PLATFORM_NAME}) set(id_platform ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}") set(id_lang "${lang}")
set(id_cl cl.exe) set(id_cl cl.exe)
if(NOT id_arch)
set(id_arch Win32)
endif()
if(NOT "${vs_version}" VERSION_LESS 10) if(NOT "${vs_version}" VERSION_LESS 10)
set(v 10) set(v 10)
set(ext vcxproj) set(ext vcxproj)
@ -126,14 +123,8 @@ Id flags: ${testflags}
set(v 6) set(v 6)
set(ext dsp) set(ext dsp)
endif() endif()
if("${id_arch}" STREQUAL "x64") if("${id_platform}" STREQUAL "Itanium")
set(id_machine_10 MachineX64) set(id_platform ia64)
elseif("${id_arch}" STREQUAL "Itanium")
set(id_machine_10 MachineIA64)
set(id_arch ia64)
else()
set(id_machine_6 x86)
set(id_machine_10 MachineX86)
endif() endif()
if(CMAKE_VS_PLATFORM_TOOLSET) if(CMAKE_VS_PLATFORM_TOOLSET)
set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>") set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
@ -142,12 +133,16 @@ Id flags: ${testflags}
endif() endif()
if(CMAKE_VS_WINCE_VERSION) if(CMAKE_VS_WINCE_VERSION)
set(id_entrypoint "mainACRTStartup") set(id_entrypoint "mainACRTStartup")
if("${vs_version}" VERSION_LESS 9)
set(id_subsystem 9) set(id_subsystem 9)
else()
set(id_subsystem 8)
endif()
else() else()
set(id_subsystem 1) set(id_subsystem 1)
endif() endif()
if("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Bb][Uu][Ii][Ll][Dd]") if("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Bb][Uu][Ii][Ll][Dd]")
set(build /p:Configuration=Debug /p:Platform=@id_arch@ /p:VisualStudioVersion=${vs_version}.0) set(build /p:Configuration=Debug /p:Platform=@id_platform@ /p:VisualStudioVersion=${vs_version}.0)
elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]") elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]")
set(build /make) set(build /make)
else() else()
@ -339,6 +334,35 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
endif() endif()
endforeach() endforeach()
# Detect the exact architecture from the PE header.
if(WIN32)
# The offset to the PE signature is stored at 0x3c.
file(READ ${file} peoffsethex LIMIT 1 OFFSET 60 HEX)
string(SUBSTRING "${peoffsethex}" 0 1 peoffsethex1)
string(SUBSTRING "${peoffsethex}" 1 1 peoffsethex2)
set(peoffsetexpression "${peoffsethex1} * 16 + ${peoffsethex2}")
string(REPLACE "a" "10" peoffsetexpression "${peoffsetexpression}")
string(REPLACE "b" "11" peoffsetexpression "${peoffsetexpression}")
string(REPLACE "c" "12" peoffsetexpression "${peoffsetexpression}")
string(REPLACE "d" "13" peoffsetexpression "${peoffsetexpression}")
string(REPLACE "e" "14" peoffsetexpression "${peoffsetexpression}")
string(REPLACE "f" "15" peoffsetexpression "${peoffsetexpression}")
math(EXPR peoffset "${peoffsetexpression}")
file(READ ${file} peheader LIMIT 6 OFFSET ${peoffset} HEX)
if(peheader STREQUAL "50450000a201")
set(ARCHITECTURE_ID "SH3")
elseif(peheader STREQUAL "50450000a301")
set(ARCHITECTURE_ID "SH3DSP")
elseif(peheader STREQUAL "50450000a601")
set(ARCHITECTURE_ID "SH4")
elseif(peheader STREQUAL "50450000a801")
set(ARCHITECTURE_ID "SH5")
elseif(peheader STREQUAL "50450000c201")
set(ARCHITECTURE_ID "THUMB")
endif()
endif()
# Check if a valid compiler and platform were found. # Check if a valid compiler and platform were found.
if(COMPILER_ID AND NOT COMPILER_ID_TWICE) if(COMPILER_ID AND NOT COMPILER_ID_TWICE)
set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}") set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}")

@ -12,14 +12,14 @@
# (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.)
# determine the compiler to use for C programs # determine the compiler to use for RC programs
# NOTE, a generator may set CMAKE_C_COMPILER before # NOTE, a generator may set CMAKE_RC_COMPILER before
# loading this file to force a compiler. # loading this file to force a compiler.
# use environment variable CCC first if defined by user, next use # use environment variable RC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator # the cmake variable CMAKE_GENERATOR_RC which can be defined by a generator
# as a default compiler # as a default compiler
if(NOT CMAKE_RC_COMPILER) if(NOT CMAKE_RC_COMPILER)
# prefer the environment variable CC # prefer the environment variable RC
if($ENV{RC} MATCHES ".+") if($ENV{RC} MATCHES ".+")
get_filename_component(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT) get_filename_component(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT)
if(CMAKE_RC_FLAGS_ENV_INIT) if(CMAKE_RC_FLAGS_ENV_INIT)

@ -1,32 +1,25 @@
# - Includes a public function for assisting users in trying to determine the # - Determine the Visual Studio service pack of the 'cl' in use.
# Visual Studio service pack in use. # The functionality of this module has been superseded by the platform
# # variable CMAKE_<LANG>_COMPILER_VERSION that contains the compiler version
# Sets the passed in variable to one of the following values or an empty # number.
# string if unknown.
# vc80
# vc80sp1
# vc90
# vc90sp1
# vc100
# vc100sp1
# vc110
# #
# Usage: # Usage:
# ===========================
#
# if(MSVC) # if(MSVC)
# include(CMakeDetermineVSServicePack) # include(CMakeDetermineVSServicePack)
# DetermineVSServicePack( my_service_pack ) # DetermineVSServicePack( my_service_pack )
#
# if( my_service_pack ) # if( my_service_pack )
# message(STATUS "Detected: ${my_service_pack}") # message(STATUS "Detected: ${my_service_pack}")
# endif() # endif()
# endif() # endif()
# # Function DetermineVSServicePack sets the given variable to one of the
# =========================== # following values or an empty string if unknown:
# vc80, vc80sp1
# vc90, vc90sp1
# vc100, vc100sp1
# vc110, vc110sp1, vc110sp2
#============================================================================= #=============================================================================
# Copyright 2009-2011 Kitware, Inc. # Copyright 2009-2013 Kitware, Inc.
# Copyright 2009-2010 Philip Lowman <philip@yhbt.com> # Copyright 2009-2010 Philip Lowman <philip@yhbt.com>
# Copyright 2010-2011 Aaron C. meadows <cmake@shadowguarddev.com> # Copyright 2010-2011 Aaron C. meadows <cmake@shadowguarddev.com>
# #
@ -57,6 +50,12 @@ function(_DetermineVSServicePackFromCompiler _OUT_VAR _cl_version)
set(_version "vc100sp1") set(_version "vc100sp1")
elseif(${_cl_version} VERSION_EQUAL "17.00.50727.1") elseif(${_cl_version} VERSION_EQUAL "17.00.50727.1")
set(_version "vc110") set(_version "vc110")
elseif(${_cl_version} VERSION_EQUAL "17.00.51106.1")
set(_version "vc110sp1")
elseif(${_cl_version} VERSION_EQUAL "17.00.60315.1")
set(_version "vc110sp2")
elseif(${_cl_version} VERSION_EQUAL "17.00.60610.1")
set(_version "vc110sp3")
else() else()
set(_version "") set(_version "")
endif() endif()

@ -3,7 +3,7 @@
# NAME = name of the package # NAME = name of the package
# COMPILER_ID = the CMake compiler ID for which the result is, i.e. GNU/Intel/Clang/MSVC, etc. # COMPILER_ID = the CMake compiler ID for which the result is, i.e. GNU/Intel/Clang/MSVC, etc.
# LANGUAGE = language for which the result will be used, i.e. C/CXX/Fortan/ASM # LANGUAGE = language for which the result will be used, i.e. C/CXX/Fortan/ASM
# MODE = EXIST : only check for existance of the given package # MODE = EXIST : only check for existence of the given package
# COMPILE : print the flags needed for compiling an object file which uses the given package # COMPILE : print the flags needed for compiling an object file which uses the given package
# LINK : print the flags needed for linking when using the given package # LINK : print the flags needed for linking when using the given package
# QUIET = if TRUE, don't print anything # QUIET = if TRUE, don't print anything

@ -0,0 +1,83 @@
##section Variables specific to the graphviz support
##end
##module
# - The builtin graphviz support of CMake.
# CMake can generate graphviz files, showing the dependencies between
# the targets in a project and also external libraries which are linked
# against.
# When CMake is run with the --graphiz=foo option, it will produce
# * a foo.dot file showing all dependencies in the project
# * a foo.dot.<target> file for each target, file showing on which other targets the respective target depends
# * a foo.dot.<target>.dependers file, showing which other targets depend on the respective target
#
# This can result in huge graphs. Using the file CMakeGraphVizOptions.cmake
# the look and content of the generated graphs can be influenced.
# This file is searched first in ${CMAKE_BINARY_DIR} and then in
# ${CMAKE_SOURCE_DIR}. If found, it is read and the variables set in it
# are used to adjust options for the generated graphviz files.
##end
#
##variable
# GRAPHVIZ_GRAPH_TYPE - The graph type
# Mandatory : NO
# Default : "digraph"
##end
##variable
# GRAPHVIZ_GRAPH_NAME - The graph name.
# Mandatory : NO
# Default : "GG"
##end
##variable
# GRAPHVIZ_GRAPH_HEADER - The header written at the top of the graphviz file.
# Mandatory : NO
# Default : "node [n fontsize = "12"];"
##end
##variable
# GRAPHVIZ_NODE_PREFIX - The prefix for each node in the graphviz file.
# Mandatory : NO
# Default : "node"
##end
##variable
# GRAPHVIZ_EXECUTABLES - Set this to FALSE to exclude executables from the generated graphs.
# Mandatory : NO
# Default : TRUE
##end
##variable
# GRAPHVIZ_STATIC_LIBS - Set this to FALSE to exclude static libraries from the generated graphs.
# Mandatory : NO
# Default : TRUE
##end
##variable
# GRAPHVIZ_SHARED_LIBS - Set this to FALSE to exclude shared libraries from the generated graphs.
# Mandatory : NO
# Default : TRUE
##end
##variable
# GRAPHVIZ_MODULE_LIBS - Set this to FALSE to exclude static libraries from the generated graphs.
# Mandatory : NO
# Default : TRUE
##end
##variable
# GRAPHVIZ_EXTERNAL_LIBS - Set this to FALSE to exclude external libraries from the generated graphs.
# Mandatory : NO
# Default : TRUE
##end
##variable
# GRAPHVIZ_IGNORE_TARGETS - A list of regular expressions for ignoring targets.
# Mandatory : NO
# Default : empty
##end
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
# Copyright 2013 Alexander Neundorf <neundorf@kde.org>
#
# 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.)

@ -14,7 +14,9 @@
find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
c:/MinGW/bin /MinGW/bin) c:/MinGW/bin /MinGW/bin
"[HKEY_CURRENT_USER\\Software\\CodeBlocks;Path]/MinGW/bin"
)
find_program(CMAKE_SH sh.exe ) find_program(CMAKE_SH sh.exe )
if(CMAKE_SH) if(CMAKE_SH)
message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n") message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n")

@ -51,7 +51,7 @@
# MY_INSTALL_CONFIGURATIONS = "" (was not used) # MY_INSTALL_CONFIGURATIONS = "" (was not used)
# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" # MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
# #
# You can the continue and process these variables. # You can then continue and process these variables.
# #
# Keywords terminate lists of values, e.g. if directly after a one_value_keyword # Keywords terminate lists of values, e.g. if directly after a one_value_keyword
# another recognized keyword follows, this is interpreted as the beginning of # another recognized keyword follows, this is interpreted as the beginning of

@ -26,10 +26,11 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
set(linker "CMAKE_LINKER-NOTFOUND") set(linker "CMAKE_LINKER-NOTFOUND")
if(CMAKE_LINKER) if(CMAKE_LINKER)
get_filename_component(linker ${CMAKE_LINKER} NAME) get_filename_component(linker ${CMAKE_LINKER} NAME)
string(REGEX REPLACE "([][+.*?()^$])" "\\\\\\1" linker "${linker}")
endif() endif()
# Construct a regex to match linker lines. It must match both the # Construct a regex to match linker lines. It must match both the
# whole line and just the command (argv[0]). # whole line and just the command (argv[0]).
set(linker_regex "^( *|.*[/\\])(${linker}|ld|collect2)[^/\\]*( |$)") set(linker_regex "^( *|.*[/\\])(${linker}|([^/\\]+-)?ld|collect2)[^/\\]*( |$)")
set(linker_exclude_regex "collect2 version ") set(linker_exclude_regex "collect2 version ")
set(log "${log} link line regex: [${linker_regex}]\n") set(log "${log} link line regex: [${linker_regex}]\n")
string(REGEX REPLACE "\r?\n" ";" output_lines "${text}") string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")

@ -0,0 +1,146 @@
# - Convenience macros for printing properties and variables, useful e.g. for debugging.
#
#
# CMAKE_PRINT_PROPERTIES([TARGETS target1 .. targetN]
# [SOURCES source1 .. sourceN]
# [DIRECTORIES dir1 .. dirN]
# [TESTS test1 .. testN]
# [CACHE_ENTRIES entry1 .. entryN]
# PROPERTIES prop1 .. propN )
#
# This macro prints the values of the properties of the given targets,
# source files, directories, tests or cache entries. Exactly one of the
# scope keywords must be used.
# Example:
# cmake_print_properties(TARGETS foo bar PROPERTIES LOCATION INTERFACE_INCLUDE_DIRS)
# This will print the LOCATION and INTERFACE_INCLUDE_DIRS properties for both
# targets foo and bar.
#
#
# CMAKE_PRINT_VARIABLES(var1 var2 .. varN)
#
# This macro will print the name of each variable followed by its value.
# Example:
# cmake_print_variables(CMAKE_C_COMPILER CMAKE_MAJOR_VERSION THIS_ONE_DOES_NOT_EXIST)
# Gives:
# -- CMAKE_C_COMPILER="/usr/bin/gcc" ; CMAKE_MAJOR_VERSION="2" ; THIS_ONE_DOES_NOT_EXIST=""
#=============================================================================
# Copyright 2013 Alexander Neundorf, <neundorf@kde.org>
#
# 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.)
include(CMakeParseArguments)
function(CMAKE_PRINT_VARIABLES)
set(msg "")
foreach(var ${ARGN})
if(msg)
set(msg "${msg} ; ")
endif()
set(msg "${msg}${var}=\"${${var}}\"")
endforeach()
message(STATUS "${msg}")
endfunction()
function(CMAKE_PRINT_PROPERTIES )
set(options )
set(oneValueArgs )
set(multiValueArgs TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES )
cmake_parse_arguments(CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(CPP_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to cmake_print_properties(): \"${CPP_UNPARSED_ARGUMENTS}\"")
return()
endif()
if(NOT CPP_PROPERTIES)
message(FATAL_ERROR "Required argument PROPERTIES missing in cmake_print_properties() call")
return()
endif()
set(mode)
set(items)
set(keyword)
if(CPP_TARGETS)
set(items ${CPP_TARGETS})
set(mode ${mode} TARGETS)
set(keyword TARGET)
endif()
if(CPP_SOURCES)
set(items ${CPP_SOURCES})
set(mode ${mode} SOURCES)
set(keyword SOURCE)
endif()
if(CPP_TESTS)
set(items ${CPP_TESTS})
set(mode ${mode} TESTS)
set(keyword TEST)
endif()
if(CPP_DIRECTORIES)
set(items ${CPP_DIRECTORIES})
set(mode ${mode} DIRECTORIES)
set(keyword DIRECTORY)
endif()
if(CPP_CACHE_ENTRIES)
set(items ${CPP_CACHE_ENTRIES})
set(mode ${mode} CACHE_ENTRIES)
set(keyword CACHE)
endif()
if(NOT mode)
message(FATAL_ERROR "Mode keyword missing in cmake_print_properties() call, must be one of TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES")
return()
endif()
list(LENGTH mode modeLength)
if("${modeLength}" GREATER 1)
message(FATAL_ERROR "Multiple mode keyword used in cmake_print_properties() call, it must be exactly one of TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES")
return()
endif()
set(msg "\n")
foreach(item ${items})
set(itemExists TRUE)
if(keyword STREQUAL "TARGET")
if(NOT TARGET ${item})
set(itemExists FALSE)
set(msg "${msg}\n No such TARGET \"${item}\" !\n\n")
endif()
endif()
if (itemExists)
set(msg "${msg} Properties for ${keyword} ${item}:\n")
foreach(prop ${CPP_PROPERTIES})
get_property(propertySet ${keyword} ${item} PROPERTY "${prop}" SET)
if(propertySet)
get_property(property ${keyword} ${item} PROPERTY "${prop}")
set(msg "${msg} ${item}.${prop} = \"${property}\"\n")
else()
set(msg "${msg} ${item}.${prop} = <NOTFOUND>\n")
endif()
endforeach()
endif()
endforeach()
message(STATUS "${msg}")
endfunction()

@ -1,8 +1,10 @@
# This module defines two macros: # This module defines three macros:
# CMAKE_PUSH_CHECK_STATE() # CMAKE_PUSH_CHECK_STATE()
# and
# CMAKE_POP_CHECK_STATE() # CMAKE_POP_CHECK_STATE()
# These two macros can be used to save and restore the state of the variables # and
# CMAKE_RESET_CHECK_STATE()
# These macros can be used to save, restore and reset (i.e., clear contents)
# the state of the variables
# CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES # CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES
# and CMAKE_REQUIRED_INCLUDES used by the various Check-files coming with CMake, # and CMAKE_REQUIRED_INCLUDES used by the various Check-files coming with CMake,
# like e.g. check_function_exists() etc. # like e.g. check_function_exists() etc.
@ -11,9 +13,16 @@
# but after the Find-module has been executed they should have the same value # but after the Find-module has been executed they should have the same value
# as they had before. # as they had before.
# #
# CMAKE_PUSH_CHECK_STATE() macro receives optional argument RESET. Whether it's specified,
# CMAKE_PUSH_CHECK_STATE() will set all CMAKE_REQUIRED_* variables to empty values, same
# as CMAKE_RESET_CHECK_STATE() call will do.
#
# Usage: # Usage:
# cmake_push_check_state() # cmake_push_check_state(RESET)
# set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF) # set(CMAKE_REQUIRED_DEFINITIONS -DSOME_MORE_DEF)
# check_function_exists(...)
# cmake_reset_check_state()
# set(CMAKE_REQUIRED_DEFINITIONS -DANOTHER_DEF)
# check_function_exists(...) # check_function_exists(...)
# cmake_pop_check_state() # cmake_pop_check_state()
@ -31,6 +40,15 @@
# License text for the above reference.) # License text for the above reference.)
macro(CMAKE_RESET_CHECK_STATE)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_DEFINITIONS)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_FLAGS)
endmacro()
macro(CMAKE_PUSH_CHECK_STATE) macro(CMAKE_PUSH_CHECK_STATE)
if(NOT DEFINED _CMAKE_PUSH_CHECK_STATE_COUNTER) if(NOT DEFINED _CMAKE_PUSH_CHECK_STATE_COUNTER)
@ -43,6 +61,11 @@ macro(CMAKE_PUSH_CHECK_STATE)
set(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS}) set(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
set(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES}) set(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES})
set(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS}) set(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS})
if (ARGC GREATER 0 AND ARGV0 STREQUAL "RESET")
cmake_reset_check_state()
endif()
endmacro() endmacro()
macro(CMAKE_POP_CHECK_STATE) macro(CMAKE_POP_CHECK_STATE)

@ -1,3 +1,8 @@
set(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
set(CMAKE_HOST_SYSTEM_NAME "@CMAKE_HOST_SYSTEM_NAME@")
set(CMAKE_HOST_SYSTEM_VERSION "@CMAKE_HOST_SYSTEM_VERSION@")
set(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@")
@INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED@ @INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED@
set(CMAKE_SYSTEM "@CMAKE_SYSTEM@") set(CMAKE_SYSTEM "@CMAKE_SYSTEM@")
@ -5,11 +10,6 @@ set(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@")
set(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@") set(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@")
set(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@") set(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@")
set(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
set(CMAKE_HOST_SYSTEM_NAME "@CMAKE_HOST_SYSTEM_NAME@")
set(CMAKE_HOST_SYSTEM_VERSION "@CMAKE_HOST_SYSTEM_VERSION@")
set(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@")
set(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@") set(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@")
set(CMAKE_SYSTEM_LOADED 1) set(CMAKE_SYSTEM_LOADED 1)

@ -72,7 +72,7 @@ else()
message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90") message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 " file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
PROGRAM TESTFortran90 PROGRAM TESTFortran90
stop = 1 ; do while ( stop .eq. 0 ) ; end do integer stop ; stop = 1 ; do while ( stop .eq. 0 ) ; end do
END PROGRAM TESTFortran90 END PROGRAM TESTFortran90
") ")
try_compile(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR} try_compile(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR}

@ -14,3 +14,13 @@
find_program(CMAKE_MAKE_PROGRAM NAMES gmake make smake) find_program(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
mark_as_advanced(CMAKE_MAKE_PROGRAM) mark_as_advanced(CMAKE_MAKE_PROGRAM)
# Look for a make tool provided by Xcode
if(NOT CMAKE_MAKE_PROGRAM AND CMAKE_HOST_APPLE)
execute_process(COMMAND xcrun --find make
OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_VARIABLE _xcrun_err)
if(_xcrun_out)
set_property(CACHE CMAKE_MAKE_PROGRAM PROPERTY VALUE "${_xcrun_out}")
endif()
endif()

@ -263,8 +263,8 @@
# #
##variable ##variable
# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when # CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
# installing this project. This is only used # installing this project. This is only used by installer for Windows.
# by installer for Windows. # The default value is based on the installation directory.
##end ##end
##variable ##variable
# CPACK_CREATE_DESKTOP_LINKS - List of desktop links to create. # CPACK_CREATE_DESKTOP_LINKS - List of desktop links to create.

@ -2,7 +2,7 @@
##end ##end
##module ##module
# - PackageMaker CPack generator (Mac OS X). # - PackageMaker CPack generator (Mac OS X).
# The following variable is specific to installers build on Mac OS X # The following variable is specific to installers built on Mac OS X
# using PackageMaker: # using PackageMaker:
##end ##end
# #

@ -163,6 +163,8 @@
# May be set by the user in order to specify a USER binary spec file # May be set by the user in order to specify a USER binary spec file
# to be used by CPackRPM instead of generating the file. # to be used by CPackRPM instead of generating the file.
# The specified file will be processed by configure_file( @ONLY). # The specified file will be processed by configure_file( @ONLY).
# One can provide a component specific file by setting
# CPACK_RPM_<componentName>_USER_BINARY_SPECFILE.
##end ##end
##variable ##variable
# CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE - Spec file template. # CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE - Spec file template.
@ -223,6 +225,24 @@
# The refered file will be read and directly put after the %changelog # The refered file will be read and directly put after the %changelog
# section. # section.
##end ##end
##variable
# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST - list of path to be excluded.
# Mandatory : NO
# Default : /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include
# May be used to exclude path (directories or files) from the auto-generated
# list of paths discovered by CPack RPM. The defaut value contains a reasonable
# set of values if the variable is not defined by the user. If the variable
# is defined by the user then CPackRPM will NOT any of the default path.
# If you want to add some path to the default list then you can use
# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION variable.
##end
##variable
# CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - additional list of path to be excluded.
# Mandatory : NO
# Default : -
# May be used to add more exclude path (directories or files) from the initial
# default list of excluded paths. See CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST.
##end
#============================================================================= #=============================================================================
# Copyright 2007-2009 Kitware, Inc. # Copyright 2007-2009 Kitware, Inc.
@ -617,7 +637,7 @@ if(CPACK_RPM_CHANGELOG_FILE)
message(SEND_ERROR "CPackRPM:Warning: CPACK_RPM_CHANGELOG_FILE <${CPACK_RPM_CHANGELOG_FILE}> does not exists - ignoring") message(SEND_ERROR "CPackRPM:Warning: CPACK_RPM_CHANGELOG_FILE <${CPACK_RPM_CHANGELOG_FILE}> does not exists - ignoring")
endif() endif()
else() else()
set(CPACK_RPM_SPEC_CHANGELOG "* Sun Jul 4 2010 Erk <eric.noulard@gmail.com>\n Generated by CPack RPM (no Changelog file were provided)") set(CPACK_RPM_SPEC_CHANGELOG "* Sun Jul 4 2010 Eric Noulard <eric.noulard@gmail.com> - ${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}\n Generated by CPack RPM (no Changelog file were provided)")
endif() endif()
# CPACK_RPM_SPEC_MORE_DEFINE # CPACK_RPM_SPEC_MORE_DEFINE
@ -666,6 +686,30 @@ if(CPACK_RPM_PACKAGE_RELOCATABLE)
endforeach() endforeach()
endif() endif()
if (CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Initial list of path to OMIT in RPM: ${_RPM_DIRS_TO_OMIT}")
endif()
if (NOT DEFINED CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST)
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include)
if (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION)
message("CPackRPM:Debug: Adding ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION} to builtin omit list.")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION}")
endif()
endif()
if(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST)
if (CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST= ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST}")
endif()
foreach(_DIR ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST})
list(APPEND _RPM_DIRS_TO_OMIT "-o;-path;.${_DIR}")
endforeach()
endif()
if (CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Final list of path to OMIT in RPM: ${_RPM_DIRS_TO_OMIT}")
endif()
# 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 should include directory as well (thus -type d) # We should include directory as well (thus -type d)
@ -832,11 +876,25 @@ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}") message("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
endif() endif()
# USER generated spec file handling. # protect @ in pathname in order to avoid their
# We should generate a spec file template: # interpretation during the configure_file step
set(CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES}")
set(PROTECTED_AT "@")
string(REPLACE "@" "\@PROTECTED_AT\@" CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES_LIST}")
set(CPACK_RPM_INSTALL_FILES_LIST "")
#
# USER generated/provided spec file handling.
#
# We can have a component specific spec file.
if(CPACK_RPM_PACKAGE_COMPONENT AND CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_BINARY_SPECFILE)
set(CPACK_RPM_USER_BINARY_SPECFILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_BINARY_SPECFILE})
endif()
# We should generate a USER spec file template:
# - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE # - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
# - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE # - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
#
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 -*-
@ -902,9 +960,9 @@ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
${CPACK_RPM_INSTALL_FILES} \@CPACK_RPM_INSTALL_FILES\@
${CPACK_RPM_ABSOLUTE_INSTALL_FILES} \@CPACK_RPM_ABSOLUTE_INSTALL_FILES\@
${CPACK_RPM_USER_INSTALL_FILES} \@CPACK_RPM_USER_INSTALL_FILES\@
%changelog %changelog
\@CPACK_RPM_SPEC_CHANGELOG\@ \@CPACK_RPM_SPEC_CHANGELOG\@
@ -931,6 +989,9 @@ else()
configure_file(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY) configure_file(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
endif() endif()
# remove AT protection
unset(PROTECTED_AT)
if(RPMBUILD_EXECUTABLE) if(RPMBUILD_EXECUTABLE)
# Now call rpmbuild using the SPECFILE # Now call rpmbuild using the SPECFILE
execute_process( execute_process(

@ -76,6 +76,32 @@
# This image must be 493 by 312 pixels. # This image must be 493 by 312 pixels.
# #
##end ##end
#
##variable
# CPACK_WIX_PROGRAM_MENU_FOLDER - Start menu folder name for launcher.
#
# If this variable is not set, it will be initialized with CPACK_PACKAGE_NAME
#
##end
##variable
# CPACK_WIX_CULTURES - Language(s) of the installer
#
# Languages are compiled into the WixUI extension library. To use them,
# simply provide the name of the culture. If you specify more than one
# culture identifier in a comma or semicolon delimited list, the first one
# that is found will be used. You can find a list of supported languages at:
# http://wix.sourceforge.net/manual-wix3/WixUI_localization.htm
#
##end
##variable
# CPACK_WIX_TEMPLATE - Template file for WiX generation
#
# If this variable is set, the specified template will be used to generate the WiX wxs file.
# This should be used if further customization of the output is required.
#
# If this variable is not set, the default MSI template included with CMake will be used.
#
##end
#============================================================================= #=============================================================================
# Copyright 2012 Kitware, Inc. # Copyright 2012 Kitware, Inc.

@ -84,13 +84,13 @@ if(BUILD_TESTING)
endmacro() endmacro()
macro(SET_IF_SET var val) macro(SET_IF_SET var val)
if(NOT "${val}" MATCHES "^$") if(NOT "${val}" STREQUAL "")
set("${var}" "${val}") set("${var}" "${val}")
endif() endif()
endmacro() endmacro()
macro(SET_IF_SET_AND_NOT_SET var val) macro(SET_IF_SET_AND_NOT_SET var val)
if(NOT "${val}" MATCHES "^$") if(NOT "${val}" STREQUAL "")
SET_IF_NOT_SET("${var}" "${val}") SET_IF_NOT_SET("${var}" "${val}")
endif() endif()
endmacro() endmacro()

@ -2,9 +2,13 @@
# CHECK_C_COMPILER_FLAG(<flag> <var>) # CHECK_C_COMPILER_FLAG(<flag> <var>)
# <flag> - the compiler flag # <flag> - the compiler flag
# <var> - variable to store the result # <var> - variable to store the result
# This internally calls the check_c_source_compiles macro. # This internally calls the check_c_source_compiles macro and
# sets CMAKE_REQUIRED_DEFINITIONS to <flag>.
# See help for CheckCSourceCompiles for a listing of variables # See help for CheckCSourceCompiles for a listing of variables
# that can modify the build. # that can otherwise modify the build.
# The result only tells that the compiler does not give an error message when
# it encounters the flag. If the flag has any effect or even a specific one is
# beyond the scope of this module.
#============================================================================= #=============================================================================
# Copyright 2006-2011 Kitware, Inc. # Copyright 2006-2011 Kitware, Inc.
@ -26,6 +30,12 @@ include(CheckCSourceCompiles)
macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT) macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
# Normalize locale during test compilation.
set(_CheckCCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG)
foreach(v ${_CheckCCompilerFlag_LOCALE_VARS})
set(_CheckCCompilerFlag_SAVED_${v} "$ENV{${v}}")
set(ENV{${v}} C)
endforeach()
CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT} CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT}
# Some compilers do not fail with a bad flag # Some compilers do not fail with a bad flag
FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU
@ -41,5 +51,11 @@ macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "command option .* is not recognized" # XL FAIL_REGEX "command option .* is not recognized" # XL
FAIL_REGEX "WARNING: unknown flag:" # Open64 FAIL_REGEX "WARNING: unknown flag:" # Open64
) )
foreach(v ${_CheckCCompilerFlag_LOCALE_VARS})
set(ENV{${v}} ${_CheckCCompilerFlag_SAVED_${v}})
unset(_CheckCCompilerFlag_SAVED_${v})
endforeach()
unset(_CheckCCompilerFlag_LOCALE_VARS)
set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
endmacro () endmacro ()

@ -2,9 +2,13 @@
# CHECK_CXX_COMPILER_FLAG(<flag> <var>) # CHECK_CXX_COMPILER_FLAG(<flag> <var>)
# <flag> - the compiler flag # <flag> - the compiler flag
# <var> - variable to store the result # <var> - variable to store the result
# This internally calls the check_cxx_source_compiles macro. See help # This internally calls the check_cxx_source_compiles macro and
# for CheckCXXSourceCompiles for a listing of variables that can # sets CMAKE_REQUIRED_DEFINITIONS to <flag>.
# modify the build. # See help for CheckCXXSourceCompiles for a listing of variables
# that can otherwise modify the build.
# The result only tells that the compiler does not give an error message when
# it encounters the flag. If the flag has any effect or even a specific one is
# beyond the scope of this module.
#============================================================================= #=============================================================================
# Copyright 2006-2010 Kitware, Inc. # Copyright 2006-2010 Kitware, Inc.
@ -26,6 +30,13 @@ include(CheckCXXSourceCompiles)
macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT) macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
# Normalize locale during test compilation.
set(_CheckCXXCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG)
foreach(v ${_CheckCXXCompilerFlag_LOCALE_VARS})
set(_CheckCXXCompilerFlag_SAVED_${v} "$ENV{${v}}")
set(ENV{${v}} C)
endforeach()
CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT} CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}
# Some compilers do not fail with a bad flag # Some compilers do not fail with a bad flag
FAIL_REGEX "command line option .* is valid for .* but not for C\\\\+\\\\+" # GNU FAIL_REGEX "command line option .* is valid for .* but not for C\\\\+\\\\+" # GNU
@ -43,6 +54,12 @@ macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "File with unknown suffix passed to linker" # PGI FAIL_REGEX "File with unknown suffix passed to linker" # PGI
FAIL_REGEX "WARNING: unknown flag:" # Open64 FAIL_REGEX "WARNING: unknown flag:" # Open64
) )
foreach(v ${_CheckCXXCompilerFlag_LOCALE_VARS})
set(ENV{${v}} ${_CheckCXXCompilerFlag_SAVED_${v}})
unset(_CheckCXXCompilerFlag_SAVED_${v})
endforeach()
unset(_CheckCXXCompilerFlag_LOCALE_VARS)
set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
endmacro () endmacro ()

@ -4,7 +4,7 @@
# Check that the <function> is provided by libraries on the system and # Check that the <function> is provided by libraries on the system and
# store the result in a <variable>. This does not verify that any # store the result in a <variable>. This does not verify that any
# system header file declares the function, only that it can be found # system header file declares the function, only that it can be found
# at link time (considure using CheckSymbolExists). # at link time (consider using CheckSymbolExists).
# #
# The following variables may be set before calling this macro to # The following variables may be set before calling this macro to
# modify the way the check is run: # modify the way the check is run:

@ -15,4 +15,4 @@
message(SEND_ERROR message(SEND_ERROR
"Modules/CheckSizeOf.cmake has been removed. " "Modules/CheckSizeOf.cmake has been removed. "
"Use Modules/CheckTypeSize.cmake instead. This " "Use Modules/CheckTypeSize.cmake instead. This "
"compatability check may be removed before the next release!") "compatibility check may be removed before the next release!")

@ -1,2 +1,4 @@
include(Compiler/Clang) include(Compiler/Clang)
__compiler_clang(CXX) __compiler_clang(CXX)
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")

@ -24,4 +24,5 @@ macro(__compiler_clang lang)
__compiler_gnu(${lang}) __compiler_gnu(${lang})
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
endmacro() endmacro()

@ -1,2 +1,12 @@
include(Compiler/GNU) include(Compiler/GNU)
__compiler_gnu(CXX) __compiler_gnu(CXX)
if (WIN32)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fno-keep-inline-dllexport")
endif()
else()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2)
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
endif()
endif()

@ -25,6 +25,9 @@ macro(__compiler_gnu lang)
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4) if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
endif() endif()
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.2)
set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
endif()
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")

@ -0,0 +1,14 @@
# This file is processed when the IAR compiler is used for an assembler file
include(Compiler/IAR)
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <SOURCE> <DEFINES> <FLAGS> -o <OBJECT>")
if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
endif()
if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa)
endif()

@ -0,0 +1,34 @@
# This file is processed when the IAR compiler is used for a C file
include(Compiler/IAR)
set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <SOURCE> <DEFINES> <FLAGS> -o <OBJECT>")
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <SOURCE> <DEFINES> <FLAGS> --preprocess=cnl <PREPROCESSED_SOURCE>")
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <SOURCE> <DEFINES> <FLAGS> -lAH <ASSEMBLY_SOURCE> -o <OBJECT>.dummy")
# The toolchains for ARM and AVR are quite different:
if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM")
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_LINKER> <OBJECTS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>")
set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> <TARGET> --create <LINK_FLAGS> <OBJECTS> ")
endif()
if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR")
set(CMAKE_C_OUTPUT_EXTENSION ".r90")
if(NOT CMAKE_C_LINK_FLAGS)
set(CMAKE_C_LINK_FLAGS "-Fmotorola")
endif()
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_LINKER> <OBJECTS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>")
set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> -o <TARGET> <OBJECTS> ")
endif()
# add the target specific include directory:
get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH)
get_filename_component(_compilerDir "${_compilerDir}" PATH)
include_directories("${_compilerDir}/inc" )

@ -0,0 +1,34 @@
# This file is processed when the IAR compiler is used for a C++ file
include(Compiler/IAR)
set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <SOURCE> <DEFINES> <FLAGS> -o <OBJECT>")
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <SOURCE> <DEFINES> <FLAGS> --preprocess=cnl <PREPROCESSED_SOURCE>")
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <SOURCE> <DEFINES> <FLAGS> -lAH <ASSEMBLY_SOURCE> -o <OBJECT>.dummy")
if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM")
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> <OBJECTS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>")
set(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> <TARGET> --create <LINK_FLAGS> <OBJECTS> ")
endif()
if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR")
set(CMAKE_CXX_OUTPUT_EXTENSION ".r90")
if(NOT CMAKE_CXX_LINK_FLAGS)
set(CMAKE_CXX_LINK_FLAGS "-Fmotorola")
endif()
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> <OBJECTS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>")
set(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> -o <TARGET> <OBJECTS> ")
endif()
# add the target specific include directory:
get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH)
get_filename_component(_compilerDir "${_compilerDir}" PATH)
include_directories("${_compilerDir}/inc")

@ -0,0 +1,46 @@
# This file is processed when the IAR compiler is used for a C or C++ file
# Documentation can be downloaded here: http://www.iar.com/website1/1.0.1.0/675/1/
# The initial feature request is here: http://www.cmake.org/Bug/view.php?id=10176
# It also contains additional links and information.
if(_IAR_CMAKE_LOADED)
return()
endif()
set(_IAR_CMAKE_LOADED TRUE)
get_filename_component(_CMAKE_C_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
get_filename_component(_CMAKE_CXX_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
get_filename_component(_CMAKE_ASM_TOOLCHAIN_LOCATION "${CMAKE_ASM_COMPILER}" PATH)
if("${CMAKE_C_COMPILER}" MATCHES "arm" OR "${CMAKE_CXX_COMPILER}" MATCHES "arm" OR "${CMAKE_ASM_COMPILER}" MATCHES "arm")
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
# For arm, IAR uses the "ilinkarm" linker and "iarchive" archiver:
find_program(CMAKE_IAR_LINKER ilinkarm HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}")
find_program(CMAKE_IAR_AR iarchive HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" )
set(IAR_TARGET_ARCHITECTURE "ARM" CACHE STRING "IAR compiler target architecture")
endif()
if("${CMAKE_C_COMPILER}" MATCHES "avr" OR "${CMAKE_CXX_COMPILER}" MATCHES "avr" OR "${CMAKE_ASM_COMPILER}" MATCHES "avr")
set(CMAKE_EXECUTABLE_SUFFIX ".bin")
# For AVR and AVR32, IAR uses the "xlink" linker and the "xar" archiver:
find_program(CMAKE_IAR_LINKER xlink HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" )
find_program(CMAKE_IAR_AR xar HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" )
set(IAR_TARGET_ARCHITECTURE "AVR" CACHE STRING "IAR compiler target architecture")
set(CMAKE_LIBRARY_PATH_FLAG "-I")
endif()
if(NOT IAR_TARGET_ARCHITECTURE)
message(FATAL_ERROR "The IAR compiler for this architecture is not yet supported "
" by CMake. Please go to http://www.cmake.org/Bug and enter a feature request there.")
endif()
set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE)
set(CMAKE_AR "${CMAKE_IAR_AR}" CACHE FILEPATH "The IAR archiver" FORCE)

@ -6,5 +6,9 @@ set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_C_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
endif()
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

@ -6,5 +6,9 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
endif()
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@id_arch@"> <ProjectConfiguration Include="Debug|@id_platform@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>@id_arch@</Platform> <Platform>@id_platform@</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
@ -12,7 +12,7 @@
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
@id_toolset@ @id_toolset@
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@ -20,11 +20,11 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">.\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">.\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">$(Configuration)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -40,7 +40,6 @@
<Link> <Link>
<GenerateDebugInformation>false</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<TargetMachine>@id_machine_10@</TargetMachine>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>for %%i in (@id_cl@) do %40echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i</Command> <Command>for %%i in (@id_cl@) do %40echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i</Command>

@ -1,7 +1,7 @@
# Microsoft Developer Studio Project File - Name="CompilerId@id_lang@" - Package Owner=<4> # Microsoft Developer Studio Project File - Name="CompilerId@id_lang@" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 6.00
# TARGTYPE "Win32 (@id_machine_6@) Application" 0x0101 # TARGTYPE "Win32 (x86) Application" 0x0101
CFG=CompilerId@id_lang@ - Win32 Debug CFG=CompilerId@id_lang@ - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
@ -16,7 +16,7 @@ CFG=CompilerId@id_lang@ - Win32 Debug
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "CompilerId@id_lang@ - Win32 Debug" (based on "Win32 (@id_machine_6@) Application") !MESSAGE "CompilerId@id_lang@ - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
@ -29,7 +29,7 @@ CPP=cl.exe
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD CPP /nologo /MDd /c # ADD CPP /nologo /MDd /c
LINK32=link.exe LINK32=link.exe
# ADD LINK32 /nologo /version:0.0 /subsystem:console /machine:@id_machine_6@ /out:"CompilerId@id_lang@.exe" /IGNORE:4089 # ADD LINK32 /nologo /version:0.0 /subsystem:console /machine:x86 /out:"CompilerId@id_lang@.exe" /IGNORE:4089
# Begin Special Build Tool # Begin Special Build Tool
SOURCE="$(InputPath)" SOURCE="$(InputPath)"
PostBuild_Cmds=for %%i in (@id_cl@) do @echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i PostBuild_Cmds=for %%i in (@id_cl@) do @echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i

@ -10,12 +10,12 @@
> >
<Platforms> <Platforms>
<Platform <Platform
Name="@id_arch@" Name="@id_platform@"
/> />
</Platforms> </Platforms>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|@id_arch@" Name="Debug|@id_platform@"
OutputDirectory="." OutputDirectory="."
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"

@ -56,7 +56,7 @@
2C18F0B415DC1DC700593670 = { 2C18F0B415DC1DC700593670 = {
fileEncoding = 30; fileEncoding = 30;
isa = PBXFileReference; isa = PBXFileReference;
lastKnownFileType = @id_type@; explicitFileType = @id_type@;
path = @id_src@; path = @id_src@;
refType = 4; refType = 4;
sourceTree = "<group>"; sourceTree = "<group>";

@ -7,7 +7,7 @@
objects = { objects = {
2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; }; 2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; };
2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; }; 2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; explicitFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; };
8DD76F6C0486A84900D96B5E = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CompilerId@id_lang@; sourceTree = BUILT_PRODUCTS_DIR; }; 8DD76F6C0486A84900D96B5E = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CompilerId@id_lang@; sourceTree = BUILT_PRODUCTS_DIR; };
08FB7794FE84155DC02AAC07 = { 08FB7794FE84155DC02AAC07 = {

@ -7,7 +7,7 @@
objects = { objects = {
2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; }; 2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; };
2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; }; 2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; explicitFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; };
08FB7794FE84155DC02AAC07 = { 08FB7794FE84155DC02AAC07 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (

@ -391,7 +391,7 @@ function(_ExternalData_arg target arg options var_file)
# Regular expression to match associated files. # Regular expression to match associated files.
string(REGEX REPLACE "^REGEX:" "" regex "${opt}") string(REGEX REPLACE "^REGEX:" "" regex "${opt}")
list(APPEND associated_regex "${regex}") list(APPEND associated_regex "${regex}")
elseif("x${opt}" MATCHES "^x:$") elseif(opt STREQUAL ":")
# Activate series matching. # Activate series matching.
set(series_option "${opt}") set(series_option "${opt}")
elseif("x${opt}" MATCHES "^[^][:/*?]+$") elseif("x${opt}" MATCHES "^[^][:/*?]+$")

@ -114,6 +114,15 @@
# and <TMP_DIR> # and <TMP_DIR>
# with corresponding property values. # with corresponding property values.
# #
# Any builtin step that specifies a "<step>_COMMAND cmd..." or custom
# step that specifies a "COMMAND cmd..." may specify additional command
# lines using the form "COMMAND cmd...". At build time the commands will
# be executed in order and aborted if any one fails. For example:
# ... BUILD_COMMAND make COMMAND echo done ...
# specifies to run "make" and then "echo done" during the build step.
# Whether the current working directory is preserved between commands
# is not defined. Behavior of shell operators like "&&" is not defined.
#
# The 'ExternalProject_Get_Property' function retrieves external project # The 'ExternalProject_Get_Property' function retrieves external project
# target properties: # target properties:
# ExternalProject_Get_Property(<name> [prop1 [prop2 [...]]]) # ExternalProject_Get_Property(<name> [prop1 [prop2 [...]]])
@ -961,7 +970,7 @@ endif()
set(sep ";") set(sep ";")
endif() endif()
endforeach() endforeach()
set(code "set(ENV{VS_UNICODE_OUTPUT} \"\")\n${code}set(command \"${cmd}\")${code_execute_process}") set(code "${code}set(command \"${cmd}\")${code_execute_process}")
file(WRITE ${stamp_dir}/${name}-${step}-impl.cmake "${code}") file(WRITE ${stamp_dir}/${name}-${step}-impl.cmake "${code}")
set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-impl.cmake) set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-impl.cmake)
endif() endif()
@ -971,7 +980,6 @@ endif()
set(logbase ${stamp_dir}/${name}-${step}) set(logbase ${stamp_dir}/${name}-${step})
file(WRITE ${script} " file(WRITE ${script} "
${code_cygpath_make} ${code_cygpath_make}
set(ENV{VS_UNICODE_OUTPUT} \"\")
set(command \"${command}\") set(command \"${command}\")
execute_process( execute_process(
COMMAND \${command} COMMAND \${command}
@ -1251,10 +1259,10 @@ function(_ep_add_download_command name)
get_filename_component(work_dir "${source_dir}" PATH) get_filename_component(work_dir "${source_dir}" PATH)
set(comment "Performing download step (SVN checkout) for '${name}'") set(comment "Performing download step (SVN checkout) for '${name}'")
set(svn_user_pw_args "") set(svn_user_pw_args "")
if(svn_username) if(DEFINED svn_username)
set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}") set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
endif() endif()
if(svn_password) if(DEFINED svn_password)
set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}") set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}")
endif() endif()
if(svn_trust_cert) if(svn_trust_cert)
@ -1473,10 +1481,10 @@ function(_ep_add_update_command name)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD) get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT) get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
set(svn_user_pw_args "") set(svn_user_pw_args "")
if(svn_username) if(DEFINED svn_username)
set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}") set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
endif() endif()
if(svn_password) if(DEFINED svn_password)
set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}") set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}")
endif() endif()
if(svn_trust_cert) if(svn_trust_cert)

@ -41,7 +41,7 @@
# Boost_LIBRARY_DIR - Directory containing Boost libraries # Boost_LIBRARY_DIR - Directory containing Boost libraries
# Boost_<C>_LIBRARY_DEBUG - Component <C> library debug variant # Boost_<C>_LIBRARY_DEBUG - Component <C> library debug variant
# Boost_<C>_LIBRARY_RELEASE - Component <C> library release variant # Boost_<C>_LIBRARY_RELEASE - Component <C> library release variant
# Users may set the these hints or results as cache entries. Projects should # Users may set these hints or results as cache entries. Projects should
# not read these entries directly but instead use the above result variables. # not read these entries directly but instead use the above result variables.
# Note that some hint names start in upper-case "BOOST". One may specify # Note that some hint names start in upper-case "BOOST". One may specify
# these as environment variables if they are not specified as CMake variables # these as environment variables if they are not specified as CMake variables
@ -154,7 +154,7 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Before we go searching, check whether boost-cmake is avaialble, unless the # Before we go searching, check whether boost-cmake is available, unless the
# user specifically asked NOT to search for boost-cmake. # user specifically asked NOT to search for boost-cmake.
# #
# If Boost_DIR is set, this behaves as any find_package call would. If not, # If Boost_DIR is set, this behaves as any find_package call would. If not,
@ -247,7 +247,7 @@ macro(_Boost_ADJUST_LIB_VARS basename)
endif() endif()
endif() endif()
# Make variables changeble to the advanced user # Make variables changeable to the advanced user
mark_as_advanced( mark_as_advanced(
Boost_${basename}_LIBRARY_RELEASE Boost_${basename}_LIBRARY_RELEASE
Boost_${basename}_LIBRARY_DEBUG Boost_${basename}_LIBRARY_DEBUG
@ -1022,7 +1022,12 @@ if(Boost_FOUND)
# We were unable to find some libraries, so generate a sensible # We were unable to find some libraries, so generate a sensible
# error message that lists the libraries we were unable to find. # error message that lists the libraries we were unable to find.
set(Boost_ERROR_REASON set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n") "${Boost_ERROR_REASON}\nCould not find the following")
if(Boost_USE_STATIC_LIBS)
set(Boost_ERROR_REASON "${Boost_ERROR_REASON} static")
endif()
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON} Boost libraries:\n")
foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
set(Boost_ERROR_REASON set(Boost_ERROR_REASON
"${Boost_ERROR_REASON} boost_${COMPONENT}\n") "${Boost_ERROR_REASON} boost_${COMPONENT}\n")

@ -607,7 +607,11 @@ macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext )
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
# Search default search paths, after we search our own set of paths. # Search default search paths, after we search our own set of paths.
find_library(${_var} NAMES ${_names} DOC ${_doc}) find_library(${_var}
NAMES ${_names}
PATHS "/usr/lib/nvidia-current"
DOC ${_doc}
)
endmacro() endmacro()
macro(cuda_find_library_local_first _var _names _doc) macro(cuda_find_library_local_first _var _names _doc)
@ -920,8 +924,14 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path)
if (IS_ABSOLUTE "${bpath}") if (IS_ABSOLUTE "${bpath}")
# Absolute paths are generally unnessary, especially if something like # Absolute paths are generally unnessary, especially if something like
# file(GLOB_RECURSE) is used to pick up the files. # file(GLOB_RECURSE) is used to pick up the files.
string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos)
if (_binary_dir_pos EQUAL 0)
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}")
else()
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}") file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}")
endif() endif()
endif()
# This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the # This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the
# CMake source. # CMake source.
@ -1021,7 +1031,10 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Initialize our list of includes with the user ones followed by the CUDA system ones. # Initialize our list of includes with the user ones followed by the CUDA system ones.
set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}") set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}")
# Get the include directories for this directory and use them for our nvcc command. # Get the include directories for this directory and use them for our nvcc command.
# Remove duplicate entries which may be present since include_directories
# in CMake >= 2.8.8 does not remove them.
get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES) get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
list(REMOVE_DUPLICATES CUDA_NVCC_INCLUDE_DIRECTORIES)
if(CUDA_NVCC_INCLUDE_DIRECTORIES) if(CUDA_NVCC_INCLUDE_DIRECTORIES)
foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES}) foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir}) list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir})
@ -1279,22 +1292,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Make sure the build system knows the file is generated. # Make sure the build system knows the file is generated.
set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE) set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE)
# Don't add the object file to the list of generated files if we are using
# visual studio and we are attaching the build rule to the cuda file. VS
# will add our object file to the linker automatically for us.
set(cuda_add_generated_file TRUE)
if(NOT compile_to_ptx AND CMAKE_GENERATOR MATCHES "Visual Studio" AND CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
# Visual Studio 8 crashes when you close the solution when you don't add the object file.
if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 8")
#message("Not adding ${generated_file}")
set(cuda_add_generated_file FALSE)
endif()
endif()
if(cuda_add_generated_file)
list(APPEND _cuda_wrap_generated_files ${generated_file}) list(APPEND _cuda_wrap_generated_files ${generated_file})
endif()
# Add the other files that we want cmake to clean on a cleanup ########## # Add the other files that we want cmake to clean on a cleanup ##########
list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}") list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}")

@ -63,7 +63,7 @@ if (${depend_text} MATCHES ".+")
if (EXISTS "/${file}") if (EXISTS "/${file}")
set(file "/${file}") set(file "/${file}")
else() else()
message(WARNING " Removing non-existant dependency file: ${file}") message(WARNING " Removing non-existent dependency file: ${file}")
set(file "") set(file "")
endif() endif()
endif() endif()

@ -45,7 +45,7 @@ if(APPLE)
set( FLTK2_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz") set( FLTK2_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
endif() endif()
# If FLTK2_INCLUDE_DIR is already defined we assigne its value to FLTK2_DIR # If FLTK2_INCLUDE_DIR is already defined we assign its value to FLTK2_DIR
if(FLTK2_INCLUDE_DIR) if(FLTK2_INCLUDE_DIR)
set(FLTK2_DIR ${FLTK2_INCLUDE_DIR}) set(FLTK2_DIR ${FLTK2_INCLUDE_DIR})
else() else()

@ -50,6 +50,9 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
/usr/local/X11R6 /usr/local/X11R6
/usr/local/X11 /usr/local/X11
/usr/freeware /usr/freeware
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
PATH_SUFFIXES include/freetype2 include PATH_SUFFIXES include/freetype2 include
) )
@ -61,6 +64,9 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
/usr/local/X11R6 /usr/local/X11R6
/usr/local/X11 /usr/local/X11
/usr/freeware /usr/freeware
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
PATH_SUFFIXES include/freetype2 include PATH_SUFFIXES include/freetype2 include
) )
@ -74,6 +80,9 @@ find_library(FREETYPE_LIBRARY
/usr/local/X11R6 /usr/local/X11R6
/usr/local/X11 /usr/local/X11
/usr/freeware /usr/freeware
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
) )
# set the user variables # set the user variables

@ -18,6 +18,7 @@
# GTK2_FOUND - Were all of your specified components found? # GTK2_FOUND - Were all of your specified components found?
# GTK2_INCLUDE_DIRS - All include directories # GTK2_INCLUDE_DIRS - All include directories
# GTK2_LIBRARIES - All libraries # GTK2_LIBRARIES - All libraries
# GTK2_DEFINITIONS - Additional compiler flags
# #
# GTK2_VERSION - The version of GTK2 found (x.y.z) # GTK2_VERSION - The version of GTK2 found (x.y.z)
# GTK2_MAJOR_VERSION - The major version of GTK2 # GTK2_MAJOR_VERSION - The major version of GTK2
@ -27,7 +28,6 @@
# Optional variables you can define prior to calling this module: # Optional variables you can define prior to calling this module:
# #
# GTK2_DEBUG - Enables verbose debugging of the module # GTK2_DEBUG - Enables verbose debugging of the module
# GTK2_SKIP_MARK_AS_ADVANCED - Disable marking cache variables as advanced
# GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to # GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to
# search for include files # search for include files
# #
@ -66,6 +66,18 @@
# (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.5 (UNRELEASED) (CMake 2.8.12)
# * 14236: Detect gthread library
# Detect pangocairo on windows
# Detect pangocairo with gtk module instead of with gtkmm
# * 14259: Use vc100 libraries with MSVC11
# * 14260: Export a GTK2_DEFINITIONS variable to set /vd2 when appropriate
# (i.e. MSVC)
# * Use the optimized/debug syntax for _LIBRARY and _LIBRARIES variables when
# appropriate. A new set of _RELEASE variables was also added.
# * Remove GTK2_SKIP_MARK_AS_ADVANCED option, as now the variables are
# marked as advanced by SelectLibraryConfigurations
# * Detect gmodule, pangoft2 and pangoxft libraries
# Version 1.4 (10/4/2012) (CMake 2.8.10) # Version 1.4 (10/4/2012) (CMake 2.8.10)
# * 12596: Missing paths for FindGTK2 on NetBSD # * 12596: Missing paths for FindGTK2 on NetBSD
# * 12049: Fixed detection of GTK include files in the lib folder on # * 12049: Fixed detection of GTK include files in the lib folder on
@ -116,6 +128,9 @@
# _OUT_micro = Micro version number # _OUT_micro = Micro version number
# _gtkversion_hdr = Header file to parse # _gtkversion_hdr = Header file to parse
#============================================================= #=============================================================
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr) function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr)
file(STRINGS ${_gtkversion_hdr} _contents REGEX "#define GTK_M[A-Z]+_VERSION[ \t]+") file(STRINGS ${_gtkversion_hdr} _contents REGEX "#define GTK_M[A-Z]+_VERSION[ \t]+")
if(_contents) if(_contents)
@ -144,7 +159,7 @@ endfunction()
#============================================================= #=============================================================
# _GTK2_FIND_INCLUDE_DIR # _GTK2_FIND_INCLUDE_DIR
# Internal function to find the GTK include directories # Internal function to find the GTK include directories
# _var = variable to set # _var = variable to set (_INCLUDE_DIR is appended)
# _hdr = header file to look for # _hdr = header file to look for
#============================================================= #=============================================================
function(_GTK2_FIND_INCLUDE_DIR _var _hdr) function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
@ -199,7 +214,7 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
message(STATUS "Adding ${_gtk2_arch_dir} to search path for multiarch support") message(STATUS "Adding ${_gtk2_arch_dir} to search path for multiarch support")
endif() endif()
endif() endif()
find_path(${_var} ${_hdr} find_path(${_var}_INCLUDE_DIR ${_hdr}
PATHS PATHS
${_gtk2_arch_dir} ${_gtk2_arch_dir}
/usr/local/lib64 /usr/local/lib64
@ -226,11 +241,8 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
${_suffixes} ${_suffixes}
) )
if(${_var}) if(${_var}_INCLUDE_DIR)
set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS} ${${_var}} PARENT_SCOPE) set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS} ${${_var}_INCLUDE_DIR} PARENT_SCOPE)
if(NOT GTK2_SKIP_MARK_AS_ADVANCED)
mark_as_advanced(${_var})
endif()
endif() endif()
endfunction() endfunction()
@ -238,7 +250,7 @@ endfunction()
#============================================================= #=============================================================
# _GTK2_FIND_LIBRARY # _GTK2_FIND_LIBRARY
# Internal function to find libraries packaged with GTK2 # Internal function to find libraries packaged with GTK2
# _var = library variable to create # _var = library variable to create (_LIBRARY is appended)
#============================================================= #=============================================================
function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
@ -268,6 +280,9 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
set(_library ${_library}-vc90) set(_library ${_library}-vc90)
elseif(MSVC10) elseif(MSVC10)
set(_library ${_library}-vc100) set(_library ${_library}-vc100)
elseif(MSVC11)
# Up to gtkmm-win 2.22.0-2 there are no vc110 libraries but vc100 can be used
set(_library ${_library}-vc100)
endif() endif()
set(_library_d ${_library}-d) set(_library_d ${_library}-d)
endif() endif()
@ -317,10 +332,10 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
if(GTK2_DEBUG) if(GTK2_DEBUG)
message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
"While searching for ${_var}, our proposed library list is ${_lib_list}") "While searching for ${_var}_LIBRARY, our proposed library list is ${_lib_list}")
endif() endif()
find_library(${_var} find_library(${_var}_LIBRARY_RELEASE
NAMES ${_lib_list} NAMES ${_lib_list}
PATHS PATHS
/opt/gnome/lib /opt/gnome/lib
@ -334,34 +349,34 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
if(_expand_vc AND MSVC) if(_expand_vc AND MSVC)
if(GTK2_DEBUG) if(GTK2_DEBUG)
message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
"While searching for ${_var}_DEBUG our proposed library list is ${_libd_list}") "While searching for ${_var}_LIBRARY_DEBUG our proposed library list is ${_libd_list}")
endif() endif()
find_library(${_var}_DEBUG find_library(${_var}_LIBRARY_DEBUG
NAMES ${_libd_list} NAMES ${_libd_list}
PATHS PATHS
$ENV{GTKMM_BASEPATH}/lib $ENV{GTKMM_BASEPATH}/lib
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib
) )
if(${_var} AND ${_var}_DEBUG)
if(NOT GTK2_SKIP_MARK_AS_ADVANCED)
mark_as_advanced(${_var}_DEBUG)
endif()
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} optimized ${${_var}} debug ${${_var}_DEBUG})
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE)
endif()
else()
if(NOT GTK2_SKIP_MARK_AS_ADVANCED)
mark_as_advanced(${_var})
endif() endif()
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${${_var}})
select_library_configurations(${_var})
set(${_var}_LIBRARY ${${_var}_LIBRARY} PARENT_SCOPE)
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${${_var}_LIBRARY})
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE) set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE)
# Set debug to release
set(${_var}_DEBUG ${${_var}}) if(GTK2_DEBUG)
set(${_var}_DEBUG ${${_var}} PARENT_SCOPE) message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
"${_var}_LIBRARY_RELEASE = \"${${_var}_LIBRARY_RELEASE}\"")
message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
"${_var}_LIBRARY_DEBUG = \"${${_var}_LIBRARY_DEBUG}\"")
message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
"${_var}_LIBRARY = \"${${_var}_LIBRARY}\"")
endif() endif()
endfunction() endfunction()
#============================================================= #=============================================================
@ -373,6 +388,7 @@ endfunction()
set(GTK2_FOUND) set(GTK2_FOUND)
set(GTK2_INCLUDE_DIRS) set(GTK2_INCLUDE_DIRS)
set(GTK2_LIBRARIES) set(GTK2_LIBRARIES)
set(GTK2_DEFINITIONS)
if(NOT GTK2_FIND_COMPONENTS) if(NOT GTK2_FIND_COMPONENTS)
# Assume they only want GTK # Assume they only want GTK
@ -389,7 +405,7 @@ if(GTK2_FIND_VERSION)
message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
"Searching for version ${GTK2_FIND_VERSION}") "Searching for version ${GTK2_FIND_VERSION}")
endif() endif()
_GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GTK gtk/gtk.h)
if(GTK2_GTK_INCLUDE_DIR) if(GTK2_GTK_INCLUDE_DIR)
_GTK2_GET_VERSION(GTK2_MAJOR_VERSION _GTK2_GET_VERSION(GTK2_MAJOR_VERSION
GTK2_MINOR_VERSION GTK2_MINOR_VERSION
@ -439,88 +455,95 @@ list(APPEND GTK2_LIBRARIES ${FREETYPE_LIBRARIES})
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
if(_GTK2_component STREQUAL "gtk") if(_GTK2_component STREQUAL "gtk")
_GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GTK gtk/gtk.h)
if(UNIX) if(UNIX)
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-x11 false true) _GTK2_FIND_LIBRARY (GTK2_GTK gtk-x11 false true)
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true) _GTK2_FIND_LIBRARY (GTK2_GDK gdk-x11 false true)
else() else()
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-win32 false true) _GTK2_FIND_LIBRARY (GTK2_GTK gtk-win32 false true)
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true) _GTK2_FIND_LIBRARY (GTK2_GDK gdk-win32 false true)
endif() endif()
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GDK gdk/gdk.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG gdkconfig.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO_INCLUDE_DIR cairo.h) _GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO cairo.h)
_GTK2_FIND_LIBRARY (GTK2_CAIRO_LIBRARY cairo false false) _GTK2_FIND_LIBRARY (GTK2_CAIRO cairo false false)
_GTK2_FIND_INCLUDE_DIR(GTK2_FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h) _GTK2_FIND_INCLUDE_DIR(GTK2_FONTCONFIG fontconfig/fontconfig.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGO_INCLUDE_DIR pango/pango.h) _GTK2_FIND_INCLUDE_DIR(GTK2_PANGO pango/pango.h)
_GTK2_FIND_LIBRARY (GTK2_PANGO_LIBRARY pango false true) _GTK2_FIND_LIBRARY (GTK2_PANGO pango false true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h) _GTK2_FIND_LIBRARY (GTK2_PANGOCAIRO pangocairo false true)
_GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF_LIBRARY gdk_pixbuf false true)
_GTK2_FIND_LIBRARY (GTK2_GIO_LIBRARY gio false true) _GTK2_FIND_LIBRARY (GTK2_PANGOFT2 pangoft2 false true)
_GTK2_FIND_INCLUDE_DIR(GTK2_ATK_INCLUDE_DIR atk/atk.h) _GTK2_FIND_LIBRARY (GTK2_PANGOXFT pangoxft false true)
_GTK2_FIND_LIBRARY (GTK2_ATK_LIBRARY atk false true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_PIXBUF gdk-pixbuf/gdk-pixbuf.h)
_GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true) _GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF gdk_pixbuf false true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h) _GTK2_FIND_LIBRARY (GTK2_GTHREAD gthread false true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
_GTK2_FIND_LIBRARY (GTK2_GLIB_LIBRARY glib false true)
elseif(_GTK2_component STREQUAL "gtkmm") _GTK2_FIND_LIBRARY (GTK2_GMODULE gmodule false true)
_GTK2_FIND_LIBRARY (GTK2_GIO gio false true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GTKMM_INCLUDE_DIR gtkmm.h) _GTK2_FIND_INCLUDE_DIR(GTK2_ATK atk/atk.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GTKMMCONFIG_INCLUDE_DIR gtkmmconfig.h) _GTK2_FIND_LIBRARY (GTK2_ATK atk false true)
_GTK2_FIND_LIBRARY (GTK2_GTKMM_LIBRARY gtkmm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKMM_INCLUDE_DIR gdkmm.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT gobject/gobject.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKMMCONFIG_INCLUDE_DIR gdkmmconfig.h) _GTK2_FIND_LIBRARY (GTK2_GOBJECT gobject false true)
_GTK2_FIND_LIBRARY (GTK2_GDKMM_LIBRARY gdkmm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMM_INCLUDE_DIR pangomm.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GLIB glib.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMMCONFIG_INCLUDE_DIR pangommconfig.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG glibconfig.h)
_GTK2_FIND_LIBRARY (GTK2_PANGOMM_LIBRARY pangomm true true) _GTK2_FIND_LIBRARY (GTK2_GLIB glib false true)
_GTK2_FIND_LIBRARY (GTK2_PANGOCAIRO_LIBRARY pangocairo true true) elseif(_GTK2_component STREQUAL "gtkmm")
_GTK2_FIND_INCLUDE_DIR(GTK2_GTKMM gtkmm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GTKMMCONFIG gtkmmconfig.h)
_GTK2_FIND_LIBRARY (GTK2_GTKMM gtkmm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMM_INCLUDE_DIR cairomm/cairomm.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMM gdkmm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMMCONFIG_INCLUDE_DIR cairommconfig.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMMCONFIG gdkmmconfig.h)
_GTK2_FIND_LIBRARY (GTK2_CAIROMM_LIBRARY cairomm true true) _GTK2_FIND_LIBRARY (GTK2_GDKMM gdkmm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GIOMM_INCLUDE_DIR giomm.h) _GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMM pangomm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GIOMMCONFIG_INCLUDE_DIR giommconfig.h) _GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMMCONFIG pangommconfig.h)
_GTK2_FIND_LIBRARY (GTK2_GIOMM_LIBRARY giomm true true) _GTK2_FIND_LIBRARY (GTK2_PANGOMM pangomm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_ATKMM_INCLUDE_DIR atkmm.h) _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMM cairomm/cairomm.h)
_GTK2_FIND_LIBRARY (GTK2_ATKMM_LIBRARY atkmm true true) _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMMCONFIG cairommconfig.h)
_GTK2_FIND_LIBRARY (GTK2_CAIROMM cairomm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMM_INCLUDE_DIR glibmm.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GIOMM giomm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMMCONFIG_INCLUDE_DIR glibmmconfig.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GIOMMCONFIG giommconfig.h)
_GTK2_FIND_LIBRARY (GTK2_GLIBMM_LIBRARY glibmm true true) _GTK2_FIND_LIBRARY (GTK2_GIOMM giomm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++_INCLUDE_DIR sigc++/sigc++.h) _GTK2_FIND_INCLUDE_DIR(GTK2_ATKMM atkmm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++CONFIG_INCLUDE_DIR sigc++config.h) _GTK2_FIND_LIBRARY (GTK2_ATKMM atkmm true true)
_GTK2_FIND_LIBRARY (GTK2_SIGC++_LIBRARY sigc true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMM glibmm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMMCONFIG glibmmconfig.h)
_GTK2_FIND_LIBRARY (GTK2_GLIBMM glibmm true true)
_GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++ sigc++/sigc++.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++CONFIG sigc++config.h)
_GTK2_FIND_LIBRARY (GTK2_SIGC++ sigc true true)
elseif(_GTK2_component STREQUAL "glade") elseif(_GTK2_component STREQUAL "glade")
_GTK2_FIND_INCLUDE_DIR(GTK2_GLADE_INCLUDE_DIR glade/glade.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GLADE glade/glade.h)
_GTK2_FIND_LIBRARY (GTK2_GLADE_LIBRARY glade false true) _GTK2_FIND_LIBRARY (GTK2_GLADE glade false true)
elseif(_GTK2_component STREQUAL "glademm") elseif(_GTK2_component STREQUAL "glademm")
_GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMM_INCLUDE_DIR libglademm.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMM libglademm.h)
_GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMMCONFIG_INCLUDE_DIR libglademmconfig.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMMCONFIG libglademmconfig.h)
_GTK2_FIND_LIBRARY (GTK2_GLADEMM_LIBRARY glademm true true) _GTK2_FIND_LIBRARY (GTK2_GLADEMM glademm true true)
else() else()
message(FATAL_ERROR "Unknown GTK2 component ${_component}") message(FATAL_ERROR "Unknown GTK2 component ${_component}")
@ -538,6 +561,20 @@ if(NOT GTK2_FIND_VERSION AND GTK2_GTK_INCLUDE_DIR)
set(GTK2_VERSION ${GTK2_MAJOR_VERSION}.${GTK2_MINOR_VERSION}.${GTK2_PATCH_VERSION}) set(GTK2_VERSION ${GTK2_MAJOR_VERSION}.${GTK2_MINOR_VERSION}.${GTK2_PATCH_VERSION})
endif() endif()
#
# On MSVC, according to https://wiki.gnome.org/gtkmm/MSWindows, the /vd2 flag needs to be
# passed to the compiler in order to use gtkmm
#
if(MSVC)
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
if(_GTK2_component STREQUAL "gtkmm")
set(GTK2_DEFINITIONS "/vd2")
elseif(_GTK2_component STREQUAL "glademm")
set(GTK2_DEFINITIONS "/vd2")
endif()
endforeach()
endif()
# #
# Try to enforce components # Try to enforce components
# #
@ -606,6 +643,7 @@ else()
set(GTK2_VERSION_PATCH) set(GTK2_VERSION_PATCH)
set(GTK2_INCLUDE_DIRS) set(GTK2_INCLUDE_DIRS)
set(GTK2_LIBRARIES) set(GTK2_LIBRARIES)
set(GTK2_DEFINITIONS)
endif() endif()
if(GTK2_INCLUDE_DIRS) if(GTK2_INCLUDE_DIRS)

@ -289,27 +289,13 @@ if( NOT HDF5_FOUND )
ENV HDF5_ROOT ENV HDF5_ROOT
PATH_SUFFIXES lib Lib ) PATH_SUFFIXES lib Lib )
select_library_configurations( HDF5_${LIB} ) select_library_configurations( HDF5_${LIB} )
# even though we adjusted the individual library names in list(APPEND HDF5_${LANGUAGE}_LIBRARIES ${HDF5_${LIB}_LIBRARY})
# select_library_configurations, we still need to distinguish
# between debug and release variants because HDF5_LIBRARIES will
# need to specify different lists for debug and optimized builds.
# We can't just use the HDF5_${LIB}_LIBRARY variable (which was set
# up by the selection macro above) because it may specify debug and
# optimized variants for a particular library, but a list of
# libraries is allowed to specify debug and optimized only once.
list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG
${HDF5_${LIB}_LIBRARY_DEBUG} )
list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE
${HDF5_${LIB}_LIBRARY_RELEASE} )
endforeach() endforeach()
list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} ) list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
# Append the libraries for this language binding to the list of all # Append the libraries for this language binding to the list of all
# required libraries. # required libraries.
list( APPEND HDF5_LIBRARIES_DEBUG list(APPEND HDF5_LIBRARIES ${HDF5_${LANGUAGE}_LIBRARIES})
${HDF5_${LANGUAGE}_LIBRARIES_DEBUG} )
list( APPEND HDF5_LIBRARIES_RELEASE
${HDF5_${LANGUAGE}_LIBRARIES_RELEASE} )
endforeach() endforeach()
# We may have picked up some duplicates in various lists during the above # We may have picked up some duplicates in various lists during the above
@ -329,30 +315,10 @@ if( NOT HDF5_FOUND )
if( HDF5_INCLUDE_DIRS ) if( HDF5_INCLUDE_DIRS )
_remove_duplicates_from_beginning( HDF5_INCLUDE_DIRS ) _remove_duplicates_from_beginning( HDF5_INCLUDE_DIRS )
endif() endif()
if( HDF5_LIBRARIES_DEBUG )
_remove_duplicates_from_beginning( HDF5_LIBRARIES_DEBUG )
endif()
if( HDF5_LIBRARIES_RELEASE )
_remove_duplicates_from_beginning( HDF5_LIBRARIES_RELEASE )
endif()
if( HDF5_LIBRARY_DIRS ) if( HDF5_LIBRARY_DIRS )
_remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS ) _remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS )
endif() endif()
# Construct the complete list of HDF5 libraries with debug and optimized
# variants when the generator supports them.
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
set( HDF5_LIBRARIES )
foreach( _lib ${HDF5_LIBRARIES_DEBUG} )
list( APPEND HDF5_LIBRARIES debug ${_lib} )
endforeach()
foreach( _lib ${HDF5_LIBRARIES_RELEASE} )
list( APPEND HDF5_LIBRARIES optimized ${_lib} )
endforeach()
else()
set( HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE} )
endif()
# If the HDF5 include directory was found, open H5pubconf.h to determine if # If the HDF5 include directory was found, open H5pubconf.h to determine if
# HDF5 was compiled with parallel IO support # HDF5 was compiled with parallel IO support
set( HDF5_IS_PARALLEL FALSE ) set( HDF5_IS_PARALLEL FALSE )

@ -17,7 +17,7 @@
# #
# USE_ITK_FILE - The full path to the UseITK.cmake file. # USE_ITK_FILE - The full path to the UseITK.cmake file.
# This is provided for backward # This is provided for backward
# compatability. Use ITK_USE_FILE # compatibility. Use ITK_USE_FILE
# instead. # instead.
#============================================================================= #=============================================================================
@ -52,6 +52,6 @@ if(NOT ITK_FOUND)
endif() endif()
if(ITK_FOUND) if(ITK_FOUND)
# Set USE_ITK_FILE for backward-compatability. # Set USE_ITK_FILE for backward-compatibility.
set(USE_ITK_FILE ${ITK_USE_FILE}) set(USE_ITK_FILE ${ITK_USE_FILE})
endif() endif()

@ -81,7 +81,7 @@ function(FIND_IMAGEMAGICK_API component header)
${ImageMagick_INCLUDE_DIRS} ${ImageMagick_INCLUDE_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
PATH_SUFFIXES PATH_SUFFIXES
ImageMagick ImageMagick ImageMagick-6
DOC "Path to the ImageMagick include dir." DOC "Path to the ImageMagick include dir."
) )
find_library(ImageMagick_${component}_LIBRARY find_library(ImageMagick_${component}_LIBRARY
@ -147,17 +147,17 @@ foreach(component ${ImageMagick_FIND_COMPONENTS}
) )
if(component STREQUAL "Magick++") if(component STREQUAL "Magick++")
FIND_IMAGEMAGICK_API(Magick++ Magick++.h FIND_IMAGEMAGICK_API(Magick++ Magick++.h
Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8 Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8 Magick++-6.Q16HDRI Magick++-Q16HDRI Magick++-6.Q8HDRI Magick++-Q8HDRI
) )
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY) list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
elseif(component STREQUAL "MagickWand") elseif(component STREQUAL "MagickWand")
FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h
Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 MagickWand-6.Q16HDRI MagickWand-Q16HDRI MagickWand-6.Q8HDRI MagickWand-Q8HDRI
) )
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY) list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
elseif(component STREQUAL "MagickCore") elseif(component STREQUAL "MagickCore")
FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 MagickCore-6.Q16HDRI MagickCore-Q16HDRI MagickCore-6.Q8HDRI MagickCore-Q8HDRI
) )
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY) list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
else() else()

@ -86,7 +86,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/GetPrerequisites.cmake)
# #
# The compilers are detected in this order: # The compilers are detected in this order:
# #
# 1. Try to find the most generic availble MPI compiler, as this is usually set up by # 1. Try to find the most generic available MPI compiler, as this is usually set up by
# cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's # cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's
# the right compiler. # the right compiler.
# #

@ -28,16 +28,18 @@
# (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.)
if (WIN32) set(_OpenGL_REQUIRED_VARS OPENGL_gl_LIBRARY)
if (CYGWIN) if (CYGWIN)
find_path(OPENGL_INCLUDE_DIR GL/gl.h ) find_path(OPENGL_INCLUDE_DIR GL/gl.h )
list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR)
find_library(OPENGL_gl_LIBRARY opengl32 ) find_library(OPENGL_gl_LIBRARY opengl32 )
find_library(OPENGL_glu_LIBRARY glu32 ) find_library(OPENGL_glu_LIBRARY glu32 )
else () elseif (WIN32)
if(BORLAND) if(BORLAND)
set (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32") set (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32")
@ -47,15 +49,12 @@ if (WIN32)
set (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32") set (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32")
endif() endif()
endif () elseif (APPLE)
else ()
if (APPLE)
find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX") find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX")
find_library(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX") find_library(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX")
find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX") find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX")
list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR)
else() else()
if (CMAKE_SYSTEM_NAME MATCHES "HP-UX") if (CMAKE_SYSTEM_NAME MATCHES "HP-UX")
@ -90,6 +89,7 @@ else ()
/opt/graphics/OpenGL/include /usr/X11R6/include /opt/graphics/OpenGL/include /usr/X11R6/include
${_OPENGL_INCLUDE_PATH} ${_OPENGL_INCLUDE_PATH}
) )
list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR)
find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
/usr/share/doc/NVIDIA_GLX-1.0/include /usr/share/doc/NVIDIA_GLX-1.0/include
@ -111,18 +111,15 @@ else ()
# On Unix OpenGL most certainly always requires X11. # On Unix OpenGL most certainly always requires X11.
# Feel free to tighten up these conditions if you don't # Feel free to tighten up these conditions if you don't
# think this is always true. # think this is always true.
# It's not true on OSX.
if (OPENGL_gl_LIBRARY) if (OPENGL_gl_LIBRARY)
if(NOT X11_FOUND) if(NOT X11_FOUND)
include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake) include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake)
endif() endif()
if (X11_FOUND) if (X11_FOUND)
if (NOT APPLE)
set (OPENGL_LIBRARIES ${X11_LIBRARIES}) set (OPENGL_LIBRARIES ${X11_LIBRARIES})
endif () endif ()
endif () endif ()
endif ()
find_library(OPENGL_glu_LIBRARY find_library(OPENGL_glu_LIBRARY
NAMES GLU MesaGLU NAMES GLU MesaGLU
@ -133,7 +130,6 @@ else ()
) )
endif () endif ()
endif ()
if(OPENGL_gl_LIBRARY) if(OPENGL_gl_LIBRARY)
@ -162,7 +158,8 @@ set(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
# handle the QUIETLY and REQUIRED arguments and set OPENGL_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set OPENGL_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL DEFAULT_MSG OPENGL_gl_LIBRARY) FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS})
unset(_OpenGL_REQUIRED_VARS)
mark_as_advanced( mark_as_advanced(
OPENGL_INCLUDE_DIR OPENGL_INCLUDE_DIR

@ -140,10 +140,10 @@ if(WIN32 AND NOT CYGWIN)
set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
elseif(MINGW) elseif(MINGW)
# same player, for MingW # same player, for MinGW
set(LIB_EAY_NAMES libeay32) set(LIB_EAY_NAMES libeay32)
set(SSL_EAY_NAMES ssleay32) set(SSL_EAY_NAMES ssleay32)
if(CMAKE_CROSS_COMPILING) if(CMAKE_CROSSCOMPILING)
list(APPEND LIB_EAY_NAMES crypto) list(APPEND LIB_EAY_NAMES crypto)
list(APPEND SSL_EAY_NAMES ssl) list(APPEND SSL_EAY_NAMES ssl)
endif() endif()

@ -38,8 +38,42 @@ if(ZLIB_FOUND)
/usr/local/include/libpng # OpenBSD /usr/local/include/libpng # OpenBSD
) )
set(PNG_NAMES ${PNG_NAMES} png libpng png15 libpng15 png15d libpng15d png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d) list(APPEND PNG_NAMES png libpng)
find_library(PNG_LIBRARY NAMES ${PNG_NAMES} ) unset(PNG_NAMES_DEBUG)
set(_PNG_VERSION_SUFFIXES 17 16 15 14 12)
if (PNG_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\..*)?$")
string(REGEX REPLACE
"^([0-9]+)\\.([0-9]+).*" "\\1\\2"
_PNG_VERSION_SUFFIX_MIN "${PNG_FIND_VERSION}")
if (PNG_FIND_VERSION_EXACT)
set(_PNG_VERSION_SUFFIXES ${_PNG_VERSION_SUFFIX_MIN})
else ()
string(REGEX REPLACE
"${_PNG_VERSION_SUFFIX_MIN}.*" "${_PNG_VERSION_SUFFIX_MIN}"
_PNG_VERSION_SUFFIXES "${_PNG_VERSION_SUFFIXES}")
endif ()
unset(_PNG_VERSION_SUFFIX_MIN)
endif ()
foreach(v IN LISTS _PNG_VERSION_SUFFIXES)
list(APPEND PNG_NAMES png${v} libpng${v})
list(APPEND PNG_NAMES_DEBUG png${v}d libpng${v}d)
endforeach()
unset(_PNG_VERSION_SUFFIXES)
# For compatiblity with versions prior to this multi-config search, honor
# any PNG_LIBRARY that is already specified and skip the search.
if(NOT PNG_LIBRARY)
find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
select_library_configurations(PNG)
mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
endif()
unset(PNG_NAMES)
unset(PNG_NAMES_DEBUG)
# Set by select_library_configurations(), but we want the one from
# find_package_handle_standard_args() below.
unset(PNG_FOUND)
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
# png.h includes zlib.h. Sigh. # png.h includes zlib.h. Sigh.

@ -156,6 +156,16 @@ function(_protobuf_find_libraries name filename)
endif() endif()
endfunction() endfunction()
# Internal function: find threads library
function(_protobuf_find_threads)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads)
if(Threads_FOUND)
list(APPEND PROTOBUF_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
set(PROTOBUF_LIBRARIES "${PROTOBUF_LIBRARIES}" PARENT_SCOPE)
endif()
endfunction()
# #
# Main. # Main.
# #
@ -190,6 +200,9 @@ if(MSVC)
set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES}") set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES}")
endif() endif()
if(UNIX)
_protobuf_find_threads()
endif()
# Find the include directory # Find the include directory
find_path(PROTOBUF_INCLUDE_DIR find_path(PROTOBUF_INCLUDE_DIR

@ -100,6 +100,7 @@
# because you need a custom filename for the moc file or something similar. # because you need a custom filename for the moc file or something similar.
# #
# macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... ) # macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
# The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.
# This macro is still experimental. # This macro is still experimental.
# It can be used to have moc automatically handled. # It can be used to have moc automatically handled.
# So if you have the files foo.h and foo.cpp, and in foo.h a # So if you have the files foo.h and foo.cpp, and in foo.h a
@ -115,7 +116,7 @@
# You should have a look on the AUTOMOC property for targets to achieve the same results. # You should have a look on the AUTOMOC property for targets to achieve the same results.
# #
# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) # macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
# Create a the interface header and implementation files with the # Create the interface header and implementation files with the
# given basename from the given interface xml file and add it to # given basename from the given interface xml file and add it to
# the list of sources. # the list of sources.
# #
@ -171,9 +172,10 @@
# in: ts_files # in: ts_files
# generates commands to create .qm from .ts - files. The generated # generates commands to create .qm from .ts - files. The generated
# filenames can be found in qm_files. The ts_files # filenames can be found in qm_files. The ts_files
# must exists and are not updated in any way. # must exist and are not updated in any way.
# #
# function QT4_USE_MODULES( target [link_type] modules...) # function QT4_USE_MODULES( target [link_type] modules...)
# This function is obsolete. Use target_link_libraries with IMPORTED targets instead.
# Make <target> use the <modules> from Qt. Using a Qt module means # Make <target> use the <modules> from Qt. Using a Qt module means
# to link to the library, add the relevant include directories for the module, # to link to the library, add the relevant include directories for the module,
# and add the relevant compiler defines for using the module. # and add the relevant compiler defines for using the module.
@ -495,7 +497,7 @@ macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
set(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES}) set(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
endif () endif ()
# Make variables changeble to the advanced user # Make variables changeable to the advanced user
mark_as_advanced(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR) mark_as_advanced(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR)
endmacro () endmacro ()
@ -635,10 +637,10 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
) )
endif() endif()
# try dropping a hint if trying to use Visual Studio with Qt built by mingw # try dropping a hint if trying to use Visual Studio with Qt built by MinGW
if(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC) if(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
if(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a) if(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
message( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw. Those compilers do not produce code compatible with each other.") message( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by MinGW. Those compilers do not produce code compatible with each other.")
endif() endif()
endif() endif()
@ -657,8 +659,11 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
message(WARNING "${QT_QMAKE_EXECUTABLE} reported QT_INSTALL_LIBS as \"${QT_LIBRARY_DIR_TMP}\" " message(WARNING "${QT_QMAKE_EXECUTABLE} reported QT_INSTALL_LIBS as \"${QT_LIBRARY_DIR_TMP}\" "
"but QtCore could not be found there. " "but QtCore could not be found there. "
"Qt is NOT installed correctly for the target build environment.") "Qt is NOT installed correctly for the target build environment.")
set(Qt4_FOUND FALSE)
if(Qt4_FIND_REQUIRED) if(Qt4_FIND_REQUIRED)
message( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.") message( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
else()
return()
endif() endif()
endif() endif()
@ -771,7 +776,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endif() endif()
endif () endif ()
# Make variables changeble to the advanced user # Make variables changeable to the advanced user
mark_as_advanced( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR mark_as_advanced( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR
QT_PLUGINS_DIR QT_TRANSLATIONS_DIR) QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
@ -881,21 +886,17 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endforeach() endforeach()
if(Q_WS_WIN) if(Q_WS_WIN)
if (QT_QAXCONTAINER_FOUND) set(QT_MODULES ${QT_MODULES} QAxContainer QAxServer)
set(QT_MODULES ${QT_MODULES} QAxContainer)
# Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
find_path(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt find_path(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
PATHS ${QT_HEADERS_DIR}/ActiveQt PATHS ${QT_HEADERS_DIR}/ActiveQt
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
) )
endif()
if (QT_QAXSERVER_FOUND)
find_path(QT_QAXSERVER_INCLUDE_DIR ActiveQt find_path(QT_QAXSERVER_INCLUDE_DIR ActiveQt
PATHS ${QT_HEADERS_DIR}/ActiveQt PATHS ${QT_HEADERS_DIR}/ActiveQt
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
) )
endif() endif()
endif()
# Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
find_path(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents find_path(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
@ -1011,6 +1012,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
macro(_qt4_add_target_depends _QT_MODULE) macro(_qt4_add_target_depends _QT_MODULE)
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS) get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
_qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN})
foreach(_config ${_configs}) foreach(_config ${_configs})
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN}) _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
endforeach() endforeach()
@ -1055,8 +1057,8 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
if(Q_WS_WIN) if(Q_WS_WIN)
_QT4_ADJUST_LIB_VARS(qtmain) _QT4_ADJUST_LIB_VARS(qtmain)
if(QT_QAXSERVER_FOUND)
_QT4_ADJUST_LIB_VARS(QAxServer) _QT4_ADJUST_LIB_VARS(QAxServer)
if(QT_QAXSERVER_FOUND)
set_property(TARGET Qt4::QAxServer PROPERTY set_property(TARGET Qt4::QAxServer PROPERTY
INTERFACE_QT4_NO_LINK_QTMAIN ON INTERFACE_QT4_NO_LINK_QTMAIN ON
) )
@ -1064,10 +1066,8 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
COMPATIBLE_INTERFACE_BOOL QT4_NO_LINK_QTMAIN) COMPATIBLE_INTERFACE_BOOL QT4_NO_LINK_QTMAIN)
endif() endif()
if(QT_QAXCONTAINER_FOUND)
_QT4_ADJUST_LIB_VARS(QAxContainer) _QT4_ADJUST_LIB_VARS(QAxContainer)
endif() endif()
endif()
# Only public dependencies are listed here. # Only public dependencies are listed here.
# Eg, QtDBus links to QtXml, but users of QtDBus do not need to # Eg, QtDBus links to QtXml, but users of QtDBus do not need to
@ -1117,6 +1117,10 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:QT4_NO_LINK_QTMAIN>>>) set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:QT4_NO_LINK_QTMAIN>>>)
set(_isPolicyNEW $<TARGET_POLICY:CMP0020>) set(_isPolicyNEW $<TARGET_POLICY:CMP0020>)
get_target_property(_configs Qt4::QtCore IMPORTED_CONFIGURATIONS) get_target_property(_configs Qt4::QtCore IMPORTED_CONFIGURATIONS)
set_property(TARGET Qt4::QtCore APPEND PROPERTY
INTERFACE_LINK_LIBRARIES
$<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt4::qtmain>
)
foreach(_config ${_configs}) foreach(_config ${_configs})
set_property(TARGET Qt4::QtCore APPEND PROPERTY set_property(TARGET Qt4::QtCore APPEND PROPERTY
IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config}

@ -172,6 +172,8 @@ set(TCLTK_POSSIBLE_INCLUDE_PATHS
/usr/include/tcl8.3 /usr/include/tcl8.3
/usr/include/tcl8.2 /usr/include/tcl8.2
/usr/include/tcl8.0 /usr/include/tcl8.0
/usr/local/include/tcl8.6
/usr/local/include/tk8.6
/usr/local/include/tcl8.5 /usr/local/include/tcl8.5
/usr/local/include/tk8.5 /usr/local/include/tk8.5
/usr/local/include/tcl8.4 /usr/local/include/tcl8.4

@ -93,7 +93,7 @@ else()
COMPILE_OUTPUT_VARIABLE OUTPUT) COMPILE_OUTPUT_VARIABLE OUTPUT)
if(THREADS_HAVE_PTHREAD_ARG) if(THREADS_HAVE_PTHREAD_ARG)
if(THREADS_PTHREAD_ARG MATCHES "^2$") if(THREADS_PTHREAD_ARG STREQUAL "2")
set(Threads_FOUND TRUE) set(Threads_FOUND TRUE)
message(STATUS "Check if compiler accepts -pthread - yes") message(STATUS "Check if compiler accepts -pthread - yes")
else() else()

@ -51,7 +51,7 @@ if("${VTK_FIND_VERSION}" VERSION_LESS 4.1)
endif() endif()
endif() endif()
# Construct consitent error messages for use below. # Construct consistent error messages for use below.
set(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation.") set(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation.")
if(_VTK_40_ALLOW) if(_VTK_40_ALLOW)
set(VTK_DIR_DESCRIPTION "${VTK_DIR_DESCRIPTION} For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.") set(VTK_DIR_DESCRIPTION "${VTK_DIR_DESCRIPTION} For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.")
@ -127,7 +127,7 @@ endif()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
if(VTK_FOUND) if(VTK_FOUND)
# Set USE_VTK_FILE for backward-compatability. # Set USE_VTK_FILE for backward-compatibility.
set(USE_VTK_FILE ${VTK_USE_FILE}) set(USE_VTK_FILE ${VTK_USE_FILE})
else() else()
# VTK not found, explain to the user how to specify its location. # VTK not found, explain to the user how to specify its location.

@ -68,6 +68,7 @@ if (UNIX)
/usr/openwin/include /usr/openwin/include
/usr/openwin/share/include /usr/openwin/share/include
/opt/graphics/OpenGL/include /opt/graphics/OpenGL/include
/opt/X11/include
) )
set(X11_LIB_SEARCH_PATH set(X11_LIB_SEARCH_PATH
@ -75,6 +76,7 @@ if (UNIX)
/usr/X11R6/lib /usr/X11R6/lib
/usr/X11R7/lib /usr/X11R7/lib
/usr/openwin/lib /usr/openwin/lib
/opt/X11/lib
) )
find_path(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH}) find_path(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH})

@ -53,7 +53,7 @@ if(XMLRPC_FOUND)
endif() endif()
# Parse the include flags. # Parse the include flags.
if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0")
# Convert the compile flags to a CMake list. # Convert the compile flags to a CMake list.
string(REGEX REPLACE " +" ";" string(REGEX REPLACE " +" ";"
XMLRPC_C_CONFIG_CFLAGS "${XMLRPC_C_CONFIG_CFLAGS}") XMLRPC_C_CONFIG_CFLAGS "${XMLRPC_C_CONFIG_CFLAGS}")
@ -91,7 +91,7 @@ if(XMLRPC_FOUND)
endif() endif()
# Parse the library names and directories. # Parse the library names and directories.
if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0")
string(REGEX REPLACE " +" ";" string(REGEX REPLACE " +" ";"
XMLRPC_C_CONFIG_LIBS "${XMLRPC_C_CONFIG_LIBS}") XMLRPC_C_CONFIG_LIBS "${XMLRPC_C_CONFIG_LIBS}")

@ -458,7 +458,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
wxWidgets-2.5.2 wxWidgets-2.5.2
wxWidgets-2.5.1 wxWidgets-2.5.1
wxWidgets wxWidgets
DOC "wxWidgets base/installation directory?" DOC "wxWidgets base/installation directory"
) )
# If wxWidgets_ROOT_DIR changed, clear lib dir. # If wxWidgets_ROOT_DIR changed, clear lib dir.
@ -492,7 +492,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
PATHS PATHS
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib
DOC "Path to wxWidgets libraries?" DOC "Path to wxWidgets libraries"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
else() else()
@ -509,7 +509,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
PATHS PATHS
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll
DOC "Path to wxWidgets libraries?" DOC "Path to wxWidgets libraries"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
endif() endif()
@ -703,6 +703,7 @@ else()
#----------------------------------------------------------------- #-----------------------------------------------------------------
# Support cross-compiling, only search in the target platform. # Support cross-compiling, only search in the target platform.
find_program(wxWidgets_CONFIG_EXECUTABLE wx-config find_program(wxWidgets_CONFIG_EXECUTABLE wx-config
DOC "Location of wxWidgets library configuration provider binary (wx-config)."
ONLY_CMAKE_FIND_ROOT_PATH ONLY_CMAKE_FIND_ROOT_PATH
) )
@ -843,6 +844,7 @@ set(wxWidgets_FOUND ${WXWIDGETS_FOUND})
# Resource file compiler. # Resource file compiler.
find_program(wxWidgets_wxrc_EXECUTABLE wxrc find_program(wxWidgets_wxrc_EXECUTABLE wxrc
${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw
DOC "Location of wxWidgets resource file compiler binary (wxrc)"
) )
# #

@ -321,7 +321,7 @@ if(WIN32_STYLE_FIND)
rpcrt4 rpcrt4
wsock32 wsock32
) )
## HACK: feed in to optimized / debug libaries if both were FOUND. ## HACK: feed in to optimized / debug libraries if both were FOUND.
set(WXWINDOWS_STATIC_DEBUG_LIBS ${WXWINDOWS_STATIC_DEBUG_LIBS} set(WXWINDOWS_STATIC_DEBUG_LIBS ${WXWINDOWS_STATIC_DEBUG_LIBS}
wxbase26d wxbase26d
wxbase26d_net wxbase26d_net
@ -354,7 +354,7 @@ if(WIN32_STYLE_FIND)
## ##
## if there is at least one shared lib available ## if there is at least one shared lib available
## let user choose wether to use shared or static wxwindows libs ## let user choose whether to use shared or static wxwindows libs
if(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY) if(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
## default value OFF because wxWindows MSVS default build is static ## default value OFF because wxWindows MSVS default build is static
option(WXWINDOWS_USE_SHARED_LIBS option(WXWINDOWS_USE_SHARED_LIBS
@ -606,7 +606,7 @@ else()
../wx/bin ../wx/bin
../../wx/bin ) ../../wx/bin )
# check wether wx-config was found: # check whether wx-config was found:
if(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE) if(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
# use shared/static wx lib? # use shared/static wx lib?

@ -267,6 +267,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
if(_GEH_EXPORT_MACRO_NAME) if(_GEH_EXPORT_MACRO_NAME)
set(EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_EXPORT_MACRO_NAME}) set(EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_EXPORT_MACRO_NAME})
endif() endif()
string(MAKE_C_IDENTIFIER ${EXPORT_MACRO_NAME} EXPORT_MACRO_NAME)
if(_GEH_EXPORT_FILE_NAME) if(_GEH_EXPORT_FILE_NAME)
if(IS_ABSOLUTE ${_GEH_EXPORT_FILE_NAME}) if(IS_ABSOLUTE ${_GEH_EXPORT_FILE_NAME})
set(EXPORT_FILE_NAME ${_GEH_EXPORT_FILE_NAME}) set(EXPORT_FILE_NAME ${_GEH_EXPORT_FILE_NAME})
@ -277,12 +278,15 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
if(_GEH_DEPRECATED_MACRO_NAME) if(_GEH_DEPRECATED_MACRO_NAME)
set(DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_DEPRECATED_MACRO_NAME}) set(DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_DEPRECATED_MACRO_NAME})
endif() endif()
string(MAKE_C_IDENTIFIER ${DEPRECATED_MACRO_NAME} DEPRECATED_MACRO_NAME)
if(_GEH_NO_EXPORT_MACRO_NAME) if(_GEH_NO_EXPORT_MACRO_NAME)
set(NO_EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_EXPORT_MACRO_NAME}) set(NO_EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_EXPORT_MACRO_NAME})
endif() endif()
string(MAKE_C_IDENTIFIER ${NO_EXPORT_MACRO_NAME} NO_EXPORT_MACRO_NAME)
if(_GEH_STATIC_DEFINE) if(_GEH_STATIC_DEFINE)
set(STATIC_DEFINE ${_GEH_PREFIX_NAME}${_GEH_STATIC_DEFINE}) set(STATIC_DEFINE ${_GEH_PREFIX_NAME}${_GEH_STATIC_DEFINE})
endif() endif()
string(MAKE_C_IDENTIFIER ${STATIC_DEFINE} STATIC_DEFINE)
if(_GEH_DEFINE_NO_DEPRECATED) if(_GEH_DEFINE_NO_DEPRECATED)
set(DEFINE_NO_DEPRECATED TRUE) set(DEFINE_NO_DEPRECATED TRUE)
@ -292,6 +296,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
set(NO_DEPRECATED_MACRO_NAME set(NO_DEPRECATED_MACRO_NAME
${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME}) ${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME})
endif() endif()
string(MAKE_C_IDENTIFIER ${NO_DEPRECATED_MACRO_NAME} NO_DEPRECATED_MACRO_NAME)
set(INCLUDE_GUARD_NAME "${EXPORT_MACRO_NAME}_H") set(INCLUDE_GUARD_NAME "${EXPORT_MACRO_NAME}_H")
@ -300,6 +305,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
if(NOT EXPORT_IMPORT_CONDITION) if(NOT EXPORT_IMPORT_CONDITION)
set(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY}_EXPORTS) set(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY}_EXPORTS)
endif() endif()
string(MAKE_C_IDENTIFIER ${EXPORT_IMPORT_CONDITION} EXPORT_IMPORT_CONDITION)
configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in" configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in"
"${EXPORT_FILE_NAME}" @ONLY) "${EXPORT_FILE_NAME}" @ONLY)
@ -307,11 +313,9 @@ endmacro()
function(GENERATE_EXPORT_HEADER TARGET_LIBRARY) function(GENERATE_EXPORT_HEADER TARGET_LIBRARY)
get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE) get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
if(${type} STREQUAL "MODULE") if(NOT ${type} STREQUAL "STATIC_LIBRARY"
message(WARNING "This macro should not be used with libraries of type MODULE") AND NOT ${type} STREQUAL "SHARED_LIBRARY"
return() AND NOT ${type} STREQUAL "MODULE_LIBRARY")
endif()
if(NOT ${type} STREQUAL "STATIC_LIBRARY" AND NOT ${type} STREQUAL "SHARED_LIBRARY")
message(WARNING "This macro can only be used with libraries") message(WARNING "This macro can only be used with libraries")
return() return()
endif() endif()

@ -635,7 +635,6 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
set(gp_regex_fallback "") set(gp_regex_fallback "")
set(gp_regex_cmp_count 1) set(gp_regex_cmp_count 1)
set(gp_tool_known 1) set(gp_tool_known 1)
set(ENV{VS_UNICODE_OUTPUT} "") # Block extra output from inside VS IDE.
endif() endif()
if("${gp_tool}" STREQUAL "objdump") if("${gp_tool}" STREQUAL "objdump")

@ -916,7 +916,9 @@ Function .onInit
;Run the uninstaller ;Run the uninstaller
uninst: uninst:
ClearErrors ClearErrors
ExecWait '$0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file StrLen $2 "\Uninstall.exe"
StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path
ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file
IfErrors uninst_failed inst IfErrors uninst_failed inst
uninst_failed: uninst_failed:

@ -1 +1,18 @@
#=============================================================================
# Copyright 2011 Kitware, Inc.
# Copyright 2013 OpenGamma Ltd. <graham@opengamma.com>
#
# 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.)
set(CMAKE_Fortran_VERBOSE_FLAG "-X -v") # Runs gcc under the hood. set(CMAKE_Fortran_VERBOSE_FLAG "-X -v") # Runs gcc under the hood.
set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ")

@ -1,2 +1,19 @@
#=============================================================================
# Copyright 2009 Kitware, Inc.
# Copyright 2013 OpenGamma Ltd. <graham@opengamma.com>
#
# 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.)
include(Platform/Darwin-GNU) include(Platform/Darwin-GNU)
__darwin_compiler_gnu(Fortran) __darwin_compiler_gnu(Fortran)
set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ")

@ -0,0 +1,15 @@
#=============================================================================
# Copyright 2013 OpenGamma Ltd. <graham@opengamma.com>
#
# 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.)
set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ")

@ -1,5 +1,26 @@
#=============================================================================
# Copyright 2010 Kitware, Inc.
# Copyright 2013 OpenGamma Ltd. <graham@opengamma.com>
#
# 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.)
set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood. set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
# Need -fpp explicitly on case-insensitive filesystem. # Need -fpp explicitly on case-insensitive filesystem.
set(CMAKE_Fortran_COMPILE_OBJECT set(CMAKE_Fortran_COMPILE_OBJECT
"<CMAKE_Fortran_COMPILER> -fpp -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>") "<CMAKE_Fortran_COMPILER> -fpp -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-Wl,-compatibility_version -Wl,")
set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-Wl,-current_version -Wl,")
set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-Wl,-shared")
set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-install_name -Wl,")
set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG><TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")

@ -30,6 +30,11 @@ set(CMAKE_SHARED_MODULE_SUFFIX ".so")
set(CMAKE_MODULE_EXISTS 1) set(CMAKE_MODULE_EXISTS 1)
set(CMAKE_DL_LIBS "") set(CMAKE_DL_LIBS "")
# Enable rpath support for 10.5 and greater where it is known to work.
if("${DARWIN_MAJOR_VERSION}" GREATER 8)
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
endif()
set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") 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}")
@ -127,9 +132,25 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
# specially named SDKs. # specially named SDKs.
set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.4 "u") set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.4 "u")
set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.3 ".9") set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.3 ".9")
if(CMAKE_OSX_DEPLOYMENT_TARGET)
set(_CMAKE_OSX_SDKS_VER ${CMAKE_OSX_DEPLOYMENT_TARGET}${_CMAKE_OSX_SDKS_VER_SUFFIX_${CMAKE_OSX_DEPLOYMENT_TARGET}})
set(_CMAKE_OSX_SYSROOT_CHECK "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
if(IS_DIRECTORY "${_CMAKE_OSX_SYSROOT_CHECK}")
set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SYSROOT_CHECK}")
else()
set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
message(WARNING
"CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
"but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
"Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"\n"
"matching the host OS X version."
)
endif()
else()
set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}}) set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
set(_CMAKE_OSX_SYSROOT_DEFAULT set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
"${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk") endif()
else() else()
# Assume developer files are in root (such as Xcode 4.5 command-line tools). # Assume developer files are in root (such as Xcode 4.5 command-line tools).
set(_CMAKE_OSX_SYSROOT_DEFAULT "") set(_CMAKE_OSX_SYSROOT_DEFAULT "")
@ -207,12 +228,8 @@ if("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
"${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress") "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress")
endif() endif()
if(NOT XCODE) # Enable shared library versioning.
# Enable shared library versioning. This flag is not actually referenced
# but the fact that the setting exists will cause the generators to support
# soname computation.
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name")
endif()
# Xcode does not support -isystem yet. # Xcode does not support -isystem yet.
if(XCODE) if(XCODE)
@ -277,6 +294,15 @@ endif()
# set up the default search directories for frameworks # set up the default search directories for frameworks
set(CMAKE_SYSTEM_FRAMEWORK_PATH set(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks ~/Library/Frameworks
)
if(_CMAKE_OSX_SYSROOT_PATH)
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
${_CMAKE_OSX_SYSROOT_PATH}/Library/Frameworks
${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks
${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
)
endif()
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
/Library/Frameworks /Library/Frameworks
/Network/Library/Frameworks /Network/Library/Frameworks
/System/Library/Frameworks) /System/Library/Frameworks)
@ -321,6 +347,12 @@ set(CMAKE_SYSTEM_APPBUNDLE_PATH
unset(_apps_paths) unset(_apps_paths)
include(Platform/UnixPaths) include(Platform/UnixPaths)
if(_CMAKE_OSX_SYSROOT_PATH AND EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${_CMAKE_OSX_SYSROOT_PATH}/usr)
foreach(lang C CXX)
list(APPEND CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
endforeach()
endif()
list(APPEND CMAKE_SYSTEM_PREFIX_PATH list(APPEND CMAKE_SYSTEM_PREFIX_PATH
/sw # Fink /sw # Fink
/opt/local # MacPorts /opt/local # MacPorts

@ -78,23 +78,24 @@ set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_R
macro(__embarcadero_language lang) macro(__embarcadero_language lang)
set(CMAKE_${lang}_COMPILE_OPTIONS_DLL "${_tD}") # Note: This variable is a ';' separated list set(CMAKE_${lang}_COMPILE_OPTIONS_DLL "${_tD}") # Note: This variable is a ';' separated list
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}") # ... while this is a space separated string. set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}") # ... while this is a space separated string.
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1)
# compile a source file into an object file # compile a source file into an object file
# place <DEFINES> outside the response file because Borland refuses # place <DEFINES> outside the response file because Borland refuses
# to parse quotes from the response file. # to parse quotes from the response file.
set(CMAKE_${lang}_COMPILE_OBJECT set(CMAKE_${lang}_COMPILE_OBJECT
"<CMAKE_${lang}_COMPILER> ${_tR} <DEFINES> ${CMAKE_START_TEMP_FILE}-DWIN32 -o<OBJECT> <FLAGS> ${_COMPILE_${lang}} <SOURCE>${CMAKE_END_TEMP_FILE}" "<CMAKE_${lang}_COMPILER> ${_tR} <DEFINES> -DWIN32 -o<OBJECT> <FLAGS> ${_COMPILE_${lang}} <SOURCE>"
) )
set(CMAKE_${lang}_LINK_EXECUTABLE set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> ${_tR} -e<TARGET> ${CMAKE_START_TEMP_FILE}<LINK_FLAGS> <FLAGS> <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}" "<CMAKE_${lang}_COMPILER> ${_tR} -e<TARGET> <LINK_FLAGS> <FLAGS> ${CMAKE_START_TEMP_FILE} <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
# "implib -c -w <TARGET_IMPLIB> <TARGET>" # "implib -c -w <TARGET_IMPLIB> <TARGET>"
) )
# place <DEFINES> outside the response file because Borland refuses # place <DEFINES> outside the response file because Borland refuses
# to parse quotes from the response file. # to parse quotes from the response file.
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
"cpp32 <DEFINES> ${CMAKE_START_TEMP_FILE}-DWIN32 <FLAGS> -o<PREPROCESSED_SOURCE> ${_COMPILE_${lang}} <SOURCE>${CMAKE_END_TEMP_FILE}" "cpp32 <DEFINES> -DWIN32 <FLAGS> -o<PREPROCESSED_SOURCE> ${_COMPILE_${lang}} <SOURCE>"
) )
# Borland >= 5.6 allows -P option for cpp32, <= 5.5 does not # Borland >= 5.6 allows -P option for cpp32, <= 5.5 does not

@ -81,7 +81,7 @@ endif()
macro(__windows_compiler_intel lang) macro(__windows_compiler_intel lang)
set(CMAKE_${lang}_COMPILE_OBJECT set(CMAKE_${lang}_COMPILE_OBJECT
"<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /Fo<OBJECT> <DEFINES> <FLAGS> -c <SOURCE>${CMAKE_END_TEMP_FILE}") "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /Fo<OBJECT> /Fd<OBJECT_DIR>/ <DEFINES> <FLAGS> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
"<CMAKE_${lang}_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <DEFINES> <FLAGS> -E <SOURCE>${CMAKE_END_TEMP_FILE}") "<CMAKE_${lang}_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <DEFINES> <FLAGS> -E <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1) set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1)
@ -91,7 +91,7 @@ macro(__windows_compiler_intel lang)
set(CMAKE_${lang}_CREATE_SHARED_MODULE "${CMAKE_${lang}_CREATE_SHARED_LIBRARY}") set(CMAKE_${lang}_CREATE_SHARED_MODULE "${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link") set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link")
set(CMAKE_${lang}_LINK_EXECUTABLE set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> <OBJECTS> /link /implib:<TARGET_IMPLIB> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") "<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> <OBJECTS> /link /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000${_FLAGS_${lang}}") set(CMAKE_${lang}_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000${_FLAGS_${lang}}")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /RTC1") set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /RTC1")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/DNDEBUG /MD /O1") set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/DNDEBUG /MD /O1")

@ -22,7 +22,7 @@ set(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
set(CMAKE_LINK_LIBRARY_FLAG "") set(CMAKE_LINK_LIBRARY_FLAG "")
set(MSVC 1) set(MSVC 1)
# hack: if a new cmake (which uses CMAKE__LINKER) runs on an old build tree # hack: if a new cmake (which uses CMAKE_LINKER) runs on an old build tree
# (where link was hardcoded) and where CMAKE_LINKER isn't in the cache # (where link was hardcoded) and where CMAKE_LINKER isn't in the cache
# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) # and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
# hardcode CMAKE_LINKER here to link, so it behaves as it did before, Alex # hardcode CMAKE_LINKER here to link, so it behaves as it did before, Alex
@ -52,9 +52,6 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
endif() endif()
if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio") if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
set (CMAKE_NO_BUILD_TYPE 1) set (CMAKE_NO_BUILD_TYPE 1)
set (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
"Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
endif() endif()
# make sure to enable languages after setting configuration types # make sure to enable languages after setting configuration types
@ -127,8 +124,15 @@ endif()
set(CMAKE_BUILD_TYPE_INIT Debug) set(CMAKE_BUILD_TYPE_INIT Debug)
if(WINCE) if(WINCE)
string(TOUPPER "${MSVC_C_ARCHITECTURE_ID}" _MSVC_C_ARCHITECTURE_ID_UPPER) foreach(lang C CXX)
string(TOUPPER "${MSVC_CXX_ARCHITECTURE_ID}" _MSVC_CXX_ARCHITECTURE_ID_UPPER) set(_MSVC_${lang}_ARCHITECTURE_FAMILY "${MSVC_${lang}_ARCHITECTURE_ID}")
if(_MSVC_${lang}_ARCHITECTURE_FAMILY STREQUAL "THUMB")
set(_MSVC_${lang}_ARCHITECTURE_FAMILY "ARM")
elseif(_MSVC_${lang}_ARCHITECTURE_FAMILY MATCHES "^SH")
set(_MSVC_${lang}_ARCHITECTURE_FAMILY "SHx")
endif()
string(TOUPPER "${_MSVC_${lang}_ARCHITECTURE_FAMILY}" _MSVC_${lang}_ARCHITECTURE_FAMILY_UPPER)
endforeach()
if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)") if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)")
math(EXPR _CE_VERSION "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}") math(EXPR _CE_VERSION "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}")
@ -139,13 +143,17 @@ if(WINCE)
endif() endif()
set(_PLATFORM_DEFINES "/D_WIN32_WCE=0x${_CE_VERSION} /DUNDER_CE") set(_PLATFORM_DEFINES "/D_WIN32_WCE=0x${_CE_VERSION} /DUNDER_CE")
set(_PLATFORM_DEFINES_C " /D${MSVC_C_ARCHITECTURE_ID} /D_${_MSVC_C_ARCHITECTURE_ID_UPPER}_") set(_PLATFORM_DEFINES_C " /D${_MSVC_C_ARCHITECTURE_FAMILY} /D_${_MSVC_C_ARCHITECTURE_FAMILY_UPPER}_")
set(_PLATFORM_DEFINES_CXX " /D${MSVC_CXX_ARCHITECTURE_ID} /D_${_MSVC_CXX_ARCHITECTURE_ID_UPPER}_") set(_PLATFORM_DEFINES_CXX " /D${_MSVC_CXX_ARCHITECTURE_FAMILY} /D_${_MSVC_CXX_ARCHITECTURE_FAMILY_UPPER}_")
set(_RTC1 "") set(_RTC1 "")
set(_FLAGS_CXX " /GR /EHsc") set(_FLAGS_CXX " /GR /EHsc")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib") set(CMAKE_C_STANDARD_LIBRARIES_INIT "coredll.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib")
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:oldnames.lib") set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:oldnames.lib")
if (MSVC_VERSION LESS 1600)
set(CMAKE_C_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT} corelibc.lib")
endif ()
else() else()
set(_PLATFORM_DEFINES "/DWIN32") set(_PLATFORM_DEFINES "/DWIN32")
@ -174,13 +182,6 @@ set(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
if(NOT _MACHINE_ARCH_FLAG) if(NOT _MACHINE_ARCH_FLAG)
set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID}) set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
endif() endif()
if(WINCE)
if(_MACHINE_ARCH_FLAG MATCHES "ARM")
set(_MACHINE_ARCH_FLAG "THUMB")
elseif(_MACHINE_ARCH_FLAG MATCHES "SH")
set(_MACHINE_ARCH_FLAG "SH4")
endif()
endif()
set (CMAKE_EXE_LINKER_FLAGS_INIT set (CMAKE_EXE_LINKER_FLAGS_INIT
"${CMAKE_EXE_LINKER_FLAGS_INIT} /machine:${_MACHINE_ARCH_FLAG}") "${CMAKE_EXE_LINKER_FLAGS_INIT} /machine:${_MACHINE_ARCH_FLAG}")
@ -231,16 +232,15 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ") set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
set(CMAKE_${lang}_COMPILE_OBJECT set(CMAKE_${lang}_COMPILE_OBJECT
"<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<TARGET_PDB> -c <SOURCE>${CMAKE_END_TEMP_FILE}") "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<OBJECT_DIR>/ -c <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
"<CMAKE_${lang}_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> -E <SOURCE>${CMAKE_END_TEMP_FILE}") "<CMAKE_${lang}_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> -E <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE
"<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /FoNUL /FAs /Fa<ASSEMBLY_SOURCE> /c <SOURCE>${CMAKE_END_TEMP_FILE}") "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /FoNUL /FAs /Fa<ASSEMBLY_SOURCE> /c <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link")
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1) set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1)
set(CMAKE_${lang}_LINK_EXECUTABLE set(CMAKE_${lang}_LINK_EXECUTABLE
"${_CMAKE_VS_LINK_EXE}<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> /Fd<TARGET_PDB> <OBJECTS> /link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") "${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}")

@ -38,8 +38,6 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
endif() endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8") if(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
set (CMAKE_NO_BUILD_TYPE 1) set (CMAKE_NO_BUILD_TYPE 1)
set (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
"Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
endif() endif()
# does the compiler support pdbtype and is it the newer compiler # does the compiler support pdbtype and is it the newer compiler

@ -77,10 +77,12 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${_CMAKE_INSTALL_DIR}")
list(APPEND CMAKE_SYSTEM_PREFIX_PATH list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Project install destination. # Project install destination.
"${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}"
)
if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
# MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set) # MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set)
/ list(APPEND CMAKE_SYSTEM_PREFIX_PATH /)
) endif()
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
) )

@ -21,15 +21,20 @@
###################################### ######################################
macro (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options) macro (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options _qt4_target)
set(${_qt4_files}) set(${_qt4_files})
set(${_qt4_options}) set(${_qt4_options})
set(_QT4_DOING_OPTIONS FALSE) set(_QT4_DOING_OPTIONS FALSE)
set(_QT4_DOING_TARGET FALSE)
foreach(_currentArg ${ARGN}) foreach(_currentArg ${ARGN})
if ("${_currentArg}" STREQUAL "OPTIONS") if ("x${_currentArg}" STREQUAL "xOPTIONS")
set(_QT4_DOING_OPTIONS TRUE) set(_QT4_DOING_OPTIONS TRUE)
elseif ("x${_currentArg}" STREQUAL "xTARGET")
set(_QT4_DOING_TARGET TRUE)
else () else ()
if(_QT4_DOING_OPTIONS) if(_QT4_DOING_TARGET)
set(${_qt4_target} "${_currentArg}")
elseif(_QT4_DOING_OPTIONS)
list(APPEND ${_qt4_options} "${_currentArg}") list(APPEND ${_qt4_options} "${_currentArg}")
else() else()
list(APPEND ${_qt4_files} "${_currentArg}") list(APPEND ${_qt4_files} "${_currentArg}")
@ -92,9 +97,8 @@ endmacro()
# helper macro to set up a moc rule # helper macro to set up a moc rule
macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options) macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target)
# For Windows, create a parameters file to work around command line length limit # For Windows, create a parameters file to work around command line length limit
if (WIN32)
# Pass the parameters in a file. Set the working directory to # Pass the parameters in a file. Set the working directory to
# be that containing the parameters file and reference it by # be that containing the parameters file and reference it by
# just the file name. This is necessary because the moc tool on # just the file name. This is necessary because the moc tool on
@ -108,18 +112,31 @@ macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
set (_moc_parameters_file ${outfile}_parameters) set (_moc_parameters_file ${outfile}_parameters)
set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
file (WRITE ${_moc_parameters_file} "${_moc_parameters}")
if(moc_target)
set(targetincludes "$<TARGET_PROPERTY:${moc_target},INCLUDE_DIRECTORIES>")
set(targetdefines "$<TARGET_PROPERTY:${moc_target},COMPILE_DEFINITIONS>")
set(targetincludes "$<$<BOOL:${targetincludes}>:-I$<JOIN:${targetincludes},\n-I>\n>")
set(targetdefines "$<$<BOOL:${targetdefines}>:-D$<JOIN:${targetdefines},\n-D>\n>")
file (GENERATE
OUTPUT ${_moc_parameters_file}
CONTENT "${targetdefines}${targetincludes}${_moc_parameters}\n"
)
set(targetincludes)
set(targetdefines)
else()
file(WRITE ${_moc_parameters_file} "${_moc_parameters}\n")
endif()
set(_moc_extra_parameters_file @${_moc_parameters_file})
add_custom_command(OUTPUT ${outfile} add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters COMMAND ${QT_MOC_EXECUTABLE} ${_moc_extra_parameters_file}
DEPENDS ${infile} DEPENDS ${infile}
${_moc_working_dir} ${_moc_working_dir}
VERBATIM) VERBATIM)
else ()
add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile}
DEPENDS ${infile} VERBATIM)
endif ()
endmacro () endmacro ()
@ -131,7 +148,11 @@ macro (QT4_GENERATE_MOC infile outfile )
if(NOT IS_ABSOLUTE "${outfile}") if(NOT IS_ABSOLUTE "${outfile}")
set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
endif() endif()
QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "")
if ("x${ARGV2}" STREQUAL "xTARGET")
set(moc_target ${ARGV3})
endif()
QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}")
set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
endmacro () endmacro ()
@ -141,12 +162,12 @@ endmacro ()
macro (QT4_WRAP_CPP outfiles ) macro (QT4_WRAP_CPP outfiles )
# get include dirs # get include dirs
QT4_GET_MOC_FLAGS(moc_flags) QT4_GET_MOC_FLAGS(moc_flags)
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN}) QT4_EXTRACT_OPTIONS(moc_files moc_options moc_target ${ARGN})
foreach (it ${moc_files}) foreach (it ${moc_files})
get_filename_component(it ${it} ABSOLUTE) get_filename_component(it ${it} ABSOLUTE)
QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile) QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile)
QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}") QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}")
set(${outfiles} ${${outfiles}} ${outfile}) set(${outfiles} ${${outfiles}} ${outfile})
endforeach() endforeach()
@ -156,7 +177,7 @@ endmacro ()
# QT4_WRAP_UI(outfiles inputfile ... ) # QT4_WRAP_UI(outfiles inputfile ... )
macro (QT4_WRAP_UI outfiles ) macro (QT4_WRAP_UI outfiles )
QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN}) QT4_EXTRACT_OPTIONS(ui_files ui_options ui_target ${ARGN})
foreach (it ${ui_files}) foreach (it ${ui_files})
get_filename_component(outfile ${it} NAME_WE) get_filename_component(outfile ${it} NAME_WE)
@ -175,7 +196,7 @@ endmacro ()
# QT4_ADD_RESOURCES(outfiles inputfile ... ) # QT4_ADD_RESOURCES(outfiles inputfile ... )
macro (QT4_ADD_RESOURCES outfiles ) macro (QT4_ADD_RESOURCES outfiles )
QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN}) QT4_EXTRACT_OPTIONS(rcc_files rcc_options rcc_target ${ARGN})
foreach (it ${rcc_files}) foreach (it ${rcc_files})
get_filename_component(outfilename ${it} NAME_WE) get_filename_component(outfilename ${it} NAME_WE)
@ -270,7 +291,7 @@ endmacro()
macro(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options ) macro(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN}) QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options _qt4_dbus_target ${ARGN})
get_filename_component(_in_file ${_header} ABSOLUTE) get_filename_component(_in_file ${_header} ABSOLUTE)
get_filename_component(_basename ${_header} NAME_WE) get_filename_component(_basename ${_header} NAME_WE)
@ -333,6 +354,17 @@ endmacro()
macro(QT4_AUTOMOC) macro(QT4_AUTOMOC)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
if(CMAKE_WARN_DEPRECATED)
set(messageType WARNING)
endif()
if(CMAKE_ERROR_DEPRECATED)
set(messageType FATAL_ERROR)
endif()
if(messageType)
message(${messageType} "The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.")
endif()
endif()
QT4_GET_MOC_FLAGS(_moc_INCS) QT4_GET_MOC_FLAGS(_moc_INCS)
set(_matching_FILES ) set(_matching_FILES )
@ -366,7 +398,7 @@ macro(QT4_AUTOMOC)
set(_header ${_abs_PATH}/${_basename}.h) set(_header ${_abs_PATH}/${_basename}.h)
endif() endif()
set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "") QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "" "")
MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
endforeach () endforeach ()
endif() endif()
@ -376,7 +408,7 @@ endmacro()
macro(QT4_CREATE_TRANSLATION _qm_files) macro(QT4_CREATE_TRANSLATION _qm_files)
QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN}) QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options _lupdate_target ${ARGN})
set(_my_sources) set(_my_sources)
set(_my_dirs) set(_my_dirs)
set(_my_tsfiles) set(_my_tsfiles)
@ -443,6 +475,17 @@ macro(QT4_ADD_TRANSLATION _qm_files)
endmacro() endmacro()
function(qt4_use_modules _target _link_type) function(qt4_use_modules _target _link_type)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
if(CMAKE_WARN_DEPRECATED)
set(messageType WARNING)
endif()
if(CMAKE_ERROR_DEPRECATED)
set(messageType FATAL_ERROR)
endif()
if(messageType)
message(${messageType} "The qt4_use_modules function is obsolete. Use target_link_libraries with IMPORTED targets instead.")
endif()
endif()
if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE") if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE")
set(modules ${ARGN}) set(modules ${ARGN})
set(link_type ${_link_type}) set(link_type ${_link_type})

@ -3,16 +3,18 @@
# This macro takes a library base name as an argument, and will choose good # This macro takes a library base name as an argument, and will choose good
# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and # values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and
# basename_LIBRARY_RELEASE depending on what has been found and set. If only # basename_LIBRARY_RELEASE depending on what has been found and set. If only
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG, # basename_LIBRARY_RELEASE is defined, basename_LIBRARY will be set to the
# and basename_LIBRARY_RELEASE will be set to the release value. If only # release value, and basename_LIBRARY_DEBUG will be set to
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY, # basename_LIBRARY_DEBUG-NOTFOUND. If only basename_LIBRARY_DEBUG is defined,
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value. # then basename_LIBRARY will take the debug value, and basename_LIBRARY_RELEASE
# will be set to basename_LIBRARY_RELEASE-NOTFOUND.
# #
# If the generator supports configuration types, then basename_LIBRARY and # If the generator supports configuration types, then basename_LIBRARY and
# basename_LIBRARIES will be set with debug and optimized flags specifying the # basename_LIBRARIES will be set with debug and optimized flags specifying the
# library to be used for the given configuration. If no build type has been set # library to be used for the given configuration. If no build type has been set
# or the generator in use does not support configuration types, then # or the generator in use does not support configuration types, then
# basename_LIBRARY and basename_LIBRARIES will take only the release values. # basename_LIBRARY and basename_LIBRARIES will take only the release value, or
# the debug value if the release one is not set.
#============================================================================= #=============================================================================
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com> # Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
@ -31,37 +33,19 @@
# This macro was adapted from the FindQt4 CMake module and is maintained by Will # This macro was adapted from the FindQt4 CMake module and is maintained by Will
# Dicharry <wdicharry@stellarscience.com>. # Dicharry <wdicharry@stellarscience.com>.
# Utility macro to check if one variable exists while another doesn't, and set
# one that doesn't exist to the one that exists.
macro( _set_library_name basename GOOD BAD )
if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} )
set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} )
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} )
endif()
endmacro()
macro( select_library_configurations basename ) macro( select_library_configurations basename )
# if only the release version was found, set the debug to be the release if(NOT ${basename}_LIBRARY_RELEASE)
# version. set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.")
_set_library_name( ${basename} RELEASE DEBUG ) endif()
# if only the debug version was found, set the release value to be the if(NOT ${basename}_LIBRARY_DEBUG)
# debug value. set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.")
_set_library_name( ${basename} DEBUG RELEASE ) endif()
# Set a default case, which will come into effect if
# -no build type is set and the generator only supports one build type
# at a time (i.e. CMAKE_CONFIGURATION_TYPES is false)
# -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are the same
# -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are both empty
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE ) NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND
( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) )
# if the generator supports configuration types or CMAKE_BUILD_TYPE # if the generator supports configuration types or CMAKE_BUILD_TYPE
# is set, then set optimized and debug options. # is set, then set optimized and debug options.
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
set( ${basename}_LIBRARY "" ) set( ${basename}_LIBRARY "" )
foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE ) foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE )
list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
@ -69,19 +53,21 @@ macro( select_library_configurations basename )
foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG ) foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG )
list( APPEND ${basename}_LIBRARY debug "${_libname}" ) list( APPEND ${basename}_LIBRARY debug "${_libname}" )
endforeach() endforeach()
set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" ) elseif( ${basename}_LIBRARY_RELEASE )
endif() set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
elseif( ${basename}_LIBRARY_DEBUG )
set( ${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG} )
else()
set( ${basename}_LIBRARY "${basename}_LIBRARY-NOTFOUND")
endif() endif()
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
"The ${basename} library" )
if( ${basename}_LIBRARY ) if( ${basename}_LIBRARY )
set( ${basename}_FOUND TRUE ) set( ${basename}_FOUND TRUE )
endif() endif()
mark_as_advanced( ${basename}_LIBRARY mark_as_advanced( ${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG ${basename}_LIBRARY_DEBUG
) )
endmacro() endmacro()

@ -132,10 +132,10 @@ macro(ECOS_ADJUST_DIRECTORY _target_FILES )
endmacro() endmacro()
# the default ecos config file name # the default ecos config file name
# maybe in the future also out-of-source builds may be possible # maybe in future also out-of-source builds may be possible
set(ECOS_CONFIG_FILE ecos.ecc) set(ECOS_CONFIG_FILE ecos.ecc)
#creates the dependancy from all source files on the ecos target.ld, #creates the dependency from all source files on the ecos target.ld,
#adds the command for compiling ecos #adds the command for compiling ecos
macro(ECOS_ADD_TARGET_LIB) macro(ECOS_ADD_TARGET_LIB)
# when building out-of-source, create the ecos/ subdir # when building out-of-source, create the ecos/ subdir

@ -6,6 +6,10 @@
# add_jar(target_name # add_jar(target_name
# [SOURCES] source1 [source2 ...] [resource1 ...] # [SOURCES] source1 [source2 ...] [resource1 ...]
# [INCLUDE_JARS jar1 [jar2 ...]] # [INCLUDE_JARS jar1 [jar2 ...]]
# [ENTRY_POINT entry]
# [VERSION version]
# [OUTPUT_NAME name]
# [OUTPUT_DIR dir]
# ) # )
# #
# This command creates a <target_name>.jar. It compiles the given source files # This command creates a <target_name>.jar. It compiles the given source files
@ -17,6 +21,9 @@
# listed as sources are ignored (as they have been since the first version of # listed as sources are ignored (as they have been since the first version of
# this module). # this module).
# #
# The default OUTPUT_DIR can also be changed by setting the variable
# CMAKE_JAVA_TARGET_OUTPUT_DIR.
#
# Additional instructions: # Additional instructions:
# To add compile flags to the target you can set these flags with # To add compile flags to the target you can set these flags with
# the following variable: # the following variable:
@ -30,32 +37,30 @@
# #
# To use a different output name for the target you can set it with: # To use a different output name for the target you can set it with:
# #
# set(CMAKE_JAVA_TARGET_OUTPUT_NAME shibboleet.jar) # add_jar(foobar foobar.java OUTPUT_NAME shibboleet.jar)
# add_jar(foobar foobar.java)
# #
# To use a different output directory than CMAKE_CURRENT_BINARY_DIR # To use a different output directory than CMAKE_CURRENT_BINARY_DIR
# you can set it with: # you can set it with:
# #
# set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${PROJECT_BINARY_DIR}/bin) # add_jar(foobar foobar.java OUTPUT_DIR ${PROJECT_BINARY_DIR}/bin)
# #
# To define an entry point in your jar you can set it with: # To define an entry point in your jar you can set it with the ENTRY_POINT
# named argument:
# #
# set(CMAKE_JAVA_JAR_ENTRY_POINT com/examples/MyProject/Main) # add_jar(example ENTRY_POINT com/examples/MyProject/Main)
# #
# To add a VERSION to the target output name you can set it using # To add a VERSION to the target output name you can set it using
# CMAKE_JAVA_TARGET_VERSION. This will create a jar file with the name # the VERSION named argument to add_jar. This will create a jar file with the
# shibboleet-1.0.0.jar and will create a symlink shibboleet.jar # name shibboleet-1.0.0.jar and will create a symlink shibboleet.jar
# pointing to the jar with the version information. # pointing to the jar with the version information.
# #
# set(CMAKE_JAVA_TARGET_VERSION 1.2.0) # add_jar(shibboleet shibbotleet.java VERSION 1.2.0)
# add_jar(shibboleet shibbotleet.java)
# #
# If the target is a JNI library, utilize the following commands to # If the target is a JNI library, utilize the following commands to
# create a JNI symbolic link: # create a JNI symbolic link:
# #
# set(CMAKE_JNI_TARGET TRUE) # set(CMAKE_JNI_TARGET TRUE)
# set(CMAKE_JAVA_TARGET_VERSION 1.2.0) # add_jar(shibboleet shibbotleet.java VERSION 1.2.0)
# add_jar(shibboleet shibbotleet.java)
# install_jar(shibboleet ${LIB_INSTALL_DIR}/shibboleet) # install_jar(shibboleet ${LIB_INSTALL_DIR}/shibboleet)
# install_jni_symlink(shibboleet ${JAVA_LIB_INSTALL_DIR}) # install_jni_symlink(shibboleet ${JAVA_LIB_INSTALL_DIR})
# #
@ -185,8 +190,9 @@
# #
#============================================================================= #=============================================================================
# Copyright 2013 OpenGamma Ltd. <graham@opengamma.com>
# Copyright 2010-2011 Andreas schneider <asn@redhat.com> # Copyright 2010-2011 Andreas schneider <asn@redhat.com>
# Copyright 2010 Ben Boeckel <ben.boeckel@kitware.com> # Copyright 2010-2013 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.
@ -216,23 +222,50 @@ set(_JAVA_SYMLINK_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaSymlinks.cmake)
function(add_jar _TARGET_NAME) function(add_jar _TARGET_NAME)
cmake_parse_arguments(_add_jar "" "" "SOURCES;INCLUDE_JARS" ${ARGN}) # In CMake < 2.8.12, add_jar used variables which were set prior to calling
# add_jar for customizing the behavior of add_jar. In order to be backwards
# compatible, check if any of those variables are set, and use them to
# initialize values of the named arguments. (Giving the corresponding named
# argument will override the value set here.)
#
# New features should use named arguments only.
if(DEFINED CMAKE_JAVA_TARGET_VERSION)
set(_add_jar_VERSION "${CMAKE_JAVA_TARGET_VERSION}")
endif()
if(DEFINED CMAKE_JAVA_TARGET_OUTPUT_DIR)
set(_add_jar_OUTPUT_DIR "${CMAKE_JAVA_TARGET_OUTPUT_DIR}")
endif()
if(DEFINED CMAKE_JAVA_TARGET_OUTPUT_NAME)
set(_add_jar_OUTPUT_NAME "${CMAKE_JAVA_TARGET_OUTPUT_NAME}")
# reset
set(CMAKE_JAVA_TARGET_OUTPUT_NAME)
endif()
if(DEFINED CMAKE_JAVA_JAR_ENTRY_POINT)
set(_add_jar_ENTRY_POINT "${CMAKE_JAVA_JAR_ENTRY_POINT}")
endif()
cmake_parse_arguments(_add_jar
""
"VERSION;OUTPUT_DIR;OUTPUT_NAME;ENTRY_POINT"
"SOURCES;INCLUDE_JARS"
${ARGN}
)
set(_JAVA_SOURCE_FILES ${_add_jar_SOURCES} ${_add_jar_UNPARSED_ARGUMENTS}) set(_JAVA_SOURCE_FILES ${_add_jar_SOURCES} ${_add_jar_UNPARSED_ARGUMENTS})
if (NOT DEFINED CMAKE_JAVA_TARGET_OUTPUT_DIR) if (NOT DEFINED _add_jar_OUTPUT_DIR)
set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(_add_jar_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
endif() endif()
if (CMAKE_JAVA_JAR_ENTRY_POINT) if (_add_jar_ENTRY_POINT)
set(_ENTRY_POINT_OPTION e) set(_ENTRY_POINT_OPTION e)
set(_ENTRY_POINT_VALUE ${CMAKE_JAVA_JAR_ENTRY_POINT}) set(_ENTRY_POINT_VALUE ${_add_jar_ENTRY_POINT})
endif () endif ()
if (LIBRARY_OUTPUT_PATH) if (LIBRARY_OUTPUT_PATH)
set(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH}) set(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH})
else () else ()
set(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${CMAKE_JAVA_TARGET_OUTPUT_DIR}) set(CMAKE_JAVA_LIBRARY_OUTPUT_PATH ${_add_jar_OUTPUT_DIR})
endif () endif ()
set(CMAKE_JAVA_INCLUDE_PATH set(CMAKE_JAVA_INCLUDE_PATH
@ -242,7 +275,7 @@ function(add_jar _TARGET_NAME)
${CMAKE_JAVA_LIBRARY_OUTPUT_PATH} ${CMAKE_JAVA_LIBRARY_OUTPUT_PATH}
) )
if (WIN32 AND NOT CYGWIN) if (WIN32 AND NOT CYGWIN AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_JAVA_INCLUDE_FLAG_SEP ";") set(CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
else () else ()
set(CMAKE_JAVA_INCLUDE_FLAG_SEP ":") set(CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
@ -252,20 +285,18 @@ function(add_jar _TARGET_NAME)
set(CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_PATH_FINAL}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${JAVA_INCLUDE_DIR}") set(CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_PATH_FINAL}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${JAVA_INCLUDE_DIR}")
endforeach() endforeach()
set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${CMAKE_JAVA_TARGET_OUTPUT_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir") set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${_add_jar_OUTPUT_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir")
set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}.jar") set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}.jar")
if (CMAKE_JAVA_TARGET_OUTPUT_NAME AND CMAKE_JAVA_TARGET_VERSION) if (_add_jar_OUTPUT_NAME AND _add_jar_VERSION)
set(_JAVA_TARGET_OUTPUT_NAME "${CMAKE_JAVA_TARGET_OUTPUT_NAME}-${CMAKE_JAVA_TARGET_VERSION}.jar") set(_JAVA_TARGET_OUTPUT_NAME "${_add_jar_OUTPUT_NAME}-${_add_jar_VERSION}.jar")
set(_JAVA_TARGET_OUTPUT_LINK "${CMAKE_JAVA_TARGET_OUTPUT_NAME}.jar") set(_JAVA_TARGET_OUTPUT_LINK "${_add_jar_OUTPUT_NAME}.jar")
elseif (CMAKE_JAVA_TARGET_VERSION) elseif (_add_jar_VERSION)
set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}-${CMAKE_JAVA_TARGET_VERSION}.jar") set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}-${_add_jar_VERSION}.jar")
set(_JAVA_TARGET_OUTPUT_LINK "${_TARGET_NAME}.jar") set(_JAVA_TARGET_OUTPUT_LINK "${_TARGET_NAME}.jar")
elseif (CMAKE_JAVA_TARGET_OUTPUT_NAME) elseif (_add_jar_OUTPUT_NAME)
set(_JAVA_TARGET_OUTPUT_NAME "${CMAKE_JAVA_TARGET_OUTPUT_NAME}.jar") set(_JAVA_TARGET_OUTPUT_NAME "${_add_jar_OUTPUT_NAME}.jar")
endif () endif ()
# reset
set(CMAKE_JAVA_TARGET_OUTPUT_NAME)
set(_JAVA_CLASS_FILES) set(_JAVA_CLASS_FILES)
set(_JAVA_COMPILE_FILES) set(_JAVA_COMPILE_FILES)
@ -279,7 +310,7 @@ function(add_jar _TARGET_NAME)
get_filename_component(_JAVA_FULL ${_JAVA_SOURCE_FILE} ABSOLUTE) get_filename_component(_JAVA_FULL ${_JAVA_SOURCE_FILE} ABSOLUTE)
if (_JAVA_EXT MATCHES ".java") if (_JAVA_EXT MATCHES ".java")
file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${CMAKE_JAVA_TARGET_OUTPUT_DIR} ${_JAVA_FULL}) file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${_add_jar_OUTPUT_DIR} ${_JAVA_FULL})
file(RELATIVE_PATH _JAVA_REL_SOURCE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${_JAVA_FULL}) file(RELATIVE_PATH _JAVA_REL_SOURCE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${_JAVA_FULL})
string(LENGTH ${_JAVA_REL_BINARY_PATH} _BIN_LEN) string(LENGTH ${_JAVA_REL_BINARY_PATH} _BIN_LEN)
string(LENGTH ${_JAVA_REL_SOURCE_PATH} _SRC_LEN) string(LENGTH ${_JAVA_REL_SOURCE_PATH} _SRC_LEN)
@ -337,6 +368,11 @@ function(add_jar _TARGET_NAME)
endif() endif()
if (_JAVA_COMPILE_FILES) if (_JAVA_COMPILE_FILES)
# Create the list of files to compile.
set(_JAVA_SOURCES_FILE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_sources)
string(REPLACE ";" "\"\n\"" _JAVA_COMPILE_STRING "\"${_JAVA_COMPILE_FILES}\"")
file(WRITE ${_JAVA_SOURCES_FILE} ${_JAVA_COMPILE_STRING})
# Compile the java files and create a list of class files # Compile the java files and create a list of class files
add_custom_command( add_custom_command(
# NOTE: this command generates an artificial dependency file # NOTE: this command generates an artificial dependency file
@ -345,7 +381,7 @@ function(add_jar _TARGET_NAME)
${CMAKE_JAVA_COMPILE_FLAGS} ${CMAKE_JAVA_COMPILE_FLAGS}
-classpath "${CMAKE_JAVA_INCLUDE_PATH_FINAL}" -classpath "${CMAKE_JAVA_INCLUDE_PATH_FINAL}"
-d ${CMAKE_JAVA_CLASS_OUTPUT_PATH} -d ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
${_JAVA_COMPILE_FILES} @${_JAVA_SOURCES_FILE}
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME} COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME}
DEPENDS ${_JAVA_COMPILE_FILES} ${_JAVA_COMPILE_DEPENDS} DEPENDS ${_JAVA_COMPILE_FILES} ${_JAVA_COMPILE_DEPENDS}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@ -364,7 +400,7 @@ function(add_jar _TARGET_NAME)
# create the jar file # create the jar file
set(_JAVA_JAR_OUTPUT_PATH set(_JAVA_JAR_OUTPUT_PATH
${CMAKE_JAVA_TARGET_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_NAME}) ${_add_jar_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_NAME})
if (CMAKE_JNI_TARGET) if (CMAKE_JNI_TARGET)
add_custom_command( add_custom_command(
OUTPUT ${_JAVA_JAR_OUTPUT_PATH} OUTPUT ${_JAVA_JAR_OUTPUT_PATH}
@ -372,12 +408,12 @@ function(add_jar _TARGET_NAME)
-cf${_ENTRY_POINT_OPTION} ${_JAVA_JAR_OUTPUT_PATH} ${_ENTRY_POINT_VALUE} -cf${_ENTRY_POINT_OPTION} ${_JAVA_JAR_OUTPUT_PATH} ${_ENTRY_POINT_VALUE}
${_JAVA_RESOURCE_FILES} @java_class_filelist ${_JAVA_RESOURCE_FILES} @java_class_filelist
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-D_JAVA_TARGET_DIR=${CMAKE_JAVA_TARGET_OUTPUT_DIR} -D_JAVA_TARGET_DIR=${_add_jar_OUTPUT_DIR}
-D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_TARGET_OUTPUT_NAME} -D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_TARGET_OUTPUT_NAME}
-D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK}
-P ${_JAVA_SYMLINK_SCRIPT} -P ${_JAVA_SYMLINK_SCRIPT}
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-D_JAVA_TARGET_DIR=${CMAKE_JAVA_TARGET_OUTPUT_DIR} -D_JAVA_TARGET_DIR=${_add_jar_OUTPUT_DIR}
-D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_JAR_OUTPUT_PATH} -D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_JAR_OUTPUT_PATH}
-D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK}
-P ${_JAVA_SYMLINK_SCRIPT} -P ${_JAVA_SYMLINK_SCRIPT}
@ -392,7 +428,7 @@ function(add_jar _TARGET_NAME)
-cf${_ENTRY_POINT_OPTION} ${_JAVA_JAR_OUTPUT_PATH} ${_ENTRY_POINT_VALUE} -cf${_ENTRY_POINT_OPTION} ${_JAVA_JAR_OUTPUT_PATH} ${_ENTRY_POINT_VALUE}
${_JAVA_RESOURCE_FILES} @java_class_filelist ${_JAVA_RESOURCE_FILES} @java_class_filelist
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-D_JAVA_TARGET_DIR=${CMAKE_JAVA_TARGET_OUTPUT_DIR} -D_JAVA_TARGET_DIR=${_add_jar_OUTPUT_DIR}
-D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_TARGET_OUTPUT_NAME} -D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_TARGET_OUTPUT_NAME}
-D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK}
-P ${_JAVA_SYMLINK_SCRIPT} -P ${_JAVA_SYMLINK_SCRIPT}
@ -420,7 +456,7 @@ function(add_jar _TARGET_NAME)
PROPERTY PROPERTY
INSTALL_FILES INSTALL_FILES
${_JAVA_JAR_OUTPUT_PATH} ${_JAVA_JAR_OUTPUT_PATH}
${CMAKE_JAVA_TARGET_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_LINK} ${_add_jar_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_LINK}
) )
if (CMAKE_JNI_TARGET) if (CMAKE_JNI_TARGET)
@ -429,7 +465,7 @@ function(add_jar _TARGET_NAME)
${_TARGET_NAME} ${_TARGET_NAME}
PROPERTY PROPERTY
JNI_SYMLINK JNI_SYMLINK
${CMAKE_JAVA_TARGET_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_LINK} ${_add_jar_OUTPUT_DIR}/${_JAVA_TARGET_OUTPUT_LINK}
) )
endif () endif ()
endif () endif ()

@ -11,7 +11,11 @@
#============================================================================= #=============================================================================
include(CheckIncludeFile) include(CheckIncludeFile)
# Check if we can build support for ELF parsing. # Check if we can build support for ELF parsing.
if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
CHECK_INCLUDE_FILES("stdint.h;elf_abi.h" HAVE_ELF_H)
else()
CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H) CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H)
endif()
if(HAVE_ELF_H) if(HAVE_ELF_H)
set(CMAKE_USE_ELF_PARSER 1) set(CMAKE_USE_ELF_PARSER 1)
else() else()
@ -113,7 +117,8 @@ endif()
set(SRCS set(SRCS
cmStandardIncludes.cxx cmStandardIncludes.cxx
cmArchiveWrite.cxx cmArchiveWrite.cxx
cmBootstrapCommands.cxx cmBootstrapCommands1.cxx
cmBootstrapCommands2.cxx
cmCacheManager.cxx cmCacheManager.cxx
cmCacheManager.h cmCacheManager.h
cmCommands.cxx cmCommands.cxx
@ -359,6 +364,10 @@ if (WIN32)
cmLocalVisualStudio7Generator.h cmLocalVisualStudio7Generator.h
cmLocalVisualStudioGenerator.cxx cmLocalVisualStudioGenerator.cxx
cmLocalVisualStudioGenerator.h cmLocalVisualStudioGenerator.h
cmVisualStudioSlnData.h
cmVisualStudioSlnData.cxx
cmVisualStudioSlnParser.h
cmVisualStudioSlnParser.cxx
cmVisualStudioWCEPlatformParser.h cmVisualStudioWCEPlatformParser.h
cmVisualStudioWCEPlatformParser.cxx cmVisualStudioWCEPlatformParser.cxx
cmWin32ProcessExecution.cxx cmWin32ProcessExecution.cxx
@ -385,7 +394,7 @@ if(WIN32 AND NOT CYGWIN AND NOT BORLAND)
set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501) set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
add_executable(cmcldeps cmcldeps.cxx) add_executable(cmcldeps cmcldeps.cxx)
target_link_libraries(cmcldeps CMakeLib) target_link_libraries(cmcldeps CMakeLib)
install_targets(/bin cmcldeps) install(TARGETS cmcldeps DESTINATION bin)
endif() endif()
# create a library used by the command line and the GUI # create a library used by the command line and the GUI
@ -539,12 +548,13 @@ endif()
add_executable(cmake cmakemain.cxx) add_executable(cmake cmakemain.cxx)
target_link_libraries(cmake CMakeLib) target_link_libraries(cmake CMakeLib)
# Build special executable for running programs on Windows 98 # Build special executable for running programs on Windows 98.
# Included on any Windows (unconditional packaging required!).
if(WIN32) if(WIN32)
if(NOT UNIX) if(NOT UNIX)
add_executable(cmw9xcom cmw9xcom.cxx) add_executable(cmw9xcom cmw9xcom.cxx)
target_link_libraries(cmw9xcom CMakeLib) target_link_libraries(cmw9xcom CMakeLib)
install_targets(/bin cmw9xcom) install(TARGETS cmw9xcom DESTINATION bin)
endif() endif()
endif() endif()
@ -570,11 +580,9 @@ endif()
include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL) include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL) include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
install_targets(/bin cmake) install(TARGETS cmake ctest cpack DESTINATION bin)
install_targets(/bin ctest)
install_targets(/bin cpack)
if(APPLE) if(APPLE)
install_targets(/bin cmakexbuild) install(TARGETS cmakexbuild DESTINATION bin)
endif() endif()
install_files(${CMAKE_DATA_DIR}/include cmCPluginAPI.h) install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)

@ -1,6 +1,6 @@
# CMake version number components. # CMake version number components.
set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8) set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 11) set(CMake_VERSION_PATCH 12)
set(CMake_VERSION_TWEAK 2) set(CMake_VERSION_TWEAK 0)
#set(CMake_VERSION_RC 0) #set(CMake_VERSION_RC 0)

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

Loading…
Cancel
Save