[CMake] CMake 3.6.0-rc4 now ready for testing!
Brad King
brad.king at kitware.com
Thu Jun 30 09:20:15 EDT 2016
On 06/29/2016 05:05 PM, Hendrik Sattler wrote:
>> * The "InstallRequiredSystemLibraries" module learned a new
>> "CMAKE_INSTALL_UCRT_LIBRARIES" option to enable app-local deployment
>> of the Windows Universal CRT libraries with Visual Studio 2015.
>
> Maybe the help should note that this is only needed when targeting
> WindowsXP.
It is also useful for deploying to Windows 7 machines that have
not had updates installed to provide the UCRT libraries. I've
updated the documentation to show Windows XP as an example:
InstallRequiredSystemLibraries: Document UCRT option use case
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dab3ccf2
>> * A "CMAKE_TRY_COMPILE_PLATFORM_VARIABLES" variable was added for
>> use by toolchain files to specify platform-specific variables that
>> must be propagated by the "try_compile()" command into test
>> projects.
>
> Can someone please add an example to the help.
Done:
Help: Document CMAKE_TRY_COMPILE_PLATFORM_VARIABLES example
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c05d240e
> E.g. I tried to make the initial try_compile() to respect my
> CMAKE_CXX_FLAGS_INIT variable that gets defined in my toolchain file...
CMAKE_CXX_FLAGS_INIT is not documented for use in a toolchain file.
It is used internally by platform modules.
> I really have to use CXXFLAGS environment variable which feels clumsy.
> It's that really the only reliable way to define compiler arguments
> like -mcpu= for all compiler invocations?
It is one way. Another way is to set the cache entry directly:
set(CMAKE_CXX_FLAGS "-mcpu=..." CACHE STRING "C++ flags")
Note that CMAKE_CXX_FLAGS is propagated by try_compile automatically.
The above two approaches are actually just trying to get a toolchain
file to have a say in the initial CMAKE_CXX_FLAGS cache entry value
of the main project.
-Brad
More information about the CMake
mailing list