1531df2b configure_file: Warn about unknown arguments
4abbb140 Qt4: Fix configure_file call to use COPYONLY, not COPY_ONLY
bd7ba8e2 KWSys: Fix configure_file call to use COPYONLY, not COPY_ONLY
e9282782 Help: Fix configure_file call to use COPYONLY, not COPY_ONLY
Extend the RunCMake.configure_file test with a case covering possible
common typos of the COPYONLY option.
Reported-by: Iosif Neitzke <iosif.neitzke@gmail.com>
6e1c359f QtAutogen: Regenerate qrc files if their input changes (#15074)
a2995318 QtAutogen: Expand rccfiles into a vector early in the autogen process.
506151af QtAutogen: Extract a GetRccExecutable method.
d1b62185 Merge branch 'parent-scope-tests' into variable-pull-failure
5f414cef Revert "cmDefinitions: Don't store parent lookups"
e0c0b1ac test: add a test for PARENT_SCOPE with multiple scopes
064c415d test: add test for PARENT_SCOPE behavior
Get dependencies from the output of ``rcc --list`` if using
Qt 5. Otherwise process the file in the same way as the
qt4_add_resources macro.
This does not work for RCC files which are generated.
The cmake_autogen build step is implemented as a PRE_BUILD step
of the target currently if possible, rather than a standalone
custom target. This is to keep the number of (synthesized)
custom targets that appear in the UI low, but in some cases
it is necessary to fall back to a full custom target.
Fall back to a full custom target for the VS builds if autorcc
is used.
This reverts commit 5abfde6cb8.
The behaviors associated with implicit pulldown on variable lookup
seriously conflict with the optimizations made in these commits.
Basically, since values were copied upon variable lookup, not just on
PARENT_SCOPE, coupled with PARENT_SCOPE's behavior based on whether the
variable is in the current scope or not causes serious problems with not
storing a value for every variable at every scope.
The commit changed behavior of the following example, among other cases:
function(test_set)
set(blah "value2")
message("before PARENT_SCOPE blah=${blah}")
set(blah ${blah} PARENT_SCOPE)
message("after PARENT_SCOPE blah=${blah}")
endfunction()
set(blah value1)
test_set()
message("in parent scope, blah=${blah}")
Reported-by: Alex Merry <alex.merry@kde.org>
Reported-by: Ben Cooksley <bcooksley@kde.org>
In the case of:
-DCACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG:BOOL=TRUE
the variable is parsed out as:
CACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG
because the parser allows '=' in the variable name. Disallow such a name
on the command line.
Changes in commit b9aa5041 (cmLocalGenerator: Simplify GetIncludeFlags
output formatting, 2014-03-04) caused Windows Resource Compiler include
directories to be computed as relative paths in the Ninja generator.
This breaks the cmcldeps handling of include paths. The reason for the
regression is that several cmLocalGenerator::GetIncludeFlags callers
treated the fourth "bool forResponseFile" argument as if it controlled
whether include directories were a full path. It actually did control
that by accident until the above commit.
Add an explicit "bool forceFullPaths" argument to GetIncludeFlags
and thread the value through ConvertToIncludeReference as needed.
Update GetIncludeFlags call sites that really wanted to control the
forResponseFile setting to be aware of the new argument. Extend the
VSResource test to cover this case.
631fadea Help: Add notes for topic 'fix-OSX-bundle-rpaths-and-Qt5'
50e261dd OSX: Warn when attempting to change runtime paths on OS X 10.5
9b98fd52 cmake-gui: Make sure we bundle Qt5 Cocoa platform plugin
83a06bb4 BundleUtilities: Framework codesign Resources/Info.plist & Current
f7df82ac BundleUtilities: Resolve & replace @rpath placeholders
14bc686f GetPrerequisites: Make sure dyld placeholders are prefixes
6c313797 BundleUtilities: Use find on UNIX for fast executable lookup
Even though 10.5 supports @rpath, the support is not complete
enough for CMake. For instance, install_name_tool doesn't support
adding and removing rpaths.
Also modifying BundleUtilities test to remove an undesirable cmake
generated runtime path. The intent was to build with the install
rpath as is done with the other cases in this test.
e0e75a72 Help: Add notes for topic 'ctest-memcheck-sanitizers'
7345a1f7 tests: Add a test for ctest_memcheck MemorySanitizer
0c6330da ctest_memcheck: Add support for MemorySanitizer msan
9ba8bf12 tests: add a test for ctest_memcheck UndefinedBehaviorSanitizer
816c100a ctest_memcheck: Add support for UndefinedBehaviorSanitizer ubsan
b67ef537 ctest_memcheck: Order sanitizer type code consistently
f48a2968 Tests: Organize CTestTestMemcheck inner test code
Revert commit 7243c951 (Ninja: Don't limit custom cmd side-effects to
build folder, 2014-06-27) because it causes every custom command
dependency in the source tree to get a phony rule. For large projects
these rules get too big for Ninja to handle efficiently. While the
original change addressed a valid concern, it did not seem to occur
regularly in practice because well-behaved projects generate their
side-effects only in the build tree. Until we support explicit
specification of side-effects (CMake issue #14963), we will have to use
this as a middle-ground.
f25e431d tests: set sanitizer options properly
f0661bf3 tests: fix copy/paste from tsan -> asan comments
ca9cc25c ctest: add support for additional sanitizer options
0b9ffffc ctest: update documentation for CTEST_MEMORYCHECK_TYPE
When the file is not found in $CMAKE_SOURCE_DIR/<file path>,
the CurFileName pointer remained set to the previous file. This
caused the new file's coverage data to populate the into the
wrong object giving incorrect results and occasionally resulting
in a seg fault.
The pre-defined 'console' pool is a non-buffered pool that runs with a
depth of 1. CMake re-run cannot be run concurrently and it will
eventually output something. A non-buffered pool allows to get it as
soon as possible
Also, generate the minimal required version of Ninja in the build file.
df84281d Help: Add notes for topic 'vs-nsight-tegra-generator'
69e198dc VS: Generate Nsight Tegra project revision number
5365c9ac VS: Map Nsight Tegra file types in .vcxproj files
178f56a5 VS: Fix Tegra-Android platform linking of libraries by name
7115702f Tests: Add test for VS Nsight Tegra generator support
a6289499 VS: Generate ANDROID_GUI executables as app packages
c12e4699 Add 'ANDROID_API' target property to set Android Target API
9a4df52a Add 'ANDROID_GUI' target property to mark Android applications
16569abf cmTarget: Track internally whether platform is Android
ef0fd4f0 VS: Teach vcxproj generation about the Tegra-Android platform
d09b60f5 VS: Detect compiler id of Nsight Tegra-Android toolchains
2f071466 VS: Teach VS >= 10 to recognize CMAKE_SYSTEM_NAME 'Android'
Nsight Tegra 2.0 will be revision '8'. Generate this revision number
and add a NsightTegraUpgradeOnceWithoutPrompt element to tell newer
versions not to prompt when upgrading the generated project file.
Map ".java" to JCompile, ".asm" and ".s" to ClCompile, and a few
Android-specific source file names to AndroidBuild. This allows
Nsight Tegra 1.6 and above to check up-to-dateness of such sources.
Bump NsightTegraProjectRevisionNumber to 7 to allow these fields.
When an executable is marked with ANDROID_GUI, generate an AntBuild
step in the .vcxproj file and point it at the directory found to
contain AndroidManifest.xml. Assume it also contains build.xml.
This version of the Intel Fortran plugin to Visual Studio says:
please make sure that $(OutDir), $(TargetName) and $(TargetExt)
property values match the value specified in %(Link.OutputFile)
We must set TargetName and TargetExt in addition to the existing
setting for OutputDirectory. The settings do not appear to hurt
older versions of Intel Fortran, so set them unconditionally.
Extend the FortranOnly test to cover a corresponding use case by
using the OUTPUT_NAME target property.
Inspired-by: Ian Harvey <Ian.Harvey@megms.com.au>
c655f0c4 VS: Drop GenerateManifest from .vcxproj files for non-MS tools
227a3367 VS: Use case-insensitive check for hlsl,jpg,png,xml file extensions
4a24015a Tests: Always detect VS and SDK availability on Windows
Also add a 'CMAKE_ANDROID_GUI' variable to set the property default
so a project can easily make all executables Android applications.
An Android application executable file has the same extension as a
shared library (.so).
Complete the basic implementation of the VS Tegra-Android generators
by replacing parts of vcxproj files that are specific to MS tools
with settings defined for the NVIDIA Nsight Tegra tools.
Current limitations include:
* We have no "flag table" so flags will be passed in the additional
options fields instead of mapped to the vcxproj elements defined
by Nsight Tegra msbuild platform definition files.
* We have no interface to set the AndroidArch, AndroidStlType, or
AndroidTargetAPI fields so defaults will be used.
* The Nsight Tegra msbuild platform definition files do not provide
a working "Utility" target type so for add_custom_target we need
to use a "StaticLibrary" target type and leave out ClCompile rules.
* There is also no target type for plain command-line executables
so for add_executable we need to use a "DynamicLibrary" target.
Full application bundles will likely require new CMake target
properties (like WIN32_EXECUTABLE for Windows GUI executables).
When CMAKE_SYSTEM_NAME is 'Android', check for an installation of
'NVIDIA Nsight Tegra Visual Studio Edition' and generate .vcxproj
files for the "Tegra-Android" platform. Also make the installed
version available in a CMAKE_VS_NsightTegra_VERSION variable.
In commit v3.0.0-rc1~429^2~2 (Remove the Location member from cmTarget,
2012-10-07) a few extra slashes were added to the path construction
logic, perhaps due to a partially implemented attempt at handling the
case that GetDirectory returns an empty string. This leads to LOCATION
paths with double slashes in some cases. Remove them now.
Unlike with Unix Makefiles generator modifying compiler paths was not
protected with Ninja generator. It was possible to modify them in the
cache without the expected effect on the generated solution. Also
activate corresponding tests with Ninja.
In cmGlobalGenerator::EnableLanguage, fix error messages for missing
module files to actually name the missing module instead of using the
empty string returned by GetModulesFile.
When CMAKE_SYSTEM_NAME is 'WindowsCE':
* Set the Subsystem and EntryPointSymbol accordingly.
* When CMAKE_SYSTEM_VERSION is 8.0 (Windows CE 2013),
select the CE800 toolset by default.
be6a555d Tests: Test setting a generator platform in a toolchain file
d506fee8 Tests: Use -A option to pass generator platform selection
11c9ddd6 ExternalProject: Use -A option to pass generator platform
29bd843e CTest: Use -A option to pass generator platform selection
eb7d8156 cmake: Add -A option to specify a generator platform
858d5a0b Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin
e177e7af FPHSA: Avoid if() dereferencing of quoted variable
425acc52 cmcurl: Use if(DEFINED) to simplify conditions
cede5cbd libarchive: Avoid depending on if() to dereference a quoted variable
2d97178b FindGTK2: Avoid depending on if() to dereference a quoted variable
0b12815d Modules/Test*.cmake: Use if(DEFINED) to simplify conditions
188a1f23 If: Introduce policy CMP0054 - don't dereference quoted variables in if()
b900c1cc If: Extract cmConditionEvaluator from if() implementation
Define the 'cmake -A' option to set CMAKE_GENERATOR_PLATFORM
without having to spell out the whole variable name. We choose
the name '-A' for "platform" because '-P' is already taken, and
in the common use case the "platform" is actually an architecture
(e.g. x64).
Teach the RunCMake test infrastructure to use -A to pass the generator
platform. Extend the RunCMake.GeneratorPlatform test with a case to
verify that the -A option cannot be repeated.
The CMAKE_SYSTEM_NAME is "CYGWIN", but we also define a variable
named "CYGWIN" to "1". Avoid allowing if() to expand the "CYGWIN"
string as a variable.
Call SetSystemName, SetGeneratorPlatform, and SetGeneratorToolset
exactly once after reading CMakeSystem.cmake, and not again on another
call to enable_language() or project().
On Arch Linux, /lib and /lib64 are symlinks to /usr/lib. When ordering
runtime library search paths, we must not consider these to be distinct
directories. Before considering conflicts between two directories,
check that they do not have the same 'realpath'.
Inspired-by: Myles English <mylesenglish@gmail.com>
The ctest_configure command already reads the CTEST_CMAKE_GENERATOR
variable to get the value for the cmake -G option. Read new variable
CTEST_CMAKE_GENERATOR_PLATFORM to pass on as CMAKE_GENERATOR_PLATFORM.
The "ctest --build-and-test" mode already has "--build-generator" to
specify the -G option to CMake. Add a "--build-generator-platform" option
to specify a value to pass on as CMAKE_GENERATOR_PLATFORM.
For VS generator names that do not specify the platform name, read
CMAKE_GENERATOR_PLATFORM to get it.
Extend the RunCMake.GeneratorPlatform test with a case covering
use of the x64 platform when the test generator is a Visual Studio
generator whose name does not specify a platform.
Reject the option by default. It will be implemented on a per-generator
basis. Pass the setting into try_compile project generation. Add cache
entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to
hold the value persistently.
Add a RunCMake.GeneratorPlatform test to cover basic use cases for the
option. Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and
that it is rejected when the generator does not support a user setting.
Rename the 'PlatformName' member to 'DefaultPlatformName' and make
sure it is only read through a 'GetPlatformName()' call. This will
allow non-default names to be chosen later.
Move handling of an empty toolset name into the implementation of the
method. This simplifies the VS 10 implementation of default toolset
selection because it has one code path that is always called.
Xcode requires a separate PBXFileReference for each target source group
that references a source file. Xcode 6 now diagnoses re-use of the same
PBXFileReference from multiple source groups. Add the referencing
target name to our internal map key so we use a per-target reference.
39fefde2 VS: Add test case for Windows Phone and Windows Store
89da8465 MSVC: Define 'WIN32' for Windows Store and Windows Phone
ed7f085f Help: Add notes for topic 'vs-windows-apps'
dd11ae8f VS: Do not compile C sources as WinRT (#15100)
b8e40538 VS: Mark Windows Phone and Store targets as App Containers
0432f062 VS: Always ignore ole32 on Windows Phone 8.0
e6ff2f8b VS: Generate Windows Metadata for WinRT components
ee48f4c7 VS: Generate Windows Phone and Windows Store projects as Unicode
cb1aceed VS: Add VS_WINRT_COMPONENT property to enable CompileAsWinRT
401269e4 VS: Handle .pfx files explicitly in generator
23782171 VS: Handle AppxManifest sources explicitly in generator
bc373c6d VS: Set Window Phone/Store app type in CMake-generated targets
d89b2889 VS: Mark CMake-generated targets as Utility in .vcxproj files
03ad8f28 CMakeDetermineCompilerABI: Link with standard libraries on MSVC
The MSVC /ZW flag is valid only for C++ sources. Whenever we enable
CompileAsWinRT for the whole target, disable it for all C sources.
Update the documentation of VS_WINRT_COMPONENT to drop the statement
about undefined behavior for non-C++ sources, because it is now
defined as expected.
* Add AppContainerApplication to non-UTILITY targets
* Generate app manifest and related files if project does not provide them.
Place them in a per-target directory to avoid clashes.
* Mark WinRT components with WinMDAssembly
* Import Windows Phone 8.0 targets in .vcxproj files when necessary,
and reference platform.winmd.
Inspired-by: Paul Annetts <paul@lightunobscured.com>