[cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty
When find_dependency is called like this: find_dependency(Foo ) CMake fails with: CMake Error at /home/aurelien/opt/kf5/share/cmake-3.0/Modules/CMakeFindDependencyMacro.cmake:34 (if): if given arguments: STREQUAL EXACT Unknown arguments specified Attached patch fixes this. AurélienFrom 5e03c4e6babd9730c46986f4b6643502a5626583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= agat...@kde.org Date: Thu, 13 Mar 2014 10:36:24 +0100 Subject: [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty --- Modules/CMakeFindDependencyMacro.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake index 99ffca8..7780538 100644 --- a/Modules/CMakeFindDependencyMacro.cmake +++ b/Modules/CMakeFindDependencyMacro.cmake @@ -31,14 +31,14 @@ macro(find_dependency dep) if (NOT ${dep}_FOUND) set(cmake_fd_version) if (${ARGC} GREATER 1) - if (${ARGV1} STREQUAL EXACT) + if (${ARGV1} STREQUAL EXACT) message(FATAL_ERROR Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified) endif() set(cmake_fd_version ${ARGV1}) endif() set(cmake_fd_exact_arg) if(${ARGC} GREATER 2) - if (NOT ${ARGV2} STREQUAL EXACT) + if (NOT ${ARGV2} STREQUAL EXACT) message(FATAL_ERROR Invalid arguments to find_dependency) endif() set(cmake_fd_exact_arg EXACT) -- 1.8.3.2 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty
Aurélien Gâteau wrote: Stephen Kelly wrote: Aurélien Gâteau wrote: Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty The user code has an error and your patch silently hides it. How is that an improvement? Thank you for your kind words. Here is an updated patch. Actually previous patch was still wrong, since some versions may evaluate to 0. Testing with STREQUAL is safer I think. AurélienFrom 1fc266deb8e57f0236962a7eaf846b9ea41ed43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= agat...@kde.org Date: Thu, 13 Mar 2014 13:19:25 +0100 Subject: [PATCH] Give an helpful message if VERSION is empty, instead of a syntax error --- Modules/CMakeFindDependencyMacro.cmake | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake index 99ffca8..73efaae 100644 --- a/Modules/CMakeFindDependencyMacro.cmake +++ b/Modules/CMakeFindDependencyMacro.cmake @@ -31,14 +31,17 @@ macro(find_dependency dep) if (NOT ${dep}_FOUND) set(cmake_fd_version) if (${ARGC} GREATER 1) - if (${ARGV1} STREQUAL EXACT) + if (${ARGV1} STREQUAL ) +message(FATAL_ERROR Invalid arguments to find_dependency. VERSION is empty) + endif() + if (${ARGV1} STREQUAL EXACT) message(FATAL_ERROR Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified) endif() set(cmake_fd_version ${ARGV1}) endif() set(cmake_fd_exact_arg) if(${ARGC} GREATER 2) - if (NOT ${ARGV2} STREQUAL EXACT) + if (NOT ${ARGV2} STREQUAL EXACT) message(FATAL_ERROR Invalid arguments to find_dependency) endif() set(cmake_fd_exact_arg EXACT) -- 1.8.3.2 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty
Aurélien Gâteau wrote: Here is an updated patch. Hi, Without your patch with this code: find_dependency(Foo ) I get: CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:34 (if): if given arguments: STREQUAL EXACT Unknown arguments specified Call Stack (most recent call first): CMakeLists.txt:20 (find_dependency) and I can use that information and backtrace to find the bug in my code. If I write this code: find_dependency(Foo problem) I get CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:62 (find_package): find_package called with invalid argument problem Call Stack (most recent call first): CMakeLists.txt:20 (find_dependency) Does that case need to be handled in the find_dependency macro too? Does it need to validate that the version is a number? How strongly do you feel about this? Macros are already very hard to write correctly, and I am concerned that making the implementation more complicated where not needed is likely to lead to more bugs. For me, letting the existing APIs (like if() and find_package()) do the error checking is better than attempting to wrap and validate everything in a macro. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty
Stephen Kelly wrote: Aurélien Gâteau wrote: Here is an updated patch. Hi, Without your patch with this code: find_dependency(Foo ) I get: CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:34 (if): if given arguments: STREQUAL EXACT Unknown arguments specified Call Stack (most recent call first): CMakeLists.txt:20 (find_dependency) and I can use that information and backtrace to find the bug in my code. If I write this code: find_dependency(Foo problem) I get CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:62 (find_package): find_package called with invalid argument problem Call Stack (most recent call first): CMakeLists.txt:20 (find_dependency) I am not sure what you are trying to show here. With the later output you can also backtrace to find the bug and you get a hint that grepping for problem might bring you to the error. The first output is much harder to make sense of if you are not used to CMake. For the record, I wrote this patch because a developer on #kde-devel was confused by the error and did not know how to investigate. Does that case need to be handled in the find_dependency macro too? Does it need to validate that the version is a number? I would say no. Especially since developers are known to be creative with version numbers, so this is best left to find_package(). How strongly do you feel about this? Macros are already very hard to write correctly, and I am concerned that making the implementation more complicated where not needed is likely to lead to more bugs. For me, letting the existing APIs (like if() and find_package()) do the error checking is better than attempting to wrap and validate everything in a macro. I agree macros should do simple checks only, but I consider checking if an argument is empty to be simple enough. Aurélien -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [Review request] Topic FindPkgConfig_Extend-PKG_CONFIG_PATH
On 11/03/14 14:51, Brad King wrote: Please add test cases for the FindPkgConfig interface and argument parsing errors. The test can just fake the location of pkg-config with a dummy if necessary. I added some unit test. I'm not done yet, but I would like to see if it works on all the architectures... Can I merge it to next to check the results on the dashboard? I will obviously take care to fix the errors tomorrow... Cheers, Daniele -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [Review request] Topic FindPkgConfig_Extend-PKG_CONFIG_PATH
On 03/13/2014 02:54 PM, Daniele E. Domenichelli wrote: I added some unit test. I'm not done yet, but I would like to see if it works on all the architectures... Can I merge it to next to check the results on the dashboard? I will obviously take care to fix the errors tomorrow... Yes. It should be just one independent test failure. In the worst case you can just revert the commit. Don't worry about noise commits in the middle of a topic. We can squash them out before merging to master. Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty
On 03/13/2014 08:20 AM, Aurélien Gâteau wrote: Actually previous patch was still wrong, since some versions may evaluate to 0. Testing with STREQUAL is safer I think. Applied, thanks: find_dependency: Give more helpful message if VERSION is empty http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34cd5fc4 -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] patch to enable various compressions for debian cpack
On 03/10/2014 01:37 AM, Sean D'Epagnier wrote: I have a project that needs the xz format for compression of the generated deb package as it greatly reduces the filesize. This works for me with success. Very nice, thanks. Applied here with minor tweaks: CPackDeb: Add option to set compression type http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc96b684 I tried to connect to kitware.com to submit the ssh keys so I can use git for this, but the site is blocked to me. The attached patch is small. As explained in CONTRIBUTING.rst at the top of the source tree, sending a patch here is the preferred method for new contributors anyway. What do you mean by blocked to me? What URL? Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] Correct platform related variables for Open Watcom compilers
Hi, I enclosed patch to fix COMPILER_VERSION variable value for Open Watcom compilers to be real version, not internal number. It fix also value for PLATFORM_ID and ARCHITECTURE_ID variables for Open Watcom compilers. Regards JiriFrom f9cd8c3af343595e979827622d9c6a1a49912c47 Mon Sep 17 00:00:00 2001 From: Jiri Malak malak.j...@gmail.com Date: Thu, 13 Mar 2014 22:05:22 +0100 Subject: [PATCH] Correct platform related variables for Open Watcom compilers correct COMPILER_VERSION variable to hold real Open Watcom compiler version Fill ARCHITECTURE_ID and PLATFORM_ID variables for Open Watcom compilers --- Modules/CMakeCCompilerId.c.in| 6 +++--- Modules/CMakeCXXCompilerId.cpp.in| 6 +++--- Modules/CMakePlatformId.h.in | 13 - Modules/InstallRequiredSystemLibraries.cmake | 4 Modules/Platform/Windows-wcl386.cmake| 8 5 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 52f9590..acab358 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -65,9 +65,9 @@ #elif defined(__WATCOMC__) # define COMPILER_ID Watcom - /* __WATCOMC__ = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) -# define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100) + /* __WATCOMC__ = VVRR + 1100 Open Watcom */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100 ) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) #elif defined(__SUNPRO_C) # define COMPILER_ID SunPro diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 25ceb3f..eee8ffe 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -70,9 +70,9 @@ #elif defined(__WATCOMC__) # define COMPILER_ID Watcom - /* __WATCOMC__ = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) -# define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100) + /* __WATCOMC__ = VVRR + 1100 Open Watcom */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100 ) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) #elif defined(__SUNPRO_CC) # define COMPILER_ID SunPro diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in index 1e41fec..2a3c1d8 100644 --- a/Modules/CMakePlatformId.h.in +++ b/Modules/CMakePlatformId.h.in @@ -1,5 +1,5 @@ /* Identify known platforms by name. */ -#if defined(__linux) || defined(__linux__) || defined(linux) +#if defined(__linux) || defined(__linux__) || defined(linux) || defined(__LINUX__) # define PLATFORM_ID Linux #elif defined(__CYGWIN__) @@ -107,6 +107,17 @@ # define ARCHITECTURE_ID # endif +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID I86 + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID X86 + +# else /* unknown architecture */ +# define ARCHITECTURE_ID +# endif + #else # define ARCHITECTURE_ID #endif diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 7e68e8f..4b551e6 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -374,10 +374,6 @@ if(WATCOM) string(REGEX MATCHALL [0-9]+ _watcom_version_list ${_compiler_version}) list(GET _watcom_version_list 0 _watcom_major) list(GET _watcom_version_list 1 _watcom_minor) - if(${_watcom_major} GREATER 11) -math(EXPR _watcom_major ${_watcom_major} - 11) - endif() - math(EXPR _watcom_minor ${_watcom_minor} / 10) set( __install__libs ${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll ${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll diff --git a/Modules/Platform/Windows-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake index d40d718..83382d9 100644 --- a/Modules/Platform/Windows-wcl386.cmake +++ b/Modules/Platform/Windows-wcl386.cmake @@ -93,16 +93,16 @@ if(NOT _CMAKE_WATCOM_VERSION) set(WATCOM17) set(WATCOM18) set(WATCOM19) - if(${_compiler_version} LESS 12.70) + if(${_compiler_version} LESS 1.7) set(WATCOM16 1) endif() - if(${_compiler_version} EQUAL 12.70) + if(${_compiler_version} EQUAL 1.7) set(WATCOM17 1) endif() - if(${_compiler_version} EQUAL 12.80) + if(${_compiler_version} EQUAL 1.8) set(WATCOM18 1) endif() - if(${_compiler_version} EQUAL 12.90) + if(${_compiler_version} EQUAL 1.9) set(WATCOM19 1) endif() endif() -- 1.7.11.msysgit.0 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at
Re: [CMake] Building a Mac OS X framework
On 3/10/14, neoagge...@gmail.com neoagge...@gmail.com wrote: Hi, Is there any *recent* guide that describes how to build a Mac OS X framework using CMake. All I could find in Google was a 2009 discussion in this list and a largely outdated (i think) page in the cmake wiki. I currently handle that in my project using a custom bash script, but I would like to know if it can be done directly with CMake. Thanks in advance, Aggelos Kolaitis -- I don't know of any recent guide, though the CMake documentation does include it. However, I suspect it hasn't changed much if at all. It can be done with CMake, well at least the most common stuff. Some of the more esoteric stuff I'm not sure about. -Eric -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Index CMake strings
Hallo, is it possible to index CMake strings. In C it would something like this: char c = Str[3]; Micha -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Index CMake strings
Hi Micha, the CMake equivalent code would be: string(SUBSTRING ${Str} 3 1 c) Petr On Thu, Mar 13, 2014 at 10:27 AM, Micha Renner micha.ren...@t-online.dewrote: Hallo, is it possible to index CMake strings. In C it would something like this: char c = Str[3]; Micha -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Fortran_FORMAT
Can someone provide an example of Fortran_FORMAT in use? I cannot find anything other than a definition of the property online. Does one use set_target_properties(tgt PROPERTIES Fortran_FORMAT FREE) ? That doesn't seem to alter the compiler flags. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Fortran_FORMAT
On 13.03.2014 17:40, Jack Stalnaker wrote: Can someone provide an example of Fortran_FORMAT in use? I cannot find anything other than a definition of the property online. Does one use I am not much of a Fortran person but: cmake_minimum_required(VERSION 2.8.12) project(Foo Fortran) add_executable(free free.f) set_target_properties(free PROPERTIES Fortran_FORMAT FREE) add_executable(fixed fixed.f) set_target_properties(fixed PROPERTIES Fortran_FORMAT FIXED) Produces the following compile command on my system (with the gnu Fortran compiler): /usr/bin/f95-ffixed-form -c /home/ngladitz/src/test/fortran/fixed.f -o CMakeFiles/fixed.dir/fixed.f.o /usr/bin/f95-ffree-form -c /home/ngladitz/src/test/fortran/free.f -o CMakeFiles/free.dir/free.f.o The respective -ffixed-form -ffree-form options are compiler specific. Which compiler are you using? Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Linking with boost
Hi, Our project uses boost on Windows. Except thread library, all other library need to be linked statically. To achieve this, what I did is this ADD_DEFINITIONS(-D BOOST_THREAD_DYN_DLL) set(Boost_USE_STATIC_LIBSON) set(Boost_USE_MULTITHREADED ON) find_package( Boost COMPONENTS thread system date_time regex filesystem chrono) As per boost documentation, in windows the static boost libraries are started with the name libboost*.lib and the import libraries of dlls start with boost*. If I turn ON or OFF Boost_USE_STATIC_LIBS, the value returned by GET_FILENAME_COMPONENT(BFILESYS ${Boost_FILESYSTEM_LIBRARY_RELEASE} NAME_WE) is always C:/Program Files/boost_1_53_0/stage/lib/libboost_filesystem-vc100-mt-1_53.lib I was expecting that, if the Boost_USE_STATIC_LIBS is ON, the output to be *lib*boost_filesystem-vc100-mt-1_53.lib and if the Boost_USE_STATIC_LIBS is OFF, the output to be boost_filesystem-vc100-mt-1_53.lib. Is anything going wrong here? Can anybody clarify this? Thanks, Lloyd -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-938-g30c878a
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 30c878a46f6d34551f2545faf59324e68364e249 (commit) via 8e43e0c3ddb85a5d2bd464e04d7a8cd251e2d1cb (commit) from 0d2616536a4815b4859ceb7770f8f7cbdaacd2f5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30c878a46f6d34551f2545faf59324e68364e249 commit 30c878a46f6d34551f2545faf59324e68364e249 Merge: 0d26165 8e43e0c Author: Stephen Kelly steve...@gmail.com AuthorDate: Thu Mar 13 05:13:22 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 05:13:22 2014 -0400 Merge topic 'fix-Qt5-windows-build' into next 8e43e0c3 Link to IMPORTED targets with Qt 4. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e43e0c3ddb85a5d2bd464e04d7a8cd251e2d1cb commit 8e43e0c3ddb85a5d2bd464e04d7a8cd251e2d1cb Author: Stephen Kelly steve...@gmail.com AuthorDate: Thu Mar 13 10:12:02 2014 +0100 Commit: Stephen Kelly steve...@gmail.com CommitDate: Thu Mar 13 10:12:02 2014 +0100 Link to IMPORTED targets with Qt 4. The IMPORTED targets have the CMP0020 logic encoded into them. diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 31fd5c4..7ba44fd 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -50,6 +50,8 @@ else() include(${QT_USE_FILE}) + set(QT_LIBRARIES Qt4::QtGui) + if(WIN32 AND EXISTS ${QT_QMAKE_EXECUTABLE}) get_filename_component(_Qt_BIN_DIR ${QT_QMAKE_EXECUTABLE} PATH) if(EXISTS ${_Qt_BIN_DIR}/QtCore4.dll) --- Summary of changes: Source/QtDialog/CMakeLists.txt |2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-954-g672709e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 672709e6052f051cd677f7c5c527b41d5bdb618d (commit) via 2cdd3056471daba9ca39caebeae167f644ba9e2c (commit) via ea62e7fbb9b3e4c78cedf7b73021ab48e832bd96 (commit) via bd4a5b135c80b4f3759fb21b162c458f4318f34c (commit) from 9df32c36872af6daeb361c2975dc6a520da04be2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=672709e6052f051cd677f7c5c527b41d5bdb618d commit 672709e6052f051cd677f7c5c527b41d5bdb618d Merge: 9df32c3 2cdd305 Author: Stephen Kelly steve...@gmail.com AuthorDate: Thu Mar 13 07:53:52 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 07:53:52 2014 -0400 Merge topic 'target-objects-refactor' into next 2cdd3056 cmGeneratorTarget: Compute target objects on demand ea62e7fb cmLocalGenerator: Add ComputeObjectFilenames method. bd4a5b13 cmGeneratorTarget: Constify cmSourceFile* in containers. diff --cc Source/cmLocalUnixMakefileGenerator3.h index 14543fb,8d1acb0..465e94d --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@@ -310,13 -309,13 +310,17 @@@ protected private: std::string ConvertShellCommand(std::string const cmd, RelativeRoot root); - std::string MakeLauncher(const cmCustomCommand cc, cmTarget* target, - RelativeRoot relative); + std::string MakeLauncher(cmCustomCommandGenerator const ccg, + cmTarget* target, RelativeRoot relative); + + virtual void ComputeObjectFilenames( +std::mapcmSourceFile const*, std::string mapping, +cmGeneratorTarget const* gt = 0); + virtual void ComputeObjectFilenames( + std::mapcmSourceFile const*, std::string mapping, + cmGeneratorTarget const* gt = 0); + friend class cmMakefileTargetGenerator; friend class cmMakefileExecutableTargetGenerator; friend class cmMakefileLibraryTargetGenerator; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cdd3056471daba9ca39caebeae167f644ba9e2c commit 2cdd3056471daba9ca39caebeae167f644ba9e2c Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Mar 11 20:39:01 2014 +0100 Commit: Stephen Kelly steve...@gmail.com CommitDate: Thu Mar 13 12:52:56 2014 +0100 cmGeneratorTarget: Compute target objects on demand Add a ComputeTargetObjects method to compute the object names. It takes a non-const reference to a mapping so that it can be extended in the future with parameters relevant to generator expression evaluation. Remove the old method from the generators which are now all functionally identical. Remove the supporting cmGeneratorTarget::AddObject method. It is no longer needed as the container member is populated directly. In a follow-up, the UseObjectLibraries usage may be replaced by a true generator expression evaluator for TARGET_OBJECTS. That will require generators to use cmGeneratorTarget::GetExternalObjects which is not currently the case for Xcode and VS generators. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8efd7bb..63e479b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -310,24 +310,15 @@ cmGeneratorTarget ::GetObjectSources(std::vectorcmSourceFile const* data) const { IMPLEMENT_VISIT(ObjectSources); - if (this-Target-GetType() == cmTarget::OBJECT_LIBRARY) -{ -this-ObjectSources = data; -} } // const std::string cmGeneratorTarget::GetObjectName(cmSourceFile const* file) { + this-ComputeTargetObjects(this-Objects); return this-Objects[file]; } -void cmGeneratorTarget::AddObject(cmSourceFile const* sf, - std::string constname) -{ -this-Objects[sf] = name; -} - // void cmGeneratorTarget::AddExplicitObjectName(cmSourceFile const* sf) { @@ -577,18 +568,45 @@ cmGeneratorTarget::UseObjectLibraries(std::vectorstd::string objs) const cmTarget* objLib = *ti; cmGeneratorTarget* ogt = this-GlobalGenerator-GetGeneratorTarget(objLib); -for(std::vectorcmSourceFile const*::const_iterator - si = ogt-ObjectSources.begin(); -si != ogt-ObjectSources.end(); ++si) + +ogt-ComputeTargetObjects(ogt-Objects); + +for(std::mapcmSourceFile const*, std::string::const_iterator +
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-957-g14830b3
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 14830b39d5042619927b1476aabf9c2a9c091907 (commit) via f7cf3b489331de41799ba8c4acbf86663a59f912 (commit) via fb5bc12610d7412d461bd4bd353f5471b634111f (commit) from 672709e6052f051cd677f7c5c527b41d5bdb618d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14830b39d5042619927b1476aabf9c2a9c091907 commit 14830b39d5042619927b1476aabf9c2a9c091907 Merge: 672709e f7cf3b4 Author: Stephen Kelly steve...@gmail.com AuthorDate: Thu Mar 13 08:01:15 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 08:01:15 2014 -0400 Merge topic 'target-objects-refactor' into next f7cf3b48 cmGeneratorTarget: Compute target objects on demand fb5bc126 cmLocalGenerator: Add ComputeObjectFilenames method. diff --cc Source/cmLocalUnixMakefileGenerator3.h index 465e94d,8d1acb0..5041345 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@@ -310,17 -309,13 +310,21 @@@ protected private: std::string ConvertShellCommand(std::string const cmd, RelativeRoot root); - std::string MakeLauncher(const cmCustomCommand cc, cmTarget* target, - RelativeRoot relative); + std::string MakeLauncher(cmCustomCommandGenerator const ccg, + cmTarget* target, RelativeRoot relative); + + virtual void ComputeObjectFilenames( +std::mapcmSourceFile const*, std::string mapping, +cmGeneratorTarget const* gt = 0); + + virtual void ComputeObjectFilenames( +std::mapcmSourceFile const*, std::string mapping, +cmGeneratorTarget const* gt = 0); + virtual void ComputeObjectFilenames( + std::mapcmSourceFile const*, std::string mapping, + cmGeneratorTarget const* gt = 0); + friend class cmMakefileTargetGenerator; friend class cmMakefileExecutableTargetGenerator; friend class cmMakefileLibraryTargetGenerator; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7cf3b489331de41799ba8c4acbf86663a59f912 commit f7cf3b489331de41799ba8c4acbf86663a59f912 Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Mar 11 20:39:01 2014 +0100 Commit: Stephen Kelly steve...@gmail.com CommitDate: Thu Mar 13 13:00:35 2014 +0100 cmGeneratorTarget: Compute target objects on demand Add a ComputeTargetObjects method to compute the object names. It takes a non-const reference to a mapping so that it can be extended in the future with parameters relevant to generator expression evaluation. Remove the old method from the generators which are now all functionally identical. Remove the supporting cmGeneratorTarget::AddObject method. It is no longer needed as the container member is populated directly. In a follow-up, the UseObjectLibraries usage may be replaced by a true generator expression evaluator for TARGET_OBJECTS. That will require generators to use cmGeneratorTarget::GetExternalObjects which is not currently the case for Xcode and VS generators. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8efd7bb..63e479b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -310,24 +310,15 @@ cmGeneratorTarget ::GetObjectSources(std::vectorcmSourceFile const* data) const { IMPLEMENT_VISIT(ObjectSources); - if (this-Target-GetType() == cmTarget::OBJECT_LIBRARY) -{ -this-ObjectSources = data; -} } // const std::string cmGeneratorTarget::GetObjectName(cmSourceFile const* file) { + this-ComputeTargetObjects(this-Objects); return this-Objects[file]; } -void cmGeneratorTarget::AddObject(cmSourceFile const* sf, - std::string constname) -{ -this-Objects[sf] = name; -} - // void cmGeneratorTarget::AddExplicitObjectName(cmSourceFile const* sf) { @@ -577,18 +568,45 @@ cmGeneratorTarget::UseObjectLibraries(std::vectorstd::string objs) const cmTarget* objLib = *ti; cmGeneratorTarget* ogt = this-GlobalGenerator-GetGeneratorTarget(objLib); -for(std::vectorcmSourceFile const*::const_iterator - si = ogt-ObjectSources.begin(); -si != ogt-ObjectSources.end(); ++si) + +ogt-ComputeTargetObjects(ogt-Objects); + +for(std::mapcmSourceFile
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-961-g53c2115
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 53c2115be56c1acc0e6bb5f4d4b25449ae71efe5 (commit) via e4d6720033da3e95324a91dc7d22b8e1c9e34387 (commit) from de1fa74f1e35ae1e788c559d652aa615ead1e7b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53c2115be56c1acc0e6bb5f4d4b25449ae71efe5 commit 53c2115be56c1acc0e6bb5f4d4b25449ae71efe5 Merge: de1fa74 e4d6720 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 09:30:57 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 09:30:57 2014 -0400 Merge topic 'dev/faster-evis' into next e4d67200 Revert topic 'dev/faster-evis' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4d6720033da3e95324a91dc7d22b8e1c9e34387 commit e4d6720033da3e95324a91dc7d22b8e1c9e34387 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 09:31:15 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 09:31:15 2014 -0400 Revert topic 'dev/faster-evis' It will be revised and restored later. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 0043bd2..8650a58 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -102,4 +102,3 @@ All Policies /policy/CMP0048 /policy/CMP0049 /policy/CMP0050 - /policy/CMP0052 diff --git a/Help/policy/CMP0010.rst b/Help/policy/CMP0010.rst index 56674c1..01699e1 100644 --- a/Help/policy/CMP0010.rst +++ b/Help/policy/CMP0010.rst @@ -10,9 +10,6 @@ variable reference is an error. The OLD behavior for this policy is to warn about the error, leave the string untouched, and continue. The NEW behavior for this policy is to report an error. -If :policy:`CMP0052` is used, this policy has no effect and is treated as -always being NEW. - This policy was introduced in CMake version 2.6.3. CMake version |release| warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly. diff --git a/Help/policy/CMP0052.rst b/Help/policy/CMP0052.rst deleted file mode 100644 index 306b8dd..000 --- a/Help/policy/CMP0052.rst +++ /dev/null @@ -1,26 +0,0 @@ -CMP0052 - -Use new variable expansion rules. - -CMake 3.0 and lower used an older, slower implementation of variable expansion -which offered some behavior no longer allowed by the new parser. Specifically, -'@' expansion is no longer performed in files not configured using -:command:`configure_file` or the CONFIGURE signature of :command:`string` and -literal variable names are restricted to alphanumerics and the characters -./-+ and in environment variables () are also allowed. If variables with -other characters are required, use - -.. code-block:: cmake - - set(varname disallowschars) - message(${${varname}}) - -This policy also enforces :policy:`CMP0010` unconditionally. - -The OLD behavior for this policy is to use the old variable expansion parser. -The NEW behavior is to use the new variable expansion rules. - -This policy was introduced in CMake version 3.1. CMake version |release| warns -when the policy is not set and uses OLD behavior. Use the cmake_policy -command to set it to OLD or NEW explicitly. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index df4d305..92177c8 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -157,7 +157,6 @@ void cmMakefile::Initialize() this-cmDefineRegex.compile(#cmakedefine[ \t]+([A-Za-z_0-9]*)); this-cmDefine01Regex.compile(#cmakedefine01[ \t]+([A-Za-z_0-9]*)); this-cmAtVarRegex.compile((@[A-Za-z_0-9/.+-]+@)); - this-cmNamedCurly.compile(^[A-Za-z0-9/_.+-]+{); // Enter a policy level for this directory. this-PushPolicy(); @@ -2529,106 +2528,23 @@ const char *cmMakefile::ExpandVariablesInString(std::string source, bool removeEmpty, bool replaceAt) const { - if ( source.find_first_of($@\\) == source.npos) + if ( source.empty() || source.find_first_of($@\\) == source.npos) { return source.c_str(); } - bool compareResults = false; - cmake::MessageType mtype = cmake::LOG; - std::string errorstr; - std::string original; - - // Sanity check the @ONLY mode. - if(atOnly (!noEscapes || !removeEmpty)) -{ -// This case should never be called. At-only is for -// configure-file/string which always does no escapes. -this-IssueMessage(cmake::INTERNAL_ERROR, - ExpandVariablesInString @ONLY called -
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-963-g28fe80f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 28fe80f5c620c4e272bb55debebcedc188796f03 (commit) via e2925247b058c50342144486f328f482188f413e (commit) from 53c2115be56c1acc0e6bb5f4d4b25449ae71efe5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=28fe80f5c620c4e272bb55debebcedc188796f03 commit 28fe80f5c620c4e272bb55debebcedc188796f03 Merge: 53c2115 e292524 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 09:33:45 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 09:33:45 2014 -0400 Merge topic 'cxx11' into next e2925247 Revert topic 'cxx11' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2925247b058c50342144486f328f482188f413e commit e2925247b058c50342144486f328f482188f413e Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 09:33:56 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 09:33:56 2014 -0400 Revert topic 'cxx11' It will be replaced by an alternative compiler features interface. diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 63d3de3..7a06be6 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -80,7 +80,6 @@ All Modules /module/FindBullet /module/FindBZip2 /module/FindCABLE - /module/FindCXXFeatures /module/FindCoin3D /module/FindCUDA /module/FindCups diff --git a/Help/module/FindCXXFeatures.rst b/Help/module/FindCXXFeatures.rst deleted file mode 100644 index 328f8db..000 --- a/Help/module/FindCXXFeatures.rst +++ /dev/null @@ -1 +0,0 @@ -.. cmake-module:: ../../Modules/FindCXXFeatures.cmake diff --git a/Modules/FindCXXFeatures.cmake b/Modules/FindCXXFeatures.cmake deleted file mode 100644 index 389aef9..000 --- a/Modules/FindCXXFeatures.cmake +++ /dev/null @@ -1,165 +0,0 @@ -#.rst: -# FindCXXFeatures -# --- -# -# Check which features of the C++ standard the compiler supports -# -# When found it will set the following variables:: -# -# CXX11_COMPILER_FLAGS - the compiler flags needed to get C++11 features -# -# CXXFeatures_auto_FOUND- auto keyword -# CXXFeatures_class_override_final_FOUND- override and final keywords for classes and methods -# CXXFeatures_constexpr_FOUND - constexpr keyword -# CXXFeatures_cstdint_header_FOUND - cstdint header -# CXXFeatures_decltype_FOUND- decltype keyword -# CXXFeatures_defaulted_functions_FOUND - default keyword for functions -# CXXFeatures_delegating_constructors_FOUND - delegating constructors -# CXXFeatures_deleted_functions_FOUND - delete keyword for functions -# CXXFeatures_func_identifier_FOUND - __func__ preprocessor constant -# CXXFeatures_initializer_list_FOUND- initializer list -# CXXFeatures_lambda_FOUND - lambdas -# CXXFeatures_long_long_FOUND - long long signed unsigned types -# CXXFeatures_nullptr_FOUND - nullptr -# CXXFeatures_rvalue_references_FOUND - rvalue references -# CXXFeatures_sizeof_member_FOUND - sizeof() non-static members -# CXXFeatures_static_assert_FOUND - static_assert() -# CXXFeatures_variadic_templates_FOUND - variadic templates - -#= -# Copyright 2011-2013 Rolf Eike Beer e...@sf-mail.de -# Copyright 2012 Andreas Weis -# Copyright 2013 Jan Kundrát -# -# 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.) - -if (NOT CMAKE_CXX_COMPILER_LOADED) -message(FATAL_ERROR CXXFeatures modules only works if language CXX is enabled) -endif () - -# -### Check for needed compiler flags -# -include(${CMAKE_CURRENT_LIST_DIR}/CheckCXXCompilerFlag.cmake) - -function(test_set_flag FLAG NAME) -check_cxx_compiler_flag(${FLAG} _HAS_${NAME}_FLAG) -if (_HAS_${NAME}_FLAG) -set(CXX11_COMPILER_FLAGS ${FLAG} PARENT_SCOPE) -endif () -endfunction() - -if (CMAKE_CXX_COMPILER_ID STREQUAL XL) -test_set_flag(-qlanglvl=extended0x CXX0x) -elseif (CMAKE_CXX_COMPILER_ID
[Cmake-commits] CMake branch, master, updated. v3.0.0-rc1-286-ge1a671c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via e1a671c7d821e3e240fc2eaf60b0572c8aed31e6 (commit) via d83245a34f870c373c6db8de94792608f133be58 (commit) from 4a6a59a120eeb9a60e0da77eb701af80439a34db (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1a671c7d821e3e240fc2eaf60b0572c8aed31e6 commit e1a671c7d821e3e240fc2eaf60b0572c8aed31e6 Merge: 4a6a59a d83245a Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 09:36:06 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 09:36:06 2014 -0400 Merge topic 'fix-CMP0046-warning' d83245a3 cmTarget: Don't create duplicate backtraces in CMP0046 warning diff --cc Source/cmTarget.cxx index c785192,3fb79d8..ca34aea --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@@ -416,13 -401,12 +416,12 @@@ void cmTarget::SetMakefile(cmMakefile* } // -void cmTarget::AddUtility(const char *u, cmMakefile *makefile) +void cmTarget::AddUtility(const std::string u, cmMakefile *makefile) { - this-Utilities.insert(u); - if(makefile) - { + if(this-Utilities.insert(u).second makefile) + { makefile-GetBacktrace(UtilityBacktraces[u]); - } + } } // --- Summary of changes: Source/cmTarget.cxx |7 +++ .../CMP0046-Duplicate-result.txt} |0 ...ing-dependency-stderr.txt = CMP0046-Duplicate-stderr.txt} |7 --- Tests/RunCMake/CMP0046/CMP0046-Duplicate.cmake|9 + Tests/RunCMake/CMP0046/RunCMakeTest.cmake |1 + Tests/RunCMake/{CMP0022 = CMP0046}/empty.cpp |0 6 files changed, 17 insertions(+), 7 deletions(-) copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt = CMP0046/CMP0046-Duplicate-result.txt} (100%) copy Tests/RunCMake/CMP0046/{CMP0046-WARN-missing-dependency-stderr.txt = CMP0046-Duplicate-stderr.txt} (65%) create mode 100644 Tests/RunCMake/CMP0046/CMP0046-Duplicate.cmake copy Tests/RunCMake/{CMP0022 = CMP0046}/empty.cpp (100%) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v3.0.0-rc1-288-g5ef2bb4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 5ef2bb4b86c16fc5d5e2a2b4de1b647c9007f8bf (commit) via ae32622bcfe4aee667b749f89e61d9a4fe44c762 (commit) from e1a671c7d821e3e240fc2eaf60b0572c8aed31e6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ef2bb4b86c16fc5d5e2a2b4de1b647c9007f8bf commit 5ef2bb4b86c16fc5d5e2a2b4de1b647c9007f8bf Merge: e1a671c ae32622 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 09:36:08 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 09:36:08 2014 -0400 Merge topic 'string-apis-fix-cmake-gui' ae32622b cmake-gui: Fix handling of missing CMAKE_EXTRA_GENERATOR (#14804) --- Summary of changes: Source/QtDialog/QCMake.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v3.0.0-rc1-292-g7477f01
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 7477f01ebd75e0886c50af5834262392b1649a21 (commit) via bc993f277ebd44fabe8312a85c5682eed011336d (commit) via 9a5c55441418ef79415b9a1b99c35192d2b8c1b0 (commit) via d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7 (commit) from 5ef2bb4b86c16fc5d5e2a2b4de1b647c9007f8bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7477f01ebd75e0886c50af5834262392b1649a21 commit 7477f01ebd75e0886c50af5834262392b1649a21 Merge: 5ef2bb4 bc993f2 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 09:36:10 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 09:36:10 2014 -0400 Merge topic 'generalize-cmCustomCommandGenerator' bc993f27 Generalize cmCustomCommandGenerator to more fields 9a5c5544 cmGlobalXCodeGenerator: Simplify handling of multiple outputs d45e7f34 cmCustomCommand: Return std::string from GetWorkingDirectory --- Summary of changes: Source/cmCustomCommand.cxx | 10 Source/cmCustomCommand.h |7 +-- Source/cmCustomCommandGenerator.cxx| 24 + Source/cmCustomCommandGenerator.h |5 ++ Source/cmGlobalXCodeGenerator.cxx | 81 Source/cmGlobalXCodeGenerator.h|4 +- Source/cmLocalGenerator.cxx| 13 ++--- Source/cmLocalGenerator.h |3 +- Source/cmLocalNinjaGenerator.cxx | 35 ++-- Source/cmLocalNinjaGenerator.h |7 +-- Source/cmLocalUnixMakefileGenerator3.cxx | 43 --- Source/cmLocalUnixMakefileGenerator3.h |9 ++-- Source/cmLocalVisualStudio6Generator.cxx | 41 -- Source/cmLocalVisualStudio7Generator.cxx | 24 + Source/cmLocalVisualStudioGenerator.cxx| 12 ++--- Source/cmLocalVisualStudioGenerator.h |4 +- Source/cmMakefileTargetGenerator.cxx | 28 +- Source/cmMakefileTargetGenerator.h |4 +- Source/cmNinjaNormalTargetGenerator.cxx|5 +- Source/cmNinjaTargetGenerator.cxx |4 +- Source/cmNinjaUtilityTargetGenerator.cxx | 11 ++-- Source/cmVisualStudio10TargetGenerator.cxx | 23 22 files changed, 217 insertions(+), 180 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-967-gafe78f6
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via afe78f6324a0e179b5f3ad09751773c5a29bbee4 (commit) via 7477f01ebd75e0886c50af5834262392b1649a21 (commit) via 5ef2bb4b86c16fc5d5e2a2b4de1b647c9007f8bf (commit) via e1a671c7d821e3e240fc2eaf60b0572c8aed31e6 (commit) from 28fe80f5c620c4e272bb55debebcedc188796f03 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=afe78f6324a0e179b5f3ad09751773c5a29bbee4 commit afe78f6324a0e179b5f3ad09751773c5a29bbee4 Merge: 28fe80f 7477f01 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 09:37:30 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 09:37:30 2014 -0400 Merge branch 'master' into next --- Summary of changes: hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v3.0.0-rc1-294-g82a7d54
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 82a7d54cfe75c399b66c888acfcb5ddb15af547b (commit) via 59d3898bc74c950a08b58b885867b7f0d18be8d5 (commit) from 7477f01ebd75e0886c50af5834262392b1649a21 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - --- Summary of changes: hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-972-g96d9f18
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 96d9f18a4ecda60feb212508eb37b289740c10d0 (commit) via 501b850a0517a0c342bf3241e93ed5761ef8aa8b (commit) from b2958d4c652e1492d631877b6d28e78d473897c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96d9f18a4ecda60feb212508eb37b289740c10d0 commit 96d9f18a4ecda60feb212508eb37b289740c10d0 Merge: b2958d4 501b850 Author: Stephen Kelly steve...@gmail.com AuthorDate: Thu Mar 13 09:56:06 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 09:56:06 2014 -0400 Merge topic 'fix-Qt5-windows-build' into next 501b850a Specify Qt4::QtGui dependency. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=501b850a0517a0c342bf3241e93ed5761ef8aa8b commit 501b850a0517a0c342bf3241e93ed5761ef8aa8b Author: Stephen Kelly steve...@gmail.com AuthorDate: Thu Mar 13 14:55:17 2014 +0100 Commit: Stephen Kelly steve...@gmail.com CommitDate: Thu Mar 13 14:55:17 2014 +0100 Specify Qt4::QtGui dependency. With CMake 2.8.4, it doesn't know it itself. diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 7ba44fd..608ee08 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -50,7 +50,7 @@ else() include(${QT_USE_FILE}) - set(QT_LIBRARIES Qt4::QtGui) + set(QT_LIBRARIES Qt4::QtGui Qt4::QtCore) if(WIN32 AND EXISTS ${QT_QMAKE_EXECUTABLE}) get_filename_component(_Qt_BIN_DIR ${QT_QMAKE_EXECUTABLE} PATH) --- Summary of changes: Source/QtDialog/CMakeLists.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-991-ge880369
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via e8803698fd37ad214347df5939c267548d77eb07 (commit) via b7af338c78b970a4cf2c92d5ea017131d9af4200 (commit) from ac4c26ca9cc431e2a7994e35d4a401c0e800eeff (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8803698fd37ad214347df5939c267548d77eb07 commit e8803698fd37ad214347df5939c267548d77eb07 Merge: ac4c26c b7af338 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 15:06:32 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 15:06:32 2014 -0400 Merge topic 'fix-Qt4-moc-command-depends' into next b7af338c Revert topic 'fix-Qt4-moc-command-depends' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7af338c78b970a4cf2c92d5ea017131d9af4200 commit b7af338c78b970a4cf2c92d5ea017131d9af4200 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 15:06:57 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 15:06:57 2014 -0400 Revert topic 'fix-Qt4-moc-command-depends' It will be revised and restored. diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index aca8996..8baf896 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -141,7 +141,7 @@ macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) set(_moc_extra_parameters_file @${_moc_parameters_file}) add_custom_command(OUTPUT ${outfile} COMMAND Qt4::moc ${_moc_extra_parameters_file} - DEPENDS ${infile} ${_moc_parameters_file} + DEPENDS ${infile} ${_moc_working_dir} VERBATIM) endmacro () diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 04a514f..a091cff 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -90,21 +90,8 @@ std::vectorstd::string const cmCustomCommandGenerator::GetOutputs() const return this-CC.GetOutputs(); } -#include assert.h - // std::vectorstd::string const cmCustomCommandGenerator::GetDepends() const { - this-Depends.clear(); - std::vectorstd::string depends = this-CC.GetDepends(); - for(std::vectorstd::string::const_iterator -i = depends.begin(); - i != depends.end(); ++i) -{ -cmsys::auto_ptrcmCompiledGeneratorExpression cge = this-GE-Parse(*i); -std::string rr = cge-Evaluate(this-Makefile, this-Config); -cmSystemTools::ExpandListArgument( - rr, this-Depends); -} - return this-Depends; + return this-CC.GetDepends(); } diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index a59f307..cbcdb41 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -28,7 +28,6 @@ class cmCustomCommandGenerator bool OldStyle; bool MakeVars; cmGeneratorExpression* GE; - mutable std::vectorstd::string Depends; public: cmCustomCommandGenerator(cmCustomCommand const cc, const std::string config, diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index fc6b881..db88749 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -604,9 +604,6 @@ private: bool IsUtility(std::string const dep); void CheckCustomCommand(cmCustomCommand const cc); void CheckCustomCommands(const std::vectorcmCustomCommand commands); - void FollowCommandDepends(cmCustomCommand const cc, -const std::string config, -std::setstd::string emitted); }; // @@ -823,48 +820,16 @@ cmTargetTraceDependencies } // Queue the custom command dependencies. - std::vectorstd::string configs; - std::setstd::string emitted; - this-Makefile-GetConfigurations(configs); - if (configs.empty()) -{ -this-FollowCommandDepends(cc, , emitted); -} - for(std::vectorstd::string::const_iterator ci = configs.begin(); - ci != configs.end(); ++ci) -{ -this-FollowCommandDepends(cc, *ci, emitted); -} -} - -// -void cmTargetTraceDependencies::FollowCommandDepends(cmCustomCommand const cc, - const std::string config, - std::setstd::string emitted) -{ - cmListFileBacktrace lfbt; -
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-993-g216fb9d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 216fb9d9d1835cfb658686ddbe7bface46f7639a (commit) via 9589c70b0b89f462b6325c815963c118cb1e16e1 (commit) from e8803698fd37ad214347df5939c267548d77eb07 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=216fb9d9d1835cfb658686ddbe7bface46f7639a commit 216fb9d9d1835cfb658686ddbe7bface46f7639a Merge: e880369 9589c70 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 15:14:23 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 15:14:23 2014 -0400 Merge topic 'different-python-header-libs-exe-0013794' into next 9589c70b FindPythonInterp: Document instead of warn find_package order. (#13794) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9589c70b0b89f462b6325c815963c118cb1e16e1 commit 9589c70b0b89f462b6325c815963c118cb1e16e1 Author: Matt McCormick matt.mccorm...@kitware.com AuthorDate: Thu Mar 13 11:19:11 2014 -0400 Commit: Matt McCormick matt.mccorm...@kitware.com CommitDate: Thu Mar 13 11:22:32 2014 -0400 FindPythonInterp: Document instead of warn find_package order. (#13794) Document in both FindPythonInterp.cmake and FindPythonLibs.cmake that find_package(PythonInterp) should be called before find_package(PythonLibs). This prevents warnings when a project does find_package(PythonInterp) find_package(PythonLibs) then later another find_package(PythonInterp) Suggested-by: Brad King brad.k...@kitware.com diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index 9a2dbcc..f8ff5d8 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -27,6 +27,10 @@ # of version numbers that should be taken into account when searching # for Python. You need to set this variable before calling # find_package(PythonInterp). +# +# If also calling find_package(PythonLibs), call find_package(PythonInterp) +# first to get the currently active Python version by default with a consistent +# version of PYTHON_LIBRARIES. #= # Copyright 2005-2010 Kitware, Inc. @@ -84,7 +88,6 @@ if(DEFINED PYTHONLIBS_VERSION_STRING) list(GET _PYTHONLIBS_VERSION 0 _PYTHONLIBS_VERSION_MAJOR) list(GET _PYTHONLIBS_VERSION 1 _PYTHONLIBS_VERSION_MINOR) list(APPEND _Python_VERSIONS ${_PYTHONLIBS_VERSION_MAJOR}.${_PYTHONLIBS_VERSION_MINOR}) - message(AUTHOR_WARNING Call find_package(PythonInterp) before find_package(PythonLibs) to get the currently active Python version by default.) endif() # Search for the current active python version first list(APPEND _Python_VERSIONS ;) diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index 656ed7b..1f90f5b 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -31,6 +31,10 @@ # # PYTHON_LIBRARY - path to the python library # PYTHON_INCLUDE_DIR - path to where Python.h is found +# +# If also calling find_package(PythonInterp), call find_package(PythonInterp) +# first to get the currently active Python version by default with a consistent +# version of PYTHON_LIBRARIES. #= # Copyright 2001-2009 Kitware, Inc. --- Summary of changes: Modules/FindPythonInterp.cmake |5 - Modules/FindPythonLibs.cmake |4 2 files changed, 8 insertions(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-995-g8e9638f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 8e9638fb9829dd4239e6dde59c94ad03c21283e9 (commit) via 328c217960ac3ee92270739a2dc4fc9d566789c3 (commit) from 216fb9d9d1835cfb658686ddbe7bface46f7639a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e9638fb9829dd4239e6dde59c94ad03c21283e9 commit 8e9638fb9829dd4239e6dde59c94ad03c21283e9 Merge: 216fb9d 328c217 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 15:15:11 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 15:15:11 2014 -0400 Merge topic 'doc-cmake-developer-no-cmStdString' into next 328c2179 Help: Drop cmStdString from cmake-developer(7) examples http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=328c217960ac3ee92270739a2dc4fc9d566789c3 commit 328c217960ac3ee92270739a2dc4fc9d566789c3 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 15:11:08 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 15:11:22 2014 -0400 Help: Drop cmStdString from cmake-developer(7) examples The type no longer exists within CMake. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 376b56c..d025d63 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -55,7 +55,7 @@ used in a comparison with the iterator returned by ``end()``: .. code-block:: c++ - const std::setcmStdString someSet = getSet(); + const std::setstd::string someSet = getSet(); if (someSet.find(needle) == someSet.end()) // Wrong { // ... @@ -66,8 +66,8 @@ The return value of ``find()`` must be assigned to an intermediate .. code-block:: c++ - const std::setcmStdString someSet; - const std::setcmStdString::const_iterator i = someSet.find(needle); + const std::setstd::string someSet; + const std::setstd::string::const_iterator i = someSet.find(needle); if (i != propSet.end()) // Ok { // ... @@ -110,7 +110,7 @@ conversion is not allowed: .. code-block:: c++ - std::setcmStdString theSet; + std::setconst char* theSet; std::vectorstd::string theVector; theVector.insert(theVector.end(), theSet.begin(), theSet.end()); // Wrong @@ -118,9 +118,9 @@ A loop must be used instead: .. code-block:: c++ - std::setcmStdString theSet; + std::setconst char* theSet; std::vectorstd::string theVector; - for(std::setcmStdString::iterator li = theSet.begin(); + for(std::setconst char*::iterator li = theSet.begin(); li != theSet.end(); ++li) { theVector.push_back(*li); --- Summary of changes: Help/manual/cmake-developer.7.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1000-g8adfd13
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 8adfd132d97ba3e1f956fe4010777e2dee0320f5 (commit) via a25b809f2075828e5ae488f74d85f5a31940460a (commit) via 9914e7cd95b29ee85653ab952a377f61dabd5190 (commit) via 34cd5fc451f8ff732ba192165ddf344dd9adcc68 (commit) via d363cbf3156c5e8ef160ffbb45cfa269addebb50 (commit) from 8e9638fb9829dd4239e6dde59c94ad03c21283e9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8adfd132d97ba3e1f956fe4010777e2dee0320f5 commit 8adfd132d97ba3e1f956fe4010777e2dee0320f5 Merge: 8e9638f a25b809 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 15:58:26 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 15:58:26 2014 -0400 Merge topic 'fix-find_dependency-empty-version' into next a25b809f Tests: Check find_dependency empty extra arguments 9914e7cd Merge branch 'fix-find_dependency-empty-version' 34cd5fc4 find_dependency: Give more helpful message if VERSION is empty d363cbf3 Tests: Make RunCMake.find_dependency tolerate line number changes http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a25b809f2075828e5ae488f74d85f5a31940460a commit a25b809f2075828e5ae488f74d85f5a31940460a Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 15:49:08 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 15:57:03 2014 -0400 Tests: Check find_dependency empty extra arguments Add cases for empty arg 2 and arg 3. diff --git a/Tests/RunCMake/find_dependency/RunCMakeTest.cmake b/Tests/RunCMake/find_dependency/RunCMakeTest.cmake index b85104a..9403136 100644 --- a/Tests/RunCMake/find_dependency/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_dependency/RunCMakeTest.cmake @@ -1,5 +1,7 @@ include(RunCMake) run_cmake(EXACT-no-version) +run_cmake(empty-version) +run_cmake(empty-arg-3) run_cmake(invalid-arg-3) run_cmake(extra-args) diff --git a/Tests/RunCMake/find_dependency/empty-arg-3-result.txt b/Tests/RunCMake/find_dependency/empty-arg-3-result.txt new file mode 100644 index 000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt b/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt new file mode 100644 index 000..bf9b02b --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency +Call Stack \(most recent call first\): + empty-arg-3.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/empty-arg-3.cmake b/Tests/RunCMake/find_dependency/empty-arg-3.cmake new file mode 100644 index 000..b08200a --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 1.2 ) diff --git a/Tests/RunCMake/find_dependency/empty-version-result.txt b/Tests/RunCMake/find_dependency/empty-version-result.txt new file mode 100644 index 000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/empty-version-stderr.txt b/Tests/RunCMake/find_dependency/empty-version-stderr.txt new file mode 100644 index 000..b5e9f46 --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency. VERSION is empty +Call Stack \(most recent call first\): + empty-version.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/empty-version.cmake b/Tests/RunCMake/find_dependency/empty-version.cmake new file mode 100644 index 000..e6f17cd --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 ) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9914e7cd95b29ee85653ab952a377f61dabd5190 commit 9914e7cd95b29ee85653ab952a377f61dabd5190 Merge: d363cbf 34cd5fc Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 15:52:32 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 15:56:48 2014 -0400 Merge branch 'fix-find_dependency-empty-version' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34cd5fc451f8ff732ba192165ddf344dd9adcc68 commit
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1002-ge58ca21
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via e58ca2139b9b6c922bdac72e3c7e0d44e2623d7c (commit) via bc96b6846512395bc427bf2880c8edfea188cb88 (commit) from 8adfd132d97ba3e1f956fe4010777e2dee0320f5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e58ca2139b9b6c922bdac72e3c7e0d44e2623d7c commit e58ca2139b9b6c922bdac72e3c7e0d44e2623d7c Merge: 8adfd13 bc96b68 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 16:35:18 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 16:35:18 2014 -0400 Merge topic 'cpack-deb-compression-types' into next bc96b684 CPackDeb: Add option to set compression type http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc96b6846512395bc427bf2880c8edfea188cb88 commit bc96b6846512395bc427bf2880c8edfea188cb88 Author: Sean D'Epagnier s...@depagnier.com AuthorDate: Mon Mar 10 13:37:26 2014 +0800 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 16:32:50 2014 -0400 CPackDeb: Add option to set compression type Add a CPACK_DEBIAN_COMPRESSION_TYPE option to set the compression type. Default to 'gzip' to preserve existing behavior. Use cmake -E tar for 'gzip', 'bzip2', and 'none'. Use system tar for 'lzma' and 'xz'. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index c79ef06..b210bbb 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -67,7 +67,12 @@ # * Mandatory : YES # * Default : 'devel' # -# The debian package section +# .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE +# +# * Mandatory : YES +# * Default : 'gzip' +# +# Possible values are: lzma, xz, bzip2 and gzip. # # .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY # @@ -390,6 +395,12 @@ if(NOT CPACK_DEBIAN_PACKAGE_PRIORITY) set(CPACK_DEBIAN_PACKAGE_PRIORITY optional) endif() +# Compression: (recommended) +if(NOT CPACK_DEBIAN_COMPRESSION_TYPE) + set(CPACK_DEBIAN_COMPRESSION_TYPE gzip) +endif() + + # Recommends: # You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 27e9d9f..dabc928 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -403,9 +403,35 @@ int cmCPackDebGenerator::createDeb() if (NULL != this-GetOption(CPACK_DEBIAN_FAKEROOT_EXECUTABLE)) { cmd += this-GetOption(CPACK_DEBIAN_FAKEROOT_EXECUTABLE); } - cmd += \; - cmd += cmakeExecutable; - cmd += \ -E tar cfz data.tar.gz ; + + const char* debian_compression_type = + this-GetOption(CPACK_DEBIAN_COMPRESSION_TYPE); + + std::string cmake_tar = , compression_modifier = a, compression_suffix; + if(!strcmp(debian_compression_type, lzma)) { + compression_suffix = .lzma; + } else if(!strcmp(debian_compression_type, xz)) { + compression_suffix = .xz; + } else if(!strcmp(debian_compression_type, bzip2)) { + compression_suffix = .bz2; + compression_modifier = j; + cmake_tar += \ + std::string(cmakeExecutable) + \ -E ; + } else if(!strcmp(debian_compression_type, gzip)) { + compression_suffix = .gz; + compression_modifier = z; + cmake_tar += \ + std::string(cmakeExecutable) + \ -E ; + } else if(!strcmp(debian_compression_type, none)) { + compression_suffix = ; + compression_modifier = ; + cmake_tar += \ + std::string(cmakeExecutable) + \ -E ; + } else { + cmCPackLogger(cmCPackLog::LOG_ERROR, +Error unrecognized compression type: + debian_compression_type std::endl); + } + + cmd += cmake_tar + tar c + compression_modifier + f data.tar + + compression_suffix; // now add all directories which have to be compressed // collect all top level install dirs for that @@ -493,9 +519,7 @@ int cmCPackDebGenerator::createDeb() { cmd = this-GetOption(CPACK_DEBIAN_FAKEROOT_EXECUTABLE); } -cmd += \; -cmd += cmakeExecutable; -cmd += \ -E tar cfz control.tar.gz ./control ./md5sums; +cmd += cmake_tar + tar czf control.tar.gz ./control ./md5sums; const char* controlExtra = this-GetOption(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA); if( controlExtra ) @@ -514,7 +538,7 @@ int cmCPackDebGenerator::createDeb() if( cmsys::SystemTools::CopyFileIfDifferent( i-c_str(), localcopy.c_str()) ) { -// debian is picky and need relative to ./ path in the tar.gz +// debian is picky and need relative to ./ path in the tar.* cmd += ./; cmd += filenamename; } @@ -538,7
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1004-gfb049c8
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via fb049c818beeb339cf01c796449c3837021dfca0 (commit) via 9840320dff7d6bc0fc64d06271a639303ea53ce7 (commit) from e58ca2139b9b6c922bdac72e3c7e0d44e2623d7c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb049c818beeb339cf01c796449c3837021dfca0 commit fb049c818beeb339cf01c796449c3837021dfca0 Merge: e58ca21 9840320 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 16:37:45 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 16:37:45 2014 -0400 Merge topic 'ctest-intel-coverage' into next 9840320d CTest: Add support for Intel coverage files http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9840320dff7d6bc0fc64d06271a639303ea53ce7 commit 9840320dff7d6bc0fc64d06271a639303ea53ce7 Author: Volkan Gezer volkange...@gmail.com AuthorDate: Thu Feb 27 14:37:52 2014 +0100 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 16:18:10 2014 -0400 CTest: Add support for Intel coverage files By default, Intel compiler coverage tools generate HTML files as reports, but the option -txtlcov can be given to codecov to output a coverage file with LCov format. To use Intel coverage: * build the project with coverage flags * run the application * run profmerge * run codecov The output file will be build_dir/CodeCoverage/SRCFILEDIR.LCOV. Ask users to compile with -prof-dir${BUILD_DIR} instead of searching the entire build tree recursively to find coverage files. diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index f0b1124..cb6e56e 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -383,6 +383,12 @@ int cmCTestCoverageHandler::ProcessHandler() { return error; } + file_count += this-HandleLCovCoverage(cont); + error = cont.Error; + if ( file_count 0 ) +{ +return error; +} file_count += this-HandleTracePyCoverage(cont); error = cont.Error; if ( file_count 0 ) @@ -880,6 +886,13 @@ int cmCTestCoverageHandler::HandleGCovCoverage( std::string gcovExtraFlags = this-CTest-GetCTestConfiguration(CoverageExtraFlags); + // Immediately skip to next coverage option since codecov is only for Intel + // compiler + if ( gcovCommand == codecov ) +{ +return 0; +} + // Style 1 std::string st1gcovOutputRex1 = [0-9]+\\.[0-9]+% of [0-9]+ (source |)lines executed in file (.*)$; @@ -1296,6 +1309,270 @@ int cmCTestCoverageHandler::HandleGCovCoverage( return file_count; } +//-- +int cmCTestCoverageHandler::HandleLCovCoverage( + cmCTestCoverageHandlerContainer* cont) +{ + std::string lcovCommand += this-CTest-GetCTestConfiguration(CoverageCommand); + std::string lcovExtraFlags += this-CTest-GetCTestConfiguration(CoverageExtraFlags); + if ( lcovCommand != codecov ) +{ +cmCTestLog(this-CTest, HANDLER_VERBOSE_OUTPUT, +Not a valid Intel Coverage command. +std::endl); +return 0; +} + // There is only percentage completed output from LCOV + std::string st2lcovOutputRex3 = [0-9]+%; + cmsys::RegularExpression st2re3(st2lcovOutputRex3.c_str()); + + cmCTestLog(this-CTest, HANDLER_VERBOSE_OUTPUT, + This is coverage command: lcovCommand + std::endl); + + cmCTestLog(this-CTest, HANDLER_VERBOSE_OUTPUT, + These are coverage command flags: lcovExtraFlags + std::endl); + + std::vectorstd::string files; + this-FindLCovFiles(files); + std::vectorstd::string::iterator it; + + if ( files.size() == 0 ) +{ +cmCTestLog(this-CTest, HANDLER_VERBOSE_OUTPUT, + Cannot find any LCov coverage files. + std::endl); +// No coverage files is a valid thing, so the exit code is 0 +return 0; +} + std::string testingDir = this-CTest-GetBinaryDir(); + std::string tempDir = testingDir; + std::string currentDirectory = cmSystemTools::GetCurrentWorkingDirectory(); + + std::setstd::string missingFiles; + + std::string actualSourceFile = ; + cmCTestLog(this-CTest, HANDLER_OUTPUT, + Processing coverage (each . represents one file): std::endl); + cmCTestLog(this-CTest, HANDLER_OUTPUT, ); + int file_count = 0; + + // make sure output from lcov is in English! + cmCTestCoverageHandlerLocale locale_C; + static_castvoid(locale_C); + + // In intel compiler we have to call codecov only once in each executable + //
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1006-g35e7c94
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 35e7c9497a522f699b4f3145eeb611ec4d028bd8 (commit) via 7096885d78be9152cc3dd7e5cb697417b59981ce (commit) from fb049c818beeb339cf01c796449c3837021dfca0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35e7c9497a522f699b4f3145eeb611ec4d028bd8 commit 35e7c9497a522f699b4f3145eeb611ec4d028bd8 Merge: fb049c8 7096885 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 18:23:39 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Mar 13 18:23:39 2014 -0400 Merge topic 'cpack-deb-compression-types' into next 7096885d CPackDeb: Default to gzip compression http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7096885d78be9152cc3dd7e5cb697417b59981ce commit 7096885d78be9152cc3dd7e5cb697417b59981ce Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 13 18:22:07 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 13 18:22:40 2014 -0400 CPackDeb: Default to gzip compression If a project unsets CPACK_DEBIAN_COMPRESSION_TYPE then use 'gzip' by default. diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index dabc928..936942b 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -406,6 +406,10 @@ int cmCPackDebGenerator::createDeb() const char* debian_compression_type = this-GetOption(CPACK_DEBIAN_COMPRESSION_TYPE); + if(!debian_compression_type) +{ +debian_compression_type = gzip; +} std::string cmake_tar = , compression_modifier = a, compression_suffix; if(!strcmp(debian_compression_type, lzma)) { --- Summary of changes: Source/CPack/cmCPackDebGenerator.cxx |4 1 file changed, 4 insertions(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v3.0.0-rc1-295-g9a026b9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 9a026b902b7c7c263e6c3a70f755f974e8953132 (commit) from 82a7d54cfe75c399b66c888acfcb5ddb15af547b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a026b902b7c7c263e6c3a70f755f974e8953132 commit 9a026b902b7c7c263e6c3a70f755f974e8953132 Author: Kitware Robot kwro...@kitware.com AuthorDate: Fri Mar 14 00:01:14 2014 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Fri Mar 14 00:01:14 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index be11dce..040cd27 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 0) -set(CMake_VERSION_PATCH 20140313) +set(CMake_VERSION_PATCH 20140314) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1010-g47344e2
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 47344e2137ab8b5059ed017baf3dbdbcad95a5a0 (commit) via 98692fd2c23c1eab242f89c133c12d05ee33b084 (commit) from bd029affc891808ace5c3602d0c2223163f65d38 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47344e2137ab8b5059ed017baf3dbdbcad95a5a0 commit 47344e2137ab8b5059ed017baf3dbdbcad95a5a0 Merge: bd029af 98692fd Author: Clinton Stimpson clin...@elemtech.com AuthorDate: Fri Mar 14 00:04:53 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Mar 14 00:04:53 2014 -0400 Merge topic 'unicode-vs-projects' into next 98692fd2 Encoding: If configured, write Visual Studio project files as UTF-8. diff --cc Source/QtDialog/CMakeSetup.cxx index 1b04a00,e37bd9d..82fa3a3 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@@ -79,9 -79,11 +79,9 @@@ int main(int argc, char** argv QApplication app(argc, argv); - #if defined(KWSYS_CP_UTF8) + #if defined(CMAKE_ENCODING_UTF8) QTextCodec* utf8_codec = QTextCodec::codecForName(UTF-8); - QTextCodec::setCodecForCStrings(utf8_codec); QTextCodec::setCodecForLocale(utf8_codec); - QTextCodec::setCodecForTr(utf8_codec); #endif // clean out standard Qt paths for plugins, which we don't use anyway http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98692fd2c23c1eab242f89c133c12d05ee33b084 commit 98692fd2c23c1eab242f89c133c12d05ee33b084 Author: Clinton Stimpson clin...@elemtech.com AuthorDate: Thu Mar 13 06:59:49 2014 -0600 Commit: Clinton Stimpson clin...@elemtech.com CommitDate: Thu Mar 13 21:57:16 2014 -0600 Encoding: If configured, write Visual Studio project files as UTF-8. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 966e0f6..106cffc 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -24,6 +24,17 @@ endif() set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR}) +# for windows, we can use the utf-8 code page for conversions +# between wide and narrow strings +if(WIN32 AND KWSYS_ENCODING_DEFAULT_CODEPAGE MATCHES CP_UTF8) + set(CMAKE_ENCODING_UTF8 1) +endif() + +# ensure Unicode friendly APIs are used on Windows +if(WIN32) + add_definitions(-DUNICODE -D_UNICODE) +endif() + # configure the .h file configure_file( ${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 0dd01d8..4308a4d 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -55,11 +55,6 @@ else() endif() endif() - -if(WIN32 AND KWSYS_ENCODING_DEFAULT_CODEPAGE MATCHES CP_UTF8) - add_definitions(-DKWSYS_CP_UTF8) -endif() - set(SRCS AddCacheEntry.cxx AddCacheEntry.h diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 995929e..e37bd9d 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -79,7 +79,7 @@ int main(int argc, char** argv) QApplication app(argc, argv); -#if defined(KWSYS_CP_UTF8) +#if defined(CMAKE_ENCODING_UTF8) QTextCodec* utf8_codec = QTextCodec::codecForName(UTF-8); QTextCodec::setCodecForCStrings(utf8_codec); QTextCodec::setCodecForLocale(utf8_codec); diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index c5e95d0..2b0280d 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -16,4 +16,5 @@ #cmakedefine HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE #cmakedefine HAVE_UNSETENV #cmakedefine CMAKE_USE_ELF_PARSER +#cmakedefine CMAKE_ENCODING_UTF8 #define CMAKE_DATA_DIR /@CMAKE_DATA_DIR@ diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 320b440..42033c5 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -873,7 +873,8 @@ cmGlobalVisualStudio7Generator::WriteUtilityDepend(cmTarget const* target) std::string guid = this-GetGUID(pname.c_str()); fout -?xml version=\1.0\ encoding = \Windows-1252\?\n +?xml version=\1.0\ encoding = \ + this-Encoding() \?\n VisualStudioProject\n \tProjectType=\Visual C++\\n \tVersion=\ this-GetIDEVersion() 0\\n @@ -1038,3 +1039,14 @@ cmIDEFlagTable const* cmGlobalVisualStudio7Generator::GetExtraFlagTableVS7() { return cmVS7ExtraFlagTable; } + +std::string cmGlobalVisualStudio7Generator::Encoding() +{ + std::ostringstream encoding; +#ifdef CMAKE_ENCODING_UTF8 + encoding UTF-8; +#else + encoding Windows-1252; +#endif + return encoding.str(); +} diff --git