[CMake] CPack : NSIS - registry key setting/over-riding
Hi, As part of my NSIS packaged installer, I need to register an environment variable e.g. MYSOFTWARE_PATH I see the variable CPACK_PACKAGE_INSTALL_REGISTRY_KEY but am unsure about the syntax I tried the following but it didn't work SET ( CPACK_PACKAGE_INSTALL_REGISTRY_KEY "HKEY_CURRENT_USEREnvironmentMYSOFTWARE_PATH C:MyApp" ) Do I have to create the registry key in the first place ? If so, can CPack do that ? Regards -- Nicholas Yue Graphics - RenderMan, Houdini, Visualization, OpenGL, HDF5 Custom Dev - C++ porting, OSX, Linux, Windows http://au.linkedin.com/in/nicholasyue -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] VS10 empty property pages for single source file
Hello! I use 2.8.8 version and got the problem, with absolute paths to files and bug in MSVS2010. Issues is already discribed in bugtracker. http://public.kitware.com/Bug/view.php?id=12570#c27757 http://connect.microsoft.com/VisualStudio/feedback/details/635294/using-absolute-path-in-clcompile-item-prevents-property-pages-from-showing I can't use drive mapping as workaround. Can I somehow switch off asbolute paths in filename or fix this any other way? May be there is a patch for ms studio that's already in downloads? Thanks! -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] LLVM Dragonegg usage in CMakeLists.txt
I am trying to use the LLVM dragonegg plugin for GCC in a project, which is built using CMake. However I have a hard time figuring out how to tell CMake, what it should do. Dragonegg is a plugin, which makes GCC use part of the LLVM infrastructure to optimize the compiled code. In my case, I am trying to compile some Fortran files with GCC using this plugin, postprocess the emitted LLVM code and link the result into a library. Here is what I currently do: SET(LL_FILES) SEPARATE_ARGUMENTS(DRAGONEGG_OPTIONS UNIX_COMMAND "${CMAKE_Fortran_FLAGS} -I ${CMAKE_CURRENT_SOURCE_DIR}/ins -S -fplugin=dragonegg.so -fplugin-arg-dragonegg-emit-ir") FOREACH(File ${Src}) GET_FILENAME_COMPONENT(Filename ${File} NAME_WE) SET (LL_FILES ${LL_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${Filename}.ll) ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${Filename}.ll COMMAND ${CMAKE_Fortran_COMPILER} ${DRAGONEGG_OPTIONS} -o ${CMAKE_CURRENT_BINARY_DIR}/${Filename}.ll ${File} DEPENDS ${File}) ENDFOREACH() ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/form.ll COMMAND llvm-link -S -o ${CMAKE_CURRENT_BINARY_DIR}/form.ll ${LL_FILES} DEPENDS ${LL_FILES}) ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/form.opt.ll COMMAND opt -o ${CMAKE_CURRENT_BINARY_DIR}/form.opt.ll ${CMAKE_CURRENT_BINARY_DIR}/form.ll DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/form.ll) ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/form.opt.o COMMAND llc -o ${CMAKE_CURRENT_BINARY_DIR}/form.S ${CMAKE_CURRENT_BINARY_DIR}/form.opt.ll COMMAND as -o ${CMAKE_CURRENT_BINARY_DIR}/form.opt.o ${CMAKE_CURRENT_BINARY_DIR}/form.S DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/form.opt.ll) ADD_LIBRARY(form_ce STATIC ${CMAKE_CURRENT_BINARY_DIR}/form.opt.o) SET_TARGET_PROPERTIES(form_ce PROPERTIES LINKER_LANGUAGE Fortran) Unfortunately calling the Fortran compiler this way looses the dependency scanning, which is important for Fortran module access. I tried using IMPLICIT_DEPENDS on the first custom command, but the documentation says, that it only works for C and CXX. I also thought about directly putting the dragonegg options into CMAKE_Fortran_FLAGS and use ADD_LIBRARY, but this won't work as well, because the files output by the dragonegg plugin are LLVM source files, which have to be explicitly run through the code generator to turn them into normal object files. Any ideas how to solve this? Martin -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack : NSIS - registry key setting/over-riding
2012/4/25 Nicholas Yue : > Hi, > > As part of my NSIS packaged installer, I need to register an > environment variable e.g. MYSOFTWARE_PATH > > I see the variable CPACK_PACKAGE_INSTALL_REGISTRY_KEY but am unsure > about the syntax > > I tried the following but it didn't work > > SET ( CPACK_PACKAGE_INSTALL_REGISTRY_KEY > "HKEY_CURRENT_USEREnvironmentMYSOFTWARE_PATH C:MyApp" > ) The CMake provided NSIS template (Modules/NSIS.template.in) does: WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR so I bet you normally do: SET(CPACK_PACKAGE_VENDOR "Me") SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${MYSOFTWARE_NAME}") and get "Software\me\MySoftware" installed in the registry. not quite what you want because SHCTX means: SHCTX or SHELL_CONTEXT, it will be replaced with HKLM if SetShellVarContext is set to all and with HKCU if SetShellVarContext is set to current. see: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.2.14 > Do I have to create the registry key in the first place ? If so, can CPack > do that ? I think you'll have to write your own "NSIS.template.in" and make CPack use it (put it in CMAKE_MODULE_PATH or CPACK_MODULE_PATH) -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to add dependency on parent directories?
Hi All! My project's (named Compare) structure is similar to this: Root | SphinX | sphinxbase (autotools project) Sound | |-DoScoring (my Cmake-based project) |-Compare (my Cmake-based project) |-CMakeLists.txt |-src (source files for project Compare) |-ATLAS (autotools project) How add dependencies on other projects to CMakeLists.txt of my project Compare? Thank you in advance, Vyacheslav. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack : NSIS - registry key setting/over-riding
On Wed, Apr 25, 2012 at 8:21 AM, Eric Noulard wrote: > 2012/4/25 Nicholas Yue : >> Hi, >> >> As part of my NSIS packaged installer, I need to register an >> environment variable e.g. MYSOFTWARE_PATH >> >> I see the variable CPACK_PACKAGE_INSTALL_REGISTRY_KEY but am unsure >> about the syntax >> >> I tried the following but it didn't work >> >> SET ( CPACK_PACKAGE_INSTALL_REGISTRY_KEY >> "HKEY_CURRENT_USEREnvironmentMYSOFTWARE_PATH C:MyApp" >> ) > > The CMake provided NSIS template (Modules/NSIS.template.in) does: > > WriteRegStr SHCTX > "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" > "" $INSTDIR > > so I bet you normally do: > SET(CPACK_PACKAGE_VENDOR "Me") > SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${MYSOFTWARE_NAME}") > > and get "Software\me\MySoftware" installed in the registry. > > not quite what you want because SHCTX means: > SHCTX or SHELL_CONTEXT, it will be replaced with HKLM if > SetShellVarContext is set to all and with HKCU if SetShellVarContext > is set to current. > see: > http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.2.14 > >> Do I have to create the registry key in the first place ? If so, can CPack >> do that ? > > I think you'll have to write your own "NSIS.template.in" and make CPack use it > (put it in CMAKE_MODULE_PATH or CPACK_MODULE_PATH) > > -- > Erk > Le gouvernement représentatif n'est pas la démocratie -- > http://www.le-message.org > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake You could also write your own extra NSIS code and put it in the CPack variables CPACK_NSIS_EXTRA_INSTALL_COMMANDS and CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS. Those will be configured into the NSIS template file. HTH, David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Zero coverage being reported on gcc/Linux builds.
Hi Brad, Consider looking at https://github.com/Slicer/Slicer/blob/master/CMake/SlicerDashboardDriverScript.cmake#L246 Hth Jc On Tue, Apr 24, 2012 at 9:13 AM, Bradley Lowekamp wrote: > Hello, > > Are both of these project using SuperBuilds? > > I know with SimpleITK I was unable to get coverage to work in the > SuperBuild structure. To get coverage we are doing the project, with its > self not being an ExternalProject. However, valgrind works just fine in the > Superbuild structure. I didn't see nightly build scripts attached to the > ANTS or BRAIN project so I am only guessing here. > > Brad > > On Apr 24, 2012, at 7:32 AM, David Cole wrote: > > Ugh. You're probably doing everything right, and there's just a bug of > some sort. Unfortunately, debugging these things is neither easy nor fun. > > First, look for Coverage*.log files in the Testing/ subdirectories of your > build tree. Are there any errors mentioned in there? > > Next, verify that there are some *.gcda files in the build tree: > find . -name *.gcda > > There is a known/reported issue with the coverage not reporting correctly > right now for gcc 4.7, but this is the first problem I've heard of with an > earlier gcc... > > http://public.kitware.com/Bug/view.php?id=13121 > > > > On Mon, Apr 23, 2012 at 5:18 PM, Kent Williams > wrote: > >> cmake: 2.8.6 >> gcc/g++: 4.4.6-3 >> Red Hate Enterprise Linux 6.2 >> >> I follow the instructions here: http://www.cmake.org/Wiki/CTest/Coverage >> >> And I have 2 different dashboards that report zero coverage: >> >> >> http://testing.psychiatry.uiowa.edu/CDash/index.php?project=BRAINSStandalone >> http://testing.psychiatry.uiowa.edu/CDash/index.php?project=ANTS >> >> I don't know what's going on because I remember coverage working, and >> it's obviously doing something for other projects, e.g. ITK: >> http://public.kitware.com/dashboard.php?name=itk >> >> Call me an idiot, but I can follow instructions, and following the >> instructions I can find isn't doing the trick. >> -- >> >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.cmake.org/mailman/listinfo/cmake >> > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > > > > > Bradley Lowekamp > > Medical Science and Computing for > > Office of High Performance Computing and Communications > > National Library of Medicine > > blowek...@mail.nih.gov > > > > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > -- +1 919 869 8849 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Zero coverage being reported on gcc/Linux builds.
Great! These look like the important lines to fix my coverage issue with Superbuilds: # HACK Unfortunately ctest_coverage ignores the BUILD argument, try to force it... file(READ ${slicer_build_dir}/CMakeFiles/TargetDirectories.txt slicer_build_coverage_dirs) file(APPEND "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${slicer_build_coverage_dirs}") Thanks, Brad On Apr 25, 2012, at 12:45 PM, Jean-Christophe Fillion-Robin wrote: > Hi Brad, > > Consider looking at > https://github.com/Slicer/Slicer/blob/master/CMake/SlicerDashboardDriverScript.cmake#L246 > > Hth > Jc > > On Tue, Apr 24, 2012 at 9:13 AM, Bradley Lowekamp > wrote: > Hello, > > Are both of these project using SuperBuilds? > > I know with SimpleITK I was unable to get coverage to work in the SuperBuild > structure. To get coverage we are doing the project, with its self not being > an ExternalProject. However, valgrind works just fine in the Superbuild > structure. I didn't see nightly build scripts attached to the ANTS or BRAIN > project so I am only guessing here. > > Brad > > On Apr 24, 2012, at 7:32 AM, David Cole wrote: > >> Ugh. You're probably doing everything right, and there's just a bug of some >> sort. Unfortunately, debugging these things is neither easy nor fun. >> >> First, look for Coverage*.log files in the Testing/ subdirectories of your >> build tree. Are there any errors mentioned in there? >> >> Next, verify that there are some *.gcda files in the build tree: >> find . -name *.gcda >> >> There is a known/reported issue with the coverage not reporting correctly >> right now for gcc 4.7, but this is the first problem I've heard of with an >> earlier gcc... >> >> http://public.kitware.com/Bug/view.php?id=13121 >> >> >> >> On Mon, Apr 23, 2012 at 5:18 PM, Kent Williams >> wrote: >> cmake: 2.8.6 >> gcc/g++: 4.4.6-3 >> Red Hate Enterprise Linux 6.2 >> >> I follow the instructions here: http://www.cmake.org/Wiki/CTest/Coverage >> >> And I have 2 different dashboards that report zero coverage: >> >> http://testing.psychiatry.uiowa.edu/CDash/index.php?project=BRAINSStandalone >> http://testing.psychiatry.uiowa.edu/CDash/index.php?project=ANTS >> >> I don't know what's going on because I remember coverage working, and >> it's obviously doing something for other projects, e.g. ITK: >> http://public.kitware.com/dashboard.php?name=itk >> >> Call me an idiot, but I can follow instructions, and following the >> instructions I can find isn't doing the trick. >> -- >> >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.cmake.org/mailman/listinfo/cmake >> >> -- >> >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.cmake.org/mailman/listinfo/cmake > > > Bradley Lowekamp > Medical Science and Computing for > Office of High Performance Computing and Communications > National Library of Medicine > blowek...@mail.nih.gov > > > > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > > > > -- > +1 919 869 8849 > Bradley Lowekamp Medical Science and Computing for Office of High Performance Computing and Communications National Library of Medicine blowek...@mail.nih.gov -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Calling install() from parent directory
Hi all, I have a rather complex setup with multiple subdirectories under one top-level CMakeLists.txt file. I need to install some targets defined in subdirectories, but the destination of the install is not known at the time the subdirectory is processed (it potentially depends on stuff which happens in the top-level CMakeLists.txt after the subdirectories are added). Is there a way to do this? When I simply tried putting the install(TARGETS ...) commands into the top-level CMakeLists.txt, it complained along the lines of "no such target in current directory." Thanks in advance for any replies. Petr -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake