Re: [cmake-developers] [Review Request] Topic CMakePackageConfigHelpers_build_tree
On 04/08/14 20:35, Brad King wrote: Please also add a check that the value given to the INSTALL_PREFIX option passes if(IS_ABSOLUTE). It does not make sense to have a relative value here. Done and merged to next. Thanks, 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/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0015067]: include does not find files in current directory if module path discovered through CMAKE_PREFIX_PATH
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=15067 == Reported By:Alexander Jones Assigned To: == Project:CMake Issue ID: 15067 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2014-08-07 06:56 EDT Last Modified: 2014-08-07 06:56 EDT == Summary:include does not find files in current directory if module path discovered through CMAKE_PREFIX_PATH Description: Setup: someprefix/share/mytest/cmake/MyTestConfig.cmake: include(somethingspecific) --- someprefix/share/mytest/cmake/somethingspecific.cmake: message(Hello, World!) --- somesourcecode/CMakeLists.txt cmake_minimum_required(VERSION 3.0) find_package(MyTest REQUIRED CONFIG) --- Build with cmake .. -DCMAKE_PREFIX_PATH=someprefix CMake Error at (snip)/someprefix/share/mytest/cmake/MyTestConfig.cmake:1 (include): include could not find load file: somethingspecific Call Stack (most recent call first): CMakeLists.txt:3 (find_package) This is the setup LLVM has for its config, and it does not work in our setup for the same reason. Manually adding someprefix/share/mytest/cmake to the CMAKE_MODULE_PATH fixes this, but is that not implied from someprefix being on the CMAKE_PREFIX_PATH? Our scenario is that we have many isolated package installations distributed across many prefixes, each with an entry on CMAKE_PREFIX_PATH. Thanks == Issue History Date ModifiedUsername FieldChange == 2014-08-07 06:56 Alexander JonesNew Issue 2014-08-07 06:56 Alexander JonesFile Added: cmakebugtest.tar.gz == -- 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/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0015068]: Eclipse cannot run Makefile (mingw)
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=15068 == Reported By:A. Klitzing Assigned To: == Project:CMake Issue ID: 15068 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2014-08-07 10:44 EDT Last Modified: 2014-08-07 10:44 EDT == Summary:Eclipse cannot run Makefile (mingw) Description: Since cmake 3.0 we cannot build from eclipse (tried Kepler and Luna). We uses the eclipse cdt4 mingw-generator on windows to create the projects. After import in eclipse there will be no reaction if we try to run the build or a special target of the Makefile. The same workflow works with cmake 2.8.x flawlessly. The build with cmake 3 works without problems if we use the terminal and run it manually with mingw32-make. Steps to Reproduce: 1. Take your project 2. Run cmake-gui and configure the project 3. Select eclipse cdt4 mingw generator 4. Import from existing project in eclipse 5. Select build all or double click on a special target 6. Eclipse does nothing Expected: Run the makefile == Issue History Date ModifiedUsername FieldChange == 2014-08-07 10:44 A. KlitzingNew Issue == -- 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/mailman/listinfo/cmake-developers
[cmake-developers] [patch] fix Info.plist parser
hi all, attached patch adds support for parsing Info.plist files which are generated with mac os9-style line endings (\r). would be great if this fix can be applied (and if it would make it into 3.0.2). thanks, tim From 0b1420c8c22885f3a4a086510a2041bc80be7732 Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Thu, 7 Aug 2014 19:30:27 +0200 Subject: [PATCH] cmake: allow Info.plist files which use os9-style \r line endings Signed-off-by: Tim Blechmann t...@klingt.org --- Modules/BundleUtilities.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index b896de2..60d01b5 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -237,6 +237,7 @@ function(get_bundle_main_executable bundle result_var) file(READ ${bundle}/Contents/Info.plist info_plist) string(REGEX REPLACE ; ; info_plist ${info_plist}) string(REGEX REPLACE \n ${eol_char}; info_plist ${info_plist}) +string(REGEX REPLACE \r ${eol_char}; info_plist ${info_plist}) # Scan the lines for keyCFBundleExecutable/key - the line after that # is the name of the main executable. -- 2.0.4 -- 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/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] New module: FindIce.cmake
Hi, I've written a module for finding the details of a ZeroC ICE installation, attached, which I thought might be of interest to a wider audience and be suitable for direct inclusion into cmake. I've attached the patch for this. The docs should be correct, but I'm not yet totally familiar with the cmake docs build, so it might possibly need some minor tweaking. Kind regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linuxhttp://people.debian.org/~rleigh/ `. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools `-GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800 From d797fef2c883b5fc9e6d19267b21c4f818befe50 Mon Sep 17 00:00:00 2001 From: Roger Leigh r.le...@dundee.ac.uk Date: Thu, 7 Aug 2014 18:37:36 +0100 Subject: [PATCH] FindIce: New module to find ZeroC Ice - autodetects Ice on all major platforms - allows building with all supported Visual Studio versions on Windows - autodetects the slice path on most platforms - separately detects the Ice programs, headers, slice files and libraries so that any Ice configuration or installation errors can be accurately reported, making diagnosis of Ice problems simpler --- Help/manual/cmake-modules.7.rst | 1 + Help/module/FindIce.rst | 1 + Modules/FindIce.cmake | 507 3 files changed, 509 insertions(+) create mode 100644 Help/module/FindIce.rst create mode 100644 Modules/FindIce.cmake diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 91fffe9..737057c 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -114,6 +114,7 @@ All Modules /module/FindHg /module/FindHSPELL /module/FindHTMLHelp + /module/FindIce /module/FindIcotool /module/FindImageMagick /module/FindITK diff --git a/Help/module/FindIce.rst b/Help/module/FindIce.rst new file mode 100644 index 000..3af9405 --- /dev/null +++ b/Help/module/FindIce.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/FindIce.cmake diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake new file mode 100644 index 000..f42b4ee --- /dev/null +++ b/Modules/FindIce.cmake @@ -0,0 +1,507 @@ +#.rst: +# FindIce +# --- +# +# Find the ZeroC Internet Communication Engine (ICE) programs, +# libraries and datafiles. +# +# Use this module by invoking find_package with the form:: +# +# find_package(Ice +# [version] [EXACT] # Minimum or EXACT version e.g. 3.5.1 +# [REQUIRED] # Fail with error if Ice is not found +# +# This module reports information about the Ice installation in +# several variables. General variables:: +# +# Ice_VERSION - Ice release version +# Ice_FOUND - true if the main programs and libraries were found +# +# Ice programs are reported in:: +# +# SLICE2CPP_EXECUTABLE - path to slice2cpp executable +# SLICE2CS_EXECUTABLE - path to slice2cs executable +# SLICE2FREEZEJ_EXECUTABLE - path to slice2freezej executable +# SLICE2FREEZE_EXECUTABLE - path to slice2freeze executable +# SLICE2HTML_EXECUTABLE - path to slice2html executable +# SLICE2JAVA_EXECUTABLE - path to slice2java executable +# SLICE2PHP_EXECUTABLE - path to slice2php executable +# SLICE2PY_EXECUTABLE - path to slice2py executable +# SLICE2RB_EXECUTABLE - path to slice2rb executable +# +# Ice libraries are reported in:: +# +# FREEZE_LIBRARY - Freeze library +# GLACIER2_LIBRARY - Glacier2 library +# ICE_LIBRARY - Ice library +# ICEBOX_LIBRARY - IceBox library +# ICEDB_LIBRARY - IceDB library +# ICEGRID_LIBRARY - IceGrid library +# ICEPATCH2_LIBRARY - IcePatch library +# ICESSL_LIBRARY - IceSSL library +# ICESTORM_LIBRARY - IceStorm library +# ICEUTIL_LIBRARY - IceUtil library +# ICEXML_LIBRARY - IceXML library +# SLICE_LIBRARY - Slice library +# +# Ice directories for C++ includes and slice includes are reported +# in:: +# +# ICE_BINARY_DIR - the directory containing the Ice programs +# ICE_INCLUDE_DIR - the directory containing the Ice headers +# ICE_SLICE_DIR - the directory containing the Ice slice interface definitions +# ICE_LIBRARY_DIR - the directory containing the Ice libraries +# +# This module reads hints about search results from variables:: +# +# ICE_HOME - the root of the Ice installation +# ICE_BINARY_DIR - the directory containing the Ice programs +# ICE_INCLUDE_DIR - the directory containing the Ice headers +# ICE_SLICE_DIR - the directory containing the Ice slice interface definitions +# ICE_LIBRARY_DIR - the directory containing the Ice libraries +# +# The environment variable :envvar:`ICE_HOME` may also be used, unless +# overridden by setting the ICE_HOME variable. +# +# .. note:: +# +# These variables are not all required to be set, and in most cases +# will not require setting at all unless multiple Ice versions are +# available and a specific version is required. On Windows, +# ICE_HOME is usually sufficient
Re: [cmake-developers] [patch] fix Info.plist parser
On 08/07/2014 01:36 PM, Tim Blechmann wrote: would be great if this fix can be applied I applied the patch with a slight revision to resolve conflicts with master: BundleUtilities: Allow Info.plist files which use CR line endings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=810f5cce Once it works there I will consider backporting it to 3.0. -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/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0015069]: Add support for OpenRISC 1000 (or1k)
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=15069 == Reported By:mafm Assigned To: == Project:CMake Issue ID: 15069 Category: (No Category) Reproducibility:always Severity: feature Priority: normal Status: new == Date Submitted: 2014-08-07 14:13 EDT Last Modified: 2014-08-07 14:13 EDT == Summary:Add support for OpenRISC 1000 (or1k) Description: From Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749004 From: Christian Svensson deb...@cmd.nu Date: Fri, 23 May 2014 01:05:56 +0200 Package: cmake Version: 2.8.12.1-1.2 Severity: wishlist Tags: upstream patch Dear Maintainer, Attached is a patch to add support for the OpenRISC 1000 architecture. == Issue History Date ModifiedUsername FieldChange == 2014-08-07 14:13 mafm New Issue 2014-08-07 14:13 mafm File Added: cmake-or1k.patch == -- 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/mailman/listinfo/cmake-developers
Re: [cmake-developers] [patch] fix Info.plist parser
would be great if this fix can be applied I applied the patch with a slight revision to resolve conflicts with master: BundleUtilities: Allow Info.plist files which use CR line endings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=810f5cce Once it works there I will consider backporting it to 3.0. great! thanks a lot! -- 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/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0015070]: CMake doesn't escape # properly in add_compile_options with Makefile generator
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=15070 == Reported By:Vitali Assigned To: == Project:CMake Issue ID: 15070 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2014-08-07 15:02 EDT Last Modified: 2014-08-07 15:02 EDT == Summary:CMake doesn't escape # properly in add_compile_options with Makefile generator Description: add_compile_options appears to generate the wrong escape sequence for: add_compile_options(-Wno-error=#warnings) when used in conjuction with the Makefile generator Steps to Reproduce: add_compile_options(-Wno-error=#warnings) Use makefile generator Look at flags.make: CXX_FLAGS = ... -Wno-error=#warnings ... It should be: CXX_FLAGS = -Wno-error=\#warnings due to shell-expansion (otherwise # gets treated as a comment). Additional Information: No amount of escaping in CMake fixes this. It looks like CMake is already aware of \ escaping for the Makefile generator but not for #: add_compile_options(-Wno-error=\#warnings) CXX_FLAGS = ... -Wno-error=#warnings ... add_compile_options(-Wno-error=\\#warnings) CXX_FLAGS = ... -Wno-error=\\#warnings ... add_compile_options(-Wno-error=\\\#warnings) CXX_FLAGS = ... -Wno-error=\\#warnings ... == Issue History Date ModifiedUsername FieldChange == 2014-08-07 15:02 Vitali New Issue == -- 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/mailman/listinfo/cmake-developers
Re: [CMake] cmake version/feature detection
If you know which version of cmake first introduced the feature you want to check for then you could base your decision on the values of these 3 cmake variables: CMAKE_MAJOR_VERSION CMAKE_MINOR_VERSION CMAKE_PATCH_VERSION -- Glenn On 5 August 2014 04:30, Leif Walsh leif.wa...@gmail.com wrote: Hi, I'm wondering what is the best way to do feature detection or version checking of cmake itself, in cmake. In particular, I'd like to check for the OBJECT library feature and either use it or fall back to our current mechanism if we're using an older cmake. -- Cheers, Leif -- 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/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://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Is it possible for a dependee to use the dependency LINKER_FLAGS ?
I just tried reproducing your 2 examples. Setup 1 works fine for me with no messages about policy CMP0022. The only way I could get that message produced was by omitting the cmake_minimum_required(VERSION 3.0) line. Are you sure you're running the exact same CMakeLists.txt file that you have posted here ? For setup 2 I get the same results as you. CMake seems to insist on converting the forward slash into a backwards slash, probably because it thinks it is a file path, which totally screws things up. I suspect this is a bug in cmake: adding linker flags like this works for linux because it doesn't mess with strings like -Wl,-Bstatic. The only workaround I can suggest is to set CMAKE_EXE_LINKER_FLAGS: if (MSVC) set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} /FORCE:Multiple) endif() which correctly adds the option you want but it will do it for all libraries in the current context. In order to only have it applied to the one library you would need to have a separate CMakeLists.txt for that library and add the lines above to adjust the CMAKE_EXE_LINKER_FLAGS only in that CMakeLists.txt. Then you would have to do and add_subdirectory(special_lib) somewhere in your higher level CMakeLists.txt. -- Glenn On 3 August 2014 07:43, Adrian M Negreanu gro...@gmail.com wrote: I've tested this with vs 2013 but a few things makes me think that using target_link_libraries is not for this type of usage. First, for setup 1: = CMakeLists.txt cmake_minimum_required(VERSION 3.0) add_library(A a.cpp) target_link_libraries(A INTERFACE -custom-flags) add_executable(E e.cpp) target_link_libraries(E A) ### Cmake warns me: CMake Warning (dev) in CMakeLists.txt: Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run cmake --help-policy CMP0022 for policy details. Use the cmake_policy command to set the policy and suppress this warning. Target A has an INTERFACE_LINK_LIBRARIES property. This should be preferred as the source of the link interface for this library but because CMP0022 is not set CMake is ignoring the property and using the link implementation as the link interface instead. INTERFACE_LINK_LIBRARIES: /FORCE:multiple For setup 2: = CMakeLists.txt cmake_minimum_required(VERSION 3.0) add_library(A a.cpp) set_target_properties(A PROPERTIES INTERFACE_LINK_LIBRARIES /FORCE:multiple) add_executable(E e.cpp) target_link_libraries(E A) ### Cmake works fine, _but_ /FORCE:multiple is seen as a file, which leads to error: 1-- Build started: Project: ZERO_CHECK, Configuration: Debug Win32 -- 2-- Build started: Project: A, Configuration: Debug Win32 -- 2 A.vcxproj - C:\Users\amnegrea\Debug\A.lib 3-- Build started: Project: E, Configuration: Debug Win32 -- 3LINK : fatal error LNK1104: cannot open file '\FORCE:multiple.obj' 4-- Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 -- 4Project not selected to build for this solution configuration == Build: 2 succeeded, 1 failed, 0 up-to-date, 1 skipped == On Sat, Aug 2, 2014 at 7:38 PM, Walter Gray chrysal...@gmail.com wrote: Glen is correct. You should take a look at the docs for interface modules here: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html#interface-libraries I also put up some examples of how to do this on github a while back. https://github.com/wal-rus/cmake-modules Hope that helps! Also for future googling the concept is called Usage Requirements. On Aug 2, 2014 8:11 AM, Glenn Coombs glenn.coo...@gmail.com wrote: I think that you can use the target_link_libraries command to do this: add_library(A a.cpp) target_link_libraries(A INTERFACE -custom-flags) -- Glenn On 30 July 2014 16:51, Adrian M Negreanu gro...@gmail.com wrote: Hi, Is it possible to attach a property on a target, and that property to be used whenever the target is used ? ex: add_library(A a.cpp) somehow_attach_LINK_FLAGS(A --custom-flags) # in a different directory add_executable(E e.cpp) target_link_libraries(E A) # ^--- this would do something similiar to set_target_properties(E PROPERTIES LINK_FLAGS --custom-flags) For example, to use A:LINK_FLAGS Thanks -- 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:
Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake
Hi David, We have a query regarding how to use MIDL related commands in cmake. In our project, many Visual Studio project files involve MIDL command execution. So, there are few Visual Studio targets which use MIDL related macros. For example, here is one such target: Target Name =GenTestMidlFile Condition ='$(LinkTimeMidl)'=='true' Inputs=@(Link) Outputs=$(IntDir)testmidl.rsp BeforeTargets=Link WriteLinesToFile File=$(IntDir)\testmidl.rsp Lines=%(Link.MidlCommandLine)/ ItemGroup FileWrites Include=$(IntDir)testmidl.rsp/ /ItemGroup /Target The above target creates an output file testmidl.rsp containing the MIDL command line as set in Link.MidlCommandLine which is a Visual Studio macro. So, in cmake we have taken the following approach: 1. We have added a PRE-LINK custom command using add_custom_command as follows: add_custom_command( TARGET ${TARGETNAME} PRE_LINK COMMAND ${CMAKE_SOURCE_DIR}/GenTestMidlFile.bat $(IntDir) \${MIDLCOMMAND}\ COMMENT Generate MIDL command file $(IntDir)/testmidl.rsp) 2. The batch file GenTestMidlFile.bat takes MIDLCOMMAND as one of the arguments. The MIDLCOMMAND argument will contain the MIDL command line value which will be set accordingly for each module that uses MIDL command, otherwise it will be empty. The batch file logic is to create the file testmidl.rsp to contain the contents present in MIDLCOMMAND argument. We have tested this and it works fine. Just wanted to know, if there is a better approach or anything specific for MIDL in cmake? Thanks Regards Ravi Raman Xoriant Solutions Pvt. Ltd 4th Floor, Winchester, Hiranandani Business Park, Powai, Mumbai 400076, INDIA. Tel: +91 22 30511000,9930100026 Extn: 2144 Voip No. 4088344495/96/97/98 Voip Extn:1178| Fax: +91 22 3051 ravi.ra...@xoriant.com| http://www.xoriant.com -Original Message- From: Ravi Raman Sent: Friday, August 01, 2014 8:01 PM To: 'David Cole' Cc: cmake@cmake.org Subject: RE: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Hi David, Thanks. The 2nd approach of using batch file worked successfully. Thanks Regards Ravi Raman Xoriant Solutions Pvt. Ltd 4th Floor, Winchester, Hiranandani Business Park, Powai, Mumbai 400076, INDIA. Tel: +91 22 30511000,9930100026 Extn: 2144 Voip No. 4088344495/96/97/98 Voip Extn:1178| Fax: +91 22 3051 ravi.ra...@xoriant.com| http://www.xoriant.com -Original Message- From: David Cole [mailto:dlrd...@aol.com] Sent: Friday, August 01, 2014 5:41 PM To: Ravi Raman Cc: cmake@cmake.org Subject: Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Sorry about the premature send on that last email... First try this: add_custom_command( TARGET ${TARGETNAME} POST_BUILD COMMAND ${TBIN}/VerCheck.exe \$(TargetPath)\ COMMAND copy \$(TargetPath)\ \$(TargetPath).vercheck_dummy_target\ COMMENT Checking if $(TargetPath) has version info...) i.e. -- just say POST_BUILD once, then a sequence of COMMAND lines. (I think it's passing your second POST_BUILD as an argument to VerCheck...) If that still doesn't work, try: add_custom_command( TARGET ${TARGETNAME} POST_BUILD COMMAND VerCheckAndCopy.bat ${TBIN} $(TargetPath) COMMENT Checking if $(TargetPath) has version info...) and delegate it to a batch script that takes arguments which internally does the sequence of commands you want. If you go this route, you may still need nested quotes around $(TargetPath) -- CMake doesn't know about expanding those VS values, and whether or not they'll need quotes around them. HTH, David C. -- 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/mailman/listinfo/cmake
Re: [CMake] cmake version/feature detection
Specifically, for the OBJECT library feature, I figured out what version of CMake introduced it like this: gitk -- Tests/ObjectLibrary/CMakeLists.txt leads to finding this first commit of that file: 69d3d183 [1] gitk 69d3d183 leads to b87d7a60 [2] (4 parent commits up) which introduced the feature itself. Then, git describe --contains b87d7a60 yields: v2.8.8~29^2~15 So OBJECT libraries were introduced in CMake v2.8.8. Also, in all the gitk views for these commits, it tells you Follows: v2.8.7 and Precedes: v2.8.8. You could therefore write code like: if (${CMAKE_VERSION} VERSION_LESS 2.8.8) # avoid OBJECT libraries else() # ok to use OBJECT libraries endif() HTH, David C. [1] http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69d3d183 [2] http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b87d7a60 -- 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/mailman/listinfo/cmake
Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake
If it works, do it. Custom commands are the easiest way to do MIDL stuff driven by CMake if you need things to work with any generator. Alternatively, if you are guaranteed to be using Visual Studio generators, you can try just adding the idl file as a source file of the library or executable that contains it, as the VSMidl test does: [1] -- but it may only work with source/build tree names that contain no spaces depending on your VS version. The parent CMakeLists that builds it arranges for this to be the case: [2] HTH, David C. [1] http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/VSMidl/src/CMakeLists.txt;h=86c04ed9;hb=029edcdf [2] http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/VSMidl/CMakeLists.txt;h=432506c3;hb=029edcdf -- 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/mailman/listinfo/cmake
Re: [CMake] Windows Path Issues
I found at https://code.google.com/p/android-cmake/source/browse/toolchain/android.toolchain.cmake?r=25d186d534477c063d780ac22a8c44bded2ca71d this: # Usage Windows: # You need native port of make to build your project. # For example this one: http://gnuwin32.sourceforge.net/packages/make.htm # # $ SET ANDROID_NDK=C:\absolute path to NDK\android-ndk-r6 # $ cmake.exe -GUnix Makefiles -DCMAKE_TOOLCHAIN_FILE=path to this file\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\absolute path to make\make.exe .. # $ C:\absolute path to make\make.exe *So maybe you can try make from: http://gnuwin32.sourceforge.net/packages/make.htm http://gnuwin32.sourceforge.net/packages/make.htm* 2014-08-06 17:49 GMT+02:00 da...@zemon.name: I've run it from CMD this time instead of Git Bash. Same results: C:\Users\IGEN006\WORKSPACE_C_CPP\PropWarecmake -G Unix Makefiles . -- The C compiler identification is GNU 4.6.1 -- The CXX compiler identification is GNU 4.6.1 -- The COGCXX compiler identification is GNU 4.6.1 -- The ECOGC compiler identification is GNU 4.6.1 -- The ECOGCXX compiler identification is GNU 4.6.1 -- The ASM compiler identification is GNU -- Found assembler: C:/software/propgcc/bin/propeller-elf-gcc CMake Error at CMakeLists.txt:6 (project): The CMAKE_C_COMPILER: C:/software/propgcc/bin/propeller-elf-gcc is not a full path to an existing compiler tool. Tell CMake where to find the compiler by setting either the environment variable CC or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. Any ideas are greatly appreciated. Thanks, David -Original Message- From: da...@zemon.name Sent: Tuesday, August 5, 2014 3:34pm To: Ivan Hrasko abhra...@gmail.com Cc: cmake@cmake.org Subject: Re: [CMake] Windows Path Issues Sorry about that. I am using Git Bash which is definitely a confusing environment. The compiler is PropGCC - the target is an embedded system. PropGCC ships with GNU Make 3.81 (and make --version confirms that is the version of make in my PATH). Perhaps the output of bash --version will help: bash-3.1$ bash --version GNU bash, version 3.1.0(1)-release (i686-pc-msys) Copyright (C) 2005 Free Software Foundation, Inc. bash-3.1$ Thanks, David -Original Message- From: Ivan Hrasko abhra...@gmail.com Sent: Tuesday, August 5, 2014 2:26pm To: da...@zemon.name Cc: cmake@cmake.org Subject: Re: [CMake] Windows Path Issues 1. What your environment exactly is? It does not look like Windows only (because I see in your log: bash-3.1$ cmake -G Unix Makefiles . ), so I expect you are using something like Cygwin and when you use this kind of environment you can have problems with paths. For example C:/software/propgcc/bin/propeller-elf-gcc is not a valid path for Cygwin, because cygwin uses /cygdrive/ in its path for things which are located in Windows. 2. When I use cmake on Windows (just Windows, cmd, not Cygwin or else) I use MinGW Makefiles not Unix Makefiles with GNU compilers. 2014-08-05 19:56 GMT+02:00 da...@zemon.name: I'm generally a Linux guy but need this project to work on all three main platforms. I have my toolchain file working nicely in Linux, but for some reason I'm getting an error on Windows. Here's top of the console output: bash-3.1$ cmake -G Unix Makefiles . -- The C compiler identification is GNU 4.6.1 -- The CXX compiler identification is GNU 4.6.1 -- The COGCXX compiler identification is GNU 4.6.1 -- The ECOGC compiler identification is GNU 4.6.1 -- The ECOGCXX compiler identification is GNU 4.6.1 -- The ASM compiler identification is GNU -- Found assembler: C:/software/propgcc/bin/propeller-elf-gcc CMake Error at CMakeLists.txt:6 (project): The CMAKE_C_COMPILER: C:/software/propgcc/bin/propeller-elf-gcc is not a full path to an existing compiler tool. Tell CMake where to find the compiler by setting either the environment variable CC or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. This doesn't make too much sense to me. Anyone know why it would find the compiler at first and then loose it? The path that it lists is perfectly valid. Thanks, David -- 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/mailman/listinfo/cmake -- Ivan
Re: [CMake] cmake version/feature detection
Thanks! On Thu, Aug 7, 2014 at 7:55 AM, David Cole dlrd...@aol.com wrote: Specifically, for the OBJECT library feature, I figured out what version of CMake introduced it like this: gitk -- Tests/ObjectLibrary/CMakeLists.txt leads to finding this first commit of that file: 69d3d183 [1] gitk 69d3d183 leads to b87d7a60 [2] (4 parent commits up) which introduced the feature itself. Then, git describe --contains b87d7a60 yields: v2.8.8~29^2~15 So OBJECT libraries were introduced in CMake v2.8.8. Also, in all the gitk views for these commits, it tells you Follows: v2.8.7 and Precedes: v2.8.8. You could therefore write code like: if (${CMAKE_VERSION} VERSION_LESS 2.8.8) # avoid OBJECT libraries else() # ok to use OBJECT libraries endif() HTH, David C. [1] http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69d3d183 [2] http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b87d7a60 -- Cheers, Leif -- 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/mailman/listinfo/cmake
Re: [CMake] Question regarding External Project add and VTK
Jc, I guess I spoke too soon on my 'last question.' How does make install work with this superbuild system. Looking at slicer and ctk, they seem to set INSTALL_COMMAND to in their superbuild.cmake, but presumably these packages still install even with superbuild mode on. Can you offer any advice? -Jameson -- View this message in context: http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7588095.html Sent from the CMake mailing list archive at Nabble.com. -- 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/mailman/listinfo/cmake
[Cmake-commits] CMake branch, master, updated. v3.0.1-1625-g6f0d1a3
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 6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 (commit) via 3f476beaf7ffc20a27d97fbf04f6699791996f7f (commit) from df08d8575b56699c592ba8dec747dc7f6329b1b7 (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=6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 commit 6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 Merge: df08d85 3f476be Author: Brad King brad.k...@kitware.com AuthorDate: Thu Aug 7 10:07:51 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Aug 7 10:07:51 2014 -0400 Merge topic 'genex-build-property-no-head' 3f476bea Genex: Do not consider 'head' when evaluating build properties --- Summary of changes: Source/cmGeneratorExpressionEvaluator.cxx |4 ++-- Tests/CompileDefinitions/target_prop/CMakeLists.txt |5 + Tests/CompileDefinitions/target_prop/usetgt.c | 10 ++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Tests/CompileDefinitions/target_prop/usetgt.c hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.1-4800-g979ee20
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 979ee2084090ef56386f4edf80344bf80fcb6923 (commit) via 6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 (commit) via df08d8575b56699c592ba8dec747dc7f6329b1b7 (commit) via 029edcdf3e713521f95ee9f2f41485d24e342c89 (commit) from 09916ec6ab40019294d02ffa2a96c0f684a8b4c4 (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=979ee2084090ef56386f4edf80344bf80fcb6923 commit 979ee2084090ef56386f4edf80344bf80fcb6923 Merge: 09916ec 6f0d1a3 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Aug 7 10:09:26 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Aug 7 10:09:26 2014 -0400 Merge branch 'master' into next --- 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/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.1-4802-g0e3015f
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 0e3015f3add67ecd9596b3805f42a9388fbf2db0 (commit) via 70796ef026e8d10a4e50c8e26472d469a45f7dd5 (commit) from 979ee2084090ef56386f4edf80344bf80fcb6923 (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=0e3015f3add67ecd9596b3805f42a9388fbf2db0 commit 0e3015f3add67ecd9596b3805f42a9388fbf2db0 Merge: 979ee20 70796ef Author: Brad King brad.k...@kitware.com AuthorDate: Thu Aug 7 11:26:55 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Aug 7 11:26:55 2014 -0400 Merge topic 'fix-CMP0047-IS_GNU-vars' into next 70796ef0 CMP0047: Fix CMAKE_COMPILER_IS_GNU(CC|CXX) in OLD behavior http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70796ef026e8d10a4e50c8e26472d469a45f7dd5 commit 70796ef026e8d10a4e50c8e26472d469a45f7dd5 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Aug 7 11:16:24 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Aug 7 11:24:57 2014 -0400 CMP0047: Fix CMAKE_COMPILER_IS_GNU(CC|CXX) in OLD behavior The implementation of CMP0047 detects the QNX compiler id internally, then changes it to GNU after the language is fully enabled. This is too late to correctly set the old IS_GNU variables, so set them as part of the policy OLD behavior. Reported-by: Mike Lattanzio mlattan...@blackberry.com diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 38ba5d1..3f948b5 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -844,6 +844,14 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf, case cmPolicies::OLD: // OLD behavior is to convert QCC to GNU. mf-AddDefinition(compilerIdVar, GNU); +if(lang == C) + { + mf-AddDefinition(CMAKE_COMPILER_IS_GNUCC, 1); + } +else if(lang == CXX) + { + mf-AddDefinition(CMAKE_COMPILER_IS_GNUCXX, 1); + } break; case cmPolicies::REQUIRED_IF_USED: case cmPolicies::REQUIRED_ALWAYS: --- Summary of changes: Source/cmGlobalGenerator.cxx |8 1 file changed, 8 insertions(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.1-4804-ga3a81de
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 a3a81ded931ccffe858bcc284789f3521ea5c9c2 (commit) via 810f5ccefc113987fc6f68c073ab9c84fc278b32 (commit) from 0e3015f3add67ecd9596b3805f42a9388fbf2db0 (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=a3a81ded931ccffe858bcc284789f3521ea5c9c2 commit a3a81ded931ccffe858bcc284789f3521ea5c9c2 Merge: 0e3015f 810f5cc Author: Brad King brad.k...@kitware.com AuthorDate: Thu Aug 7 13:59:37 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Aug 7 13:59:37 2014 -0400 Merge topic 'BundleUtilities-os9-newlines' into next 810f5cce BundleUtilities: Allow Info.plist files which use CR line endings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=810f5ccefc113987fc6f68c073ab9c84fc278b32 commit 810f5ccefc113987fc6f68c073ab9c84fc278b32 Author: Tim Blechmann t...@klingt.org AuthorDate: Thu Aug 7 19:30:27 2014 +0200 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Aug 7 14:00:01 2014 -0400 BundleUtilities: Allow Info.plist files which use CR line endings Convert \r to our internal end-of-line character just as we do \n. Signed-off-by: Tim Blechmann t...@klingt.org diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 0c733fa..0046c97 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -237,6 +237,7 @@ function(get_bundle_main_executable bundle result_var) file(READ ${bundle}/Contents/Info.plist info_plist) string(REPLACE ; \\; info_plist ${info_plist}) string(REPLACE \n ${eol_char}; info_plist ${info_plist}) +string(REPLACE \r ${eol_char}; info_plist ${info_plist}) # Scan the lines for keyCFBundleExecutable/key - the line after that # is the name of the main executable. --- Summary of changes: Modules/BundleUtilities.cmake |1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits