[CMake] QT + CMake + Visual Studio = ui files refresh
Hi, I am currently using QT + CMake + Visual Studio and everything works great. Problem I am having is that if I change a .ui file Visual Studio does not seem to capture that during the build. If I just "touch" the header file, them everything works fine (moc gets triggered). Is there a way to set this up so that the ui file change also gets detected? I tried simply adding the ui file to the target, but this does not seem to work... Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] set file property from function
Hi, Is there a way to set a property of a file/source from a function? Below seems to work file outside of a function, but seems not to work inside one. set_property( SOURCE ${AFILE} APPEND PROPERTY COMPILE_FLAGS "/wd4068" ) Do I need to CACHE it? or is it a scope problem? Thanks, Mac -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] skip install of subdirectory
Hi, I have a project which uses git submodules to manage it's dependencies. Right now we want to add a installer to it, problem we have is that some of the dependencies have their own "install" directives. Is there a way to ignore a project install command? Long version case it is unclear: main project submodule - has a install directive myCode - actual code, links statically to submodule above I would like to only issue the install of myCode. is there a way to tell cmake or cpack to ignore "submodule" install directives? Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] skip install of subdirectory
Hi Alan, Thanks a lot! Yeah I was thinking about something along those lines, but i was wondering if there is a solution that does not involve modifying the submodules. On Wed, Jul 20, 2016 at 12:09 PM, Alan W. Irwin wrote: > On 2016-07-20 11:02-0700 Tiago Macarios wrote: > > Hi, >> >> I have a project which uses git submodules to manage it's dependencies. >> Right now we want to add a installer to it, problem we have is that some >> of >> the dependencies have their own "install" directives. Is there a way to >> ignore a project install command? >> >> Long version case it is unclear: >> >> main project >> submodule - has a install directive >> myCode - actual code, links statically to submodule above >> >> I would like to only issue the install of myCode. is there a way to tell >> cmake or cpack to ignore "submodule" install directives? >> > > Hi Tiago: > > You could brute force it by surrounding each install directive in > submodule by > > if(INSTALL_SUBMODULE) > > endif(INSTALL_SUBMODULE) > > Then add > > option(INSTALL_SUBMODULE, "Install submodule?" OFF) > > to your top-level CMakeLists.txt file. > > Then because of that OFF, by default users would not install > submodule, but if users desired that install, they could specify the > -DINSTALL_SUBMODULE=ON option on the cmake command line. Or you could > choose to default to ON. > > Note, I have characterized the above as brute force, but in fact the > method is completely flexible, and most mature CMake projects use this > kind of option-based method a lot. > > Alan > __ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __ > > Linux-powered Science > __ > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Bash on ubuntu on windows as target
Hi All, Windows 10 anniversary edition comes with support to execute Linux binaries. I have been trying to use it with one of our projects, but I have been getting a weird error. Maybe someone can help me? The target is pretty simple: set(BASH "C:\\Windows\\System32\\bash.exe") set(ARGS "--help") add_custom_target(linux ${BASH} ${ARGS}) If I then build that project in visual studio (with some extra verbosity) I get: Target "CustomBuild" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets" from project "C:\_Working\delegate\build\linux.vcxproj" (target "_BuildGenerateSourcesAction" depends on it): Using "CustomBuild" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Build.CppTasks.Common.dll". Task "CustomBuild" Write Tracking Logs: x64\Debug\linux\linux.tlog\custombuild.write.1.tlog Read Tracking Logs: x64\Debug\linux\linux.tlog\custombuild.read.1.tlog No output for C:\_WORKING\DELEGATE\BUILD\CMAKEFILES\3FA5525E877A7559336C7D412E1B43B0\LINUX.RULE|C:\_WORKING\DELEGATE\CMAKELISTS.TXT was found in the tracking log; source compilation required. C:\_Working\delegate\CMakeLists.txt will be compiled as it was not found in the tracking log. C:\_Working\delegate\build\CMakeFiles\3fa5525e877a7559336c7d412e1b43b0\linux.rule will be compiled as it was not found in the tracking log. setlocal "C:\Program Files (x86)\CMake\bin\cmake.exe" -HC:/_Working/delegate -BC:/_Working/delegate/build --check-stamp-file C:\_Working\delegate\build\CMakeFiles\generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd setlocal C:\Windows\System32\bash.exe --help if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd Building Custom Rule C:/_Working/delegate/CMakeLists.txt CMake does not need to re-run because C:\_Working\delegate\build\CMakeFiles\generate.stamp is up-to-date. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code -1073740791. Done executing task "CustomBuild" -- FAILED. Done building target "CustomBuild" in project "linux.vcxproj" -- FAILED. The command line seems correct. If I just copy it to the windows prompt it works fine: C:\Users\tmc> C:\Windows\System32\bash.exe --help GNU bash, version 4.3.11(1)-release-(x86_64-pc-linux-gnu) Usage: /bin/bash [GNU long option] [option] ... /bin/bash [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --rcfile --restricted --verbose --version Shell options: -ilrsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option Type `/bin/bash -c "help set"' for more information about shell options. Type `/bin/bash -c help' for more information about shell builtin commands. Use the `bashbug' command to report bugs. I also tried to use it from the visual studio "external tools" and it seems to work. So I am not sure what is going on. Is there a way to debug custom_targets? In case anyone tries the example above on a 64 bit machine: You will need to copy bash.exe from system32 to syswow64 since VS is 32 bits. Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Bash on ubuntu on windows as target
Well what I was trying to do was to actually have a target inside the windows build that would trigger the linux build so to build both at the same time. imagine you have a VS project one of the "projects" would be the linux build. So as long as the build folder is different I could have both building in sync everytime. Get the idea? If I just do a full build inside bash everything works great =) On Wed, Aug 10, 2016 at 11:23 PM, <"Máté Ferenc Nagy-Egri via CMake wrote: > +1 for the initiative. Wouldn’t it make more sense however to make it a > CMAKE_SYSTEM_NAME? If I remember correctly that’s how MinGW works, and this > should be something very similar. > > > > > > *Feladó: *Tiago Macarios > *Elküldve: *2016. augusztus 11., csütörtök 1:51 > *Címzett: *CMake ML > *Tárgy: *[CMake] Bash on ubuntu on windows as target > > > > Hi All, > > > > Windows 10 anniversary edition comes with support to execute Linux > binaries. I have been trying to use it with one of our projects, but I have > been getting a weird error. Maybe someone can help me? > > > > The target is pretty simple: > > > > set(BASH "C:\\Windows\\System32\\bash.exe") > > set(ARGS "--help") > > add_custom_target(linux ${BASH} ${ARGS}) > > > > If I then build that project in visual studio (with some extra verbosity) > I get: > > > > Target "CustomBuild" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\ > v4.0\V140\Microsoft.CppCommon.targets" from project > "C:\_Working\delegate\build\linux.vcxproj" (target > "_BuildGenerateSourcesAction" depends on it): > > Using "CustomBuild" task from assembly "C:\Program Files > (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Build. > CppTasks.Common.dll". > > Task "CustomBuild" > > Write Tracking Logs: > >x64\Debug\linux\linux.tlog\custombuild.write.1.tlog > > Read Tracking Logs: > >x64\Debug\linux\linux.tlog\custombuild.read.1.tlog > > No output for C:\_WORKING\DELEGATE\BUILD\CMAKEFILES\ > 3FA5525E877A7559336C7D412E1B43B0\LINUX.RULE|C:\_WORKING\DELEGATE\CMAKELISTS.TXT > was found in the tracking log; source compilation required. > > C:\_Working\delegate\CMakeLists.txt will be compiled as it was not > found in the tracking log. > > > C:\_Working\delegate\build\CMakeFiles\3fa5525e877a7559336c7d412e1b43b0\linux.rule > will be compiled as it was not found in the tracking log. > > setlocal > > "C:\Program Files (x86)\CMake\bin\cmake.exe" -HC:/_Working/delegate > -BC:/_Working/delegate/build --check-stamp-file C:\_Working\delegate\build\ > CMakeFiles\generate.stamp > > if %errorlevel% neq 0 goto :cmEnd > > :cmEnd > > endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone > > :cmErrorLevel > > exit /b %1 > > :cmDone > > if %errorlevel% neq 0 goto :VCEnd > > setlocal > > C:\Windows\System32\bash.exe --help > > if %errorlevel% neq 0 goto :cmEnd > > :cmEnd > > endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone > > :cmErrorLevel > > exit /b %1 > > :cmDone > > if %errorlevel% neq 0 goto :VCEnd > > Building Custom Rule C:/_Working/delegate/CMakeLists.txt > > CMake does not need to re-run because > C:\_Working\delegate\build\CMakeFiles\generate.stamp > is up-to-date. > > C:\Program Files (x86)\MSBuild\Microsoft.Cpp\ > v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" > exited with code -1073740791. > > Done executing task "CustomBuild" -- FAILED. > > Done building target "CustomBuild" in project "linux.vcxproj" -- FAILED. > > > > > > The command line seems correct. If I just copy it to the windows prompt it > works fine: > > > > C:\Users\tmc> C:\Windows\System32\bash.exe --help > > GNU bash, version 4.3.11(1)-release-(x86_64-pc-linux-gnu) > > Usage: /bin/bash [GNU long option] [option] ... > > /bin/bash [GNU long option] [option] script-file ... > > GNU long options: > > --debug > > --debugger > > --dump-po-strings > > --dump-strings > > --help > > --init-file > > --login > > --noediting > > --noprofile > > --norc > > --posix > > --rcfile > > --restricted > > --verbose > > --version > > Shell options: > > -ilrsD or -c command or -O shopt_option (invocation only) > >
[CMake] CMAKE_INCLUDE_CURRENT_DIR on a function
Hi, Does CMAKE_INCLUDE_CURRENT_DIR need to be set outside of a function? I have a function where I define an executable "add_executable". This executable uses moc'ed Qt clasees, so I need to set CMAKE_INCLUDE_CURRENT_DIR. It seems like I have to set it from the top level script calling the function. If I set it inside the function the compilation fails with a missing moc file. Any ideas? Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CMAKE_INCLUDE_CURRENT_DIR on a function
Hi Craig, Maybe my problem description was lacking. Below is the function I have. Both CMAKE_INCLUDE_CURRENT_DIR and the target are defined on the same function scope, but this does not seem to work. I need to define CMAKE_INCLUDE_CURRENT_DIR on the parent CMakeLists file. function(AddTest) set(options) set(oneValueArgs FILE FOLDER) set(multiValueArgs LIBRARIES) cmake_parse_arguments(TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) # THIS DOES NOT WORK HERE I NEED TO SET IT IN THE PARENT FOLDER set(CMAKE_INCLUDE_CURRENT_DIR ON) get_filename_component(FILE_RAW ${TEST_FILE} NAME_WE) add_executable(${FILE_RAW} ${TEST_FILE}) set_target_properties(${FILE_RAW} PROPERTIES CXX_STANDARD 14 CXX_EXTENSIONS OFF AUTOMOC ON AUTOUIC ON FOLDER ${TEST_FOLDER} ) find_package(Qt5Test) target_link_libraries(${FILE_RAW} ${TEST_LIBRARIES}) add_test(NAME ${FILE_RAW} COMMAND ${FILE_RAW}) endfunction() On Mon, Oct 24, 2016 at 3:48 PM, Craig Scott wrote: > function() introduces a new scope, so if you want changes you make to > variables inside the function to be visible outside the function, you need > to use set(... PARENT_SCOPE). Alternatively, a macro() does not introduce a > new scope, so replacing your function() with a macro() may also yield the > behaviour you want (but changing to a macro has other effects, so make sure > you read the docs before going down that path). Also note that setting it > in one directory does not make it apply to subdirectories as well, in case > that matters in your situation. > > > > On Tue, Oct 25, 2016 at 9:42 AM, Tiago Macarios > wrote: > >> Hi, >> >> Does CMAKE_INCLUDE_CURRENT_DIR need to be set outside of a function? >> >> I have a function where I define an executable "add_executable". This >> executable uses moc'ed Qt clasees, so I need to set >> CMAKE_INCLUDE_CURRENT_DIR. It seems like I have to set it from the top >> level script calling the function. If I set it inside the function the >> compilation fails with a missing moc file. >> >> Any ideas? >> >> Tiago >> >> -- >> >> 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 >> > > > > -- > Craig Scott > Melbourne, Australia > https://crascit.com > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] clean custom_target
Hi, Is there a way to have a command to be run during a clean? I have a custom_target which does a fair bit of things and it also has the ability to clean up after itself. So conceptually something like this is what I am looking for: add_custom_target(Name ALL COMMAND command COMMAND_CLEAN command -clean ) Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] clean custom_target
Thanks Steve. I added a comment to the gitlab thread. On Wed, Oct 26, 2016 at 6:57 AM, Steve Lorimer wrote: > There is an open issue about just this. > > If ADDITIONAL_MAKE_CLEAN_FILES doesn't work for you, you may want to make > your case on the issue > > https://gitlab.kitware.com/cmake/cmake/issues/16358 > > On 26 October 2016 at 00:59, Petr Kmoch wrote: > >> Hi Tiago. >> >> The best I can think of is the directory property >> ADDITIONAL_MAKE_CLEAN_FILES: https://cmake.org/cmake/help/l >> atest/prop_dir/ADDITIONAL_MAKE_CLEAN_FILES.html >> >> You can set it to a list of files which will be removed as part of >> running `make clean` or its equivalent for other generators. >> >> Petr >> >> On 26 October 2016 at 04:36, Tiago Macarios >> wrote: >> >>> Hi, >>> >>> Is there a way to have a command to be run during a clean? >>> >>> I have a custom_target which does a fair bit of things and it also has >>> the ability to clean up after itself. So conceptually something like this >>> is what I am looking for: >>> >>> add_custom_target(Name ALL >>> COMMAND command >>> COMMAND_CLEAN command -clean >>> ) >>> >>> >>> Tiago >>> >>> -- >>> >>> 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
[CMake] CPACK WIX shortcuts
Hi, I am trying to create an installer with CPACK and WIX as generator. Everything works fine except that I cannot get start menu shortcuts to work. I was using almost the same code as the link below (which seems to be the unit tests for this feature), then I tried to build the unit test and I still don't see the shortcut directives on the wix files. Am I doing something wrong, or is this a regression? https://github.com/ngladitz/cmake-wix-testsuite/blob/d01013e2066e68088b4f56a8ab7750eb3cea7089/property_start_menu_shortcuts/CMakeLists.txt Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CPACK WIX shortcuts
Hi Nils, Here are all the versions of things involved: Windows10 1607 14393.351 cmake 3.6.3 wix 3.10.3 VS 2015 Update 3 14.0.25431.01 I modified the test to be self contained: == cmake_minimum_required(VERSION 3.6) add_executable(h-w hw.cpp) install(TARGETS h-w DESTINATION bin) install(FILES hw.cpp DESTINATION src) set_property(INSTALL "bin/$" PROPERTY CPACK_START_MENU_SHORTCUTS "Hello World" ) set_property(INSTALL "src/hw.cpp" PROPERTY CPACK_START_MENU_SHORTCUTS "Source Code" "Same Source Code" ) include(CPack) == And I am building it like so: mkdir build cd build cmake .. cmake --build . --config Release cpack -G WIX If I understood the test correctly I should have two folders in the start menu: - "Hello World" - "Source Code" I don't see any of them after installing. AFAICT no other new folders are created either. If I go into the folder with the WIX generated input I don't see any Shortcut directives http://wixtoolset.org/documentation/manual/v3/xsd/wix/shortcut.html cd _CPack_Packages/win32/WIX cat *wxs *wxi | grep Shortcut # Returns empty Also, if I open the msi with Orca I don't see the shortcut table. I am probably doing something wrong, if you could help me I would appreciate. Zip files with project + build folder is here: https://www.dropbox.com/s/4a889ijqnocllcb/wix.zip?dl=0 Tiago On Thu, Nov 3, 2016 at 1:15 AM, Nils Gladitz wrote: > On 11/03/2016 12:23 AM, Tiago Macarios wrote: > > Hi, >> >> I am trying to create an installer with CPACK and WIX as generator. >> Everything works fine except that I cannot get start menu shortcuts to work. >> >> I was using almost the same code as the link below (which seems to be the >> unit tests for this feature), then I tried to build the unit test and I >> still don't see the shortcut directives on the wix files. >> >> Am I doing something wrong, or is this a regression? >> > > Which CMake version are you actually using? > This feature was implemented in CMake 3.3.0. > > >> https://github.com/ngladitz/cmake-wix-testsuite/blob/d01013e >> 2066e68088b4f56a8ab7750eb3cea7089/property_start_menu_ >> shortcuts/CMakeLists.txt >> > > This still works for me using CMake 3.7.0-rc2. > > CMake 3.7.0-rc2's own windows installer uses the same feature for the > start menu shortcut to the documentation which also seems to work for me. > > Nils > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CPACK WIX shortcuts
Yup that did it! Thanks! On Thu, Nov 3, 2016 at 12:10 PM, Nils Gladitz wrote: > On 03.11.2016 19:32, Tiago Macarios wrote: > >> >> >> And I am building it like so: >> mkdir build >> cd build >> cmake .. >> cmake --build . --config Release >> cpack -G WIX >> > > You are using a multi-configuration generator (Visual Studio). > > As you do in the build try specifying a configuration to be packaged when > invoking cpack (the "PACKAGE" target that cmake generates does this by > default): > e.g. cpack -C Release -G WIX > > The install properties are only generated for the known configurations. > > Nils > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] clang-format
Hi, CMake has "built-in" support for clang_tidy and include-what-you-use. I was wondering why there is not support for clang_format. No one ever contributed, or people think this should not be part of CMake? Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Get libraries from target
Hi, Is there a way for me to get CMake libraries out of a target? For example: target_link_libraries(A B C) Can I get B and C from A? What I am trying to do: We are working on adding include-what-you-use into our build system and some of the libraries have their on mapping files. So I was wondering if I could somehow "attach" the mapping file to the target and then "reconstruct" a mapping file for each target. For example: Library B and C have their own mapping, so I would: set_target_properties(B PROPERTIES mapping /path/to/fileB) set_target_properties(C PROPERTIES mapping /path/to/fileC) Then a function would reconstruct a mapping for target A: set_target_properties(A PROPERTIES mapping /path/to/fileA) create_mapping_function(A): loop over dependencies of A get all mappings recreate a mapping file with all dependencies: { ref: "/path/to/fileA" }, { ref: "/path/to/fileB" } { ref: "/path/to/fileC" } -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] clang-format
Well, I don't really mind how it is implemented. During compilation, or as a separate target, but it would be a nice feature. On Sun, Nov 13, 2016 at 11:08 PM, Patrick Boettcher < patrick.boettc...@posteo.de> wrote: > Hi, > > On Mon, 7 Nov 2016 12:06:15 -0800 > Tiago Macarios wrote: > > CMake has "built-in" support for clang_tidy and include-what-you-use. > > I was wondering why there is not support for clang_format. No one ever > > contributed, or people think this should not be part of CMake? > > First thought which came to my mind when reading your mail was that no > automatic tool should change (source-)files during compilation which > are, possibly, opened in an editor. > > But, it would, maybe, be nice to have a custom, optional target to run > it on demand. > > If your editor supports it (mine does, even for selected code-lines, \o/ > ) integrate clang-format as source-code-indentation-tool. > > regards > -- > Patrick. > > > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CXX_CLANG_TIDY doesn't handle multiple arguments correctly
This works for me: CXX_CLANG_TIDY "/usr/bin/clang-tidy" "-checks=modernize-*,readability-*,performance-*" "-fix" I think the difference are the semicolons in the checks instead of commas. On Wed, Nov 16, 2016 at 1:32 PM, Nikita wrote: > Hi, > > I've noticed that CXX_CLANG_TIDY property doesn't work correctly if I > specify several arguments to clang-tidy. Here's an example: > set_property( > TARGET ${PROJECT_NAME} > PROPERTY CXX_CLANG_TIDY clang-tidy;-checks=*;-warnings-as-errors=*) > > Building a target with this property produces no output. It seems like > clang-tidy doesn't get called. However, if I remove > '-warnings-as-errors', everything works fine. > > The same goes for other options as well. Specifying '-header-filter' > or '-line-filter' results in no output. > > Is there a way to get additional clang-tidy options working? > > Regards, > Nikita > -- > > 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
[CMake] assembly on windows
Hi, Is there a simple way to get a Visual Studio + assembly project on windows? This seems to work on Linux: cmake_minimum_required(VERSION 3.7) project(assembler C ASM) set_source_files_properties(hello.s PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp") add_executable(hello hello.s) What would be the windows version of the above? If I naively try the code above on Windows I get the following output: -- Building for: Visual Studio 15 2017 -- The C compiler identification is MSVC 19.10.25017.0 -- The ASM compiler identification is MSVC -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Warning: Did not find file Compiler/MSVC-ASM -- Configuring done -- Generating done -- Build files have been written to: C:/Users/Mac/test/cmake/build and build fails Thanks! Mac -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Setting properties to interface
Hi, Given a template-only library exposed throw an interface is it possible to set the necessary CXX_STANDARD necessary to use the library? The code below would be what I am trying to do. add_library(a_lib INTERFACE) set_property(TARGET a_lib PROPERTY CXX_STANDARD 11 PROPERTY CXX_STANDARD_REQUIRED ON ) target_compile_definitions(a_lib INTERFACE SOME_DEF ) Unfortunately, this does not work and fails with: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "CXX_STANDARD_REQUIRED" is not allowed. Any ideas? Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] CXX_STANDARD use latest
Hi, One can require a specific CXX_STANDARD to be used, but is it possible to set a minimum and let CMake use the latest as long as it satisfies the minimum? Example code: set_property(TARGET a_lib PROPERTY CXX_STANDARD_MIN 11 PROPERTY CXX_STANDARD_REQUIRED ON PROPERTY CXX_STANDARD_LATEST ON ) Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Setting properties to interface
Thanks Craig! That works. Just to confirm, there is no way to disable extensions for a single interface? On Sun, Apr 16, 2017 at 1:51 AM, Craig Scott wrote: > As per my other email just now, you should be able to achieve what you > want with the new CMake 3.8.0 release: > > add_library(a_lib INTERFACE) > target_compile_features(a_lib INTERFACE cxx_std_11) > > I did a quick test with the above just now and it seems to work as > expected. You may, however, still want to set the CXX_EXTENSIONS target > property (or set it project wide with CMAKE_CXX_EXTENSIONS) to control > whether or not compiler extensions are enabled too. > > > > On Sun, Apr 16, 2017 at 12:45 PM, Tiago Macarios > wrote: > >> Hi, >> >> Given a template-only library exposed throw an interface is it possible >> to set the necessary CXX_STANDARD necessary to use the library? The code >> below would be what I am trying to do. >> >> add_library(a_lib INTERFACE) >> >> set_property(TARGET a_lib >> PROPERTY CXX_STANDARD 11 >> PROPERTY CXX_STANDARD_REQUIRED ON >> ) >> >> target_compile_definitions(a_lib INTERFACE >> SOME_DEF >> ) >> >> >> Unfortunately, this does not work and fails with: >> >> INTERFACE_LIBRARY targets may only have whitelisted properties. >> The property "CXX_STANDARD_REQUIRED" is not allowed. >> >> Any ideas? >> >> Tiago >> >> -- >> >> 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 >> > > > > -- > Craig Scott > Melbourne, Australia > https://crascit.com > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] use analyze with visual studio
I am trying to pass the analyze flags to cl.exe, but I cannot figure out how to get it working, example: cmake_minimum_required (VERSION 2.8.11) set (CMAKE_VERBOSE_MAKEFILE ON) project (cppcore) add_executable (const const.cpp) target_compile_options (const analyze -analyze:plugin EspXEngine.dll) how to have cmake to respect that last line? I tried adding quotes, but that seems not to work -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] Cannot set ASM_MASM flags?
I am trying to set a flag for the Microsoft assembler, but no luck. Dummy repro below. I tried setting target_compile_options, but that seems not to work. Then I tried setting CMAKE_ASM_MASM_FLAGS, but that does not seem to work either. It seems like I am hitting this issue: https://gitlab.kitware.com/cmake/cmake/issues/14711 Which was already discussed here: https://cmake.org/pipermail/cmake/2014-August/058422.html If indeed this is a CMake problem. Maybe someone knows of a work around? CMakeLists: cmake_minimum_required(VERSION 3.11) enable_language(ASM_MASM) project(AsmTest) set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /Sg" PARENT_SCOPE) add_executable(AsmTest AsmTestFunc.asm) #target_compile_options(AsmTest PRIVATE /Sg) target_link_options(AsmTest PRIVATE /SAFESEH:NO) target_link_libraries(AsmTest kernel32.lib) File: .386 .model flat,stdcall .stack 4096 ExitProcess PROTO, dwExitCode:DWORD .code main PROC INVOKE ExitProcess,0 main ENDP END main -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] cpack generator variable
Hi All, I have a cmake project which one of the install targets is a collection of files. This files change depending on the configuration (Release, Debug...). I would like to be able to install the files like so: install(DIRECTORY $ DESTINATION bin COMPONENT files) >From the docs I see that cmake does not support that. Generator variables do not apply to DIRECTORY. So I was wondering if there is a way to either save the directory information somewhere and pass it to cpack afterwards. So I guess the question is how to pass a variable from cmake to cpack? Best, Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] AUTOMOC with files on different folders
Hi, I am having trouble using AUTOMOC with a project where header files and source files are in different sub-directories. I wrote a detailed stack overflow question here: http://stackoverflow.com/questions/37151163/cmake-automoc-with-files-on-different-folders and would really appreciate if someone could give me a couple of ideas to try out. Thanks, Tiago -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] AUTOMOC with files on different folders
Hi Attila, Thank you for your help. You are right, if I apply the following modifications it works indeed: set( proj_HEADER include/a.h ) add_library(proj SHARED ${proj_SOURCE} ${proj_HEADER}) But now I got a second question. Why is adding the header files necessary? (Sorry the possibly naive question) I thought that adding the header files to the target was an anti-pattern ( http://voices.canonical.com/jussi.pakkanen/2013/03/26/a-list-of-common-cmake-antipatterns/ ). Is it related to moc generating header files during the build? If so why is it not a problem when everything is on the same folder? Tiago On Wed, May 11, 2016 at 12:48 AM, Attila Krasznahorkay < attila.krasznahor...@gmail.com> wrote: > Hi Tiago, > > This is one of those cases when you have to declare the header files to > add_library(...) as well. In that case AUTOMOC should work fine. At least > it does for us, in a very similar setup. > > > http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/graphics/VP1/VP1Gui/CMakeLists.txt > > Cheers, > Attila > > > On 11 May 2016, at 07:14, Tiago Macarios > wrote: > > > > Hi, > > > > I am having trouble using AUTOMOC with a project where header files and > source files are in different sub-directories. I wrote a detailed stack > overflow question here: > > > http://stackoverflow.com/questions/37151163/cmake-automoc-with-files-on-different-folders > > and would really appreciate if someone could give me a couple of ideas > to try out. > > > > Thanks, > > Tiago > > -- > > > > Powered by www.kitware.com > > > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > > > CMake Support: http://cmake.org/cmake/help/support.html > > CMake Consulting: http://cmake.org/cmake/help/consulting.html > > CMake Training Courses: http://cmake.org/cmake/help/training.html > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/cmake > > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] AUTOMOC with files on different folders
Thanks Attila, really appreciate your help. On Wed, May 11, 2016 at 11:23 PM, Attila Krasznahorkay < attila.krasznahor...@gmail.com> wrote: > Hi Tiago, > > Indeed, that page is quite a bit misleading. And it seems to be "liked" by > Google a lot, as most people come across it. (I also found it myself when > looking for CMake documentation early on.) > > In general, listing all source files belonging to a library/executable, > even the ones that are not compiled, is a good habit. As it makes the > generated VS and Xcode projects much nicer to use. > > I didn't look at the internals of the Qt CMake code. I just realised this > behaviour while trying to make our own code work. (It's an intuitive > behaviour, so it wasn't too hard to figure out.) I guess the code has some > fallback to search for headers in the same place as their corresponding > source file. Which can make the project still work without declaring the > header files, as long as they are in the same directory with the source > files. I imagine that doing something more complicated to look for the > headers would not be so easy. (I can't even think of a reliable way of > doing it myself. You can't just rely on the include paths of your > component, as that would introduce a lot of possible problems.) > > All in all, I just accepted this behaviour as-is. > > Cheers, >Attila > > > On 12 May 2016, at 05:20, Hendrik Sattler > wrote: > > > > > > > > Am 12. Mai 2016 00:00:12 MESZ, schrieb Tiago Macarios < > tiagomacar...@gmail.com>: > >> Hi Attila, > >> > >> Thank you for your help. You are right, if I apply the following > >> modifications it works indeed: > >> > >> set( proj_HEADER > >> include/a.h > >> ) > >> > >> add_library(proj SHARED ${proj_SOURCE} ${proj_HEADER}) > >> > >> But now I got a second question. Why is adding the header files > >> necessary? > >> (Sorry the possibly naive question) > >> > >> I thought that adding the header files to the target was an > >> anti-pattern ( > >> > http://voices.canonical.com/jussi.pakkanen/2013/03/26/a-list-of-common-cmake-antipatterns/ > >> ). Is it related to moc generating header files during the build? If so > >> why > >> is it not a problem when everything is on the same folder? > > > > That same page has a Errata section at the end. > > > > -- > > Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail > gesendet. > > -- > > > > 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