summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--ChangeLog.manual319
-rw-r--r--Modules/AutomocInfo.cmake.in2
-rw-r--r--Modules/CheckCCompilerFlag.cmake5
-rw-r--r--Modules/DeployQt4.cmake22
-rw-r--r--Modules/FindBoost.cmake2
-rw-r--r--Modules/FindCUDA.cmake31
-rw-r--r--Modules/FindwxWidgets.cmake2
-rw-r--r--Modules/GNUInstallDirs.cmake30
-rw-r--r--Source/cmDependsC.cxx19
-rw-r--r--Source/cmDocumentVariables.cxx9
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmProjectCommand.cxx10
-rw-r--r--Source/cmQtAutomoc.cxx25
-rw-r--r--Source/cmQtAutomoc.h2
-rw-r--r--Source/cmTarget.cxx2
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake6
-rw-r--r--Tests/CMakeBuildTest.cmake.in12
-rw-r--r--Tests/CMakeLists.txt60
-rw-r--r--Tests/DoubleProject/CMakeLists.txt3
-rw-r--r--Tests/DoubleProject/silly.c4
-rw-r--r--Tests/MFC/try_compile/CMakeLists.txt15
-rw-r--r--Tests/QtAutomoc/CMakeLists.txt3
23 files changed, 518 insertions, 69 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5705e6e..169cf60 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -424,7 +424,7 @@ ENDIF()
# The CMake version number.
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8)
-SET(CMake_VERSION_PATCH 6)
+SET(CMake_VERSION_PATCH 7)
#SET(CMake_VERSION_TWEAK 0)
#SET(CMake_VERSION_RC 1)
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 3199767..f672b80 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,322 @@
+Changes in CMake 2.8.7 (since 2.8.7-rc2)
+--------------------------------------------
+None
+
+Changes in CMake 2.8.7-rc2 (since 2.8.7-rc1)
+--------------------------------------------
+Alex Neundorf (5):
+ automoc: default to strict mode, use CMAKE_AUTOMOC_RELAXED_MODE
+ automoc: improved warning message in relaxed mode
+ Remove trailing whitespace
+ Add comment about one more problem of the C depency scanner.
+ fix #12262: dependency scanning for ASM files
+
+Bill Hoffman (1):
+ Fix the case where cmake --build failed with two project cmds in one file.
+
+Brad King (11):
+ KWSys: Correctly handle empty environment variables
+ FortranCInterface: Work around mingw32-make trouble with parens
+ Xcode: Create separate rerun dependencies for subprojects (#12616)
+ Fix Intel Fortran .vfproj files for VS 10
+ HP: Drive shared library linking with compiler front end
+ Follow all dependencies of shared library private dependencies
+ Do not link private dependent shared libraries on OS X > 10.4
+ Avoid clobbering variable 'OUTPUT' in compiler tests (#12628)
+ Fix and simplify Fortran test compiler compatibility check
+ CTest: Recognize Intel errors without space before colon (#12627)
+ Windows-GNU: Remove extra quotes in GNUtoMS rule variable
+
+David Cole (4):
+ Release: Increase timeout for slow-testing cygwin build
+ Modules: Use "windres" as rc compiler base name for cross-compiles (#12480)
+ Tests: Only really run MFC test if we can build MFC apps (#11213)
+ FindBoost: Quote possibly empty string argument (#12273)
+
+Eric NOULARD (1):
+ CPackRPM fix #0012608 and unoticed related bug
+
+Johan Fänge (1):
+ CMake: Fix progress reporting for custom targets (#12441)
+
+Mike McQuaid (2):
+ Unset configurations variable when no build type.
+ Improve component support and output indentation.
+
+Raphael Kubo da Costa (2):
+ Remove the apparently outdated README in Source/QtDialog.
+ QtDialog: Set Ctrl+Q as the shortcut for quitting the program.
+
+Tim Gallagher (2):
+ FindLAPACK: Correct CMAKE_FIND_LIBRARY_SUFFIXES spelling (#12624)
+ FindLAPACK: List thread libs to avoid link errors (#12625)
+
+Valat Sébastien (1):
+ CTest: Do not get CDash version without drop site (#12618)
+
+Changes in CMake 2.8.7-rc1 (since 2.8.6)
+----------------------------------------
+Aaron Ten Clay (1):
+ VS: Add support for three new project properties (#12586)
+
+Alex Neundorf (60):
+ fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
+ fix #12262: use the C dependency scanner also for ASM files
+ fix #12465: detect the masm compiler ID ("MSVC")
+ Silence make on OpenBSD in FindPackageModeTest(#12508)
+ Remove trailing whitespace
+ Find Ruby on OpenBSD when installed from ports (#12507)
+ Eclipse generator: detect Eclipse version
+ Detect whether the current Eclipse version supports VirtualFolders
+ Eclipse: don't create VirtualFolders if not supported
+ Eclipse: better message when Eclipse version could not be determined
+ automoc:run moc on the header if the source file contains include "foo.moc"
+ Add copyright notices
+ automoc: always run moc on the cpp file if there is a foo.moc included
+ Eclipse: add virtual folder for each target
+ Eclipse: move code for generating links to projects into separate function
+ Eclipse: move code for generating links to targets into separate function
+ Eclipse: add Build and Clean targets to targets
+ Eclipse: detect number of CPUs, set CMAKE_ECLIPSE_MAKE_ARGUMENTS accordigly
+ Eclipse: fix #12417, don't create wrong src pathentries
+ FindLibXslt: also search libexslt and xsltproc
+ don't crash in automoc with empty COMPILE_DEFINITIONS property
+ Automoc: fix the fix, need to use std::string, not just char* pointer
+ automoc: fix #12541, support moc options
+ add documentation for the AUTOMOC_MOC_OPTIONS property
+ Eclipse: warn if CMAKE_BINARY_DIR is subdir of CMAKE_SOURCE_DIR
+ Eclipse: make targets work from any directory
+ Eclipse: quote the build dir (to make it work with spaces)
+ make automoc work when using ccmake via PATH (#12551)
+ Strip trailing whitespace
+ -make GETTEXT_PROCESS_PO_FILES() work with files with multiple dots
+ FindGettext: two more fixes for files with multiple dots
+ FindPNG: provide PNG_INCLUDE_DIRS, as the readme.txt says (#11312)
+ Eclipse: create links to subprojects also in the source-project (#12579)
+ Eclipse: use new variable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
+ install(EXPORT): Enforce existence of imported target files
+ Remove trailing whitespace
+ cmake-gui: add completion for the names when adding cache entries
+ automoc: stricter checking for what file is included
+ automoc: rework the checking for the matching header, to give better warnings
+ automoc: handle the case when the developer includes the wrong mocfile
+ automoc: add more test cases
+ automoc: improved diagnostics
+ automoc: minor optimization
+ automoc: another runtime optimization
+ Automoc: modified handling of included .moc files
+ automoc: add a test for including both abc.moc and moc_abc.cpp
+ automoc: add test for including the moc file from another header
+ automoc: add test for including a moc_abc_p.cpp file
+ automoc: move some code from the big parsing loop into separate functions
+ automoc: add special handling for including basename_p.moc, with test
+ automoc: add extra check whether the header contains Q_PRIVATE_SLOT
+ automoc: some more linebreaks for the warnings for better readability
+ automoc: fix handling of included _p.moc files
+ automoc: move the code for finding headers into separate function
+ automoc: add a StrictParseCppFile(), which is only qmake-compatible
+ automoc: also accept other files when .moc is included in non-strict mode
+ automoc: accept even more .moc files in non-strict mode
+ automoc: add variable CMAKE_AUTOMOC_STRICT_MODE, to enable strict parsing
+ automoc: fix line length
+ automoc: add documentation for CMAKE_AUTOMOC_STRICT_MODE
+
+Alexey Ozeritsky (1):
+ FindLAPACK: Fix linking to static LAPACK on Unix (#12477)
+
+Bernhard Walle (1):
+ Source/cmCTest.cxx: Add missing newline (#12538)
+
+Brad King (65):
+ Refactor find_* command final path list computation
+ Constify XCode generator getters to match cmGlobalGenerator
+ Fix line-too-long style violations
+ KWSys: Fix Doxygen warnings
+ Add pre-commit|commit-msg|prepare-commit-msg hook placeholders
+ pre-commit: Reject changes to KWSys through Git
+ Fix CTest.UpdateSVN with Subversion 1.7 (#12535)
+ Teach CTest.UpdateSVN to detect svn add --depth before using it
+ KWSys: Address Intel compiler remarks
+ Fix linking to OS X Frameworks named with spaces (#12550)
+ Watcom: Use shortpath to CMake if full path has parens (#12548)
+ KWSys: Remove trailing whitespace in SystemTools.cxx
+ KWSys: Fix wrong spelling of __INTEL_COMPILER
+ Update main Copyright.txt year range for 2011
+ KWIML: The Kitware Information Macro Library
+ Configure KWIML inside CMake as cmIML
+ KWIML: Avoid redefining _CRT_SECURE_NO_DEPRECATE in test.h
+ KWIML: Suppress printf/scanf format warnings in test
+ KWIML: No INT_SCN*8 on SunPro compiler
+ KWIML: No INT_SCN*8 on Intel for Windows
+ KWIML: Create test output dir for Xcode
+ Order VS local generator Version ivar values consistently
+ Enumerate VS11 version explicitly in local generators
+ KWIML: Test header inclusion after system headers
+ KWIML: Ignore _LONGLONG on MS compiler
+ KWIML: Teach ABI.h about PGI compiler
+ KWIML: Avoid MSVC linker warning about not using C++ runtime
+ Factor Compute(File|String)MD5 into cmCryptoHash helper
+ Add file(MD5) command to compute cryptographic hash
+ Import sha2 implementation 1.0 from Aaron D. Gifford
+ Import sha2 implementation 1.1 from Aaron D. Gifford
+ sha2: Use KWIML fixed-size integer types and endian-ness
+ sha2: Build as part of CMakeLib
+ Add file(SHA*) commands to compute cryptographic hashes
+ sha2: Use "static const" instead of "const static" declarations
+ cmCryptoHash: Provide factory "New" method
+ Add string(MD5) and string(SHA*) commands to compute hashes
+ sha2: Use KWIML fixed-size integer constant macros
+ sha2: Suppress Borland warnings in third-party code
+ Disable file() and string() hash commands during bootstrap
+ sha2: Wrap long lines in third-party declarations
+ Fix CMake.File hash test for CRLF checkouts
+ cmCryptoHash: Add virtual destructor
+ sha2: Cast safe conversions to smaller integer types
+ sha2: Suppress -Wcast-align warning from Clang
+ sha2: Zero entire SHA_CTX structure during cleanup
+ target_link_libraries: Add missing space in documentation
+ target_link_libraries: Simplify argument processing state tests
+ install(EXPORT): Improve target import failure message format
+ Remove trailing whitespace from cmLocalGenerator
+ bootstrap: Include cmNewLineStyle in build
+ cmNewLineStyle: Remove trailing comma in enum
+ cmNewLineStyle: Use cmStandardIncludes.h
+ Provide std::ios_base typedef on GCC < 3
+ FindZLIB: Search under ZLIB_ROOT if it is set
+ Factor out target location undefined behavior helper macro
+ export(): Document undefined behavior of location properties
+ Recognize the Tiny C Compiler (#12605)
+ TinyCC: Add compiler info for shared libs on Linux (#12605)
+ Fortran: Detect pointer size in gfortran on MinGW
+ Load platform files that need to know the ABI when possible
+ Factor makefile generator link rule lookup into helper function
+ Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib
+ Test CMAKE_GNUtoMS option in ExportImport on MinGW and MSys
+ cmTarget: Create helper method for versioned library names
+
+Clinton Stimpson (2):
+ Fix XML safety issue with adding preprocessor defines in CodeBlocks project.
+ Qt4: Fix dependencies of QtDeclartive.
+
+Dan Kegel (1):
+ Modules: Add XRes to FindX11.cmake
+
+David Cole (17):
+ Begin post-2.8.6 development
+ CTest: Fix crash when variables are not defined
+ VS11: Fix comment generated at the top of *.sln files
+ CTest: Add COVERAGE_EXTRA_FLAGS cache variable (#12490)
+ CTest: Clear custom vectors before populating (#12383)
+ Tests: Add the MFC test (#11213)
+ Tests: Avoid MFC test automatically for VCExpress builds (#11213)
+ Tests: Fix MFC test w/ Make-based generators (#11213)
+ Tests: Fix MFC test for old vs6 dashboards (#11213)
+ Tests: Avoid MFC test automatically for Watcom WMake builds (#11213)
+ Tests: Fix MFC test to work with VS 10 and later (#11213)
+ VS10: Use expected values for UseOfMfc (#11213)
+ Tests: Add environment logging to the MFC test (#11213)
+ VS11: Update InstallRequiredSystemLibraries.cmake for VS11 (#11213)
+ Tests: Nudge MFC test to pass on VS 6 dashboards (#11213)
+ VS: Use "call " keyword with .cmd and .bat file custom commands (#12445)
+ CTest: Disallow problem chars in build and site names (#11792)
+
+Eric NOULARD (3):
+ CPackRPM support component specific variables for spec files
+ Fix old reference to CMAKE_MAKE_PROGRAM inside CMAKE_BUILD_TOOL doc.
+ CPackRPM fix #12556 and enhance documentation
+
+James Bigler (6):
+ Added support for CUDA_PATH which is present in the CUDA toolkit 3.2 onward.
+ Reset dependency file list when a dependency disappeared.
+ Add work around for CUDA in UNC paths.
+ Fixes for handling quotes in args and other places (Fix Bug 11726 and 12099).
+ Make CUDA working directory unique for each target.
+ Miscellaneous fixes.
+
+Jean-Christophe Fillion-Robin (1):
+ CTest: Look for CTestConfig.cmake in build dir first, then source dir
+
+Johan Bjork (1):
+ Xcode: Avoid spewing the environment on every script run (#12522)
+
+Mateusz Loskot (1):
+ FindBoost: Use MSVC11 to find Boost on Windows (#12568)
+
+Mathieu Malaterre (1):
+ TinyCC: Add default compilation flags (#12605)
+
+Mike McQuaid (6):
+ Add QT_LIBRARIES_PLUGINS variable to UseQt4.
+ Add DeployQt4 module.
+ Match fixup_qt4_executable with documentation.
+ Don't resolve directories; are never relative.
+ Check plugin variables are defined before warning.
+ Check QtCore without warning.
+
+Nicolas Despres (17):
+ Refactor TargetTypeNames.
+ Add const versions of some getters.
+ Constify many getters of cmGlobalGenerator.
+ Remove trailing white-spaces.
+ Fix typo.
+ Doxygen: Improve code documentation.
+ Doxygen: Generate call graph and relationships.
+ Doxygen: Fix warnings.
+ Doxygen: Remove dependency on VTK when building doxygen.
+ Usage: Document -j|--parallel option in help message.
+ Usage: Document all options printing usage information.
+ Usage: Document all options printing the version number.
+ Usage: Print help, version and copyright options in usage information.
+ Usage: Add missing exepath argument in get_prerequisites documentation.
+ ccmake: Align 'g' and 'q' key instructions.
+ ccmake: Document '/' key.
+ ccmake: Factor toggle key help instructions.
+
+Niels Dekker (1):
+ Fix CMAKE_VERBOSE_MAKEFILE for VS10 vcxproj files (#12504)
+
+Ondrej Balaz (1):
+ FindBISON: Fix bison++ version parsing to avoid "Offending entry"
+
+Peter Collingbourne (4):
+ Make cmLocalGenerator::ConvertToLinkReference virtual
+ Introduce a cmLocalGenerator::ConvertToIncludeReference function
+ Introduce a cmGlobalGenerator::ResolveLanguageCompiler function
+ Fix configuration-dependent flag lookup in cmLocalGenerator::GetTargetFlags
+
+Peter Kuemmel (1):
+ Add NEWLINE_STYLE option to configure_file (#3957)
+
+Philip Lowman (1):
+ FindProtoBuf: Documented limitation of the public macro
+
+Pierre-Francois Laquerre (1):
+ Fix path quoting in Qt4 macros
+
+Robert Dailey (1):
+ VS: Add VS_SCC_AUXPATH target property (#12549)
+
+Rolf Eike Beer (4):
+ libarchive: fix typo in CheckFileOffsetBits.cmake
+ Tell people that link_directories() is not what they are searching for
+ FindBISON: Fix matching output of "bison --version"
+ Tests: ExternalProject: Remove unnecessary 'svn --version' call
+
+Stephen Kelly (13):
+ Add features from KDE for arguments to qdbusxml2cpp.
+ Remove unused define.
+ Build each library only once instead of once for each test.
+ Initialize LINK_INTERFACE_LIBRARIES target property with a variable
+ Also run moc automatically with Qt5.
+ Fix typo.
+ Don't assume the existence of QT_MAJOR_VERSION.
+ Update comments and method names to not be Qt4 specific.
+ Fix style.
+ target_link_libraries: Trim trailing whitespace
+ target_link_libraries: Add LINK_(PUBLIC|PRIVATE) options
+ moc is now part of the Qt5Core module
+ Add a test case for the use of Q_PRIVATE_SLOT.
+
Changes in CMake 2.8.6 (since 2.8.6-rc4)
----------------------------------------
Alex Neundorf (5):
diff --git a/Modules/AutomocInfo.cmake.in b/Modules/AutomocInfo.cmake.in
index 44f2da2..29dab97 100644
--- a/Modules/AutomocInfo.cmake.in
+++ b/Modules/AutomocInfo.cmake.in
@@ -13,4 +13,4 @@ set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/")
set(AM_QT_VERSION_MAJOR "@QT_VERSION_MAJOR@" )
set(AM_Qt5Core_VERSION_MAJOR "@Qt5Core_VERSION_MAJOR@" )
set(AM_TARGET_NAME "@_moc_target_name@")
-set(AM_STRICT_MODE "@_moc_strict_mode@")
+set(AM_RELAXED_MODE "@_moc_relaxed_mode@")
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index ec0a773..5380f4d 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -7,7 +7,7 @@
# that can modify the build.
#=============================================================================
-# Copyright 2006-2010 Kitware, Inc.
+# Copyright 2006-2011 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
@@ -27,8 +27,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT}
# Some compilers do not fail with a bad flag
- FAIL_REGEX "warning: command line option .* is valid for .* but not for C"
- # Apple gcc
+ FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC
diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake
index 80a13d4..83f322c 100644
--- a/Modules/DeployQt4.cmake
+++ b/Modules/DeployQt4.cmake
@@ -56,11 +56,12 @@
# (or <plugins_dir>) relative to <executable> and store the result in
# <installed_plugin_path_var>. See documentation of INSTALL_QT4_PLUGIN_PATH.
#
-# INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
+# INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
# Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up
# a Qt4 executable using BundleUtilities so it is standalone and can be
# drag-and-drop copied to another machine as long as all of the system
# libraries are compatible. The executable will be fixed-up at install time.
+# <component> is the COMPONENT used for bundle fixup and plugin installation.
# See documentation of FIXUP_QT4_BUNDLE.
#=============================================================================
@@ -207,9 +208,6 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va
else()
unset(configurations)
endif()
- if(component)
- set(component COMPONENT ${component})
- endif()
install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
endif()
set(${installed_plugin_path_var} ${${installed_path_var}} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
@@ -246,10 +244,15 @@ function(install_qt4_executable executable)
set(dirs ${ARGV3})
set(plugins_dir ${ARGV4})
set(request_qt_conf ${ARGV5})
- set(plugin_component ${ARGV6})
+ set(component ${ARGV6})
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
+ if(component)
+ set(component COMPONENT ${component})
+ else()
+ unset(component)
+ endif()
get_filename_component(executable_absolute "${executable}" ABSOLUTE)
if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}")
@@ -267,15 +270,16 @@ function(install_qt4_executable executable)
foreach(plugin ${qtplugins})
set(installed_plugin_paths "")
- install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${plugin_component}")
+ install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
list(APPEND libs ${installed_plugin_paths})
endforeach()
resolve_qt4_paths(libs)
install(CODE
- " INCLUDE( \"${DeployQt4_cmake_dir}/DeployQt4.cmake\" )
- SET( BU_CHMOD_BUNDLE_ITEMS TRUE )
- FIXUP_QT4_EXECUTABLE( \"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\" ) "
+ "INCLUDE(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\")
+ SET(BU_CHMOD_BUNDLE_ITEMS TRUE)
+ FIXUP_QT4_EXECUTABLE(\"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
+ ${component}
)
endfunction()
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index ea60354..9c03b3d 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -405,7 +405,7 @@ endfunction()
#
function(_Boost_PREPEND_LIST_WITH_THREADAPI _output)
set(_orig_libnames ${ARGN})
- string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames ${_orig_libnames})
+ string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames "${_orig_libnames}")
set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE)
endfunction()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 18f7442..4d91a92 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -216,6 +216,18 @@
# CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS
# implementation (alterative to:
# CUDA_ADD_CUBLAS_TO_TARGET macro).
+# CUDA_curand_LIBRARY -- CUDA Random Number Generation library.
+# Only available for CUDA version 3.2+.
+# CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library.
+# Only available for CUDA version 3.2+.
+# CUDA_npp_LIBRARY -- NVIDIA Performance Primitives library.
+# Only available for CUDA version 4.0+.
+# CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library.
+# Only available for CUDA version 3.2+.
+# Windows only.
+# CUDA_nvcuvid_LIBRARY -- CUDA Video Decoder library.
+# Only available for CUDA version 3.2+.
+# Windows only.
#
#
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
@@ -430,6 +442,11 @@ if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
unset(CUDA_cublasemu_LIBRARY CACHE)
unset(CUDA_cufft_LIBRARY CACHE)
unset(CUDA_cufftemu_LIBRARY CACHE)
+ unset(CUDA_curand_LIBRARY CACHE)
+ unset(CUDA_cusparse_LIBRARY CACHE)
+ unset(CUDA_npp_LIBRARY CACHE)
+ unset(CUDA_nvcuvenc_LIBRARY CACHE)
+ unset(CUDA_nvcuvid_LIBRARY CACHE)
endif()
if(NOT "${CUDA_SDK_ROOT_DIR}" STREQUAL "${CUDA_SDK_ROOT_DIR_INTERNAL}")
@@ -600,7 +617,7 @@ if(CUDA_VERSION VERSION_GREATER "3.0")
endif()
endif()
-# Search for cufft and cublas libraries.
+# Search for additional CUDA toolkit libraries.
if(CUDA_VERSION VERSION_LESS "3.1")
# Emulation libraries aren't available in version 3.1 onward.
find_cuda_helper_libs(cufftemu)
@@ -608,6 +625,18 @@ if(CUDA_VERSION VERSION_LESS "3.1")
endif()
find_cuda_helper_libs(cufft)
find_cuda_helper_libs(cublas)
+if(NOT CUDA_VERSION VERSION_LESS "3.2")
+ # cusparse showed up in version 3.2
+ find_cuda_helper_libs(cusparse)
+ find_cuda_helper_libs(curand)
+ if (WIN32)
+ find_cuda_helper_libs(nvcuvenc)
+ find_cuda_helper_libs(nvcuvid)
+ endif()
+endif()
+if(NOT CUDA_VERSION VERSION_LESS "4.0")
+ find_cuda_helper_libs(npp)
+endif()
if (CUDA_BUILD_EMULATION)
set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY})
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 090259b..0bc6172 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -312,7 +312,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
# Find wxWidgets multilib libraries.
FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext
- stc ribbon propgrid)
+ stc ribbon propgrid webview)
FIND_LIBRARY(WX_${LIB}${_DBG}
NAMES
wxmsw${_UNV}29${_UCD}${_DBG}_${LIB}
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index a114dcb..0302e4b 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -11,7 +11,7 @@
# SYSCONFDIR - read-only single-machine data (etc)
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
# LOCALSTATEDIR - modifiable single-machine data (var)
-# LIBDIR - object code libraries (lib or lib64)
+# LIBDIR - object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian)
# INCLUDEDIR - C header files (include)
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
# DATAROOTDIR - read-only architecture-independent data root (share)
@@ -75,18 +75,24 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
# - we are NOT on debian
# - we are on a 64 bits system
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
- # Note that the future of multi-arch handling may be even
- # more complicated than that: http://wiki.debian.org/Multiarch
+ # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
+ # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
+ # See http://wiki.debian.org/Multiarch
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
- AND NOT CMAKE_CROSSCOMPILING
- AND NOT EXISTS "/etc/debian_version")
- if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
- message(AUTHOR_WARNING
- "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
- "Please enable at least one language before including GNUInstallDirs.")
- else()
- if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
- set(_LIBDIR_DEFAULT "lib64")
+ AND NOT CMAKE_CROSSCOMPILING)
+ if (EXISTS "/etc/debian_version") # is this a debian system ?
+ if(CMAKE_LIBRARY_ARCHITECTURE)
+ set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
+ endif()
+ else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
+ if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
+ message(AUTHOR_WARNING
+ "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
+ "Please enable at least one language before including GNUInstallDirs.")
+ else()
+ if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+ set(_LIBDIR_DEFAULT "lib64")
+ endif()
endif()
endif()
endif()
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index a76b3af..44841a9 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -237,10 +237,10 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
fileIt->second->Used=true;
dependencies.insert(fullName);
for (std::vector<UnscannedEntry>::const_iterator incIt=
- fileIt->second->UnscannedEntries.begin();
+ fileIt->second->UnscannedEntries.begin();
incIt!=fileIt->second->UnscannedEntries.end(); ++incIt)
{
- if (this->Encountered.find(incIt->FileName) ==
+ if (this->Encountered.find(incIt->FileName) ==
this->Encountered.end())
{
this->Encountered.insert(incIt->FileName);
@@ -278,7 +278,7 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
for(std::set<cmStdString>::iterator i=dependencies.begin();
i != dependencies.end(); ++i)
{
- makeDepends << obj << ": " <<
+ makeDepends << obj << ": " <<
this->LocalGenerator->Convert(i->c_str(),
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKEFILE)
@@ -321,9 +321,9 @@ void cmDependsC::ReadCacheFile()
haveFileName=true;
int newer=0;
cmFileTimeComparison comp;
- bool res=comp.FileTimeCompare(this->CacheFileName.c_str(),
+ bool res=comp.FileTimeCompare(this->CacheFileName.c_str(),
line.c_str(), &newer);
-
+
if ((res==true) && (newer==1)) //cache is newer than the parsed file
{
cacheEntry=new cmIncludeLines;
@@ -391,7 +391,7 @@ void cmDependsC::WriteCacheFile() const
{
return;
}
-
+
cacheOut << this->IncludeRegexLineString << "\n\n";
cacheOut << this->IncludeRegexScanString << "\n\n";
cacheOut << this->IncludeRegexComplainString << "\n\n";
@@ -406,7 +406,7 @@ void cmDependsC::WriteCacheFile() const
cacheOut<<fileIt->first.c_str()<<std::endl;
for (std::vector<UnscannedEntry>::const_iterator
- incIt=fileIt->second->UnscannedEntries.begin();
+ incIt=fileIt->second->UnscannedEntries.begin();
incIt!=fileIt->second->UnscannedEntries.end(); ++incIt)
{
cacheOut<<incIt->FileName.c_str()<<std::endl;
@@ -431,7 +431,7 @@ void cmDependsC::Scan(std::istream& is, const char* directory,
cmIncludeLines* newCacheEntry=new cmIncludeLines;
newCacheEntry->Used=true;
this->FileCache[fullName]=newCacheEntry;
-
+
// Read one line at a time.
std::string line;
while(cmSystemTools::GetLineFromStream(is, line))
@@ -465,6 +465,9 @@ void cmDependsC::Scan(std::istream& is, const char* directory,
// that this check does not account for the possibility of two
// headers with the same name in different directories when one
// is included by double-quotes and the other by angle brackets.
+ // It also does not work properly if two header files with the same
+ // name exist in different directories, and both are included from a
+ // file their own directory by simply using "filename.h" (#12619)
// This kind of problem will be fixed when a more
// preprocessor-like implementation of this scanner is created.
if (this->IncludeRegexScan.find(entry.FileName.c_str()))
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index a0632a2..fe29df9 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -508,16 +508,15 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Variables That Change Behavior");
cm->DefineProperty
- ("CMAKE_AUTOMOC_STRICT_MODE", cmProperty::VARIABLE,
+ ("CMAKE_AUTOMOC_RELAXED_MODE", cmProperty::VARIABLE,
"Switch between strict and relaxed automoc mode.",
- "When TRUE, automoc behaves exactly as described in the documentation "
+ "By default, automoc behaves exactly as described in the documentation "
"of the AUTOMOC target property. "
- "When set to FALSE, it accepts more input and tries to find the correct "
+ "When set to TRUE, it accepts more input and tries to find the correct "
"input file for moc even if it differs from the documented behaviour. "
"In this mode it e.g. also checks whether a header file is intended to "
"be processed by moc when a \"foo.moc\" file has been included.\n"
- "When using Qt4, CMAKE_AUTOMOC_STRICT_MODE is initialized to FALSE. "
- "It also has to be set to FALSE for KDE4 compatibility.",
+ "Relaxed mode has to be enabled for KDE4 compatibility.",
false,
"Variables That Change Behavior");
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 4e4f1d9..6be3eb9 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -470,6 +470,8 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile()
<< "SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})\n";
infoFileStream
<< "SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})\n";
+ infoFileStream
+ << "SET(CMAKE_ASM_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})\n";
// Store the include regular expressions for this directory.
infoFileStream
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 1a831d9..6e3b6af 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -47,9 +47,13 @@ bool cmProjectCommand
this->Makefile->AddDefinition("PROJECT_NAME", args[0].c_str());
// Set the CMAKE_PROJECT_NAME variable to be the highest-level
- // project name in the tree. This is always the first PROJECT
- // command encountered.
- if(!this->Makefile->GetDefinition("CMAKE_PROJECT_NAME"))
+ // project name in the tree. If there are two project commands
+ // in the same CMakeLists.txt file, and it is the top level
+ // CMakeLists.txt file, then go with the last one, so that
+ // CMAKE_PROJECT_NAME will match PROJECT_NAME, and cmake --build
+ // will work.
+ if(!this->Makefile->GetDefinition("CMAKE_PROJECT_NAME")
+ || (this->Makefile->GetLocalGenerator()->GetParent() == 0) )
{
this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str());
this->Makefile->AddCacheDefinition
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 65c7952..0d0d80c 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -119,11 +119,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
return;
}
- bool strictMode = (qtMajorVersion == "5");
- if (makefile->IsDefinitionSet("CMAKE_AUTOMOC_STRICT_MODE"))
- {
- strictMode = makefile->IsOn("CMAKE_AUTOMOC_STRICT_MODE");
- }
+ bool relaxedMode = makefile->IsOn("CMAKE_AUTOMOC_RELAXED_MODE");
// create a custom target for running automoc at buildtime:
std::string automocTargetName = targetName;
@@ -213,7 +209,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
makefile->AddDefinition("_moc_options", _moc_options.c_str());
makefile->AddDefinition("_moc_files", _moc_files.c_str());
makefile->AddDefinition("_moc_headers", _moc_headers.c_str());
- makefile->AddDefinition("_moc_strict_mode", strictMode ? "TRUE" : "FALSE");
+ makefile->AddDefinition("_moc_relaxed_mode", relaxedMode ? "TRUE" : "FALSE");
const char* cmakeRoot = makefile->GetSafeDefinition("CMAKE_ROOT");
std::string inputFile = cmakeRoot;
@@ -313,7 +309,7 @@ bool cmQtAutomoc::ReadAutomocInfoFile(cmMakefile* makefile,
this->ProjectSourceDir = makefile->GetSafeDefinition("AM_CMAKE_SOURCE_DIR");
this->TargetName = makefile->GetSafeDefinition("AM_TARGET_NAME");
- this->StrictMode = makefile->IsOn("AM_STRICT_MODE");
+ this->RelaxedMode = makefile->IsOn("AM_RELAXED_MODE");
return true;
}
@@ -509,7 +505,7 @@ bool cmQtAutomoc::RunAutomoc()
{
std::cout << "AUTOMOC: Checking " << absFilename << std::endl;
}
- if (this->StrictMode == false)
+ if (this->RelaxedMode)
{
this->ParseCppFile(absFilename, headerExtensions, includedMocs);
}
@@ -702,8 +698,9 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
"includes the moc file \"" << currentMoc <<
"\", but does not contain a Q_OBJECT macro. "
"Running moc on "
- << "\"" << headerToMoc << "\" ! Better include \"moc_"
- << basename << ".cpp\" for a robust build.\n"
+ << "\"" << headerToMoc << "\" ! Include \"moc_"
+ << basename << ".cpp\" for a compatiblity with "
+ "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n"
<< std::endl;
}
else
@@ -712,8 +709,9 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
"includes the moc file \"" << currentMoc <<
"\" instead of \"moc_" << basename << ".cpp\". "
"Running moc on "
- << "\"" << headerToMoc << "\" ! Better include \"moc_"
- << basename << ".cpp\" for a robust build.\n"
+ << "\"" << headerToMoc << "\" ! Include \"moc_"
+ << basename << ".cpp\" for compatiblity with "
+ "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n"
<< std::endl;
}
}
@@ -753,7 +751,8 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
"includes "
<< "\"" << ownMocUnderscoreFile << "\". Running moc on "
<< "\"" << absFilename << "\" ! Better include \""
- << scannedFileBasename << ".moc\" for a robust build.\n"
+ << scannedFileBasename << ".moc\" for compatiblity with "
+ "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n"
<< std::endl;
includedMocs[absFilename] = ownMocUnderscoreFile;
includedMocs.erase(ownMocHeaderFile);
diff --git a/Source/cmQtAutomoc.h b/Source/cmQtAutomoc.h
index a31f36a..8cbbac1 100644
--- a/Source/cmQtAutomoc.h
+++ b/Source/cmQtAutomoc.h
@@ -85,7 +85,7 @@ private:
bool ColorOutput;
bool RunMocFailed;
bool GenerateAll;
- bool StrictMode;
+ bool RelaxedMode;
};
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index fc3c1c9..6a937b8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -162,7 +162,7 @@ void cmTarget::DefineProperties(cmake *cm)
"CMAKE_AUTOMOC if it is set when a target is created.\n"
"Additional command line options for moc can be set via the "
"AUTOMOC_MOC_OPTIONS property.\n"
- "By setting the CMAKE_AUTOMOC_STRICT_MODE variable to FALSE the rules "
+ "By setting the CMAKE_AUTOMOC_RELAXED_MODE variable to TRUE the rules "
"for searching the files which will be processed by moc can be relaxed. "
"See the documentation for this variable for more details.");
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 8849166..ff27df3 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -12,10 +12,10 @@
#=============================================================================
# KWSys version date year component. Format is CCYY.
-SET(KWSYS_DATE_STAMP_YEAR 2011)
+SET(KWSYS_DATE_STAMP_YEAR 2012)
# KWSys version date month component. Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 12)
+SET(KWSYS_DATE_STAMP_MONTH 01)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 20)
+SET(KWSYS_DATE_STAMP_DAY 09)
diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in
index 9c3002b..a8bb750 100644
--- a/Tests/CMakeBuildTest.cmake.in
+++ b/Tests/CMakeBuildTest.cmake.in
@@ -32,21 +32,21 @@ set(CMAKE_CONFIGURATION_TYPES @CMAKE_CONFIGURATION_TYPES@)
# run the executable out of the Debug directory if there
# are configuration types
if(CMAKE_CONFIGURATION_TYPES)
- set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/Debug/COnly")
+ set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/Debug/@CMAKE_BUILD_TEST_EXE@")
else(CMAKE_CONFIGURATION_TYPES)
- set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/COnly")
+ set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/@CMAKE_BUILD_TEST_EXE@")
endif(CMAKE_CONFIGURATION_TYPES)
# run the test results
message("running [${RUN_TEST}]")
execute_process(COMMAND "${RUN_TEST}" RESULT_VARIABLE RESULT)
if(RESULT)
- message(FATAL_ERROR "Error running test COnly")
+ message(FATAL_ERROR "Error running test @CMAKE_BUILD_TEST_EXE@")
endif(RESULT)
-# build it again with clean and only COnly target
+# build it again with clean and only @CMAKE_BUILD_TEST_EXE@ target
execute_process(COMMAND "${CMAKE_COMMAND}"
--build "@CMAKE_BUILD_TEST_BINARY_DIR@" --config Debug
- --clean-first --target COnly
+ --clean-first --target @CMAKE_BUILD_TEST_EXE@
RESULT_VARIABLE RESULT)
if(RESULT)
message(FATAL_ERROR "Error running cmake --build")
@@ -55,5 +55,5 @@ endif(RESULT)
# run it again after clean
execute_process(COMMAND "${RUN_TEST}" RESULT_VARIABLE RESULT)
if(RESULT)
- message(FATAL_ERROR "Error running test COnly after clean ")
+ message(FATAL_ERROR "Error running test @CMAKE_BUILD_TEST_EXE@ after clean ")
endif(RESULT)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index c0cbfa4..00c9ac7 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -220,11 +220,21 @@ IF(BUILD_TESTING)
SET(CMAKE_BUILD_TEST_SOURCE_DIR "${CMake_SOURCE_DIR}/Tests/COnly")
SET(CMAKE_BUILD_TEST_BINARY_DIR "${CMake_BINARY_DIR}/Tests/CMakeBuildCOnly")
+ SET(CMAKE_BUILD_TEST_EXE COnly)
CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CMakeBuildTest.cmake.in"
"${CMake_BINARY_DIR}/Tests/CMakeBuildTest.cmake" @ONLY)
ADD_TEST(CMakeBuildTest ${CMAKE_CMAKE_COMMAND} -P
"${CMake_BINARY_DIR}/Tests/CMakeBuildTest.cmake")
LIST(APPEND TEST_BUILD_DIRS ${CMAKE_BUILD_TEST_BINARY_DIR})
+ # now do it again for a project that has two project commands
+ SET(CMAKE_BUILD_TEST_SOURCE_DIR "${CMake_SOURCE_DIR}/Tests/DoubleProject")
+ SET(CMAKE_BUILD_TEST_BINARY_DIR "${CMake_BINARY_DIR}/Tests/DoubleProject")
+ SET(CMAKE_BUILD_TEST_EXE just_silly)
+ CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CMakeBuildTest.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CMakeBuildDoubleProjectTest.cmake" @ONLY)
+ ADD_TEST(CMakeDoubleProject ${CMAKE_CMAKE_COMMAND} -P
+ "${CMake_BINARY_DIR}/Tests/CMakeBuildDoubleProjectTest.cmake")
+ LIST(APPEND TEST_BUILD_DIRS ${CMAKE_BUILD_TEST_BINARY_DIR})
ADD_TEST_MACRO(Module.CheckTypeSize CheckTypeSize)
@@ -1223,6 +1233,56 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
set(CTEST_RUN_MFC OFF)
endif()
endif()
+
+ # Last resort, after quick checks are done. Do a try_compile, and avoid
+ # the MFC test if the simplest possible MFC app cannot be compiled.
+ if(CTEST_RUN_MFC AND NOT DEFINED HAVE_MFC)
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/MFC/try_compile/CMakeLists.txt
+ ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile/CMakeLists.txt
+ COPYONLY
+ )
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/MFC/mfc1/stdafx.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile/stdafx.cpp
+ COPYONLY
+ )
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/MFC/mfc1/stdafx.h
+ ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile/stdafx.h
+ COPYONLY
+ )
+
+ message(STATUS "Looking for MFC")
+
+ try_compile(HAVE_MFC
+ ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile/build
+ ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile
+ try_compile_mfc
+ OUTPUT_VARIABLE HAVE_MFC_OUTPUT)
+
+ if(HAVE_MFC)
+ message(STATUS "Looking for MFC - found")
+ set(HAVE_MFC 1 CACHE INTERNAL "Have MFC")
+ file(APPEND
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if MFC exists passed with the following output:\n"
+ "${HAVE_MFC_OUTPUT}\n\n")
+ else()
+ message(STATUS "Looking for MFC - not found")
+ set(HAVE_MFC "" CACHE INTERNAL "Have MFC")
+ file(APPEND
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if MFC exists failed with the following output:\n"
+ "${HAVE_MFC_OUTPUT}\n\n")
+ endif()
+ endif()
+
+ if(CTEST_RUN_MFC AND NOT HAVE_MFC)
+ message(STATUS
+ "cannot compile simplest ever MFC app, avoiding MFC test")
+ set(CTEST_RUN_MFC OFF)
+ endif()
endif()
endif()
diff --git a/Tests/DoubleProject/CMakeLists.txt b/Tests/DoubleProject/CMakeLists.txt
new file mode 100644
index 0000000..02a6275
--- /dev/null
+++ b/Tests/DoubleProject/CMakeLists.txt
@@ -0,0 +1,3 @@
+project(dumb)
+project(dumber)
+add_executable(just_silly silly.c)
diff --git a/Tests/DoubleProject/silly.c b/Tests/DoubleProject/silly.c
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/DoubleProject/silly.c
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/MFC/try_compile/CMakeLists.txt b/Tests/MFC/try_compile/CMakeLists.txt
new file mode 100644
index 0000000..8e5d746
--- /dev/null
+++ b/Tests/MFC/try_compile/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 2.8)
+project(try_compile_mfc)
+
+set(files
+ stdafx.cpp
+ stdafx.h
+)
+
+set(CMAKE_MFC_FLAG "2")
+
+# VS generators add this automatically based on the CMAKE_MFC_FLAG value,
+# but generators matching "Make" require:
+add_definitions(-D_AFXDLL)
+
+add_executable(simplest_possible_mfc_exe WIN32 ${files})
diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt
index ebfb4f5..d255a5a 100644
--- a/Tests/QtAutomoc/CMakeLists.txt
+++ b/Tests/QtAutomoc/CMakeLists.txt
@@ -10,6 +10,9 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_definitions(-DFOO)
+# enable relaxed mode so automoc can handle all the special cases:
+set(CMAKE_AUTOMOC_RELAXED_MODE TRUE)
+
# create an executable and a library target, both requiring automoc:
add_library(codeeditorLib STATIC codeeditor.cpp)