From j.kreuzberger at procitec.de Tue Jul 1 03:38:58 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Tue, 1 Jul 2014 09:38:58 +0200 Subject: [CMake] =?utf-8?q?CMake_Visual_Studio_Configuration_Single?= Message-ID: > I'm not sure why you would recommend anything related to > CMAKE_BUILD_TYPE for the Visual Studio generators. I would be curious > to know exactly how you are using it, because internally, > CMAKE_BUILD_TYPE (to the best of my knowledge) is completely ignored by > the Visual Studio generators. I had three issues with it, two seems solved with cmake 3.0 My project is organised in a form like root - common / libs / .. - programs / .. 1) Installation of files In the installation ( install TARGET ...) i had to install some shared libraries from the common/libs targets with cmake 2.8.12 i was not able to use , so i solved with with properties, which always must consider if or not they are build with single or multi configuration e.g. if( WIN32 ) if( MINGW) set_property( ... ${CMAKE_CURRENT_BINARY_DIR}/x.dll) else() set_property( ... ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/x.dll) else if( UNIX ) i think this is solved with cmake 3.0, i can use the directly in install calls 2) use programs/libs from build for running tests In CMake 2.8 i was not able to use the notation in calls to set_test_properties() so i had to differ here the files paths too. This is solved with cmake 3.0 3) using imported location my project is used for developer and customer build (customer gets sourcecode). But he does not get all source code, some of the libaries he only gets binary. To use same cmake files in programs/, i use the set_target_properties( .. IMPORTED_LOCATION ...). Depending on how we build it (mingw, devstudio etc), i differ between the paths like above. No other solution found here... find_package, find_programs and so on is here no alternative, cause i want to use the TARGETS. 4) installation i have one installation target. install( TARGET ... LOCATION ..) if i build debug, this contains debug, if i build release, this contains release. So it gets mixed and i have to differ location... So i think 2 out of 4 issues are solved with cmake 3.0 As newbee to cmake i only could not understand why this single / multi configuration stuff is supported. it makes it more complicated, but i assume it is like always: historical grown. I personally would totaly accept seperated vs solutions for debug and release in different build directories, only relying on CMAKE_BUILD_TYPE at cmake configuration time, with output in same directory structure (without debug/release) like e.g. with nmake. Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From konstantin40 at polizisten-duzer.de Tue Jul 1 05:06:38 2014 From: konstantin40 at polizisten-duzer.de (Konstantin40) Date: Tue, 1 Jul 2014 11:06:38 +0200 Subject: [CMake] CTest - Set Labels for different tests Message-ID: Hi everyone, I want to use Labels to group some tests, that I want to execute together with one command. However, I cannot find how to specify property "label" for the tests. Is it possible to set this as test property? Could someone point me to somewhere, where this is shown? At the end of this mail, I add how I'm setting up the tests using CTestTest.cmake. Thank you very much. Konstantin ADD_TEST( SomeTest mpiexec -np 12 $ENV{CIAO_SOURCE_DIRECTORY}/bin/arts " arts.in" ) SET_TESTS_PROPERTIES( SomeTest PROPERTIES WORKING_DIRECTORY "SomeDir" ) SET_TESTS_PROPERTIES( SomeTest PROPERTIES PASS_REGULAR_EXPRESSION "END OF SIMULATION" ) SET_TESTS_PROPERTIES( SomeTest PROPERTIES LABEL "SomeLabel" ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Tue Jul 1 06:52:26 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Tue, 01 Jul 2014 12:52:26 +0200 Subject: [CMake] CTest - Set Labels for different tests In-Reply-To: References: Message-ID: <53B292EA.5000304@gmail.com> On 07/01/2014 11:06 AM, Konstantin40 wrote: > Hi everyone, > > I want to use Labels to group some tests, that I want to execute > together with one command. > However, I cannot find how to specify property "label" for the tests. > > Is it possible to set this as test property? Could someone point me to > somewhere, where this is shown? > At the end of this mail, I add how I'm setting up the tests using > CTestTest.cmake. Do you mean CTestTestfile.cmake perchance? Or is CTestTest.cmake some project specific include? CTestTestfile.cmake itself in the context of CMake would be generated from information provided in your CMakeLists.txt rather than handwritten (unless you are using CTest without CMake). The correct test property is called "LABELS": http://cmake.org/cmake/help/v3.0/prop_test/LABELS.html Nils From bill.hoffman at kitware.com Tue Jul 1 10:53:31 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Tue, 01 Jul 2014 10:53:31 -0400 Subject: [CMake] CMake Visual Studio Configuration Single In-Reply-To: References: Message-ID: <53B2CB6B.7020300@kitware.com> On 7/1/2014 3:38 AM, J?rg Kreuzberger wrote: > As newbee to cmake i only could not understand why this single / > multi configuration stuff is supported. it makes it more complicated, > but i assume it is like always: historical grown. It is supported because that is the way native development happens in visual studio. If we did not have multi configuration support, the visual studio developers would not be happy. It is also supported on Apple Xcode. BTW, you do not need to do this: if( WIN32 ) if( MINGW) set_property( ... ${CMAKE_CURRENT_BINARY_DIR}/x.dll) else() set_property( ... ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/x.dll) else if( UNIX ) this will work on both platforms: set_property( ... ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/x.dll) CMAKE_CFG_INTDIR = "." on platforms without multi-config. So, it would expand to ${CMAKE_CURRENT_BINARY_DIR}/./${CMAKE_CFG_INTDIR}/x.dll Which would be fine. -Bill From bill.hoffman at kitware.com Tue Jul 1 15:22:43 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Tue, 01 Jul 2014 15:22:43 -0400 Subject: [CMake] Updating files in the source tree. In-Reply-To: References: Message-ID: <53B30A83.50207@kitware.com> On 6/28/2014 1:52 PM, Rick McGuire wrote: > > The big question comes down to "should I?". Is doing this somehow a > violation of CMake rules/conventions? Are there any issues I need to > consider? And, the ultimate question is whether it is somehow possible > to set up dependencies where I could get back to the original build > behavior? Although I would be perfectly fine just having a target that > allowed updating those files on demand. So, yeah it is a bad idea to put files in the source tree from the build. This will preclude multiple out of source build trees from one source checkout. I like to think that the source tree is on a read only file system. However, it is perfectly fine to generate sources in the build tree. One way you could do this is to copy the files from the source tree into the build tree if they are newer than the source xml files. If not you could generate them. I am not sure of the details, but with custom commands and maybe configure_file I am sure you could get your generated sources moved into the build tree. -Bill From bill.hoffman at kitware.com Tue Jul 1 15:59:28 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Tue, 01 Jul 2014 15:59:28 -0400 Subject: [CMake] Updating files in the source tree. In-Reply-To: References: <53B30A83.50207@kitware.com> Message-ID: <53B31320.9060407@kitware.com> On 7/1/2014 3:37 PM, Rick McGuire wrote: > The big question comes down to "should I?". Is doing this somehow a > violation of CMake rules/conventions? Are there any issues I > need to > consider? And, the ultimate question is whether it is somehow > possible > to set up dependencies where I could get back to the original build > behavior? Although I would be perfectly fine just having a > target that > allowed updating those files on demand. > > So, yeah it is a bad idea to put files in the source tree from the > build. This will preclude multiple out of source build trees from > one source checkout. I like to think that the source tree is on a > read only file system. > > > There's really no problem with that, unless the developer is doing > something silly like trying to do simultaneous builds...and there are > other reasons that would preclude trying to do that. > It all depends on what is going into the source tree. Maybe not in your specific case, but in general it is a bad idea to put files into the source tree. The main reason is that it prevents clean out of source builds. -Bill From object.rexx at gmail.com Tue Jul 1 19:04:45 2014 From: object.rexx at gmail.com (Rick McGuire) Date: Tue, 1 Jul 2014 19:04:45 -0400 Subject: [CMake] Getting the svn revision number of our source. Message-ID: We like to include the SVN revision number in our build artifacts to help keep track of what version people are working with. I found the following code on the mailing lists which appears to work fine: # Get the SVN revision number of an svn command line client is # available. This version will run at build time rather than only # at configuration generation time. FIND_PROGRAM(SVN_EXECUTABLE svn DOC "subversion command line client") # only do this if we have an svn client. if (SVN_EXECUTABLE) MACRO(Subversion_GET_REVISION dir variable) EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} info ${dir} OUTPUT_VARIABLE ${variable} OUTPUT_STRIP_TRAILING_WHITESPACE) STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" "\\2" ${variable} "${${variable}}") ENDMACRO(Subversion_GET_REVISION) Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL) endif () message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}") Unfortunately, the first person not in the core team who building was running a Spanish language version of SVN, so the ORX_BLD_LEVEL variable ended up with the entire output of the svn info command because it could not find the string REVISION. This was not a good thing! Is there a better way to obtain the SVN revision number that does not suffer from this sort of problem? Rick -------------- next part -------------- An HTML attachment was scrubbed... URL: From sag_mal_pluesch at yahoo.com.au Tue Jul 1 20:58:16 2014 From: sag_mal_pluesch at yahoo.com.au (Michael Oldfield) Date: Wed, 02 Jul 2014 10:58:16 +1000 Subject: [CMake] Getting the svn revision number of our source. In-Reply-To: References: Message-ID: <53B35928.6050207@yahoo.com.au> On 02/07/14 09:04, Rick McGuire wrote: > We like to include the SVN revision number in our build artifacts to > help keep track of what version people are working with. I found the > following code on the mailing lists which appears to work fine: > > # Get the SVN revision number of an svn command line client is > # available. This version will run at build time rather than only > # at configuration generation time. > FIND_PROGRAM(SVN_EXECUTABLE svn > DOC "subversion command line client") > > # only do this if we have an svn client. > if (SVN_EXECUTABLE) > MACRO(Subversion_GET_REVISION dir variable) > EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} info ${dir} > OUTPUT_VARIABLE ${variable} > OUTPUT_STRIP_TRAILING_WHITESPACE) > STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" > "\\2" ${variable} "${${variable}}") > ENDMACRO(Subversion_GET_REVISION) > > Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL) > endif () > > message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}") > > > Unfortunately, the first person not in the core team who building was running a Spanish language version of SVN, so the ORX_BLD_LEVEL variable ended up with the entire output of the svn info command because it could not find the string REVISION. This was not a good thing! > > > Is there a better way to obtain the SVN revision number that does not suffer from this sort of problem? > > > Rick Hi Rick, You should try the command svnversion'. That should give just the revision number, and no extraction code will be necessary. Michael From eric.noulard at gmail.com Wed Jul 2 03:04:59 2014 From: eric.noulard at gmail.com (Eric Noulard) Date: Wed, 2 Jul 2014 09:04:59 +0200 Subject: [CMake] Getting the svn revision number of our source. In-Reply-To: References: Message-ID: May be you can avoid localized output by setting LANG env var to "C". Or you can ask svn for xml output which may not be localized e.g. # Get the SVN revision number of an svn command line client is # available. This version will run at build time rather than only # at configuration generation time. FIND_PROGRAM(SVN_EXECUTABLE svn DOC "subversion command line client") # only do this if we have an svn client. if (SVN_EXECUTABLE) MACRO(Subversion_GET_REVISION dir variable) EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} --xml info ${dir} OUTPUT_VARIABLE ${variable} OUTPUT_STRIP_TRAILING_WHITESPACE) STRING(REGEX REPLACE ".*entry.*revision=\"([0-9]+)\"\n.*kind.*" "\\1" ${variable} "${${variable}}") ENDMACRO(Subversion_GET_REVISION) Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL) endif () message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}") 2014-07-02 1:04 GMT+02:00 Rick McGuire : > We like to include the SVN revision number in our build artifacts to help > keep track of what version people are working with. I found the following > code on the mailing lists which appears to work fine: > > # Get the SVN revision number of an svn command line client is > # available. This version will run at build time rather than only > # at configuration generation time. > FIND_PROGRAM(SVN_EXECUTABLE svn > DOC "subversion command line client") > > # only do this if we have an svn client. > if (SVN_EXECUTABLE) > MACRO(Subversion_GET_REVISION dir variable) > EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} info ${dir} > OUTPUT_VARIABLE ${variable} > OUTPUT_STRIP_TRAILING_WHITESPACE) > STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" > "\\2" ${variable} "${${variable}}") > ENDMACRO(Subversion_GET_REVISION) > > Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL) > endif () > > message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}") > > > Unfortunately, the first person not in the core team who building was running a Spanish language version of SVN, so the ORX_BLD_LEVEL variable ended up with the entire output of the svn info command because it could not find the string REVISION. This was not a good thing! > > > Is there a better way to obtain the SVN revision number that does not suffer from this sort of problem? > > > Rick > > > -- > > 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 > -- Erk L'?lection n'est pas la d?mocratie -- http://www.le-message.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From loose at astron.nl Wed Jul 2 03:30:39 2014 From: loose at astron.nl (Marcel Loose) Date: Wed, 02 Jul 2014 09:30:39 +0200 Subject: [CMake] Getting the svn revision number of our source. In-Reply-To: References: Message-ID: <53B3B51F.30002@astron.nl> Hi, The command SET(ENV{LC_ALL} C) somewhere inside your cmake macro will do the trick. If you really care about the original contents of LC_ALL you should save it first and restore once your done. BTW: you might consider using the Subversion_WC_INFO() macro in the FindSubversion module. Cheers, Marcel Loose. On 02/07/14 09:04, Eric Noulard wrote: > May be you can avoid localized output by setting LANG env var to "C". > > > Or you can ask svn for xml output which may not be localized e.g. > > # Get the SVN revision number of an svn command line client is > # available. This version will run at build time rather than only > # at configuration generation time. > FIND_PROGRAM(SVN_EXECUTABLE svn > DOC "subversion command line client") > > # only do this if we have an svn client. > if (SVN_EXECUTABLE) > MACRO(Subversion_GET_REVISION dir variable) > EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} --xml info ${dir} > OUTPUT_VARIABLE ${variable} > OUTPUT_STRIP_TRAILING_WHITESPACE) > STRING(REGEX REPLACE ".*entry.*revision=\"([0-9]+)\"\n.*kind.*" > "\\1" ${variable} "${${variable}}") > ENDMACRO(Subversion_GET_REVISION) > > Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL) > endif () > > message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}") > > > > > 2014-07-02 1:04 GMT+02:00 Rick McGuire >: > > We like to include the SVN revision number in our build artifacts > to help keep track of what version people are working with. I > found the following code on the mailing lists which appears to > work fine: > > # Get the SVN revision number of an svn command line client is > # available. This version will run at build time rather than only > # at configuration generation time. > FIND_PROGRAM(SVN_EXECUTABLE svn > DOC "subversion command line client") > > # only do this if we have an svn client. > if (SVN_EXECUTABLE) > MACRO(Subversion_GET_REVISION dir variable) > EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} info ${dir} > OUTPUT_VARIABLE ${variable} > OUTPUT_STRIP_TRAILING_WHITESPACE) > STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" > "\\2" ${variable} "${${variable}}") > ENDMACRO(Subversion_GET_REVISION) > > Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL) > endif () > > message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}") > > Unfortunately, the first person not in the core team who building was running a Spanish language version of SVN, so the ORX_BLD_LEVEL variable ended up with the entire output of the svn info command because it could not find the string REVISION. This was not a good thing! > > Is there a better way to obtain the SVN revision number that does not suffer from this sort of problem? > > Rick > > > -- > > 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 > > > > > -- > Erk > L'?lection n'est pas la d?mocratie -- http://www.le-message.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loose.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From eike at sf-mail.de Wed Jul 2 03:31:07 2014 From: eike at sf-mail.de (Rolf Eike Beer) Date: Wed, 02 Jul 2014 09:31:07 +0200 Subject: [CMake] Getting the svn revision number of our source. In-Reply-To: References: Message-ID: Am 02.07.2014 01:04, schrieb Rick McGuire: > We like to include the SVN revision number in our build artifacts to > help > keep track of what version people are working with. I found the > following > code on the mailing lists which appears to work fine: > > # Get the SVN revision number of an svn command line client is > # available. This version will run at build time rather than only > # at configuration generation time. > FIND_PROGRAM(SVN_EXECUTABLE svn > DOC "subversion command line client") > > # only do this if we have an svn client. > if (SVN_EXECUTABLE) > MACRO(Subversion_GET_REVISION dir variable) > EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} info ${dir} > OUTPUT_VARIABLE ${variable} > OUTPUT_STRIP_TRAILING_WHITESPACE) > STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" > "\\2" ${variable} "${${variable}}") > ENDMACRO(Subversion_GET_REVISION) > > Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL) > endif () > > message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}") > > > Unfortunately, the first person not in the core team who building was > running a Spanish language version of SVN, so the ORX_BLD_LEVEL > variable ended up with the entire output of the svn info command > because it could not find the string REVISION. This was not a good > thing! > > > Is there a better way to obtain the SVN revision number that does not > suffer from this sort of problem? cmake --help-module FindSubversion This gives you an example of exactly this at the end (it also fetches the last commit message). And the macros in FindSubversion will already care for the language issue. Eike From guillermo at tdmsolutions.com Wed Jul 2 07:18:41 2014 From: guillermo at tdmsolutions.com (Guillermo Sotomayor) Date: Wed, 2 Jul 2014 13:18:41 +0200 Subject: [CMake] Drag & Drop mac installer Message-ID: I'm generating a drag and drop installer. I'm trying to add a custom background image and a custom DS_Store file unsuccesfuly. set (CPACK_DMG_FORMAT UDBZ) set (CPACK_DMG_BACKGROUND_IMAGE ${PROJECT_SOURCE_DIR}/macInstallerFiles/background.png) set (CPACK_CPACK_DMG_DS_STORE ${PROJECT_SOURCE_DIR}/macInstallerFiles/DS_Store) What I'm missing? There is another way to set the background image? Guillermo -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Wed Jul 2 07:29:23 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Wed, 02 Jul 2014 13:29:23 +0200 Subject: [CMake] Drag & Drop mac installer In-Reply-To: References: Message-ID: <53B3ED13.8080805@gmail.com> On 02.07.2014 13:18, Guillermo Sotomayor wrote: > I'm generating a drag and drop installer. I'm trying to add a custom > background image and a custom > DS_Store file unsuccesfuly. > > set (CPACK_DMG_FORMAT UDBZ) > set (CPACK_DMG_BACKGROUND_IMAGE > ${PROJECT_SOURCE_DIR}/macInstallerFiles/background.png) > set (CPACK_CPACK_DMG_DS_STORE > ${PROJECT_SOURCE_DIR}/macInstallerFiles/DS_Store) > > What I'm missing? There is another way to set the background image? I am not familiar with the generator itself but are those variables set before include(CPack)? This is required for them to get exported in the generated CPackConfig.cmake which is what cpack operates on. Nils From eric.lafranchi at voltage.com Wed Jul 2 12:53:28 2014 From: eric.lafranchi at voltage.com (Eric LaFranchi) Date: Wed, 2 Jul 2014 09:53:28 -0700 Subject: [CMake] Cross compile to platform with two stage compiler. Message-ID: Currently we have 16 different platform that we target that are a combination of native compiles and cross compiles. I am adding a new platform to our build system using CMake's cross compiling facility. This platform is unique in that compiling a ".c" file to get an ".o" file required two steps. These steps: compile the source ".c" to generate a ".asm" file, then assemble that file to get the ".o" file. For other cross compiled platforms I use CMAKE_FORCE_C_COMPILER, however I am not able to specify both the C compiler and assembler using this macro (my understanding is one compiler as the first argument). I have thought about using ADD_CUSTOM_COMMAND, however I don't want to write a custom command for several thousand C source files. New ideas are greatly appreciated. Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Wed Jul 2 14:33:57 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Wed, 02 Jul 2014 20:33:57 +0200 Subject: [CMake] Cross compile to platform with two stage compiler. In-Reply-To: References: Message-ID: <53B45095.2010709@gmail.com> On 02.07.2014 18:53, Eric LaFranchi wrote: > > Currently we have 16 different platform that we target that are a > combination of native compiles and cross compiles. I am adding a new > platform to our build system using CMake's cross compiling facility. > This platform is unique in that compiling a ".c" file to get an ".o" > file required two steps. These steps: compile the source ".c" to > generate a ".asm" file, then assemble that file to get the ".o" file. > > For other cross compiled platforms I use CMAKE_FORCE_C_COMPILER, > however I am not able to specify both the C compiler and assembler > using this macro (my understanding is one compiler as the first > argument). I have thought about using ADD_CUSTOM_COMMAND, however I > don't want to write a custom command for several thousand C source files. > > New ideas are greatly appreciated. > Could the compiler be a script that calls the actual compiler + assembler? Nils -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.lafranchi at voltage.com Wed Jul 2 16:04:42 2014 From: eric.lafranchi at voltage.com (Eric LaFranchi) Date: Wed, 2 Jul 2014 13:04:42 -0700 Subject: [CMake] Cross compile to platform with two stage compiler. In-Reply-To: <53B45095.2010709@gmail.com> References: <53B45095.2010709@gmail.com> Message-ID: Yes. The cross compiler is run on Windows and we are setup to use either Windows Command Prompt or Cygwin shell. What arguments will be passed into the script that is set using the CMAKE_FORCE_C_COMPIELR macro? I assume this is going to be "compiler flags", "source file", and "target file"? The compiler is not known to CMake and I assume that I will need to create a "Compiler"-C.cmake and put it in my local cmake modules path? Thanks, Eric From: Nils Gladitz [mailto:nilsgladitz at gmail.com] Sent: Wednesday, July 02, 2014 11:34 AM To: Eric LaFranchi; cmake at cmake.org Subject: Re: [CMake] Cross compile to platform with two stage compiler. On 02.07.2014 18:53, Eric LaFranchi wrote: Currently we have 16 different platform that we target that are a combination of native compiles and cross compiles. I am adding a new platform to our build system using CMake's cross compiling facility. This platform is unique in that compiling a ".c" file to get an ".o" file required two steps. These steps: compile the source ".c" to generate a ".asm" file, then assemble that file to get the ".o" file. For other cross compiled platforms I use CMAKE_FORCE_C_COMPILER, however I am not able to specify both the C compiler and assembler using this macro (my understanding is one compiler as the first argument). I have thought about using ADD_CUSTOM_COMMAND, however I don't want to write a custom command for several thousand C source files. New ideas are greatly appreciated. Could the compiler be a script that calls the actual compiler + assembler? Nils -------------- next part -------------- An HTML attachment was scrubbed... URL: From kopaka4 at gmail.com Thu Jul 3 08:03:23 2014 From: kopaka4 at gmail.com (ko paka) Date: Thu, 3 Jul 2014 14:03:23 +0200 Subject: [CMake] CMAKE_MAKE_PROGRAM and CMAKE_TOOLCHAIN_FILE Message-ID: Hello, I tried to generate MinGW makefiles using "specify toolchain file" using cmake gui 3.0 on windows. Cmake complained that cannot find make program (CMAKE_MAKE_PROGRAM not set). In such case cmake didn't process toolchain file. When I added directory where mingw32-make.exe is located to the Path env. variable, then it run ok. So it is not possible to locate make program through toolchain file (through CMAKE_FIND_ROOT_PATH) ? And content of toolchain file is not read on the begin of process, but from some point ? Sorry for maybe stupid questions, but just now I cannot find how it is intended to work. Based on documentation for CMAKE_FIND_ROOT_PATH, it should be used to prepend those directories when find_program is executed ... and find_program is executed inside CMakeMinGWFindMake.cmake. But probably CMakeMinGWFindMake.cmake is executed earlier then toolchain file is processed. Can someone shed some light on it please ? regards tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Thu Jul 3 08:18:12 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 03 Jul 2014 14:18:12 +0200 Subject: [CMake] Cross compile to platform with two stage compiler. In-Reply-To: References: <53B45095.2010709@gmail.com> Message-ID: <53B54A04.9040609@gmail.com> On 07/02/2014 10:04 PM, Eric LaFranchi wrote: > Yes. The cross compiler is run on Windows and we are setup to use either > Windows Command Prompt or Cygwin shell. > > What arguments will be passed into the script that is set using the > CMAKE_FORCE_C_COMPIELR macro? I assume this is going to be ?compiler > flags?, ?source file?, and ?target file?? > > The compiler is not known to CMake and I assume that I will need to > create a ?Compiler?-C.cmake and put it in my local cmake modules path? I haven't tried setting up a custom compiler myself so I am not sure if I might be missing something vital but ... if you do set up a custom -C.cmake you will have control over how parameters will get passed to the script. The most relevant variable to set up for this might be: http://cmake.org/cmake/help/v3.0/variable/CMAKE_LANG_COMPILE_OBJECT.html The script itself could be made part of this rule variable and the actual compiler could be passed in as a parameter. That way use of the script may be more transparent since you'd still refer to the actual compiler when setting it up with CMAKE_FORCE_C_COMPILER. Nils From filiatra at gmail.com Fri Jul 4 03:25:48 2014 From: filiatra at gmail.com (Angelos Mantzaflaris) Date: Fri, 04 Jul 2014 09:25:48 +0200 Subject: [CMake] Using a ctest script, while avoiding the make clean step Message-ID: <53B656FC.8080100@gmail.com> Dear all, From the ctest man pages I read: --build-noclean Skip the make clean step. I am running ctest with a script, e.g. ctest -S testScript.cmake for a continuous build. With a minor change in the repository, the full code is recompiled. So I was thinking to invoke build-noclean. I cannot figure out how.. How can I avoid the make clean step when calling ctest_build inside my script ? thanx in advance From nilsgladitz at gmail.com Fri Jul 4 03:49:41 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 04 Jul 2014 09:49:41 +0200 Subject: [CMake] Using a ctest script, while avoiding the make clean step In-Reply-To: <53B656FC.8080100@gmail.com> References: <53B656FC.8080100@gmail.com> Message-ID: <53B65C95.1040605@gmail.com> On 07/04/2014 09:25 AM, Angelos Mantzaflaris wrote: > > Dear all, > > > From the ctest man pages I read: > > --build-noclean > Skip the make clean step. > > I am running ctest with a script, e.g. > > ctest -S testScript.cmake > > for a continuous build. With a minor change in the repository, the full > code > is recompiled. So I was thinking to invoke build-noclean. I cannot figure > out how.. > > How can I avoid the make clean step when calling > > ctest_build > > inside my script ? > > thanx in advance I think --build-noclean only applies when using --build-and-test. In script mode ctest_build() does not run the clean target by default so the issue is probably somewhere else. For a clean build in script mode I'd expect e.g. a call to ctest_empty_binary_directory(). Nils From andrew.amaclean at gmail.com Fri Jul 4 03:50:36 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Fri, 4 Jul 2014 17:50:36 +1000 Subject: [CMake] cmake-gui crash in Windows 8.1 Message-ID: Hi All, Has anyone noticed a problem with CMake 3.0 in Windows? Using cmake-gui in Windows 8.1 on the VTK Wiki Examples. The compiler is: VS 12 2013 Win64 Configure works Ok, however generate fails with a run-time error when it has completed about 75% of the generation process - it seems to hang at this point then crash. The message is: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." A subsequent running of CMake from the command line is OK. I have only ever seen this with the VTK Wiki Examples. Building VTK works OK. There is no problem with the last version of CMake 2.8. Regards Andrew -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From golubdr at gmail.com Fri Jul 4 11:14:22 2014 From: golubdr at gmail.com (David Golub) Date: Fri, 4 Jul 2014 11:14:22 -0400 Subject: [CMake] CMake Tools for Visual Studio 1.2 RC1 Available Message-ID: <009c01cf979a$a332b1c0$e9981540$@gmail.com> I'm pleased to announced that the first release candidate of CMake Tools for Visual Studio 1.2 is now available. This release adds support for CMake 3.0 as well as some minor enhancements and bug fixes. It is available from the project web site at http://cmaketools.codeplex.com. Enjoy! David Golub -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Mon Jul 7 11:14:17 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 07 Jul 2014 11:14:17 -0400 Subject: [CMake] cmake-gui crash in Windows 8.1 In-Reply-To: References: Message-ID: <53BAB949.7050608@kitware.com> On 07/04/2014 03:50 AM, Andrew Maclean wrote: > Has anyone noticed a problem with CMake 3.0 in Windows? Have you tested on other versions of Windows other than 8.1? I doubt it is dependent on the version of Windows. > Using cmake-gui in Windows 8.1 on the VTK Wiki Examples. > The compiler is: VS 12 2013 Win64 What version of VTK did you build? Which example from the Wiki fails? > Configure works Ok, however generate fails with a run-time error when > it has completed about 75% of the generation process - it seems to > hang at this point then crash. That sounds like unbounded recursion followed by stack overflow. We'll need to reproduce this to debug it of course. Thanks, -Brad From konstantin40 at polizisten-duzer.de Mon Jul 7 11:14:48 2014 From: konstantin40 at polizisten-duzer.de (Konstantin40) Date: Mon, 7 Jul 2014 17:14:48 +0200 Subject: [CMake] Review Test Results Message-ID: Hello everyone, we are using Ctest for continuous automatic code checking. We therefore specified some test cases, which are run daily with Ctest and the results are shown on a Furthermore, we want to give code developers a possibility to run the test cases locally and see the results before commiting any changes. Is there a possibility to visualize the results from the xml file like on a dashboard but with local (maybe even terminal compatible) tools? Or to condense the results to just pass or fail for each test? Thank you very much. Best regards, Konstantin -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Mon Jul 7 18:23:02 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Tue, 8 Jul 2014 08:23:02 +1000 Subject: [CMake] cmake-gui crash in Windows 8.1 In-Reply-To: <53BAB949.7050608@kitware.com> References: <53BAB949.7050608@kitware.com> Message-ID: HI Brad, 1) I only have Windows 8,1 but, like you, I don't think that is the issue. 2) The VTK version I am using is from the master: SHA1 ID: 6ab475b49b0d3c29742c5fc7edf98767cc9712d5 dated 2014-06-26 09:29:34. How do I determine on which particular example it fails? Configure runs Ok, but Generate fails. A subsequent run with the command line works Ok. So I am pretty sure it it something in the GUI. I will check out the latest CMake from the repository, and build it, using QT 5.3 and see if that works. Let me know what I can do to help. Regards Andrew On Tue, Jul 8, 2014 at 1:14 AM, Brad King wrote: > On 07/04/2014 03:50 AM, Andrew Maclean wrote: > > Has anyone noticed a problem with CMake 3.0 in Windows? > > Have you tested on other versions of Windows other than 8.1? > I doubt it is dependent on the version of Windows. > > > Using cmake-gui in Windows 8.1 on the VTK Wiki Examples. > > The compiler is: VS 12 2013 Win64 > > What version of VTK did you build? Which example from the Wiki fails? > > > Configure works Ok, however generate fails with a run-time error when > > it has completed about 75% of the generation process - it seems to > > hang at this point then crash. > > That sounds like unbounded recursion followed by stack overflow. > We'll need to reproduce this to debug it of course. > > Thanks, > -Brad > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Tue Jul 8 03:38:18 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Tue, 8 Jul 2014 17:38:18 +1000 Subject: [CMake] cmake-gui crash in Windows 8.1 In-Reply-To: References: <53BAB949.7050608@kitware.com> Message-ID: I downloaded the most recent version of CMake in the master and built is with VS 12 2013 64bit. I ran the debug version on the Wikiexamples and it consumed over 4GB of memory. It seemed to run to completion after about 4h and I could close it but it did not exit normally as the Visual Studio IDE hung waiting for it to terminate (cmake-gui did vanish from the task manager but no memory was released). I tried this twice and the same thing happens. The call stack is empty in the VS IDE. Andrew On Tue, Jul 8, 2014 at 8:23 AM, Andrew Maclean wrote: > HI Brad, > > 1) I only have Windows 8,1 but, like you, I don't think that is the issue. > > 2) The VTK version I am using is from the master: SHA1 > ID: 6ab475b49b0d3c29742c5fc7edf98767cc9712d5 dated 2014-06-26 09:29:34. > How do I determine on which particular example it fails? Configure > runs Ok, but Generate fails. A subsequent run with the command line works > Ok. So I am pretty sure it it something in the GUI. > > I will check out the latest CMake from the repository, and build it, using > QT 5.3 and see if that works. > > Let me know what I can do to help. > > Regards > Andrew > > > On Tue, Jul 8, 2014 at 1:14 AM, Brad King wrote: > >> On 07/04/2014 03:50 AM, Andrew Maclean wrote: >> > Has anyone noticed a problem with CMake 3.0 in Windows? >> >> Have you tested on other versions of Windows other than 8.1? >> I doubt it is dependent on the version of Windows. >> >> > Using cmake-gui in Windows 8.1 on the VTK Wiki Examples. >> > The compiler is: VS 12 2013 Win64 >> >> What version of VTK did you build? Which example from the Wiki fails? >> >> > Configure works Ok, however generate fails with a run-time error when >> > it has completed about 75% of the generation process - it seems to >> > hang at this point then crash. >> >> That sounds like unbounded recursion followed by stack overflow. >> We'll need to reproduce this to debug it of course. >> >> Thanks, >> -Brad >> >> > > > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjklaim at gmail.com Wed Jul 9 05:10:39 2014 From: mjklaim at gmail.com (=?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?=) Date: Wed, 9 Jul 2014 11:10:39 +0200 Subject: [CMake] cmake-gui crash in Windows 8.1 In-Reply-To: References: Message-ID: On Fri, Jul 4, 2014 at 9:50 AM, Andrew Maclean wrote: > Hi All, > Has anyone noticed a problem with CMake 3.0 in Windows? > > I switched recently to CMake 3.0 for my project (uninstalled previous cmake, installed new cmake, changed cmake scripts version requirement to 3.0) I didn't not meet any strange problem so far. > Using cmake-gui in Windows 8.1 on the VTK Wiki Examples. > The compiler is: VS 12 2013 Win64 > Same configuration here (Win 8.1 64bit with both 32 and 64bit builds for vc2013) but I'm not compiling the wiki examples. The problem might be related to the example being to old or something like that? Anyway could you point to a specific example so that I can try it? Maybe the examples specify a CMake version that triggers the problem in CMake 3.0 implementation. > Configure works Ok, however generate fails with a run-time error when it > has completed about 75% of the generation process - it seems to hang at > this point then crash. > The message is: > "This application has requested the Runtime to terminate it in an unusual > way. Please contact the application's support team for more information." > > A subsequent running of CMake from the command line is OK. > > I have only ever seen this with the VTK Wiki Examples. Building VTK works > OK. > There is no problem with the last version of CMake 2.8. > Regards > Andrew > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Wed Jul 9 05:21:57 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Wed, 9 Jul 2014 19:21:57 +1000 Subject: [CMake] cmake-gui crash in Windows 8.1 In-Reply-To: References: Message-ID: I have no problems with any other CMake build just with the vtk wiki examples. If you get a chance I would appreciate it if you could try a 64-bit build on the examples to see if the same issue happens to you. Regards Andrew. On Jul 9, 2014 7:10 PM, "Klaim - Jo?l Lamotte" wrote: > > > > > On Fri, Jul 4, 2014 at 9:50 AM, Andrew Maclean wrote: >> >> Hi All, >> Has anyone noticed a problem with CMake 3.0 in Windows? >> > > I switched recently to CMake 3.0 for my project (uninstalled previous cmake, installed new cmake, changed cmake scripts version requirement to 3.0) > I didn't not meet any strange problem so far. > >> >> Using cmake-gui in Windows 8.1 on the VTK Wiki Examples. >> The compiler is: VS 12 2013 Win64 > > > Same configuration here (Win 8.1 64bit with both 32 and 64bit builds for vc2013) but I'm not compiling the wiki examples. > The problem might be related to the example being to old or something like that? > Anyway could you point to a specific example so that I can try it? > Maybe the examples specify a CMake version that triggers the problem in CMake 3.0 implementation. > >> >> Configure works Ok, however generate fails with a run-time error when it has completed about 75% of the generation process - it seems to hang at this point then crash. >> The message is: >> "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." >> >> A subsequent running of CMake from the command line is OK. >> >> I have only ever seen this with the VTK Wiki Examples. Building VTK works OK. >> There is no problem with the last version of CMake 2.8. >> Regards >> Andrew >> -- >> ___________________________________________ >> Andrew J. P. Maclean >> >> ___________________________________________ >> >> -- >> >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at klingt.org Wed Jul 9 06:47:25 2014 From: tim at klingt.org (Tim Blechmann) Date: Wed, 09 Jul 2014 12:47:25 +0200 Subject: [CMake] installing osx bundles Message-ID: hi all, i'm having some troubles, trying to install osx bundles: app bundles: installing an app bundle target (created with MACOSX_BUNDLE and property BUNDLE=1) will install (a) the bundle and (b) the executable (which is usually found in Contents/MacOS). in a way, i'd only expect the bundle to be installed, not the executable. library bundles: library bundles (created with MODULE and property BUNDLE=1) are not installed at all. how can i install them? i'm installing all targets via: install(TARGETS MyApp MyModule DESTINATION . ) thnx, tim From mjklaim at gmail.com Wed Jul 9 07:49:39 2014 From: mjklaim at gmail.com (=?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?=) Date: Wed, 9 Jul 2014 13:49:39 +0200 Subject: [CMake] cmake-gui crash in Windows 8.1 In-Reply-To: References: Message-ID: I first had to generate (for vs2013 64bit) the project files for VTK itself (6.1.0) but there is a crash around the end of the configuration with the message in the screenshot. The configuration actually ends but with a few warnings related to the custom command that crashes. The generation apparently work. (see the logs attached) I compiled all VTK for release, no apparent problem, then I tried cmake gui with the wikiexamples. Configuration went with no apparent problem (see the logs attached). Generation was proportionally very long (2minutes vs a few seconds of configuration) and the memory used by cmake kept growing until reaching 1.6go, but it did end. There might be an issue related to memory consumption and these specific scripts. The 1.6go are not released once the generation is done, but is released if I try to configure another project, so i'm not sure if it's a leak. I tried the generation twice without restarting CMake GUI (both making cmake reach 1.6+go) and didn't reproduce the crash so far. I might have more available memory than you though. [image: Inline image 1] On Wed, Jul 9, 2014 at 11:21 AM, Andrew Maclean wrote: > I have no problems with any other CMake build just with the vtk wiki > examples. If you get a chance I would appreciate it if you could try a > 64-bit build on the examples to see if the same issue happens to you. > > Regards > Andrew. > > On Jul 9, 2014 7:10 PM, "Klaim - Jo?l Lamotte" wrote: > > > > > > > > > > On Fri, Jul 4, 2014 at 9:50 AM, Andrew Maclean < > andrew.amaclean at gmail.com> wrote: > >> > >> Hi All, > >> Has anyone noticed a problem with CMake 3.0 in Windows? > >> > > > > I switched recently to CMake 3.0 for my project (uninstalled previous > cmake, installed new cmake, changed cmake scripts version requirement to > 3.0) > > I didn't not meet any strange problem so far. > > > >> > >> Using cmake-gui in Windows 8.1 on the VTK Wiki Examples. > >> The compiler is: VS 12 2013 Win64 > > > > > > Same configuration here (Win 8.1 64bit with both 32 and 64bit builds for > vc2013) but I'm not compiling the wiki examples. > > The problem might be related to the example being to old or something > like that? > > Anyway could you point to a specific example so that I can try it? > > Maybe the examples specify a CMake version that triggers the problem in > CMake 3.0 implementation. > > > >> > >> Configure works Ok, however generate fails with a run-time error when > it has completed about 75% of the generation process - it seems to hang at > this point then crash. > >> The message is: > >> "This application has requested the Runtime to terminate it in an > unusual way. Please contact the application's support team for more > information." > >> > >> A subsequent running of CMake from the command line is OK. > >> > >> I have only ever seen this with the VTK Wiki Examples. Building VTK > works OK. > >> There is no problem with the last version of CMake 2.8. > >> Regards > >> Andrew > >> -- > >> ___________________________________________ > >> Andrew J. P. Maclean > >> > >> ___________________________________________ > >> > >> -- > >> > >> 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 > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cmake_vtk_error.png Type: image/png Size: 8069 bytes Desc: not available URL: -------------- next part -------------- Here is the full log (VTK-6.1.0, VS2013 64bit): The C compiler identification is MSVC 18.0.30501.0 The CXX compiler identification is MSVC 18.0.30501.0 Check for working C compiler using: Visual Studio 12 2013 Win64 Check for working C compiler using: Visual Studio 12 2013 Win64 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler using: Visual Studio 12 2013 Win64 Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Performing Test Support for 64 bit file systems Performing Test Support for 64 bit file systems - Failed Performing Test VTK_CONST_REVERSE_ITERATOR_COMPARISON Performing Test VTK_CONST_REVERSE_ITERATOR_COMPARISON - Success Check if the system is big endian Searching 16 bit integer Looking for sys/types.h Looking for sys/types.h - found Looking for stdint.h Looking for stdint.h - found Looking for stddef.h Looking for stddef.h - found Check size of unsigned short Check size of unsigned short - done Using unsigned short Check if the system is big endian - little endian Looking for include file pthread.h Looking for include file pthread.h - not found Found Threads: TRUE Looking for C++ include iostream Looking for C++ include iostream - found Check for STD namespace Check for STD namespace - found Check for ANSI scope Check for ANSI scope - found Check for sstream Check for sstream - found Check size of int Check size of int - done Check size of long Check size of long - done Check size of char Check size of char - done Check size of short Check size of short - done Check size of float Check size of float - done Check size of double Check size of double - done Check size of long long Check size of long long - done Check size of __int64 Check size of __int64 - done Check size of uintptr_t Check size of uintptr_t - done Checking whether long and __int64 are the same type Checking whether long and __int64 are the same type -- no Checking whether long long and __int64 are the same type Checking whether long long and __int64 are the same type -- yes Checking signedness of char Checking signedness of char -- signed Checking support for full template specialization syntax Checking support for full template specialization syntax -- yes Checking support for C++ explicit template instantiation Checking support for C++ explicit template instantiation -- yes Checking ANSI streams end-of-file bug level Checking ANSI streams end-of-file bug level - 1 Checking if ostream supports long long Checking if ostream supports long long -- yes Checking if istream supports long long Checking if istream supports long long -- yes Looking for getsockname in socket Looking for getsockname in socket - not found Checking for getsockname with socklen_t Checking for getsockname with socklen_t -- no Looking for SO_REUSEADDR Looking for SO_REUSEADDR - not found Group StandAlone modules: vtkChartsCore;vtkCommonComputationalGeometry;vtkCommonCore;vtkCommonExecutionModel;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkDomainsChemistry;vtkFiltersAMR;vtkFiltersCore;vtkFiltersExtraction;vtkFiltersFlowPaths;vtkFiltersGeneral;vtkFiltersGeneric;vtkFiltersGeometry;vtkFiltersHybrid;vtkFiltersHyperTree;vtkFiltersImaging;vtkFiltersModeling;vtkFiltersParallel;vtkFiltersParallelImaging;vtkFiltersProgrammable;vtkFiltersSelection;vtkFiltersSMP;vtkFiltersSources;vtkFiltersStatistics;vtkFiltersTexture;vtkFiltersVerdict;vtkImagingColor;vtkImagingCore;vtkImagingFourier;vtkImagingGeneral;vtkImagingHybrid;vtkImagingMath;vtkImagingMorphological;vtkImagingSources;vtkImagingStatistics;vtkImagingStencil;vtkInfovisCore;vtkInfovisLayout;vtkIOAMR;vtkIOCore;vtkIOEnSight;vtkIOExodus;vtkIOExport;vtkIOGeometry;vtkIOImage;vtkIOImport;vtkIOInfovis;vtkIOLegacy;vtkIOLSDyna;vtkIOMINC;vtkIOMovie;vtkIONetCDF;vtkIOParallel;vtkIOPLY;vtkIOSQL;vtkIOVideo;vtkIOXML;vtkIOXMLParser;vtkParallelCore Group Imaging modules: vtkFiltersImaging;vtkImagingColor;vtkImagingFourier;vtkImagingGeneral;vtkImagingHybrid;vtkImagingMath;vtkImagingMorphological;vtkImagingSources;vtkImagingStatistics;vtkImagingStencil;vtkInteractionImage;vtkRenderingImage Group MPI modules: vtkFiltersParallelGeometry;vtkFiltersParallelMPI;vtkIOMPIImage;vtkIOMPIParallel;vtkIOParallelNetCDF;vtkParallelMPI Group Rendering modules: vtkGeovisCore;vtkInteractionImage;vtkInteractionStyle;vtkInteractionWidgets;vtkRenderingAnnotation;vtkRenderingContext2D;vtkRenderingCore;vtkRenderingFreeType;vtkRenderingFreeTypeOpenGL;vtkRenderingImage;vtkRenderingLabel;vtkRenderingLIC;vtkRenderingLOD;vtkRenderingOpenGL;vtkRenderingVolume;vtkRenderingVolumeAMR;vtkRenderingVolumeOpenGL;vtkViewsContext2D;vtkViewsCore;vtkViewsGeovis;vtkViewsInfovis Group Qt modules: vtkGUISupportQt;vtkGUISupportQtOpenGL;vtkGUISupportQtSQL;vtkGUISupportQtWebkit;vtkRenderingQt;vtkViewsQt Group Tk modules: vtkRenderingTk Group Views modules: vtkViewsContext2D;vtkViewsGeovis Group Web modules: vtkWebApplications;vtkWebCore;vtkWebInstall;vtkWebJavaScript;vtkWebPython;vtkWebGLExporter Enabled 110 modules: * vtkChartsCore, needed by 2 modules: VTK_Group_StandAlone vtkViewsInfovis * vtkCommonColor, needed by 2 modules: vtkChartsCore vtkViewsInfovis * vtkCommonComputationalGeometry, needed by 5 modules: VTK_Group_StandAlone vtkFiltersGeneral vtkFiltersSelection vtkFiltersSources vtkImagingStencil * vtkCommonCore, needed by 7 modules: VTK_Group_StandAlone vtkCommonMath vtkCommonSystem vtkCommonTransforms vtkIOExport vtkIOImport vtkParallelCore * vtkCommonDataModel, needed by 15 modules: vtkCommonColor vtkCommonComputationalGeometry vtkCommonExecutionModel vtkDomainsChemistry vtkIOCore vtkIOGeometry vtkIOImage vtkIOInfovis vtkIOLegacy vtkIOMovie vtkIONetCDF vtkIOXMLParser vtkImagingMath vtkInfovisCore vtkRenderingContext2D * vtkCommonExecutionModel, needed by 19 modules: VTK_Group_StandAlone vtkFiltersCore vtkFiltersExtraction vtkFiltersFlowPaths vtkFiltersProgrammable vtkFiltersStatistics vtkFiltersVerdict vtkIOCore vtkIOEnSight vtkIOImage vtkIOLSDyna vtkIOMINC vtkIOMovie vtkIOPLY vtkIOVideo vtkImagingCore vtkImagingMath vtkInfovisLayout vtkRenderingCore * vtkCommonMath, needed by 9 modules: vtkCommonComputationalGeometry vtkCommonDataModel vtkCommonMisc vtkCommonTransforms vtkFiltersCore vtkFiltersStatistics vtkIOImage vtkImagingCore vtkRenderingContext2D * vtkCommonMisc, needed by 12 modules: VTK_Group_StandAlone vtkCommonDataModel vtkCommonExecutionModel vtkFiltersCore vtkFiltersStatistics vtkIOCore vtkIOGeometry vtkIOImage vtkIOInfovis vtkIOLegacy vtkIOPLY vtkIOXMLParser * vtkCommonSystem, needed by 13 modules: VTK_Group_StandAlone vtkCommonComputationalGeometry vtkCommonDataModel vtkFiltersCore vtkIOGeometry vtkIOImage vtkIOInfovis vtkIOLegacy vtkIOMovie vtkIONetCDF vtkIOXMLParser vtkImagingCore vtkInfovisCore * vtkCommonTransforms, needed by 8 modules: VTK_Group_StandAlone vtkCommonDataModel vtkFiltersCore vtkFiltersStatistics vtkIOImage vtkImagingCore vtkRenderingContext2D vtkRenderingCore * vtkDICOMParser, needed by vtkIOImage. * vtkDomainsChemistry, needed by VTK_Group_StandAlone. * vtkFiltersAMR, needed by 3 modules: VTK_Group_StandAlone vtkIOAMR vtkRenderingVolumeAMR * vtkFiltersCore, needed by 7 modules: VTK_Group_StandAlone vtkFiltersExtraction vtkFiltersGeneral vtkFiltersGeneric vtkFiltersGeometry vtkFiltersSMP vtkFiltersSelection * vtkFiltersExtraction, needed by 6 modules: VTK_Group_StandAlone vtkFiltersParallel vtkInfovisCore vtkInteractionStyle vtkRenderingCore vtkRenderingLabel * vtkFiltersFlowPaths, needed by VTK_Group_StandAlone. * vtkFiltersGeneral, needed by 13 modules: VTK_Group_StandAlone vtkFiltersAMR vtkFiltersExtraction vtkFiltersFlowPaths vtkFiltersHybrid vtkFiltersHyperTree vtkFiltersModeling vtkFiltersSMP vtkFiltersSources vtkFiltersTexture vtkIOExodus vtkInfovisCore vtkRenderingVolumeOpenGL * vtkFiltersGeneric, needed by VTK_Group_StandAlone. * vtkFiltersGeometry, needed by 5 modules: VTK_Group_StandAlone vtkFiltersParallel vtkIOExport vtkRenderingCore vtkViewsInfovis * vtkFiltersHybrid, needed by 3 modules: VTK_Group_StandAlone vtkIOMINC vtkInteractionWidgets * vtkFiltersHyperTree, needed by VTK_Group_StandAlone. * vtkFiltersImaging, needed by 3 modules: VTK_Group_StandAlone vtkFiltersParallelImaging vtkViewsInfovis * vtkFiltersModeling, needed by 6 modules: VTK_Group_StandAlone vtkFiltersParallel vtkInfovisLayout vtkInteractionWidgets vtkRenderingLOD vtkViewsInfovis * vtkFiltersParallel, needed by 3 modules: VTK_Group_StandAlone vtkFiltersParallelImaging vtkIOParallel * vtkFiltersParallelImaging, needed by VTK_Group_StandAlone. * vtkFiltersProgrammable, needed by VTK_Group_StandAlone. * vtkFiltersSMP, needed by VTK_Group_StandAlone. * vtkFiltersSelection, needed by VTK_Group_StandAlone. * vtkFiltersSources, needed by 10 modules: VTK_Group_StandAlone vtkDomainsChemistry vtkFiltersFlowPaths vtkFiltersGeneric vtkFiltersModeling vtkIOImport vtkInteractionStyle vtkRenderingAnnotation vtkRenderingCore vtkRenderingVolumeOpenGL * vtkFiltersStatistics, needed by 3 modules: VTK_Group_StandAlone vtkFiltersExtraction vtkFiltersImaging * vtkFiltersTexture, needed by VTK_Group_StandAlone. * vtkFiltersVerdict, needed by VTK_Group_StandAlone. * vtkGeovisCore, needed by 2 modules: VTK_Group_Rendering vtkViewsGeovis * vtkIOAMR, needed by VTK_Group_StandAlone. * vtkIOCore, needed by 10 modules: VTK_Group_StandAlone vtkFiltersFlowPaths vtkIOGeometry vtkIOImage vtkIOInfovis vtkIOLegacy vtkIOMovie vtkIONetCDF vtkIOSQL vtkIOXMLParser * vtkIOEnSight, needed by VTK_Group_StandAlone. * vtkIOExodus, needed by VTK_Group_StandAlone. * vtkIOExport, needed by VTK_Group_StandAlone. * vtkIOGeometry, needed by 4 modules: VTK_Group_StandAlone vtkIOMINC vtkIOPLY vtkIOXML * vtkIOImage, needed by 5 modules: VTK_Group_StandAlone vtkIOExport vtkIOMINC vtkIOParallel vtkImagingHybrid * vtkIOImport, needed by VTK_Group_StandAlone. * vtkIOInfovis, needed by VTK_Group_StandAlone. * vtkIOLSDyna, needed by VTK_Group_StandAlone. * vtkIOLegacy, needed by 5 modules: VTK_Group_StandAlone vtkFiltersParallelImaging vtkIOInfovis vtkParallelCore vtkRenderingLIC * vtkIOMINC, needed by VTK_Group_StandAlone. * vtkIOMovie, needed by VTK_Group_StandAlone. * vtkIONetCDF, needed by 2 modules: VTK_Group_StandAlone vtkIOParallel * vtkIOPLY, needed by VTK_Group_StandAlone. * vtkIOParallel, needed by VTK_Group_StandAlone. * vtkIOSQL, needed by VTK_Group_StandAlone. * vtkIOVideo, needed by VTK_Group_StandAlone. * vtkIOXML, needed by 7 modules: VTK_Group_StandAlone vtkDomainsChemistry vtkGeovisCore vtkIOExodus vtkIOLSDyna vtkIOParallel vtkRenderingLIC * vtkIOXMLParser, needed by 2 modules: VTK_Group_StandAlone vtkIOXML * vtkImagingColor, needed by 3 modules: VTK_Group_StandAlone vtkInteractionImage vtkRenderingAnnotation * vtkImagingCore, needed by 12 modules: VTK_Group_StandAlone vtkFiltersParallelImaging vtkIOExport vtkImagingColor vtkImagingFourier vtkImagingHybrid vtkImagingMorphological vtkImagingSources vtkImagingStatistics vtkImagingStencil vtkRenderingImage vtkRenderingVolume * vtkImagingFourier, needed by 2 modules: VTK_Group_StandAlone vtkFiltersStatistics * vtkImagingGeneral, needed by 4 modules: VTK_Group_StandAlone vtkFiltersImaging vtkImagingMorphological vtkInteractionWidgets * vtkImagingHybrid, needed by 4 modules: VTK_Group_StandAlone vtkInfovisLayout vtkInteractionWidgets vtkRenderingOpenGL * vtkImagingMath, needed by VTK_Group_StandAlone. * vtkImagingMorphological, needed by VTK_Group_StandAlone. * vtkImagingSources, needed by 5 modules: VTK_Group_StandAlone vtkFiltersHybrid vtkFiltersImaging vtkImagingGeneral vtkRenderingLIC * vtkImagingStatistics, needed by VTK_Group_StandAlone. * vtkImagingStencil, needed by VTK_Group_StandAlone. * vtkInfovisCore, needed by 4 modules: VTK_Group_StandAlone vtkChartsCore vtkIOInfovis vtkInfovisLayout * vtkInfovisLayout, needed by 3 modules: VTK_Group_StandAlone vtkGeovisCore vtkViewsInfovis * vtkInteractionImage, needed by VTK_Group_Rendering. * vtkInteractionStyle, needed by 5 modules: VTK_Group_Rendering vtkGeovisCore vtkInteractionImage vtkInteractionWidgets vtkViewsInfovis * vtkInteractionWidgets, needed by 4 modules: VTK_Group_Rendering vtkGeovisCore vtkInteractionImage vtkViewsCore * vtkMetaIO, needed by vtkIOImage. * vtkParallelCore, needed by 7 modules: VTK_Group_StandAlone vtkFiltersAMR vtkFiltersParallel vtkFiltersParallelImaging vtkIOAMR vtkIOParallel vtkRenderingVolumeAMR * vtkParseOGLExt, needed by vtkRenderingOpenGL. * vtkRenderingAnnotation, needed by 3 modules: VTK_Group_Rendering vtkIOExport vtkInteractionWidgets * vtkRenderingContext2D, needed by 6 modules: VTK_Group_Rendering vtkChartsCore vtkIOExport vtkRenderingGL2PS vtkViewsContext2D vtkViewsInfovis * vtkRenderingCore, needed by 18 modules: VTK_Group_Rendering vtkDomainsChemistry vtkFiltersHybrid vtkFiltersParallel vtkIOExport vtkIOImport vtkIOMINC vtkInteractionImage vtkInteractionStyle vtkRenderingContext2D vtkRenderingFreeType vtkRenderingFreeType vtkRenderingFreeTypeOpenGL vtkRenderingImage vtkRenderingLOD vtkRenderingOpenGL vtkRenderingVolume vtkViewsCore * vtkRenderingFreeType, needed by 9 modules: VTK_Group_Rendering vtkIOExport vtkInteractionImage vtkInteractionWidgets vtkRenderingAnnotation vtkRenderingContext2D vtkRenderingFreeTypeOpenGL vtkRenderingGL2PS vtkRenderingLabel * vtkRenderingFreeTypeOpenGL, needed by VTK_Group_Rendering. * vtkRenderingGL2PS, needed by vtkIOExport. * vtkRenderingImage, needed by VTK_Group_Rendering. * vtkRenderingLIC, needed by VTK_Group_Rendering. * vtkRenderingLOD, needed by VTK_Group_Rendering. * vtkRenderingLabel, needed by 3 modules: VTK_Group_Rendering vtkIOExport vtkViewsInfovis * vtkRenderingOpenGL, needed by 8 modules: VTK_Group_Rendering vtkGeovisCore vtkIOExport vtkRenderingContext2D vtkRenderingFreeTypeOpenGL vtkRenderingGL2PS vtkRenderingLIC vtkRenderingVolumeOpenGL * vtkRenderingVolume, needed by 4 modules: VTK_Group_Rendering vtkInteractionWidgets vtkRenderingVolumeAMR vtkRenderingVolumeOpenGL * vtkRenderingVolumeAMR, needed by VTK_Group_Rendering. * vtkRenderingVolumeOpenGL, needed by VTK_Group_Rendering. * vtkUtilitiesEncodeString, needed by vtkRenderingOpenGL. * vtkUtilitiesHashSource, needed by vtkParallelCore. * vtkViewsContext2D, needed by VTK_Group_Rendering. * vtkViewsCore, needed by 4 modules: VTK_Group_Rendering vtkGeovisCore vtkViewsContext2D vtkViewsInfovis * vtkViewsGeovis, needed by VTK_Group_Rendering. * vtkViewsInfovis, needed by 2 modules: VTK_Group_Rendering vtkViewsGeovis * vtkalglib, needed by vtkFiltersStatistics. * vtkexodusII, needed by 2 modules: vtkIOExodus vtkIOParallel * vtkexpat, needed by vtkIOXMLParser. * vtkfreetype, needed by 2 modules: vtkRenderingFreeType vtkftgl * vtkftgl, needed by vtkRenderingFreeType. * vtkgl2ps, needed by 2 modules: vtkIOExport vtkRenderingGL2PS * vtkhdf5, needed by 2 modules: vtkIOAMR vtknetcdf * vtkjpeg, needed by 2 modules: vtkIOImage vtktiff * vtkjsoncpp, needed by vtkIOGeometry. * vtklibproj4, needed by vtkGeovisCore. * vtklibxml2, needed by vtkIOInfovis. * vtknetcdf, needed by 4 modules: vtkIOMINC vtkIONetCDF vtkIOParallel vtkexodusII * vtkoggtheora, needed by vtkIOMovie. * vtkpng, needed by 2 modules: vtkIOImage vtkgl2ps * vtksqlite, needed by vtkIOSQL. * vtksys, needed by 25 modules: vtkCommonCore vtkCommonDataModel vtkCommonSystem vtkDICOMParser vtkIOAMR vtkIOCore vtkIOExodus vtkIOGeometry vtkIOImage vtkIOInfovis vtkIOLSDyna vtkIOLegacy vtkIOMINC vtkIONetCDF vtkIOSQL vtkIOVideo vtkIOXML vtkImagingFourier vtkParallelCore vtkRenderingCore vtkRenderingLIC vtkRenderingOpenGL vtkRenderingVolumeOpenGL vtkUtilitiesEncodeString vtkUtilitiesHashSource * vtktiff, needed by vtkIOImage. * vtkverdict, needed by vtkFiltersVerdict. * vtkzlib, needed by 9 modules: vtkIOCore vtkIOGeometry vtkMetaIO vtkfreetype vtkgl2ps vtkhdf5 vtklibxml2 vtkpng vtktiff Checking whether header cstdio is available Checking whether header cstdio is available - yes Checking for Large File Support Checking for Large File Support - failed to compile Checking whether STL classes are in std namespace Checking whether STL classes are in std namespace - yes Checking whether ANSI stream headers are available Checking whether ANSI stream headers are available - yes Checking whether ANSI streams are in std namespace Checking whether ANSI streams are in std namespace - yes Checking whether ANSI string stream is available Checking whether ANSI string stream is available - yes Checking whether header cstddef is available Checking whether header cstddef is available - yes Checking whether stl string has operator!= for char* Checking whether stl string has operator!= for char* - yes Checking whether stl has iterator_traits Checking whether stl has iterator_traits - yes Checking whether stl has standard template allocator Checking whether stl has standard template allocator - yes Checking for rebind member of stl allocator Checking for rebind member of stl allocator - yes Checking for non-standard argument to stl allocator<>::max_size Checking for non-standard argument to stl allocator<>::max_size - no Checking whether stl containers support allocator objects. Checking whether stl containers support allocator objects. - yes Checking whether ios has binary openmode Checking whether ios has binary openmode - yes Checking whether "<>" is needed for template friends Checking whether "<>" is needed for template friends - yes Checking for member template support Checking for member template support - yes Checking for standard template specialization syntax Checking for standard template specialization syntax - yes Checking whether argument dependent lookup is supported Checking whether argument dependent lookup is supported - yes Checking whether C++ compiler has 'long long' Checking whether C++ compiler has 'long long' - yes Checking whether C++ compiler has '__int64' Checking whether C++ compiler has '__int64' - yes Checking whether long and __int64 are the same type Checking whether long and __int64 are the same type - no Checking whether long long and __int64 are the same type Checking whether long long and __int64 are the same type - yes Checking for C type size macros Checking for C type size macros - compiled Check size of char Check size of char - done Check size of short Check size of short - done Check size of int Check size of int - done Check size of long Check size of long - done Check size of long long Check size of long long - done Check size of __int64 Check size of __int64 - done Checking whether char is signed Checking whether char is signed - yes Checking whether wstring is available Checking whether wstring is available - yes Checking whether C compiler has ptrdiff_t in stddef.h Checking whether C compiler has ptrdiff_t in stddef.h - yes Checking whether C compiler has ssize_t in unistd.h Checking whether C compiler has ssize_t in unistd.h - no Checking whether CXX compiler has setenv Checking whether CXX compiler has setenv - no Checking whether CXX compiler has unsetenv Checking whether CXX compiler has unsetenv - no Checking whether CXX compiler has environ in stdlib.h Checking whether CXX compiler has environ in stdlib.h - yes Checking whether CXX compiler has utimes Checking whether CXX compiler has utimes - no Checking whether CXX compiler has utimensat Checking whether CXX compiler has utimensat - no Looking for include files sys/types.h, ifaddrs.h Looking for include files sys/types.h, ifaddrs.h - not found Looking for GetProcessMemoryInfo Looking for GetProcessMemoryInfo - found Checking whether CXX compiler has rlimit64 Checking whether CXX compiler has rlimit64 - no Checking whether CXX compiler has atol Checking whether CXX compiler has atol - yes Checking whether CXX compiler has atoll Checking whether CXX compiler has atoll - yes Checking whether CXX compiler has _atoi64 Checking whether CXX compiler has _atoi64 - yes Looking for InterlockedAdd Looking for InterlockedAdd - found Performing Test VTK_HAS_STD_ISNAN Performing Test VTK_HAS_STD_ISNAN - Success Performing Test VTK_HAS_STD_ISINF Performing Test VTK_HAS_STD_ISINF - Success Performing Test VTK_HAS_STD_ISFINITE Performing Test VTK_HAS_STD_ISFINITE - Success Looking for isnan Looking for isnan - found Looking for isinf Looking for isinf - found Looking for isfinite Looking for isfinite - found Looking for finite Looking for finite - not found Looking for fenv.h Looking for fenv.h - found Looking for feenableexcept Looking for feenableexcept - not found Performing Test COMPILER_HAS_DEPRECATED_ATTR Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed Performing Test COMPILER_HAS_DEPRECATED Performing Test COMPILER_HAS_DEPRECATED - Success Found OpenGL: opengl32 Looking for include file assert.h Looking for include file assert.h - found Looking for include file dlfcn.h Looking for include file dlfcn.h - not found Looking for include file fcntl.h Looking for include file fcntl.h - found Looking for include file inttypes.h Looking for include file inttypes.h - found Looking for include file limits.h Looking for include file limits.h - found Looking for include file malloc.h Looking for include file malloc.h - found Looking for include file memory.h Looking for include file memory.h - found Looking for include file stdlib.h Looking for include file stdlib.h - found Looking for include file string.h Looking for include file string.h - found Looking for include file strings.h Looking for include file strings.h - not found Looking for include file sys/stat.h Looking for include file sys/stat.h - found Looking for include file sys/time.h Looking for include file sys/time.h - not found Looking for include file unistd.h Looking for include file unistd.h - not found Looking for include file windows.h Looking for include file windows.h - found Looking for include file ieeefp.h Looking for include file ieeefp.h - not found Looking for floor Looking for floor - found Looking for getopt Looking for getopt - not found Looking for isascii Looking for isascii - not found Looking for memmove Looking for memmove - found Looking for memset Looking for memset - found Looking for mmap Looking for mmap - not found Looking for pow Looking for pow - found Looking for sqrt Looking for sqrt - found Looking for strcasecmp Looking for strcasecmp - not found Looking for strchr Looking for strchr - found Looking for strrchr Looking for strrchr - found Looking for strstr Looking for strstr - found Looking for strtol Looking for strtol - found Looking for strtoul Looking for strtoul - found Check size of int Check size of int - done Check size of long Check size of long - done Looking for csin Looking for csin - not found Looking for atanh Looking for atanh - not found Looking for printf in ws2_32; Looking for printf in ws2_32; - found Looking for printf in wsock32;ws2_32 Looking for printf in wsock32;ws2_32 - found Looking for gethostname in ucb;ws2_32;wsock32 Looking for gethostname in ucb;ws2_32;wsock32 - not found Looking for connect in socket;ws2_32;wsock32 Looking for connect in socket;ws2_32;wsock32 - not found Looking for gethostbyname in c Looking for gethostbyname in c - not found Looking for gethostbyname in nsl;ws2_32;wsock32 Looking for gethostbyname in nsl;ws2_32;wsock32 - not found Looking for include file globus/common.h Looking for include file globus/common.h - not found Looking for include files io.h, mfhdf.h Looking for include files io.h, mfhdf.h - not found Looking for include files io.h, pdb.h Looking for include files io.h, pdb.h - not found Looking for include files io.h, pthread.h Looking for include files io.h, pthread.h - not found Looking for 3 include files io.h, ..., srbclient.h Looking for 3 include files io.h, ..., srbclient.h - not found Looking for 4 include files io.h, ..., stdint.h Looking for 4 include files io.h, ..., stdint.h - found Looking for 5 include files io.h, ..., string.h Looking for 5 include files io.h, ..., string.h - found Looking for 6 include files io.h, ..., strings.h Looking for 6 include files io.h, ..., strings.h - not found Looking for 6 include files io.h, ..., sys/ioctl.h Looking for 6 include files io.h, ..., sys/ioctl.h - not found Looking for 6 include files io.h, ..., sys/proc.h Looking for 6 include files io.h, ..., sys/proc.h - not found Looking for 6 include files io.h, ..., sys/resource.h Looking for 6 include files io.h, ..., sys/resource.h - not found Looking for 6 include files io.h, ..., sys/socket.h Looking for 6 include files io.h, ..., sys/socket.h - not found Looking for 7 include files io.h, ..., sys/time.h Looking for 7 include files io.h, ..., sys/time.h - not found Looking for 7 include files io.h, ..., time.h Looking for 7 include files io.h, ..., time.h - found Looking for 10 include files io.h, ..., unistd.h Looking for 10 include files io.h, ..., unistd.h - not found Looking for 10 include files io.h, ..., stdlib.h Looking for 10 include files io.h, ..., stdlib.h - found Looking for 11 include files io.h, ..., memory.h Looking for 11 include files io.h, ..., memory.h - found Looking for 12 include files io.h, ..., dlfcn.h Looking for 12 include files io.h, ..., dlfcn.h - not found Looking for 12 include files io.h, ..., features.h Looking for 12 include files io.h, ..., features.h - not found Looking for 12 include files io.h, ..., inttypes.h Looking for 12 include files io.h, ..., inttypes.h - found Looking for 14 include files io.h, ..., netinet/in.h Looking for 14 include files io.h, ..., netinet/in.h - not found Looking for C++ include stdint.h Looking for C++ include stdint.h - found Check size of char Check size of char - done Check size of short Check size of short - done Check size of int Check size of int - done Check size of unsigned Check size of unsigned - done Check size of long Check size of long - done Check size of long long Check size of long long - done Check size of __int64 Check size of __int64 - done Check size of float Check size of float - done Check size of double Check size of double - done Check size of long double Check size of long double - done Check size of int8_t Check size of int8_t - done Check size of uint8_t Check size of uint8_t - done Check size of int_least8_t Check size of int_least8_t - done Check size of uint_least8_t Check size of uint_least8_t - done Check size of int_fast8_t Check size of int_fast8_t - done Check size of uint_fast8_t Check size of uint_fast8_t - done Check size of int16_t Check size of int16_t - done Check size of uint16_t Check size of uint16_t - done Check size of int_least16_t Check size of int_least16_t - done Check size of uint_least16_t Check size of uint_least16_t - done Check size of int_fast16_t Check size of int_fast16_t - done Check size of uint_fast16_t Check size of uint_fast16_t - done Check size of int32_t Check size of int32_t - done Check size of uint32_t Check size of uint32_t - done Check size of int_least32_t Check size of int_least32_t - done Check size of uint_least32_t Check size of uint_least32_t - done Check size of int_fast32_t Check size of int_fast32_t - done Check size of uint_fast32_t Check size of uint_fast32_t - done Check size of int64_t Check size of int64_t - done Check size of uint64_t Check size of uint64_t - done Check size of int_least64_t Check size of int_least64_t - done Check size of uint_least64_t Check size of uint_least64_t - done Check size of int_fast64_t Check size of int_fast64_t - done Check size of uint_fast64_t Check size of uint_fast64_t - done Check size of size_t Check size of size_t - done Check size of ssize_t Check size of ssize_t - failed Check size of off_t Check size of off_t - done Check size of off64_t Check size of off64_t - failed Looking for alarm Looking for alarm - not found Looking for fork Looking for fork - not found Looking for frexpf Looking for frexpf - not found Looking for frexpl Looking for frexpl - not found Looking for getpwuid Looking for getpwuid - not found Looking for getrusage Looking for getrusage - not found Looking for lstat Looking for lstat - not found Looking for rand_r Looking for rand_r - not found Looking for random Looking for random - not found Looking for setsysinfo Looking for setsysinfo - not found Looking for signal Looking for signal - found Looking for setjmp Looking for setjmp - found Looking for siglongjmp Looking for siglongjmp - not found Looking for sigsetjmp Looking for sigsetjmp - not found Looking for sigaction Looking for sigaction - not found Looking for sigprocmask Looking for sigprocmask - not found Looking for snprintf Looking for snprintf - not found Looking for srandom Looking for srandom - not found Looking for symlink Looking for symlink - not found Looking for vasprintf Looking for vasprintf - not found Looking for waitpid Looking for waitpid - not found Looking for vsnprintf Looking for vsnprintf - found Looking for ioctl Looking for ioctl - not found Looking for fseeko Looking for fseeko - not found Looking for ftello Looking for ftello - not found Looking for fstat64 Looking for fstat64 - not found Looking for stat64 Looking for stat64 - not found Looking for tzname Looking for tzname - found Performing Other Test INLINE_TEST_inline - Failed Performing Other Test INLINE_TEST___inline__ - Failed Performing Other Test INLINE_TEST___inline - Success Checking for appropriate format for 64 bit long: Checking for apropriate format for 64 bit long: found "ll" checking IF converting from long double to integers is accurate... yes Checking IF converting from long double to integers works... yes checking IF accurately converting from integers to long double... yes Checking IF accurately converting unsigned long to float values... yes Checking IF accurately converting unsigned long long to floating-point values... no Checking IF accurately roundup converting floating-point to unsigned long long values... yes Checking IF right maximum converting floating-point to unsigned long long values... yes Checking IF correctly converting long double to unsigned int values... yes Checking IF compiling unsigned long long to floating-point typecasts work... yes Checking IF compiling long long to floating-point typecasts work... yes Checking IF converting unsigned long long to long double with precision... no Checking IF overflows normally converting floating-point to integer values... yes Checking IF correctly converting long double to (unsigned) long long values... yes Checking IF correctly converting (unsigned) long long to long double values... yes Checking IF alignment restrictions are strictly enforced... yes CMake Warning (dev) at ThirdParty/hdf5/vtkhdf5/src/CMakeLists.txt:607 (ADD_CUSTOM_COMMAND): Policy CMP0040 is not set: The target in the TARGET signature of add_custom_command() must exist. Run "cmake --help-policy CMP0040" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The target name "E:/Downloads/web/VTKWikiExamples/buid-VTK-6.1.0-64/ThirdParty/hdf5/vtkhdf5/H5Edefin.h" is unknown in this context. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at ThirdParty/hdf5/vtkhdf5/src/CMakeLists.txt:614 (ADD_CUSTOM_COMMAND): Policy CMP0040 is not set: The target in the TARGET signature of add_custom_command() must exist. Run "cmake --help-policy CMP0040" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The target name "E:/Downloads/web/VTKWikiExamples/buid-VTK-6.1.0-64/ThirdParty/hdf5/vtkhdf5/H5version.h" is unknown in this context. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at ThirdParty/hdf5/vtkhdf5/src/CMakeLists.txt:621 (ADD_CUSTOM_COMMAND): Policy CMP0040 is not set: The target in the TARGET signature of add_custom_command() must exist. Run "cmake --help-policy CMP0040" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The target name "E:/Downloads/web/VTKWikiExamples/buid-VTK-6.1.0-64/ThirdParty/hdf5/vtkhdf5/H5overflow.h" is unknown in this context. This warning is for project developers. Use -Wno-dev to suppress it. Looking for 4 include files stdlib.h, ..., float.h Looking for 4 include files stdlib.h, ..., float.h - found Looking for include file alloca.h Looking for include file alloca.h - not found Looking for 5 include files stdlib.h, ..., stdio.h Looking for 5 include files stdlib.h, ..., stdio.h - found Looking for 10 include files stdlib.h, ..., stdbool.h Looking for 10 include files stdlib.h, ..., stdbool.h - found Looking for alloca Looking for alloca - not found Looking for strerror Looking for strerror - found Check size of size_t Check size of size_t - done Check size of ssize_t Check size of ssize_t - failed Check size of ptrdiff_t Check size of ptrdiff_t - done Check size of off_t Check size of off_t - done Check size of double Check size of double - done Check size of float Check size of float - done Check size of short Check size of short - done Check size of uchar Check size of uchar - failed Check size of _Bool Check size of _Bool - done Performing NetCDF Test HAVE_ST_BLKSIZE Performing NetCDF Test HAVE_ST_BLKSIZE - Failed Performing NetCDF Test HAVE_FTRUNCATE Performing NetCDF Test HAVE_FTRUNCATE - Failed Looking for malloc.h Looking for malloc.h - found Looking for dlopen in dl; Looking for dlopen in dl; - not found Looking for shl_load in dld; Looking for shl_load in dld; - not found Looking for dlopen in Looking for dlopen in - not found Looking for 8 include files stdio.h, ..., netdb.h Looking for 8 include files stdio.h, ..., netdb.h - not found Looking for 9 include files stdio.h, ..., sys/socket.h Looking for 9 include files stdio.h, ..., sys/socket.h - not found Looking for 9 include files stdio.h, ..., netinet/in.h Looking for 9 include files stdio.h, ..., netinet/in.h - not found Looking for 9 include files stdio.h, ..., sys/select.h Looking for 9 include files stdio.h, ..., sys/select.h - not found Looking for 13 include files stdio.h, ..., time.h Looking for 13 include files stdio.h, ..., time.h - found Looking for 14 include files stdio.h, ..., signal.h Looking for 14 include files stdio.h, ..., signal.h - found Looking for 15 include files stdio.h, ..., errno.h Looking for 15 include files stdio.h, ..., errno.h - found Looking for 16 include files stdio.h, ..., ansidecl.h Looking for 16 include files stdio.h, ..., ansidecl.h - not found Looking for 16 include files stdio.h, ..., arpa/inet.h Looking for 16 include files stdio.h, ..., arpa/inet.h - not found Looking for 16 include files stdio.h, ..., arpa/nameser.h Looking for 16 include files stdio.h, ..., arpa/nameser.h - not found Looking for 16 include files stdio.h, ..., ctype.h Looking for 16 include files stdio.h, ..., ctype.h - found Looking for 17 include files stdio.h, ..., dirent.h Looking for 17 include files stdio.h, ..., dirent.h - not found Looking for 17 include files stdio.h, ..., dl.h Looking for 17 include files stdio.h, ..., dl.h - not found Looking for 17 include files stdio.h, ..., float.h Looking for 17 include files stdio.h, ..., float.h - found Looking for 18 include files stdio.h, ..., fp_class.h Looking for 18 include files stdio.h, ..., fp_class.h - not found Looking for 18 include files stdio.h, ..., math.h Looking for 18 include files stdio.h, ..., math.h - found Looking for 19 include files stdio.h, ..., nan.h Looking for 19 include files stdio.h, ..., nan.h - not found Looking for 19 include files stdio.h, ..., ndir.h Looking for 19 include files stdio.h, ..., ndir.h - not found Looking for 19 include files stdio.h, ..., pthread.h Looking for 19 include files stdio.h, ..., pthread.h - not found Looking for 19 include files stdio.h, ..., resolv.h Looking for 19 include files stdio.h, ..., resolv.h - not found Looking for 19 include files stdio.h, ..., stdarg.h Looking for 19 include files stdio.h, ..., stdarg.h - found Looking for 20 include files stdio.h, ..., sys/mman.h Looking for 20 include files stdio.h, ..., sys/mman.h - not found Looking for 20 include files stdio.h, ..., sys/timeb.h Looking for 20 include files stdio.h, ..., sys/timeb.h - found Looking for finite Looking for finite - not found Looking for fpclass Looking for fpclass - not found Looking for fp_class Looking for fp_class - not found Looking for fprintf Looking for fprintf - found Looking for ftime Looking for ftime - found Looking for gettimeofday Looking for gettimeofday - not found Looking for localtime Looking for localtime - found Looking for printf Looking for printf - found Looking for sscanf Looking for sscanf - found Looking for sprintf Looking for sprintf - found Looking for snprintf Looking for snprintf - not found Looking for signal Looking for signal - found Looking for strdup Looking for strdup - found Looking for strndup Looking for strndup - not found Looking for strftime Looking for strftime - found Looking for stat Looking for stat - found Looking for _stat Looking for _stat - found Looking for vfprintf Looking for vfprintf - found Looking for vsnprintf Looking for vsnprintf - found Looking for vsprintf Looking for vsprintf - found Checking for getaddrinfo. Checking for getaddrinfo. - no Checking for socklen_t Checking for socklen_t - no Checking for DIR in sys/dir.h Checking for DIR in sys/dir.h - no Checking for DIR in sys/ndir.h Checking for DIR in sys/ndir.h - no Checking for va_copy Checking for va_copy - yes Checking for __va_copy Checking for __va_copy - no Checking for ipv6 support. Checking for ipv6 support. - no Check size of int16_t Check size of int16_t - done Check size of int32_t Check size of int32_t - done Check size of uint32_t Check size of uint32_t - done Check size of uint16_t Check size of uint16_t - done Check size of u_int32_t Check size of u_int32_t - failed Check size of u_int16_t Check size of u_int16_t - failed Check size of int64_t Check size of int64_t - done Check size of short Check size of short - done Check size of int Check size of int - done Check size of long Check size of long - done Check size of long long Check size of long long - done Checking if vfw32 is available Checking if vfw32 is available -- yes Checking if vfw32 supports video capture Checking if vfw32 supports video capture -- yes Configuring done -------------- next part -------------- VTKWikiExamples: VTK VERSION: 6.1.0 VTKWikiExamples: ImageText requires VTK_USE_SYSTEM_FREETYPE and will not be built VTKWikiExamples: PKMeansClustering requires VTK_PARALLEL and will not be built VTKWikiExamples: Not building Qt examples Configuring done From andrew.amaclean at gmail.com Wed Jul 9 07:56:45 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Wed, 9 Jul 2014 21:56:45 +1000 Subject: [CMake] cmake-gui crash in Windows 8.1 In-Reply-To: References: Message-ID: That's similar to what I am seeing in that memory is not released. I built a debug version of CMake and the memory climbed to over 4gb it didn't crash but never released the memory & Visual Studio was waiting for it to exit even though it had vanished from the task manager. Thanks for confirming it. Andrew On Jul 9, 2014 9:49 PM, "Klaim - Jo?l Lamotte" wrote: > I first had to generate (for vs2013 64bit) the project files for VTK > itself (6.1.0) but there is a crash > around the end of the configuration with the message in the screenshot. > The configuration actually ends but with a few warnings related to the > custom command that crashes. > The generation apparently work. (see the logs attached) > > I compiled all VTK for release, no apparent problem, then I tried cmake > gui with the wikiexamples. > Configuration went with no apparent problem (see the logs attached). > Generation was proportionally very long (2minutes vs a few seconds of > configuration) and the memory used by cmake kept growing until reaching > 1.6go, > but it did end. > > There might be an issue related to memory consumption and these specific > scripts. > The 1.6go are not released once the generation is done, but is released if > I try to configure another project, so i'm not sure if it's a leak. > > I tried the generation twice without restarting CMake GUI (both making > cmake reach 1.6+go) and didn't reproduce the crash so far. > I might have more available memory than you though. > > > > [image: Inline image 1] > > > On Wed, Jul 9, 2014 at 11:21 AM, Andrew Maclean > wrote: > >> I have no problems with any other CMake build just with the vtk wiki >> examples. If you get a chance I would appreciate it if you could try a >> 64-bit build on the examples to see if the same issue happens to you. >> >> Regards >> Andrew. >> >> On Jul 9, 2014 7:10 PM, "Klaim - Jo?l Lamotte" wrote: >> > >> > >> > >> > >> > On Fri, Jul 4, 2014 at 9:50 AM, Andrew Maclean < >> andrew.amaclean at gmail.com> wrote: >> >> >> >> Hi All, >> >> Has anyone noticed a problem with CMake 3.0 in Windows? >> >> >> > >> > I switched recently to CMake 3.0 for my project (uninstalled previous >> cmake, installed new cmake, changed cmake scripts version requirement to >> 3.0) >> > I didn't not meet any strange problem so far. >> > >> >> >> >> Using cmake-gui in Windows 8.1 on the VTK Wiki Examples. >> >> The compiler is: VS 12 2013 Win64 >> > >> > >> > Same configuration here (Win 8.1 64bit with both 32 and 64bit builds >> for vc2013) but I'm not compiling the wiki examples. >> > The problem might be related to the example being to old or something >> like that? >> > Anyway could you point to a specific example so that I can try it? >> > Maybe the examples specify a CMake version that triggers the problem in >> CMake 3.0 implementation. >> > >> >> >> >> Configure works Ok, however generate fails with a run-time error when >> it has completed about 75% of the generation process - it seems to hang at >> this point then crash. >> >> The message is: >> >> "This application has requested the Runtime to terminate it in an >> unusual way. Please contact the application's support team for more >> information." >> >> >> >> A subsequent running of CMake from the command line is OK. >> >> >> >> I have only ever seen this with the VTK Wiki Examples. Building VTK >> works OK. >> >> There is no problem with the last version of CMake 2.8. >> >> Regards >> >> Andrew >> >> -- >> >> ___________________________________________ >> >> Andrew J. P. Maclean >> >> >> >> ___________________________________________ >> >> >> >> -- >> >> >> >> 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 >> > >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cmake_vtk_error.png Type: image/png Size: 8069 bytes Desc: not available URL: From julien.jomier at kitware.com Wed Jul 9 09:40:32 2014 From: julien.jomier at kitware.com (Julien Jomier) Date: Wed, 09 Jul 2014 15:40:32 +0200 Subject: [CMake] ANN: CMake Course - September 29 in Lyon, France Message-ID: <53BD4650.6070909@kitware.com> Kitware will be holding a CMake training course on September 29, 2014 at Kitware's office in Lyon, France. This one-day course will cover CMake, CTest, CPack and CDash. Visit our website for more information and registration details (early registration and student discounts available): http://training.kitware.fr/browse/46 Note that the course will be taught in English. If you have any questions, please contact us at training at kitware.fr. We are looking forward to seeing you in Lyon, Julien -- Kitware SAS 26 rue Louis Gu?rin 69100 Villeurbanne, France http://www.kitware.eu From brad.king at kitware.com Wed Jul 9 10:51:26 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 09 Jul 2014 10:51:26 -0400 Subject: [CMake] cmake 3.0 memory usage on VTKWikiExamples (was: cmake-gui crash in Windows 8.1) In-Reply-To: References: <53BAB949.7050608@kitware.com> Message-ID: <53BD56EE.8050505@kitware.com> On 07/08/2014 03:38 AM, Andrew Maclean wrote: > I downloaded the most recent version of CMake in the master and built is with VS 12 2013 64bit. > I ran the debug version on the Wikiexamples and it consumed over 4GB of memory. > It seemed to run to completion after about 4h AFAICT this is the same problem discussed in a thread on the cmake-developers mailing list: cost of usage requirements http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10283 The VTKWikiExamples from https://www.gitorious.org/vtkwikiexamples/wikiexamples creates a large number of individual executables that each link to lots of VTK libraries with deep dependency chains. That is about the worst case for the performance problem discussed in the above-linked thread. In addition to doing a lot of work to propagate context-dependent usage requirements (and in this case decided to do nothing), CMake is allocating a huge amount of memory. I will post back to the thread over there to link this case as another example of the problem so discussion can proceed there. On 07/04/2014 03:50 AM, Andrew Maclean wrote: > There is no problem with the last version of CMake 2.8. What version of 2.8 did you last use? I see the same problem with 2.8.12, but not as extreme. 3.0 has added more usage requirement features and thus takes longer. -Brad From andrew.amaclean at gmail.com Wed Jul 9 17:59:43 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Thu, 10 Jul 2014 07:59:43 +1000 Subject: [CMake] cmake 3.0 memory usage on VTKWikiExamples (was: cmake-gui crash in Windows 8.1) In-Reply-To: <53BD56EE.8050505@kitware.com> References: <53BAB949.7050608@kitware.com> <53BD56EE.8050505@kitware.com> Message-ID: Thanks for looking into this Brad. Regards Andrew On Thu, Jul 10, 2014 at 12:51 AM, Brad King wrote: > On 07/08/2014 03:38 AM, Andrew Maclean wrote: > > I downloaded the most recent version of CMake in the master and built > is with VS 12 2013 64bit. > > I ran the debug version on the Wikiexamples and it consumed over 4GB of > memory. > > It seemed to run to completion after about 4h > > AFAICT this is the same problem discussed in a thread on the > cmake-developers mailing list: > > cost of usage requirements > http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10283 > > The VTKWikiExamples from > > https://www.gitorious.org/vtkwikiexamples/wikiexamples > > creates a large number of individual executables that each link > to lots of VTK libraries with deep dependency chains. That is > about the worst case for the performance problem discussed in > the above-linked thread. In addition to doing a lot of work > to propagate context-dependent usage requirements (and in this > case decided to do nothing), CMake is allocating a huge amount > of memory. > > I will post back to the thread over there to link this case as > another example of the problem so discussion can proceed there. > > On 07/04/2014 03:50 AM, Andrew Maclean wrote: > > There is no problem with the last version of CMake 2.8. > > What version of 2.8 did you last use? I see the same problem with > 2.8.12, but not as extreme. 3.0 has added more usage requirement > features and thus takes longer. > > -Brad > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerhard.gappmeier at ascolab.com Thu Jul 10 03:35:56 2014 From: gerhard.gappmeier at ascolab.com (Gerhard Gappmeier) Date: Thu, 10 Jul 2014 09:35:56 +0200 Subject: [CMake] Problem with CPack components Message-ID: <2508869.V6n6onvoAM@ws-gergap> Hi, I'm generating deb packages for a project using CPack. This project contains a lot of libraries which are used the build the final applications. Because I don't want to distribute the headers and static libraries in the package, but only the executable I tried to use the components to filter what should be included in the package. (like documented here: http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack) However it doesn't work for me. CPack always includes all components. For reproducing this I created a every simple project with just two dummy install targets (no source, no compilation necessary). To reproduce this please do the following: mkdir cpacktest cd cpacktest touch foo.txt touch bar.txt and create the following CMakeLists.txt: project(cpacktest) cmake_minimum_required(VERSION 2.8) # project version info set(MAJOR_VERSION 1) set(MINOR_VERSION 0) set(PATCH_VERSION 0) # create some dummy install targets for testing components install(FILES foo.txt DESTINATION bin COMPONENT applications) install(FILES bar.txt DESTINATION bin COMPONENT libraries) #{{{ Debian package generation ############################################### ################################# IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") INCLUDE(InstallRequiredSystemLibraries) SET(CPACK_SET_DESTDIR "on") SET(CPACK_PACKAGING_INSTALL_PREFIX "/tmp") SET(CPACK_GENERATOR "DEB") SET(CPACK_PACKAGE_DESCRIPTION "CPack Component Test") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Testing filtering for CPack components") SET(CPACK_PACKAGE_VENDOR "ACME Inc.") SET(CPACK_PACKAGE_CONTACT "info at acme.com") SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}") SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}") SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}") SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}. ${CPACK_PACKAGE_VERSION_PATCH}") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}. ${CPACK_PACKAGE_VERSION_PATCH}") SET(CPACK_DEBIAN_COMPONENT_INSTALL ON) SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libcrack2 (>= 2.9.1), libqt5core5a (>= 5.3.0), libqt5widgets5 (>= 5.3.0), libqt5gui5 (>= 5.3.0)") SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") SET(CPACK_DEBIAN_PACKAGE_SECTION "kde") SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) # only pack the applications component, leave out all other components SET(CPACK_COMPONENTS_ALL applications) INCLUDE(CPack) ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") ############################################### ################################# #}}} Building the package: mkdir bld cd bld cmake -DCMAKE_INSTALL_PREFIX=/usr .. cpack This will build the deb package. Or alternatively use this for creating a TGZ cpack -G TGZ Result: The created packages contain both foo.txt and bar.txt. Expected Result: The package should contain only foo.txt I don't know if this is a bug, or if something is missing here in my CMakeLists.txt. I hope you can help me. -- mit freundlichen Gr??en / best regards Gerhard Gappmeier ascolab GmbH - automation systems communication laboratory Tel.: +49 9131 691 123 Fax: +49 9131 691 128 Web: http://www.ascolab.com GPG-KeyId: 5AAC50C4 GPG-Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4 -- ascolab GmbH Gesch?ftsf?hrer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrau? Sitz der Gesellschaft: Am Weichselgarten 7 ? 91058 Erlangen ? Germany Registernummer: HRB 9360 Registergericht: Amtsgericht F?rth -------------- next part -------------- An HTML attachment was scrubbed... URL: From bootsarehax at gmail.com Thu Jul 10 06:12:17 2014 From: bootsarehax at gmail.com (Philipp =?utf-8?b?TcO2bGxlcg==?=) Date: Thu, 10 Jul 2014 10:12:17 +0000 (UTC) Subject: [CMake] Requiring exported CMake targets within the exporting build tree Message-ID: I have a CMake Project Foobar that contains a subdirectory examples that can also be used as a stand-alone CMake build. To do that this sub-directory performs a find_package(Foobar) and uses the exported targets. Foobar provides a FoobarConfig.cmake, FoobarConfigVersion.cmake, and a FoobarExports.cmake and can be used without a FindModule. The code looks roughly like this: ### Top-Level CMakeLists.txt ### cmake_minimum_required(VERSION 3.0.0) project(Foobar) add_library(X SHARED ${my_sources}) install(TARGETS X EXPORT FoobarExports LIBRARY DESTINATION ${my_install_destination}) install(EXPORT FoobarExports DESTINATION ${my_install_destination}) # Create the FoobarExports.cmake for the local build tree export(EXPORT FoobarExports) # the problematic command # Setup FoobarConfig.cmake etc # FoobarConfig.cmake includes FoobarExports.cmake # ... # Force find_package to FOOBAR_DIR option(BUILD_EXAMPLES "Build examples" ON) if(BUILD_EXAMPLES) set(FOOBAR_DIR "${CMAKE_BINARY_DIR}") add_subdirectory(examples) endif() ### examples/CMakeLists.txt ### cmake_minimum_required(VERSION 3.0.0) project(FoobarExamples) # Uses FOOBAR_DIR set above find_package(Foobar NO_MODULE REQUIRED) add_executable(my_exe ${some_sources}) # Use X from Foobar target_link_library(my_exe X) The problem is that export(EXPORT FoobarExports) will only create the FoobarExports.cmake file at the end of generation time to make sure it has the complete FoobarExports export set. So this will fail: cmake . -DBUILD_EXAMPLES=ON # Error: FoobarExports.cmake not found What works, however, is: cmake . cmake . -DBUILD_EXAMPLES=ON # rerun cmake with changed cache variable How can I either force the FoobarExports.cmake file to be written at the time of the call to export or force CMake to run twice, if the file has not been created yet? I also posted this question on StackOverflow [1], but realized to late that it might be a bit too specific and a better place would be this list. Thanks, Philipp [1] : http://stackoverflow.com/questions/24673331/requiring-exported-cmake-targets-within-the-exporting-build-tree From gerhard.gappmeier at ascolab.com Thu Jul 10 08:13:29 2014 From: gerhard.gappmeier at ascolab.com (Gerhard Gappmeier) Date: Thu, 10 Jul 2014 14:13:29 +0200 Subject: [CMake] Problem with CPack components In-Reply-To: <2508869.V6n6onvoAM@ws-gergap> References: <2508869.V6n6onvoAM@ws-gergap> Message-ID: <3249243.9LYR6PYhsE@ws-gergap> Hi all, I debugged the generation process and found out the problems. (using latest git master, cmake 3.0) 1.) It's named CPACK_DEB_COMPONENT_INSTALL and not CPACK_DEBIAN_COMPONENT_INSTALL! This is a little bit confusing, because all other Debian variables start with CPACK_DEBIAN_* But the wiki states CPACK__COMPONENT_INSTALL, where GENAME is DEB and not DEBIAN. This could be made a little bit clearer to avoid confusion. 2.) set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) is required to create a single package. 3.) For Archive installers TGZ, ZIP, etc. the variable CPACK_ARCHIVE_COMPONENT_INSTALL must be used, and not CPACK_TGZ_COMPONENT_INSTALL, or CPACK_ZIP_COMPONENT_INSTALL. This is wrong in the wiki. Here is a working version of my example: project(cpacktest) cmake_minimum_required(VERSION 2.8) # project version info set(MAJOR_VERSION 1) set(MINOR_VERSION 0) set(PATCH_VERSION 0) # create some dummy install targets for testing components install(FILES foo.txt DESTINATION bin COMPONENT applications) install(FILES bar.txt DESTINATION bin COMPONENT libraries) #{{{ Debian package generation ############################################### ################################# IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") INCLUDE(InstallRequiredSystemLibraries) SET(CPACK_SET_DESTDIR "on") SET(CPACK_PACKAGING_INSTALL_PREFIX "/tmp") SET(CPACK_GENERATOR "DEB") SET(CPACK_PACKAGE_DESCRIPTION "CPack Component Test") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Testing filtering for CPack components") SET(CPACK_PACKAGE_VENDOR "ACME Inc.") SET(CPACK_PACKAGE_CONTACT "info at acme.com") SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}") SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}") SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}") SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}. ${CPACK_PACKAGE_VERSION_PATCH}") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}. ${CPACK_PACKAGE_VERSION_PATCH}") SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON) SET(CPACK_DEB_COMPONENT_INSTALL ON) SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libcrack2 (>= 2.9.1), libqt5core5a (>= 5.3.0), libqt5widgets5 (>= 5.3.0), libqt5gui5 (>= 5.3.0)") SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") SET(CPACK_DEBIAN_PACKAGE_SECTION "kde") SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) # only pack the applications component, leave out all other components SET(CPACK_COMPONENTS_ALL applications) INCLUDE(CPack) ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") ############################################### ################################# #}}} Now, that this is correct it also works with cmake 2.8.12. regards, Gerhard. PS: The best documentation is always source code. Open Source rules! On Thursday, July 10, 2014 09:35:56 AM Gerhard Gappmeier wrote: > Hi, > > I'm generating deb packages for a project using CPack. > This project contains a lot of libraries which are used the build the final > applications. > Because I don't want to distribute the headers and static libraries in the > package, but only the executable I tried to use the components to filter > what should be included in the package. (like documented here: > http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack) > > However it doesn't work for me. CPack always includes all components. > > For reproducing this I created a every simple project with just two dummy > install targets (no source, no compilation necessary). > > To reproduce this please do the following: > mkdir cpacktest > cd cpacktest > touch foo.txt > touch bar.txt > > and create the following CMakeLists.txt: > project(cpacktest) > cmake_minimum_required(VERSION 2.8) > > # project version info > set(MAJOR_VERSION 1) > set(MINOR_VERSION 0) > set(PATCH_VERSION 0) > > # create some dummy install targets for testing components > install(FILES foo.txt DESTINATION bin COMPONENT applications) > install(FILES bar.txt DESTINATION bin COMPONENT libraries) > > #{{{ Debian package generation > ############################################### > ################################# > IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") > INCLUDE(InstallRequiredSystemLibraries) > > SET(CPACK_SET_DESTDIR "on") > SET(CPACK_PACKAGING_INSTALL_PREFIX "/tmp") > SET(CPACK_GENERATOR "DEB") > > SET(CPACK_PACKAGE_DESCRIPTION "CPack Component Test") > SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Testing filtering for CPack > components") > SET(CPACK_PACKAGE_VENDOR "ACME Inc.") > SET(CPACK_PACKAGE_CONTACT "info at acme.com") > SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}") > SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}") > SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}") > SET(CPACK_PACKAGE_FILE_NAME > "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}. -------------- next part -------------- An HTML attachment was scrubbed... URL: From middleton.ted at gmail.com Thu Jul 10 13:55:36 2014 From: middleton.ted at gmail.com (Ted Middleton) Date: Thu, 10 Jul 2014 10:55:36 -0700 Subject: [CMake] CMAKE_FIND_ROOT_PATH and find_library() Message-ID: I'm using cmake 3.0.0 on win7 64-bit and I'm having a difficult time with CMAKE_FIND_ROOT_PATH. The cross-compiling cmake page as well as the find_library() docs seem to suggest that if CMAKE_FIND_ROOT_PATH is non-empty, find_library() will use it to prepend any paths it searches, sort of like an alternate sysroot? But that doesn't seem to be happening in my set-up and I can't figure out why? When I run this: cmake_minimum_required( VERSION 3.0 ) project( "cmakefindlibtest" ) list( APPEND CMAKE_FIND_ROOT_PATH "C:/DEV/lib" ) find_library( punycode_library_test punycode ) message( "punycode_library_test is now ${punycode_library_test}" ) In this case, ${punycode_library_test} ends up being punycode_library_test-NOTFOUND. I thought that maybe this was because my CMAKE_LIBRARY_PATH was empty - perhaps the problem here is that find_library() doesn't have any paths to prepend with CMAKE_FIND_ROOT_PATH in the first place, so I tried this: cmake_minimum_required( VERSION 3.0 ) project( "cmakefindlibtest" ) list( APPEND CMAKE_FIND_ROOT_PATH "C:/DEV/" ) list( APPEND CMAKE_LIBRARY_PATH "lib" ) find_library( punycode_library_test punycode ) message( "punycode_library_test is now ${punycode_library_test}" ) This doesn't work either, and neither does cmake_minimum_required( VERSION 3.0 ) project( "cmakefindlibtest" ) list( APPEND CMAKE_FIND_ROOT_PATH "C:/DEV/" ) find_library( punycode_library_test punycode PATHS "lib" ) message( "punycode_library_test is now ${punycode_library_test}" ) When I specify PATHS "C:/DEV/lib" to find_library(), or I add "C:/DEV/lib" to CMAKE_LIBRARY_PATH, I can find the punycode.lib sitting in my C:/DEV/lib directory, but I'd like to know what's going wrong with CMAKE_FIND_ROOT_PATH because I'm trying to use it for cross-compiling and it doesn't seem to be doing anything the way that I'm using it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre.andersson at se.atlascopco.com Fri Jul 11 05:00:39 2014 From: pierre.andersson at se.atlascopco.com (pierre.andersson at se.atlascopco.com) Date: Fri, 11 Jul 2014 11:00:39 +0200 Subject: [CMake] Setting Policy CMP0028 Message-ID: I have a very large project that is built with CMake, and I'm trying to make it work a little nicer with CMake 3. Right now we, we see everal warnigns that policy CMP0028 is not set. Using cmake_policy(SET CMP0028 OLD) does not seem to take effect. It's set at the same, top level, place where other policies are set and these do take effect. Likewise, setting the policy to NEW does not make CMake produce the fatal error like the documentation says it should. What am I missing here? Regards, Pierre Andersson -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Fri Jul 11 05:31:14 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 11 Jul 2014 11:31:14 +0200 Subject: [CMake] Setting Policy CMP0028 In-Reply-To: References: Message-ID: <53BFAEE2.10403@gmail.com> On 07/11/2014 11:00 AM, pierre.andersson at se.atlascopco.com wrote: > I have a very large project that is built with CMake, and I'm trying to > make it work a little nicer with CMake 3. Right now we, we see everal > warnigns that policy CMP0028 is not set. > > Using > > cmake_policy(SET CMP0028 OLD) > > does not seem to take effect. It's set at the same, top level, place > where other policies are set and these do take effect. Likewise, setting > the policy to NEW does not make CMake produce the fatal error like the > documentation says it should. What am I missing here? With a minimal test case the policy seems to work for me in 3.0. What might reset the policy after it was set is: - A call to cmake_minimum_required() - A call to cmake_policy(VERSION) Nils From pierre.andersson at se.atlascopco.com Fri Jul 11 07:33:29 2014 From: pierre.andersson at se.atlascopco.com (pierre.andersson at se.atlascopco.com) Date: Fri, 11 Jul 2014 13:33:29 +0200 Subject: [CMake] Setting Policy CMP0028 In-Reply-To: <53BFAEE2.10403@gmail.com> References: <53BFAEE2.10403@gmail.com> Message-ID: Thanks for the response. None of those are called in the CMakeLists.txt file that the warning is issued for, they are both called in a file above that one in the build tree but said file also sets the CML0028 policy afterwards. Is it possible that a call to cmake_minimum_required resets the policies even for CMakeLists.txt that are not below it in the build system tree? Regards, Pierre Andersson From: Nils Gladitz To: pierre.andersson at se.atlascopco.com, cmake at cmake.org Date: 2014-07-11 11:31 Subject: Re: [CMake] Setting Policy CMP0028 On 07/11/2014 11:00 AM, pierre.andersson at se.atlascopco.com wrote: > I have a very large project that is built with CMake, and I'm trying to > make it work a little nicer with CMake 3. Right now we, we see everal > warnigns that policy CMP0028 is not set. > > Using > > cmake_policy(SET CMP0028 OLD) > > does not seem to take effect. It's set at the same, top level, place > where other policies are set and these do take effect. Likewise, setting > the policy to NEW does not make CMake produce the fatal error like the > documentation says it should. What am I missing here? With a minimal test case the policy seems to work for me in 3.0. What might reset the policy after it was set is: - A call to cmake_minimum_required() - A call to cmake_policy(VERSION) Nils -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: From nilsgladitz at gmail.com Fri Jul 11 08:31:58 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 11 Jul 2014 14:31:58 +0200 Subject: [CMake] Setting Policy CMP0028 In-Reply-To: References: <53BFAEE2.10403@gmail.com> Message-ID: <53BFD93E.30607@gmail.com> On 07/11/2014 01:33 PM, pierre.andersson at se.atlascopco.com wrote: > Thanks for the response. None of those are called in the CMakeLists.txt > file that the warning is issued for, they are both called in a file > above that one in the build tree but said file also sets the CML0028 > policy afterwards. Is it possible that a call to cmake_minimum_required > resets the policies even for CMakeLists.txt that are not below it in the > build system tree? You can not change policies for the parent; only for the current and subdirectories. It might help if you could create a minimal, selfcontained test case to reproduce and debug the issue. Nils From pip010 at gmail.com Fri Jul 11 09:34:36 2014 From: pip010 at gmail.com (Petar Petrov) Date: Fri, 11 Jul 2014 15:34:36 +0200 Subject: [CMake] Mastering CMake book Message-ID: Hello, just wondering how up to date is the "Mastering CMake"book. Does it cover all 3.0 changes ? Greetings, Petar From pierre.andersson at se.atlascopco.com Fri Jul 11 09:33:04 2014 From: pierre.andersson at se.atlascopco.com (pierre.andersson at se.atlascopco.com) Date: Fri, 11 Jul 2014 15:33:04 +0200 Subject: [CMake] Setting Policy CMP0028 In-Reply-To: <53BFD93E.30607@gmail.com> References: <53BFAEE2.10403@gmail.com> <53BFD93E.30607@gmail.com> Message-ID: Then it is odd that it does not work, the warning is given during generation time and I have tested to print the status of the 0028 policy at all points where the projects that get the warning has their add_library/add_executable command called, as well as at the end of their respective CMakeLists.txt files and it remains in the state OLD throughout. At which point is the state of the policy stored when it comes to generation time? I can see that it works when I construct a minimal example, so knowing when it's state is 'used' would greaty help in solving the issue or creating a minimal example that showcases the problem. Regards, Pierre Andersson From: Nils Gladitz To: pierre.andersson at se.atlascopco.com Cc: cmake at cmake.org Date: 2014-07-11 14:32 Subject: Re: [CMake] Setting Policy CMP0028 On 07/11/2014 01:33 PM, pierre.andersson at se.atlascopco.com wrote: > Thanks for the response. None of those are called in the CMakeLists.txt > file that the warning is issued for, they are both called in a file > above that one in the build tree but said file also sets the CML0028 > policy afterwards. Is it possible that a call to cmake_minimum_required > resets the policies even for CMakeLists.txt that are not below it in the > build system tree? You can not change policies for the parent; only for the current and subdirectories. It might help if you could create a minimal, selfcontained test case to reproduce and debug the issue. Nils -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: From nilsgladitz at gmail.com Fri Jul 11 09:47:13 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 11 Jul 2014 15:47:13 +0200 Subject: [CMake] Setting Policy CMP0028 In-Reply-To: References: <53BFAEE2.10403@gmail.com> <53BFD93E.30607@gmail.com> Message-ID: <53BFEAE1.40103@gmail.com> On 07/11/2014 03:33 PM, pierre.andersson at se.atlascopco.com wrote: > Then it is odd that it does not work, the warning is given during > generation time and I have tested to print the status of the 0028 policy > at all points where the projects that get the warning has their > add_library/add_executable command called, as well as at the end of > their respective CMakeLists.txt files and it remains in the state OLD > throughout. > At which point is the state of the policy stored when it comes to > generation time? I can see that it works when I construct a minimal > example, so knowing when it's state is 'used' would greaty help in > solving the issue or creating a minimal example that showcases the problem. Given that the warning is at generation time I think it should be the state of the policy at the end of the CMakeLists.txt that defines the target (add_library/add_executable). Nils From iosif.neitzke+cmake at gmail.com Fri Jul 11 09:47:47 2014 From: iosif.neitzke+cmake at gmail.com (Iosif Neitzke) Date: Fri, 11 Jul 2014 08:47:47 -0500 Subject: [CMake] Mastering CMake book In-Reply-To: References: Message-ID: The latest edition of Mastering CMake is 6th edition (September 13, 2013), covering versions of CMake up to and including 2.8.12. On Fri, Jul 11, 2014 at 8:34 AM, Petar Petrov wrote: > Hello, > just wondering how up to date is the "Mastering CMake"book. Does it > cover all 3.0 changes ? > > Greetings, > Petar > -- > > 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 From eldlistmailingz at tropicsoft.com Fri Jul 11 10:33:39 2014 From: eldlistmailingz at tropicsoft.com (Edward Diener) Date: Fri, 11 Jul 2014 10:33:39 -0400 Subject: [CMake] Changing the the current generator in CMake GUI Message-ID: Shouldn't there be a way to change the current generator in the CMake GUI ? It seems like I can only do this if I choose a new "Where to build the binaries" path. But what if I just want to change the current generator to something else using the current outpath path ? From drescherjm at gmail.com Fri Jul 11 11:00:40 2014 From: drescherjm at gmail.com (John Drescher) Date: Fri, 11 Jul 2014 11:00:40 -0400 Subject: [CMake] Changing the the current generator in CMake GUI In-Reply-To: References: Message-ID: On Fri, Jul 11, 2014 at 10:33 AM, Edward Diener wrote: > Shouldn't there be a way to change the current generator in the CMake GUI ? > It seems like I can only do this if I choose a new "Where to build the > binaries" path. But what if I just want to change the current generator to > something else using the current outpath path ? > You can also do this if you reset the cache in cmake-gui. John From bill.hoffman at kitware.com Fri Jul 11 11:01:31 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Fri, 11 Jul 2014 11:01:31 -0400 Subject: [CMake] Changing the the current generator in CMake GUI In-Reply-To: References: Message-ID: <53BFFC4B.3040500@kitware.com> On 7/11/2014 10:33 AM, Edward Diener wrote: > Shouldn't there be a way to change the current generator in the CMake > GUI ? It seems like I can only do this if I choose a new "Where to build > the binaries" path. But what if I just want to change the current > generator to something else using the current outpath path ? No, once the generator is set and you have run cmake once, you need to create a new build tree or wipe out the one you created the first time. CMake stores a bunch of information about the compiler in the cache and other files in the build tree. It does not know how to change all that without a clean tree. -Bill From Philip.Tessier at TASC.COM Fri Jul 11 12:20:26 2014 From: Philip.Tessier at TASC.COM (Tessier, Philip A (TASC)) Date: Fri, 11 Jul 2014 16:20:26 +0000 Subject: [CMake] Vary SUFFIX by build for SHARED MODULE? Message-ID: All, greetings and thank you! I have a requirement to produce (on Windows, using Visual Studio) a "plugin" (DLL) whose suffix varies by build. For example, foo.plugin (for Release) and foo.pluginD (for Debug). I expect to use: add_library(foo MODULE ${Sources}) and am hoping for a SUFFIX_DEBUG, SUFFIX_RELEASE-type variable to specify, like: set(SUFFIX ".plugin") set(SUFFIX_DEBUG ".pluginD") Any help will be appreciated! Thanks, Phil Philip A. Tessier [cid:image001.jpg at 01CF9CFA.188BB5C0] Tri-Service Research Laboratory (TSRL) 4141 Petroleum Road, Ste 2115E JBSA Fort Sam Houston TX 78234-2644 210-867-6775 mobile 210-539-8273 office Philip.Tessier at tasc.com philip.a.tessier.ctr at mail.mil CONFIDENTIALITY NOTICE: This message and any attachments or files transmitted with it (collectively, the "Message") are intended only for the addressee and may contain information that is privileged, proprietary and/or prohibited from disclosure by law or contract. If you are not the intended recipient: (a) please do not read, copy or retransmit the Message; (b) permanently delete and/or destroy all electronic and hard copies of the Message; (c) notify us by return email; and (d) you are hereby notified that any dissemination, distribution or copying of the Message is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1098 bytes Desc: image001.jpg URL: From mike.jackson at bluequartz.net Fri Jul 11 13:40:41 2014 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 11 Jul 2014 13:40:41 -0400 Subject: [CMake] Vary SUFFIX by build for SHARED MODULE? In-Reply-To: References: Message-ID: <2DE1ECF3-2912-4D56-ABBD-2F6AFC5EA675@bluequartz.net> #-- Set the Debug and Release names for the libraries SET_TARGET_PROPERTIES( ${targetName} PROPERTIES DEBUG_POSTFIX ${DEBUG_EXTENSION} ) Mike Jackson On Jul 11, 2014, at 12:20 PM, "Tessier, Philip A (TASC)" wrote: > All, greetings and thank you! > > I have a requirement to produce (on Windows, using Visual Studio) a ?plugin? (DLL) whose suffix varies by build. For example, foo.plugin (for Release) and foo.pluginD (for Debug). I expect to use: > > add_library(foo MODULE ${Sources}) > > and am hoping for a SUFFIX_DEBUG, SUFFIX_RELEASE-type variable to specify, like: > > set(SUFFIX ?.plugin?) > set(SUFFIX_DEBUG ?.pluginD?) > > Any help will be appreciated! > Thanks, > > Phil > > > Philip A. Tessier > > > Tri-Service Research Laboratory (TSRL) > 4141 Petroleum Road, Ste 2115E > JBSA Fort Sam Houston TX 78234-2644 > 210-867-6775 mobile > 210-539-8273 office > Philip.Tessier at tasc.com > philip.a.tessier.ctr at mail.mil > > CONFIDENTIALITY NOTICE: This message and any attachments or files transmitted with it (collectively, the "Message") are intended only for the addressee and may contain information that is privileged, proprietary and/or prohibited from disclosure by law or contract. If you are not the intended recipient: (a) please do not read, copy or retransmit the Message; (b) permanently delete and/or destroy all electronic and hard copies of the Message; (c) notify us by return email; and (d) you are hereby notified that any dissemination, distribution or copying of the Message is strictly prohibited. > > -- > > 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 From eldlistmailingz at tropicsoft.com Sat Jul 12 05:04:36 2014 From: eldlistmailingz at tropicsoft.com (Edward Diener) Date: Sat, 12 Jul 2014 05:04:36 -0400 Subject: [CMake] Changing the the current generator in CMake GUI In-Reply-To: <53BFFC4B.3040500@kitware.com> References: <53BFFC4B.3040500@kitware.com> Message-ID: On 7/11/2014 11:01 AM, Bill Hoffman wrote: > On 7/11/2014 10:33 AM, Edward Diener wrote: >> Shouldn't there be a way to change the current generator in the CMake >> GUI ? It seems like I can only do this if I choose a new "Where to build >> the binaries" path. But what if I just want to change the current >> generator to something else using the current outpath path ? > No, once the generator is set and you have run cmake once, you need to > create a new build tree or wipe out the one you created the first time. > CMake stores a bunch of information about the compiler in the cache > and other files in the build tree. It does not know how to change all > that without a clean tree. It does not seem like cleaning the build tree from within the CMake GUI should be a hard programming task, if the end-user wishes to change the current generator. Nonetheless thanks for the information. From bill.hoffman at kitware.com Sat Jul 12 08:17:54 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Sat, 12 Jul 2014 08:17:54 -0400 Subject: [CMake] Changing the the current generator in CMake GUI In-Reply-To: References: <53BFFC4B.3040500@kitware.com> Message-ID: You can use clear cache. On Jul 12, 2014 5:05 AM, "Edward Diener" wrote: > On 7/11/2014 11:01 AM, Bill Hoffman wrote: > >> On 7/11/2014 10:33 AM, Edward Diener wrote: >> >>> Shouldn't there be a way to change the current generator in the CMake >>> GUI ? It seems like I can only do this if I choose a new "Where to build >>> the binaries" path. But what if I just want to change the current >>> generator to something else using the current outpath path ? >>> >> No, once the generator is set and you have run cmake once, you need to >> create a new build tree or wipe out the one you created the first time. >> CMake stores a bunch of information about the compiler in the cache >> and other files in the build tree. It does not know how to change all >> that without a clean tree. >> > > It does not seem like cleaning the build tree from within the CMake GUI > should be a hard programming task, if the end-user wishes to change the > current generator. Nonetheless thanks for the information. > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.enright at gmail.com Sat Jul 12 20:19:22 2014 From: michael.enright at gmail.com (Michael Enright) Date: Sat, 12 Jul 2014 17:19:22 -0700 Subject: [CMake] The Cygwin/Win32 warning Message-ID: Attention teachers and students: I'm getting the WIN32 warning and I've tried a number of "first lines" without making it go away. Since I'm using this two-file project to gain experience with CMake I can and I have blown away the whole build tree between attempts. I have used EACH of the following as the first line of CMakeLists.txt: set(CMAKE_LEGACY_CYGWIN_WIN32 0) cmake_minimum_required(VERSION 2.8.8) #cmake_minimum_required(VERSION 2.8.4) Also the above three lines are the head -3 of the current version of the file. Indeed if those three lines are the ENTIRE file I get the warning. I have verified that the cmake_minimum_required was effective by setting the 2.8.8 to 2.8.13, which causes an error because Cygwin's CMake is 2.8.9. I chose 2.8.8 because it corresponds to the build systems my colleagues at work are creating from CMake. I occasionally post my code to github so I'd like to clean this up. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Sun Jul 13 05:32:03 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Sun, 13 Jul 2014 11:32:03 +0200 Subject: [CMake] The Cygwin/Win32 warning In-Reply-To: References: Message-ID: <53C25213.4050701@gmail.com> On 13.07.2014 02:19, Michael Enright wrote: > I'm getting the WIN32 warning and I've tried a number of "first lines" > without making it go away. Since I'm using this two-file project to > gain experience with CMake I can and I have blown away the whole build > tree between attempts. > > I have used EACH of the following as the first line of CMakeLists.txt: > set(CMAKE_LEGACY_CYGWIN_WIN32 0) > cmake_minimum_required(VERSION 2.8.8) > #cmake_minimum_required(VERSION 2.8.4) > > Also the above three lines are the head -3 of the current version of > the file. Indeed if those three lines are the ENTIRE file I get the > warning. > The code that emits the warning is run by "project()". Since you do not have an explicit project() call in your top-level CMakeLists.txt CMake adds one to the top implicitly. [1] A project file that explicitly calls project() after requiring CMake >= 2.8.4 should make the warning go away: cmake_minimum_required(VERSION 2.8.8) project(Foo) Nils [1] http://www.cmake.org/cmake/help/v3.0/command/project.html (last paragraph) From michael.enright at gmail.com Sun Jul 13 13:51:13 2014 From: michael.enright at gmail.com (Michael Enright) Date: Sun, 13 Jul 2014 10:51:13 -0700 Subject: [CMake] The Cygwin/Win32 warning In-Reply-To: <53C25213.4050701@gmail.com> References: <53C25213.4050701@gmail.com> Message-ID: On Sun, Jul 13, 2014 at 2:32 AM, Nils Gladitz wrote: > On 13.07.2014 02:19, Michael Enright wrote: > >> I'm getting the WIN32 warning and I've tried a number of "first lines" >> without making it go away. Since I'm using this two-file project to gain >> experience with CMake I can and I have blown away the whole build tree >> between attempts. >> >> The code that emits the warning is run by "project()". > Thanks for the explicit explanation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Aaron.Boxer at uhn.ca Mon Jul 14 09:55:54 2014 From: Aaron.Boxer at uhn.ca (Boxer, Aaron) Date: Mon, 14 Jul 2014 13:55:54 +0000 Subject: [CMake] opencl and visual studio Message-ID: <916128D3B0588049941092CE31D137D52C3C4617@UHN-PE-MBX-102P.uhn.ca> Hello List, I have a cmake project that I am adding opencl support to. I am using the Intel OpenCL sdk, which integrates with Visual Studio. So far, I do the following: 1) I have a cmake script that finds the opencl libraries and include files 2) I manually enable opencl support in visual studio in the Tools menu With these steps, all opencl files are statically checked by the compiler. So far, so good. However, to actually compile The files with opencl, I need to pass the absolute file path of the *.cl file into opencl. This is because, as is typical With cmake, the build files reside in a folder separate from the source files. Has anyone encountered a similar problem? Is there a way of setting the *.cl folder path in cmake? Currently I have to Hard code this into my code, which is hacky. Also, it would be nice if cmake could automatically switch on opencl support in the visual studio project, but I have no idea how this could be done. Thanks, Aaron This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre.andersson at se.atlascopco.com Mon Jul 14 09:58:20 2014 From: pierre.andersson at se.atlascopco.com (pierre.andersson at se.atlascopco.com) Date: Mon, 14 Jul 2014 15:58:20 +0200 Subject: [CMake] Setting Policy CMP0028 In-Reply-To: <53BFEAE1.40103@gmail.com> References: <53BFAEE2.10403@gmail.com> <53BFD93E.30607@gmail.com> <53BFEAE1.40103@gmail.com> Message-ID: Just to update. I managed to solve the issue by adding this line: cmake_policy(SET CMP0028 OLD) directly to the macro that ends up calling the add_library/add_executable commands. Thank you for the help. Regards, Pierre Andersson From: Nils Gladitz To: pierre.andersson at se.atlascopco.com Cc: cmake at cmake.org Date: 2014-07-11 15:47 Subject: Re: [CMake] Setting Policy CMP0028 On 07/11/2014 03:33 PM, pierre.andersson at se.atlascopco.com wrote: > Then it is odd that it does not work, the warning is given during > generation time and I have tested to print the status of the 0028 policy > at all points where the projects that get the warning has their > add_library/add_executable command called, as well as at the end of > their respective CMakeLists.txt files and it remains in the state OLD > throughout. > At which point is the state of the policy stored when it comes to > generation time? I can see that it works when I construct a minimal > example, so knowing when it's state is 'used' would greaty help in > solving the issue or creating a minimal example that showcases the problem. Given that the warning is at generation time I think it should be the state of the policy at the end of the CMakeLists.txt that defines the target (add_library/add_executable). Nils -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: From norulez at me.com Mon Jul 14 11:57:02 2014 From: norulez at me.com (NoRulez) Date: Mon, 14 Jul 2014 17:57:02 +0200 Subject: [CMake] Show results from the bullseye coverage in CDash Message-ID: <0877029D-29A6-4787-BC26-81C91D336503@me.com> Hello, I use bullseye coverage to perform coverage analysis on windows. We have 2 dashboard (CDash) machines (productive, testing) On the testing machine I could click on a file in CDash to display the coverage analyze for the selected file. On the productive machine I doesn't have those links. Does anybody know why the file links aren't shown, or where the problem could be that they aren't shown? I also tried to update to CDash 2.2.2 with no luck. Thanks in advance Best Regards From nagymatef at freemail.hu Mon Jul 14 16:10:53 2014 From: nagymatef at freemail.hu (=?utf-8?B?TmFneS1FZ3JpIE3DoXTDqSBGZXJlbmM=?=) Date: Mon, 14 Jul 2014 20:10:53 +0000 Subject: [CMake] =?utf-8?q?opencl_and_visual_studio?= Message-ID: There are two ways to solve your problem I think. Either create a build rule that copies the .cl files over to your build directory on every build. Use a config file that creates a #define with the absolute/relative path to the .cl files. As for the OpenCL integration, I did not know that the Intel SDK checks the validity of the kernel files. That indeed makes life easier. In case you would need something a little more lightweight, AMD?s CodeXL also provides some nice features, and as far as syntax highlighting goes, it does not depend on any feature being turned on inside the project. It just uses the extension of the source file to turn on highlighting. Felad?: Boxer, Aaron Elk?ldve: ?h?tf??, ?2014?. ?j?lius? ?14?. ?15?:?56 C?mzett: cmake at cmake.org Hello List, I have a cmake project that I am adding opencl support to. I am using the Intel OpenCL sdk, which integrates with Visual Studio. So far, I do the following: 1) I have a cmake script that finds the opencl libraries and include files 2) I manually enable opencl support in visual studio in the Tools menu With these steps, all opencl files are statically checked by the compiler. So far, so good. However, to actually compile The files with opencl, I need to pass the absolute file path of the *.cl file into opencl. This is because, as is typical With cmake, the build files reside in a folder separate from the source files. Has anyone encountered a similar problem? Is there a way of setting the *.cl folder path in cmake? Currently I have to Hard code this into my code, which is hacky. Also, it would be nice if cmake could automatically switch on opencl support in the visual studio project, but I have no idea how this could be done. Thanks, Aaron This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- -- 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 From middleton.ted at gmail.com Mon Jul 14 17:22:50 2014 From: middleton.ted at gmail.com (Ted Middleton) Date: Mon, 14 Jul 2014 14:22:50 -0700 Subject: [CMake] CMAKE_FIND_ROOT_PATH and find_library() In-Reply-To: References: Message-ID: I've tried this again, but on OSX. The first example, cmake_minimum_required( VERSION 3.0 ) project( "cmakefindlibtest" ) list( APPEND CMAKE_FIND_ROOT_PATH "/Users/tmiddleton/lib" ) find_library( punycode_library_test punycode ) message( "punycode_library_test is now ${punycode_library_test}" ) doesn't work - perhaps because find_library() doesn't have any paths to prepend with CMAKE_FIND_ROOT_PATH? But this, cmake_minimum_required( VERSION 3.0 ) project( "cmakefindlibtest" ) list( APPEND CMAKE_FIND_ROOT_PATH "/Users/tmiddleton" ) list( APPEND CMAKE_LIBRARY_PATH "lib" ) find_library( punycode_library_test punycode ) message( "punycode_library_test is now ${punycode_library_test}" ) and this, cmake_minimum_required( VERSION 3.0 ) project( "cmakefindlibtest" ) list( APPEND CMAKE_FIND_ROOT_PATH "/Users/tmiddleton" ) find_library( punycode_library_test punycode PATHS "lib" ) message( "punycode_library_test is now ${punycode_library_test}" ) DO work, as expected. Should I raise a bug for the Windows version? Is the first example supposed to work too? On Thu, Jul 10, 2014 at 10:55 AM, Ted Middleton wrote: > I'm using cmake 3.0.0 on win7 64-bit and I'm having a difficult time with > CMAKE_FIND_ROOT_PATH. The cross-compiling cmake page as well as the > find_library() docs seem to suggest that if CMAKE_FIND_ROOT_PATH is > non-empty, find_library() will use it to prepend any paths it searches, > sort of like an alternate sysroot? But that doesn't seem to be happening in > my set-up and I can't figure out why? When I run this: > > cmake_minimum_required( VERSION 3.0 ) > project( "cmakefindlibtest" ) > list( APPEND CMAKE_FIND_ROOT_PATH "C:/DEV/lib" ) > find_library( punycode_library_test punycode ) > message( "punycode_library_test is now ${punycode_library_test}" ) > > In this case, ${punycode_library_test} ends up being > punycode_library_test-NOTFOUND. I thought that maybe this was because my > CMAKE_LIBRARY_PATH was empty - perhaps the problem here is that > find_library() doesn't have any paths to prepend with CMAKE_FIND_ROOT_PATH > in the first place, so I tried this: > > cmake_minimum_required( VERSION 3.0 ) > project( "cmakefindlibtest" ) > list( APPEND CMAKE_FIND_ROOT_PATH "C:/DEV/" ) > list( APPEND CMAKE_LIBRARY_PATH "lib" ) > find_library( punycode_library_test punycode ) > message( "punycode_library_test is now ${punycode_library_test}" ) > > This doesn't work either, and neither does > > cmake_minimum_required( VERSION 3.0 ) > project( "cmakefindlibtest" ) > list( APPEND CMAKE_FIND_ROOT_PATH "C:/DEV/" ) > find_library( punycode_library_test punycode PATHS "lib" ) > message( "punycode_library_test is now ${punycode_library_test}" ) > > When I specify PATHS "C:/DEV/lib" to find_library(), or I add "C:/DEV/lib" > to CMAKE_LIBRARY_PATH, I can find the punycode.lib sitting in my C:/DEV/lib > directory, but I'd like to know what's going wrong with > CMAKE_FIND_ROOT_PATH because I'm trying to use it for cross-compiling and > it doesn't seem to be doing anything the way that I'm using it. > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.hoffman at kitware.com Mon Jul 14 17:50:38 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Mon, 14 Jul 2014 17:50:38 -0400 Subject: [CMake] Changing the the current generator in CMake GUI In-Reply-To: References: <53BFFC4B.3040500@kitware.com> Message-ID: <53C450AE.30107@kitware.com> On 7/12/2014 8:17 AM, Bill Hoffman wrote: > You can use clear cache. Just to be clear. If you want to change the current generator, you can use File -> Delete Cache. Then you will be able to select a new generator for that directory. I guess the GUI could be change to have a change generator button that gave a big huge warning that it Cache was getting deleted could be done. Or we could address it with documentation. We do welcome contributions if you are interested. See: https://github.com/Kitware/CMake/blob/master/CONTRIBUTING.rst Thanks. -Bill From norulez at me.com Tue Jul 15 04:50:49 2014 From: norulez at me.com (NoRulez) Date: Tue, 15 Jul 2014 10:50:49 +0200 Subject: [CMake] [Cdash] Show results from the bullseye coverage in CDash In-Reply-To: <53C4CAF4.7030409@kitware.com> References: <705B9E10-A553-4D17-9708-F986CF6ABB84@me.com> <53C4CAF4.7030409@kitware.com> Message-ID: Thanks, this solves the problem. The option wasn't checked. Best Regards > Am 15.07.2014 um 08:32 schrieb Julien Jomier : > > There is an option (which should be on by default) in the "Miscellaneous" section of the project settings, which is called: "Show coverage code". Can you make sure it's checked? > > Julien > >> On 15/07/2014 00:01, norulez at me.com wrote: >> Hello, >> >> I use bullseye coverage to perform coverage analysis on windows. >> >> We have 2 dashboard (CDash) machines (productive, testing) >> >> On the testing machine I could click on a file in CDash to display the coverage analyze for the selected file. >> On the productive machine I doesn't have those links. >> >> Does anybody know why the file links aren't shown, or where the problem could be that they aren't shown? >> >> I also tried to update to CDash 2.2.2 with no luck. >> >> Thanks in advance >> >> Best Regards >> _______________________________________________ >> Cdash mailing list >> Cdash at public.kitware.com >> http://public.kitware.com/mailman/listinfo/cdash >> From dlrdave at aol.com Tue Jul 15 06:11:16 2014 From: dlrdave at aol.com (David Cole) Date: Tue, 15 Jul 2014 06:11:16 -0400 (EDT) Subject: [CMake] [Cdash] Show results from the bullseye coverage in CDash Message-ID: <8D16E2C3F70CAF6-F70-18DF8@webmail-vm070.sysops.aol.com> >> There is an option (which should be on by default) in the >> "Miscellaneous" section of the project settings, which is >> called: "Show coverage code". > Thanks, this solves the problem. The option wasn't checked. The option should be *OFF* by default. If the intent is not to show your code (because it's private, for example), then having it OFF is the safe default. Having it OFF by default and making a mistake results in emails like this... along with a quick and easy solution to the problem. Having it ON by default and making a mistake would result in the loss of privacy, which is by far a worse consequence, with no solution whatsoever. Please keep the default value *OFF*. Thanks, David C. From blowekamp at mail.nih.gov Tue Jul 15 08:31:36 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 15 Jul 2014 08:31:36 -0400 Subject: [CMake] Install CMake3.0 as alternate Message-ID: Hello, Is there a way I can configure CMake when I build it so it's executable with have a "3" or "3.0" suffix, so that I can easily have multiple version of cmake installed into "/usr/local"? I am looking for something similar to python's altinstall or gcc's "program-suffix" option. Thanks, Brad From nilsgladitz at gmail.com Tue Jul 15 08:49:39 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Tue, 15 Jul 2014 14:49:39 +0200 Subject: [CMake] Install CMake3.0 as alternate In-Reply-To: References: Message-ID: <53C52363.6010601@gmail.com> On 07/15/2014 02:31 PM, Bradley Lowekamp wrote: > Hello, > > Is there a way I can configure CMake when I build it so it's executable with have a "3" or "3.0" suffix, so that I can easily have multiple version of cmake installed into "/usr/local"? > > I am looking for something similar to python's altinstall or gcc's "program-suffix" option. > I'd install CMake with a custom prefix e.g. "-DCMAKE_INSTALL_PREFIX=/opt/cmake-3.0". And create appropriate symlinks or aliases. e.g. ln -s /opt/cmake-3.0/bin/cmake /usr/local/bin/cmake-3.0 Or run it with full path. Nils From a.goo0h at gmail.com Tue Jul 15 13:06:19 2014 From: a.goo0h at gmail.com (Amos) Date: Tue, 15 Jul 2014 12:06:19 -0500 Subject: [CMake] Fails for Solaris Message-ID: No matter if I use GNU or workshop compilers, the initial config fails: CC supports member templates CC has standard template specialization syntax CC has argument dependent lookup CC has struct stat with st_mtim member CC has ios::binary openmode CC has ANSI for scoping --------------------------------------------- gmake: 'cmake' is up to date. loading initial cache file /usr/soft/that/cmake-3.0.0/src/default/sparcv9_sun_solaris2.10/Bootstrap.cmk/InitialCacheFlags.cmake -- Using system-installed BZIP2 -- Using system-installed ZLIB CMake Error: File /usr/soft/that/cmake-3.0.0/src/default/sparcv9_sun_solaris2.10/Tests/.NoDartCoverage does not exist. CMake Error at CMakeLists.txt:161 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:527 (CMAKE_SETUP_TESTING) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Aaron.Boxer at uhn.ca Tue Jul 15 16:40:07 2014 From: Aaron.Boxer at uhn.ca (Boxer, Aaron) Date: Tue, 15 Jul 2014 20:40:07 +0000 Subject: [CMake] opencl and visual studio In-Reply-To: References: Message-ID: <916128D3B0588049941092CE31D137D52C3C4A3C@UHN-PE-MBX-102P.uhn.ca> Thanks for your suggestions. I like the first options. So, how may I create a cmake build rule to do this? Thanks, Aaron From: outlook_f942cba43dcb6260 at outlook.com [mailto:outlook_f942cba43dcb6260 at outlook.com] On Behalf Of Nagy-Egri M?t? Ferenc Sent: Monday, July 14, 2014 4:11 PM To: Boxer, Aaron; cmake at cmake.org Subject: Re: [CMake] opencl and visual studio There are two ways to solve your problem I think. 1. Either create a build rule that copies the .cl files over to your build directory on every build. 1. Use a config file that creates a #define with the absolute/relative path to the .cl files. As for the OpenCL integration, I did not know that the Intel SDK checks the validity of the kernel files. That indeed makes life easier. In case you would need something a little more lightweight, AMD?s CodeXL also provides some nice features, and as far as syntax highlighting goes, it does not depend on any feature being turned on inside the project. It just uses the extension of the source file to turn on highlighting. Felad?: Boxer, Aaron Elk?ldve: ?h?tf??, ?2014?. ?j?lius? ?14?. ?15?:?56 C?mzett: cmake at cmake.org Hello List, I have a cmake project that I am adding opencl support to. I am using the Intel OpenCL sdk, which integrates with Visual Studio. So far, I do the following: 1) I have a cmake script that finds the opencl libraries and include files 2) I manually enable opencl support in visual studio in the Tools menu With these steps, all opencl files are statically checked by the compiler. So far, so good. However, to actually compile The files with opencl, I need to pass the absolute file path of the *.cl file into opencl. This is because, as is typical With cmake, the build files reside in a folder separate from the source files. Has anyone encountered a similar problem? Is there a way of setting the *.cl folder path in cmake? Currently I have to Hard code this into my code, which is hacky. Also, it would be nice if cmake could automatically switch on opencl support in the visual studio project, but I have no idea how this could be done. Thanks, Aaron This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberts.noah at gmail.com Wed Jul 16 03:52:57 2014 From: roberts.noah at gmail.com (Noah Roberts) Date: Wed, 16 Jul 2014 00:52:57 -0700 Subject: [CMake] Install path for package files Message-ID: So when I make a library that I want to be findable with cmake, I'd like the cpack system to work such that the module file is installed into the cmake module search path unless specified otherwise. I gather I need to create a BlahModule.cmake file that implements the package finding stuff. I want to install this wherever cmake will find it. I don't want to put it in some place in the system and then expect dependent CMakeLists.txt files to set that path when using find_package. I want find_package to just work unless the user screws with it, and then assume they know what they're doing. So what is the variable I use in the install() function for the DESTINATION parameter to do this? I assume there must be one... I can't seem to find it in the documentation though. -- http://crazycpp.wordpress.com http://crazyeddiesbrain.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nagymatef at freemail.hu Wed Jul 16 04:16:29 2014 From: nagymatef at freemail.hu (=?utf-8?B?TmFneS1FZ3JpIE3DoXTDqSBGZXJlbmM=?=) Date: Wed, 16 Jul 2014 08:16:29 +0000 Subject: [CMake] =?utf-8?q?opencl_and_visual_studio?= Message-ID: I?m rather new to CMake myself, so I?d pretty much do what you could as well: look through the docs. All I know is that much much more complicated things can be done with CMake, and many things can be done multiple ways. I?d rather call on the other mail list users to answer this one: how to copy a group of source files to the build directory on every build? (Or just if they changed since the last build.) I?m making the assumption that if that kernel files appear in VS, then they have already been collected to a variable in CMake and passed on to the build command. (AFAIK that is the only way to make them appear inside the IDE. VS will not compile them, as it has no idea what to do with .cl files, but if I don?t pass it on to the target_build() command they will not appear inside the solution.) Cheers, M?t? Felad?: Boxer, Aaron Elk?ldve: ?kedd?, ?2014?. ?j?lius? ?15?. ?22?:?40 C?mzett: M?t? Ferenc Nagy-Egri, cmake at cmake.org Thanks for your suggestions. I like the first options. So, how may I create a cmake build rule to do this? Thanks, Aaron From: outlook_f942cba43dcb6260 at outlook.com [mailto:outlook_f942cba43dcb6260 at outlook.com] On Behalf Of Nagy-Egri M?t? Ferenc Sent: Monday, July 14, 2014 4:11 PM To: Boxer, Aaron; cmake at cmake.org Subject: Re: [CMake] opencl and visual studio There are two ways to solve your problem I think. Either create a build rule that copies the .cl files over to your build directory on every build. Use a config file that creates a #define with the absolute/relative path to the .cl files. As for the OpenCL integration, I did not know that the Intel SDK checks the validity of the kernel files. That indeed makes life easier. In case you would need something a little more lightweight, AMD?s CodeXL also provides some nice features, and as far as syntax highlighting goes, it does not depend on any feature being turned on inside the project. It just uses the extension of the source file to turn on highlighting. Felad?: Boxer, Aaron Elk?ldve: ?h?tf??, ?2014?. ?j?lius? ?14?. ?15?:?56 C?mzett: cmake at cmake.org Hello List, I have a cmake project that I am adding opencl support to. I am using the Intel OpenCL sdk, which integrates with Visual Studio. So far, I do the following: 1) I have a cmake script that finds the opencl libraries and include files 2) I manually enable opencl support in visual studio in the Tools menu With these steps, all opencl files are statically checked by the compiler. So far, so good. However, to actually compile The files with opencl, I need to pass the absolute file path of the *.cl file into opencl. This is because, as is typical With cmake, the build files reside in a folder separate from the source files. Has anyone encountered a similar problem? Is there a way of setting the *.cl folder path in cmake? Currently I have to Hard code this into my code, which is hacky. Also, it would be nice if cmake could automatically switch on opencl support in the visual studio project, but I have no idea how this could be done. Thanks, Aaron This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibault.hild at gmail.com Wed Jul 16 09:08:40 2014 From: thibault.hild at gmail.com (Thibault Hild) Date: Wed, 16 Jul 2014 15:08:40 +0200 Subject: [CMake] RPM packaging dependencies expressed in subdirectories Message-ID: Hello, I'm quite new to CMake and after experimenting a bit, I am currently considering a way to express RPM dependencies in subdirectories instead of specifying them at the top level. After googling a bit, I did not find something that fulfills my expectations but I have probably missed a post or something in the CPack documentation. If you already know of a discussion thread or explanation on this particular subject, can you please redirect me to it ? To clarify, I currently have the following source hierarchy: ________________________________________________________ [build at build src]$ ls -R .: CMakeLists.txt hello world ./hello: CMakeLists.txt hello.cpp ./world: CMakeLists.txt world.cpp world.h ________________________________________________________ The top level CMakeLists.txt contains: ________________________________________________________ [build at build src]$ cat ./CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(cmake_testbed) set(CMAKE_INSTALL_PREFIX "/some/where") # use, i.e. don't skip the full RPATH for the build tree set(CMAKE_SKIP_BUILD_RPATH false) # when building, don't use the install RPATH already # (but later on when installing) set(CMAKE_BUILD_WITH_INSTALL_RPATH false) set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) # the RPATH to be used when installing, but only if it's not a system # directory list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) if("${isSystemDir}" STREQUAL "-1") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") endif("${isSystemDir}" STREQUAL "-1") add_subdirectory(world) add_subdirectory(hello) set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") set(CPACK_GENERATOR "RPM") set(CPACK_RPM_PACKAGE_REQUIRES "ruby >= 1.8") include(CPack) ________________________________________________________ As you can see, I am currently expressing a RPM dependency on ruby in the top level CMakeLists.txt but in fact this dependency comes from the hello subdirectory because hello.cpp states this: ________________________________________________________ [build at build src]$ cat hello/hello.cpp #include "world.h" #include #include using namespace std; int main(int argc, char* argv[]) { cout << "hello " << world() << endl; system("/usr/bin/ruby --version"); return 0; } ________________________________________________________ hello/CmakeLists.txt current content is: ________________________________________________________ [build at build src]$ cat hello/CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(hello) include_directories(${world_SOURCE_DIR}) add_executable(hello hello.cpp) target_link_libraries(hello world) install(TARGETS hello DESTINATION bin) ________________________________________________________ Is there a way to express this RPM dependency in "hello/CMakeLists.txt" instead of "./CMakeLists.txt" ? The common use case for this is the integration of multiple components which would all comes with there own dependencies without requiring the integrator to dig in each subdirectory in order to find its induced dependencies (which are well known by the component's author). I understand that this also raises the problem of multiple dependencies over the same component (let say "hello" needs "ruby >=2.8" and "world" needs "ruby >= 3.0"). I do not currently know how rpmbuild would behave if he find two requirements on the same dependency (I would expect it to take the stronger requirement i.e. "ruby >= 3.0" which is nonetheless not always the right solution in case of a backward compatibility breakage). Is anyone having the same kind of need over expressing packaging dependencies (RPM or other)? If so, did you find a way to express them in the CMakeLists.txt of the subdirectories? Thanks for reading me until the end, regards, Thibault Hild -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Wed Jul 16 09:39:17 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Wed, 16 Jul 2014 15:39:17 +0200 Subject: [CMake] RPM packaging dependencies expressed in subdirectories In-Reply-To: References: Message-ID: <53C68085.508@gmail.com> On 16.07.2014 15:08, Thibault Hild wrote: > Hello, > > I'm quite new to CMake and after experimenting a bit, I am currently > considering a way to express RPM dependencies in subdirectories > instead of specifying them at the top level. > After googling a bit, I did not find something that fulfills my > expectations but I have probably missed a post or something in the > CPack documentation. If you already know of a discussion thread or > explanation on this particular subject, can you please redirect me to it ? > For DEB I used custom function()s to maintain a custom GLOBAL property (set_property(), get_property()). The custom function I used to append dependencies to the property would check if the dependency already exists. If it existed with the same version requirement it would be ignored; if the version differed I threw an error. Somewhere at the end of my root CMakeLists.txt (but before include(CPack)) I added a call to my second custom function which would set the appropriate CPACK_ variable (with PARENT_SCOPE) based on the content of the GLOBAL property. Nils From thibault.hild at gmail.com Wed Jul 16 10:37:44 2014 From: thibault.hild at gmail.com (Thibault Hild) Date: Wed, 16 Jul 2014 16:37:44 +0200 Subject: [CMake] RPM packaging dependencies expressed in subdirectories In-Reply-To: <53C68085.508@gmail.com> References: <53C68085.508@gmail.com> Message-ID: Thanks Nils for the hint. I guess you had to use Cmake constructs like: if("new dep" MATCHES "a regex built with ${pack_deps}") in order to decide whether a new dependency is allowed. As I am quite new to CMake functions, can you detail a bit how do you operate such validation ? Is there some sort of function repository to share these custom CMake function tools ? Thibault On Wed, Jul 16, 2014 at 3:39 PM, Nils Gladitz wrote: > On 16.07.2014 15:08, Thibault Hild wrote: > >> Hello, >> >> I'm quite new to CMake and after experimenting a bit, I am currently >> considering a way to express RPM dependencies in subdirectories instead of >> specifying them at the top level. >> After googling a bit, I did not find something that fulfills my >> expectations but I have probably missed a post or something in the CPack >> documentation. If you already know of a discussion thread or explanation on >> this particular subject, can you please redirect me to it ? >> >> > For DEB I used custom function()s to maintain a custom GLOBAL property > (set_property(), get_property()). > > The custom function I used to append dependencies to the property would > check if the dependency already exists. > If it existed with the same version requirement it would be ignored; if > the version differed I threw an error. > > Somewhere at the end of my root CMakeLists.txt (but before include(CPack)) > I added a call to my second custom function which would set the appropriate > CPACK_ variable (with PARENT_SCOPE) based on the content of the GLOBAL > property. > > Nils > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Wed Jul 16 11:20:14 2014 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Wed, 16 Jul 2014 11:20:14 -0400 Subject: [CMake] Fails for Solaris In-Reply-To: References: Message-ID: Amos, I just tried on a Sun Blade 1500 running Solaris 10 8/11 with an UltraSPARC IIIi using SolarisStudio 12.2 and 12.3. Both were able to configure and build successfully using both the bootstrap, /path/to/source/bootstrap && gmake, and and cmake, cmake /path/to/source && gmake, so it can be done: --------------------------------------------- CMake 3.0.0, Copyright 2000-2014 Kitware, Inc. C compiler on this system is: /opt/solarisstudio12.3/bin/suncc C++ compiler on this system is: /opt/solarisstudio12.3/bin/sunCC Makefile processor on this system is: gmake /opt/solarisstudio12.3/bin/sunCC is not GNU compiler ... /opt/solarisstudio12.3/bin/sunCC has ANSI for scoping --------------------------------------------- gmake: `cmake' is up to date. loading initial cache file /export/home/local/KHQ/chuck.atkins/Code/CMake/build/v3.0.0/sunpro_bootstrap/Bootstrap.cmk/InitialCacheFlags.cmake -- Configuring done -- Generating done -- Build files have been written to: /export/home/local/KHQ/chuck.atkins/Code/CMake/build/v3.0.0/sunpro_bootstrap --------------------------------------------- CMake has bootstrapped. Now run gmake. That being said however, this is clearly not working for you. What particular versions of compilers and Solaris are you using? Are you using the 3.0.0 tarball or are you using a git checkout of a specific hash? - Chuck On Tue, Jul 15, 2014 at 1:06 PM, Amos wrote: > No matter if I use GNU or workshop compilers, the initial config fails: > > CC supports member templates > CC has standard template specialization syntax > CC has argument dependent lookup > CC has struct stat with st_mtim member > CC has ios::binary openmode > CC has ANSI for scoping > --------------------------------------------- > gmake: 'cmake' is up to date. > loading initial cache file > /usr/soft/that/cmake-3.0.0/src/default/sparcv9_sun_solaris2.10/Bootstrap.cmk/InitialCacheFlags.cmake > -- Using system-installed BZIP2 > -- Using system-installed ZLIB > CMake Error: File > /usr/soft/that/cmake-3.0.0/src/default/sparcv9_sun_solaris2.10/Tests/.NoDartCoverage > does not exist. > CMake Error at CMakeLists.txt:161 (configure_file): > configure_file Problem configuring file > Call Stack (most recent call first): > CMakeLists.txt:527 (CMAKE_SETUP_TESTING) > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.kreuzberger at procitec.de Wed Jul 16 11:37:06 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Wed, 16 Jul 2014 17:37:06 +0200 Subject: [CMake] Determine dependency between targets Message-ID: Hi! i am looking for a way to determine REAL LINKER dependencies between an application and static libraries for use with gcc. the include dependencies and cmake dependencies are quite good to determine. For the linker is more or less the question, against which libraries i should link. This is done more or less by "try and error". eg. app depends on lib2. This lib depends on lib1. so in cmake i would link against lib2 and lib1 ok, so i add a dependency (target_link_libraries( lib2 lib1) and link app only agains lib2. But if the link dependency changes ( lib2 does not require to link against lib1 any more), how can i detect it to remove the target_link_libraries( .. ) entry from lib2 ? Or the other way around, if i use only PARTS of lib2 that does not require to link to lib1 (stripping -ffunctions-sections), how can i determine that? Greetz, Joerg Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From nilsgladitz at gmail.com Wed Jul 16 11:40:33 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Wed, 16 Jul 2014 17:40:33 +0200 Subject: [CMake] RPM packaging dependencies expressed in subdirectories In-Reply-To: References: <53C68085.508@gmail.com> Message-ID: <53C69CF1.1080106@gmail.com> On 16.07.2014 16:37, Thibault Hild wrote: > Thanks Nils for the hint. > > I guess you had to use Cmake constructs like: > if("new dep" MATCHES "a regex built with ${pack_deps}") > in order to decide whether a new dependency is allowed. > > As I am quite new to CMake functions, can you detail a bit how do you > operate such validation ? I got the current list of dependencies with get_property(). Then I looped over the list with foreach(). Every list item I split into name and version (with regex) and then compared it to the new dependency. I used message(FATAL_ERROR) to issue a (fatal) diagnostic if a different version of a dependency has already been requested. > Is there some sort of function repository to share these custom CMake > function tools ? I am not aware of any except for cmake's own module repository[1] ... which might not be the right place for this though. Perhaps the Wiki. Nils [1] http://www.cmake.org/cmake/help/v3.0/manual/cmake-modules.7.html From bartosz.kosiorek at gmail.com Wed Jul 16 11:50:15 2014 From: bartosz.kosiorek at gmail.com (Bartosz) Date: Wed, 16 Jul 2014 17:50:15 +0200 Subject: [CMake] Configure separate from generate on the command line Message-ID: Hi. We have a huge project which are using cmake. To resolve cross dependencies the cmake we are running it in two phases: 1. Configure (only), interrupted by ?SEND_ERROR": In that phase CMakeCache.txt are created and it is used by next phase. 2. Standard cmake run (cache variables are set, so it resolve cross dependecies) Because first phase is interrupted by "SEND_ERROR", we need to disable error output within our run scripts (to avoid problems with Continuous Integration systems). Unfortunately it is also hiding real errors/problems, which are appears during development process. So developers are blind, and unable to find problems in the first phase. We tried some workarounds, but I think the best solution is make possible to configure separate from generate from command line. Is it possible to implement --configure-only argument? It was described here: http://www.cmake.org/Bug/view.php?id=13359 The patch are already exists, and work perfectly for me. It is only need to review, update and push. Thanks in advance Bartosz -------------- next part -------------- An HTML attachment was scrubbed... URL: From angeliki.chrysochou at gmail.com Wed Jul 16 16:34:17 2014 From: angeliki.chrysochou at gmail.com (Angeliki Chrysochou) Date: Wed, 16 Jul 2014 22:34:17 +0200 Subject: [CMake] Determine dependency between targets In-Reply-To: References: Message-ID: Hi J?rg, I am not sure if there is a way to do this via cmake, maybe there is and I don't know it, but I think you need to keep an eye on such things "manually" in a way. You could use ldd or readelf to see the exact dependencies of a library in linux. All the best, Angeliki On Wed, Jul 16, 2014 at 5:37 PM, J?rg Kreuzberger wrote: > Hi! > > i am looking for a way to determine REAL LINKER dependencies between an > application and static libraries for use with gcc. > > the include dependencies and cmake dependencies are quite good to > determine. > > For the linker is more or less the question, against which libraries i > should link. This is done more or less by "try and error". > > eg. app depends on lib2. This lib depends on lib1. > so in cmake i would link against lib2 and lib1 > > ok, so i add a dependency (target_link_libraries( lib2 lib1) and link app > only agains lib2. > > But if the link dependency changes ( lib2 does not require to link against > lib1 any more), how can i detect it to remove the target_link_libraries( .. > ) entry from lib2 ? > > Or the other way around, if i use only PARTS of lib2 that does not require > to link to lib1 (stripping -ffunctions-sections), how can i determine that? > > Greetz, > Joerg > > Mannheim HRB 504702 > Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. > (FH) Dipl.-Inf. (FH) Jens Heyen > > This e-mail may contain confidential and/or legally protected information. > If you are not the intended recipient (or have received this e-mail in > error) please notify the sender immediately and delete this e-mail. Any > unauthorized copying, disclosure or distribution of the material in this > email is strictly forbidden. > Thank you! > > > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dedok.mad at gmail.com Wed Jul 16 17:30:30 2014 From: dedok.mad at gmail.com (Vasily Soshnikov) Date: Thu, 17 Jul 2014 01:30:30 +0400 Subject: [CMake] Most better way to rebuild library if property changed Message-ID: Hi, let say I have C library and I wish set difference "-D" options to this library ( must recompile library ) and exe should not known about those options. Scheme: lib + -DFEATURE1 && -DFEATURE2 -> lib with FEATURES 1 & 2 -> exe0 lib + -DFEATURE2 && -DFEATURE3 -> lib with FEATURES 2 & 3 -> exe1 Solutions which I found: 1) Linking each exeN with libraries separated by names: lib_f1_f2 ... fn -> exeN. 2) Create configuration ( f1_f2_conf.c file ) file which will generated by CMake for each case exeN. Maybe there are more better solutions? -- *Regard,Soshnikov Vasily mailto:dedok.mad at gmail.com * -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Thu Jul 17 07:41:29 2014 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Thu, 17 Jul 2014 07:41:29 -0400 Subject: [CMake] Fails for Solaris In-Reply-To: References: Message-ID: Hi Amos, Although I'm ure it's *possible*, I'd be surprised if changing the compiler made any difference. A few questions would help narrow down the issue: - Which source are you building from? Is it the 3.0.0 release tgz or is it a particular git hash? - Are you doing an in-source build (not recommended) or an out-of-source build (recommended)? - What's the exact build command you're using? Thanks - Chuck On Wed, Jul 16, 2014 at 7:37 PM, Amos wrote: > Thanks for the reply. > > I tried with both gcc-4.8.3 and Studio 12.1. Maybe I'll try updating > SolarisStudio. > > > > > On Wed, Jul 16, 2014 at 10:20 AM, Chuck Atkins > wrote: > >> Amos, >> >> I just tried on a Sun Blade 1500 running Solaris 10 8/11 with an >> UltraSPARC IIIi using SolarisStudio 12.2 and 12.3. Both were able to >> configure and build successfully using both the bootstrap, /path/to/source/bootstrap >> && gmake, and and cmake, cmake /path/to/source && gmake, so it can be >> done: >> >> --------------------------------------------- >> CMake 3.0.0, Copyright 2000-2014 Kitware, Inc. >> C compiler on this system is: /opt/solarisstudio12.3/bin/suncc >> C++ compiler on this system is: /opt/solarisstudio12.3/bin/sunCC >> Makefile processor on this system is: gmake >> /opt/solarisstudio12.3/bin/sunCC is not GNU compiler >> ... >> /opt/solarisstudio12.3/bin/sunCC has ANSI for scoping >> >> --------------------------------------------- >> gmake: `cmake' is up to date. >> loading initial cache file >> /export/home/local/KHQ/chuck.atkins/Code/CMake/build/v3.0.0/sunpro_bootstrap/Bootstrap.cmk/InitialCacheFlags.cmake >> -- Configuring done >> -- Generating done >> -- Build files have been written to: >> /export/home/local/KHQ/chuck.atkins/Code/CMake/build/v3.0.0/sunpro_bootstrap >> --------------------------------------------- >> CMake has bootstrapped. Now run gmake. >> >> That being said however, this is clearly not working for you. What >> particular versions of compilers and Solaris are you using? Are you using >> the 3.0.0 tarball or are you using a git checkout of a specific hash? >> >> >> - Chuck >> >> >> On Tue, Jul 15, 2014 at 1:06 PM, Amos wrote: >> >>> No matter if I use GNU or workshop compilers, the initial config fails: >>> >>> CC supports member templates >>> CC has standard template specialization syntax >>> CC has argument dependent lookup >>> CC has struct stat with st_mtim member >>> CC has ios::binary openmode >>> CC has ANSI for scoping >>> --------------------------------------------- >>> gmake: 'cmake' is up to date. >>> loading initial cache file >>> /usr/soft/that/cmake-3.0.0/src/default/sparcv9_sun_solaris2.10/Bootstrap.cmk/InitialCacheFlags.cmake >>> -- Using system-installed BZIP2 >>> -- Using system-installed ZLIB >>> CMake Error: File >>> /usr/soft/that/cmake-3.0.0/src/default/sparcv9_sun_solaris2.10/Tests/.NoDartCoverage >>> does not exist. >>> CMake Error at CMakeLists.txt:161 (configure_file): >>> configure_file Problem configuring file >>> Call Stack (most recent call first): >>> CMakeLists.txt:527 (CMAKE_SETUP_TESTING) >>> >>> >>> -- >>> >>> 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 >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.eckert at hzdr.de Thu Jul 17 09:06:05 2014 From: c.eckert at hzdr.de (Carlchristian Eckert) Date: Thu, 17 Jul 2014 15:06:05 +0200 Subject: [CMake] Adding custom environment variables to generated Makefile Message-ID: <53C7CA3D.909@hzdr.de> Hello, We are migrating our project from standard Unix Makefiles to CMake. The old Makefile contained a line that cleared an environment variable like this: export CPLUS_INCLUDE_PATH= This step is necessary due to some library/path confusion in combination with 3rd party libraries on some systems. However, I was unable to find a way to generate such a command (or any other way to define environment variables) inside the generated Makefile. The closest I got was something like add_custom_target( workaround sed -i '3i\\\\n\#Workaround\ for\ Thrust\ bug\\nexport\ CPLUS_INCLUDE_PATH=' Makefile ) This kind of works, but you have to run make workaround each time after generating the Makefile (and if you forget to do it, the build will fail later) Other projects [1] that use CMake just tell their users to run unset CPLUS_INCLUDE_PATH in their shell to work around the issue, which I try to avoid. Is there any automated way to do this when generating the Makefile? [1] http://www.libama.org/documentation.html?tx_restdoc_pi1[doc]=installation|configuration|cuda From gnthibault at gmail.com Thu Jul 17 10:07:03 2014 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 17 Jul 2014 16:07:03 +0200 Subject: [CMake] About the FindCUDA.cmake module ande Separate Compilation Message-ID: Dear All I am a user of cmake build system and its differents modules, that were very helpful in the past. But I met some specific issues with the FindCUDA.cmake module, for about a year now. Especially about the Separate Compilation feature, that never worked for me, I previously had to bypass the problem by rewriting some code in the same file, but today I am stuck and I have to get this feature working. What are my files ? I have =================== a.cu: __constant__ Buffer float[1024]; __global__ void kernelA( float a ) { Buffer[0] = a; } =================== b.cu.h extern __constant__ Buffer float[1024]; =================== b.cu __global__ void kernelB( float b ) { Buffer[0] += b; } =================== It is obvious with this configuration, that I have to link b.cu with a.cu, in order to get the same memory area shared across them. This simple feature seems to be only available if a separate compilation configuration build is used, in order to avoid redefinition error, and also compiler needs relocatable device code to be setted, this latter I don't really understand why. What specific feature of the CMake Module I am using ? Here are the main macros I am using: ======================================= list(APPEND CUDA_NVCC_FLAGS " -gencode arch=compute_30,code=sm_30 -rdc=true ") set( CUDA_SEPARABLE_COMPILATION ) cuda_add_executable(${OUTPUT_NAME} ${sources} ${headers}) ====================================== The error I get: If I discard the "-rdc=true" nvcc option for relocatable code, the code compiles, and links fine, but at runtime the code does not work as expected, ie the value inside the buffer is not shared across differents kernel a and b. If all options stated before are setted, the code compiles fine, but at link step I get tons of link errors that looks like: undefined reference to `__cudaRegisterLinkedBinary[...]' The problem doesn't seem that hard to solve, as seperate compilation is extensively explained in the cuda documentation : http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#using-separate-compilation-in-cuda But I still got problems trying to get the separate things to work with FindCUDA.cmake. Thank you in advance for any help. From thibault.hild at gmail.com Thu Jul 17 10:14:10 2014 From: thibault.hild at gmail.com (Thibault Hild) Date: Thu, 17 Jul 2014 16:14:10 +0200 Subject: [CMake] RPM packaging dependencies expressed in subdirectories In-Reply-To: <53C69CF1.1080106@gmail.com> References: <53C68085.508@gmail.com> <53C69CF1.1080106@gmail.com> Message-ID: Thank you again Nils for the guidelines, now its time to experiment :). Thibault On Wed, Jul 16, 2014 at 5:40 PM, Nils Gladitz wrote: > On 16.07.2014 16:37, Thibault Hild wrote: > >> Thanks Nils for the hint. >> >> I guess you had to use Cmake constructs like: >> if("new dep" MATCHES "a regex built with ${pack_deps}") >> in order to decide whether a new dependency is allowed. >> >> As I am quite new to CMake functions, can you detail a bit how do you >> operate such validation ? >> > > I got the current list of dependencies with get_property(). > Then I looped over the list with foreach(). > Every list item I split into name and version (with regex) and then > compared it to the new dependency. > I used message(FATAL_ERROR) to issue a (fatal) diagnostic if a different > version of a dependency has already been requested. > > > Is there some sort of function repository to share these custom CMake >> function tools ? >> > > I am not aware of any except for cmake's own module repository[1] ... > which might not be the right place for this though. > Perhaps the Wiki. > > Nils > > [1] http://www.cmake.org/cmake/help/v3.0/manual/cmake-modules.7.html > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrysalisx at gmail.com Thu Jul 17 23:00:12 2014 From: chrysalisx at gmail.com (Walter Gray) Date: Thu, 17 Jul 2014 20:00:12 -0700 Subject: [CMake] find_package and INTERFACE targets in 3.0 Message-ID: <53C88DBC.5040208@gmail.com> Hi list! I'm a big fan of the new INTERFACE targets & target usage requirements, but none of the provided Find.cmake files seem to take advantage of the new paradigm. Checking the wiki, the old Find.cmake seem to be deprecated, with most of the information on authoring new packages assuming that you are the developer of the module, not the consumer. What is the recommended way to deal with packages that don't provide these config files? I'll happily write my own Find.cmake files, however that approach seems deprecated and I haven't found any good examples of find modules that define IMPORT or INTERFACE targets instead of the older method of setting a bunch of _xxx variables. -Walter From chrysalisx at gmail.com Thu Jul 17 23:01:50 2014 From: chrysalisx at gmail.com (Walter Gray) Date: Thu, 17 Jul 2014 20:01:50 -0700 Subject: [CMake] Target usage requirements for shared libraries Message-ID: <53C88E1E.7070701@gmail.com> Hi there! I've got a question I can't seem to find a good answer to: What is the idiomatic way in CMake 3.0 to handle bundling shared libraries? I've exhausted my google-fu and all of the examples seem to be from before CMake 3 was released. None of them take any advantage of 3.0's new and IMO much more elegant target usage requirements paradigm, and there doesn't really seem to be consensus on what the best way to handle this problem is. Given some application and some library with a header, static, and shared library components (.h, .lib, and .dll on windows), it seems like there should be some way to write a definition for an interface library such that by writing target_link_library( ), the appropriate shared libraries are copied to the exe directory (or in some way made accessible) either via a special custom target, a post build step, or install time. Static libraries and headers are handled this way, so why not shared libraries too? Am I just being naive? Thanks for your help. -Walter From nilsgladitz at gmail.com Fri Jul 18 08:23:30 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 18 Jul 2014 14:23:30 +0200 Subject: [CMake] find_package and INTERFACE targets in 3.0 In-Reply-To: <53C88DBC.5040208@gmail.com> References: <53C88DBC.5040208@gmail.com> Message-ID: <53C911C2.7000401@gmail.com> On 07/18/2014 05:00 AM, Walter Gray wrote: > Hi list! > > I'm a big fan of the new INTERFACE targets & target usage requirements, > but none of the provided Find.cmake files seem to take > advantage of the new paradigm. Checking the wiki, the old > Find.cmake seem to be deprecated, with most of the information > on authoring new packages assuming that you are the developer of the > module, not the consumer. What is the recommended way to deal with > packages that don't provide these config files? I'll happily write my > own Find.cmake files, however that approach seems deprecated > and I haven't found any good examples of find modules that define IMPORT > or INTERFACE targets instead of the older method of setting a bunch of > _xxx variables. There are a few modules that use imported targets in 3.0 and a few more were updated in master. I see e.g. FindGLUT, FindQt4, FindGTK2, FindZLIB, FindOpenGL and FindGLEW making use of imported targets in master[1]. [2] documents how to write find modules and includes an example with IMPORTED targets. Nils [1] http://cmake.org/gitweb?p=cmake.git;a=tree;f=Modules;h=5d17682cb231f119b677ce67d804852d3be6d46f;hb=HEAD [2] http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules From Dominique.Ledit at PDGM.com Fri Jul 18 08:35:19 2014 From: Dominique.Ledit at PDGM.com (Dominique Ledit) Date: Fri, 18 Jul 2014 12:35:19 +0000 Subject: [CMake] CMake 2.8.12.2: Visual Studio 10 generator - Bad handling of /STACK:reserve[, commit] compilation flag Message-ID: <58AC22C72FD8E842B3DA5842573BB5C83948CFEA@excorpuk2.paradigmgeo.net> Hi everybody I'm currently working with the 2.8.12.2 CMake version, and have an issue with the Visual Studio 10 Win64 Generator. In The CMakeLists.txt file I use to generate an executable, I've added SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:134217728,32768") CMake generator correctly builds the VS solution containing the target to build the executable. Looking in the VS 10 IDE at the "Properties>Configuration Properties>Linker>System" of the target corresponding to the executable I saw for the two corresponding properties: Stack Reserve Size 134217728,32768 Stack Commit Size The Stack Reserve Size value contains both stack reserve size and stack commit size with the comma separator The Stack Commit Size properties is not defined. It looks as if the /STACK:134217728,32768 Linker flag is incorrectly parsed by the CMake Visual Studio 10 Generator. Looking at the source code of this generator (downloaded from the CMake web site), it seems that the commit size is deliberately skipped (same thing for the /HEAP:reserve[,commit] compiler flag) Does anybody know why? Is there a way to pass a stack commit size? Thank you in advance Dominique -------------------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sklist at kitterman.com Fri Jul 18 14:37:13 2014 From: sklist at kitterman.com (Scott Kitterman) Date: Fri, 18 Jul 2014 14:37:13 -0400 Subject: [CMake] Considering contributing a FindPyQt.cmake module Message-ID: <2407202.0vgVv7Fb1e@scott-latitude-e6320> Hello, I've just subscribed to the list with the intent of developing, contributing and maintaining a module for FindPyQt. I'm a long time packager/maintainer of Sip4/PyQt4/PyQt5/QScintilla2 and such in Debian and Ubuntu. I've also working packaging PyKDE4 (which uses CMake). There is an existing FindPyQt4.cmake that's maintained as part of KDE's kdelibs [1]. I've noticed that this has been copied and used internally by a number of other applications. There have been a number of changes in the Sip4 related build systems recently (pyqtconfig is no longer provided). Additionally, now that Qt5 is gaining momentum and PyQt5 is available, FindPyQt4.cmake will need to be extended/replicated for PyQt5. Given the above, I thought it would make sense to provide a new FindPyQt.cmake that would replace (and be backward compatible with) FindPyQt4.cmake that would work for both the new and old PyQt4 configure and with PyQt5 and have it be actually in CMake so that there would not be multiple copies running around. I have working with the existing related modules sufficiently to be confident of producing something useful. I am willing to maintain it. I would appreciate feedback on the idea of doing this and having it in CMake. I have reviewed all the new maintainer documentation [2] and subscribed all the places it says to. Scott K [1] https://projects.kde.org/projects/kde/kdelibs/repository/revisions/master/show/cmake/modules [2] http://www.cmake.org/Wiki/CMake:Module_Maintainers From darlingm at gmail.com Fri Jul 18 22:31:23 2014 From: darlingm at gmail.com (Michael Darling) Date: Fri, 18 Jul 2014 22:31:23 -0400 Subject: [CMake] Package found - passing _INCLUDE_DIRS to include_directories() and _LIBRARIES to target_link_libraries() Message-ID: http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#How_package_finding_works seems to indicate if _FOUND is found, the _INCLUDE_DIRS is passed to the include_directories() command, and _LIBRARIES is passed to target_link_libraries() Why is the reduced-case code below calling g++ without including "-I~/codeTestPackages/lib", causing a "app/app.cpp:1:17: fatal error: lib.h: No such file or directory" ? I'm on CMake v3.0.0. Also tried CMake v3.0.20140718-g36a81 (git source.) All the source is below, and attached as a .tar.gz. *### CMakeLists.txt ###* cmake_minimum_required(VERSION 3.0) project(codeTestPackages) set(CMAKE_VERBOSE_MAKEFILE on) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ~/codeTestPackages/findModules) add_subdirectory(lib) add_subdirectory(app) *### findModules/Findlib.cmake ###* IF(NOT lib_FOUND) set(lib_FOUND "yes") message("lib_FOUND is ${lib_FOUND}") set(lib_INCLUDE_DIRS ~/codeTestPackages/lib) set(lib_LIBRARIES lib) ENDIF(NOT lib_FOUND) *### lib/CMakeListst.txt ###* include_directories(~/codeTestPackages/lib) add_library(lib lib.cpp) *### lib/lib.h ###* #ifndef __LIB__ #define __LIB__ namespace LIB { unsigned long libFunc(unsigned long inValue); } #endif *### lib/lib.cpp ###* #include namespace LIB { unsigned long libFunc(unsigned long inValue) { return inValue+1; } } *### app/CMakeLists.txt ###* find_package(lib REQUIRED) add_executable(app app.cpp) *### app/app.cpp ###* #include using namespace LIB; int main() { unsigned long x = 1; unsigned long y = libFunc(x); } -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: codeTestPackages.tar.gz Type: application/x-gzip Size: 790 bytes Desc: not available URL: From chrysalisx at gmail.com Fri Jul 18 23:13:13 2014 From: chrysalisx at gmail.com (Walter Gray) Date: Fri, 18 Jul 2014 20:13:13 -0700 Subject: [CMake] find_package and INTERFACE targets in 3.0 In-Reply-To: <53C911C2.7000401@gmail.com> References: <53C88DBC.5040208@gmail.com> <53C911C2.7000401@gmail.com> Message-ID: <53C9E249.4000203@gmail.com> Thanks Nils! The examples in the git repo are particularly helpful. It seems that in all of the examples, the library type is being set to UNKNOWN. Is there a reason for this? It seems that STATIC would be more suitable for most of those, though the wording in the docs for IMPORTED_LOCATION [1] makes it seem like maybe for STATIC's it's just the directory and not the actual .lib file. I notice cmake doesn't seem to have any way to track DLLs or dylibs. Is there some recommended way of dealing with importing shared libraries? The QT4 module was my best bet but it doesn't seem to touch the .dlls at all. I tried writing some of my own for shared libraries like SDL2, I noticed that add_libraries(SHARED IMPORTED) does not seem to work as I expected. An example for Windows(from memory, I'll update with the real run outputs on Monday when I'm back at the office): add_library(SDL2::SDL2 SHARED IMPORTED GLOBAL) set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "${SDL_ROOT_DIR}/lib/SDL2main.lib";"${SDL_ROOT_DIR}/lib/SDL2.lib" INTERFACE_INCLUDE_DIRECTORIES "${SDL_ROOT_DIR}/include" IMPORTED_LOCATION "${SDL_ROOT_DIR}/lib/SDL2.dll" ) According to the docs for IMPORTED_LOCATION [1], for shared libraries on DLL platforms, it should point to the DLL part of the library. When I add the SDL2::SDL2 to my main target, it compiles & generates but when I run the resulting visual studio project it results in link errors with (and this is the part I'm not sure about - again, more concrete detail on Monday) SDL2-NOTFOUND.o and SDL2::SDL2 I suspect I'm using INTERFACE_LINK_LIBRARIES in not quite the right way, but those *are* the public .lib files. When I get back on Monday I'll try a few different approaches based on what I saw in some of the modules, namely making sub-libraries with UNKNOWN and IMPORTED_LOCATION set for all the actual .lib files, and just directly setting LINK_LIBRARIES [1] http://www.cmake.org/cmake/help/git-master/prop_tgt/IMPORTED_LOCATION.html On 7/18/2014 5:23 AM, Nils Gladitz wrote: > On 07/18/2014 05:00 AM, Walter Gray wrote: >> Hi list! >> >> I'm a big fan of the new INTERFACE targets & target usage requirements, >> but none of the provided Find.cmake files seem to take >> advantage of the new paradigm. Checking the wiki, the old >> Find.cmake seem to be deprecated, with most of the information >> on authoring new packages assuming that you are the developer of the >> module, not the consumer. What is the recommended way to deal with >> packages that don't provide these config files? I'll happily write my >> own Find.cmake files, however that approach seems deprecated >> and I haven't found any good examples of find modules that define IMPORT >> or INTERFACE targets instead of the older method of setting a bunch of >> _xxx variables. > > There are a few modules that use imported targets in 3.0 and a few > more were updated in master. > > I see e.g. FindGLUT, FindQt4, FindGTK2, FindZLIB, FindOpenGL and > FindGLEW making use of imported targets in master[1]. > > [2] documents how to write find modules and includes an example with > IMPORTED targets. > > Nils > > [1] > http://cmake.org/gitweb?p=cmake.git;a=tree;f=Modules;h=5d17682cb231f119b677ce67d804852d3be6d46f;hb=HEAD > > [2] > http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules From chrysalisx at gmail.com Fri Jul 18 23:19:57 2014 From: chrysalisx at gmail.com (Walter Gray) Date: Fri, 18 Jul 2014 20:19:57 -0700 Subject: [CMake] Package found - passing _INCLUDE_DIRS to include_directories() and _LIBRARIES to target_link_libraries() In-Reply-To: References: Message-ID: <53C9E3DD.7040300@gmail.com> Unless I'm mistaken, it says that the *CONVENTION* is to call include_directories(${_INCLUDE_DIRS}) manually, not that it is done automatically. To get that kind of automatic include directory adding you need to have an import or interface target with INTERFACE_INCLUDE_DIRECTORIES defined by the find module, then link with that. Take a look at topics related to Interface Libraries [1] and writing modern find modules [2] [1] http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html#interface-libraries [2] http://www.cmake.org/cmake/help/v3.0/manual/cmake-developer.7.html#find-modules On 7/18/2014 7:31 PM, Michael Darling wrote: > http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#How_package_finding_works > > > seems to indicate if _FOUND is found, the > _INCLUDE_DIRS is passed to the include_directories() > command, and _LIBRARIES is passed to target_link_libraries() > > Why is the reduced-case code below calling g++ without including > "-I~/codeTestPackages/lib", causing a "app/app.cpp:1:17: fatal error: > lib.h: No such file or directory" ? > > I'm on CMake v3.0.0. Also tried CMake v3.0.20140718-g36a81 (git source.) > > All the source is below, and attached as a .tar.gz. > > > *### CMakeLists.txt ###* > > cmake_minimum_required(VERSION 3.0) > project(codeTestPackages) > set(CMAKE_VERBOSE_MAKEFILE on) > set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ~/codeTestPackages/findModules) > add_subdirectory(lib) > add_subdirectory(app) > > *### findModules/Findlib.cmake ###* > > IF(NOT lib_FOUND) > set(lib_FOUND "yes") > message("lib_FOUND is ${lib_FOUND}") > set(lib_INCLUDE_DIRS ~/codeTestPackages/lib) > set(lib_LIBRARIES lib) > ENDIF(NOT lib_FOUND) > > *### lib/CMakeListst.txt ###* > > include_directories(~/codeTestPackages/lib) > add_library(lib lib.cpp) > > *### lib/lib.h ###* > > #ifndef __LIB__ > #define __LIB__ > namespace LIB { > unsigned long libFunc(unsigned long inValue); > } > #endif > > *### lib/lib.cpp ###* > > #include > namespace LIB { > unsigned long libFunc(unsigned long inValue) { > return inValue+1; > } > } > > *### app/CMakeLists.txt ###* > > find_package(lib REQUIRED) > add_executable(app app.cpp) > > *### app/app.cpp ###* > > #include > using namespace LIB; > > int main() { > unsigned long x = 1; > unsigned long y = libFunc(x); > } > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From post at hendrik-sattler.de Sat Jul 19 07:01:10 2014 From: post at hendrik-sattler.de (Hendrik Sattler) Date: Sat, 19 Jul 2014 13:01:10 +0200 Subject: [CMake] find_package and INTERFACE targets in 3.0 In-Reply-To: <53C9E249.4000203@gmail.com> References: <53C88DBC.5040208@gmail.com> <53C911C2.7000401@gmail.com> <53C9E249.4000203@gmail.com> Message-ID: <66e3c75e-0340-4aac-81c8-137d3fa4e5d6@email.android.com> Hi, for DLLs, the .lib part has it's own property IMPORTED_IMPLIB. This is already the case for older versions of CMake but at least the Qt4 find module makes no use of it. In our own project, we use global imported targets with dll and import lib set (and other properties like includes) and use it on Windows to copy the dlls to the target location with a generator expression and post-build. I guess on Windows, BundleUtilities could also be simplified if that was done consistently. On all platforms it's rather complicated to find out if a .lib/.so is static or shared. IMHO this should be solved by a function that module writers can use, either on a CMake module or integrated. So currently, you can either guess or use UNKNOWN. Regards, HS On 19. Juli 2014 05:13:13 MESZ, Walter Gray wrote: >Thanks Nils! >The examples in the git repo are particularly helpful. It seems that >in >all of the examples, the library type is being set to UNKNOWN. Is >there >a reason for this? It seems that STATIC would be more suitable for most > >of those, though the wording in the docs for IMPORTED_LOCATION [1] >makes >it seem like maybe for STATIC's it's just the directory and not the >actual .lib file. I notice cmake doesn't seem to have any way to track > >DLLs or dylibs. Is there some recommended way of dealing with >importing >shared libraries? The QT4 module was my best bet but it doesn't seem to > >touch the .dlls at all. I tried writing some of my own for shared >libraries like SDL2, I noticed that add_libraries(SHARED IMPORTED) does > >not seem to work as I expected. An example for Windows(from memory, >I'll update with the real run outputs on Monday when I'm back at the >office): > >add_library(SDL2::SDL2 SHARED IMPORTED GLOBAL) >set_target_properties(SDL2::SDL2 PROPERTIES > INTERFACE_LINK_LIBRARIES >"${SDL_ROOT_DIR}/lib/SDL2main.lib";"${SDL_ROOT_DIR}/lib/SDL2.lib" > INTERFACE_INCLUDE_DIRECTORIES "${SDL_ROOT_DIR}/include" > IMPORTED_LOCATION "${SDL_ROOT_DIR}/lib/SDL2.dll" >) > >According to the docs for IMPORTED_LOCATION [1], for shared libraries >on >DLL platforms, it should point to the DLL part of the library. When I >add the SDL2::SDL2 to my main target, it compiles & generates but when >I >run the resulting visual studio project it results in link errors with >(and this is the part I'm not sure about - again, more concrete detail >on Monday) SDL2-NOTFOUND.o and SDL2::SDL2 >I suspect I'm using INTERFACE_LINK_LIBRARIES in not quite the right >way, >but those *are* the public .lib files. When I get back on Monday I'll >try a few different approaches based on what I saw in some of the >modules, namely making sub-libraries with UNKNOWN and IMPORTED_LOCATION > >set for all the actual .lib files, and just directly setting >LINK_LIBRARIES > >[1] >http://www.cmake.org/cmake/help/git-master/prop_tgt/IMPORTED_LOCATION.html > >On 7/18/2014 5:23 AM, Nils Gladitz wrote: >> On 07/18/2014 05:00 AM, Walter Gray wrote: >>> Hi list! >>> >>> I'm a big fan of the new INTERFACE targets & target usage >requirements, >>> but none of the provided Find.cmake files seem to take >>> advantage of the new paradigm. Checking the wiki, the old >>> Find.cmake seem to be deprecated, with most of the >information >>> on authoring new packages assuming that you are the developer of the >>> module, not the consumer. What is the recommended way to deal with >>> packages that don't provide these config files? I'll happily write >my >>> own Find.cmake files, however that approach seems >deprecated >>> and I haven't found any good examples of find modules that define >IMPORT >>> or INTERFACE targets instead of the older method of setting a bunch >of >>> _xxx variables. >> >> There are a few modules that use imported targets in 3.0 and a few >> more were updated in master. >> >> I see e.g. FindGLUT, FindQt4, FindGTK2, FindZLIB, FindOpenGL and >> FindGLEW making use of imported targets in master[1]. >> >> [2] documents how to write find modules and includes an example with >> IMPORTED targets. >> >> Nils >> >> [1] >> >http://cmake.org/gitweb?p=cmake.git;a=tree;f=Modules;h=5d17682cb231f119b677ce67d804852d3be6d46f;hb=HEAD >> >> [2] >> >http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules From post at hendrik-sattler.de Sat Jul 19 07:03:58 2014 From: post at hendrik-sattler.de (Hendrik Sattler) Date: Sat, 19 Jul 2014 13:03:58 +0200 Subject: [CMake] Package found - passing _INCLUDE_DIRS to include_directories() and _LIBRARIES to target_link_libraries() In-Reply-To: References: Message-ID: <568eaa50-0873-4d9e-acbc-7a2d1aa3c3e5@email.android.com> Hi, I'm not sure that ~ is supported directly. HS On 19. Juli 2014 04:31:23 MESZ, Michael Darling wrote: >http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#How_package_finding_works > >seems to indicate if _FOUND is found, the >_INCLUDE_DIRS is passed to the include_directories() >command, >and _LIBRARIES is passed to target_link_libraries() > >Why is the reduced-case code below calling g++ without including >"-I~/codeTestPackages/lib", causing a "app/app.cpp:1:17: fatal error: >lib.h: No such file or directory" ? > >I'm on CMake v3.0.0. Also tried CMake v3.0.20140718-g36a81 (git >source.) > >All the source is below, and attached as a .tar.gz. > > >*### CMakeLists.txt ###* > >cmake_minimum_required(VERSION 3.0) >project(codeTestPackages) >set(CMAKE_VERBOSE_MAKEFILE on) >set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} >~/codeTestPackages/findModules) >add_subdirectory(lib) >add_subdirectory(app) > >*### findModules/Findlib.cmake ###* > >IF(NOT lib_FOUND) > set(lib_FOUND "yes") > message("lib_FOUND is ${lib_FOUND}") > set(lib_INCLUDE_DIRS ~/codeTestPackages/lib) > set(lib_LIBRARIES lib) >ENDIF(NOT lib_FOUND) > >*### lib/CMakeListst.txt ###* > >include_directories(~/codeTestPackages/lib) >add_library(lib lib.cpp) > >*### lib/lib.h ###* > >#ifndef __LIB__ >#define __LIB__ >namespace LIB { >unsigned long libFunc(unsigned long inValue); >} >#endif > >*### lib/lib.cpp ###* > >#include >namespace LIB { >unsigned long libFunc(unsigned long inValue) { > return inValue+1; >} >} > >*### app/CMakeLists.txt ###* > >find_package(lib REQUIRED) >add_executable(app app.cpp) > >*### app/app.cpp ###* > >#include >using namespace LIB; > >int main() { > unsigned long x = 1; > unsigned long y = libFunc(x); >} > > >------------------------------------------------------------------------ > >-- > >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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From glenn.coombs at gmail.com Sat Jul 19 08:39:26 2014 From: glenn.coombs at gmail.com (Glenn Coombs) Date: Sat, 19 Jul 2014 13:39:26 +0100 Subject: [CMake] How to get a list of all the static libraries that a target will link against ? In-Reply-To: References: Message-ID: Don't all shout at once :-) I'm guessing there are no easy solutions then... -- Glenn On 28 June 2014 14:33, Glenn Coombs wrote: > I have a project which compiles and links into both a stand alone > executable and a dynamic shared library. The library and the executable > link against the same project libraries but have different object files > containing their entry points: main.o for the executable and dll_main.o for > the library. My project heirarchy looks like this (simplified a bit for > brevity): > > CMakeLists.txt > mtx_source/CMakeLists.txt > mtx_wrapper/CMakeLists.txt > testbench/CMakeLists.txt > > The top level CMakeLists.txt calls add_subdirectory on the various project > specific library folders which each build a static library. The testbench > folder is the one that builds both the executable and the dynamic library. > When building the dynamic library I need to use the linker options > -whole-archive and -no-whole-archive to force my static project libraries > to be included into the dynamic library. The problem is how to insert the > -whole-archive and -no-whole-archive options so that they select the > correct set of libraries. Currently in the testbench CMakeLists.txt file I > have these lines: > > set(libs > VLC > mvea > ${SYSTEMC_SUPPORT_LIBRARIES} > ${DEVIFSLAVE_LIBRARIES} > ${SYSTEMC_LIBRARIES} > ${SIM_UTILS_LIBRARIES} > ${HWDEBUG_LIBRARIES} > ) > > if (NOT STUB_OUT_MTX) > list(APPEND libs mtx_wrapper) > endif() > > set(libs_dll ${libs} transif_slave) > > if (UNIX) > list(INSERT libs_dll 0 -Wl,-whole-archive) > list(APPEND libs_dll -Wl,-no-whole-archive) > endif() > > add_library ( csim_dll SHARED ${sources_dll} ${headers_dll} ) > add_executable( testbench ${sources} ${headers} ) > > target_link_libraries(csim_dll ${libs_dll} ${PTHREADS_LIBRARIES} ) > target_link_libraries(testbench ${libs} ${PTHREADS_LIBRARIES} ) > > which produces the following link line: > > /usr/bin/g++-4.7 -fPIC -m32 -m32 -m32 -fPIC -m32 -O3 -O3 -DHIDEBUG > -Wl,-Bsymbolic > -shared -Wl,-soname,libtopazhp.so > -o libtopazhp.so > CMakeFiles/csim_dll.dir/dll_main.cpp.o > CMakeFiles/csim_dll.dir/main_common.cpp.o > -lm -lrt -lm -lrt > -Wl,-whole-archive > ../mvea/VLC/libVLC.a > ../mvea/libmvea.a > ../systemCSupport/libsystemc_support.a > ../devif_slave/libDevifSlave.a > ../systemC/libsystemc.a > ../sim_utils/libsim_utils.a > ../hwdebug/libhwDebug.a > ../mtx_wrapper/libmtx_wrapper.a > ../transif/libtransif_slave.a > -Wl,-no-whole-archive > -lpthread -lz > ../systemC/libpthreads_dummy.a > ../external_mtx/src/external_mtx-build/metag/libmetag.a > ../external_mtx/src/external_mtx-build/metagcopro/libmetagcopro.a > ../external_mtx/src/external_mtx-build/metac/vmetastub/libvmetastub.a > ../external_mtx/src/external_mtx-build/metac/insim/libinsimfpu.a > ../external_mtx/src/external_mtx-build/mtx/insim-mtxg/libinsim-mtxg.a > ../external_mtx/src/external_mtx-build/mtx/libmtxc.a > -ldl -lm -lrt -lm -lrt > > The problem is that the 6 external_mtx libraries should have been included > inside the -whole-archive section. These libraries are specified in the > mtx_wrapper folder with a target_link_libraries(mtx_wrapper > ${METASIM_LIBRARIES}) command. I have managed to wrap the direct library > dependencies inside the -whole-archive but I need to ensure that any > sub-dependencies are included as well (and any dependencies they might have > recursively). Any system dynamic libaries (-ldl -lm -lrt etc.) must appear > after the -no-whole-archive option otherwise the link fails. The > mtx_wrapper library can be built in two ways and only one of them will add > the extra METASIM libraries as a dependency, the other way fakes that code > internally. Adding the METASIM libraries via target_link_libraries() > inside the mtx_wrapper CMakeLists.txt correctly handles that dependency > when linking the standalone executable but is not working for linking the > dynamic library. > > Is there an easy way to get cmake to handle all this ? Is there a way to > get a list of all the static libraries (libXXX.a) that will be included on > the link line for a target ? > > -- > Glenn > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From darlingm at gmail.com Sat Jul 19 22:21:09 2014 From: darlingm at gmail.com (Michael Darling) Date: Sat, 19 Jul 2014 22:21:09 -0400 Subject: [CMake] Package found - passing _INCLUDE_DIRS to include_directories() and _LIBRARIES to target_link_libraries() In-Reply-To: <53C9E3DD.7040300@gmail.com> References: <53C9E3DD.7040300@gmail.com> Message-ID: I definitely want the automatic include directory adding, and also automatic target_link_library adding. I'm totally confused when I'd want to use an import target, and when I'd want to use an interface target, and what a good definition is for each. I see interface libraries state: "A primary use-case for interface libraries is header-only libraries", and "an interface target has no location and is mutable, but is otherwise similar to an imported target." My libraries have separate implementation and are not header-only libraries. But, it says "primary use-case" not "only for header-only libraries". And, what's a clear definition for the difference between an import or interface target, vs a standard statically linked library? If it isn't too much trouble or many changes, would anyone be willing to change the attached example to the appropriate new type of target, so the include directories and target_link_libraries automatically propegate? I'm just looking to get to the point where they compile in place - not worried about the install parts. I think I'm getting lost without being able to find a reduced case whole example of both the library and the applications using it. On Fri, Jul 18, 2014 at 11:19 PM, Walter Gray wrote: > Unless I'm mistaken, it says that the *CONVENTION* is to call > include_directories(${_INCLUDE_DIRS}) manually, not that it > is done automatically. To get that kind of automatic include directory > adding you need to have an import or interface target with > INTERFACE_INCLUDE_DIRECTORIES defined by the find module, then link with > that. Take a look at topics related to Interface Libraries [1] and writing > modern find modules [2] > > [1] > http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html#interface-libraries > [2] > http://www.cmake.org/cmake/help/v3.0/manual/cmake-developer.7.html#find-modules > > > On 7/18/2014 7:31 PM, Michael Darling wrote: > > > http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#How_package_finding_works > > seems to indicate if _FOUND is found, the > _INCLUDE_DIRS is passed to the include_directories() command, > and _LIBRARIES is passed to target_link_libraries() > > Why is the reduced-case code below calling g++ without including > "-I~/codeTestPackages/lib", causing a "app/app.cpp:1:17: fatal error: > lib.h: No such file or directory" ? > > I'm on CMake v3.0.0. Also tried CMake v3.0.20140718-g36a81 (git source.) > > All the source is below, and attached as a .tar.gz. > > > *### CMakeLists.txt ###* > > cmake_minimum_required(VERSION 3.0) > project(codeTestPackages) > set(CMAKE_VERBOSE_MAKEFILE on) > set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} > ~/codeTestPackages/findModules) > add_subdirectory(lib) > add_subdirectory(app) > > *### findModules/Findlib.cmake ###* > > IF(NOT lib_FOUND) > set(lib_FOUND "yes") > message("lib_FOUND is ${lib_FOUND}") > set(lib_INCLUDE_DIRS ~/codeTestPackages/lib) > set(lib_LIBRARIES lib) > ENDIF(NOT lib_FOUND) > > *### lib/CMakeListst.txt ###* > > include_directories(~/codeTestPackages/lib) > add_library(lib lib.cpp) > > *### lib/lib.h ###* > > #ifndef __LIB__ > #define __LIB__ > namespace LIB { > unsigned long libFunc(unsigned long inValue); > } > #endif > > *### lib/lib.cpp ###* > > #include > namespace LIB { > unsigned long libFunc(unsigned long inValue) { > return inValue+1; > } > } > > *### app/CMakeLists.txt ###* > > find_package(lib REQUIRED) > add_executable(app app.cpp) > > *### app/app.cpp ###* > > #include > using namespace LIB; > > int main() { > unsigned long x = 1; > unsigned long y = libFunc(x); > } > > > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From payalprajapati2808 at gmail.com Sun Jul 20 23:10:11 2014 From: payalprajapati2808 at gmail.com (Payal Prajapati) Date: Mon, 21 Jul 2014 08:40:11 +0530 Subject: [CMake] how to add new source files in already build cmake project from inside eclipse cdt? Message-ID: hello All, Two things to say: 1)I read all conversion regarding this topic..but can any one explain me the whole procedure? 2)I am working on orfeo toolbox which i imported in eclipse.It works fine upto make target->build step. but when i do make target->build->install and then finish it gives me an error(highlighted with red mark on projectname). can any one explain which steps are required for building project after importing it in eclipse? Any help would be appreciable. Thank You. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrosensw at gmail.com Mon Jul 21 02:05:58 2014 From: jrosensw at gmail.com (Joseph Rosensweig) Date: Sun, 20 Jul 2014 23:05:58 -0700 Subject: [CMake] CMAKE changing Visual Studio Settings Message-ID: I've been using CMAKE recently on Linux and Windows and I really like it. Its a great way of spinning up a project and organizing your builds. There are just a few things that are bugging me and I'm hoping to get help here. Visual Studio Settings Every time CMAKE generates a project it will be a fresh solution and will not maintain any of the settings you applied to the Visual Studio project. I know that many things such as CMAKE_CXX_FLAGS, etc can change the properties. But what if I want to change settings such as "Suppress Startup Banner", "Environment", Enabling Microsoft Symbol Server, Enabling Native Code Debugging. How do I force CMAKE to set the options I want for fields like these? Combining Debug/Release/Etc into one solution It seems that with CMAKE you have to do separate generations for Debug/Release/etc. But in typical manually created Visual Studio projects you can combine the profiles and just change a project setting to get your new settings. Is it possible to generate a single solution file from CMAKE? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Mon Jul 21 02:49:15 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 21 Jul 2014 08:49:15 +0200 Subject: [CMake] CMAKE changing Visual Studio Settings In-Reply-To: References: Message-ID: <53CCB7EB.1040501@gmail.com> On 07/21/2014 08:05 AM, Joseph Rosensweig wrote: > Visual Studio Settings > > Every time CMAKE generates a project it will be a fresh solution and > will not maintain any of the settings you applied to the Visual Studio > project. I know that many things such as CMAKE_CXX_FLAGS, etc can change > the properties. But what if I want to change settings such as "Suppress > Startup Banner", "Environment", Enabling Microsoft Symbol Server, > Enabling Native Code Debugging. How do I force CMAKE to set the options > I want for fields like these? > Some options are stored in the project files and can be derived from compiler options (e.g. Suppress Startup Banner is derived from /NOLOGO). These would get overwritten on generation. Other options (like e.g. the Debugging Environment) are stored in .user files which are neither generated nor overwritten by CMake. > > Combining Debug/Release/Etc into one solution > > It seems that with CMAKE you have to do separate generations for > Debug/Release/etc. CMake has multi-configuration and single-configuration generators. The Visual Studio generators are multi-configuration which means they generate a single solution which contains all configurations (per default Debug, Release, RelWithDebInfo and MinSizeRel). Nils From angeliki.chrysochou at gmail.com Mon Jul 21 04:57:42 2014 From: angeliki.chrysochou at gmail.com (Angeliki Chrysochou) Date: Mon, 21 Jul 2014 10:57:42 +0200 Subject: [CMake] How to get a list of all the static libraries that a target will link against ? In-Reply-To: References: Message-ID: Hi Glenn, Adding linker flags exactly in target_link_libraries is not a very good practice in my opinion. To add specific linker flags to an executable, you can use the variable CMAKE_EXE_LINKER_FLAGS, which you can edit before calling add_executable. You could set this variable accordingly in your static and dynamic CMakeLists.txt to include the flags you wish in the following way: set(CMAKE_EXE_LINKER_FLAGS "-whole-archive") If you set this variable to include more custom linker flags which you want to preserve across libraries, then you should set it in the following way to preserve its old value: set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -whole-archive") If you want to edit linker flags for a shared library or a module target you can use these cmake variables (set them before add_library): CMAKE_SHARED_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS Be aware that variables have CMakeLists.txt file scope, so if you set different values in one CMakeLists.txt then they might get overwritten or appended (depending on the way you edit the variable). All the best, Angeliki On Sat, Jul 19, 2014 at 2:39 PM, Glenn Coombs wrote: > Don't all shout at once :-) I'm guessing there are no easy solutions > then... > > -- > Glenn > > > On 28 June 2014 14:33, Glenn Coombs wrote: > >> I have a project which compiles and links into both a stand alone >> executable and a dynamic shared library. The library and the executable >> link against the same project libraries but have different object files >> containing their entry points: main.o for the executable and dll_main.o for >> the library. My project heirarchy looks like this (simplified a bit for >> brevity): >> >> CMakeLists.txt >> mtx_source/CMakeLists.txt >> mtx_wrapper/CMakeLists.txt >> testbench/CMakeLists.txt >> >> The top level CMakeLists.txt calls add_subdirectory on the various >> project specific library folders which each build a static library. The >> testbench folder is the one that builds both the executable and the dynamic >> library. When building the dynamic library I need to use the linker >> options -whole-archive and -no-whole-archive to force my static project >> libraries to be included into the dynamic library. The problem is how to >> insert the -whole-archive and -no-whole-archive options so that they select >> the correct set of libraries. Currently in the testbench CMakeLists.txt >> file I have these lines: >> >> set(libs >> VLC >> mvea >> ${SYSTEMC_SUPPORT_LIBRARIES} >> ${DEVIFSLAVE_LIBRARIES} >> ${SYSTEMC_LIBRARIES} >> ${SIM_UTILS_LIBRARIES} >> ${HWDEBUG_LIBRARIES} >> ) >> >> if (NOT STUB_OUT_MTX) >> list(APPEND libs mtx_wrapper) >> endif() >> >> set(libs_dll ${libs} transif_slave) >> >> if (UNIX) >> list(INSERT libs_dll 0 -Wl,-whole-archive) >> list(APPEND libs_dll -Wl,-no-whole-archive) >> endif() >> >> add_library ( csim_dll SHARED ${sources_dll} ${headers_dll} ) >> add_executable( testbench ${sources} ${headers} ) >> >> target_link_libraries(csim_dll ${libs_dll} ${PTHREADS_LIBRARIES} ) >> target_link_libraries(testbench ${libs} ${PTHREADS_LIBRARIES} ) >> >> which produces the following link line: >> >> /usr/bin/g++-4.7 -fPIC -m32 -m32 -m32 -fPIC -m32 -O3 -O3 -DHIDEBUG >> -Wl,-Bsymbolic >> -shared -Wl,-soname,libtopazhp.so >> -o libtopazhp.so >> CMakeFiles/csim_dll.dir/dll_main.cpp.o >> CMakeFiles/csim_dll.dir/main_common.cpp.o >> -lm -lrt -lm -lrt >> -Wl,-whole-archive >> ../mvea/VLC/libVLC.a >> ../mvea/libmvea.a >> ../systemCSupport/libsystemc_support.a >> ../devif_slave/libDevifSlave.a >> ../systemC/libsystemc.a >> ../sim_utils/libsim_utils.a >> ../hwdebug/libhwDebug.a >> ../mtx_wrapper/libmtx_wrapper.a >> ../transif/libtransif_slave.a >> -Wl,-no-whole-archive >> -lpthread -lz >> ../systemC/libpthreads_dummy.a >> ../external_mtx/src/external_mtx-build/metag/libmetag.a >> ../external_mtx/src/external_mtx-build/metagcopro/libmetagcopro.a >> ../external_mtx/src/external_mtx-build/metac/vmetastub/libvmetastub.a >> ../external_mtx/src/external_mtx-build/metac/insim/libinsimfpu.a >> ../external_mtx/src/external_mtx-build/mtx/insim-mtxg/libinsim-mtxg.a >> ../external_mtx/src/external_mtx-build/mtx/libmtxc.a >> -ldl -lm -lrt -lm -lrt >> >> The problem is that the 6 external_mtx libraries should have been >> included inside the -whole-archive section. These libraries are specified >> in the mtx_wrapper folder with a target_link_libraries(mtx_wrapper >> ${METASIM_LIBRARIES}) command. I have managed to wrap the direct library >> dependencies inside the -whole-archive but I need to ensure that any >> sub-dependencies are included as well (and any dependencies they might have >> recursively). Any system dynamic libaries (-ldl -lm -lrt etc.) must appear >> after the -no-whole-archive option otherwise the link fails. The >> mtx_wrapper library can be built in two ways and only one of them will add >> the extra METASIM libraries as a dependency, the other way fakes that code >> internally. Adding the METASIM libraries via target_link_libraries() >> inside the mtx_wrapper CMakeLists.txt correctly handles that dependency >> when linking the standalone executable but is not working for linking the >> dynamic library. >> >> Is there an easy way to get cmake to handle all this ? Is there a way to >> get a list of all the static libraries (libXXX.a) that will be included on >> the link line for a target ? >> >> -- >> Glenn >> >> > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.kreuzberger at procitec.de Mon Jul 21 05:46:18 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Mon, 21 Jul 2014 11:46:18 +0200 Subject: [CMake] Source List Compilation Depending on Configuration Message-ID: Hi! if i want to add sources to list of compilation i can rely on CMAKE_BUILD_TYPE. E.g if i want to add a source file only for release, i append it to list of source files only then. BUT: how can i do this for multi configuration like vs? So i want to add it to the sources, so that it appears in vs, but only want to compile it in release build? Is there an easy way to handle this? Thanks, Joerg Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From nilsgladitz at gmail.com Mon Jul 21 06:12:41 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 21 Jul 2014 12:12:41 +0200 Subject: [CMake] Source List Compilation Depending on Configuration In-Reply-To: References: Message-ID: <53CCE799.9010506@gmail.com> On 07/21/2014 11:46 AM, J?rg Kreuzberger wrote: > Hi! > > if i want to add sources to list of compilation i can rely on CMAKE_BUILD_TYPE. > E.g if i want to add a source file only for release, i append it to list of source files only then. > > BUT: how can i do this for multi configuration like vs? > So i want to add it to the sources, so that it appears in vs, but only want to compile it in release build? > > Is there an easy way to handle this? I don't think CMake supports configuration specific source files (I assume this might not be supported by all target build systems?). It should be possible to use the preprocessor (with configuration specific defines through the COMPILE_DEFINITIONS_ property) to work around it. E.g. either guard the source file's content itself with #ifdef CONFIG_SPECIFIC_DEFINE #endif or add a wrapper source file that does something like #ifdef CONFIG_SPECIFIC_DEFINE #include "config1.cpp" #endif or even #ifdef CONFIG_SPECIFIC_DEFINE #include "config1.cpp" #else #include "config2.cpp" #endif Nils From steveire at gmail.com Mon Jul 21 07:49:55 2014 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 21 Jul 2014 13:49:55 +0200 Subject: [CMake] Source List Compilation Depending on Configuration References: Message-ID: J?rg Kreuzberger wrote: > Is there an easy way to handle this? Try a nightly build: http://www.cmake.org/files/dev/?C=M;O=D And a generator expression: http://www.cmake.org/cmake/help/v3.0/manual/cmake-generator-expressions.7.html add_library(mylib bar.cpp $<$:foo.cpp> ) Testing the value of CMAKE_BUILD_TYPE is not the right/portable thing to do for exactly the reason you discovered. Thanks, Steve. From j.kreuzberger at procitec.de Mon Jul 21 08:29:41 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Mon, 21 Jul 2014 14:29:41 +0200 Subject: [CMake] =?utf-8?q?Source_List_Compilation_Depending_on_Configurat?= =?utf-8?q?ion?= Message-ID: Hm, following your suggestion i replace lines if( "${CMAKE_BUILD_TYPE}" STREQUAL "Release") add_definitions( -DNDEBUG ) endif() with set_directory_properties( PROPERTIES COMPILE_DEFINITIONS_RELEASE "${COMPILE_DEFINITIONS_RELEASE};NDEBUG" ) it didnt worked. ( inspecting e.q. flags.make and compilation ) if i set COMPILE_DEFINITIONS (without config) it worked. This is the point i stuct like above again. -----Urspr?ngliche Nachricht----- Von: Nils Gladitz Gesendet: Mo 21.07.2014 12:13 Betreff: Re: [CMake] Source List Compilation Depending on Configuration An: J?rg Kreuzberger ; cmake at cmake.org; > On 07/21/2014 11:46 AM, J?rg Kreuzberger wrote: > > Hi! > > > > if i want to add sources to list of compilation i can rely on > CMAKE_BUILD_TYPE. > > E.g if i want to add a source file only for release, i append it to list of > source files only then. > > > > BUT: how can i do this for multi configuration like vs? > > So i want to add it to the sources, so that it appears in vs, but only want > to compile it in release build? > > > > Is there an easy way to handle this? > > I don't think CMake supports configuration specific source files (I > assume this might not be supported by all target build systems?). > > It should be possible to use the preprocessor (with configuration > specific defines through the COMPILE_DEFINITIONS_ property) to > work around it. > > E.g. either guard the source file's content itself with > #ifdef CONFIG_SPECIFIC_DEFINE > > #endif > > or add a wrapper source file that does something like > > #ifdef CONFIG_SPECIFIC_DEFINE > #include "config1.cpp" > #endif > > or even > > #ifdef CONFIG_SPECIFIC_DEFINE > #include "config1.cpp" > #else > #include "config2.cpp" > #endif > > Nils > > > Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From nilsgladitz at gmail.com Mon Jul 21 08:43:45 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 21 Jul 2014 14:43:45 +0200 Subject: [CMake] Source List Compilation Depending on Configuration In-Reply-To: References: Message-ID: <53CD0B01.3080502@gmail.com> On 07/21/2014 02:29 PM, J?rg Kreuzberger wrote: > Hm, following your suggestion i replace lines > if( "${CMAKE_BUILD_TYPE}" STREQUAL "Release") > add_definitions( -DNDEBUG ) > endif() > > with > set_directory_properties( PROPERTIES COMPILE_DEFINITIONS_RELEASE "${COMPILE_DEFINITIONS_RELEASE};NDEBUG" ) ${COMPILE_DEFINITIONS_RELEASE} does not expand the property but you could use set_property() with the APPEND flag for that. NDEBUG is set by default for MinSizeRel, Release and RelWithDebInfo so you should have found it in the Release flags even without using the property (unless you override the default flags). With set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_RELEASE "FOOBAR") I get ./CMakeFiles/foo.dir/flags.make:CXX_DEFINES = -DFOOBAR When configuring a Release build with the Makefiles generator. Nils From j.kreuzberger at procitec.de Mon Jul 21 09:19:25 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Mon, 21 Jul 2014 15:19:25 +0200 Subject: [CMake] =?utf-8?q?Source_List_Compilation_Depending_on_Configurat?= =?utf-8?q?ion?= Message-ID: 1) i reset it with set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_INIT} ) set( CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE_INIT} ) set( CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_INIT} ) and then append my own custom compiler definitions. "-DNDEBUG" appears in flags.make, only in CXX_FLAGS, but not in CXX_DEFINES! and this is the issue i had with it: as long it appears only in CXX_FLAGS, it works for the code compilation but it does not work for qt4_wrapp_cpp (missing defines for moc). 2) the point i want to change global compiler properties is in my toplevel CMakeLists.txt, there i do include( cmake/GlobalCompilerSettings.cmake) 3) following your example, it does not work for COMPILE_DEFINITIONS_RELEASE, but does work for COMPILE_DEFINITIONS. (works means it appears in CXX_DEFINES) using release cmake 3.0.0 version. Platform is ubuntu linux (makefile generator) -----Urspr?ngliche Nachricht----- Von: Nils Gladitz Gesendet: Mo 21.07.2014 14:45 Betreff: Re: AW: [CMake] Source List Compilation Depending on Configuration An: J?rg Kreuzberger ; CC: cmake at cmake.org; > On 07/21/2014 02:29 PM, J?rg Kreuzberger wrote: > > Hm, following your suggestion i replace lines > > if( "${CMAKE_BUILD_TYPE}" STREQUAL "Release") > > add_definitions( -DNDEBUG ) > > endif() > > > > with > > set_directory_properties( PROPERTIES COMPILE_DEFINITIONS_RELEASE > "${COMPILE_DEFINITIONS_RELEASE};NDEBUG" ) > > ${COMPILE_DEFINITIONS_RELEASE} does not expand the property but you > could use set_property() with the APPEND flag for that. > > NDEBUG is set by default for MinSizeRel, Release and RelWithDebInfo so > you should have found it in the Release flags even without using the > property (unless you override the default flags). > > With > set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_RELEASE "FOOBAR") > > I get > ./CMakeFiles/foo.dir/flags.make:CXX_DEFINES = -DFOOBAR > When configuring a Release build with the Makefiles generator. > > Nils > > > > > > Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From nilsgladitz at gmail.com Mon Jul 21 09:35:24 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 21 Jul 2014 15:35:24 +0200 Subject: [CMake] Source List Compilation Depending on Configuration In-Reply-To: References: Message-ID: <53CD171C.5010605@gmail.com> On 07/21/2014 03:19 PM, J?rg Kreuzberger wrote: > 1) i reset it with > set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_INIT} ) > set( CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE_INIT} ) > set( CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_INIT} ) > > and then append my own custom compiler definitions. "-DNDEBUG" appears in flags.make, only in CXX_FLAGS, but not in CXX_DEFINES! > > and this is the issue i had with it: as long it appears only in CXX_FLAGS, it works for the code compilation but it does not work for qt4_wrapp_cpp (missing defines for moc). > > > 2) the point i want to change global compiler properties is in my toplevel CMakeLists.txt, > there i do > include( cmake/GlobalCompilerSettings.cmake) > > 3) following your example, it does not work for COMPILE_DEFINITIONS_RELEASE, but does work for COMPILE_DEFINITIONS. > (works means it appears in CXX_DEFINES) > using release cmake 3.0.0 version. Platform is ubuntu linux (makefile generator) I forgot that COMPILE_DEFINITIONS_ were deprecated. When you require 3.0 the property is ignored (Policy CMP0043). $<$:NDEBUG> in COMPILE_DEFINITIONS should work. Nils From j.kreuzberger at procitec.de Mon Jul 21 10:01:26 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Mon, 21 Jul 2014 16:01:26 +0200 Subject: [CMake] =?utf-8?q?Source_List_Compilation_Depending_on_Configurat?= =?utf-8?q?ion?= Message-ID: ok, then it worked. i got no warning on the policies, maybe i would have then detected it further. Can i "enable" them "globally"? -----Urspr?ngliche Nachricht----- Von: Nils Gladitz Gesendet: Mo 21.07.2014 15:36 Betreff: Re: AW: [CMake] Source List Compilation Depending on Configuration An: J?rg Kreuzberger ; CC: cmake at cmake.org; > On 07/21/2014 03:19 PM, J?rg Kreuzberger wrote: > > 1) i reset it with > > set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_INIT} ) > > set( CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE_INIT} ) > > set( CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_INIT} ) > > > > and then append my own custom compiler definitions. "-DNDEBUG" appears in > flags.make, only in CXX_FLAGS, but not in CXX_DEFINES! > > > > and this is the issue i had with it: as long it appears only in CXX_FLAGS, it > works for the code compilation but it does not work for qt4_wrapp_cpp (missing > defines for moc). > > > > > > 2) the point i want to change global compiler properties is in my toplevel > CMakeLists.txt, > > there i do > > include( cmake/GlobalCompilerSettings.cmake) > > > > 3) following your example, it does not work for COMPILE_DEFINITIONS_RELEASE, > but does work for COMPILE_DEFINITIONS. > > (works means it appears in CXX_DEFINES) > > using release cmake 3.0.0 version. Platform is ubuntu linux (makefile > generator) > > I forgot that COMPILE_DEFINITIONS_ were deprecated. > When you require 3.0 the property is ignored (Policy CMP0043). > > $<$:NDEBUG> in COMPILE_DEFINITIONS should work. > > Nils > > > Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From nilsgladitz at gmail.com Mon Jul 21 10:16:18 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 21 Jul 2014 16:16:18 +0200 Subject: [CMake] Source List Compilation Depending on Configuration In-Reply-To: References: Message-ID: <53CD20B2.2020907@gmail.com> On 07/21/2014 04:01 PM, J?rg Kreuzberger wrote: > ok, then it worked. > i got no warning on the policies, maybe i would have then detected it further. Can i "enable" them "globally"? With cmake_minimum_required(VERSION 3.0) the new behaviour is used for the policy which is to ignore the property without warning. I think to get a warning you would have had to require an older version while using CMake 3.0 which I guess only makes this detectable when migrating an existing project from an older version after already having upgraded to 3.0. Nils From j.kreuzberger at procitec.de Mon Jul 21 11:34:00 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Mon, 21 Jul 2014 17:34:00 +0200 Subject: [CMake] =?utf-8?q?COMPILE=5FDEFINITONS_Generator_Expressions_and_?= =?utf-8?q?MOC?= Message-ID: Hi! After much help from Nils from the list i am able to use GENERATOR expressions in my compile definitions. But i end up in the moc'ing step for my qt4 files. The cmake macros QT4_WRAP_CPP generates a moc command file called moc_...cxx_parameters, that contains the "generator expression" values -D$<$:NDEBUG> at this point cmake should have already resolved them to -DNDEBUG if i build a release? or then are the generator expressions for moc resolved? Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From glenn.coombs at gmail.com Mon Jul 21 13:05:58 2014 From: glenn.coombs at gmail.com (Glenn Coombs) Date: Mon, 21 Jul 2014 18:05:58 +0100 Subject: [CMake] How to get a list of all the static libraries that a target will link against ? In-Reply-To: References: Message-ID: The problem is that I need to add both -whole-archive and -no-whole-archive options. And I need to control exactly where they occur so that only my libraries occur inside the whole archive section. I'd be happy to be proven wrong but I don't think setting CMAKE_EXE_LINKER_FLAGS will give me that level of control. -- Glenn On 21 July 2014 09:57, Angeliki Chrysochou wrote: > Hi Glenn, > > Adding linker flags exactly in target_link_libraries is not a very good > practice in my opinion. To add specific linker flags to an executable, you > can use the variable CMAKE_EXE_LINKER_FLAGS, which you can edit before > calling add_executable. You could set this variable accordingly in your > static and dynamic CMakeLists.txt to include the flags you wish in the > following way: > > set(CMAKE_EXE_LINKER_FLAGS "-whole-archive") > > If you set this variable to include more custom linker flags which you > want to preserve across libraries, then you should set it in the following > way to preserve its old value: > > set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -whole-archive") > > If you want to edit linker flags for a shared library or a module target > you can use these cmake variables (set them before add_library): > > CMAKE_SHARED_LINKER_FLAGS > CMAKE_MODULE_LINKER_FLAGS > > Be aware that variables have CMakeLists.txt file scope, so if you set > different values in one CMakeLists.txt then they might get overwritten or > appended (depending on the way you edit the variable). > > All the best, > Angeliki > > > > > > On Sat, Jul 19, 2014 at 2:39 PM, Glenn Coombs > wrote: > >> Don't all shout at once :-) I'm guessing there are no easy solutions >> then... >> >> -- >> Glenn >> >> >> On 28 June 2014 14:33, Glenn Coombs wrote: >> >>> I have a project which compiles and links into both a stand alone >>> executable and a dynamic shared library. The library and the executable >>> link against the same project libraries but have different object files >>> containing their entry points: main.o for the executable and dll_main.o for >>> the library. My project heirarchy looks like this (simplified a bit for >>> brevity): >>> >>> CMakeLists.txt >>> mtx_source/CMakeLists.txt >>> mtx_wrapper/CMakeLists.txt >>> testbench/CMakeLists.txt >>> >>> The top level CMakeLists.txt calls add_subdirectory on the various >>> project specific library folders which each build a static library. The >>> testbench folder is the one that builds both the executable and the dynamic >>> library. When building the dynamic library I need to use the linker >>> options -whole-archive and -no-whole-archive to force my static project >>> libraries to be included into the dynamic library. The problem is how to >>> insert the -whole-archive and -no-whole-archive options so that they select >>> the correct set of libraries. Currently in the testbench CMakeLists.txt >>> file I have these lines: >>> >>> set(libs >>> VLC >>> mvea >>> ${SYSTEMC_SUPPORT_LIBRARIES} >>> ${DEVIFSLAVE_LIBRARIES} >>> ${SYSTEMC_LIBRARIES} >>> ${SIM_UTILS_LIBRARIES} >>> ${HWDEBUG_LIBRARIES} >>> ) >>> >>> if (NOT STUB_OUT_MTX) >>> list(APPEND libs mtx_wrapper) >>> endif() >>> >>> set(libs_dll ${libs} transif_slave) >>> >>> if (UNIX) >>> list(INSERT libs_dll 0 -Wl,-whole-archive) >>> list(APPEND libs_dll -Wl,-no-whole-archive) >>> endif() >>> >>> add_library ( csim_dll SHARED ${sources_dll} ${headers_dll} ) >>> add_executable( testbench ${sources} ${headers} ) >>> >>> target_link_libraries(csim_dll ${libs_dll} ${PTHREADS_LIBRARIES} ) >>> target_link_libraries(testbench ${libs} ${PTHREADS_LIBRARIES} ) >>> >>> which produces the following link line: >>> >>> /usr/bin/g++-4.7 -fPIC -m32 -m32 -m32 -fPIC -m32 -O3 -O3 -DHIDEBUG >>> -Wl,-Bsymbolic >>> -shared -Wl,-soname,libtopazhp.so >>> -o libtopazhp.so >>> CMakeFiles/csim_dll.dir/dll_main.cpp.o >>> CMakeFiles/csim_dll.dir/main_common.cpp.o >>> -lm -lrt -lm -lrt >>> -Wl,-whole-archive >>> ../mvea/VLC/libVLC.a >>> ../mvea/libmvea.a >>> ../systemCSupport/libsystemc_support.a >>> ../devif_slave/libDevifSlave.a >>> ../systemC/libsystemc.a >>> ../sim_utils/libsim_utils.a >>> ../hwdebug/libhwDebug.a >>> ../mtx_wrapper/libmtx_wrapper.a >>> ../transif/libtransif_slave.a >>> -Wl,-no-whole-archive >>> -lpthread -lz >>> ../systemC/libpthreads_dummy.a >>> ../external_mtx/src/external_mtx-build/metag/libmetag.a >>> ../external_mtx/src/external_mtx-build/metagcopro/libmetagcopro.a >>> ../external_mtx/src/external_mtx-build/metac/vmetastub/libvmetastub.a >>> ../external_mtx/src/external_mtx-build/metac/insim/libinsimfpu.a >>> ../external_mtx/src/external_mtx-build/mtx/insim-mtxg/libinsim-mtxg.a >>> ../external_mtx/src/external_mtx-build/mtx/libmtxc.a >>> -ldl -lm -lrt -lm -lrt >>> >>> The problem is that the 6 external_mtx libraries should have been >>> included inside the -whole-archive section. These libraries are specified >>> in the mtx_wrapper folder with a target_link_libraries(mtx_wrapper >>> ${METASIM_LIBRARIES}) command. I have managed to wrap the direct library >>> dependencies inside the -whole-archive but I need to ensure that any >>> sub-dependencies are included as well (and any dependencies they might have >>> recursively). Any system dynamic libaries (-ldl -lm -lrt etc.) must appear >>> after the -no-whole-archive option otherwise the link fails. The >>> mtx_wrapper library can be built in two ways and only one of them will add >>> the extra METASIM libraries as a dependency, the other way fakes that code >>> internally. Adding the METASIM libraries via target_link_libraries() >>> inside the mtx_wrapper CMakeLists.txt correctly handles that dependency >>> when linking the standalone executable but is not working for linking the >>> dynamic library. >>> >>> Is there an easy way to get cmake to handle all this ? Is there a way >>> to get a list of all the static libraries (libXXX.a) that will be included >>> on the link line for a target ? >>> >>> -- >>> Glenn >>> >>> >> >> -- >> >> 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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrysalisx at gmail.com Mon Jul 21 14:19:12 2014 From: chrysalisx at gmail.com (Walter Gray) Date: Mon, 21 Jul 2014 11:19:12 -0700 Subject: [CMake] find_package and INTERFACE targets in 3.0 In-Reply-To: <66e3c75e-0340-4aac-81c8-137d3fa4e5d6@email.android.com> References: <53C88DBC.5040208@gmail.com> <53C911C2.7000401@gmail.com> <53C9E249.4000203@gmail.com> <66e3c75e-0340-4aac-81c8-137d3fa4e5d6@email.android.com> Message-ID: <53CD59A0.6080307@gmail.com> Hendrick! That's exactly what I'm trying to do. Do you have an example of the declaration of the dll import target setup you could share? That would be immensely helpful. Thanks Walter On 7/19/2014 4:01 AM, Hendrik Sattler wrote: > Hi, > > for DLLs, the .lib part has it's own property IMPORTED_IMPLIB. > > This is already the case for older versions of CMake but at least the Qt4 find module makes no use of it. > > In our own project, we use global imported targets with dll and import lib set (and other properties like includes) and use it on Windows to copy the dlls to the target location with a generator expression and post-build. > > I guess on Windows, BundleUtilities could also be simplified if that was done consistently. > > On all platforms it's rather complicated to find out if a .lib/.so is static or shared. IMHO this should be solved by a function that module writers can use, either on a CMake module or integrated. > So currently, you can either guess or use UNKNOWN. > > Regards, > > HS > > > On 19. Juli 2014 05:13:13 MESZ, Walter Gray wrote: >> Thanks Nils! >> The examples in the git repo are particularly helpful. It seems that >> in >> all of the examples, the library type is being set to UNKNOWN. Is >> there >> a reason for this? It seems that STATIC would be more suitable for most >> >> of those, though the wording in the docs for IMPORTED_LOCATION [1] >> makes >> it seem like maybe for STATIC's it's just the directory and not the >> actual .lib file. I notice cmake doesn't seem to have any way to track >> >> DLLs or dylibs. Is there some recommended way of dealing with >> importing >> shared libraries? The QT4 module was my best bet but it doesn't seem to >> >> touch the .dlls at all. I tried writing some of my own for shared >> libraries like SDL2, I noticed that add_libraries(SHARED IMPORTED) does >> >> not seem to work as I expected. An example for Windows(from memory, >> I'll update with the real run outputs on Monday when I'm back at the >> office): >> >> add_library(SDL2::SDL2 SHARED IMPORTED GLOBAL) >> set_target_properties(SDL2::SDL2 PROPERTIES >> INTERFACE_LINK_LIBRARIES >> "${SDL_ROOT_DIR}/lib/SDL2main.lib";"${SDL_ROOT_DIR}/lib/SDL2.lib" >> INTERFACE_INCLUDE_DIRECTORIES "${SDL_ROOT_DIR}/include" >> IMPORTED_LOCATION "${SDL_ROOT_DIR}/lib/SDL2.dll" >> ) >> >> According to the docs for IMPORTED_LOCATION [1], for shared libraries >> on >> DLL platforms, it should point to the DLL part of the library. When I >> add the SDL2::SDL2 to my main target, it compiles & generates but when >> I >> run the resulting visual studio project it results in link errors with >> (and this is the part I'm not sure about - again, more concrete detail >> on Monday) SDL2-NOTFOUND.o and SDL2::SDL2 >> I suspect I'm using INTERFACE_LINK_LIBRARIES in not quite the right >> way, >> but those *are* the public .lib files. When I get back on Monday I'll >> try a few different approaches based on what I saw in some of the >> modules, namely making sub-libraries with UNKNOWN and IMPORTED_LOCATION >> >> set for all the actual .lib files, and just directly setting >> LINK_LIBRARIES >> >> [1] >> http://www.cmake.org/cmake/help/git-master/prop_tgt/IMPORTED_LOCATION.html >> >> On 7/18/2014 5:23 AM, Nils Gladitz wrote: >>> On 07/18/2014 05:00 AM, Walter Gray wrote: >>>> Hi list! >>>> >>>> I'm a big fan of the new INTERFACE targets & target usage >> requirements, >>>> but none of the provided Find.cmake files seem to take >>>> advantage of the new paradigm. Checking the wiki, the old >>>> Find.cmake seem to be deprecated, with most of the >> information >>>> on authoring new packages assuming that you are the developer of the >>>> module, not the consumer. What is the recommended way to deal with >>>> packages that don't provide these config files? I'll happily write >> my >>>> own Find.cmake files, however that approach seems >> deprecated >>>> and I haven't found any good examples of find modules that define >> IMPORT >>>> or INTERFACE targets instead of the older method of setting a bunch >> of >>>> _xxx variables. >>> There are a few modules that use imported targets in 3.0 and a few >>> more were updated in master. >>> >>> I see e.g. FindGLUT, FindQt4, FindGTK2, FindZLIB, FindOpenGL and >>> FindGLEW making use of imported targets in master[1]. >>> >>> [2] documents how to write find modules and includes an example with >>> IMPORTED targets. >>> >>> Nils >>> >>> [1] >>> >> http://cmake.org/gitweb?p=cmake.git;a=tree;f=Modules;h=5d17682cb231f119b677ce67d804852d3be6d46f;hb=HEAD >>> [2] >>> >> http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules From angeliki.chrysochou at gmail.com Mon Jul 21 14:24:27 2014 From: angeliki.chrysochou at gmail.com (Angeliki Chrysochou) Date: Mon, 21 Jul 2014 20:24:27 +0200 Subject: [CMake] How to get a list of all the static libraries that a target will link against ? In-Reply-To: References: Message-ID: Well try it and see if it works. If you set this variable in a specific CMakeLists file, it will affect the specific add_library (or add_executable) that is in that CMakeLists file. With this way you can control which libraries/executables will be linked with these flags, and this is the level of control you have. Cheers! Angeliki On Mon, Jul 21, 2014 at 7:05 PM, Glenn Coombs wrote: > The problem is that I need to add both -whole-archive and > -no-whole-archive options. And I need to control exactly where they occur > so that only my libraries occur inside the whole archive section. I'd be > happy to be proven wrong but I don't think setting CMAKE_EXE_LINKER_FLAGS > will give me that level of control. > > -- > Glenn > > > On 21 July 2014 09:57, Angeliki Chrysochou > wrote: > >> Hi Glenn, >> >> Adding linker flags exactly in target_link_libraries is not a very good >> practice in my opinion. To add specific linker flags to an executable, you >> can use the variable CMAKE_EXE_LINKER_FLAGS, which you can edit before >> calling add_executable. You could set this variable accordingly in your >> static and dynamic CMakeLists.txt to include the flags you wish in the >> following way: >> >> set(CMAKE_EXE_LINKER_FLAGS "-whole-archive") >> >> If you set this variable to include more custom linker flags which you >> want to preserve across libraries, then you should set it in the following >> way to preserve its old value: >> >> set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -whole-archive") >> >> If you want to edit linker flags for a shared library or a module target >> you can use these cmake variables (set them before add_library): >> >> CMAKE_SHARED_LINKER_FLAGS >> CMAKE_MODULE_LINKER_FLAGS >> >> Be aware that variables have CMakeLists.txt file scope, so if you set >> different values in one CMakeLists.txt then they might get overwritten or >> appended (depending on the way you edit the variable). >> >> All the best, >> Angeliki >> >> >> >> >> >> On Sat, Jul 19, 2014 at 2:39 PM, Glenn Coombs >> wrote: >> >>> Don't all shout at once :-) I'm guessing there are no easy solutions >>> then... >>> >>> -- >>> Glenn >>> >>> >>> On 28 June 2014 14:33, Glenn Coombs wrote: >>> >>>> I have a project which compiles and links into both a stand alone >>>> executable and a dynamic shared library. The library and the executable >>>> link against the same project libraries but have different object files >>>> containing their entry points: main.o for the executable and dll_main.o for >>>> the library. My project heirarchy looks like this (simplified a bit for >>>> brevity): >>>> >>>> CMakeLists.txt >>>> mtx_source/CMakeLists.txt >>>> mtx_wrapper/CMakeLists.txt >>>> testbench/CMakeLists.txt >>>> >>>> The top level CMakeLists.txt calls add_subdirectory on the various >>>> project specific library folders which each build a static library. The >>>> testbench folder is the one that builds both the executable and the dynamic >>>> library. When building the dynamic library I need to use the linker >>>> options -whole-archive and -no-whole-archive to force my static project >>>> libraries to be included into the dynamic library. The problem is how to >>>> insert the -whole-archive and -no-whole-archive options so that they select >>>> the correct set of libraries. Currently in the testbench CMakeLists.txt >>>> file I have these lines: >>>> >>>> set(libs >>>> VLC >>>> mvea >>>> ${SYSTEMC_SUPPORT_LIBRARIES} >>>> ${DEVIFSLAVE_LIBRARIES} >>>> ${SYSTEMC_LIBRARIES} >>>> ${SIM_UTILS_LIBRARIES} >>>> ${HWDEBUG_LIBRARIES} >>>> ) >>>> >>>> if (NOT STUB_OUT_MTX) >>>> list(APPEND libs mtx_wrapper) >>>> endif() >>>> >>>> set(libs_dll ${libs} transif_slave) >>>> >>>> if (UNIX) >>>> list(INSERT libs_dll 0 -Wl,-whole-archive) >>>> list(APPEND libs_dll -Wl,-no-whole-archive) >>>> endif() >>>> >>>> add_library ( csim_dll SHARED ${sources_dll} ${headers_dll} ) >>>> add_executable( testbench ${sources} ${headers} ) >>>> >>>> target_link_libraries(csim_dll ${libs_dll} ${PTHREADS_LIBRARIES} ) >>>> target_link_libraries(testbench ${libs} ${PTHREADS_LIBRARIES} ) >>>> >>>> which produces the following link line: >>>> >>>> /usr/bin/g++-4.7 -fPIC -m32 -m32 -m32 -fPIC -m32 -O3 -O3 -DHIDEBUG >>>> -Wl,-Bsymbolic >>>> -shared -Wl,-soname,libtopazhp.so >>>> -o libtopazhp.so >>>> CMakeFiles/csim_dll.dir/dll_main.cpp.o >>>> CMakeFiles/csim_dll.dir/main_common.cpp.o >>>> -lm -lrt -lm -lrt >>>> -Wl,-whole-archive >>>> ../mvea/VLC/libVLC.a >>>> ../mvea/libmvea.a >>>> ../systemCSupport/libsystemc_support.a >>>> ../devif_slave/libDevifSlave.a >>>> ../systemC/libsystemc.a >>>> ../sim_utils/libsim_utils.a >>>> ../hwdebug/libhwDebug.a >>>> ../mtx_wrapper/libmtx_wrapper.a >>>> ../transif/libtransif_slave.a >>>> -Wl,-no-whole-archive >>>> -lpthread -lz >>>> ../systemC/libpthreads_dummy.a >>>> ../external_mtx/src/external_mtx-build/metag/libmetag.a >>>> ../external_mtx/src/external_mtx-build/metagcopro/libmetagcopro.a >>>> ../external_mtx/src/external_mtx-build/metac/vmetastub/libvmetastub.a >>>> ../external_mtx/src/external_mtx-build/metac/insim/libinsimfpu.a >>>> ../external_mtx/src/external_mtx-build/mtx/insim-mtxg/libinsim-mtxg.a >>>> ../external_mtx/src/external_mtx-build/mtx/libmtxc.a >>>> -ldl -lm -lrt -lm -lrt >>>> >>>> The problem is that the 6 external_mtx libraries should have been >>>> included inside the -whole-archive section. These libraries are specified >>>> in the mtx_wrapper folder with a target_link_libraries(mtx_wrapper >>>> ${METASIM_LIBRARIES}) command. I have managed to wrap the direct library >>>> dependencies inside the -whole-archive but I need to ensure that any >>>> sub-dependencies are included as well (and any dependencies they might have >>>> recursively). Any system dynamic libaries (-ldl -lm -lrt etc.) must appear >>>> after the -no-whole-archive option otherwise the link fails. The >>>> mtx_wrapper library can be built in two ways and only one of them will add >>>> the extra METASIM libraries as a dependency, the other way fakes that code >>>> internally. Adding the METASIM libraries via target_link_libraries() >>>> inside the mtx_wrapper CMakeLists.txt correctly handles that dependency >>>> when linking the standalone executable but is not working for linking the >>>> dynamic library. >>>> >>>> Is there an easy way to get cmake to handle all this ? Is there a way >>>> to get a list of all the static libraries (libXXX.a) that will be included >>>> on the link line for a target ? >>>> >>>> -- >>>> Glenn >>>> >>>> >>> >>> -- >>> >>> 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 >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Mon Jul 21 15:07:33 2014 From: totte at dunescientific.com (Totte Karlsson) Date: Mon, 21 Jul 2014 12:07:33 -0700 (PDT) Subject: [CMake] My Documents folder Message-ID: <1405969653253-7587946.post@n2.nabble.com> Hi, Is it possible to (easily) install a file, say Readme.txt, into a users "My Documents" folder, using CMake/CPack? I can't find information about such.. :( -tk -- View this message in context: http://cmake.3232098.n2.nabble.com/My-Documents-folder-tp7587946.html Sent from the CMake mailing list archive at Nabble.com. From a.neundorf-work at gmx.net Mon Jul 21 16:01:38 2014 From: a.neundorf-work at gmx.net (Alexander Neundorf) Date: Mon, 21 Jul 2014 22:01:38 +0200 Subject: [CMake] how to add new source files in already build cmake project from inside eclipse cdt? In-Reply-To: References: Message-ID: <4104133.yftVsBSqLm@tuxedo.neundorf.net> On Monday, July 21, 2014 08:40:11 Payal Prajapati wrote: > hello All, > > Two things to say: > > 1)I read all conversion regarding this topic..but can any one explain me > the whole procedure? > 2)I am working on orfeo toolbox which i imported in eclipse.It works fine > upto make target->build step. but when i do make target->build->install and > then finish it gives me an error(highlighted with red mark on > projectname). can any one explain which steps are required for building > project after importing it in eclipse? > > Any help would be appreciable. you just have to add it to your CMakeLists.txt. Upon the next build, cmake will run again and regenerate the makefiles and Eclispe project files. You may need to manually refresh the project in Eclipse. Alex From steveire at gmail.com Mon Jul 21 16:41:32 2014 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 21 Jul 2014 22:41:32 +0200 Subject: [CMake] Considering contributing a FindPyQt.cmake module References: <2407202.0vgVv7Fb1e@scott-latitude-e6320> Message-ID: Scott Kitterman wrote: > Given the above, I thought it would make sense to provide a new > FindPyQt.cmake that would replace (and be backward compatible with) > FindPyQt4.cmake that would work for both the new and old PyQt4 configure > and with PyQt5 and have it be actually in CMake so that there would not be > multiple copies running around. Did you consider generating config-file packages containing IMPORTED targets and shipping them with PyQt5 instead? http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html That removes any need for you to maintain anything in the CMake tree. Qt5 generates such files with qmake, and LLVM does similar with its Makefile buildsystem. Thanks, Steve. From jrosensw at gmail.com Mon Jul 21 16:51:53 2014 From: jrosensw at gmail.com (Joseph Rosensweig) Date: Mon, 21 Jul 2014 13:51:53 -0700 Subject: [CMake] CMAKE changing Visual Studio Settings In-Reply-To: <53CCB7EB.1040501@gmail.com> References: <53CCB7EB.1040501@gmail.com> Message-ID: On Sun, Jul 20, 2014 at 11:49 PM, Nils Gladitz wrote: > On 07/21/2014 08:05 AM, Joseph Rosensweig wrote: > >> Visual Studio Settings >> >> Every time CMAKE generates a project it will be a fresh solution and >> will not maintain any of the settings you applied to the Visual Studio >> project. I know that many things such as CMAKE_CXX_FLAGS, etc can change >> the properties. But what if I want to change settings such as "Suppress >> Startup Banner", "Environment", Enabling Microsoft Symbol Server, >> Enabling Native Code Debugging. How do I force CMAKE to set the options >> I want for fields like these? >> >> > Some options are stored in the project files and can be derived from > compiler options (e.g. Suppress Startup Banner is derived from /NOLOGO). > These would get overwritten on generation. > So CMAKE can't control the options int he *.user files I guess :-\? Would a potential workaround be to find a command line tool that can edit these and run it as a post-build script? > > Other options (like e.g. the Debugging Environment) are stored in .user > files which are neither generated nor overwritten by CMake. > > > >> Combining Debug/Release/Etc into one solution >> >> It seems that with CMAKE you have to do separate generations for >> Debug/Release/etc. >> > > CMake has multi-configuration and single-configuration generators. > > The Visual Studio generators are multi-configuration which means they > generate a single solution which contains all configurations (per default > Debug, Release, RelWithDebInfo and MinSizeRel). I see that it makes these profiles in my Visual Studio project. But in my CMAKE I have places where I do things like if(CMAKE_BUILD_TYPE STREQUAL Debug) then do this else do that. i.e. my CXX Flags will change based on the CMAKE_BUILD_TYPE. However I don't see these getting reflected in my Visual Studio configurations. What am I missing? > > > Nils > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Mon Jul 21 16:54:45 2014 From: drescherjm at gmail.com (John Drescher) Date: Mon, 21 Jul 2014 16:54:45 -0400 Subject: [CMake] CMAKE changing Visual Studio Settings In-Reply-To: References: <53CCB7EB.1040501@gmail.com> Message-ID: > So CMAKE can't control the options int he *.user files I guess :-\? Would a > potential workaround be to find a command line tool that can edit these and > run it as a post-build script? CMake gives you the functionality needed to edit these via your own script. I mean reading and writing files replacing text. John From nilsgladitz at gmail.com Mon Jul 21 17:17:09 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 21 Jul 2014 23:17:09 +0200 Subject: [CMake] My Documents folder In-Reply-To: <1405969653253-7587946.post@n2.nabble.com> References: <1405969653253-7587946.post@n2.nabble.com> Message-ID: <53CD8355.3080700@gmail.com> On 07/21/2014 09:07 PM, Totte Karlsson wrote: > Hi, > > Is it possible to (easily) install a file, say Readme.txt, into a users "My > Documents" folder, using CMake/CPack? > > I can't find information about such.. :( I'd consider having the installed application set these up when run since specifically for system wide installations: - the user that performs the install may not be the user that runs the application - there may be multiple users - the potential user(s) are created after the installation Nils From totte at dunescientific.com Mon Jul 21 17:25:46 2014 From: totte at dunescientific.com (Totte Karlsson) Date: Mon, 21 Jul 2014 14:25:46 -0700 (PDT) Subject: [CMake] My Documents folder In-Reply-To: <53CD8355.3080700@gmail.com> References: <1405969653253-7587946.post@n2.nabble.com> <53CD8355.3080700@gmail.com> Message-ID: <1405977946583-7587952.post@n2.nabble.com> Hi Nils, Thanks for your reply. The installed "application" is a python module and it should not ever perform any file install/copy operations. It is an absolute requirement that the installer are able to install files into the users MyDoc folder (or even other common "system folders", sucha as "AllUsers" etc.). I cannot find out how to do this with CPack. Seem I will have to create a nsis script to do so? Seem quite complicated :( tk -- View this message in context: http://cmake.3232098.n2.nabble.com/My-Documents-folder-tp7587946p7587952.html Sent from the CMake mailing list archive at Nabble.com. From david at zemon.name Mon Jul 21 19:32:19 2014 From: david at zemon.name (David Zemon) Date: Mon, 21 Jul 2014 18:32:19 -0500 Subject: [CMake] How to set "Look for CMakeDetermine.cmake here" Message-ID: <53CDA303.1000608@zemon.name> I am attempting to build an easy-to-use build system for an embedded system. This chip uses .dat, .spin, .cogc, and .ecogc files along with .S, .c, and .cpp. I've added the necessary language files to my project path which will enable cogc (I'll get to the other file types eventually) and they work great, but it requires manually linking or copying the files out of the project directory and into CMake's installation path. Is there some way to tell CMake that it should look for these files in a custom path? Thanks, David From sklist at kitterman.com Mon Jul 21 20:37:23 2014 From: sklist at kitterman.com (Scott Kitterman) Date: Mon, 21 Jul 2014 20:37:23 -0400 Subject: [CMake] Considering contributing a FindPyQt.cmake module In-Reply-To: References: <2407202.0vgVv7Fb1e@scott-latitude-e6320> Message-ID: <3470322.Tmg0t4GyNq@scott-latitude-e6320> On Monday, July 21, 2014 22:41:32 Stephen Kelly wrote: > Scott Kitterman wrote: > > Given the above, I thought it would make sense to provide a new > > FindPyQt.cmake that would replace (and be backward compatible with) > > FindPyQt4.cmake that would work for both the new and old PyQt4 configure > > and with PyQt5 and have it be actually in CMake so that there would not be > > multiple copies running around. > > Did you consider generating config-file packages containing IMPORTED targets > and shipping them with PyQt5 instead? > > http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html > > That removes any need for you to maintain anything in the CMake tree. > > Qt5 generates such files with qmake, and LLVM does similar with its Makefile > buildsystem. I had not considered that. I'm not upstream for PyQt, so I can't say for sure, but I can ask if patches for that would be accepted. Thanks, Scott K From a.neundorf-work at gmx.net Tue Jul 22 15:56:40 2014 From: a.neundorf-work at gmx.net (Alexander Neundorf) Date: Tue, 22 Jul 2014 21:56:40 +0200 Subject: [CMake] how to add new source files in already build cmake project from inside eclipse cdt? In-Reply-To: References: <4104133.yftVsBSqLm@tuxedo.neundorf.net> Message-ID: <3879802.0xB0gaJiJ9@tuxedo.neundorf.net> On Tuesday, July 22, 2014 04:03:44 Payal Prajapati wrote: > Hello, > Thank you for your reply. > Is there any way to build only my added file? because it takes much > time to rebuild the whole project even for a minor change in source > file? when you simply build (all, make all), only those file should be rebuilt which have actually changed. If everything is rebuilt everytime, something is wrong. Alex From eclark at ara.com Tue Jul 22 17:12:46 2014 From: eclark at ara.com (Eric Clark) Date: Tue, 22 Jul 2014 21:12:46 +0000 Subject: [CMake] CMAKE changing Visual Studio Settings In-Reply-To: References: <53CCB7EB.1040501@gmail.com> Message-ID: > -----Original Message----- > From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of John > Drescher > Sent: Monday, July 21, 2014 3:55 PM > To: Joseph Rosensweig > Cc: CMake ML > Subject: Re: [CMake] CMAKE changing Visual Studio Settings > > > So CMAKE can't control the options int he *.user files I guess :-\? > > Would a potential workaround be to find a command line tool that can > > edit these and run it as a post-build script? > > CMake gives you the functionality needed to edit these via your own script. I > mean reading and writing files replacing text. In our CMake system, we wanted to be able to set the program to execute when "Start Debugging" was clicked in Visual Studio. This option is stored in the *.user file and thus you cannot change it via CMake directly. However, you CAN build a template of the *.user file and put some CMake variables inside of it. Then, when you build the project files with CMake, you can use the configure_file command to create the user's *.user file from the template and the values you have for each variable in the template. This option works beautifully and it is very easy to setup. Hope this helps... Eric > > John > -- > > 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 From chrysalisx at gmail.com Wed Jul 23 00:36:53 2014 From: chrysalisx at gmail.com (Walter Gray) Date: Tue, 22 Jul 2014 21:36:53 -0700 Subject: [CMake] An interface targets/usage requirements example with automatic shared library handling! Take a look! Message-ID: <53CF3BE5.1000807@gmail.com> Hey all, You may have seen my earlier posts, "find_package" and INTERFACE targets in 3.0" and "Target usage requirements for shared libraries". I've also seen Michael Darling's post "Package found - passing _INCLUDE_DIRS to include_directories() and _LIBRARIES to target_link_libraries()", so I'm assuming there's a fair bit of interest in this topic. After wrestling with it for about a week, I've got a solution that I think works very well, and demonstrates how to properly make use of INTERFACE and IMPORTED targets with the new Usage Requirements Paradigm. I've made a couple of helper functions for generating interface targets from the information exported by Find modules, as well as a couple of example find modules demonstrating their use with pure header, static, and shared libraries, and even one which uses a master INTERFACE target to control link library ordering. I've put the files up on github for you guys to take a look at. I would really appreciate any feedback you may have on how I could make it any clearer or further reduce code duplication between the find modules. https://github.com/wal-rus/cmake-modules From glenn.coombs at gmail.com Wed Jul 23 05:10:39 2014 From: glenn.coombs at gmail.com (Glenn Coombs) Date: Wed, 23 Jul 2014 10:10:39 +0100 Subject: [CMake] How to get a list of all the static libraries that a target will link against ? In-Reply-To: References: Message-ID: I think I have found a way to work round this. Instead of trying to get a list of all the static libraries that a target will link against I will modify the various libraries so that they add their library dependencies like this: target_link_libraries(mtx_wrapper PUBLIC $<$,SHARED_LIBRARY>:-Wl,-whole-archive> ${MTXSIM_LIBRARIES} $<$,SHARED_LIBRARY>:-Wl,-no-whole-archive> $<$,GNU>:dl> $<$,Clang>:dl> This should mean that all the dependent libraries get wrapped inside -whole-archive/-no-whole-archive pairs when the target being linked is a shared library. And if the target being linked is an executable then the -whole-archive/-no-whole-archive options should automatically be omitted. Initial tests indicate that this approach will work but I have encountered a bug which slightly complicates the issue: http://www.cmake.org/Bug/view.php?id=15034 Essentially, the -no-whole-archive option sometimes gets omitted unless prefixed by some other command. -- Glenn On 21 July 2014 19:24, Angeliki Chrysochou wrote: > Well try it and see if it works. If you set this variable in a specific > CMakeLists file, it will affect the specific add_library (or > add_executable) that is in that CMakeLists file. With this way you can > control which libraries/executables will be linked with these flags, and > this is the level of control you have. > > Cheers! > Angeliki > > > > On Mon, Jul 21, 2014 at 7:05 PM, Glenn Coombs > wrote: > >> The problem is that I need to add both -whole-archive and >> -no-whole-archive options. And I need to control exactly where they occur >> so that only my libraries occur inside the whole archive section. I'd be >> happy to be proven wrong but I don't think setting CMAKE_EXE_LINKER_FLAGS >> will give me that level of control. >> >> -- >> Glenn >> >> >> On 21 July 2014 09:57, Angeliki Chrysochou > > wrote: >> >>> Hi Glenn, >>> >>> Adding linker flags exactly in target_link_libraries is not a very good >>> practice in my opinion. To add specific linker flags to an executable, you >>> can use the variable CMAKE_EXE_LINKER_FLAGS, which you can edit before >>> calling add_executable. You could set this variable accordingly in your >>> static and dynamic CMakeLists.txt to include the flags you wish in the >>> following way: >>> >>> set(CMAKE_EXE_LINKER_FLAGS "-whole-archive") >>> >>> If you set this variable to include more custom linker flags which you >>> want to preserve across libraries, then you should set it in the following >>> way to preserve its old value: >>> >>> set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -whole-archive") >>> >>> If you want to edit linker flags for a shared library or a module target >>> you can use these cmake variables (set them before add_library): >>> >>> CMAKE_SHARED_LINKER_FLAGS >>> CMAKE_MODULE_LINKER_FLAGS >>> >>> Be aware that variables have CMakeLists.txt file scope, so if you set >>> different values in one CMakeLists.txt then they might get overwritten or >>> appended (depending on the way you edit the variable). >>> >>> All the best, >>> Angeliki >>> >>> >>> >>> >>> >>> On Sat, Jul 19, 2014 at 2:39 PM, Glenn Coombs >>> wrote: >>> >>>> Don't all shout at once :-) I'm guessing there are no easy solutions >>>> then... >>>> >>>> -- >>>> Glenn >>>> >>>> >>>> On 28 June 2014 14:33, Glenn Coombs wrote: >>>> >>>>> I have a project which compiles and links into both a stand alone >>>>> executable and a dynamic shared library. The library and the executable >>>>> link against the same project libraries but have different object files >>>>> containing their entry points: main.o for the executable and dll_main.o for >>>>> the library. My project heirarchy looks like this (simplified a bit for >>>>> brevity): >>>>> >>>>> CMakeLists.txt >>>>> mtx_source/CMakeLists.txt >>>>> mtx_wrapper/CMakeLists.txt >>>>> testbench/CMakeLists.txt >>>>> >>>>> The top level CMakeLists.txt calls add_subdirectory on the various >>>>> project specific library folders which each build a static library. The >>>>> testbench folder is the one that builds both the executable and the dynamic >>>>> library. When building the dynamic library I need to use the linker >>>>> options -whole-archive and -no-whole-archive to force my static project >>>>> libraries to be included into the dynamic library. The problem is how to >>>>> insert the -whole-archive and -no-whole-archive options so that they select >>>>> the correct set of libraries. Currently in the testbench CMakeLists.txt >>>>> file I have these lines: >>>>> >>>>> set(libs >>>>> VLC >>>>> mvea >>>>> ${SYSTEMC_SUPPORT_LIBRARIES} >>>>> ${DEVIFSLAVE_LIBRARIES} >>>>> ${SYSTEMC_LIBRARIES} >>>>> ${SIM_UTILS_LIBRARIES} >>>>> ${HWDEBUG_LIBRARIES} >>>>> ) >>>>> >>>>> if (NOT STUB_OUT_MTX) >>>>> list(APPEND libs mtx_wrapper) >>>>> endif() >>>>> >>>>> set(libs_dll ${libs} transif_slave) >>>>> >>>>> if (UNIX) >>>>> list(INSERT libs_dll 0 -Wl,-whole-archive) >>>>> list(APPEND libs_dll -Wl,-no-whole-archive) >>>>> endif() >>>>> >>>>> add_library ( csim_dll SHARED ${sources_dll} ${headers_dll} ) >>>>> add_executable( testbench ${sources} ${headers} ) >>>>> >>>>> target_link_libraries(csim_dll ${libs_dll} ${PTHREADS_LIBRARIES} ) >>>>> target_link_libraries(testbench ${libs} ${PTHREADS_LIBRARIES} ) >>>>> >>>>> which produces the following link line: >>>>> >>>>> /usr/bin/g++-4.7 -fPIC -m32 -m32 -m32 -fPIC -m32 -O3 -O3 >>>>> -DHIDEBUG >>>>> -Wl,-Bsymbolic >>>>> -shared -Wl,-soname,libtopazhp.so >>>>> -o libtopazhp.so >>>>> CMakeFiles/csim_dll.dir/dll_main.cpp.o >>>>> CMakeFiles/csim_dll.dir/main_common.cpp.o >>>>> -lm -lrt -lm -lrt >>>>> -Wl,-whole-archive >>>>> ../mvea/VLC/libVLC.a >>>>> ../mvea/libmvea.a >>>>> ../systemCSupport/libsystemc_support.a >>>>> ../devif_slave/libDevifSlave.a >>>>> ../systemC/libsystemc.a >>>>> ../sim_utils/libsim_utils.a >>>>> ../hwdebug/libhwDebug.a >>>>> ../mtx_wrapper/libmtx_wrapper.a >>>>> ../transif/libtransif_slave.a >>>>> -Wl,-no-whole-archive >>>>> -lpthread -lz >>>>> ../systemC/libpthreads_dummy.a >>>>> ../external_mtx/src/external_mtx-build/metag/libmetag.a >>>>> ../external_mtx/src/external_mtx-build/metagcopro/libmetagcopro.a >>>>> ../external_mtx/src/external_mtx-build/metac/vmetastub/libvmetastub.a >>>>> ../external_mtx/src/external_mtx-build/metac/insim/libinsimfpu.a >>>>> ../external_mtx/src/external_mtx-build/mtx/insim-mtxg/libinsim-mtxg.a >>>>> ../external_mtx/src/external_mtx-build/mtx/libmtxc.a >>>>> -ldl -lm -lrt -lm -lrt >>>>> >>>>> The problem is that the 6 external_mtx libraries should have been >>>>> included inside the -whole-archive section. These libraries are specified >>>>> in the mtx_wrapper folder with a target_link_libraries(mtx_wrapper >>>>> ${METASIM_LIBRARIES}) command. I have managed to wrap the direct library >>>>> dependencies inside the -whole-archive but I need to ensure that any >>>>> sub-dependencies are included as well (and any dependencies they might have >>>>> recursively). Any system dynamic libaries (-ldl -lm -lrt etc.) must appear >>>>> after the -no-whole-archive option otherwise the link fails. The >>>>> mtx_wrapper library can be built in two ways and only one of them will add >>>>> the extra METASIM libraries as a dependency, the other way fakes that code >>>>> internally. Adding the METASIM libraries via target_link_libraries() >>>>> inside the mtx_wrapper CMakeLists.txt correctly handles that dependency >>>>> when linking the standalone executable but is not working for linking the >>>>> dynamic library. >>>>> >>>>> Is there an easy way to get cmake to handle all this ? Is there a way >>>>> to get a list of all the static libraries (libXXX.a) that will be included >>>>> on the link line for a target ? >>>>> >>>>> -- >>>>> Glenn >>>>> >>>>> >>>> >>>> -- >>>> >>>> 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 >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jamesbigler at gmail.com Wed Jul 23 13:45:56 2014 From: jamesbigler at gmail.com (James Bigler) Date: Wed, 23 Jul 2014 11:45:56 -0600 Subject: [CMake] About the FindCUDA.cmake module ande Separate Compilation In-Reply-To: References: Message-ID: The CUDA_NVCC_FLAGS variable is a list not a string. You also have to turn CUDA_SEPARABLE_COMPILATION on. Try this list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30 -rdc=true) set( CUDA_SEPARABLE_COMPILATION ON) On Thu, Jul 17, 2014 at 8:07 AM, Notargiacomo Thibault wrote: > Dear All > > I am a user of cmake build system and its differents modules, that > were very helpful in the past. > > But I met some specific issues with the FindCUDA.cmake module, for > about a year now. Especially about the Separate Compilation feature, > that never worked for me, I previously had to bypass the problem by > rewriting some code in the same file, but today I am stuck and I have > to get this feature working. > > What are my files ? > I have > =================== > a.cu: > __constant__ Buffer float[1024]; > __global__ void kernelA( float a ) > { > Buffer[0] = a; > } > =================== > b.cu.h > extern __constant__ Buffer float[1024]; > =================== > b.cu > __global__ void kernelB( float b ) > { > Buffer[0] += b; > } > =================== > > It is obvious with this configuration, that I have to link b.cu with > a.cu, in order to get the same memory area shared across them. This > simple feature seems to be only available if a separate compilation > configuration build is used, in order to avoid redefinition error, and > also compiler needs relocatable device code to be setted, this latter > I don't really understand why. > > > What specific feature of the CMake Module I am using ? > Here are the main macros I am using: > > ======================================= > list(APPEND CUDA_NVCC_FLAGS " -gencode arch=compute_30,code=sm_30 > -rdc=true ") > set( CUDA_SEPARABLE_COMPILATION ) > cuda_add_executable(${OUTPUT_NAME} ${sources} ${headers}) > ====================================== > > > The error I get: > If I discard the "-rdc=true" nvcc option for relocatable code, the > code compiles, and links fine, but at runtime the code does not work > as expected, ie the value inside the buffer is not shared across > differents kernel a and b. > > If all options stated before are setted, the code compiles fine, but > at link step I get tons of link errors that looks like: > undefined reference to `__cudaRegisterLinkedBinary[...]' > > The problem doesn't seem that hard to solve, as seperate compilation > is extensively explained in the cuda documentation : > > http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#using-separate-compilation-in-cuda > But I still got problems trying to get the separate things to work > with FindCUDA.cmake. > > Thank you in advance for any help. > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adar at cloudera.com Wed Jul 23 19:57:13 2014 From: adar at cloudera.com (Adar Dembo) Date: Wed, 23 Jul 2014 16:57:13 -0700 Subject: [CMake] Controlling the targets in an export set Message-ID: I have a project that generates a shared library foo. As part of the build, the bar1, bar2, and bar3 static archives are created, and eventually, foo is linked against all of them. Thus, the project's sole deliverable is libfoo.so; all the necessary symbols from the bar1..bar3 archives are found within libfoo.so. If I try to export foo using "install(TARGETS foo EXPORT foo ...) and "install(EXPORT foo ...)", cmake complains that target foo requires targets bar1, bar2, and bar3, which are not in the export set. I have to add "install(TARGETS bar1 EXPORT foo ...)" for bar1..bar3 if I want this to succeed. However, this also means that I'm exporting my static archives, which as I wrote earlier aren't necessary. How can I exercise finer-grained control over foo's export set? How can I build an export set containing foo but excluding bar1, bar2, and bar3? -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Thu Jul 24 03:15:02 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 24 Jul 2014 09:15:02 +0200 Subject: [CMake] Controlling the targets in an export set In-Reply-To: References: Message-ID: <53D0B276.1060803@gmail.com> On 07/24/2014 01:57 AM, Adar Dembo wrote: > I have a project that generates a shared library foo. As part of the > build, the bar1, bar2, and bar3 static archives are created, and > eventually, foo is linked against all of them. Thus, the project's sole > deliverable is libfoo.so; all the necessary symbols from the bar1..bar3 > archives are found within libfoo.so. > > If I try to export foo using "install(TARGETS foo EXPORT foo ...) and > "install(EXPORT foo ...)", cmake complains that target foo requires > targets bar1, bar2, and bar3, which are not in the export set. I have to > add "install(TARGETS bar1 EXPORT foo ...)" for bar1..bar3 if I want this > to succeed. However, this also means that I'm exporting my static > archives, which as I wrote earlier aren't necessary. > > How can I exercise finer-grained control over foo's export set? How can > I build an export set containing foo but excluding bar1, bar2, and bar3? You can link your static libraries to your shared library privately hence removing them from foo's interface: target_link_libraries(foo PRIVATE bar1 bar2 bar3) You are probably already aware but just in case ... To portably link archives to shared libraries you need position independent code[1]. Of the objects contained in your archives only those will get included which are required to resolve some reference when creating libfoo.so. Symbols that were contained in objects which were not required in the link will hence not be available. This might seemed to have worked within the project until now given that the archives were in your link interface. Nils [1] http://cmake.org/cmake/help/v3.0/prop_tgt/POSITION_INDEPENDENT_CODE.html From Dominique.Ledit at PDGM.com Thu Jul 24 04:38:08 2014 From: Dominique.Ledit at PDGM.com (Dominique Ledit) Date: Thu, 24 Jul 2014 08:38:08 +0000 Subject: [CMake] How to get rid of AUTOMOC: Checking ... messages Message-ID: <58AC22C72FD8E842B3DA5842573BB5C839494A6F@excorpuk2.paradigmgeo.net> Hi I currently use 2.8.12.2 CMake version and Qt 4.7.3 and set in my top-level CMakeLists.txt the CMAKE_AUTOMOC to true Set (CMAKE_AUTOMOC on) As a result, in the build log there are a lot of messages like: AUTOMOC: Checking AUTOMOC: Checking Is there a way to get rid of them? Thank you Dominique -------------------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From serge.rykovanov at gmail.com Thu Jul 24 04:56:01 2014 From: serge.rykovanov at gmail.com (Sergey Rykovanov) Date: Thu, 24 Jul 2014 10:56:01 +0200 Subject: [CMake] Make works on linux, not on Mac Os X Mavericks, openmpi Message-ID: Hi, I have a very simple "Hello world" program that compiles with mpic++. I also have the following CMakeLists.txt file: cmake_minimum_required(VERSION 2.8) project(Hello_world) add_executable(hello.e main.cpp) # Require MPI for this project: find_package(MPI REQUIRED) include_directories(MPI_INCLUDE_PATH)set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS}) target_link_libraries(hello.e ${MPI_LIBRARIES} This cmake file works perfectly on Linux, but not on Mac OS X Mavericks. On Mavericks I get: "mpi.h not found" error. Here is the output of cmake . showing that it found the openmpi: -- The C compiler identification is AppleClang 5.1.0.5030040-- The CXX compiler identification is AppleClang 5.1.0.5030040-- Check for working C compiler: /usr/bin/cc-- Check for working C compiler: /usr/bin/cc -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Check for working CXX compiler: /usr/bin/c++-- Check for working CXX compiler: /usr/bin/c++ -- works-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Found MPI_C: /opt/local/lib/openmpi-devel-mp/libmpi.dylib -- Found MPI_CXX: /opt/local/lib/openmpi-devel-mp/libmpi.dylib -- Configuring done-- Generating done-- Build files have been written to: /Users/sleepyhead/work/MPI_TEST What am I doing wrong? Cheers, Sergey -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Thu Jul 24 05:08:42 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 24 Jul 2014 11:08:42 +0200 Subject: [CMake] Make works on linux, not on Mac Os X Mavericks, openmpi In-Reply-To: References: Message-ID: <53D0CD1A.8010200@gmail.com> On 07/24/2014 10:56 AM, Sergey Rykovanov wrote: > |cmake_minimum_required(VERSION2.8) > > project(Hello_world) > > add_executable(hello.e main.cpp) > > # Require MPI for this project: > find_package(MPI REQUIRED) > include_directories(MPI_INCLUDE_PATH) > set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS}) > set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS}) > target_link_libraries(hello.e ${MPI_LIBRARIES}| include_directories(MPI_INCLUDE_PATH) adds an include directory named MPI_INCLUDE_PATH. You probably meant include_directories(${MPI_INCLUDE_PATH}) which adds the content of the variable MPI_INCLUDE_PATH as include directories. Might have worked on Linux because the headers were already in standard include directories. Nils From chuck.atkins at kitware.com Thu Jul 24 10:11:49 2014 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Thu, 24 Jul 2014 10:11:49 -0400 Subject: [CMake] CMAKE changing Visual Studio Settings In-Reply-To: References: <53CCB7EB.1040501@gmail.com> Message-ID: Hi Joseph, On Mon, Jul 21, 2014 at 4:51 PM, Joseph Rosensweig wrote: > ... > in my CMAKE I have places where I do things like if(CMAKE_BUILD_TYPE > STREQUAL Debug) then do this else do that. > This is the sort of logic best achieved through generator expressions. How to do it specifically really depends. Generator expressions are used all over CMake in various different contexts so how to apply them depends on what exactly you are trying to achieve. > i.e. my CXX Flags will change based on the CMAKE_BUILD_TYPE ... What am I > missing? > This is actually much simpler than the general case. CMake has specific compiler flags for all builds, release, debug, release with debug info, and minimum size release. They can be set / ammended with: # Flags that get applied to all builds set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /My /EXTRA /COMPILER /FLAGS") # Flags that only apply to debug builds set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ADDITIONAL /DEBUG /ONLY /FLAGS") # Flags that only apply to release builds set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /ADDITIONAL /RELEASE /ONLY /FLAGS") The resulting compiler flags that get used are a combination of the general CMAKE_CXX_FLAGS and CMAKE_CXX_FLAGS for the current selected build configuration. Back to the first issue though, what other types of build-type specific logic are you trying to achieve? There may be a better / easier way. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adar at cloudera.com Thu Jul 24 19:28:07 2014 From: adar at cloudera.com (Adar Dembo) Date: Thu, 24 Jul 2014 16:28:07 -0700 Subject: [CMake] Controlling the targets in an export set In-Reply-To: <53D0B276.1060803@gmail.com> References: <53D0B276.1060803@gmail.com> Message-ID: Thanks, that did the trick (though I had to use LINK_PRIVATE instead of PRIVATE; maybe I'm using an older version of cmake). And yes, I need -fPIC code through and through. I've already taken care of that. And double yes, a few other targets needed to explicitly list foo's transitive dependencies in their own target_link_libraries(). Wasn't too hard to fix though. On Thu, Jul 24, 2014 at 12:15 AM, Nils Gladitz wrote: > On 07/24/2014 01:57 AM, Adar Dembo wrote: > >> I have a project that generates a shared library foo. As part of the >> build, the bar1, bar2, and bar3 static archives are created, and >> eventually, foo is linked against all of them. Thus, the project's sole >> deliverable is libfoo.so; all the necessary symbols from the bar1..bar3 >> archives are found within libfoo.so. >> >> If I try to export foo using "install(TARGETS foo EXPORT foo ...) and >> "install(EXPORT foo ...)", cmake complains that target foo requires >> targets bar1, bar2, and bar3, which are not in the export set. I have to >> add "install(TARGETS bar1 EXPORT foo ...)" for bar1..bar3 if I want this >> to succeed. However, this also means that I'm exporting my static >> archives, which as I wrote earlier aren't necessary. >> >> How can I exercise finer-grained control over foo's export set? How can >> I build an export set containing foo but excluding bar1, bar2, and bar3? >> > > You can link your static libraries to your shared library privately hence > removing them from foo's interface: > > target_link_libraries(foo PRIVATE bar1 bar2 bar3) > > You are probably already aware but just in case ... > > To portably link archives to shared libraries you need position > independent code[1]. > > Of the objects contained in your archives only those will get included > which are required to resolve some reference when creating libfoo.so. > Symbols that were contained in objects which were not required in the link > will hence not be available. > > This might seemed to have worked within the project until now given that > the archives were in your link interface. > > Nils > > [1] http://cmake.org/cmake/help/v3.0/prop_tgt/POSITION_ > INDEPENDENT_CODE.html > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bnewcomb at nvidia.com Fri Jul 25 12:20:43 2014 From: bnewcomb at nvidia.com (Bill Newcomb) Date: Fri, 25 Jul 2014 09:20:43 -0700 Subject: [CMake] Spaces in a command Message-ID: <53D283DB.1020609@nvidia.com> I want to add stuff to a custom command based on some definition: cmake_minimum_required(VERSION 2.6) set(DO_RELAX 1) if(DO_RELAX) set(OR_RELAX "|| echo \"no big deal\"") else() set(OR_RELAX "") endif() add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX}) add_custom_target(do-foo ALL DEPENDS foo) However, this produces the following rule in the generated makefile: foo: $(CMAKE_COMMAND) -E cmake_progress_report /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating foo" generate-foo ||\ echo\ "no\ big\ deal" Is there some way I can get cmake to not escape all of the spaces in the value of OR_RELAX? Thanks, B. ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- From iosif.neitzke+cmake at gmail.com Fri Jul 25 12:43:07 2014 From: iosif.neitzke+cmake at gmail.com (Iosif Neitzke) Date: Fri, 25 Jul 2014 11:43:07 -0500 Subject: [CMake] Spaces in a command In-Reply-To: <53D283DB.1020609@nvidia.com> References: <53D283DB.1020609@nvidia.com> Message-ID: "If VERBATIM is given then all arguments to the commands will be escaped properly for the build tool so that the invoked command receives each argument unchanged. Note that one level of escapes is still used by the CMake language processor before add_custom_command even sees the arguments. Use of VERBATIM is recommended as it enables correct behavior. When VERBATIM is not given the behavior is platform specific because there is no protection of tool-specific special characters." http://www.cmake.org/cmake/help/v3.0/command/add_custom_command.html On Fri, Jul 25, 2014 at 11:20 AM, Bill Newcomb wrote: > I want to add stuff to a custom command based on some definition: > > cmake_minimum_required(VERSION 2.6) > > set(DO_RELAX 1) > if(DO_RELAX) > set(OR_RELAX "|| echo \"no big deal\"") > else() > set(OR_RELAX "") > endif() > > add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX}) > add_custom_target(do-foo ALL DEPENDS foo) > > > However, this produces the following rule in the generated makefile: > > foo: > $(CMAKE_COMMAND) -E cmake_progress_report /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) > @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating foo" > generate-foo ||\ echo\ "no\ big\ deal" > > Is there some way I can get cmake to not escape all of the > spaces in the value of OR_RELAX? > > Thanks, > B. > > ----------------------------------------------------------------------------------- > This email message is for the sole use of the intended recipient(s) and may contain > confidential information. Any unauthorized review, use, disclosure or distribution > is prohibited. If you are not the intended recipient, please contact the sender by > reply email and destroy all copies of the original message. > ----------------------------------------------------------------------------------- > -- > > 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 From rcasero at gmail.com Sat Jul 26 06:18:42 2014 From: rcasero at gmail.com (=?UTF-8?B?UmFtw7NuIENhc2VybyBDYcOxYXM=?=) Date: Sat, 26 Jul 2014 11:18:42 +0100 Subject: [CMake] add_custom_target: Compiling a Matlab function into a binary with mcc Message-ID: Dear all, I have a Matlab function vmu2png.m (this is the source code), and I'd like to compile it into an executable/binary using a CMake project (cmake 2.8.11.2 on linux). To compile the function, I need to run Matlab's mcc program, e.g. "mcc -m vmu2png.m" from CMake. This will produce two files: run_vmu2png.sh and vmu2png. So far, I have managed to do it with add_custom_command() and add_custom_target(), but this makes the function compile every time I use "make", regardless of whether vmu2png.m has been modified. My code is # vmu2png add_custom_command( OUTPUT run_vmu2png.sh vmu2png COMMAND ${MATLAB_ROOT}/bin/mcc ARGS -m vmu2png.m DEPENDS vmu2png.m COMMENT "Compiling vmu2png.m into a binary" ) add_custom_target(do_vmu2png ALL DEPENDS run_vmu2png.sh vmu2png SOURCES vmu2png.m ) If I remove ALL from add_custom_target(), then this compilation never happens. Is there a way to integrate this kind of compilation nicely with CMake? That is, I'd like it to happen only when run_vmu2png.sh or vmu2png are missing, or when the source file has been modified. Best regards, Ramon. -- Dr. Ram?n Casero Ca?as Institute of Biomedical Engineering Department of Engineering Science, University of Oxford Old Road Campus Research Building, Headington Oxford OX3 7DQ UK tlf +44 (0) 1865 617716 twitter @Ramon_Casero web http://www.cs.ox.ac.uk/people/Ramon.CaseroCanas/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Sat Jul 26 08:06:19 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Sat, 26 Jul 2014 14:06:19 +0200 Subject: [CMake] add_custom_target: Compiling a Matlab function into a binary with mcc In-Reply-To: References: Message-ID: <53D399BB.1060207@gmail.com> On 26.07.2014 12:18, Ram?n Casero Ca?as wrote: > > Dear all, > > I have a Matlab function vmu2png.m (this is the source code), and I'd > like to compile it into an executable/binary using a CMake > project (cmake 2.8.11.2 on linux). > > To compile the function, I need to run Matlab's mcc program, e.g. "mcc > -m vmu2png.m" from CMake. This will produce two files: run_vmu2png.sh > and vmu2png. > > So far, I have managed to do it with add_custom_command() and > add_custom_target(), but this makes the function compile every time I > use "make", regardless of whether vmu2png.m has been modified. > > My code is > > # vmu2png > add_custom_command( > OUTPUT run_vmu2png.sh vmu2png > COMMAND ${MATLAB_ROOT}/bin/mcc > ARGS -m vmu2png.m > DEPENDS vmu2png.m > COMMENT "Compiling vmu2png.m into a binary" > ) > add_custom_target(do_vmu2png ALL > DEPENDS run_vmu2png.sh vmu2png > SOURCES vmu2png.m > ) > > If I remove ALL from add_custom_target(), then this compilation never > happens. > > Is there a way to integrate this kind of compilation nicely with > CMake? That is, I'd like it to happen only when run_vmu2png.sh or > vmu2png are missing, or when the source file has been modified. > Try using full paths for the OUTPUTs in the custom command and the DEPENDS in your custom target (e.g. "${CMAKE_CURRENT_BINARY_DIR}/run_vmu2png.sh"). The custom commands will keep rerunning when the actual outputs do not coincide with the declared outputs. Nils From 289851803 at qq.com Sat Jul 26 21:53:06 2014 From: 289851803 at qq.com (=?utf-8?B?55Gf6I27?=) Date: Sun, 27 Jul 2014 09:53:06 +0800 Subject: [CMake] cmake_install.cmake Message-ID: Hello,every one. I am trying to use cmake to install the orfeo toolbox.It works well until the last step with the following error information: ------ ?????: ??: INSTALL, ??: RelWithDebInfo Win32 ------ CMake Error at cmake_install.cmake:31 (FILE): file cannot create directory: C:/Program Files/OTB/lib/otb. Maybe need administrative privileges.? It seems that I don't have the priviledge though I am just the admin.The otb cannot be installed into C:/Program Files.I have tried to modify the CMAKE_INSTALL_PERFIX to D:/Program Files,it didn't work obviously.Because the CMAKE_INSTALL_PERFIX will became the original one when install.So I wish someone may give me some suggestions. Any advice is welcome.Thank you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nagymatef at freemail.hu Sun Jul 27 06:58:30 2014 From: nagymatef at freemail.hu (=?utf-8?B?TmFneS1FZ3JpIE3DoXTDqSBGZXJlbmM=?=) Date: Sun, 27 Jul 2014 10:58:30 +0000 Subject: [CMake] =?utf-8?q?cmake=5Finstall=2Ecmake?= Message-ID: Being the administrator doesn?t mean, that CMake has admin privilages. You must either run CMake as admin, or launch it from a shell that has admin rights. Felad?: ?? Elk?ldve: ?vas?rnap?, ?2014?. ?j?lius? ?27?. ?3?:?58 C?mzett: cmake at cmake.org Hello,every one. I am trying to use cmake to install the orfeo toolbox.It works well until the last step with the following error information: ------ ?????: ??: INSTALL, ??: RelWithDebInfo Win32 ------ CMake Error at cmake_install.cmake:31 (FILE): file cannot create directory: C:/Program Files/OTB/lib/otb. Maybe need administrative privileges.? It seems that I don't have the priviledge though I am just the admin.The otb cannot be installed into C:/Program Files.I have tried to modify the CMAKE_INSTALL_PERFIX to D:/Program Files,it didn't work obviously.Because the CMAKE_INSTALL_PERFIX will became the original one when install.So I wish someone may give me some suggestions. Any advice is welcome.Thank you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- -- 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 From j.kreuzberger at procitec.de Mon Jul 28 04:33:41 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Mon, 28 Jul 2014 10:33:41 +0200 Subject: [CMake] =?utf-8?q?target=5Flink=5Flibraries_on_imported_targets?= Message-ID: Hi! i am using the cmake feature with target_link_libraries for static libraries to describe additional link dependencies from static libs e.g. to system libs and qt libraries. The cmake files is use are used for "developper build" and customer build, but the customer does not get all source code to all libraries. So i am using target definitions with "imported" targets. But on this imported targets i cannot define these link dependencies with target_link_libraries. Which properties could i set on the IMPORTED Targets to get the same behaviour? Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From nilsgladitz at gmail.com Mon Jul 28 05:00:34 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 28 Jul 2014 11:00:34 +0200 Subject: [CMake] target_link_libraries on imported targets In-Reply-To: References: Message-ID: <53D61132.5040406@gmail.com> On 07/28/2014 10:33 AM, J?rg Kreuzberger wrote: > But on this imported targets i cannot define these link dependencies with target_link_libraries. Which properties could i set on the IMPORTED Targets to get the same behaviour? http://cmake.org/cmake/help/v3.0/prop_tgt/INTERFACE_LINK_LIBRARIES.html Nils From johannes.zarl at jku.at Mon Jul 28 04:59:45 2014 From: johannes.zarl at jku.at (Johannes Zarl) Date: Mon, 28 Jul 2014 10:59:45 +0200 Subject: [CMake] Typo in cmake-packages(7) Message-ID: <201407281059.45851.johannes.zarl@jku.at> Hi, In cmake-packages(7) [1], there is a typo that prevents the example from working correctly. The command > configure_file(cmake/ClimbingStatsConfig.cmake > "${CMAKE_CURRENT_BINARY_DIR}/ClimbingStats/ClimbingStatsConfig.cmake" > COPY_ONLY > ) should use "COPYONLY", not "COPY_ONLY". Cheers, Johannes P.S.: I really like the new documentation website. Kudos to whoever had the idea for this! [1] http://www.cmake.org/cmake/help/git-master/manual/cmake- packages.7.html#creating-packages From dlrdave at aol.com Mon Jul 28 06:22:11 2014 From: dlrdave at aol.com (David Cole) Date: Mon, 28 Jul 2014 06:22:11 -0400 (EDT) Subject: [CMake] Typo in cmake-packages(7) In-Reply-To: <201407281059.45851.johannes.zarl@jku.at> References: <201407281059.45851.johannes.zarl@jku.at> Message-ID: <8D17864ED773E05-B88-694@webmail-m270.sysops.aol.com> In fact, it's not just a documentation typo...... It occurs three times in cmake 'next' and 'master': $ git grep COPY_ONLY Help/manual/cmake-packages.7.rst: COPY_ONLY Modules/Qt4Macros.cmake: configure_file("${infile}" "${out_depends}" COPY_ONLY) Source/kwsys/CMakeLists.txt: ${PROJECT_BINARY_DIR}/kwsysPrivate.h COPY_ONLY IMMEDIATE) -----Original Message----- From: Johannes Zarl To: cmake Sent: Mon, Jul 28, 2014 5:06 am Subject: [CMake] Typo in cmake-packages(7) Hi, In cmake-packages(7) [1], there is a typo that prevents the example from working correctly. The command > configure_file(cmake/ClimbingStatsConfig.cmake > "${CMAKE_CURRENT_BINARY_DIR}/ClimbingStats/ClimbingStatsConfig.cmake" > COPY_ONLY > ) should use "COPYONLY", not "COPY_ONLY". Cheers, Johannes P.S.: I really like the new documentation website. Kudos to whoever had the idea for this! [1] http://www.cmake.org/cmake/help/git-master/manual/cmake- packages.7.html#creating-packages -- 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 From chuck.atkins at kitware.com Mon Jul 28 14:52:11 2014 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Mon, 28 Jul 2014 14:52:11 -0400 Subject: [CMake] How to set "Look for CMakeDetermine.cmake here" In-Reply-To: <53CDA303.1000608@zemon.name> References: <53CDA303.1000608@zemon.name> Message-ID: Hi David, You can add to the search path CMake uses by appending to the CMAKE_MODULE_PATH variable. In your case, you'll probably want to set it before the project command to make sure it's present for you're entire project. For example: In your project, you create CMake directory where you would place additional *.cmake files, such as your language files,or maybe even custom Find modules. Then in your top level CMakeLists file, you would have: cmake_minimum_required(VERSION 2.8.12) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake") project(MyAwesomeProject) Now anytime CMake searches for any sort of *.cmake file, it will also search the CMake folder in your source tree. Hope that helps. - Chuck On Mon, Jul 21, 2014 at 7:32 PM, David Zemon wrote: > I am attempting to build an easy-to-use build system for an embedded > system. This chip uses .dat, .spin, .cogc, and .ecogc files along with .S, > .c, and .cpp. I've added the necessary language files to my project path > which will enable cogc (I'll get to the other file types eventually) and > they work great, but it requires manually linking or copying the files out > of the project directory and into CMake's installation path. Is there some > way to tell CMake that it should look for these files in a custom path? > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lachlan.Hetherton at csiro.au Mon Jul 28 21:06:26 2014 From: Lachlan.Hetherton at csiro.au (Lachlan.Hetherton at csiro.au) Date: Tue, 29 Jul 2014 01:06:26 +0000 Subject: [CMake] Using CPack with OSX 10.9 Message-ID: Hi there, We?re looking to update our CMake packaging scripts so that we can deploy to OSX 10.9 Mavericks. For previous OSX releases, we have used the PackageMaker generator with CPack to create .pkg files inside .dmg files. I believe PackageMaker has now disappeared (I can?t run the old version on my current machine and there doesn?t seem to be a new version available anywhere), so I would like to ask you all: what is the preferred generator for deploying to OSX 10.9? I?m currently looking into the OSX Bundle generator, however, our application ships with multiple executables and a number of dependent libraries and frameworks, so I?m not quite sure whether this is the right way to go. From what I?ve read, OSX application bundles are supposed to have a single executable only ? how would I go about deploying an application that has multiple component applications? If we use the bundle generator, our application is going to look like this (I think), which seems strange: OurApplication.app/ Contents/ Info.plist MacOS/ executable1 Frameworks/ QtCore.framework QtGui.framework ? Resources/ bin/ executable1 executable2 ? lib/ non-framework dependencies Thanks for your help, Lachlan Hetherton Software Engineer (Visualisation) ? +613-9545-8041 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lachlan.Hetherton at csiro.au Mon Jul 28 21:35:46 2014 From: Lachlan.Hetherton at csiro.au (Lachlan.Hetherton at csiro.au) Date: Tue, 29 Jul 2014 01:35:46 +0000 Subject: [CMake] Using CPack with OSX 10.9 In-Reply-To: <53D6F96E.3060904@ionic.de> Message-ID: Thanks Mihai, That?s good to know. Having said that, I?m now knee deep in this stuff so if anyone has any recommendations on how to proceed going forward (e.g. with app bundles), that would be great. Regards, Lachlan Hetherton Software Engineer (Visualisation) ? +613-9545-8041 On 7/29/14, 11:31 AM, "Mihai Moldovan" wrote: >On 29.07.2014 03:06 am, Lachlan.Hetherton at csiro.au wrote: >> I believe PackageMaker has now disappeared (I can?t run the old version >>on my >> current machine and there doesn?t seem to be a new version available >>anywhere) > >A Mavericks-compatible version of PackageMaker is available on >https://developer.apple.com/downloads/, search for "Auxiliary Tools For >Xcode - >Late July 2012". > >While this does not help you in the long run (PackageMaker is deprecated >and has >already been removed from the most current AuxTools package as you have >noticed), it may enable you to keep working with the current setup you >have >right now for some more time. > > > >Mihai > From ionic at ionic.de Mon Jul 28 21:31:26 2014 From: ionic at ionic.de (Mihai Moldovan) Date: Tue, 29 Jul 2014 03:31:26 +0200 Subject: [CMake] Using CPack with OSX 10.9 In-Reply-To: References: Message-ID: <53D6F96E.3060904@ionic.de> On 29.07.2014 03:06 am, Lachlan.Hetherton at csiro.au wrote: > I believe PackageMaker has now disappeared (I can?t run the old version on my > current machine and there doesn?t seem to be a new version available anywhere) A Mavericks-compatible version of PackageMaker is available on https://developer.apple.com/downloads/, search for "Auxiliary Tools For Xcode - Late July 2012". While this does not help you in the long run (PackageMaker is deprecated and has already been removed from the most current AuxTools package as you have noticed), it may enable you to keep working with the current setup you have right now for some more time. Mihai -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4265 bytes Desc: S/MIME Cryptographic Signature URL: From Lachlan.Hetherton at csiro.au Mon Jul 28 23:52:07 2014 From: Lachlan.Hetherton at csiro.au (Lachlan.Hetherton at csiro.au) Date: Tue, 29 Jul 2014 03:52:07 +0000 Subject: [CMake] Using CPack with OSX 10.9 In-Reply-To: <53D6F96E.3060904@ionic.de> Message-ID: As a further FYI, I have tried installing that version of PackageMaker and it simply crashes on load, so I?m not sure whether this is even an option any more. Regards, Lachlan Hetherton Software Engineer (Visualisation) ? +613-9545-8041 On 7/29/14, 11:31 AM, "Mihai Moldovan" wrote: >On 29.07.2014 03:06 am, Lachlan.Hetherton at csiro.au wrote: >> I believe PackageMaker has now disappeared (I can?t run the old version >>on my >> current machine and there doesn?t seem to be a new version available >>anywhere) > >A Mavericks-compatible version of PackageMaker is available on >https://developer.apple.com/downloads/, search for "Auxiliary Tools For >Xcode - >Late July 2012". > >While this does not help you in the long run (PackageMaker is deprecated >and has >already been removed from the most current AuxTools package as you have >noticed), it may enable you to keep working with the current setup you >have >right now for some more time. > > > >Mihai > From Lachlan.Hetherton at csiro.au Tue Jul 29 01:44:45 2014 From: Lachlan.Hetherton at csiro.au (Lachlan.Hetherton at csiro.au) Date: Tue, 29 Jul 2014 05:44:45 +0000 Subject: [CMake] [ExternalEmail] Re: Using CPack with OSX 10.9 In-Reply-To: Message-ID: I lie, it does run - the wrong version of the PackageMaker executable was on my PATH. As you say - at least this will keep me going for the time being, but we will need a way of building our application as a framework bundle or something similar going forward (keep in mind that we also deploy to Windows and Linux, so heavily customizing our build process for OSX is less than ideal). Thanks again, Lachlan Hetherton Software Engineer (Visualisation) ? +613-9545-8041 On 7/29/14, 1:52 PM, "Lachlan.Hetherton at csiro.au" wrote: >As a further FYI, I have tried installing that version of PackageMaker and >it simply crashes on load, so I?m not sure whether this is even an option >any more. > >Regards, > >Lachlan Hetherton >Software Engineer (Visualisation) >? +613-9545-8041 > > > > >On 7/29/14, 11:31 AM, "Mihai Moldovan" wrote: > >>On 29.07.2014 03:06 am, Lachlan.Hetherton at csiro.au wrote: >>> I believe PackageMaker has now disappeared (I can?t run the old version >>>on my >>> current machine and there doesn?t seem to be a new version available >>>anywhere) >> >>A Mavericks-compatible version of PackageMaker is available on >>https://developer.apple.com/downloads/, search for "Auxiliary Tools For >>Xcode - >>Late July 2012". >> >>While this does not help you in the long run (PackageMaker is deprecated >>and has >>already been removed from the most current AuxTools package as you have >>noticed), it may enable you to keep working with the current setup you >>have >>right now for some more time. >> >> >> >>Mihai >> > >-- > >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 From j.kreuzberger at procitec.de Tue Jul 29 02:54:13 2014 From: j.kreuzberger at procitec.de (=?utf-8?Q?J=C3=B6rg_Kreuzberger?=) Date: Tue, 29 Jul 2014 08:54:13 +0200 Subject: [CMake] =?utf-8?q?target=5Flink=5Flibraries_on_imported_targets?= Message-ID: Thanks, it worked like expected :-) -----Urspr?ngliche Nachricht----- Von: Nils Gladitz Gesendet: Mo 28.07.2014 11:03 Betreff: Re: [CMake] target_link_libraries on imported targets An: J?rg Kreuzberger ; cmake at cmake.org; > On 07/28/2014 10:33 AM, J?rg Kreuzberger wrote: > > > But on this imported targets i cannot define these link dependencies with > target_link_libraries. Which properties could i set on the IMPORTED Targets to > get the same behaviour? > > http://cmake.org/cmake/help/v3.0/prop_tgt/INTERFACE_LINK_LIBRARIES.html > > Nils > > Mannheim HRB 504702 Gesch?ftsf?hrer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden. Thank you! From mike.jackson at bluequartz.net Tue Jul 29 09:03:17 2014 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Tue, 29 Jul 2014 09:03:17 -0400 Subject: [CMake] [ExternalEmail] Re: Using CPack with OSX 10.9 In-Reply-To: References: Message-ID: We use a "Configured" bash shell script for our OS X deployment which consists of a Top level directory with the .app bundles and a "tools" folder. The shell script ensures all the libraries have all the proper install_paths encoded, thin all the binaries to a single 64 bit arch and some other cleanup items that the BundleUtilities does not cover. We also have deployments to Linux and Windows but the shell script was the easiest way to get the OS X deployment that we needed. Cheers Mike Jackson On Jul 29, 2014, at 1:44 AM, Lachlan.Hetherton at csiro.au wrote: > I lie, it does run - the wrong version of the PackageMaker executable was > on my PATH. > As you say - at least this will keep me going for the time being, but we > will need a way of building our application as a framework bundle or > something similar going forward (keep in mind that we also deploy to > Windows and Linux, so heavily customizing our build process for OSX is > less than ideal). > > Thanks again, > > Lachlan Hetherton > Software Engineer (Visualisation) > ? +613-9545-8041 > > > > > On 7/29/14, 1:52 PM, "Lachlan.Hetherton at csiro.au" > wrote: > >> As a further FYI, I have tried installing that version of PackageMaker and >> it simply crashes on load, so I?m not sure whether this is even an option >> any more. >> >> Regards, >> >> Lachlan Hetherton >> Software Engineer (Visualisation) >> ? +613-9545-8041 >> >> >> >> >> On 7/29/14, 11:31 AM, "Mihai Moldovan" wrote: >> >>> On 29.07.2014 03:06 am, Lachlan.Hetherton at csiro.au wrote: >>>> I believe PackageMaker has now disappeared (I can?t run the old version >>>> on my >>>> current machine and there doesn?t seem to be a new version available >>>> anywhere) >>> >>> A Mavericks-compatible version of PackageMaker is available on >>> https://developer.apple.com/downloads/, search for "Auxiliary Tools For >>> Xcode - >>> Late July 2012". >>> >>> While this does not help you in the long run (PackageMaker is deprecated >>> and has >>> already been removed from the most current AuxTools package as you have >>> noticed), it may enable you to keep working with the current setup you >>> have >>> right now for some more time. >>> >>> >>> >>> Mihai >>> >> >> -- >> >> 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 From ycollette.nospam at free.fr Tue Jul 29 10:44:07 2014 From: ycollette.nospam at free.fr (ycollette.nospam at free.fr) Date: Tue, 29 Jul 2014 16:44:07 +0200 (CEST) Subject: [CMake] Ctest and custom measurements In-Reply-To: <975360558.69017317.1406644856464.JavaMail.root@zimbra35-e6.priv.proxad.net> Message-ID: <1034259824.69022032.1406645047284.JavaMail.root@zimbra35-e6.priv.proxad.net> Hello, I've got an executable built using cmake. I use ctest to test my executable. Each time the executable is executed, a log file on std::cout is produced. I the log file, I added the following XML tags: 0.33 I don't see these named measurements in the xml file produced by ctest -D NighlyStart ; ctest -D NighlyTest I use cmake-2.8.12.2 under Fedora 20 64 bits. Is it possible to add custom measurements in the xml file generated by ctest ? Best regards, YC From sean at rogue-research.com Tue Jul 29 11:07:28 2014 From: sean at rogue-research.com (Sean McBride) Date: Tue, 29 Jul 2014 11:07:28 -0400 Subject: [CMake] Using CPack with OSX 10.9 In-Reply-To: References: Message-ID: <20140729150728.118585893@mail.rogue-research.com> On Tue, 29 Jul 2014 01:06:26 +0000, Lachlan.Hetherton at csiro.au said: >I?m currently looking into the OSX Bundle generator, however, our >application ships with multiple executables and a number of dependent >libraries and frameworks, so I?m not quite sure whether this is the >right way to go. From what I?ve read, OSX application bundles are >supposed to have a single executable only ? how would I go about >deploying an application that has multiple component applications? If we >use the bundle generator, our application is going to look like this (I >think), which seems strange: > >OurApplication.app/ > Contents/ > Info.plist > MacOS/ > executable1 > Frameworks/ > QtCore.framework > QtGui.framework > ? > Resources/ > bin/ > executable1 > executable2 > ? > lib/ > non-framework dependencies What's strange about it? It's generally strongly preferred for an OS X application to be self-contained in a .app. There are times when it's not possible, which is maybe your case? What do you need to install where? Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From zack.perry at sbcglobal.net Tue Jul 29 13:00:56 2014 From: zack.perry at sbcglobal.net (Zack Perry) Date: Tue, 29 Jul 2014 10:00:56 -0700 Subject: [CMake] Building cmake-3.0.0 rpm on CentOS 7.0 using cmake/cpack Message-ID: <1406653256.45072.YahooMailNeo@web181102.mail.ne1.yahoo.com> RHEL 7.0 (and its free rebuilds, e.g. CentOS 7.0) is bundled with newer rpm which rigorously checks whether a package declare system directories or not. If a package does, then it would issue an error like what's shown below: Transaction check error: file /usr from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64 file /usr/bin from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64 file /usr/share from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64 file /usr/share/aclocal from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64 So, I have done a 2 step bootstrapping: 0. use cmake 2.8.11 to build a cmake-3.0.0 rpm, rpmrebuild -pe to edit the rpm, and install the "fixed" rpm 1. use the installed "fixed" cmake-3.0.0 rpm to rebuild cmake-3.0.0 and regenerate a RPM. Alas, the resulting RPM still has the /usr/share/aclocal declared in the %files section ;( ?I tried to define the following variable at a few different places and tried them all. Same issue :( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST What is the right way to exclude /usr/share/aclocal? -------------- next part -------------- An HTML attachment was scrubbed... URL: From norman-k-williams at uiowa.edu Tue Jul 29 13:18:10 2014 From: norman-k-williams at uiowa.edu (Williams, Norman K) Date: Tue, 29 Jul 2014 17:18:10 +0000 Subject: [CMake] Using CPack with OSX 10.9 Message-ID: I would look at how CMake itself is packaged for release. The ?one executable per App bundle? is Apple-centric thinking that luckily is not enforced. That isn?t how CMakes (or the OS X Emacs, e.g.) works. You can have whatever you want in an app bundle. It does means that after install, users need to add the directory inside the bundle to their PATH environment variable, if the extra programs are meant to be command line executables. You?d want whatever GUI program that is your main program to be the executable run when you open the app bundle. The problem is that what you?re trying to do doesn?t map neatly onto the Apple world, so you have to choose the least worst workaround. For that matter, using a compressed tar instead of an App Bundle would work too. From: "Lachlan.Hetherton at csiro.au" > Date: Monday, July 28, 2014 at 8:06 PM To: CMake Users > Subject: [CMake] Using CPack with OSX 10.9 Hi there, We?re looking to update our CMake packaging scripts so that we can deploy to OSX 10.9 Mavericks. For previous OSX releases, we have used the PackageMaker generator with CPack to create .pkg files inside .dmg files. I believe PackageMaker has now disappeared (I can?t run the old version on my current machine and there doesn?t seem to be a new version available anywhere), so I would like to ask you all: what is the preferred generator for deploying to OSX 10.9? I?m currently looking into the OSX Bundle generator, however, our application ships with multiple executables and a number of dependent libraries and frameworks, so I?m not quite sure whether this is the right way to go. From what I?ve read, OSX application bundles are supposed to have a single executable only ? how would I go about deploying an application that has multiple component applications? If we use the bundle generator, our application is going to look like this (I think), which seems strange: OurApplication.app/ Contents/ Info.plist MacOS/ executable1 Frameworks/ QtCore.framework QtGui.framework ? Resources/ bin/ executable1 executable2 ? lib/ non-framework dependencies Thanks for your help, Lachlan Hetherton Software Engineer (Visualisation) ? +613-9545-8041 ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bnewcomb at nvidia.com Tue Jul 29 14:13:32 2014 From: bnewcomb at nvidia.com (Bill Newcomb) Date: Tue, 29 Jul 2014 11:13:32 -0700 Subject: [CMake] Spaces in a command In-Reply-To: References: <53D283DB.1020609@nvidia.com> Message-ID: <53D7E44C.1010003@nvidia.com> That doesn't work either: foo: $(CMAKE_COMMAND) -E cmake_progress_report /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating foo" generate-foo "|| echo \"no big deal\"" The whole string gets passed as the first argument to generate-foo. B. On 07/25/2014 09:43 AM, Iosif Neitzke wrote: > "If VERBATIM is given then all arguments to the commands will be > escaped properly for the build tool so that the invoked command > receives each argument unchanged. Note that one level of escapes is > still used by the CMake language processor before add_custom_command > even sees the arguments. Use of VERBATIM is recommended as it enables > correct behavior. When VERBATIM is not given the behavior is platform > specific because there is no protection of tool-specific special > characters." > > http://www.cmake.org/cmake/help/v3.0/command/add_custom_command.html > > On Fri, Jul 25, 2014 at 11:20 AM, Bill Newcomb wrote: >> I want to add stuff to a custom command based on some definition: >> >> cmake_minimum_required(VERSION 2.6) >> >> set(DO_RELAX 1) >> if(DO_RELAX) >> set(OR_RELAX "|| echo \"no big deal\"") >> else() >> set(OR_RELAX "") >> endif() >> >> add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX}) >> add_custom_target(do-foo ALL DEPENDS foo) >> >> >> However, this produces the following rule in the generated makefile: >> >> foo: >> $(CMAKE_COMMAND) -E cmake_progress_report /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) >> @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating foo" >> generate-foo ||\ echo\ "no\ big\ deal" >> >> Is there some way I can get cmake to not escape all of the >> spaces in the value of OR_RELAX? >> >> Thanks, >> B. >> >> ----------------------------------------------------------------------------------- >> This email message is for the sole use of the intended recipient(s) and may contain >> confidential information. Any unauthorized review, use, disclosure or distribution >> is prohibited. If you are not the intended recipient, please contact the sender by >> reply email and destroy all copies of the original message. >> ----------------------------------------------------------------------------------- >> -- >> >> 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 From d3ck0r at gmail.com Tue Jul 29 14:19:54 2014 From: d3ck0r at gmail.com (J Decker) Date: Tue, 29 Jul 2014 11:19:54 -0700 Subject: [CMake] Spaces in a command In-Reply-To: <53D7E44C.1010003@nvidia.com> References: <53D283DB.1020609@nvidia.com> <53D7E44C.1010003@nvidia.com> Message-ID: can try removing the quotes and subst space for semicolon? On Tue, Jul 29, 2014 at 11:13 AM, Bill Newcomb wrote: > That doesn't work either: > > foo: > $(CMAKE_COMMAND) -E cmake_progress_report > /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) > @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue > --bold "Generating foo" > generate-foo "|| echo \"no big deal\"" > > The whole string gets passed as the first argument to generate-foo. > > B. > > On 07/25/2014 09:43 AM, Iosif Neitzke wrote: > > "If VERBATIM is given then all arguments to the commands will be > > escaped properly for the build tool so that the invoked command > > receives each argument unchanged. Note that one level of escapes is > > still used by the CMake language processor before add_custom_command > > even sees the arguments. Use of VERBATIM is recommended as it enables > > correct behavior. When VERBATIM is not given the behavior is platform > > specific because there is no protection of tool-specific special > > characters." > > > > http://www.cmake.org/cmake/help/v3.0/command/add_custom_command.html > > > > On Fri, Jul 25, 2014 at 11:20 AM, Bill Newcomb > wrote: > >> I want to add stuff to a custom command based on some definition: > >> > >> cmake_minimum_required(VERSION 2.6) > >> > >> set(DO_RELAX 1) > >> if(DO_RELAX) > >> set(OR_RELAX "|| echo \"no big deal\"") > >> else() > >> set(OR_RELAX "") > >> endif() > >> > >> add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX}) > >> add_custom_target(do-foo ALL DEPENDS foo) > >> > >> > >> However, this produces the following rule in the generated makefile: > >> > >> foo: > >> $(CMAKE_COMMAND) -E cmake_progress_report > /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) > >> @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue > --bold "Generating foo" > >> generate-foo ||\ echo\ "no\ big\ deal" > >> > >> Is there some way I can get cmake to not escape all of the > >> spaces in the value of OR_RELAX? > >> > >> Thanks, > >> B. > >> > >> > ----------------------------------------------------------------------------------- > >> This email message is for the sole use of the intended recipient(s) and > may contain > >> confidential information. Any unauthorized review, use, disclosure or > distribution > >> is prohibited. If you are not the intended recipient, please contact > the sender by > >> reply email and destroy all copies of the original message. > >> > ----------------------------------------------------------------------------------- > >> -- > >> > >> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From glenn.coombs at gmail.com Tue Jul 29 15:25:39 2014 From: glenn.coombs at gmail.com (Glenn Coombs) Date: Tue, 29 Jul 2014 20:25:39 +0100 Subject: [CMake] Spaces in a command In-Reply-To: References: <53D283DB.1020609@nvidia.com> <53D7E44C.1010003@nvidia.com> Message-ID: I think this works like you want: cmake_minimum_required(VERSION 2.6) set(DO_RELAX 1) if(DO_RELAX) set(OR_RELAX || echo \"no big deal\") else() set(OR_RELAX) endif() add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX} VERBATIM) add_custom_target(do-foo ALL DEPENDS foo) -- Glenn On 29 July 2014 19:19, J Decker wrote: > can try removing the quotes and subst space for semicolon? > > > On Tue, Jul 29, 2014 at 11:13 AM, Bill Newcomb > wrote: > >> That doesn't work either: >> >> foo: >> $(CMAKE_COMMAND) -E cmake_progress_report >> /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) >> @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue >> --bold "Generating foo" >> generate-foo "|| echo \"no big deal\"" >> >> The whole string gets passed as the first argument to generate-foo. >> >> B. >> >> On 07/25/2014 09:43 AM, Iosif Neitzke wrote: >> > "If VERBATIM is given then all arguments to the commands will be >> > escaped properly for the build tool so that the invoked command >> > receives each argument unchanged. Note that one level of escapes is >> > still used by the CMake language processor before add_custom_command >> > even sees the arguments. Use of VERBATIM is recommended as it enables >> > correct behavior. When VERBATIM is not given the behavior is platform >> > specific because there is no protection of tool-specific special >> > characters." >> > >> > http://www.cmake.org/cmake/help/v3.0/command/add_custom_command.html >> > >> > On Fri, Jul 25, 2014 at 11:20 AM, Bill Newcomb >> wrote: >> >> I want to add stuff to a custom command based on some definition: >> >> >> >> cmake_minimum_required(VERSION 2.6) >> >> >> >> set(DO_RELAX 1) >> >> if(DO_RELAX) >> >> set(OR_RELAX "|| echo \"no big deal\"") >> >> else() >> >> set(OR_RELAX "") >> >> endif() >> >> >> >> add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX}) >> >> add_custom_target(do-foo ALL DEPENDS foo) >> >> >> >> >> >> However, this produces the following rule in the generated makefile: >> >> >> >> foo: >> >> $(CMAKE_COMMAND) -E cmake_progress_report >> /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) >> >> @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) >> --blue --bold "Generating foo" >> >> generate-foo ||\ echo\ "no\ big\ deal" >> >> >> >> Is there some way I can get cmake to not escape all of the >> >> spaces in the value of OR_RELAX? >> >> >> >> Thanks, >> >> B. >> >> >> >> >> ----------------------------------------------------------------------------------- >> >> This email message is for the sole use of the intended recipient(s) >> and may contain >> >> confidential information. Any unauthorized review, use, disclosure or >> distribution >> >> is prohibited. If you are not the intended recipient, please contact >> the sender by >> >> reply email and destroy all copies of the original message. >> >> >> ----------------------------------------------------------------------------------- >> >> -- >> >> >> >> 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 >> > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bnewcomb at nvidia.com Tue Jul 29 15:57:32 2014 From: bnewcomb at nvidia.com (Bill Newcomb) Date: Tue, 29 Jul 2014 12:57:32 -0700 Subject: [CMake] Spaces in a command In-Reply-To: References: <53D283DB.1020609@nvidia.com> <53D7E44C.1010003@nvidia.com> Message-ID: <53D7FCAC.1080704@nvidia.com> On linux, at least, this results in there being double quotes around the ||, which causes it to not be interpreted by the shell. B. On 07/29/2014 12:25 PM, Glenn Coombs wrote: > I think this works like you want: > > cmake_minimum_required(VERSION 2.6) > > set(DO_RELAX 1) > if(DO_RELAX) > set(OR_RELAX || echo \"no big deal\") > else() > set(OR_RELAX) > endif() > > add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX} VERBATIM) > add_custom_target(do-foo ALL DEPENDS foo) > > > -- > Glenn > > > On 29 July 2014 19:19, J Decker > wrote: > > can try removing the quotes and subst space for semicolon? > > > On Tue, Jul 29, 2014 at 11:13 AM, Bill Newcomb > wrote: > > That doesn't work either: > > foo: > $(CMAKE_COMMAND) -E cmake_progress_report > /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles > $(CMAKE_PROGRESS_1) > @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) > --blue --bold "Generating foo" > generate-foo "|| echo \"no big deal\"" > > The whole string gets passed as the first argument to generate-foo. > > B. > > On 07/25/2014 09:43 AM, Iosif Neitzke wrote: > > "If VERBATIM is given then all arguments to the commands will be > > escaped properly for the build tool so that the invoked command > > receives each argument unchanged. Note that one level of > escapes is > > still used by the CMake language processor before > add_custom_command > > even sees the arguments. Use of VERBATIM is recommended as it > enables > > correct behavior. When VERBATIM is not given the behavior is > platform > > specific because there is no protection of tool-specific special > > characters." > > > > > http://www.cmake.org/cmake/help/v3.0/command/add_custom_command.html > > > > On Fri, Jul 25, 2014 at 11:20 AM, Bill Newcomb > > wrote: > >> I want to add stuff to a custom command based on some > definition: > >> > >> cmake_minimum_required(VERSION 2.6) > >> > >> set(DO_RELAX 1) > >> if(DO_RELAX) > >> set(OR_RELAX "|| echo \"no big deal\"") > >> else() > >> set(OR_RELAX "") > >> endif() > >> > >> add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX}) > >> add_custom_target(do-foo ALL DEPENDS foo) > >> > >> > >> However, this produces the following rule in the generated > makefile: > >> > >> foo: > >> $(CMAKE_COMMAND) -E cmake_progress_report > /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles > $(CMAKE_PROGRESS_1) > >> @$(CMAKE_COMMAND) -E cmake_echo_color > --switch=$(COLOR) --blue --bold "Generating foo" > >> generate-foo ||\ echo\ "no\ big\ deal" > >> > >> Is there some way I can get cmake to not escape all of the > >> spaces in the value of OR_RELAX? > >> > >> Thanks, > >> B. > >> > >> > ----------------------------------------------------------------------------------- > >> This email message is for the sole use of the intended > recipient(s) and may contain > >> confidential information. Any unauthorized review, use, > disclosure or distribution > >> is prohibited. If you are not the intended recipient, > please contact the sender by > >> reply email and destroy all copies of the original message. > >> > ----------------------------------------------------------------------------------- > >> -- > >> > >> 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 > > > > -- > > 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 > > From eclark at ara.com Tue Jul 29 17:42:37 2014 From: eclark at ara.com (Eric Clark) Date: Tue, 29 Jul 2014 21:42:37 +0000 Subject: [CMake] file INSTALL cannot set modification time on... Message-ID: Hello All, I have had this problem with CMake for quite some time now. I have posted the question to this message board once before, but did not figure out a solution. Whenever I try to run cmake on a cmake_install.cmake file with all of the appropriate defines set, I always get at least one error where CMake "says it cannot set the modification time on a file..." This happens because the install has a bunch of install(DIRECTORY ...) commands and the usual install(TARGETS ...) commands. Everything looks great in the generated cmake_install.cmake file and if I run the command over and over again, it will eventually make it all the way through the install. However, this is not a pleasant workaround as I have to run cmake multiple times whenever I build my projects or build my installers. Sometimes it can take 10 to 20 times before I can get everything to copy over appropriately without errors. I have turned off all anti-virus and file scanning software, multi-processing, and all suggestions that were given to me before, but nothing seems to work. I have even installed older versions of CMake starting at 2.8.2 all the way up to 3.0.0. All of the CMake versions give me the same reproducible errors. If anyone has had this problem before or has any suggestions, please help... I can post my install files and batch scripts that I use to build the tree for my installer. Whatever you may need to help. I would really appreciate any help or suggestions as I have been trying to tackle this problem for almost a year now. Thank You, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Tue Jul 29 18:04:25 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Wed, 30 Jul 2014 00:04:25 +0200 Subject: [CMake] file INSTALL cannot set modification time on... In-Reply-To: References: Message-ID: <53D81A69.1040908@gmail.com> On 29.07.2014 23:42, Eric Clark wrote: > > Hello All, > > I have had this problem with CMake for quite some time now. I have > posted the question to this message board once before, but did not > figure out a solution. Whenever I try to run cmake on a > cmake_install.cmake file with all of the appropriate defines set, I > always get at least one error where CMake "says it cannot set the > modification time on a file..." This happens because the install has a > bunch of install(DIRECTORY ...) commands and the usual install(TARGETS > ...) commands. Everything looks great in the generated > cmake_install.cmake file and if I run the command over and over again, > it will eventually make it all the way through the install. However, > this is not a pleasant workaround as I have to run cmake multiple > times whenever I build my projects or build my installers. Sometimes > it can take 10 to 20 times before I can get everything to copy over > appropriately without errors. > > I have turned off all anti-virus and file scanning software, > multi-processing, and all suggestions that were given to me before, > but nothing seems to work. I have even installed older versions of > CMake starting at 2.8.2 all the way up to 3.0.0. All of the CMake > versions give me the same reproducible errors. > > If anyone has had this problem before or has any suggestions, please > help... I can post my install files and batch scripts that I use to > build the tree for my installer. Whatever you may need to help. I > would really appreciate any help or suggestions as I have been trying > to tackle this problem for almost a year now. > Hello again, sorry to hear that you haven't been able to fix this yet. If possible a self-contained and reduced (preferably plain CMake without any batch scripts and with as few files as possible) test case would be ideal to be able to reproduce and debug the issue. Dummy files for the install could be generated by CMake so that no additional large external files would be required for testing. Have you been able to reproduce the issue on multiple systems or has your testing been limited to a specific system? If you were able to test it on multiple systems has this failed on every test system or only on some of those? Nils -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lachlan.Hetherton at csiro.au Tue Jul 29 19:14:36 2014 From: Lachlan.Hetherton at csiro.au (Lachlan.Hetherton at csiro.au) Date: Tue, 29 Jul 2014 23:14:36 +0000 Subject: [CMake] Using CPack with OSX 10.9 In-Reply-To: <20140729150728.118585893@mail.rogue-research.com> Message-ID: Hi Sean, The confusion I am having about deploying in a .app is: 1. We currently ship with >1 executable. .app bundles are only supposed to have 1 executable (I think) 2. Our application is designed to allow others to build plug-ins for it. Not sure how this works if we deploy as a .app. Maybe we should be deploying as an umbrella framework or something similar? Thanks, Lachlan Hetherton Software Engineer (Visualisation) ? +613-9545-8041 On 7/30/14, 1:07 AM, "Sean McBride" wrote: >On Tue, 29 Jul 2014 01:06:26 +0000, Lachlan.Hetherton at csiro.au said: > >>I?m currently looking into the OSX Bundle generator, however, our >>application ships with multiple executables and a number of dependent >>libraries and frameworks, so I?m not quite sure whether this is the >>right way to go. From what I?ve read, OSX application bundles are >>supposed to have a single executable only ? how would I go about >>deploying an application that has multiple component applications? If we >>use the bundle generator, our application is going to look like this (I >>think), which seems strange: >> >>OurApplication.app/ >> Contents/ >> Info.plist >> MacOS/ >> executable1 >> Frameworks/ >> QtCore.framework >> QtGui.framework >> ? >> Resources/ >> bin/ >> executable1 >> executable2 >> ? >> lib/ >> non-framework dependencies > >What's strange about it? It's generally strongly preferred for an OS X >application to be self-contained in a .app. There are times when it's >not possible, which is maybe your case? What do you need to install >where? > >Cheers, > >-- >____________________________________________________________ >Sean McBride, B. Eng sean at rogue-research.com >Rogue Research www.rogue-research.com >Mac Software Developer Montr?al, Qu?bec, Canada From Lachlan.Hetherton at csiro.au Tue Jul 29 19:16:39 2014 From: Lachlan.Hetherton at csiro.au (Lachlan.Hetherton at csiro.au) Date: Tue, 29 Jul 2014 23:16:39 +0000 Subject: [CMake] Using CPack with OSX 10.9 In-Reply-To: Message-ID: Thanks Norman, Spot on ? definitely feeling like we?re running against the grain here. Will check out the Cmake package as that sounds like a good example. Cheers, Lachlan Hetherton Software Engineer (Visualisation) ? +613-9545-8041 From: "Williams, Norman K" > Date: Tue, 29 Jul 2014 17:18:10 +0000 To: Lachlan Hetherton >, "cmake at cmake.org" > Subject: Re: [CMake] Using CPack with OSX 10.9 I would look at how CMake itself is packaged for release. The ?one executable per App bundle? is Apple-centric thinking that luckily is not enforced. That isn?t how CMakes (or the OS X Emacs, e.g.) works. You can have whatever you want in an app bundle. It does means that after install, users need to add the directory inside the bundle to their PATH environment variable, if the extra programs are meant to be command line executables. You?d want whatever GUI program that is your main program to be the executable run when you open the app bundle. The problem is that what you?re trying to do doesn?t map neatly onto the Apple world, so you have to choose the least worst workaround. For that matter, using a compressed tar instead of an App Bundle would work too. From: "Lachlan.Hetherton at csiro.au" > Date: Monday, July 28, 2014 at 8:06 PM To: CMake Users > Subject: [CMake] Using CPack with OSX 10.9 Hi there, We?re looking to update our CMake packaging scripts so that we can deploy to OSX 10.9 Mavericks. For previous OSX releases, we have used the PackageMaker generator with CPack to create .pkg files inside .dmg files. I believe PackageMaker has now disappeared (I can?t run the old version on my current machine and there doesn?t seem to be a new version available anywhere), so I would like to ask you all: what is the preferred generator for deploying to OSX 10.9? I?m currently looking into the OSX Bundle generator, however, our application ships with multiple executables and a number of dependent libraries and frameworks, so I?m not quite sure whether this is the right way to go. From what I?ve read, OSX application bundles are supposed to have a single executable only ? how would I go about deploying an application that has multiple component applications? If we use the bundle generator, our application is going to look like this (I think), which seems strange: OurApplication.app/ Contents/ Info.plist MacOS/ executable1 Frameworks/ QtCore.framework QtGui.framework ? Resources/ bin/ executable1 executable2 ? lib/ non-framework dependencies Thanks for your help, Lachlan Hetherton Software Engineer (Visualisation) ? +613-9545-8041 ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zack.perry at sbcglobal.net Wed Jul 30 00:08:40 2014 From: zack.perry at sbcglobal.net (Zack Perry) Date: Tue, 29 Jul 2014 21:08:40 -0700 Subject: [CMake] Building cmake-3.0.0 rpm on CentOS 7.0 using cmake/cpack In-Reply-To: <1406653256.45072.YahooMailNeo@web181102.mail.ne1.yahoo.com> References: <1406653256.45072.YahooMailNeo@web181102.mail.ne1.yahoo.com> Message-ID: <1406693320.45058.YahooMailNeo@web181104.mail.ne1.yahoo.com> Please ignore the post. ?I found out what's wrong - human error :( I forgot to copy the modified CPackRPM.cmake to cmake's system Modules subdirectory. Problem solved. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ravi.raman at Xoriant.Com Wed Jul 30 00:37:35 2014 From: ravi.raman at Xoriant.Com (Ravi Raman) Date: Wed, 30 Jul 2014 04:37:35 +0000 Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Message-ID: Hi all, We have reported an issue. It is regarding conversion of existing Visual Studio .targets files to cmake. The link for the reported issues is as follows. http://www.cmake.org/Bug/view.php?id=15044 Kindly let us know if this can be done 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlrdave at aol.com Wed Jul 30 06:07:22 2014 From: dlrdave at aol.com (David Cole) Date: Wed, 30 Jul 2014 06:07:22 -0400 Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake In-Reply-To: References: Message-ID: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> The problem as reported, is that you're trying to use add_custom_target with a target named "test" -- but you can't do that with CMake because "test" is a built-in "well-known" predefined target name. Other so-called "well-known" target names include "all" "install" "package" and "package_source". And there may be others. If I can find a definitive documented list, I'll forward it... You can use any other name you like, but you should avoid the pre-defined target names that CMake already uses. HTH, David C. -----Original Message----- From: Ravi Raman To: cmake Sent: Wed, Jul 30, 2014 12:35 am Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Hi all, ? We have reported an issue. It is regarding conversion of existing Visual Studio .targets files to cmake. The link for the reported issues is as follows. http://www.cmake.org/Bug/view.php?id=15044 ? Kindly let us know if this can be done 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 30511111 ravi.raman at xoriant.com|?http://www.xoriant.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 From ravi.raman at Xoriant.Com Wed Jul 30 06:35:42 2014 From: ravi.raman at Xoriant.Com (Ravi Raman) Date: Wed, 30 Jul 2014 10:35:42 +0000 Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake In-Reply-To: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> References: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> Message-ID: <94d76fc0b98f4a21b758cfa7aa6a45c4@XORMUM-MBX02.India.XoriantCorp.com> Hi David, Thanks for the response. Sorry to use the cmake pre-defined word "test". My actual query was not this. I just used "test" as an example without realizing that it is actually a cmake pre-defined word. So, my actual query is as follows (2 points below): 1. In Microsoft Visual Studio project file module1.vcxproj, the targets file (target1.targets) gets included as follows: In target1.targets, there are multiple entries of various targets as follows: <....> <....> To achieve the same thing in cmake, in the CMakeLists.txt file of module ?module1? we are using the following command: add_custom_target() with the appropriate target names for the above i.e. we make 2 calls to add_custom_target() with target names Target_1 and Target_2 Is this the correct way to convert Visual Studio .targets file to cmake OR is there any other way ? 2. Also, if we take the above approach then for each call to add_custom_target(), a Visual Studio project file gets created under the module "module1". So, in this case there will be 2 vcxproject files created i.e. Target_1.vcxproj and Target_2.vcxproj created for module "module1". Please confirm if this is the expected behavior 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.com -----Original Message----- From: David Cole [mailto:dlrdave at aol.com] Sent: Wednesday, July 30, 2014 3:37 PM To: Ravi Raman; cmake at cmake.org Subject: Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake The problem as reported, is that you're trying to use add_custom_target with a target named "test" -- but you can't do that with CMake because "test" is a built-in "well-known" predefined target name. Other so-called "well-known" target names include "all" "install" "package" and "package_source". And there may be others. If I can find a definitive documented list, I'll forward it... You can use any other name you like, but you should avoid the pre-defined target names that CMake already uses. HTH, David C. -----Original Message----- From: Ravi Raman To: cmake Sent: Wed, Jul 30, 2014 12:35 am Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Hi all, We have reported an issue. It is regarding conversion of existing Visual Studio .targets files to cmake. The link for the reported issues is as follows. http://www.cmake.org/Bug/view.php?id=15044 Kindly let us know if this can be done 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ravi.raman at Xoriant.Com Wed Jul 30 06:43:27 2014 From: ravi.raman at Xoriant.Com (Ravi Raman) Date: Wed, 30 Jul 2014 10:43:27 +0000 Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake References: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> Message-ID: <3056ae878153436da4a35990db9632a1@XORMUM-MBX02.India.XoriantCorp.com> Hi David, Note that the targets file name is target1.targets. So, please read it as 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.com From: Ravi Raman Sent: Wednesday, July 30, 2014 4:06 PM To: 'David Cole' Cc: cmake at cmake.org Subject: RE: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Hi David, Thanks for the response. Sorry to use the cmake pre-defined word "test". My actual query was not this. I just used "test" as an example without realizing that it is actually a cmake pre-defined word. So, my actual query is as follows (2 points below): 1. In Microsoft Visual Studio project file module1.vcxproj, the targets file (target1.targets) gets included as follows: In target1.targets, there are multiple entries of various targets as follows: <....> <....> To achieve the same thing in cmake, in the CMakeLists.txt file of module ?module1? we are using the following command: add_custom_target() with the appropriate target names for the above i.e. we make 2 calls to add_custom_target() with target names Target_1 and Target_2 Is this the correct way to convert Visual Studio .targets file to cmake OR is there any other way ? 2. Also, if we take the above approach then for each call to add_custom_target(), a Visual Studio project file gets created under the module "module1". So, in this case there will be 2 vcxproject files created i.e. Target_1.vcxproj and Target_2.vcxproj created for module "module1". Please confirm if this is the expected behavior 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.com -----Original Message----- From: David Cole [mailto:dlrdave at aol.com] Sent: Wednesday, July 30, 2014 3:37 PM To: Ravi Raman; cmake at cmake.org Subject: Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake The problem as reported, is that you're trying to use add_custom_target with a target named "test" -- but you can't do that with CMake because "test" is a built-in "well-known" predefined target name. Other so-called "well-known" target names include "all" "install" "package" and "package_source". And there may be others. If I can find a definitive documented list, I'll forward it... You can use any other name you like, but you should avoid the pre-defined target names that CMake already uses. HTH, David C. -----Original Message----- From: Ravi Raman To: cmake Sent: Wed, Jul 30, 2014 12:35 am Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Hi all, We have reported an issue. It is regarding conversion of existing Visual Studio .targets files to cmake. The link for the reported issues is as follows. http://www.cmake.org/Bug/view.php?id=15044 Kindly let us know if this can be done 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlrdave at aol.com Wed Jul 30 06:48:23 2014 From: dlrdave at aol.com (David Cole) Date: Wed, 30 Jul 2014 06:48:23 -0400 Subject: [CMake] Ctest and custom measurements Message-ID: <8D179FAEB51AD93-1AB8-76EB@webmail-va013.sysops.aol.com> Unfortunately, I always have to resort to source code analysis to figure this stuff out... NamedMeasurement is only mentioned in the file Source/CTest/cmCTestTestHandler.cxx : http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestTestHandler.cxx;hb=refs/heads/master (search the page for NamedMeasurement, and see the function cmCTestTestHandler::GenerateRegressionImages in particular...) Transform your output (if you can) into using "DartMeasurement" style XML tags as shown in this post from 4 years ago: http://www.cmake.org/pipermail/cmake/2010-April/036574.html Quoting from that 4-year-old post: To send a number (for example, 42) as a measurement named "Simple", try printing output like this on stdout: 42 3.14159 CTest should parse the DartMeasurement tags from the output and generate the NamedMeasurement XML that CDash is expecting. It is a little bit ridiculous to use the legacy format in the output, which ctest recognizes, and then transforms into what CDash needs, but it is what is necessary at the moment. You are trying to send what CDash needs directly, but it gets encoded into the "output" of the test, rather than recognized like the legacy format.... One of these days, perhaps an easier way will find its way into the source code. For now, try the legacy technique and let us know if it works out for you. HTH, David C. -----Original Message----- From: ycollette.nospam To: cmake Sent: Tue, Jul 29, 2014 10:44 am Subject: [CMake] Ctest and custom measurements Hello, I've got an executable built using cmake. I use ctest to test my executable. Each time the executable is executed, a log file on std::cout is produced. I the log file, I added the following XML tags: 0.33 I don't see these named measurements in the xml file produced by ctest -D NighlyStart ; ctest -D NighlyTest I use cmake-2.8.12.2 under Fedora 20 64 bits. Is it possible to add custom measurements in the xml file generated by ctest ? Best regards, YC From ycollette.nospam at free.fr Wed Jul 30 07:01:31 2014 From: ycollette.nospam at free.fr (ycollette.nospam at free.fr) Date: Wed, 30 Jul 2014 13:01:31 +0200 (CEST) Subject: [CMake] Ctest and custom measurements In-Reply-To: <8D179FAEB51AD93-1AB8-76EB@webmail-va013.sysops.aol.com> Message-ID: <1020421077.136188.1406718091216.JavaMail.root@zimbra35-e6.priv.proxad.net> Thanks for the answer. After some trial, I found that I must use and not . I also found that to build a correct measurement, the opening tag must be at the beginning of the line, not in the middle: Log message - date - 0.1 -> DOESN'T WORK 0.1 -> WORK (I just removed the "Log message - date - " part) YC ----- Mail original ----- De: "David Cole" ?: "ycollette nospam" , cmake at cmake.org Envoy?: Mercredi 30 Juillet 2014 12:48:23 Objet: Re: [CMake] Ctest and custom measurements Unfortunately, I always have to resort to source code analysis to figure this stuff out... NamedMeasurement is only mentioned in the file Source/CTest/cmCTestTestHandler.cxx : http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestTestHandler.cxx;hb=refs/heads/master (search the page for NamedMeasurement, and see the function cmCTestTestHandler::GenerateRegressionImages in particular...) Transform your output (if you can) into using "DartMeasurement" style XML tags as shown in this post from 4 years ago: http://www.cmake.org/pipermail/cmake/2010-April/036574.html Quoting from that 4-year-old post: To send a number (for example, 42) as a measurement named "Simple", try printing output like this on stdout: 42 3.14159 CTest should parse the DartMeasurement tags from the output and generate the NamedMeasurement XML that CDash is expecting. It is a little bit ridiculous to use the legacy format in the output, which ctest recognizes, and then transforms into what CDash needs, but it is what is necessary at the moment. You are trying to send what CDash needs directly, but it gets encoded into the "output" of the test, rather than recognized like the legacy format.... One of these days, perhaps an easier way will find its way into the source code. For now, try the legacy technique and let us know if it works out for you. HTH, David C. -----Original Message----- From: ycollette.nospam To: cmake Sent: Tue, Jul 29, 2014 10:44 am Subject: [CMake] Ctest and custom measurements Hello, I've got an executable built using cmake. I use ctest to test my executable. Each time the executable is executed, a log file on std::cout is produced. I the log file, I added the following XML tags: 0.33 I don't see these named measurements in the xml file produced by ctest -D NighlyStart ; ctest -D NighlyTest I use cmake-2.8.12.2 under Fedora 20 64 bits. Is it possible to add custom measurements in the xml file generated by ctest ? Best regards, YC From ravi.raman at Xoriant.Com Wed Jul 30 08:57:56 2014 From: ravi.raman at Xoriant.Com (Ravi Raman) Date: Wed, 30 Jul 2014 12:57:56 +0000 Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake In-Reply-To: <3056ae878153436da4a35990db9632a1@XORMUM-MBX02.India.XoriantCorp.com> References: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> <3056ae878153436da4a35990db9632a1@XORMUM-MBX02.India.XoriantCorp.com> Message-ID: Hi David, Can you refer to the query in the mails below (2 points are mentioned). Please let us know your comments when you get time. 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.com From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Ravi Raman Sent: Wednesday, July 30, 2014 4:13 PM To: David Cole Cc: cmake at cmake.org Subject: Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Hi David, Note that the targets file name is target1.targets. So, please read it as 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.com From: Ravi Raman Sent: Wednesday, July 30, 2014 4:06 PM To: 'David Cole' Cc: cmake at cmake.org Subject: RE: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Hi David, Thanks for the response. Sorry to use the cmake pre-defined word "test". My actual query was not this. I just used "test" as an example without realizing that it is actually a cmake pre-defined word. So, my actual query is as follows (2 points below): 1. In Microsoft Visual Studio project file module1.vcxproj, the targets file (target1.targets) gets included as follows: In target1.targets, there are multiple entries of various targets as follows: <....> <....> To achieve the same thing in cmake, in the CMakeLists.txt file of module ?module1? we are using the following command: add_custom_target() with the appropriate target names for the above i.e. we make 2 calls to add_custom_target() with target names Target_1 and Target_2 Is this the correct way to convert Visual Studio .targets file to cmake OR is there any other way ? 2. Also, if we take the above approach then for each call to add_custom_target(), a Visual Studio project file gets created under the module "module1". So, in this case there will be 2 vcxproject files created i.e. Target_1.vcxproj and Target_2.vcxproj created for module "module1". Please confirm if this is the expected behavior 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.com -----Original Message----- From: David Cole [mailto:dlrdave at aol.com] Sent: Wednesday, July 30, 2014 3:37 PM To: Ravi Raman; cmake at cmake.org Subject: Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake The problem as reported, is that you're trying to use add_custom_target with a target named "test" -- but you can't do that with CMake because "test" is a built-in "well-known" predefined target name. Other so-called "well-known" target names include "all" "install" "package" and "package_source". And there may be others. If I can find a definitive documented list, I'll forward it... You can use any other name you like, but you should avoid the pre-defined target names that CMake already uses. HTH, David C. -----Original Message----- From: Ravi Raman To: cmake Sent: Wed, Jul 30, 2014 12:35 am Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake Hi all, We have reported an issue. It is regarding conversion of existing Visual Studio .targets files to cmake. The link for the reported issues is as follows. http://www.cmake.org/Bug/view.php?id=15044 Kindly let us know if this can be done 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ycollette.nospam at free.fr Wed Jul 30 09:07:39 2014 From: ycollette.nospam at free.fr (ycollette.nospam at free.fr) Date: Wed, 30 Jul 2014 15:07:39 +0200 (CEST) Subject: [CMake] Ctest and custom measurements In-Reply-To: <1020421077.136188.1406718091216.JavaMail.root@zimbra35-e6.priv.proxad.net> Message-ID: <1542352589.308697.1406725659748.JavaMail.root@zimbra35-e6.priv.proxad.net> By the way, this should be better documented in the cmake / ctest documentation. And we should be allowed to add measurements like these in the log: Log message - date - 0.1 Do I fill a bug report for this ? YC ----- Mail original ----- De: "ycollette nospam" ?: "David Cole" Cc: cmake at cmake.org Envoy?: Mercredi 30 Juillet 2014 13:01:31 Objet: Re: [CMake] Ctest and custom measurements Thanks for the answer. After some trial, I found that I must use and not . I also found that to build a correct measurement, the opening tag must be at the beginning of the line, not in the middle: Log message - date - 0.1 -> DOESN'T WORK 0.1 -> WORK (I just removed the "Log message - date - " part) YC ----- Mail original ----- De: "David Cole" ?: "ycollette nospam" , cmake at cmake.org Envoy?: Mercredi 30 Juillet 2014 12:48:23 Objet: Re: [CMake] Ctest and custom measurements Unfortunately, I always have to resort to source code analysis to figure this stuff out... NamedMeasurement is only mentioned in the file Source/CTest/cmCTestTestHandler.cxx : http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestTestHandler.cxx;hb=refs/heads/master (search the page for NamedMeasurement, and see the function cmCTestTestHandler::GenerateRegressionImages in particular...) Transform your output (if you can) into using "DartMeasurement" style XML tags as shown in this post from 4 years ago: http://www.cmake.org/pipermail/cmake/2010-April/036574.html Quoting from that 4-year-old post: To send a number (for example, 42) as a measurement named "Simple", try printing output like this on stdout: 42 3.14159 CTest should parse the DartMeasurement tags from the output and generate the NamedMeasurement XML that CDash is expecting. It is a little bit ridiculous to use the legacy format in the output, which ctest recognizes, and then transforms into what CDash needs, but it is what is necessary at the moment. You are trying to send what CDash needs directly, but it gets encoded into the "output" of the test, rather than recognized like the legacy format.... One of these days, perhaps an easier way will find its way into the source code. For now, try the legacy technique and let us know if it works out for you. HTH, David C. -----Original Message----- From: ycollette.nospam To: cmake Sent: Tue, Jul 29, 2014 10:44 am Subject: [CMake] Ctest and custom measurements Hello, I've got an executable built using cmake. I use ctest to test my executable. Each time the executable is executed, a log file on std::cout is produced. I the log file, I added the following XML tags: 0.33 I don't see these named measurements in the xml file produced by ctest -D NighlyStart ; ctest -D NighlyTest I use cmake-2.8.12.2 under Fedora 20 64 bits. Is it possible to add custom measurements in the xml file generated by ctest ? Best regards, YC -- 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 From norman-k-williams at uiowa.edu Wed Jul 30 11:06:13 2014 From: norman-k-williams at uiowa.edu (Williams, Norman K) Date: Wed, 30 Jul 2014 15:06:13 +0000 Subject: [CMake] adding command line flags for CMAKE_MAKE_PROGRAM Message-ID: I was trying to get ExternalProjects generated with the Ninja generator to do a better job of handling multiple CPUs and load, so I tried the na?ve solution below. I needed to add flags to the program named in CMAKE_MAKE_PROGRAM. This is difficult because CMAKE_MAKE_PROGRAM is a string; I can pass it as part of an ExternalProjects? CMAKE_ARGS, but then the resulting build tries to run ?/usr/bin/ninja ?j 32? as the command, instead of adding ?j 32 to ninja?s command line. Any ideas, or am I asking for a CMAKE_MAKE_PROGRAM_FLAGS command? Or to modify the generator? the only alternative is to explicitly set the BUILD_COMMAND for every ExternalProject_add command. #------------------------------ # For ninja generator, propagate ninja flags #------------------------------ if(CMAKE_GENERATOR MATCHES ".*Ninja.*") if(NOT DEFINED PROCESSOR_COUNT) # Unknown: set(PROCESSOR_COUNT 1) # Linux: if(CMAKE_SYSTEM_NAME MATCHES ".*Linux.*") set(cpuinfo_file "/proc/cpuinfo") if(EXISTS "${cpuinfo_file}") file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$") list(LENGTH procs PROCESSOR_COUNT) endif() # Mac: elseif(APPLE) find_program(cmd_sys_pro "system_profiler") if(cmd_sys_pro) execute_process(COMMAND ${cmd_sys_pro} OUTPUT_VARIABLE info) string(REGEX REPLACE "^.*Total Number Of Cores: ([0-9]+).*$" "\\1" PROCESSOR_COUNT "${info}") endif() # Windows: elseif(WIN32) set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}") endif() endif() set(CMAKE_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM} -l ${PROCESSOR_COUNT}) endif() ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Wed Jul 30 11:35:47 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 30 Jul 2014 11:35:47 -0400 Subject: [CMake] ExternalProject: adding command line flags for CMAKE_MAKE_PROGRAM In-Reply-To: References: Message-ID: <53D910D3.1030209@kitware.com> On 07/30/2014 11:06 AM, Williams, Norman K wrote: > I was trying to get ExternalProjects generated with the Ninja > generator to do a better job of handling multiple CPUs and load, > so I tried the na?ve solution below. For reference in the archives, your previous post about this was here: CMake, Ninja generator, and ExternalProjects http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10543 > I needed to add flags to the program named in CMAKE_MAKE_PROGRAM. The relevant part of the ExternalProject module source is the block that constructs the default BUILD_COMMAND when not using a Makefile generator: # Drive the project with "cmake --build". get_target_property(cmake_command ${name} _EP_CMAKE_COMMAND) if(cmake_command) set(cmd "${cmake_command}") else() set(cmd "${CMAKE_COMMAND}") endif() set(args --build ${binary_dir} --config ${CMAKE_CFG_INTDIR}) At build time, "cmake --build" loads the CMAKE_MAKE_PROGRAM from the CMakeCache.txt of the build tree, at least for the Ninja generator. When running "cmake --build" by hand one can specify additional args: cmake --build . -- $ExtraArgs Everything after the "--" option will be given to the native tool. Perhaps one could add a special-case here when cmake_generator is "Ninja" to extend the "cmake --build" command with th needed options to ninja. > the only alternative is to explicitly set the BUILD_COMMAND for > every ExternalProject_add command. That would also work with existing CMake releases, but would have to be conditional on the generator in use. -Brad From Fabien.Spindler at inria.fr Wed Jul 30 11:41:59 2014 From: Fabien.Spindler at inria.fr (Fabien Spindler) Date: Wed, 30 Jul 2014 17:41:59 +0200 Subject: [CMake] How to find a work arround with CMP0026 policy Message-ID: <53D91247.8010809@inria.fr> Hi, I'm not able to find a good way to modify my cmake files to consider CMP0026 policy introduced in cmake 3.0.0. I have a project that create a library libfoo and FooConfig.cmake file that allows to use my library as a 3rd party. In FooConfig.cmake updated during configuration time, I need to set FOO_LIBRARIES with the full path and name of the library in debug and release. To get the library names, I use the target location property. Since cmake 3.0.0 this seems a bad idea. CMake Warning (dev) at CMakeLists.txt:8 (get_target_property): Policy CMP0026 is not set: Disallow use of the LOCATION target property. CMake Warning (dev) at CMakeLists.txt:9 (get_target_property): Policy CMP0026 is not set: Disallow use of the LOCATION target property. Here is a small example that reproduces the behavior. -- Begin CMakeLists.txt -- project(test) cmake_minimum_required(VERSION 2.6) add_library(foo foo.cpp) get_target_property(FOO_LIBNAME_DBG foo LOCATION_Debug) get_target_property(FOO_LIBNAME_OPT foo LOCATION_Release) get_filename_component(FOO_LIBNAME_DBG "${FOO_LIBNAME_DBG}" NAME) get_filename_component(FOO_LIBNAME_OPT "${FOO_LIBNAME_OPT}" NAME) configure_file(FooConfig.cmake.in FooConfig.cmake) -- End CMakeLists.txt -- -- Begin FooConfig.cmake.in -- set(FOO_SOURCE_DIR @CMAKE_SOURCE_DIR@) set(FOO_LIBNAME_DBG "@FOO_LIBNAME_DBG@") set(FOO_LIBNAME_OPT "@FOO_LIBNAME_OPT@") set(FOO_LIBRARIES debug @CMAKE_INSTALL_PREFIX@/lib/${FOO_LIBNAME_DBG} optimized @CMAKE_INSTALL_PREFIX@/lib/${FOO_LIBNAME_OPT}) -- End FooConfig.cmake.in -- Adding the following lines in my CMakeLists.txt seems not the best way to ensure compat with future versions of CMake. if(POLICY CMP0026) cmake_policy(SET CMP0026 OLD) endif() I tried also to play with add_custom_command() using $ But I cand find any command that set a variable Any idea ? Thanks Fabien -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlrdave at aol.com Wed Jul 30 11:42:07 2014 From: dlrdave at aol.com (David Cole) Date: Wed, 30 Jul 2014 11:42:07 -0400 Subject: [CMake] Ctest and custom measurements Message-ID: <8D17A23F3DEF8A3-26BC-11E0A@webmail-vm027.sysops.aol.com> > By the way, this should be better documented in the cmake / ctest > documentation. > And we should be allowed to add measurements like these in the log: > Log message - date - 0.1 I agree on both points. I would go even farther and say what you were trying to do originally should have "just worked"... > Do I fill a bug report for this ? You can. Although it would be more effective if you could contribute a patch to improve the docs, or to implement the code required to improve the DartMeasurement parsing so it's not necessarily at the beginning of the line, or even to accept "NamedMeasurement" values directly from the output... Are you able to submit patches that do any of this? Do you have the time or the inclination? :-) David C. From groleo at gmail.com Wed Jul 30 11:51:15 2014 From: groleo at gmail.com (Adrian M Negreanu) Date: Wed, 30 Jul 2014 18:51:15 +0300 Subject: [CMake] Is it possible for a dependee to use the dependency LINKER_FLAGS ? Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlrdave at aol.com Wed Jul 30 11:52:09 2014 From: dlrdave at aol.com (David Cole) Date: Wed, 30 Jul 2014 11:52:09 -0400 Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake In-Reply-To: References: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> <3056ae878153436da4a35990db9632a1@XORMUM-MBX02.India.XoriantCorp.com> Message-ID: <8D17A255B13AD2A-26BC-11F0C@webmail-vm027.sysops.aol.com> To the best of my knowledge, CMake does not do anything with ".targets" files. It doesn't know what they are, and it doesn't generate any of them... What is the function of the .targets files in your non-CMake build system? Perhaps somebody else who is more familiar with .targets files is listening and can chime in. I'm not sure what to recommend for you. add_custom_target and add_custom_command are commands you can use to organize and execute custom build steps (as opposed to compiling source files as part of an add_library or add_executable) Maybe.... with the build system you can generate using CMake, you won't even need the .targets files anymore. If you do need them, I'd be curious to learn what it is your .targets file do and why you still need them. HTH, David C. From ycollette.nospam at free.fr Wed Jul 30 12:07:08 2014 From: ycollette.nospam at free.fr (ycollette.nospam at free.fr) Date: Wed, 30 Jul 2014 18:07:08 +0200 (CEST) Subject: [CMake] Ctest and custom measurements In-Reply-To: <8D17A23F3DEF8A3-26BC-11E0A@webmail-vm027.sysops.aol.com> Message-ID: <878735249.541918.1406736428949.JavaMail.root@zimbra35-e6.priv.proxad.net> OK, I will try to make a patch. YC ----- Mail original ----- De: "David Cole" ?: "ycollette nospam" Cc: cmake at cmake.org Envoy?: Mercredi 30 Juillet 2014 17:42:07 Objet: Re: [CMake] Ctest and custom measurements > By the way, this should be better documented in the cmake / ctest > documentation. > And we should be allowed to add measurements like these in the log: > Log message - date - 0.1 I agree on both points. I would go even farther and say what you were trying to do originally should have "just worked"... > Do I fill a bug report for this ? You can. Although it would be more effective if you could contribute a patch to improve the docs, or to implement the code required to improve the DartMeasurement parsing so it's not necessarily at the beginning of the line, or even to accept "NamedMeasurement" values directly from the output... Are you able to submit patches that do any of this? Do you have the time or the inclination? :-) David C. From ghleclerc at gmail.com Wed Jul 30 14:59:46 2014 From: ghleclerc at gmail.com (Ghyslain Leclerc) Date: Wed, 30 Jul 2014 14:59:46 -0400 Subject: [CMake] Variable shadowing between scope, cache and command line argument Message-ID: Hello, First post here. ?Sorry if its too long. ?Simply trying to be as clear as I can be. I am trying to make sense of the various ways to set a variable and how one can shadow the other. ?Long story short, I am trying to get the following behaviour for a variable in a script: ? 1 - check if MYVAR exists ? ? ? ? ? 1.1 - If it does, test its validity and set a second variable named MYVAR_VALID to TRUE or FALSE ? 2 - if MYVAR does not exist or if MYVAR_VALID is FALSE, inspect system for information and set MYVAR (with FORCE in the cache) and MYVAR_VALID (not in cache, but does not seem to make a difference). Hope this is written clearly enough to be understood. ?Sorry, english is not my first language. ?Anyhow, I get the following behaviour easily except in one case, which is the reason for my question. ?These are the cases I have tested : - Start with empty cache and call ccmake. ?Then, MYVAR does not exist. ?My script inspects the system, sets the value, sets MYVAR_VALID to TRUE and stops. ?On successive runs, the variable is defined and valid, so the system is not inspected again. ?Everything is fine. - Start with empty cache. ?Run it once, but can?t find a valid entry (or find a wrong one somehow, but that?s practically impossible since the code in my script to inspect the system and to test the variable are basically the same. ?I digress, sorry). ?Set MYVAR_VALID to FALSE. ?User can set the value to a valid one and on next run, the script will set MYVAR_VALID to TRUE and then, we are back to variable defined and valid. ?Everything is fine. - Start with "non-empty cache" because ccmake (or cmake) is called with -DMYVAR:PATH="/Users/?, for instance. ?If the value set on command line is fine, then MYVAR_VALID will be set to TRUE on the first run and no system inspection is necessary. ?The value is now set and valid. ?Everything is fine. Now, for my problem : - Start with "non-empty cache" because ccmake (or cmake) is called with -DMYVAR:PATH="/Users/?, for instance. ?But this time, the value is not a valid one. ?Then, the variable is defined but not valid. ?So on the first run, the script will inspect the system. ?If it can find a valid value, I would like my script to override the variable with the valid one. Then, set to valid and so on and so forth... I have not been able to do this. ?I can find the correct value, I can set the new value, but it is not used. ?I mean by that that I have inspected the CMakeCache.txt file and when I call ccmake, the cache contains the value set on the command line. ?Then, I launch my cmake script and output the values of MYVAR and MYVAR_VALID and they are respectively the one of the command line and FALSE. ?Then, I find the correct value for MYVAR and try and set it. ?When I inspect the cache, it seems the value has effectively been overwritten. ?But when I try to output the new variables, it seems to remain stuck at the value provided on the command line. ?I have tried using unset( MYVAR ) in scope, in the parent scope and in the CACHE before setting the new value. ?Still, the old value is outputted. ?The only way to get the new value is to close ccmake and launch it again. Now if you?re still following (I am sorry, a bit complicated to follow I?m afraid, trying to be thourough), I guess my question is: Is this normal behaviour ? ? Is there something I am missing or is it simply how CMake works and I should simply tell my users to either initially set the right value or restart their ccmake. I haven?t tested this on Windows with CMake-GUI yet. ?I might have time to do it a little later. Anyhow, if anybody has the courage to read through my mail and try and help me, thanks a million. Ghyslain -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Wed Jul 30 15:31:34 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Wed, 30 Jul 2014 21:31:34 +0200 Subject: [CMake] How to find a work arround with CMP0026 policy In-Reply-To: <53D91247.8010809@inria.fr> References: <53D91247.8010809@inria.fr> Message-ID: <53D94816.9070204@gmail.com> On 30.07.2014 17:41, Fabien Spindler wrote: > Hi, > > I'm not able to find a good way to modify my cmake files to consider > CMP0026 policy introduced in cmake 3.0.0. > > I have a project that create a library libfoo and FooConfig.cmake file > that allows to use my library as a 3rd party. > In FooConfig.cmake updated during configuration time, I need to set > FOO_LIBRARIES with the full path and name of the library in debug and > release. To get the library names, I use the target location property. > Since cmake 3.0.0 this seems a bad idea. > > CMake Warning (dev) at CMakeLists.txt:8 (get_target_property): > Policy CMP0026 is not set: Disallow use of the LOCATION target property. > CMake Warning (dev) at CMakeLists.txt:9 (get_target_property): > Policy CMP0026 is not set: Disallow use of the LOCATION target property. > > Here is a small example that reproduces the behavior. > > -- Begin CMakeLists.txt -- > project(test) > cmake_minimum_required(VERSION 2.6) > add_library(foo foo.cpp) > get_target_property(FOO_LIBNAME_DBG foo LOCATION_Debug) > get_target_property(FOO_LIBNAME_OPT foo LOCATION_Release) > get_filename_component(FOO_LIBNAME_DBG "${FOO_LIBNAME_DBG}" NAME) > get_filename_component(FOO_LIBNAME_OPT "${FOO_LIBNAME_OPT}" NAME) > configure_file(FooConfig.cmake.in FooConfig.cmake) > -- End CMakeLists.txt -- > > -- Begin FooConfig.cmake.in -- > set(FOO_SOURCE_DIR @CMAKE_SOURCE_DIR@) > set(FOO_LIBNAME_DBG "@FOO_LIBNAME_DBG@") > set(FOO_LIBNAME_OPT "@FOO_LIBNAME_OPT@") > set(FOO_LIBRARIES debug @CMAKE_INSTALL_PREFIX@/lib/${FOO_LIBNAME_DBG} optimized @CMAKE_INSTALL_PREFIX@/lib/${FOO_LIBNAME_OPT}) > -- End FooConfig.cmake.in -- > > Adding the following lines in my CMakeLists.txt seems not the best way > to ensure compat with future versions of CMake. > > if(POLICY CMP0026) > cmake_policy(SET CMP0026 OLD) > endif() > > I tried also to play with add_custom_command() using > $ > But I cand find any command that set a variable > > Any idea ? > > Thanks > Fabien You could use file(GENERATE) [1] with the TARGET_FILE (_NAME, _DIR) [2] generator expressions (one file per configuration). Or use export() [3] to export your targets for use in your build directory package configuration file. You could then add those targets to FOO_LIBRARIES instead of the full paths. [1] http://www.cmake.org/cmake/help/v3.0/command/file.html [2] http://www.cmake.org/cmake/help/v3.0/manual/cmake-generator-expressions.7.html#informational-expressions [3] http://www.cmake.org/cmake/help/v3.0/command/export.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrosensw at gmail.com Wed Jul 30 15:42:18 2014 From: jrosensw at gmail.com (Joseph Rosensweig) Date: Wed, 30 Jul 2014 12:42:18 -0700 Subject: [CMake] CMAKE changing Visual Studio Settings In-Reply-To: References: <53CCB7EB.1040501@gmail.com> Message-ID: Thanks for all the help on this topic. The user file generation worked like a charm. Really helped out a lot. Thanks to Nils as well for the great advice. This makes my MSVC projects much more manageable. Thanks! On Tue, Jul 22, 2014 at 2:12 PM, Eric Clark wrote: > > > > -----Original Message----- > > From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of John > > Drescher > > Sent: Monday, July 21, 2014 3:55 PM > > To: Joseph Rosensweig > > Cc: CMake ML > > Subject: Re: [CMake] CMAKE changing Visual Studio Settings > > > > > So CMAKE can't control the options int he *.user files I guess :-\? > > > Would a potential workaround be to find a command line tool that can > > > edit these and run it as a post-build script? > > > > CMake gives you the functionality needed to edit these via your own > script. I > > mean reading and writing files replacing text. > > In our CMake system, we wanted to be able to set the program to execute > when "Start Debugging" was clicked in Visual Studio. This option is stored > in the *.user file and thus you cannot change it via CMake directly. > However, you CAN build a template of the *.user file and put some CMake > variables inside of it. Then, when you build the project files with CMake, > you can use the configure_file command to create the user's *.user file > from the template and the values you have for each variable in the > template. This option works beautifully and it is very easy to setup. > > Hope this helps... > Eric > > > > > John > > -- > > > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eclark at ara.com Wed Jul 30 15:55:59 2014 From: eclark at ara.com (Eric Clark) Date: Wed, 30 Jul 2014 19:55:59 +0000 Subject: [CMake] CMAKE changing Visual Studio Settings In-Reply-To: References: <53CCB7EB.1040501@gmail.com> Message-ID: No problem at all Joseph! I am glad to hear that you got it working! Thanks - Eric From: anoneironaut at gmail.com [mailto:anoneironaut at gmail.com] On Behalf Of Joseph Rosensweig Sent: Wednesday, July 30, 2014 2:42 PM To: Eric Clark Cc: John Drescher; CMake ML Subject: Re: [CMake] CMAKE changing Visual Studio Settings Thanks for all the help on this topic. The user file generation worked like a charm. ?Really helped out a lot. Thanks to Nils as well for the great advice. ?This makes my MSVC projects much more manageable. Thanks! On Tue, Jul 22, 2014 at 2:12 PM, Eric Clark wrote: > -----Original Message----- > From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of John > Drescher > Sent: Monday, July 21, 2014 3:55 PM > To: Joseph Rosensweig > Cc: CMake ML > Subject: Re: [CMake] CMAKE changing Visual Studio Settings > > > So CMAKE can't control the options int he *.user files I guess :-\? > > Would a potential workaround be to find a command line tool that can > > edit these and run it as a post-build script? > > CMake gives you the functionality needed to edit these via your own script. I > mean reading and writing files replacing text. In our CMake system, we wanted to be able to set the program to execute when "Start Debugging" was clicked in Visual Studio. This option is stored in the *.user file and thus you cannot change it via CMake directly. However, you CAN build a template of the *.user file and put some CMake variables inside of it. Then, when you build the project files with CMake, you can use the configure_file command to create the user's *.user file from the template and the values you have for each variable in the template. This option works beautifully and it is very easy to setup. Hope this helps... Eric > > John > -- > > 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 From leek2 at llnl.gov Wed Jul 30 19:21:32 2014 From: leek2 at llnl.gov (Leek, Jim) Date: Wed, 30 Jul 2014 23:21:32 +0000 Subject: [CMake] setup enviroment for all tests Message-ID: <6B554E87D42BA74AB76EC1D40C57A0DA75C13860@PRDEXMBX-06.the-lab.llnl.gov> I recently converted my project to configure with cmake, and am now trying to get the tests to run under ctest. I may be doing this completely incorrectly, so let me know if anything you see below looks like a bad idea. All my tests use a particular program to check the output of the tests against the correct output. The tests output in a particular format, so I have to use a particular 'diff' program to compare them. This program was not developed by me, and is not part of the project. So, I wrote a FindXXXX.cmake file to find the program and supply the location. So, I have the path to the diff program as XXXX_BINDIR. My tests are all driven by a generic script. This script takes a couple of command line arguments to get the important paths for running the test and checking the results. Like this: add_test (test1 ${TEST_SCRIPT_DIR}/test.sh ${PROJECT_BINARY_DIR}/bin/meos ${CMAKE_CURRENT_SOURCE_DIR} test1.input) If it's not obvious, test.sh is the test script. The first argument is the path to the binary I'm testing, the second is the directory where both the input files and expected output files can be found, and the last is the name of the input for this test. So, I could pass the path to the 'diff' program as another command line argument, but that's already beginning to become cumbersome. It's seems more reasonable just to stick it in the system PATH variable. I can do that like this: set_property(TEST test1 PROPERTY ENVIRONMENT PATH="${XXXX_BINDIR}:$ENV{PATH}") The only annoying thing is, I have to have that line for EVERY test. I have lots of tests. I would rather set that path for ALL the tests. But I can't seem to find a way to do that. This doesn't work: set_property(GLOBAL PROPERTY ENVIRONMENT PATH="${XXXX_BINDIR}:$ENV{PATH}") Is there a way to set up the environment for all the tests in one line? Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From samoilov at gmail.com Wed Jul 30 21:00:28 2014 From: samoilov at gmail.com (Denis Samoilov) Date: Wed, 30 Jul 2014 18:00:28 -0700 Subject: [CMake] [CPack] rpm and installing scripts and creating folders Message-ID: hi community, i need to install init.d script along in my rpm. as I see in spec file simple: install(FILES ${CMAKE_SOURCE_DIR}/scripts/${PROJECT_NAME} DESTINATION /etc/init.d PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) works fine. but it adds %config for some unknown reason in spec: %config "/etc/init.d/cacheproxyd" I install my config file similar way: install(FILES ${CMAKE_SOURCE_DIR}/conf/static.conf DESTINATION conf PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) but it results differently in spec: %dir "/box/services/cacheproxyd/conf" "/box/services/cacheproxyd/conf/static.conf" why is this difference? also, i want to precreate some folders, like install(DIRECTORY DESTINATION "/var/run/cacheproxyd" DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_WRITE GROUP_READ WORLD_WRITE WORLD_READ WORLD_EXECUTE) but it also for some unknown reason results as %config: %config "/var/run/cacheproxyd/" i would expect just: %dir "/box/services/cacheproxyd" my cmake is 2.8.12, CentOS Any insight will be appreciated. -denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Thu Jul 31 03:05:16 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 31 Jul 2014 09:05:16 +0200 Subject: [CMake] setup enviroment for all tests In-Reply-To: <6B554E87D42BA74AB76EC1D40C57A0DA75C13860@PRDEXMBX-06.the-lab.llnl.gov> References: <6B554E87D42BA74AB76EC1D40C57A0DA75C13860@PRDEXMBX-06.the-lab.llnl.gov> Message-ID: <53D9EAAC.7030800@gmail.com> On 07/31/2014 01:21 AM, Leek, Jim wrote: > I recently converted my project to configure with cmake, and am now > trying to get the tests to run under ctest. I may be doing this > completely incorrectly, so let me know if anything you see below looks > like a bad idea. > > All my tests use a particular program to check the output of the tests > against the correct output. The tests output in a particular format, so > I have to use a particular 'diff' program to compare them. This program > was not developed by me, and is not part of the project. So, I wrote a > FindXXXX.cmake file to find the program and supply the location. > > So, I have the path to the diff program as XXXX_BINDIR. > > My tests are all driven by a generic script. This script takes a couple > of command line arguments to get the important paths for running the > test and checking the results. Like this: > > add_test (test1 ${TEST_SCRIPT_DIR}/test.sh > ${PROJECT_BINARY_DIR}/bin/meos ${CMAKE_CURRENT_SOURCE_DIR} test1.input) > > If it's not obvious, test.sh is the test script. The first argument is > the path to the binary I'm testing, the second is the directory where > both the input files and expected output files can be found, and the > last is the name of the input for this test. > > So, I could pass the path to the 'diff' program as another command line > argument, but that's already beginning to become cumbersome. It's seems > more reasonable just to stick it in the system PATH variable. > > I can do that like this: > set_property(TEST test1 PROPERTY ENVIRONMENT > PATH="${XXXX_BINDIR}:$ENV{PATH}") > > The only annoying thing is, I have to have that line for EVERY test. I > have lots of tests. I would rather set that path for ALL the tests. > But I can't seem to find a way to do that. This doesn't work: > set_property(GLOBAL PROPERTY ENVIRONMENT PATH="${XXXX_BINDIR}:$ENV{PATH}") > > Is there a way to set up the environment for all the tests in one line? What I would do is define a custom function that performs all the tasks related to setting up one specific class of tests: function(add_my_test TEST_NAME TEST_INPUT) add_test(NAME ${TEST_NAME} COMMAND ${TEST_SCRIPT_DIR}/test.sh ${PROJECT_BINARY_DIR}/bin/meos ${CMAKE_CURRENT_SOURCE_DIR} ${TEST_INPUT}) set_property(TEST ${TEST_NAME} PROPERTY ENVIRONMENT "PATH=${XXXX_BINDIR}:$ENV{PATH}") endfunction() add_my_test(test1 test1.input) add_my_test(test2 test2.input) ... (untested - written from memory) Nils From ravi.raman at Xoriant.Com Thu Jul 31 05:46:43 2014 From: ravi.raman at Xoriant.Com (Ravi Raman) Date: Thu, 31 Jul 2014 09:46:43 +0000 Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake In-Reply-To: <8D17A255B13AD2A-26BC-11F0C@webmail-vm027.sysops.aol.com> References: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> <3056ae878153436da4a35990db9632a1@XORMUM-MBX02.India.XoriantCorp.com> <8D17A255B13AD2A-26BC-11F0C@webmail-vm027.sysops.aol.com> Message-ID: Hi David, Thanks. Background of our project: In our project there are many modules. The existing build system is using Microsoft Visual Studio. Each module has a Microsoft Visual Studio project (.vcxproj) file and in some of the project files, Microsoft Visual Studio targets (.targets) file is included using the import statement. As an example, let us take a module with the name "module1". It will have a Visual Studio project with the name "module1.vcxproj". The file "module1.vcxproj" file will include the Microsoft Visual Studio targets file "target1.targets" as follows: Attaching a sample "target1.targets" file for your reference. In that, there are many entries as follows (for each target) and there are certain steps that get executed within the Target block. .... Requirement: The requirement is to convert the existing Microsoft Visual Studio built system to cmake built system. As per cmake requirement, we have created CMakeLists.txt file for module "module1". Cmake does not understand or include .targets file directly. So, there is a need to put the equivalent logic of whatever steps are executed within the blocks in .targets file into the corresponding cmake statements in CMakeLists.txt file of module "module1". So, is there any mechanism that cmake provides for doing that ? Are there any examples of such work being done in the past, which we can refer to ? 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 30511111 ravi.raman at xoriant.com| http://www.xoriant.com -----Original Message----- From: David Cole [mailto:dlrdave at aol.com] Sent: Wednesday, July 30, 2014 9:22 PM To: Ravi Raman Cc: cmake at cmake.org Subject: Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake To the best of my knowledge, CMake does not do anything with ".targets" files. It doesn't know what they are, and it doesn't generate any of them... What is the function of the .targets files in your non-CMake build system? Perhaps somebody else who is more familiar with .targets files is listening and can chime in. I'm not sure what to recommend for you. add_custom_target and add_custom_command are commands you can use to organize and execute custom build steps (as opposed to compiling source files as part of an add_library or add_executable) Maybe.... with the build system you can generate using CMake, you won't even need the .targets files anymore. If you do need them, I'd be curious to learn what it is your .targets file do and why you still need them. HTH, David C. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: target1.targets Type: application/octet-stream Size: 2140 bytes Desc: target1.targets URL: From dlrdave at aol.com Thu Jul 31 06:10:20 2014 From: dlrdave at aol.com (David Cole) Date: Thu, 31 Jul 2014 06:10:20 -0400 (EDT) Subject: [CMake] setup enviroment for all tests Message-ID: <8D17ABEC4BD7007-2E74-1516C@webmail-d159.sysops.aol.com> CMake itself does this to include a file at ctest time that applies to *all* tests: set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake") It results in this line being generated in CTestTestfile.cmake at the very top of the file: include("C:/n/d/Nightly/cmake Win32-ninja-cl11-Debug/Tests/EnforceConfig.cmake") If you wrote/configured a file that had this in it (can be in your build tree, as CMake's is...): set(ENV{PATH} "/actual/value/of/XXXX_BINDIR:$ENV{PATH}") ...and then set that file as your TEST_INCLUDE_FILE, it should do what you want in this case. The documentation is sparse, but there: http://www.cmake.org/cmake/help/v3.0/prop_dir/TEST_INCLUDE_FILE.html HTH, David C. From dlrdave at aol.com Thu Jul 31 07:24:34 2014 From: dlrdave at aol.com (David Cole) Date: Thu, 31 Jul 2014 07:24:34 -0400 (EDT) Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake In-Reply-To: References: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> <3056ae878153436da4a35990db9632a1@XORMUM-MBX02.India.XoriantCorp.com> <8D17A255B13AD2A-26BC-11F0C@webmail-vm027.sysops.aol.com> Message-ID: <8D17AC923E1771A-2E74-153EF@webmail-d159.sysops.aol.com> So from the example you've sent, it seems like the stuff in your targets file is just a bunch of custom commands that you'd need to run. There are plenty of examples of projects using add_custom_command and add_custom_target out there, and if you have specific questions about how those commands work, do send more emails and ask those questions. I don't think there's anything out there that will help you automate this task.... but if there is, hopefully somebody who can point you to them will show up here. Otherwise, it's just "roll up your sleeves" time, and do the work manually to convert targets files into CMakeLists that use add_custom_command. Cheers, David C. From ravi.raman at Xoriant.Com Thu Jul 31 07:39:41 2014 From: ravi.raman at Xoriant.Com (Ravi Raman) Date: Thu, 31 Jul 2014 11:39:41 +0000 Subject: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake In-Reply-To: <8D17AC923E1771A-2E74-153EF@webmail-d159.sysops.aol.com> References: <8D179F530C72B33-1AB8-751D@webmail-va013.sysops.aol.com> <3056ae878153436da4a35990db9632a1@XORMUM-MBX02.India.XoriantCorp.com> <8D17A255B13AD2A-26BC-11F0C@webmail-vm027.sysops.aol.com> <8D17AC923E1771A-2E74-153EF@webmail-d159.sysops.aol.com> Message-ID: <36da845e9c8447a987ea27d92b34daf7@XORMUM-MBX02.India.XoriantCorp.com> Hi David, Thanks for the reply. Understood. Will use the cmake function add_custom_command() with POST_BUILD option in case of after build and PRE_BUILD option in case of before build. 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 30511111 ravi.raman at xoriant.com|?http://www.xoriant.com -----Original Message----- From: David Cole [mailto:dlrdave at aol.com] Sent: Thursday, July 31, 2014 4:55 PM To: Ravi Raman Cc: cmake at cmake.org Subject: Re: [CMake] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake So from the example you've sent, it seems like the stuff in your targets file is just a bunch of custom commands that you'd need to run. There are plenty of examples of projects using add_custom_command and add_custom_target out there, and if you have specific questions about how those commands work, do send more emails and ask those questions. I don't think there's anything out there that will help you automate this task.... but if there is, hopefully somebody who can point you to them will show up here. Otherwise, it's just "roll up your sleeves" time, and do the work manually to convert targets files into CMakeLists that use add_custom_command. Cheers, David C. From jaime.armendariz at aurorasat.es Thu Jul 31 10:29:24 2014 From: jaime.armendariz at aurorasat.es (Jaime Armendariz) Date: Thu, 31 Jul 2014 16:29:24 +0200 Subject: [CMake] /MP[num_threads] not working in Cmake 3.0.0 Message-ID: Hello, I would like to apply the switch "/MP[n]" for setting the number of cores to be used in a compilation, however it does not behave correctly. If I add "/MP4" for example in my${CMAKE_CXX_FLAGS_RELEASE}, cmake converts it to "/MP" that means "all cores available". It's like it is not parsing the number but it correctly parses the /MP. Tested with : Cmake 3.0.0 and 2.8.12.2 Windows 7 64 bits Visual Studio 2013 / Visual Studio 2010 SP1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Thu Jul 31 11:39:33 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 31 Jul 2014 11:39:33 -0400 Subject: [CMake] /MP[num_threads] not working in Cmake 3.0.0 In-Reply-To: References: Message-ID: <53DA6335.1010707@kitware.com> On Thu, Jul 31, 2014 at 10:29 AM, Jaime Armendariz wrote: > If I add "/MP4" for example in my${CMAKE_CXX_FLAGS_RELEASE}, cmake converts > it to "/MP" that means "all cores available". [snip] > Cmake 3.0.0 and 2.8.12.2 > Windows 7 64 bits > Visual Studio 2013 / Visual Studio 2010 SP1 With CMake 3.0.0 on VS 2013 I tried that and got: true 4 in the .vcxproj file. The compilation command-line then had "/MP4" as expected. -Brad From samoilov at gmail.com Thu Jul 31 18:28:27 2014 From: samoilov at gmail.com (Denis Samoilov) Date: Thu, 31 Jul 2014 15:28:27 -0700 Subject: [CMake] is CPACK_PACKAGE_RELEASE broken? Message-ID: hi, when i set "CPACK_PACKAGE_RELEASE" to "7777": "set(CPACK_PACKAGE_RELEASE 7777)" spec file still stays the same "1" : Summary: A cache configuration service. Name: cacheproxyd Version: 1.0.8 Release: 1 i see that rpm file name that depends on it changes: "set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}" )" in spec: %define _rpmfilename cacheproxyd-1.0.8-7777.x86_64.rpm Am I miss something? -------------- next part -------------- An HTML attachment was scrubbed... URL: From leek2 at llnl.gov Thu Jul 31 19:09:04 2014 From: leek2 at llnl.gov (Jim Leek) Date: Thu, 31 Jul 2014 16:09:04 -0700 Subject: [CMake] setup enviroment for all tests In-Reply-To: <8D17ABEC4BD7007-2E74-1516C@webmail-d159.sysops.aol.com> References: <8D17ABEC4BD7007-2E74-1516C@webmail-d159.sysops.aol.com> Message-ID: <53DACC90.9080501@llnl.gov> OK, the below suggestion did have one problem, but I was able to make it work. The problem, kind of hinted at in David Cole's answer, was that, since the file is run at test time, variables defined at configure time don't work. So, this did NOT work: added to top level CMakeLists.txt: set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "${CMAKE_SOURCE_DIR}/cmake-modules/TestConfig.cmake") TestConfig.cmake: set(ENV{PATH} "${XXXX_BINDIR}:$ENV{PATH}") because $XXXX_BINDIR was defined at configure time, and unfortunately wasn't defined at test time. So, I had to generate a file as part of configure time. So the entire fix was these two lines in the top level CMakeLists.txt file(WRITE ${CMAKE_BINARY_DIR}/TestConfig.cmake "set(ENV{PATH} \"${XXXX_BINDIR}:\$ENV{PATH}\")\n") set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "${CMAKE_BINARY_DIR}/TestConfig.cmake") this generated a TestConfig.cmake file like this: set(ENV{PATH} "/usr/local/XXXX/bin:$ENV{PATH}") Which works, so thanks! Jim On 07/31/2014 03:10 AM, David Cole wrote: > CMake itself does this to include a file at ctest time that applies to > *all* tests: > > set_directory_properties(PROPERTIES > TEST_INCLUDE_FILE > "${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake") > > It results in this line being generated in CTestTestfile.cmake at the > very top of the file: > > include("C:/n/d/Nightly/cmake > Win32-ninja-cl11-Debug/Tests/EnforceConfig.cmake") > > If you wrote/configured a file that had this in it (can be in your > build tree, as CMake's is...): > > set(ENV{PATH} "/actual/value/of/XXXX_BINDIR:$ENV{PATH}") > > ...and then set that file as your TEST_INCLUDE_FILE, it should do what > you want in this case. > > The documentation is sparse, but there: > > http://www.cmake.org/cmake/help/v3.0/prop_dir/TEST_INCLUDE_FILE.html > > > HTH, > David C. > > >