Re: [CMake] CMakeLists.txt: How to print a message if ctest fails?

2016-04-19 Thread Muhammad Osama
Hi Miroslav, That makes sense, is there a way I can make ctest -S CTestScript.cmake command replace the regular ctest? I don't want users who run ctest type the whole thing. Thank you, On Tue, Apr 19, 2016 at 1:18 AM, Matějů Miroslav, Ing. < mateju.miros...@azd.cz> wrote: > Hi Muhammad, > > >

[CMake] How to convert global and local link option from make to cmake

2016-04-19 Thread vakano
Hi, I got a global and local link options mixed project which need to convert from make to cmake, eg as below(option with Bold): ${LINK.cc} -Wl,-E -o dist/main ${OBJECTFILES} ${LDLIBSOPTIONS} LDLIBOPTIONS= *-Wl,-rpath,* {PROJECT_TOP}/dist/Debug_64/GNU-linux-x86 ../proj_a/lib_a.a

Re: [CMake] CMake: how to use 'for cyclic sentence' in command add_custom_command(...)

2016-04-19 Thread Konstantin Tokarev
19.04.2016, 16:21, "Chaos Zhang" : > Hi, > > I was using 'for cyclic sentence' in command add_custom_command(...), the > content of the CMakeLists.txt as below: > add_custom_command(TARGET temp_target > POST_BUILD >  

[CMake] CMake: how to use 'for cyclic sentence' in command add_custom_command(...)

2016-04-19 Thread Chaos Zhang
Hi, I was using 'for cyclic sentence' in command add_custom_command(...), the content of the CMakeLists.txt as below: add_custom_command(TARGET temp_target POST_BUILD COMMAND for x in a b c\; do echo

Re: [CMake] CMake: how to use 'for cyclic sentence' in command add_custom_command(...)

2016-04-19 Thread Chuck Atkins
Hi Chao, > I was using 'for cyclic sentence' in command add_custom_command(...), the > content of the CMakeLists.txt as below: > add_custom_command(TARGET temp_target > POST_BUILD > COMMAND for x in a b c\; >

Re: [CMake] Patch for BundleUtilities to ignore specified files

2016-04-19 Thread Brad King
On 04/19/2016 02:03 AM, Roman Wüger wrote: > attached is an updated patch. Thanks. Applied: BundleUtilities: Add optional parameter to ignore specified files https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=26c92d50 -Brad -- Powered by www.kitware.com Please keep messages on-topic and

Re: [CMake] How to add dependency relations between libs and executable

2016-04-19 Thread Chuck Atkins
> cmake, the old top layer project is proj_a, which at the same layer with > proj_b and proj_c, if I add an extra top layer as the root you mentioned, the generated make file structure will be changed, top layer make file will be root instead of proj_a. > > Is there any way to add the dependency

[CMake] Replace `ctest` command with `ctest --output-on-failure`

2016-04-19 Thread Muhammad Osama
Hi, Is there a way I can replace ctest command with ctest --some-flag in CMakeLists.txt? So, when my users run cmake, make and ctest. They are actually performing cmake, make and ctest --some-flag? I don't want them to worry about the flag and just type ctest. Thank you, -- *Muhammad Osama* --

Re: [CMake] CMake: how to use 'for cyclic sentence' in command add_custom_command(...)

2016-04-19 Thread Chuck Atkins
Hi Chao, As Konstantin alluded to, trying to pass "srtingified" shell scripting through the layers of cmake and makefile escaping is bound to be fraught with problems. The necessary escaping will very quickly become unmaintainable. You're really best suited to place these in a separate shell

Re: [CMake] How to add dependency relations between libs and executable

2016-04-19 Thread vakano
Hi, Chuck, Thanks for your great help! "Lib_B and Lib_C, build before A" that is exactly what I need. So for this parallel project structure, an upper level cmakelist used to organize and setup relationship with lib A, B, C right? One more question is, if use the upper level cmake list, lib_B

Re: [CMake] CMake: how to use 'if condition' in command add_custom_command(...)

2016-04-19 Thread Chaos Zhang
I have read the description of PRE_BUILD before in CMake doc, but when i use it, i found something confuesed. (1) In CMakeLists.txt, the content as below: ​(2)After i make the makefile generated by this CMakeLists.txt, i get result as below: "3_pre_build" is behind "1_pre_link", if POST_BUILD

Re: [CMake] CMake: how to use 'if condition' in command add_custom_command(...)

2016-04-19 Thread Clark Wang
On Tue, Apr 19, 2016 at 4:55 PM, Chaos Zhang wrote: > I have read the description of PRE_BUILD before in CMake doc, but when i > use it, i found something confuesed. > (1) In CMakeLists.txt, the content as below: > > ​(2)After i make the makefile generated by this

Re: [CMake] Patch for BundleUtilities to ignore specified files

2016-04-19 Thread Roman Wüger
Hello Brad, attached is an updated patch. Regards Roman 0001-BundleUtilities-Add-optional-parameter-to-ignore-spe.patch Description: Binary data > Am 18.04.2016 um 17:28 schrieb Brad King : > >> On 04/18/2016 10:20 AM, Roman Wüger wrote: >> attached is a patch with

Re: [CMake] CMakeLists.txt: How to print a message if ctest fails?

2016-04-19 Thread Matějů Miroslav , Ing .
Hi Muhammad, You need to add this code to a separate CTest script (CTestScript.cmake, for example) and then run it using ctest -S CTestScript.cmake. Since the wiki page I linked yesterday provides only some complex examples, I am sending the key part of my CTest script. As you can see, its

Re: [CMake] CMake: how to use 'if condition' in command add_custom_command(...)

2016-04-19 Thread Clark Wang
On Tue, Apr 19, 2016 at 1:15 PM, Chaos Zhang wrote: > Hi, > > Is there a way to use Linux command 'if' like this : > > For i need to execute 'if condition' in make phase rather than cmake phase. > Try

Re: [CMake] CMake: how to use 'if condition' in command add_custom_command(...)

2016-04-19 Thread Craig Scott
In case it matters, in Clark's suggested code, note that PRE_BUILD is only fully honoured with Visual Studio generators. For everything else, it gets treated as PRE_LINK, which occurs later (i.e. after compiling all the sources rather than before). So it depends on what your "if" test is trying to

[cmake-developers] [CMake 0016071]: CMake should map /Fd to COMPILE_PDB_NAME for static libraries

2016-04-19 Thread Mantis Bug Tracker
The following issue has been SUBMITTED. == https://cmake.org/Bug/view.php?id=16071 == Reported By:Itai Seggev Assigned To:

[Cmake-commits] CMake branch, next, updated. v3.5.2-1008-ge2559d1

2016-04-19 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e2559d1d4c41819cb3e1f1353249b19f041e3732 (commit) via

[Cmake-commits] CMake branch, next, updated. v3.5.2-1010-gfd11289

2016-04-19 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via fd11289f48d52302cf433cfe2a800120a4766f35 (commit) via

Re: [cmake-developers] Patch for BundleUtilities to ignore specified files

2016-04-19 Thread Brad King
On 04/19/2016 02:03 AM, Roman Wüger wrote: > attached is an updated patch. Thanks. Applied: BundleUtilities: Add optional parameter to ignore specified files https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=26c92d50 -Brad -- Powered by www.kitware.com Please keep messages on-topic and

[Cmake-commits] CMake branch, next, updated. v3.5.2-1013-g7915a62

2016-04-19 Thread Zack Galbreath
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7915a626cf12b63db199f34834f743b8724de8ad (commit) via

Re: [cmake-developers] Autogen subdirectories patches

2016-04-19 Thread Brad King
On 04/19/2016 11:09 AM, Sebastian Holtermann wrote: > https://cmake.org/Bug/view.php?id=12873 > https://cmake.org/Bug/view.php?id=16068 > > They introduce > - same name collision checks during moc/qrc/ui generation > - moc/qrc generation in subdirectories to support >sources with the name in

[cmake-developers] Autogen subdirectories patches

2016-04-19 Thread Sebastian Holtermann
Hello again, I've prepared a set of patches that address https://cmake.org/Bug/view.php?id=12873 https://cmake.org/Bug/view.php?id=16068 They introduce - same name collision checks during moc/qrc/ui generation - moc/qrc generation in subdirectories to support sources with the name in

Re: [cmake-developers] Autogen subdirectories patches

2016-04-19 Thread Sebastian Holtermann
Am 19.04.2016 um 19:28 schrieb Brad King: On 04/19/2016 11:09 AM, Sebastian Holtermann wrote: https://cmake.org/Bug/view.php?id=12873 https://cmake.org/Bug/view.php?id=16068 They introduce - same name collision checks during moc/qrc/ui generation - moc/qrc generation in subdirectories to

[Cmake-commits] CMake branch, next, updated. v3.5.2-1016-gc6ab628

2016-04-19 Thread Rolf Eike Beer
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via c6ab628a0bbcd23229537a00fddbbc7bd9c617e9 (commit) via

[Cmake-commits] CMake branch, master, updated. v3.5.2-469-g0a05b2b

2016-04-19 Thread Kitware Robot
_VERSION_MINOR 5) -set(CMake_VERSION_PATCH 20160419) +set(CMake_VERSION_PATCH 20160420) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/

[cmake-developers] [PATCH] Always define Boost::boost imported target

2016-04-19 Thread Roger Leigh
For https://cmake.org/Bug/view.php?id=16057 I have merged the boost-import-default branch into next for testing. This includes a unit test to verify that the basic boost headers work in the absence of COMPONENTS being specified with find_package. Regards, Roger -- Dr Roger Leigh -- Open

[Cmake-commits] CMake branch, next, updated. v3.5.2-1018-g5155d7b

2016-04-19 Thread Roger Leigh
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 5155d7b2854231156b66e2359742585ce7b38973 (commit) via

Re: [cmake-developers] Patch for BundleUtilities to ignore specified files

2016-04-19 Thread Roman Wüger
Hello Brad, attached is an updated patch. Regards Roman 0001-BundleUtilities-Add-optional-parameter-to-ignore-spe.patch Description: Binary data > Am 18.04.2016 um 17:28 schrieb Brad King : > >> On 04/18/2016 10:20 AM, Roman Wüger wrote: >> attached is a patch with