[CMake] Build single file with Cmake in Qtcreator

2016-09-23 Thread vakano
Hi, All, I know Qt Creator support to build single file from Menu "Build" -> “Build File”, or right click one source file in project tree to build single file, but when I load a Cmake Project, Menu “Build File” and “right click” are both disappeared. Does it mean build single file functionality

[CMake] How does cmake handle object dependency(.o.d) in QtCreator

2016-05-06 Thread vakano
Hi, GCC got an option -MMD to export object dependency (.o.d) for header files incremental build, in netbeans, there is an option called enable dependency checking, it will generate an .dep.inc and includes this file in make file automatically, my question is how to set this dependency handlin

[CMake] How to set the dependency in cmake

2016-05-01 Thread vakano
Hi, In make, gcc got the option -MMD to generate the dependency list of the object file(.o.d), is there any way know how to set it in the cmake? Thanks, vakano -- View this message in context: http://cmake.3232098.n2.nabble.com/How-to-set-the-dependency-in-cmake-tp7593382.html Sent from the

Re: [CMake] How to set link option

2016-04-27 Thread vakano
I think the variable CMAKE_EXE_LINKER_FLAGS or LINK_FLAGS may work, but since my project have some other issues, I have not reached to link steps. Thanks, Le Magnus Therning wrote > vakano < > zhongle@ > > writes: > >> Hi, >> >> I have some lin

[CMake] Compiling configuration set for vs project

2016-04-25 Thread vakano
Hi, I am generating a vcproj and sln project for windows VS2015, do I need to set each compiling configuration in cmakelist? I am doing nothing special for this in current cmakelist, but the generated vcproj looks like already contain with compiling info eg:Debug x64, Release x64, MinSizeRel x6

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

2016-04-21 Thread vakano
Hi, Chuck, J, Thanks for you all great help! It is clear for me now ^.^ vakano -- View this message in context: http://cmake.3232098.n2.nabble.com/How-to-add-dependency-relations-between-libs-and-executable-tp7593264p7593313.html Sent from the CMake mailing list archive at Nabble.com

[CMake] How to set link option

2016-04-21 Thread vakano
Hi, I have some link option as below: -Wl, -rpath, ${PROJECT_TOP}/dist ../proj_a/lib_a.a -lb -Wl, --whole-archive ../proj_c/lib_c.a Thanks, Le -- View this message in context: http://cmake.3232098.n2.nabble.com/How-to-set-link-option-tp7593307.html Sent from the CMake mailing list archiv

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

2016-04-20 Thread vakano
target_link_librairies invoke Lib B directly which generated in another project b, how does proj_a recognize it, I think the reason is proj_a, b, c are all the sub directories of project root, if no root layer, B can not be invoked in proj_a, right? Thanks, vakano Chuck Atkins wrote >> So for this pa

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

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

2016-04-19 Thread vakano
/lib_b.a *-lsuperlu_4.0 ${MKLBLAS} -Wl, --whole-archive* ../proj_c/lib_c.a *-lSuiteSparse -lsobol* How to convert the whole link option to cmake with these global and local link option? Thanks, vakano -- View this message in context: http://cmake.3232098.n2.nabble.com/How

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

2016-04-17 Thread vakano
Hi, Anatoly, Besides, my project structure is a little bit special, I am doing a conversion from current make file flow to 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

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

2016-04-17 Thread vakano
Hi, Anatoly, Thanks for your guidance, I am a little confused why it need an upper level cmakelist? Could you pls explain how the dependency works? Thanks, Le -- View this message in context: http://cmake.3232098.n2.nabble.com/How-to-add-dependency-relations-between-libs-and-executable-tp7

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

2016-04-17 Thread vakano
Hi, The project structure as below: folder/proj_a folder/proj_b folder/proj_c proj_a, proj_b, proj_c are in the same level, proj_a is the main project use to generate executable main, proj_b and proj_c use to generate lib_b, lib_c, then link with executable main, my question is how to add