From laurent.chauvin0 at gmail.com Mon May 1 14:24:42 2017 From: laurent.chauvin0 at gmail.com (Laurent Chauvin) Date: Mon, 01 May 2017 18:24:42 +0000 Subject: [CMake] Linking imported library to ExternalProject Message-ID: Hello, I'm trying to create a superbuild for my project, which require nifticlib library. I am able to automatically download and compile it, as well as import created libraries, however, I'm not sure how can I link it with another external project? Here is my CMake (the relevant part): message(STATUS "Installing Nifti library.") ExternalProject_Add(Nifticlib SOURCE_DIR "${PROJECT_BINARY_DIR}/deps/nifticlib" BINARY_DIR "${PROJECT_BINARY_DIR}/deps/nifticlib-build" INSTALL_DIR "${PROJECT_BINARY_DIR}/deps/nifticlib-install" GIT_REPOSITORY "${git_protocol}://gitlab.com/slckr/nifticlib.git" GIT_TAG "e26a94e947c210104223f9f49737392c742c1c5b" CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH= -DZLIB_INCLUDE_DIR:PATH=${ZLIB_INC_DIR} -DZLIB_LIBRARY_DEBUG:PATH=${ZLIB_LIB_DIR}/${ZLIB_LIB_NAME_DEBUG} -DZLIB_LIBRARY_RELEASE:PATH=${ZLIB_LIB_DIR}/${ZLIB_LIB_NAME_RELEASE} DEPENDS Zlib) set(NIFTIIO_LIB_BASE_NAME "niftiio") set(NIFTIIO_LIB_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}${NIFTIIO_LIB_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}") set(NIFTICDF_LIB_BASE_NAME "nifticdf") set(NIFTICDF_LIB_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}${NIFTICDF_LIB_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}") set(ZNZ_LIB_BASE_NAME "znz") set(ZNZ_LIB_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}${ZNZ_LIB_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}") ExternalProject_Get_Property(Nifticlib install_dir) set(NIFTI_LIB_DIR ${install_dir}/lib) set(NIFTI_INC_DIR ${install_dir}/include/nifti) set(NIFTI_BIN_DIR ${install_dir}/bin) add_library(niftiio STATIC IMPORTED) set_target_properties(niftiio PROPERTIES IMPORTED_LOCATION "${NIFTI_LIB_DIR}/${NIFTIIO_LIB_NAME}") add_library(nifticdf STATIC IMPORTED) set_target_properties(nifticdf PROPERTIES IMPORTED_LOCATION "${NIFTI_LIB_DIR}/${NIFTICDF_LIB_NAME}") add_library(znz STATIC IMPORTED) set_target_properties(znz PROPERTIES IMPORTED_LOCATION "${NIFTI_LIB_DIR}/${ZNZ_LIB_NAME}") ## My project ExternalProject_Add(MyProject SOURCE_DIR "${PROJECT_BINARY_DIR}/deps/myproject" BINARY_DIR "${PROJECT_BINARY_DIR}/deps/myproject-build" INSTALL_DIR "${PROJECT_BINARY_DIR}/deps/myproject-install" GIT_REPOSITORY "${git_protocol}://gitlab.com/slckr/myproject.git" CMAKE_ARGS -DNIFTI_INC_DIR:PATH=${NIFTI_INC_DIR} -DNIFTI_LIB_DIR:PATH=${NIFTI_LIB_DIR} DEPENDS Nifticlib) However, I imported my nifticlib as niftiio,nifticdf, and znz. How can I pass them to be linked with my ExternalProject MyProject? Given that I pass the NIFTI_LIBRARY_DIR, do I just need to do a target_link_libraries(MyProject niftiio nifticdf znz) in my CMakeLists.txt of MyProject? Is it gonna find the proper library (as the name of the library is platform dependent)? Thank you. -Laurent -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.maynard at kitware.com Tue May 2 11:17:08 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 2 May 2017 11:17:08 -0400 Subject: [CMake] [ANNOUNCE] CMake 3.8.1 available for download Message-ID: We are pleased to announce that CMake 3.8.1 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! ------------------------------------------------------------------------- Changes in 3.8.1 since 3.8.0: Alex Turbov (2): FindOpenSSL: Add more library name alternatives FindBoost: Restore tolerance of backslashes in paths Brad King (4): Tests: Fix FindModulesExecuteAll when KDE4 is installed Tests: Simplify CMakeOnly.AllFindModules policy settings FindBoost: Fix library directory for VS 2017 CMake 3.8.1 Domen Vrankar (1): CPack/RPM doc: CPACK_RPM_BUILDREQUIRES docs Mateusz Janek (1): source_group: Fix TREE with root that is not current source dir Raffi Enficiaud (1): FindMatlab: Add support for Matlab 2017a Richard Walters (1): VS: Fix project reference inspection in VS IDE Roger Leigh (3): FindBoost: Allow testing for multiple compiler suffixes FindBoost: Support prebuilt Windows binaries from SourceForge VS2017: Verify Windows 8.1 SDK before using it From kor1581 at gmail.com Wed May 3 04:05:57 2017 From: kor1581 at gmail.com (K O ranjith) Date: Wed, 3 May 2017 13:35:57 +0530 Subject: [CMake] Qt Project Generator for Cmake Message-ID: I'm using CMake for Qt creator project(in Non-Qt c++ project). In Qt kit->CMake generator I couldn't find a way to generate a Qt project (o CMakeLists.txt which can open as non-Qt project in Qt creator) (But have generator option to other IDE types like to Generate Visual studio project) Have any CMake Generator which create Qt project file(or CMakeLists.txt file)'? -------------- next part -------------- An HTML attachment was scrubbed... URL: From annulen at yandex.ru Wed May 3 05:48:34 2017 From: annulen at yandex.ru (Konstantin Tokarev) Date: Wed, 03 May 2017 12:48:34 +0300 Subject: [CMake] Qt Project Generator for Cmake In-Reply-To: References: Message-ID: <152251493804914@web40j.yandex.ru> An HTML attachment was scrubbed... URL: From robert.maynard at kitware.com Wed May 3 15:12:08 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 3 May 2017 15:12:08 -0400 Subject: [CMake] CPack not detecting pkgbuild or product build In-Reply-To: References: Message-ID: Hi Ayla, The packages that are built when executing "make package" is determined by the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally located in the root of your build directory as it is configured ). On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan wrote: > I?m trying to build a Mac OS X installer package on 10.10.5 using Xcode > 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a > package from the CMake build directory if I call cpack directly on the > command line with -G productbuild, but not through the CMake build using > make package. Is there a CPack setting I need or some other build > configuration information? Is the Xcode version too old? > > Thanks, > > Ayla > -- > > 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 ayla at sci.utah.edu Wed May 3 16:14:47 2017 From: ayla at sci.utah.edu (Ayla Khan) Date: Wed, 3 May 2017 14:14:47 -0600 Subject: [CMake] CPack not detecting pkgbuild or product build In-Reply-To: References: Message-ID: <610C3570-EE49-4B59-A9B5-AE2A004589BD@sci.utah.edu> Thank you Robert. The CPACK_GENERATOR variable is currently set to ?STGZ;TGZ?. When I installed Xcode, I made sure using xcode-select that the usual command line tools were installed. I can find productbuild in my PATH, but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need to explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR was generated automatically. Also, I?ve been working with Xcode 8 on OS X 10.11.6, and CPack is ignoring productbuild completely even if I set it using the generator flag. Command line tools were also set up using xcode-select. Thanks, Ayla > On May 3, 2017, at 1:12 PM, Robert Maynard wrote: > > Hi Ayla, > > The packages that are built when executing "make package" is determined by the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally located in the root of your build directory as it is configured ). > > > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan wrote: > I?m trying to build a Mac OS X installer package on 10.10.5 using Xcode 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a package from the CMake build directory if I call cpack directly on the command line with -G productbuild, but not through the CMake build using make package. Is there a CPack setting I need or some other build configuration information? Is the Xcode version too old? > > Thanks, > > Ayla > -- > > 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 robert.maynard at kitware.com Wed May 3 16:56:17 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 3 May 2017 16:56:17 -0400 Subject: [CMake] CPack not detecting pkgbuild or product build In-Reply-To: <610C3570-EE49-4B59-A9B5-AE2A004589BD@sci.utah.edu> References: <610C3570-EE49-4B59-A9B5-AE2A004589BD@sci.utah.edu> Message-ID: You will need to append the productbuild type to you CPACK_GENERATOR so it would look like SET(CPACK_GENERATOR "productbuild;STGZ;TGZ") On Wed, May 3, 2017 at 4:14 PM, Ayla Khan wrote: > Thank you Robert. The CPACK_GENERATOR variable is currently set to > ?STGZ;TGZ?. When I installed Xcode, I made sure using xcode-select that the > usual command line tools were installed. I can find productbuild in my > PATH, but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need > to explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I > append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR > was generated automatically. > > Also, I?ve been working with Xcode 8 on OS X 10.11.6, and CPack is > ignoring productbuild completely even if I set it using the generator flag. > Command line tools were also set up using xcode-select. > > Thanks, > > Ayla > > > On May 3, 2017, at 1:12 PM, Robert Maynard > wrote: > > > > Hi Ayla, > > > > The packages that are built when executing "make package" is determined > by the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally > located in the root of your build directory as it is configured ). > > > > > > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan wrote: > > I?m trying to build a Mac OS X installer package on 10.10.5 using Xcode > 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a > package from the CMake build directory if I call cpack directly on the > command line with -G productbuild, but not through the CMake build using > make package. Is there a CPack setting I need or some other build > configuration information? Is the Xcode version too old? > > > > Thanks, > > > > Ayla > > -- > > > > 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 ayla at sci.utah.edu Wed May 3 18:39:14 2017 From: ayla at sci.utah.edu (Ayla Khan) Date: Wed, 3 May 2017 16:39:14 -0600 Subject: [CMake] CPack not detecting pkgbuild or product build In-Reply-To: References: <610C3570-EE49-4B59-A9B5-AE2A004589BD@sci.utah.edu> Message-ID: That worked - thank you! Do I need to add NSIS manually for Windows installers as well? It looks like CMake finds NSIS without any difficulty but I?d rather be sure. Thanks, Ayla > On May 3, 2017, at 2:56 PM, Robert Maynard wrote: > > You will need to append the productbuild type to you CPACK_GENERATOR so it would look like SET(CPACK_GENERATOR "productbuild;STGZ;TGZ") > > On Wed, May 3, 2017 at 4:14 PM, Ayla Khan > wrote: > Thank you Robert. The CPACK_GENERATOR variable is currently set to ?STGZ;TGZ?. When I installed Xcode, I made sure using xcode-select that the usual command line tools were installed. I can find productbuild in my PATH, but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need to explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR was generated automatically. > > Also, I?ve been working with Xcode 8 on OS X 10.11.6, and CPack is ignoring productbuild completely even if I set it using the generator flag. Command line tools were also set up using xcode-select. > > Thanks, > > Ayla > > > On May 3, 2017, at 1:12 PM, Robert Maynard > wrote: > > > > Hi Ayla, > > > > The packages that are built when executing "make package" is determined by the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally located in the root of your build directory as it is configured ). > > > > > > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan > wrote: > > I?m trying to build a Mac OS X installer package on 10.10.5 using Xcode 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a package from the CMake build directory if I call cpack directly on the command line with -G productbuild, but not through the CMake build using make package. Is there a CPack setting I need or some other build configuration information? Is the Xcode version too old? > > > > Thanks, > > > > Ayla > > -- > > > > 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 seanwayland at gmail.com Wed May 3 23:20:43 2017 From: seanwayland at gmail.com (Sean Wayland) Date: Wed, 3 May 2017 23:20:43 -0400 Subject: [CMake] linking boost to cmake under OSX 10.12.1 , boost 1.63 , cmake 2017.11 Message-ID: Hi all, I am very new to cmake and boost. Sorry if my question is basic thanks for your help in advance. I am having trouble linking a project to boost. I am using OSX 10.12.1 I am using clion 2017.1.1 I installed boost on my machine using /bootstrap.sh --prefix=/usr/local/boost --with-libraries=filesystem,system I also tried a brew install boost also . Boost can indeed be found here *usr/local/boost/ *on my machine. I haven't had much luck getting boost to link properly. I believe the project uses the filesystem and tuple modules. I am getting this error CMake Error at CMakeLists.txt:557 (ADD_EXECUTABLE): Cannot find source file: anyExecutable.cpp >From what I have read I think that if you are using OSX that you have to use the FIND_PACKAGE command to link things properly. I suspect that the code below doesn't work because I need to properly place the exact filesystem location of the executable file created in the add_executable command. On a positive note I did get this message -- Boost version: 1.63.0 -- Found the following Boost libraries: -- program_options -- Configuring done I have tried various versions of these 2 cmakelists scripts below (A) and (B) Can anyone point me in the direction of a solution here? *A) * FIND_PACKAGE( Boost 1.63.0 COMPONENTS program_options REQUIRED ) INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} ) ADD_EXECUTABLE( anyExecutable anyExecutable.cpp ) TARGET_LINK_LIBRARIES( anyExecutable ${Boost_LIBRARIES} ) B) INCLUDE_DIRECTORIES(*usr/local/boost/include/*) ADD_EXECUTABLE( * anyExecutable myMain.cpp *) TARGET_LINK_LIBRARIES( *anyExecutable usr/local/boost/lib/ *) Thanks very much for your help . Yours Sincerely Sean Wayland www.seanwayland.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mellery451 at gmail.com Thu May 4 01:32:09 2017 From: mellery451 at gmail.com (Michael Ellery) Date: Wed, 3 May 2017 22:32:09 -0700 Subject: [CMake] linking boost to cmake under OSX 10.12.1 , boost 1.63 , cmake 2017.11 In-Reply-To: References: Message-ID: <9DF50830-6CA6-41F3-97B7-18D3DF556865@gmail.com> > On May 3, 2017, at 8:20 PM, Sean Wayland wrote: > > Hi all, > > I am very new to cmake and boost. Sorry if my question is basic thanks for your help in advance. > > I am having trouble linking a project to boost. I am using OSX 10.12.1 > I am using clion 2017.1.1 > > I installed boost on my machine using /bootstrap.sh --prefix=/usr/local/boost --with-libraries=filesystem,system > > I also tried a brew install boost also . > > Boost can indeed be found here usr/local/boost/ on my machine. > > I haven't had much luck getting boost to link properly. > > I believe the project uses the filesystem and tuple modules. > > I am getting this error > > CMake Error at CMakeLists.txt:557 (ADD_EXECUTABLE): > Cannot find source file: > > anyExecutable.cpp > This error means that it can?t find the named source file. The path is relative to the CMakeLists.txt file in which you define the target. Does that source file exist in that location? > From what I have read I think that if you are using OSX that you have to use the FIND_PACKAGE command to link things properly. I suspect that the code below doesn't work because I need to properly place the exact filesystem location of the executable file created in the add_executable command. > On a positive note I did get this message > -- Boost version: 1.63.0 > -- Found the following Boost libraries: > -- program_options > -- Configuring done > This indicates that it found some version of boost, but it seems only the program_options library. I would add message(?$Boost_LIBRARIES?) after your find_package() statement to print out the location of the found libraries to see if that matches your expectation. I generally prefer to do a full staged build of boost from source..that typically looks like ?./bootstrap.sh && ./b2 stage? ? and I then I point to that staged build using a BOOST_ROOT environment variable (the CMake boost finder will honor BOOST_ROOT, I believe). You can also just do a ./b2 install to put everything in /usr/local/. > I have tried various versions of these 2 cmakelists scripts below (A) and (B) > > Can anyone point me in the direction of a solution here? > > > A) > > FIND_PACKAGE( Boost 1.63.0 COMPONENTS program_options REQUIRED ) > INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} ) > > ADD_EXECUTABLE( anyExecutable anyExecutable.cpp ) > > TARGET_LINK_LIBRARIES( anyExecutable ${Boost_LIBRARIES} ) > B) > INCLUDE_DIRECTORIES(usr/local/boost/include/) > > ADD_EXECUTABLE( anyExecutable myMain.cpp ) > > TARGET_LINK_LIBRARIES( anyExecutable usr/local/boost/lib/ ) > > version (A) seems closer to what you want to me - but I suspect the error you posted was from option (B). Perhaps try running A again and share the error message(s) you get with that. -Mike From lectem at gmail.com Thu May 4 02:37:18 2017 From: lectem at gmail.com (=?UTF-8?Q?Cl=C3=A9ment_Gregoire?=) Date: Thu, 04 May 2017 06:37:18 +0000 Subject: [CMake] DLL handling under CMake In-Reply-To: <2114FB31-FF89-4461-8713-75FAA7179E4E@hendrik-sattler.de> References: <2114FB31-FF89-4461-8713-75FAA7179E4E@hendrik-sattler.de> Message-ID: I'd also be interested in this. I saw an old mail in the ML about this, but it seems fixup_bundle is old and cant use generator expressions, making it hard to use (I don't want to hardcode the executable path). Do you have a sample for this ? CMake would really benefit from having those features made more accessible instead of everyone having to write its own script Le sam. 29 avr. 2017 22:10, Hendrik Sattler a ?crit : > > > Am 27. April 2017 10:43:50 MESZ schrieb Louis-Paul CORDIER < > lp.cordier at dynamixyz.com>: > >This steps are tedious and I'm wondering if there is a mechanism that > >exists or that have to be imagined to make the DLL nightmare end. > > I use BundleUtilities to achieve the copying of DLL files to the > installation directory. The main problem for this is to enumerate the > needed directories. > > I use the same for copying DLL files to the output directory to ease > debugging. > > The advantage is the inspection of the exe for really needed DLL files. > This AUTOMATICALLY handles the case debug vs. release. > > HS > > -- > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lectem at gmail.com Thu May 4 03:51:44 2017 From: lectem at gmail.com (lectem at gmail.com) Date: Thu, 4 May 2017 09:51:44 +0200 Subject: [CMake] DLL handling under CMake In-Reply-To: References: <2114FB31-FF89-4461-8713-75FAA7179E4E@hendrik-sattler.de> Message-ID: <590add90.925c1c0a.632e2.33a2@mx.google.com> I managed to get it working by using an intermediate script. One might want to generate the script instead of using the ??RUN_IT?? variable trick. This was only tested on Windows, but seems to work fine. Put the following code in a xxxxxx.cmake file, include it from your CMakeLists.txt and enjoy. # This is a helper script to run BundleUtilities fixup_bundle as postbuild # for a target. The primary use case is to copy .DLLs to the build directory for # the Windows platform. It allows generator expressions to be used to determine # the binary location # # Usage : run_fixup(TARGET LIBS DIRS) # - TARGET : A cmake target # - See fixup_bundle for LIBS and DIRS arguments if(RUN_IT) # Script ran by the add_custom_command include(BundleUtilities) fixup_bundle("${TO_FIXUP_FILE}" "${TO_FIXUP_LIBS}" "${TO_FIXUP_DIRS}") # End of script ran by the add_custom_command else() set(THIS_FILE ${CMAKE_CURRENT_LIST_FILE}) message(${THIS_FILE}) function(run_fixup _target _libs _dirs) message(${THIS_FILE}) add_custom_command( TARGET ${_target} POST_BUILD COMMAND ${CMAKE_COMMAND} -DRUN_IT:BOOL=ON -DTO_FIXUP_FILE=$ -DTO_FIXUP_LIBS=${_libs} -DTO_FIXUP_DIRS=${_dirs} -P ${THIS_FILE} COMMENT "Fixing up dependencies for ${_target}" VERBATIM ) endfunction() endif() De?: Cl?ment Gregoire Envoy? le?:jeudi 4 mai 2017 08:37 ??: Hendrik Sattler; Louis-Paul CORDIER; Cmake Mailing List Objet?:Re: [CMake] DLL handling under CMake I'd also be interested in this. I saw an old mail in the ML about this, but it seems fixup_bundle is old and cant use generator expressions, making it hard to use (I don't want to hardcode the executable path). Do you have a sample for this ? CMake would really benefit from having those features made more accessible instead of everyone having to write its own script? Le sam. 29 avr. 2017 22:10, Hendrik Sattler a ?crit?: Am 27. April 2017 10:43:50 MESZ schrieb Louis-Paul CORDIER : >This steps are tedious and I'm wondering if there is a mechanism that >exists or that have to be imagined to make the DLL nightmare end. I use BundleUtilities to achieve the copying of DLL files to the installation directory. The main problem for this is to enumerate the needed directories. I use the same for copying DLL files to the output directory to ease debugging. The advantage is the inspection of the exe for really needed DLL files. This AUTOMATICALLY handles the case debug vs. release. HS -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jellby at yahoo.com Thu May 4 03:55:26 2017 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Thu, 4 May 2017 09:55:26 +0200 Subject: [CMake] Circular dependencies with Ninja, not with Unix Makefiles Message-ID: <25a40380-1454-92af-ae4d-44615f3afabe@yahoo.com> Hello, I have a project where circular dependencies are generated when I use the Ninja generator, but not the default Unix Makefiles. I could create a minimal test like this: $ cat CMakeLists.txt add_subdirectory (ext ${PROJECT_BINARY_DIR}/ext) $ cat ext/CMakeLists.txt set (OUT ${CMAKE_CURRENT_LIST_DIR}) add_custom_command (OUTPUT ${OUT}/foo COMMAND touch ${OUT}/foo ) add_custom_target (foo ALL DEPENDS ${OUT}/foo ) add_custom_command (TARGET foo POST_BUILD COMMAND cp ${OUT}/foo ${CMAKE_BINARY_DIR}/foo ) $ touch ext/bar $ cmake -G Ninja . [...] $ ninja ninja: warning: multiple rules generate ext/foo. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn] ninja: error: dependency cycle: ext/foo -> ext/CMakeFiles/foo.util -> ext/CMakeFiles/foo -> ext/foo I used a freshly compiled CMake 3.8 and the latest binary ninja from https://github.com/Kitware/ninja/releases. Ignacio From dan at su-root.co.uk Thu May 4 07:35:43 2017 From: dan at su-root.co.uk (Dan Liew) Date: Thu, 4 May 2017 12:35:43 +0100 Subject: [CMake] When Ninja byproduct is a directory causes `clean` target to fail. Message-ID: Hi, I recently added support to a project to build its API documentation [1]. The documentation is generated by doxygen. I used `add_custom_command()` to run doxygen and I use `BYPRODUCTS` to specify the output directory that will be generated by doxygen in the hope that this would tell ninja to remove it when the `clean` target is run. However this doesn't work because ninja complains that the directory isn't empty. Is `BYPRODUCTS` not supposed to be used with directories, or is this a bug? [1] https://github.com/Z3Prover/z3/blob/a9d6ef68f02d636d9628a52a257d968a13321752/contrib/cmake/doc/CMakeLists.txt#L59 Thanks, Dan. From robert.maynard at kitware.com Thu May 4 08:09:53 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Thu, 4 May 2017 08:09:53 -0400 Subject: [CMake] CPack not detecting pkgbuild or product build In-Reply-To: References: <610C3570-EE49-4B59-A9B5-AE2A004589BD@sci.utah.edu> Message-ID: Hi, By default the NSIS generator is enabled. On Wed, May 3, 2017 at 6:39 PM, Ayla Khan wrote: > That worked - thank you! Do I need to add NSIS manually for Windows > installers as well? It looks like CMake finds NSIS without any difficulty > but I?d rather be sure. > > Thanks, > > Ayla > > On May 3, 2017, at 2:56 PM, Robert Maynard > wrote: > > You will need to append the productbuild type to you CPACK_GENERATOR so > it would look like SET(CPACK_GENERATOR "productbuild;STGZ;TGZ") > > On Wed, May 3, 2017 at 4:14 PM, Ayla Khan wrote: > >> Thank you Robert. The CPACK_GENERATOR variable is currently set to >> ?STGZ;TGZ?. When I installed Xcode, I made sure using xcode-select that the >> usual command line tools were installed. I can find productbuild in my >> PATH, but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need >> to explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I >> append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR >> was generated automatically. >> >> Also, I?ve been working with Xcode 8 on OS X 10.11.6, and CPack is >> ignoring productbuild completely even if I set it using the generator flag. >> Command line tools were also set up using xcode-select. >> >> Thanks, >> >> Ayla >> >> > On May 3, 2017, at 1:12 PM, Robert Maynard >> wrote: >> > >> > Hi Ayla, >> > >> > The packages that are built when executing "make package" is determined >> by the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally >> located in the root of your build directory as it is configured ). >> > >> > >> > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan wrote: >> > I?m trying to build a Mac OS X installer package on 10.10.5 using Xcode >> 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a >> package from the CMake build directory if I call cpack directly on the >> command line with -G productbuild, but not through the CMake build using >> make package. Is there a CPack setting I need or some other build >> configuration information? Is the Xcode version too old? >> > >> > Thanks, >> > >> > Ayla >> > -- >> > >> > 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 rcdailey.lists at gmail.com Thu May 4 11:42:22 2017 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Thu, 4 May 2017 10:42:22 -0500 Subject: [CMake] What is ANDROID_JAVA_SOURCE_DIR for? Message-ID: I am seeing hints of ANT / JAVA support for Android in 3.8.1 documentation. Essentially there is a whole list of properties that have unexplained use cases under Properties for Targets. I see ANDROID_JAVA_SOURCE_DIR, for example. What are these for? Will CMake actually do the "ant release" command for you? I've been using custom targets to do the java build & packaging steps for Android. From rcdailey.lists at gmail.com Thu May 4 11:47:14 2017 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Thu, 4 May 2017 10:47:14 -0500 Subject: [CMake] How to get list of target dependencies? Message-ID: How can I get a list of target dependencies of a target? For example, if I have 3 library targets that depend on each other like this: A -> B -> C When I ask for the target dependencies for A, I should get a list back with B in it. Basically this would be the same list I pass to target_link_libraries(), minus actual library files with no corresponding target known to CMake. I see a LINK_DEPENDS target property. Is this what I want? From rcdailey.lists at gmail.com Thu May 4 11:47:27 2017 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Thu, 4 May 2017 10:47:27 -0500 Subject: [CMake] How to get list of target dependencies? In-Reply-To: References: Message-ID: Forgot to mention, I'm using CMake 3.8.1 On Thu, May 4, 2017 at 10:47 AM, Robert Dailey wrote: > How can I get a list of target dependencies of a target? For example, > if I have 3 library targets that depend on each other like this: > > A -> B -> C > > When I ask for the target dependencies for A, I should get a list back > with B in it. Basically this would be the same list I pass to > target_link_libraries(), minus actual library files with no > corresponding target known to CMake. > > I see a LINK_DEPENDS target property. Is this what I want? From volo.zyko at gmail.com Thu May 4 12:19:44 2017 From: volo.zyko at gmail.com (Volo Zyko) Date: Thu, 4 May 2017 19:19:44 +0300 Subject: [CMake] Inconsistent parsing of bracket comments in command arguments Message-ID: Hi, I've encountered the following behavior. Code like 'set(FOO#[[bar]] 1)' is parsed fine by cmake, but for the code 'set(FOO #[[bar]]1)' cmake reports: Syntax Error in cmake code at column 13 Argument not separated from preceding token by whitespace. Is this by design or just an omission? As for me either separation should be required on both sides of bracket comment or it should allow to omit separation on both sides too. Volo Zyko From kris.f.thielemans at gmail.com Thu May 4 17:13:02 2017 From: kris.f.thielemans at gmail.com (Kris Thielemans) Date: Thu, 4 May 2017 22:13:02 +0100 Subject: [CMake] avoiding finding system libraries (motivation is superbuilds) Message-ID: <02c801d2c51b$3744f2a0$a5ced7e0$@gmail.com> Hi Short question: if we have a library/include files installed both in the usual system locations and outside, how do we force CMake to find the latter? (without modifying the CMake files of the project). Motivation: We're trying to make a SuperBuild that builds/downloads a specific version of various packages (such as Boost and GTest). Our motivation is to have complete control of the version. We don't want to install this in standard locations to avoid clashes, root permissions etc. So let's say we install our versions in ~/our_stuff/lib, ~/our_stuff/include etc It seems very hard (and sometimes impossible) however to let future find_packages find our own versions as opposed to the system ones. From https://cmake.org/cmake/help/latest/command/find_library.html I thought that doing something like this would work cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff but the system version of boost etc are still found first (it does work if there is no system version of the library). In the case of Boost, even cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff -DBOOST_ROOT=~/our_stuff doesn't help (tested on Linux). I have to set BOOST_INCLUDEDIR for instance. As every Find*.cmake has its own conventions of specifying cmake/environment variables, and some don't at all, this just gets unfeasible. I know about NO_DEFAULT_PATH, NO_CMAKE_SYSTEM_PATH etc options for find_package, but this would need modification of CMake files in the dependent packages which is quite undesirable for us. Any suggestions? Thanks Kris -------------- next part -------------- An HTML attachment was scrubbed... URL: From ayla at sci.utah.edu Thu May 4 17:20:04 2017 From: ayla at sci.utah.edu (Ayla Khan) Date: Thu, 4 May 2017 15:20:04 -0600 Subject: [CMake] CPack not detecting pkgbuild or product build In-Reply-To: References: <610C3570-EE49-4B59-A9B5-AE2A004589BD@sci.utah.edu> Message-ID: <5703DE43-D989-4339-8A1B-E24A32504B02@sci.utah.edu> OK, good to know. Best, Ayla > On May 4, 2017, at 6:09 AM, Robert Maynard wrote: > > Hi, > > By default the NSIS generator is enabled. > > On Wed, May 3, 2017 at 6:39 PM, Ayla Khan > wrote: > That worked - thank you! Do I need to add NSIS manually for Windows installers as well? It looks like CMake finds NSIS without any difficulty but I?d rather be sure. > > Thanks, > > Ayla > >> On May 3, 2017, at 2:56 PM, Robert Maynard > wrote: >> >> You will need to append the productbuild type to you CPACK_GENERATOR so it would look like SET(CPACK_GENERATOR "productbuild;STGZ;TGZ") >> >> On Wed, May 3, 2017 at 4:14 PM, Ayla Khan > wrote: >> Thank you Robert. The CPACK_GENERATOR variable is currently set to ?STGZ;TGZ?. When I installed Xcode, I made sure using xcode-select that the usual command line tools were installed. I can find productbuild in my PATH, but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need to explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR was generated automatically. >> >> Also, I?ve been working with Xcode 8 on OS X 10.11.6, and CPack is ignoring productbuild completely even if I set it using the generator flag. Command line tools were also set up using xcode-select. >> >> Thanks, >> >> Ayla >> >> > On May 3, 2017, at 1:12 PM, Robert Maynard > wrote: >> > >> > Hi Ayla, >> > >> > The packages that are built when executing "make package" is determined by the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally located in the root of your build directory as it is configured ). >> > >> > >> > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan > wrote: >> > I?m trying to build a Mac OS X installer package on 10.10.5 using Xcode 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a package from the CMake build directory if I call cpack directly on the command line with -G productbuild, but not through the CMake build using make package. Is there a CPack setting I need or some other build configuration information? Is the Xcode version too old? >> > >> > Thanks, >> > >> > Ayla >> > -- >> > >> > 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 kimberly.kryger at gmail.com Thu May 4 19:56:42 2017 From: kimberly.kryger at gmail.com (Kim Kryger) Date: Thu, 4 May 2017 19:56:42 -0400 Subject: [CMake] Build tool mode with MSBuild not ignoring targets excluded from default Message-ID: Hello all, I am using the Build Tool Mode in CMake 3.7.1 to build INSTALL targets in a MSVC11 build folder. According to the documentation (and the output from MSBuild), it should be building 'default targets' only, but it doesn't specify what that means exactly. The command I am running: cmake.exe --build vc110 --target INSTALL --config Release_mdd This is building every single target in the solution, even if they have been turned off by EXCLUDE_FROM_DEFAULT_BUILD, EXCLUDE_FROM_DEFAULT_BUILD_, or even EXCLUDE_FROM_ALL. Seemingly the only way I can prevent the excluded project from being built is to remove the target as a dependency on other targets, or invoke MSBuild with the solution file directly, which isn't very cross-platform friendly, and I'd prefer to utilize CMake's knowledge of the build tools than write my own MSBuild finder. More information: I have a runtime library and a plugin that is loaded in an executable. The runtime library is being built for multiple configurations (Release, Debug, Release_mdd, Debug_md), but the plugin is only supposed to build in Release and Debug. I have excluded the plugin from the default build: SET( CMAKE_CONFIGURATION_TYPES "Release;Release_mdd;Debug;Debug_md" ) ... SET_TARGET_PROPERTIES( MyPlugin PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD_RELEASE_MDD 1 EXCLUDE_FROM_DEFAULT_BUILD_DEBUG_MD 1 ) I can call MSBuild with the solution file, and it correctly ignores the builds that are marked as excluded, but AFAIK CMake's build tool mode doesn't support this right now, I believe because of the usage of the References in ALL BUILD causes all referenced projects to be built, regardless of the solution configuration ('fixable' by using /p:BuildProjectReferences=false as an option to MSBuild) Looking through the code (cmGlobalVisualStudio10Generator::GenerateBuildCommand), it seems I can 'spoof' it into using the sln and ignoring the ALL_BUILD vcxproj file completely if I specify 'clean' as the target, and then add /t:Build to the end of the command line. I'd rather not do this, as it doesn't remove the 'clean' option. I guess my question is if the build tool mode is making assumptions about what file I want it to build with? As a workaround, is there an option to force it to use devenv for the time being? Thanks, Kim -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.maynard at kitware.com Fri May 5 08:22:27 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Fri, 5 May 2017 08:22:27 -0400 Subject: [CMake] Circular dependencies with Ninja, not with Unix Makefiles In-Reply-To: <25a40380-1454-92af-ae4d-44615f3afabe@yahoo.com> References: <25a40380-1454-92af-ae4d-44615f3afabe@yahoo.com> Message-ID: Hi, This is caused by doing an in source build and thereby causing the issue. The custom command is outputting a file called 'foo', which is also the chosen name of a target in the ninja file. All of this results in ninja conflating the two and causing a circular dependency. Your options are to not to in source builds, or to choose a different name for your custom target. On Thu, May 4, 2017 at 3:55 AM, Ignacio Fern?ndez Galv?n via CMake < cmake at cmake.org> wrote: > Hello, > > I have a project where circular dependencies are generated when I use the > Ninja generator, but not the default Unix Makefiles. I could create a > minimal test like this: > > $ cat CMakeLists.txt > add_subdirectory (ext ${PROJECT_BINARY_DIR}/ext) > > $ cat ext/CMakeLists.txt > set (OUT ${CMAKE_CURRENT_LIST_DIR}) > > add_custom_command (OUTPUT ${OUT}/foo > COMMAND touch ${OUT}/foo > ) > > add_custom_target (foo ALL > DEPENDS ${OUT}/foo > ) > > add_custom_command (TARGET foo > POST_BUILD > COMMAND cp ${OUT}/foo ${CMAKE_BINARY_DIR}/foo > ) > > $ touch ext/bar > > $ cmake -G Ninja . > [...] > > $ ninja > ninja: warning: multiple rules generate ext/foo. builds involving this > target will not be correct; continuing anyway [-w dupbuild=warn] > ninja: error: dependency cycle: ext/foo -> ext/CMakeFiles/foo.util -> > ext/CMakeFiles/foo -> ext/foo > > I used a freshly compiled CMake 3.8 and the latest binary ninja from > https://github.com/Kitware/ninja/releases. > > Ignacio > -- > > 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/opensou > rce/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.maynard at kitware.com Fri May 5 08:37:56 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Fri, 5 May 2017 08:37:56 -0400 Subject: [CMake] avoiding finding system libraries (motivation is superbuilds) In-Reply-To: <02c801d2c51b$3744f2a0$a5ced7e0$@gmail.com> References: <02c801d2c51b$3744f2a0$a5ced7e0$@gmail.com> Message-ID: Have you tried using CMAKE_PREFIX_PATH instead of CMAKE_INSTALL_PREFIX? On Thu, May 4, 2017 at 5:13 PM, Kris Thielemans wrote: > Hi > > > > Short question: if we have a library/include files installed both in the > usual system locations and outside, how do we force CMake to find the > latter? (without modifying the CMake files of the project). > > > > Motivation: > > We?re trying to make a SuperBuild that builds/downloads a specific version > of various packages (such as Boost and GTest). Our motivation is to have > complete control of the version. We don?t want to install this in standard > locations to avoid clashes, root permissions etc. So let?s say we install > our versions in ~/our_stuff/lib, ~/our_stuff/include etc > > > > It seems very hard (and sometimes impossible) however to let future > find_packages find our own versions as opposed to the system ones. From > https://cmake.org/cmake/help/latest/command/find_library.html I thought > that doing something like this would work > > > > cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff > > > > but the system version of boost etc are still found first (it does work if > there is no system version of the library). In the case of Boost, even > > > > cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff -DBOOST_ROOT=~/our_stuff > > > > doesn?t help (tested on Linux). I have to set BOOST_INCLUDEDIR for > instance. As every Find*.cmake has its own conventions of specifying > cmake/environment variables, and some don?t at all, this just gets > unfeasible. > > > > I know about NO_DEFAULT_PATH, NO_CMAKE_SYSTEM_PATH etc options for > find_package, but this would need modification of CMake files in the > dependent packages which is quite undesirable for us. > > > > Any suggestions? > > > > Thanks > > Kris > > > > -- > > 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 jellby at yahoo.com Fri May 5 08:47:34 2017 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Fri, 5 May 2017 14:47:34 +0200 Subject: [CMake] Circular dependencies with Ninja, not with Unix Makefiles In-Reply-To: References: <25a40380-1454-92af-ae4d-44615f3afabe@yahoo.com> Message-ID: <82886ad3-9c58-7081-d17f-929c26f20e9b@yahoo.com> Well, in my real case this happens even with out-of-source builds, which also occurs in the test case if I change: set (OUT ${CMAKE_BINARY_DIR}/ext) in ext/CMakeLists.txt. Sure, I can avoid it by renaming the file or target, but I thought this is something that could be avoided by either (a) generating unique ninja target names when possible, or (b) warning at the cmake stage that target names are duplicated. From my point of view as a CMake user, I see no reason why the combination of add_custom_command and add_custom_target should have a conflict. On 05/05/17 14:22, Robert Maynard wrote: > Hi, > > This is caused by doing an in source build and thereby causing the > issue. The custom command is outputting a file called 'foo', which is > also the chosen name of a target in the ninja file. All of this results > in ninja conflating the two and causing a circular dependency. > > Your options are to not to in source builds, or to choose a different > name for your custom target. > > On Thu, May 4, 2017 at 3:55 AM, Ignacio Fern?ndez Galv?n via CMake > > wrote: > > Hello, > > I have a project where circular dependencies are generated when I > use the Ninja generator, but not the default Unix Makefiles. I could > create a minimal test like this: > > $ cat CMakeLists.txt > add_subdirectory (ext ${PROJECT_BINARY_DIR}/ext) > > $ cat ext/CMakeLists.txt > set (OUT ${CMAKE_CURRENT_LIST_DIR}) > > add_custom_command (OUTPUT ${OUT}/foo > COMMAND touch ${OUT}/foo > ) > > add_custom_target (foo ALL > DEPENDS ${OUT}/foo > ) > > add_custom_command (TARGET foo > POST_BUILD > COMMAND cp ${OUT}/foo ${CMAKE_BINARY_DIR}/foo > ) > > $ touch ext/bar > > $ cmake -G Ninja . > [...] > > $ ninja > ninja: warning: multiple rules generate ext/foo. builds involving > this target will not be correct; continuing anyway [-w dupbuild=warn] > ninja: error: dependency cycle: ext/foo -> ext/CMakeFiles/foo.util > -> ext/CMakeFiles/foo -> ext/foo > > I used a freshly compiled CMake 3.8 and the latest binary ninja from > https://github.com/Kitware/ninja/releases > . > > Ignacio > -- > > 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 eric.noulard at gmail.com Fri May 5 10:16:38 2017 From: eric.noulard at gmail.com (Eric Noulard) Date: Fri, 5 May 2017 16:16:38 +0200 Subject: [CMake] Does JOB_POOL_[COMPILE|LINK] work with custom_target? Message-ID: Hi all, We have a bunch of custom_target and a subset of them should be run in sequence. So we tried to define: set_property(GLOBAL PROPERTY JOB_POOLS exclusive=1) and then: set_property(TARGET my_custom_target PROPERTY JOB_POOL_COMPILE exclusive) set_property(TARGET my_custom_target PROPERTY JOB_POOL_LINK exclusive) This does not seem to reach build.ninja ? The new pool is defined but the concerned custom targets are never assigned to the pool? May custom target be assigned to a ninja pool? If so how can we do that? -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan.e.sanchez at gmail.com Fri May 5 10:29:24 2017 From: juan.e.sanchez at gmail.com (Juan E. Sanchez) Date: Fri, 5 May 2017 09:29:24 -0500 Subject: [CMake] setting environment variable for ctest Message-ID: <35ad55f3-e687-1287-cf68-d8f59cfa4ef2@gmail.com> Hello, It appears that when I invoke ctest through cmake, the environment variables I export from my bash shell are being ignored: DYLD_INSERT_LIBRARIES PATH Is there a way to tell cmake to pass the user environment all the way down to the environment for my tested application. This is on Mac OS X (El Capitan) with the latest cmake binary download 3.8.1. Regards, Juan From juan.e.sanchez at gmail.com Fri May 5 10:40:37 2017 From: juan.e.sanchez at gmail.com (Juan E. Sanchez) Date: Fri, 5 May 2017 09:40:37 -0500 Subject: [CMake] setting environment variable for ctest In-Reply-To: <781EE582-E4CD-47AC-8A39-CB0132FFD5A0@sap.com> References: <35ad55f3-e687-1287-cf68-d8f59cfa4ef2@gmail.com> <781EE582-E4CD-47AC-8A39-CB0132FFD5A0@sap.com> Message-ID: <479d8f5d-0b36-51fd-deaf-28bf444aa942@gmail.com> It this possible to set for all tests as one line? This would require changing dozens of tests. Regards, Juan On 5/5/17 9:31 AM, CHEVRIER, Marc wrote: > Use the ENVIRONMENT property of your tests (see https://cmake.org/cmake/help/v3.7/prop_test/ENVIRONMENT.html). > > On 05/05/2017, 16:29, "CMake on behalf of Juan E. Sanchez" wrote: > > Hello, > > It appears that when I invoke ctest through cmake, the environment > variables I export from my bash shell are being ignored: > DYLD_INSERT_LIBRARIES > PATH > > Is there a way to tell cmake to pass the user environment all the way > down to the environment for my tested application. > > This is on Mac OS X (El Capitan) with the latest cmake binary download > 3.8.1. > > Regards, > > Juan > > -- > > 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 marc.chevrier at sap.com Fri May 5 10:31:34 2017 From: marc.chevrier at sap.com (CHEVRIER, Marc) Date: Fri, 5 May 2017 14:31:34 +0000 Subject: [CMake] setting environment variable for ctest In-Reply-To: <35ad55f3-e687-1287-cf68-d8f59cfa4ef2@gmail.com> References: <35ad55f3-e687-1287-cf68-d8f59cfa4ef2@gmail.com> Message-ID: <781EE582-E4CD-47AC-8A39-CB0132FFD5A0@sap.com> Use the ENVIRONMENT property of your tests (see https://cmake.org/cmake/help/v3.7/prop_test/ENVIRONMENT.html). On 05/05/2017, 16:29, "CMake on behalf of Juan E. Sanchez" wrote: Hello, It appears that when I invoke ctest through cmake, the environment variables I export from my bash shell are being ignored: DYLD_INSERT_LIBRARIES PATH Is there a way to tell cmake to pass the user environment all the way down to the environment for my tested application. This is on Mac OS X (El Capitan) with the latest cmake binary download 3.8.1. Regards, Juan -- 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 annulen at yandex.ru Fri May 5 14:45:44 2017 From: annulen at yandex.ru (Konstantin Tokarev) Date: Fri, 05 May 2017 21:45:44 +0300 Subject: [CMake] Release flags on one target in debug build type Message-ID: <4203791494009944@web8m.yandex.ru> Hello, Is there any clear way to build specific target in "Debug" mode with flags that it would have in "Release"? In particular, build this specific target without effect of CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG, while preserving flags added by target_compile_options -- Regards, Konstantin From mellery451 at gmail.com Fri May 5 16:22:11 2017 From: mellery451 at gmail.com (Michael Ellery) Date: Fri, 5 May 2017 13:22:11 -0700 Subject: [CMake] Release flags on one target in debug build type In-Reply-To: <4203791494009944@web8m.yandex.ru> References: <4203791494009944@web8m.yandex.ru> Message-ID: <2F034829-A54D-4BCD-B8F9-85731690E963@gmail.com> > On May 5, 2017, at 11:45 AM, Konstantin Tokarev wrote: > > Hello, > > Is there any clear way to build specific target in "Debug" mode with flags that it would have in "Release"? > > In particular, build this specific target without effect of CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG, while preserving flags added by target_compile_options > > -- > Regards, > Konstantin > -- > > 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 Does RelWithDebInfo do what you want? I have in the past taken one of the ?alternative targets? (RelWithDebInfo or MinSIzeRel) and adjusted the flags for that target until it suited my specific needs, but I don?t necessarily claim that is the right way to go in all cases. Also be aware that the default optimization level can differ slightly with each of these build types. In the end, it?s probably best to survey the current settings for each build type and see if one is close to what you want. -Mike From annulen at yandex.ru Fri May 5 17:08:04 2017 From: annulen at yandex.ru (Konstantin Tokarev) Date: Sat, 06 May 2017 00:08:04 +0300 Subject: [CMake] Release flags on one target in debug build type In-Reply-To: <2F034829-A54D-4BCD-B8F9-85731690E963@gmail.com> References: <4203791494009944@web8m.yandex.ru> <2F034829-A54D-4BCD-B8F9-85731690E963@gmail.com> Message-ID: <4250671494018484@web21m.yandex.ru> 05.05.2017, 23:22, "Michael Ellery" : >> ?On May 5, 2017, at 11:45 AM, Konstantin Tokarev wrote: >> >> ?Hello, >> >> ?Is there any clear way to build specific target in "Debug" mode with flags that it would have in "Release"? >> >> ?In particular, build this specific target without effect of CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG, while preserving flags added by target_compile_options >> >> ?-- >> ?Regards, >> ?Konstantin >> ?-- >> >> ?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 > > Does RelWithDebInfo do what you want? I have in the past taken one of the ?alternative targets? (RelWithDebInfo or MinSIzeRel) and adjusted the flags for that target until it suited my specific needs, but I don?t necessarily claim that is the right way to go in all cases. Also be aware that the default optimization level can differ slightly with each of these build types. In the end, it?s probably best to survey the current settings for each build type and see if one is close to what you want. I need to modify build of one target, not to change global build type of the project > > -Mike -- Regards, Konstantin From dan at su-root.co.uk Fri May 5 19:34:32 2017 From: dan at su-root.co.uk (Dan Liew) Date: Sat, 6 May 2017 00:34:32 +0100 Subject: [CMake] Release flags on one target in debug build type In-Reply-To: <4203791494009944@web8m.yandex.ru> References: <4203791494009944@web8m.yandex.ru> Message-ID: On 5 May 2017 at 19:45, Konstantin Tokarev wrote: > Hello, > > Is there any clear way to build specific target in "Debug" mode with flags that it would have in "Release"? > > In particular, build this specific target without effect of CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG, while preserving flags added by target_compile_options Something like this would sort of do it. ``` target_compile_options(your_target PRIVATE $<$:$<$:${CMAKE_CXX_FLAGS_RELEASE}>> $<$:$<$:${CMAKE_C_FLAGS_RELEASE}>> ``` The problem you have though is that `your_target` in debug mode will already debug build flags (e.g. `-O0 g`). So you may get conflicting compiler options. Another way of doing this is to build your target as an external project where you set the build mode of the external project to be release. From juan.e.sanchez at gmail.com Sat May 6 15:39:13 2017 From: juan.e.sanchez at gmail.com (Juan E. Sanchez) Date: Sat, 6 May 2017 14:39:13 -0500 Subject: [CMake] ctest not running longest tests first Message-ID: <8a726b32-0d96-f69d-5381-0dea25f668db@gmail.com> In the past, I seem to remember that ctest would order the tests from longest to shortest, but this no longer seems to be the case. Is there any way to get this behavior with the newest binary versions of ctest on Windows, Mac, and Linux? Regards, Juan From mikelojkovic at gmail.com Sat May 6 22:45:40 2017 From: mikelojkovic at gmail.com (mike lojkovic) Date: Sat, 6 May 2017 21:45:40 -0500 Subject: [CMake] Building dependency project as static lib and exe. Message-ID: I have a project that uses lua. cmake is able to build lua statically and shared, without issue. (shared for debug static for releases on Windows) The only issue is when I'm doing a release build I need to also build the lua.exe, so I can process and embed my lua scripts in the exe. add_custom_command looks like it could be used to build the lua project twice, but seems like I'd have to be overly specific repeating things already implied in the lua project. Is there a means of telling a subproject to compile itself from the main CMakeLists.txt? I add libraries with add_subdirectory. From Daniel.Lueken at bmw-carit.de Mon May 8 09:19:56 2017 From: Daniel.Lueken at bmw-carit.de (Daniel Lueken) Date: Mon, 8 May 2017 13:19:56 +0000 Subject: [CMake] CMake regexes: Case insensitive and whitespace matching Message-ID: Hi! Is there any way to do case insensitive matching in string(REGEX ... ? Also, is there a way to match whitespaces? What I would like to do, speaking in Perl-like syntax, is something like string(REGEX REPLACE "/something\s+/stuff/i" ... Not knowing how to do this, I am currently doing something along the lines of string(REGEX REPLACE "[Ss][Oo][Mm][Ee][Tt][Hh][Ii][Nn][Gg][\\r\\n\\t ]+" ... which looks pretty wrong to me. Converting everything to upper or lower case is also not an option since parts of the input string in which I need to replace something are case sensitive. Best regards Daniel Lueken -- BMW Car IT GmbH Daniel L?ken Spezialist Entwicklung Moosacher Stra?e 86 80809 M?nchen Tel.: ?+49-89-189311-35 Fax: +49-89-189311-20 Mail: daniel.lueken at bmw-carit.de Web: http://www.bmw-carit.de ------------------------------------------------------------------------- BMW Car IT GmbH Gesch?ftsf?hrer: Kai-Uwe Balszuweit und Alexis Trolin Sitz und Registergericht: M?nchen HRB 134810 ------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.wueger at gmx.at Mon May 8 17:05:04 2017 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Mon, 8 May 2017 23:05:04 +0200 Subject: [CMake] C# Support and Embedded Resources Message-ID: <803CDF04-2554-4F86-B106-9D481D68AEB8@gmx.at> Hello, I played around with the C# support in CMake 3.8.0/3.8.1. In a project I need embedded resources, how can I add those? Regards Roman From roman.wueger at gmx.at Mon May 8 17:15:53 2017 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Mon, 8 May 2017 23:15:53 +0200 Subject: [CMake] CMake regexes: Case insensitive and whitespace matching In-Reply-To: References: Message-ID: Hello Daniel, I tried it also in various ways, but I think the Regex in Cmake is very limited. What has worked for me was to use try_run and implement a simple c++ application which uses C++11's and accept one or two command line arguments (~ 15 lines of code). Hope it helps Regards Roman > Am 08.05.2017 um 15:19 schrieb Daniel Lueken : > > Hi! > > Is there any way to do case insensitive matching in string(REGEX ? ? > Also, is there a way to match whitespaces? > > What I would like to do, speaking in Perl-like syntax, is something like > > string(REGEX REPLACE ?/something\s+/stuff/i? ? > > Not knowing how to do this, I am currently doing something along the lines of > > string(REGEX REPLACE ?[Ss][Oo][Mm][Ee][Tt][Hh][Ii][Nn][Gg][\\r\\n\\t ]+? ? > > which looks pretty wrong to me. Converting everything to upper or lower case is also not an option since parts of the input string in which I need to replace something are case sensitive. > > Best regards > Daniel Lueken > > -- > BMW Car IT GmbH > Daniel L?ken > Spezialist Entwicklung > Moosacher Stra?e 86 > 80809 M?nchen > > Tel.: ?+49-89-189311-35 > Fax: +49-89-189311-20 > Mail: daniel.lueken at bmw-carit.de > Web: http://www.bmw-carit.de > ------------------------------------------------------------------------- > BMW Car IT GmbH > Gesch?ftsf?hrer: Kai-Uwe Balszuweit und Alexis Trolin > Sitz und Registergericht: M?nchen HRB 134810 > ------------------------------------------------------------------------- > > -- > > 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 Daniel.Lueken at bmw-carit.de Tue May 9 04:27:45 2017 From: Daniel.Lueken at bmw-carit.de (Daniel Lueken) Date: Tue, 9 May 2017 08:27:45 +0000 Subject: [CMake] CMake regexes: Case insensitive and whitespace matching In-Reply-To: References: Message-ID: Thanks! I?ll take away the message that it is indeed not possible and I didn?t miss anything there. ? Regards Daniel -- BMW Car IT GmbH Daniel L?ken Spezialist Entwicklung Moosacher Stra?e 86 80809 M?nchen Tel.: ?+49-89-189311-35 Fax: +49-89-189311-20 Mail: daniel.lueken at bmw-carit.de Web: http://www.bmw-carit.de ------------------------------------------------------------------------- BMW Car IT GmbH Gesch?ftsf?hrer: Kai-Uwe Balszuweit und Alexis Trolin Sitz und Registergericht: M?nchen HRB 134810 ------------------------------------------------------------------------- From: Roman W?ger [mailto:roman.wueger at gmx.at] Sent: Monday, May 08, 2017 11:16 PM To: Daniel Lueken Cc: cmake at cmake.org Subject: Re: [CMake] CMake regexes: Case insensitive and whitespace matching Hello Daniel, I tried it also in various ways, but I think the Regex in Cmake is very limited. What has worked for me was to use try_run and implement a simple c++ application which uses C++11's and accept one or two command line arguments (~ 15 lines of code). Hope it helps Regards Roman Am 08.05.2017 um 15:19 schrieb Daniel Lueken >: Hi! Is there any way to do case insensitive matching in string(REGEX ? ? Also, is there a way to match whitespaces? What I would like to do, speaking in Perl-like syntax, is something like string(REGEX REPLACE ?/something\s+/stuff/i? ? Not knowing how to do this, I am currently doing something along the lines of string(REGEX REPLACE ?[Ss][Oo][Mm][Ee][Tt][Hh][Ii][Nn][Gg][\\r\\n\\t ]+? ? which looks pretty wrong to me. Converting everything to upper or lower case is also not an option since parts of the input string in which I need to replace something are case sensitive. Best regards Daniel Lueken -- BMW Car IT GmbH Daniel L?ken Spezialist Entwicklung Moosacher Stra?e 86 80809 M?nchen Tel.: ?+49-89-189311-35 Fax: +49-89-189311-20 Mail: daniel.lueken at bmw-carit.de Web: http://www.bmw-carit.de ------------------------------------------------------------------------- BMW Car IT GmbH Gesch?ftsf?hrer: Kai-Uwe Balszuweit und Alexis Trolin Sitz und Registergericht: M?nchen HRB 134810 ------------------------------------------------------------------------- -- 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 roman.wueger at gmx.at Tue May 9 06:54:25 2017 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Tue, 9 May 2017 12:54:25 +0200 Subject: [CMake] [cmake-developers] C# Support and Embedded Resources In-Reply-To: <56129577f8c242bda829967303408ec7@DE013666.schaeffler.com> References: <803CDF04-2554-4F86-B106-9D481D68AEB8@gmx.at> <56129577f8c242bda829967303408ec7@DE013666.schaeffler.com> Message-ID: <9ACB2327-F82D-489E-9A13-08312AB73765@gmx.at> Thank you, The following seems to work: set_property(SOURCE TextFile1.txt PROPERTY VS_TOOL_OVERRIDE "EmbeddedResource") Regards Roman > Am 09.05.2017 um 12:34 schrieb Stuermer, Michael SP/HZA-ZSEP : > > Set the appropriate tool for the resource files using the source file property VS_TOOL_OVERRIDE. > > This should work. > > Best regards, > Michael > > -----Urspr?ngliche Nachricht----- > Von: cmake-developers [mailto:cmake-developers-bounces at cmake.org] Im Auftrag von Roman W?ger > Gesendet: Montag, 8. Mai 2017 23:05 > An: CMake Developer MailingList; CMake MailingList > Betreff: [cmake-developers] C# Support and Embedded Resources > > Hello, > > I played around with the C# support in CMake 3.8.0/3.8.1. > In a project I need embedded resources, how can I add those? > > Regards > Roman > -- > > 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-developers From kristianonline28 at gmail.com Tue May 9 09:00:22 2017 From: kristianonline28 at gmail.com (Kristian) Date: Tue, 9 May 2017 15:00:22 +0200 Subject: [CMake] CPack - Transaction error Message-ID: Hi, I want to generate a RPM package. My CMakeLists.txt looks loke this: ########################## cmake_minimum_required(VERSION 3.5) set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/ssp/) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp-suite/" DESTINATION ${INSTALL_DIR}) install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/ssp_script" DESTINATION bin) set(CPACK_RPM_PACKAGE_REQUIRES "java-1.8.0-openjdk >= 1.8.0") # ... INCLUDE(CPack) ############################ The idea is to install needed files for the software under /opt/ssp. Now I generate a package with command > cmake -DCMAKE_INSTALL_PREFIX=/opt -V --debug . When I want to install that in a docker container, I get the error message ******** Transaction check error: file /opt from install of ssp-suite-7.1-1.x86_64 conflicts with file from package filesystem-3.2-21.el7.x86_64 Error Summary ******** What is the problem? From domen.vrankar at gmail.com Tue May 9 09:24:44 2017 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 9 May 2017 15:24:44 +0200 Subject: [CMake] CPack - Transaction error In-Reply-To: References: Message-ID: > > Transaction check error: > file /opt from install of ssp-suite-7.1-1.x86_64 conflicts with file > from package filesystem-3.2-21.el7.x86_64 > > Error Summary > Directory /opt is already owned by filesystem package but is not listed in CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST variable. Add /opt (and possibly other directories owned by other packages) to CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION [1] which is appended to paths listed in CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST. [1] https://cmake.org/cmake/help/v3.5/module/CPackRPM.html?highlight=cpack_rpm_exclude_from_auto_filelist#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION Regards, Domen -------------- next part -------------- An HTML attachment was scrubbed... URL: From kristianonline28 at gmail.com Tue May 9 12:23:18 2017 From: kristianonline28 at gmail.com (Kristian) Date: Tue, 9 May 2017 18:23:18 +0200 Subject: [CMake] CPack - Transaction error In-Reply-To: References: Message-ID: Thank you, that helped! 2017-05-09 15:24 GMT+02:00 Domen Vrankar : >> Transaction check error: >> file /opt from install of ssp-suite-7.1-1.x86_64 conflicts with file >> from package filesystem-3.2-21.el7.x86_64 >> >> Error Summary > > > Directory /opt is already owned by filesystem package but is not listed in > CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST variable. > Add /opt (and possibly other directories owned by other packages) to > CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION [1] which is appended to paths > listed in > CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST. > > > [1] > https://cmake.org/cmake/help/v3.5/module/CPackRPM.html?highlight=cpack_rpm_exclude_from_auto_filelist#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION > > Regards, > Domen From kristianonline28 at gmail.com Wed May 10 07:26:48 2017 From: kristianonline28 at gmail.com (Kristian) Date: Wed, 10 May 2017 13:26:48 +0200 Subject: [CMake] RPM package and relocation Message-ID: Hi, I am creating an RPM package, which on a standard installation should install the file into /opt/ssp-suite directory. But I want to give the user the opportunity, to install the package into another directory. I am doing this with these lines: > set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/ssp-suite) > install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp/" DESTINATION ${INSTALL_DIR}) and by running cmake with > cmake -DCMAKE_INSTALL_PREFIX=/opt -V --debug . But I also need to execute a post script, which runs after installation. I added > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/postinstall") to my CMakeLists.txt and in that script, I am using the RPM variable $RPM_INSTALL_PREFIX. But during installation, I get this error message > chmod: cannot access '/usr/usr/bin/startssp': No such file or directory > warning: %post(ssp-suite-7.1-1.x86_64) scriptlet failed, exit status 1 > Non-fatal POSTIN scriptlet failure in rpm package ssp-suite-7.1-1.x86_64 Can someone give me some hints, how to change / add lines to CMakeListst.txt and my postinstall script, so that script can be fully relocatable? From eric.noulard at gmail.com Wed May 10 08:12:59 2017 From: eric.noulard at gmail.com (Eric Noulard) Date: Wed, 10 May 2017 14:12:59 +0200 Subject: [CMake] RPM package and relocation In-Reply-To: References: Message-ID: 2017-05-10 13:26 GMT+02:00 Kristian : > Hi, > > I am creating an RPM package, which on a standard installation should > install the file into /opt/ssp-suite directory. But I want to give the > user the opportunity, to install the package into another directory. > > I am doing this with these lines: > > > set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/ssp-suite) > > install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp/" DESTINATION > ${INSTALL_DIR}) > If you want to create relocatable package you should avoid install directive with absolute destination but rather do: install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp" DESTINATION ssp-suite) then in our CMakeLists.txt before including CPack set(CPACK_RPM_PACKAGE_RELOCATABLE True) > > and by running cmake with > > > cmake -DCMAKE_INSTALL_PREFIX=/opt -V --debug . > CMAKE_INSTALL_PREFIX is not the prefix used by CPack. You should use CPACK_PACKAGING_INSTALL_PREFIX: https://cmake.org/cmake/help/v3.7/variable/CPACK_PACKAGING_INSTALL_PREFIX.html#variable:CPACK_PACKAGING_INSTALL_PREFIX Whatever the value you used for CMAKE_INSTALL_PREFIX at CMake runtime you may use another prefix for packaging when invoking CPack: cpack -DCPACK_PACKAGING_INSTALL_PREFIX=/opt -G RPM this will work for all files/target/dir installed with a **RELATIVE** path if you installed with an absolute path then the absolute path will be kept making the package "partially" or "not-at-all" relocatable. Non relocatable file are commonly placed in /etc/... > > But I also need to execute a post script, which runs after installation. I > added > > > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ > postinstall") > > to my CMakeLists.txt and in that script, I am using the RPM variable > $RPM_INSTALL_PREFIX. But during installation, I get this error message > > > chmod: cannot access '/usr/usr/bin/startssp': No such file or directory > > warning: %post(ssp-suite-7.1-1.x86_64) scriptlet failed, exit status 1 > > Non-fatal POSTIN scriptlet failure in rpm package ssp-suite-7.1-1.x86_64 > I'm not quite up-to-date with CPack RPM and I guess Domen will step in for that but the specified script will be read and put into the RPM itself by CPackRPM. However since you currently have absolute destination file the prefix may well be "/usr" even if you installed somewhere else. Try: rpm -qi -p .rpm | grep Reloca you'll get the relocations list unless the package is not relocatable. If you want to investigate more about what CPack RPM is doing for you you may try: cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM as indicated here: https://cmake.org/cmake/help/v3.7/module/CPackRPM.html > Can someone give me some hints, how to change / add lines to > CMakeListst.txt and my postinstall script, so that script can be fully > relocatable? > I don't remember what variables may be used in POST/PRE install script files but you may have a look at the generated spec file which may gives you clue about that. The spec file generated by CPackRPM should be in: /_CPack_Packages//RPM/SPECS running CPack RPM with DEBUG var set to 1 will give you all file locaton. -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.scott at crascit.com Wed May 10 08:20:27 2017 From: craig.scott at crascit.com (Craig Scott) Date: Wed, 10 May 2017 22:20:27 +1000 Subject: [CMake] RPM package and relocation In-Reply-To: References: Message-ID: You probably need to show us the postinstall script for us to be able to see the problem. Also, in case you haven't found it already, the MaximumRPM manual may be helpful (although it seems you've already found the essentials and that document could be getting a bit dated by now): http://ftp.rpm.org/max-rpm/ specifically chapter 15: Making A Relocatable Package and chapter 13: Scripts: RPM's Workhorse. You might also want to check you are not having the problem described in this stackoverflow answer regarding when variables get substituted. On Wed, May 10, 2017 at 9:26 PM, Kristian wrote: > Hi, > > I am creating an RPM package, which on a standard installation should > install the file into /opt/ssp-suite directory. But I want to give the > user the opportunity, to install the package into another directory. > > I am doing this with these lines: > > > set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/ssp-suite) > > install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp/" DESTINATION > ${INSTALL_DIR}) > > and by running cmake with > > > cmake -DCMAKE_INSTALL_PREFIX=/opt -V --debug . > > But I also need to execute a post script, which runs after installation. I > added > > > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ > postinstall") > > to my CMakeLists.txt and in that script, I am using the RPM variable > $RPM_INSTALL_PREFIX. But during installation, I get this error message > > > chmod: cannot access '/usr/usr/bin/startssp': No such file or directory > > warning: %post(ssp-suite-7.1-1.x86_64) scriptlet failed, exit status 1 > > Non-fatal POSTIN scriptlet failure in rpm package ssp-suite-7.1-1.x86_64 > > Can someone give me some hints, how to change / add lines to > CMakeListst.txt and my postinstall script, so that script can be fully > relocatable? > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bouffa at gmail.com Wed May 10 08:30:13 2017 From: bouffa at gmail.com (Mourad Boufarguine) Date: Wed, 10 May 2017 14:30:13 +0200 Subject: [CMake] CMAKE_VS_PLATFORM_TOOLSET with Ninja generator Message-ID: Hi, I am building a third party library (OpenSceneGraph) using ninja generator and Visual c++ compiler. Recently the build is failing because of the use of CMAKE_VS_PLATFORM_TOOLSET [*] to query the VS toolset used. This variable seems not to be set when using Ninja generator. My question is what is the recommended way to query for the VS toolset version, that would work for both VS and Ninja generators? Thanks, Mourad [*] https://github.com/openscenegraph/OpenSceneGraph/commit/67ef816da00441121f7b2cb606ee19bbb1f15e80 -------------- next part -------------- An HTML attachment was scrubbed... URL: From domen.vrankar at gmail.com Wed May 10 09:56:34 2017 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Wed, 10 May 2017 15:56:34 +0200 Subject: [CMake] RPM package and relocation In-Reply-To: References: Message-ID: > > > set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/ssp-suite) > > install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp/" DESTINATION > ${INSTALL_DIR}) > Eric already covered this part - use relative paths instead ( no / at the beginning). > But I also need to execute a post script, which runs after installation. I > added > > > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ > postinstall") > > to my CMakeLists.txt and in that script, I am using the RPM variable > $RPM_INSTALL_PREFIX. But during installation, I get this error message > > > chmod: cannot access '/usr/usr/bin/startssp': No such file or directory > > warning: %post(ssp-suite-7.1-1.x86_64) scriptlet failed, exit status 1 > > Non-fatal POSTIN scriptlet failure in rpm package ssp-suite-7.1-1.x86_64 > Pre/postinstall scripts are outside what CPackRPM is handling automatically but you can still use the relocation paths as supported by RPM. Example for single relocation path: set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") # this will become the relocation path - becomes first relocation path Example for multiple relocation paths: set(CPACK_RPM_RELOCATION_PATHS "etc/foo" "opt/bar") # two paths that will be relocatable - etc will become first relocation path and opt the second one set(CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION ON) # this will remove the default /usr from relocation paths set(CPACK_PACKAGING_INSTALL_PREFIX "/a") # relative paths will be prefixed with /a - there is a bug that prevents you from using "/" only for relocation paths so you might decide to patch CPackRPM.cmake yourself [1] Now for the postinstall script each relocation path becomes a variable in RPM (RPM_INSTALL_PREFIX0 for first relocation path, RPM_INSTALL_PREFIX1 for the second and so on) so what you have to do in your script is instead of writing something like this: chown someone:somegroup /etc/some_non_relocatable_path/some_file you should write: chown someone:somegroup ${RPM_INSTALL_PREFIX0}/some_non_relocatable_path/some_file Regards, Domen [1] https://gitlab.kitware.com/cmake/cmake/merge_requests/583/diffs -------------- next part -------------- An HTML attachment was scrubbed... URL: From post at hendrik-sattler.de Thu May 11 09:32:00 2017 From: post at hendrik-sattler.de (Hendrik Sattler) Date: Thu, 11 May 2017 13:32:00 +0000 Subject: [CMake] DLL handling under CMake In-Reply-To: <590add90.925c1c0a.632e2.33a2@mx.google.com> References: <2114FB31-FF89-4461-8713-75FAA7179E4E@hendrik-sattler.de> <590add90.925c1c0a.632e2.33a2@mx.google.com> Message-ID: <20170511133200.Horde.fi_zeqRurzMj_OR5LGX5quM@mail.hendrik-sattler.de> Hi, sorry for the delay. I see you already found a solution yourself. Still, I want to share mine: ---------------------CopyPrerequisites.cmake-------------------- include ( GetPrerequisites ) if ( NOT DEFINED PREREQ_FILE ) message ( FATAL_ERROR "PREREQ_FILE must be defined(${PREREQ_FILE})" ) endif () # # Satisfy the find_file() search by common subdirs where .dll file can be found # foreach ( dir ${CMAKE_PREFIX_PATH} ) list ( APPEND dirs ${dir}/bin ) endforeach ( dir ) get_filename_component ( COPY_DESTINATION "${PREREQ_FILE}" PATH ) get_prerequisites ( "${PREREQ_FILE}" COPY_FILES 1 1 "${dirs}" "${COPY_DESTINATION}" ) foreach ( COPY_FILE ${COPY_FILES} ) if ( NOT IS_ABSOLUTE ${COPY_FILE} ) set ( COPY_FILE_FULL ) gp_resolve_item ( "${PREREQ_FILE}" "${COPY_FILE}" "${dirs}" "${COPY_DESTINATION}" COPY_FILE_FULL ) else () set ( COPY_FILE_FULL ${COPY_FILE} ) endif () if ( COPY_FILE_FULL ) get_filename_component ( COPY_SOURCE_DIR "${COPY_FILE_FULL}" PATH ) if ( NOT COPY_SOURCE_DIR MATCHES "^${COPY_DESTINATION}$" ) message ( "Copying ${COPY_FILE_FULL} to output directory" ) execute_process ( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${COPY_FILE_FULL}" "${COPY_DESTINATION}" ) endif () else () message ( "Failed to find ${COPY_FILE}" ) endif () endforeach ( COPY_FILE ) ---------------------------------------------------------- This can now be called from CMakeLists.txt: if ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ) add_custom_command ( TARGET Gui POST_BUILD COMMAND ${CMAKE_COMMAND} "-DCMAKE_PREFIX_PATH:PATH=${SOME_SEARCH_DIRS}" "-DPREREQ_FILE=$" -P ${CMAKE_SOURCE_DIR}/CMakeModules/CopyPrerequisites.cmake VERBATIM ) endif () The variable SOME_SERACH_DIRS is filled with e.g. IMPORTED_LOCATION property values. The same variable is used when calling INSTALL(CODE "..... fixup_bundle(...)" ) Regards, HS Zitat von lectem at gmail.com: > I managed to get it working by using an intermediate script. > One might want to generate the script instead of using the > ??RUN_IT?? variable trick. > This was only tested on Windows, but seems to work fine. > Put the following code in a xxxxxx.cmake file, include it from your > CMakeLists.txt and enjoy. > > > # This is a helper script to run BundleUtilities fixup_bundle as postbuild > # for a target. The primary use case is to copy .DLLs to the build > directory for > # the Windows platform. It allows generator expressions to be used > to determine > # the binary location > # > # Usage : run_fixup(TARGET LIBS DIRS) > # - TARGET : A cmake target > # - See fixup_bundle for LIBS and DIRS arguments > > if(RUN_IT) > # Script ran by the add_custom_command > include(BundleUtilities) > fixup_bundle("${TO_FIXUP_FILE}" "${TO_FIXUP_LIBS}" "${TO_FIXUP_DIRS}") > # End of script ran by the add_custom_command > else() > > set(THIS_FILE ${CMAKE_CURRENT_LIST_FILE}) > message(${THIS_FILE}) > function(run_fixup _target _libs _dirs) > message(${THIS_FILE}) > add_custom_command( > TARGET ${_target} POST_BUILD > COMMAND ${CMAKE_COMMAND} -DRUN_IT:BOOL=ON > -DTO_FIXUP_FILE=$ -DTO_FIXUP_LIBS=${_libs} > -DTO_FIXUP_DIRS=${_dirs} -P ${THIS_FILE} > COMMENT "Fixing up dependencies for ${_target}" > VERBATIM > ) > > endfunction() > > endif() > > > De?: Cl?ment Gregoire > Envoy? le?:jeudi 4 mai 2017 08:37 > ??: Hendrik Sattler; Louis-Paul CORDIER; Cmake Mailing List > Objet?:Re: [CMake] DLL handling under CMake > > I'd also be interested in this. I saw an old mail in the ML about > this, but it seems fixup_bundle is old and cant use generator > expressions, making it hard to use (I don't want to hardcode the > executable path). > > Do you have a sample for this ? > CMake would really benefit from having those features made more > accessible instead of everyone having to write its own script? > Le sam. 29 avr. 2017 22:10, Hendrik Sattler > a ?crit?: > > > Am 27. April 2017 10:43:50 MESZ schrieb Louis-Paul CORDIER > : >> This steps are tedious and I'm wondering if there is a mechanism that >> exists or that have to be imagined to make the DLL nightmare end. > > I use BundleUtilities to achieve the copying of DLL files to the > installation directory. The main problem for this is to enumerate > the needed directories. > > I use the same for copying DLL files to the output directory to ease > debugging. > > The advantage is the inspection of the exe for really needed DLL > files. This AUTOMATICALLY handles the case debug vs. release. > > HS > > -- > 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 From patrick.boettcher at posteo.de Fri May 12 10:57:25 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Fri, 12 May 2017 16:57:25 +0200 Subject: [CMake] CLANG vs GCC when linking executables Message-ID: <20170512165725.3f2df8a7@posteo.de> Hi list, I'm trying to link an executable with a locally build and imported dynamic library. The link-code generated by CMake differs when using GCC and Clang in regards to the rpath-options: This is my cmake-code for importing the library (this code is actually generated by using export() ) add_library(systemc INTERFACE IMPORTED) set_target_properties(systemc PROPERTIES INTERFACE_COMPILE_DEFINITIONS "SC_INCLUDE_FX" INTERFACE_COMPILE_OPTIONS "-Wno-deprecated-declarations" INTERFACE_INCLUDE_DIRECTORIES "/local/path/include" INTERFACE_LINK_LIBRARIES "/local/path/lib/libsystemc.so") add_executable(testsc test.cpp) target_link_libraries(testsc systemc) When now running cmake in a build-dir which uses by default gcc the link-command contains: /usr/bin/g++ CMakeFiles/testsc.dir/test.cpp.o -o testsc \ -Wl,-rpath,/local/path/lib /local/path/lib/libsystemc.so doing the same with clang++ as CXX-compiler (CXX=clang++ cmake ) gives me a linker command not containing the -rpath-option: clang++ CMakeFiles/testsc.dir/test.cpp.o -o testsc \ /local/path/lib/libsystemc.so The link-process works, but when running the executable inside the build-dir it is unable to find the library as neither the rpath is set nor is this library-path known by the dynamic loader. Is there anything I can do? Is this behavior expected? How should the RPATH being handled when clang is used. best regards, -- Patrick. From patrick.boettcher at posteo.de Fri May 12 11:30:16 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Fri, 12 May 2017 17:30:16 +0200 Subject: [CMake] CLANG vs GCC when linking executables In-Reply-To: <20170512165725.3f2df8a7@posteo.de> References: <20170512165725.3f2df8a7@posteo.de> Message-ID: <20170512173016.6fad16d0@posteo.de> On Fri, 12 May 2017 16:57:25 +0200 Patrick Boettcher wrote: > Hi list, > > I'm trying to link an executable with a locally build and imported > dynamic library. The link-code generated by CMake differs when > using GCC and Clang in regards to the rpath-options: > > This is my cmake-code for importing the library (this code is actually > generated by using export() ) > > add_library(systemc INTERFACE IMPORTED) > set_target_properties(systemc PROPERTIES > INTERFACE_COMPILE_DEFINITIONS "SC_INCLUDE_FX" > INTERFACE_COMPILE_OPTIONS "-Wno-deprecated-declarations" > INTERFACE_INCLUDE_DIRECTORIES "/local/path/include" > INTERFACE_LINK_LIBRARIES "/local/path/lib/libsystemc.so") > > add_executable(testsc test.cpp) > target_link_libraries(testsc systemc) > > When now running cmake in a build-dir which uses by default gcc the > link-command contains: > > /usr/bin/g++ CMakeFiles/testsc.dir/test.cpp.o -o testsc \ > -Wl,-rpath,/local/path/lib /local/path/lib/libsystemc.so > > doing the same with clang++ as CXX-compiler (CXX=clang++ cmake > ) gives me a linker command not containing the > -rpath-option: > > clang++ CMakeFiles/testsc.dir/test.cpp.o -o testsc \ > /local/path/lib/libsystemc.so > > The link-process works, but when running the executable inside the > build-dir it is unable to find the library as neither the rpath is set > nor is this library-path known by the dynamic loader. > > Is there anything I can do? Is this behavior expected? How should the > RPATH being handled when clang is used. The problem only occurs when the compiler is coming from a custom build from a custom path. Running CXX=clang++ cmake makes cmake generate the correct link options. CXX=/local/path/bin/clang++ cmake makes cmake generate wrong link options (without RPATH). Seems to be related the compiler-ID which is wrongly determined or something like that. -- Patrick. From patrick.boettcher at posteo.de Fri May 12 12:38:09 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Fri, 12 May 2017 18:38:09 +0200 Subject: [CMake] CLANG vs GCC when linking executables In-Reply-To: <20170512173016.6fad16d0@posteo.de> References: <20170512165725.3f2df8a7@posteo.de> <20170512173016.6fad16d0@posteo.de> Message-ID: <20170512183809.1df5e73b@posteo.de> On Fri, 12 May 2017 17:30:16 +0200 Patrick Boettcher wrote: > The problem only occurs when the compiler is coming from a custom > build from a custom path. Running > > CXX=clang++ cmake > > makes cmake generate the correct link options. > > CXX=/local/path/bin/clang++ cmake > > makes cmake generate wrong link options (without RPATH). > > Seems to be related the compiler-ID which is wrongly determined or > something like that. I continued a bit more, it turns out that the placeholder (using the link.txt) does not contain the rpath-options when linking with my locally generated compiler but it present when using system compiler. Where is LINK_LIBRARIES filled in? What option, features makes cmake insert -Wl,rpath or not (as in my case) -- Patrick. From eric.noulard at gmail.com Mon May 15 05:46:37 2017 From: eric.noulard at gmail.com (Eric Noulard) Date: Mon, 15 May 2017 11:46:37 +0200 Subject: [CMake] Does JOB_POOL_[COMPILE|LINK] work with custom_target? In-Reply-To: References: Message-ID: Hi all, No answer whatsoever on this? Initial contributor of Ninja job pool appears to be Peter K?mmel: commit 7605e37aabae2678e5696a75e84aced2e84f9037 Author: Peter K?mmel Date: Sat Nov 23 10:49:36 2013 +0100 I'd like to be able assign some custom targets to a ninja job pool. If I were to implement the feature would it be acceptable upstream ? Eric 2017-05-05 16:16 GMT+02:00 Eric Noulard : > Hi all, > > We have a bunch of custom_target and a subset of them should be run in > sequence. > So we tried to define: > > set_property(GLOBAL PROPERTY JOB_POOLS exclusive=1) > > and then: > > set_property(TARGET my_custom_target PROPERTY JOB_POOL_COMPILE exclusive) > set_property(TARGET my_custom_target PROPERTY JOB_POOL_LINK exclusive) > > > This does not seem to reach build.ninja ? > > The new pool is defined but the concerned custom targets are never > assigned to the pool? > > May custom target be assigned to a ninja pool? > If so how can we do that? > -- > Eric > -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From kissling at oberon.ch Mon May 15 08:30:10 2017 From: kissling at oberon.ch (Etan Kissling) Date: Mon, 15 May 2017 12:30:10 +0000 Subject: [CMake] Link order and interface multiplicity Message-ID: Heya, I have a project with a layer consisting of interface libraries: add_library(I INTERFACE) These interface libraries are then implemented several times, to fit the different environments of applications: add_library(IA STATIC ...) target_link_libraries(IA PUBLIC I) add_library(IB STATIC ...) target_link_libraries(IB PUBLIC I) There are also application independent libraries, that make use of the interface libraries. add_library(Foo STATIC ...) target_link_libraries(Foo PUBLIC I) add_library(Bar STATIC ...) target_link_libraries(Bar PUBLIC I) And finally, the application defines which implementation of the interface library layer is being used. add_executable(ExeA ...) target_link_libraries(ExeA Foo Bar IA) add_executable(ExeB ...) target_link_libraries(ExeB Foo Bar IB) Luckily, this is okay, as long as IA is listed after Foo and Bar in the synthesized link command. However, certain implementations of I make use of the application independent libraries again. On these environments, the link command line becomes something like this: IA Foo Bar While it should be Foo Bar IA Foo Bar This make sense, because there is no explicit dependency being described that Foo / Bar depend on IA while compiling ExeA. In the simple case, we just get lucky, because it happens to be the default that link command line has the same order as in the target_link_libraries call. I'm working with gcc-arm-none-eabi cross compiler. Here's what I've tried: ? LINK_INTERFACE_MULTIPLICITY Does not seem to work. The generated command line is still the same even with higher numbers. ? set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--start-group") Linking succeeds, but the program does not run properly on the target hardware. Only after connecting a debugger and resetting, it runs. Strange behaviour. When I link Foo / Bar explicitly with IA instead of --start-group, the command line becomes Foo Bar IA Foo Bar, and then everything works fine. But I cannot do this in general, because of ExeB ^^ => Is there a way how I can define that Foo / Bar temporarily depend on IA while compiling ExeA, and temporarily depend on IB while compiling ExeB? => Is there a different approach on how to handle project structured like the one described above? Thanks Etan From rjvbertin at gmail.com Mon May 15 08:56:40 2017 From: rjvbertin at gmail.com (=?ISO-8859-1?Q?Ren=E9_J=2EV=2E?= Bertin) Date: Mon, 15 May 2017 14:56:40 +0200 Subject: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-) Message-ID: <1717014.jp3shePasT@bola> Hello, A question that will hopefully have a quick/easy answer: I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the end) can be used instead of /Za . I know that a later update bumped the version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C code so I could assume everyone keeps installs their updates and use that value. But what does this translate to in CMake code (MSVC_VERSION)? Probably not just 1903 I presume? Thanks, Ren? From annulen at yandex.ru Mon May 15 08:58:53 2017 From: annulen at yandex.ru (Konstantin Tokarev) Date: Mon, 15 May 2017 15:58:53 +0300 Subject: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-) In-Reply-To: <1717014.jp3shePasT@bola> References: <1717014.jp3shePasT@bola> Message-ID: <8066441494853133@web22o.yandex.ru> 15.05.2017, 15:57, "Ren? J.V. Bertin" : > Hello, > > A question that will hopefully have a quick/easy answer: > > I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the end) can be used instead of /Za . I know that a later update bumped the version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C code so I could assume everyone keeps installs their updates and use that value. Have you tried CHECK_CXX_COMPILER_FLAG? > > But what does this translate to in CMake code (MSVC_VERSION)? Probably not just 1903 I presume? > > Thanks, > Ren? > -- > > 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 -- Regards, Konstantin From ben.boeckel at kitware.com Mon May 15 09:03:44 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 15 May 2017 09:03:44 -0400 Subject: [CMake] [cmake-developers] Does JOB_POOL_[COMPILE|LINK] work with custom_target? In-Reply-To: References: Message-ID: <20170515130344.GA6852@megas.kitware.com> On Mon, May 15, 2017 at 11:46:37 +0200, Eric Noulard wrote: > No answer whatsoever on this? I don't think it is supported right now. > I'd like to be able assign some custom targets to a ninja job pool. > If I were to implement the feature would it be acceptable upstream ? I think it'd be fine. --Ben From rjvbertin at gmail.com Mon May 15 09:17:59 2017 From: rjvbertin at gmail.com (=?ISO-8859-1?Q?Ren=E9_J=2EV=2E?= Bertin) Date: Mon, 15 May 2017 15:17:59 +0200 Subject: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-) In-Reply-To: <8066441494853133@web22o.yandex.ru> References: <1717014.jp3shePasT@bola> <8066441494853133@web22o.yandex.ru> Message-ID: <4289906.4dVamp2B4o@bola> On Monday May 15 2017 15:58:53 Konstantin Tokarev wrote: Hello, >Have you tried CHECK_CXX_COMPILER_FLAG? I forgot to mention: I don't have a MS dev set-up at the moment. This is for a cross-platform purposes (in KDE's extra-cmake-modules). Thanks, R From pawel.veselov at gmail.com Mon May 15 16:32:15 2017 From: pawel.veselov at gmail.com (Pawel Veselov) Date: Mon, 15 May 2017 13:32:15 -0700 Subject: [CMake] RPATH for external library Message-ID: Hello. I'm trying to make CMake add to the linker RPATH automatically. There is a library that is installed in a non-default location. I'm discovering the library using PkgConfig (custom CMAKE_APPBUNDLE_PATH) and add the library build options to the LINK_FLAGS (using set_property). I then set INSTALL_RPATH_USE_LINK_PATH and BUILD_WITH_INSTALL_RPATH to TRUE. The BUILD_WITH_INSTALL_RPATH supposedly should add any -R that are for installation to the built binary. The INSTALL_RPATH_USE_LINK_PATH should find any -L options and copy them as -R options (AFAIU). Changing RPATH flags happens before the target is created, or link flags are added to the target. The linker executed consistently lacks any -R options at all. Any advice on what I may be doing wrong, or am I misunderstanding the RPATH properties? One thing I believe may be a problem is that I treat LINK_FLAGS as a string, and not a set... cmake available : https://pastebin.com/Y67FerMd Thank you, Pawel. From redradist at gmail.com Mon May 15 18:18:21 2017 From: redradist at gmail.com (Denis Kotov) Date: Tue, 16 May 2017 01:18:21 +0300 Subject: [CMake] CMake How to check target for build Message-ID: Hi everyone, It is a copy of question in http://stackoverflow.com/ questions/43858722/cmake-how-to-check-target-for-build I am interesting in analog of *MAKECMDGOALS *in* Makefile *. For example if I use the following code for build *:* /home/username/Software/clion-2017.1.1/bin/cmake/bin/cmake --build /home/username/Projects/cppTests/cmake-build-debug --target cppTests -- -j 8 How can I check in *CMake* file target name that specified by: --target cppTests Does *CMake* have such possibility ? *Thanks,* *Best RegardsDenis Kotov* -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.boettcher at posteo.de Tue May 16 04:20:59 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Tue, 16 May 2017 10:20:59 +0200 Subject: [CMake] RPATH for external library In-Reply-To: References: Message-ID: <20170516102059.1a0f21de@posteo.de> On Mon, 15 May 2017 13:32:15 -0700 Pawel Veselov wrote: > Hello. > > I'm trying to make CMake add to the linker RPATH automatically. > There is a library that is installed in a non-default location. > I'm discovering the library using PkgConfig (custom > CMAKE_APPBUNDLE_PATH) and add the library build options to the > LINK_FLAGS (using set_property). Instead of setting the LINK_FLAGS to your external library try using target_link_libraries() with the full path name to the library. For example this will work as expected, cmake with set an RPATH to "/path/to": set(LIB "/path/to/libsomething.so") target_link_libraries(test1 ${LIB}) HTH, -- Patrick. From patrick.boettcher at posteo.de Tue May 16 04:39:42 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Tue, 16 May 2017 10:39:42 +0200 Subject: [CMake] Link order and interface multiplicity In-Reply-To: References: Message-ID: <20170516103942.7c428145@posteo.de> Hi, On Mon, 15 May 2017 12:30:10 +0000 Etan Kissling wrote: > I have a project with a layer consisting of interface libraries: > add_library(I INTERFACE) > > These interface libraries are then implemented several times, to fit > the different environments of applications: add_library(IA STATIC ...) > target_link_libraries(IA PUBLIC I) > > add_library(IB STATIC ...) > target_link_libraries(IB PUBLIC I) > > There are also application independent libraries, that make use of > the interface libraries. add_library(Foo STATIC ...) > target_link_libraries(Foo PUBLIC I) > > add_library(Bar STATIC ...) > target_link_libraries(Bar PUBLIC I) > > And finally, the application defines which implementation of the > interface library layer is being used. > > add_executable(ExeA ...) > target_link_libraries(ExeA Foo Bar IA) > > add_executable(ExeB ...) > target_link_libraries(ExeB Foo Bar IB) > > > Luckily, this is okay, as long as IA is listed after Foo and Bar in > the synthesized link command. > > However, certain implementations of I make use of the application > independent libraries again. On these environments, the link command > line becomes something like this: > > IA Foo Bar > > While it should be > > Foo Bar IA Foo Bar > > This make sense, because there is no explicit dependency being > described that Foo / Bar depend on IA while compiling ExeA. In the > simple case, we just get lucky, because it happens to be the default > that link command line has the same order as in the > target_link_libraries call. I wouldn't try my luck if I were you. Always be explicit, especially with dependencies, otherwise, at some point in time, cmake won't get it right when generating the order of link. What you could try is "forward" declaring a platform/app-dependent dependencies with interface libraries: In CMakeLists.txt add_library(top-level-I INTERFACE) target_link_libraries(top-level-I INTERFACE app-dependent-I) # here we forward declare app-dependent-I add_subdirectory(app) # app-dependent add_executable(test2 test2.cpp) target_link_libraries(test2 top-level-I) # will link with IA and IB In app/CMakeLists.txt add_library(app-dependent-I INTERFACE) target_link_libraries(app-dependent-I INTERFACE IA IB) # here we "implement" add_library(IA ...) add_library(IB ...) app-dependent-I is a forward declared libraries - cmake will evaluate this at generation-time. This will get you the dependencies right. I hope I correctly understood your question. -- Patrick. From kris.f.thielemans at gmail.com Tue May 16 09:32:44 2017 From: kris.f.thielemans at gmail.com (Kris Thielemans) Date: Tue, 16 May 2017 14:32:44 +0100 Subject: [CMake] avoiding finding system libraries (motivation is superbuilds) In-Reply-To: References: <02c801d2c51b$3744f2a0$a5ced7e0$@gmail.com> Message-ID: Thanks Robert indeed, according to https://cmake.org/cmake/help/v3.5/command/find_library.html#command:find_library this should have worked, but it doesn't. We use the following in our ExternalProject_Add CMAKE_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}/INSTALL -DCMAKE_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/INSTALL/lib -DCMAKE_INCLUDE_PATH=${CMAKE_CURRENT_BINARY_DIR}/INSTALL -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/INSTALL specifying where we install things and where it should find stuff. Nevertheless, our external project still finds a system boost or a gtest in /usr/local/lib. Are we doing anything wrong? Kris PS: apologies for the long delay in answering. On 5 May 2017 at 13:37, Robert Maynard wrote: > Have you tried using CMAKE_PREFIX_PATH instead of CMAKE_INSTALL_PREFIX? > > On Thu, May 4, 2017 at 5:13 PM, Kris Thielemans < > kris.f.thielemans at gmail.com> wrote:bert > > Hi >> >> >> >> Short question: if we have a library/include files installed both in the >> usual system locations and outside, how do we force CMake to find the >> latter? (without modifying the CMake files of the project). >> >> >> >> Motivation: >> >> We?re trying to make a SuperBuild that builds/downloads a specific >> version of various packages (such as Boost and GTest). Our motivation is to >> have complete control of the version. We don?t want to install this in >> standard locations to avoid clashes, root permissions etc. So let?s say we >> install our versions in ~/our_stuff/lib, ~/our_stuff/include etc >> >> >> >> It seems very hard (and sometimes impossible) however to let future >> find_packages find our own versions as opposed to the system ones. From >> https://cmake.org/cmake/help/latest/command/find_library.html I thought >> that doing something like this would work >> >> >> >> cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff >> >> >> >> but the system version of boost etc are still found first (it does work >> if there is no system version of the library). In the case of Boost, even >> >> >> >> cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff -DBOOST_ROOT=~/our_stuff >> >> >> >> doesn?t help (tested on Linux). I have to set BOOST_INCLUDEDIR for >> instance. As every Find*.cmake has its own conventions of specifying >> cmake/environment variables, and some don?t at all, this just gets >> unfeasible. >> >> >> >> I know about NO_DEFAULT_PATH, NO_CMAKE_SYSTEM_PATH etc options for >> find_package, but this would need modification of CMake files in the >> dependent packages which is quite undesirable for us. >> >> >> >> Any suggestions? >> >> >> >> Thanks >> >> Kris >> >> >> >> -- >> >> 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 pfultz2 at yahoo.com Tue May 16 14:02:23 2017 From: pfultz2 at yahoo.com (P F) Date: Tue, 16 May 2017 13:02:23 -0500 Subject: [CMake] Evaluate generator expressions with install interface Message-ID: Hi, I would like to evaluate generator expressions to generate a pkgconfig file. Something like: function(auto_pkgconfig TARGET) file(GENERATE OUTPUT ${TARGET}.pc CONTENT " Name: ${TARGET} Cflags: -I$, -I> Libs: -L$ -l${TARGET} ") install(FILES ${TARGET}.pc DESTINATION lib/pkgconfig) endfunction() However, this doesn?t work very well. It always evaluates the build interface or computes the TARGET_FILE_DIR according the build directory instead of installation. Also, if include directories are added to the target after calling `auto_pkgconfig` it doesn?t capture those(ie it runs file(GENERATE) at config time instead of generator time). So, is there a way to evaluate generator expressions for installation? And evaluate them at generator time? Calling `file(GENERATE)` at installation time(with install(CODE) or install(SCRIPT)) does not solve this problem either. Thanks, Paul From pawel.veselov at gmail.com Tue May 16 14:50:47 2017 From: pawel.veselov at gmail.com (Pawel Veselov) Date: Tue, 16 May 2017 11:50:47 -0700 Subject: [CMake] RPATH for external library In-Reply-To: <20170516102059.1a0f21de@posteo.de> References: <20170516102059.1a0f21de@posteo.de> Message-ID: >> I'm trying to make CMake add to the linker RPATH automatically. >> There is a library that is installed in a non-default location. >> I'm discovering the library using PkgConfig (custom >> CMAKE_APPBUNDLE_PATH) and add the library build options to the >> LINK_FLAGS (using set_property). > Instead of setting the LINK_FLAGS to your external library try using > target_link_libraries() with the full path name to the library. > > For example this will work as expected, cmake with set an RPATH > to "/path/to": > > set(LIB "/path/to/libsomething.so") > target_link_libraries(test1 ${LIB}) That doesn't really play well with FindPkgConfig then. AFAIK, there is no way to ask pkg-config to dish out full libraries paths, one would have to sift through all -l and -L and figure them out... Thank you, Pawel. From patrick.boettcher at posteo.de Tue May 16 15:09:08 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Tue, 16 May 2017 21:09:08 +0200 Subject: [CMake] RPATH for external library In-Reply-To: References: <20170516102059.1a0f21de@posteo.de> Message-ID: <20170516210908.3e3381da@posteo.de> On Tue, 16 May 2017 11:50:47 -0700 Pawel Veselov wrote: > >> I'm trying to make CMake add to the linker RPATH automatically. > >> There is a library that is installed in a non-default location. > >> I'm discovering the library using PkgConfig (custom > >> CMAKE_APPBUNDLE_PATH) and add the library build options to the > >> LINK_FLAGS (using set_property). > > Instead of setting the LINK_FLAGS to your external library try using > > target_link_libraries() with the full path name to the library. > > > > For example this will work as expected, cmake with set an RPATH > > to "/path/to": > > > > set(LIB "/path/to/libsomething.so") > > target_link_libraries(test1 ${LIB}) > > That doesn't really play well with FindPkgConfig then. AFAIK, there is > no way to ask pkg-config to dish out full libraries paths, one would > have to sift through all -l and -L and figure them out... Could you switch from pkg-config to find_library() ? I was once in a situation where I could have used pkg-config with a custom path to have pkg-config look for the .pc-file. I then switched to find_library with the custom-path slightly adapted and it worked at least as good as with pkg-config, if not better. For my case. regards, -- Patrick. From pawel.veselov at gmail.com Tue May 16 15:32:11 2017 From: pawel.veselov at gmail.com (Pawel Veselov) Date: Tue, 16 May 2017 12:32:11 -0700 Subject: [CMake] RPATH for external library In-Reply-To: <20170516210908.3e3381da@posteo.de> References: <20170516102059.1a0f21de@posteo.de> <20170516210908.3e3381da@posteo.de> Message-ID: On Tue, May 16, 2017 at 12:09 PM, Patrick Boettcher wrote: > On Tue, 16 May 2017 11:50:47 -0700 > Pawel Veselov wrote: > >> >> I'm trying to make CMake add to the linker RPATH automatically. >> >> There is a library that is installed in a non-default location. >> >> I'm discovering the library using PkgConfig (custom >> >> CMAKE_APPBUNDLE_PATH) and add the library build options to the >> >> LINK_FLAGS (using set_property). >> > Instead of setting the LINK_FLAGS to your external library try using >> > target_link_libraries() with the full path name to the library. >> That doesn't really play well with FindPkgConfig then. AFAIK, there is >> no way to ask pkg-config to dish out full libraries paths, one would >> have to sift through all -l and -L and figure them out... > Could you switch from pkg-config to find_library() ? In this case I guess I could. For the record, RPATH kicks in just fine if adding a module dependency (target-link-libraries pointing to a library created with add_library) > I was once in a situation where I could have used pkg-config with a > custom path to have pkg-config look for the .pc-file. I then switched to > find_library with the custom-path slightly adapted and it worked at > least as good as with pkg-config, if not better. For my case. Right. My reason of preferring pkg-config is because it may have all other kind of stuff in it that the maintainer thought is necessary. I'd imagine some .pc files export a boatload of flags for all 3 stages, and I rather not ignored them. It is also quite important when there are chained dependencies. AFAIU, find_library() is not capable of tracking down dependencies. From rjvbertin at gmail.com Wed May 17 05:18:19 2017 From: rjvbertin at gmail.com (=?UTF-8?B?UmVuw6kgSi4gVi4=?= Bertin) Date: Wed, 17 May 2017 11:18:19 +0200 Subject: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-) References: <1717014.jp3shePasT@bola> Message-ID: <1538239.zM7z4IG2Xa@patux.local> Ren? J.V. Bertin wrote: Bump. No one who can help here? From patrick.boettcher at posteo.de Wed May 17 05:55:24 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Wed, 17 May 2017 11:55:24 +0200 Subject: [CMake] RPATH for external library In-Reply-To: References: <20170516102059.1a0f21de@posteo.de> <20170516210908.3e3381da@posteo.de> Message-ID: <20170517115449.778f940e@posteo.de> On Tue, 16 May 2017 12:32:11 -0700 Pawel Veselov wrote: > > I was once in a situation where I could have used pkg-config with a > > custom path to have pkg-config look for the .pc-file. I then > > switched to find_library with the custom-path slightly adapted and > > it worked at least as good as with pkg-config, if not better. For > > my case. > > Right. My reason of preferring pkg-config is because it may have all > other kind of stuff in it that the maintainer thought is necessary. > I'd imagine some .pc files export a boatload of flags for all 3 > stages, and I rather not ignored them. It is also quite important > when there are chained dependencies. Understandable. If I understand things correctly, pkg-config does not return the RPATH-arguments necessary to link with. IOW, if used in a GNU Makefile you would also need to add these by yourself, right? So your problem is not a cmake-problem. If this is the case, what you're looking for is a macro/script which transforms -l and -L-arguments to the fully-qualified filename. That should be doable with a combination of string(SUBSTRING) and find_library() - if you dare ;-) . > AFAIU, find_library() is not > capable of tracking down dependencies. No, find_library only returns the (complete) filename of a library found via its arguments. -- Patrick. From volker.enderlein at ifm-chemnitz.de Wed May 17 06:18:34 2017 From: volker.enderlein at ifm-chemnitz.de (Volker Enderlein) Date: Wed, 17 May 2017 12:18:34 +0200 Subject: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-) In-Reply-To: <1717014.jp3shePasT@bola> References: <1717014.jp3shePasT@bola> Message-ID: <336bae65-2ccd-2212-082b-eb8c74c3946c@ifm-chemnitz.de> Hello, according to https://sourceforge.net/p/predef/wiki/Compilers/ you could check with check_cxx_source_compiles(" #if defined (_MSC_VER) && (_MSC_VER == 1900) && (_MSC_FULL_VER == 190024210) #else #error compiler is not MSVC Update3 #endif int main() { return 0; } " MSVC_UPDATE3_FOUND) for the requested feature. HTH, Cheers, Volker Am 15/05/2017 um 14:56 schrieb Ren? J.V. Bertin: > Hello, > > A question that will hopefully have a quick/easy answer: > > I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the end) can be used instead of /Za . I know that a later update bumped the version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C code so I could assume everyone keeps installs their updates and use that value. > > But what does this translate to in CMake code (MSVC_VERSION)? Probably not just 1903 I presume? > > Thanks, > Ren? From kissling at oberon.ch Wed May 17 08:28:33 2017 From: kissling at oberon.ch (Etan Kissling) Date: Wed, 17 May 2017 12:28:33 +0000 Subject: [CMake] Link order and interface multiplicity In-Reply-To: <20170516103942.7c428145@posteo.de> References: <20170516103942.7c428145@posteo.de> Message-ID: Hi, and thanks for the quick reaction :-) The approach with forward declaration looks interesting. However, I don't think that it will resolve all the problems. One issue is that there are multiple apps, each using separate implementations. ? ExeA uses the generic libraries Foo and Bar, as well as the **IA** implementation of interface library I. ? ExeB uses the generic libraries Foo and Bar, as well as the **IB** implementation of interface library I. On top of that, I'd like to be able to build Foo and Bar independently as static libraries, without IA or IB being present. Is it possible to replace references to interface library I with implementation IA, but only while ExeA is being compiled, and vice versa for ExeB? There are only static libraries involved, so the compilation of Foo / Bar should be the same in both cases. Thanks Etan > On 16 May 2017, at 10:39, Patrick Boettcher wrote: > > Hi, > > On Mon, 15 May 2017 12:30:10 +0000 > Etan Kissling wrote: >> I have a project with a layer consisting of interface libraries: >> add_library(I INTERFACE) >> >> These interface libraries are then implemented several times, to fit >> the different environments of applications: add_library(IA STATIC ...) >> target_link_libraries(IA PUBLIC I) >> >> add_library(IB STATIC ...) >> target_link_libraries(IB PUBLIC I) >> >> There are also application independent libraries, that make use of >> the interface libraries. add_library(Foo STATIC ...) >> target_link_libraries(Foo PUBLIC I) >> >> add_library(Bar STATIC ...) >> target_link_libraries(Bar PUBLIC I) >> >> And finally, the application defines which implementation of the >> interface library layer is being used. >> >> add_executable(ExeA ...) >> target_link_libraries(ExeA Foo Bar IA) >> >> add_executable(ExeB ...) >> target_link_libraries(ExeB Foo Bar IB) >> >> >> Luckily, this is okay, as long as IA is listed after Foo and Bar in >> the synthesized link command. >> >> However, certain implementations of I make use of the application >> independent libraries again. On these environments, the link command >> line becomes something like this: >> >> IA Foo Bar >> >> While it should be >> >> Foo Bar IA Foo Bar >> >> This make sense, because there is no explicit dependency being >> described that Foo / Bar depend on IA while compiling ExeA. In the >> simple case, we just get lucky, because it happens to be the default >> that link command line has the same order as in the >> target_link_libraries call. > > I wouldn't try my luck if I were you. Always be explicit, especially > with dependencies, otherwise, at some point in time, cmake won't get it > right when generating the order of link. > > What you could try is "forward" declaring a > platform/app-dependent dependencies with interface libraries: > > In CMakeLists.txt > > add_library(top-level-I INTERFACE) > target_link_libraries(top-level-I INTERFACE app-dependent-I) > # here we forward declare app-dependent-I > > add_subdirectory(app) # app-dependent > > add_executable(test2 test2.cpp) > target_link_libraries(test2 top-level-I) # will link with IA and IB > > In app/CMakeLists.txt > > add_library(app-dependent-I INTERFACE) > target_link_libraries(app-dependent-I INTERFACE IA IB) > # here we "implement" > > add_library(IA ...) > add_library(IB ...) > > app-dependent-I is a forward declared libraries - cmake will evaluate > this at generation-time. This will get you the dependencies right. > > I hope I correctly understood your question. > > -- > Patrick. From rjvbertin at gmail.com Wed May 17 08:40:56 2017 From: rjvbertin at gmail.com (=?UTF-8?B?UmVuw6kgSi4gVi4=?= Bertin) Date: Wed, 17 May 2017 14:40:56 +0200 Subject: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-) References: <1717014.jp3shePasT@bola> <336bae65-2ccd-2212-082b-eb8c74c3946c@ifm-chemnitz.de> Message-ID: <1806390.NzRRllEevc@patux.local> Volker Enderlein wrote: Hi, Thanks, that helps. With there is maybe something to learn from the CMake sources, too. R. > Hello, > > according to https://sourceforge.net/p/predef/wiki/Compilers/ you could > check with > > check_cxx_source_compiles(" > #if defined (_MSC_VER) && (_MSC_VER == 1900) && (_MSC_FULL_VER == > 190024210) > #else > #error compiler is not MSVC Update3 > #endif > int main() { > return 0; > } > " MSVC_UPDATE3_FOUND) > > for the requested feature. > > HTH, Cheers, Volker > > > Am 15/05/2017 um 14:56 schrieb Ren? J.V. Bertin: >> Hello, >> >> A question that will hopefully have a quick/easy answer: >> >> I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the >> end) can be used instead of /Za . I know that a later update bumped the >> version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C >> code so I could assume everyone keeps installs their updates and use that >> value. >> >> But what does this translate to in CMake code (MSVC_VERSION)? Probably not >> just 1903 I presume? >> >> Thanks, >> Ren? > From rcdailey.lists at gmail.com Wed May 17 11:36:59 2017 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Wed, 17 May 2017 10:36:59 -0500 Subject: [CMake] Force target to always run last? Message-ID: I have a custom target that must meet the following requirements: * It must always run, regardless of what subset of other targets are being built * It must always be the very last thing run. In parallelized builds, it must wait until all other targets are done building before starting, so that it is the very last target run, and should not run in parallel with others. Is this possible? I'm willing to use hackery if needed... Running CMake 3.8.0. Thanks! From robert.maynard at kitware.com Wed May 17 12:48:34 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 17 May 2017 12:48:34 -0400 Subject: [CMake] Link order and interface multiplicity In-Reply-To: References: <20170516103942.7c428145@posteo.de> Message-ID: I have a feeling that you could do this with generator expressions. You would have the interface link line for I have a generator expression that switches between IA and IB. Than you would setup ExeA and ExeB to trigger this switch. Maybe using something like $? On Wed, May 17, 2017 at 8:28 AM, Etan Kissling wrote: > Hi, and thanks for the quick reaction :-) > > The approach with forward declaration looks interesting. However, I don't > think that it will resolve all the problems. > > One issue is that there are multiple apps, each using separate > implementations. > ? ExeA uses the generic libraries Foo and Bar, as well as the **IA** > implementation of interface library I. > ? ExeB uses the generic libraries Foo and Bar, as well as the **IB** > implementation of interface library I. > > On top of that, I'd like to be able to build Foo and Bar independently as > static libraries, without IA or IB being present. > > Is it possible to replace references to interface library I with > implementation IA, but only while ExeA is being compiled, and vice versa > for ExeB? > There are only static libraries involved, so the compilation of Foo / Bar > should be the same in both cases. > > Thanks > > Etan > > > > > On 16 May 2017, at 10:39, Patrick Boettcher > wrote: > > > > Hi, > > > > On Mon, 15 May 2017 12:30:10 +0000 > > Etan Kissling wrote: > >> I have a project with a layer consisting of interface libraries: > >> add_library(I INTERFACE) > >> > >> These interface libraries are then implemented several times, to fit > >> the different environments of applications: add_library(IA STATIC ...) > >> target_link_libraries(IA PUBLIC I) > >> > >> add_library(IB STATIC ...) > >> target_link_libraries(IB PUBLIC I) > >> > >> There are also application independent libraries, that make use of > >> the interface libraries. add_library(Foo STATIC ...) > >> target_link_libraries(Foo PUBLIC I) > >> > >> add_library(Bar STATIC ...) > >> target_link_libraries(Bar PUBLIC I) > >> > >> And finally, the application defines which implementation of the > >> interface library layer is being used. > >> > >> add_executable(ExeA ...) > >> target_link_libraries(ExeA Foo Bar IA) > >> > >> add_executable(ExeB ...) > >> target_link_libraries(ExeB Foo Bar IB) > >> > >> > >> Luckily, this is okay, as long as IA is listed after Foo and Bar in > >> the synthesized link command. > >> > >> However, certain implementations of I make use of the application > >> independent libraries again. On these environments, the link command > >> line becomes something like this: > >> > >> IA Foo Bar > >> > >> While it should be > >> > >> Foo Bar IA Foo Bar > >> > >> This make sense, because there is no explicit dependency being > >> described that Foo / Bar depend on IA while compiling ExeA. In the > >> simple case, we just get lucky, because it happens to be the default > >> that link command line has the same order as in the > >> target_link_libraries call. > > > > I wouldn't try my luck if I were you. Always be explicit, especially > > with dependencies, otherwise, at some point in time, cmake won't get it > > right when generating the order of link. > > > > What you could try is "forward" declaring a > > platform/app-dependent dependencies with interface libraries: > > > > In CMakeLists.txt > > > > add_library(top-level-I INTERFACE) > > target_link_libraries(top-level-I INTERFACE app-dependent-I) > > # here we forward declare app-dependent-I > > > > add_subdirectory(app) # app-dependent > > > > add_executable(test2 test2.cpp) > > target_link_libraries(test2 top-level-I) # will link with IA and IB > > > > In app/CMakeLists.txt > > > > add_library(app-dependent-I INTERFACE) > > target_link_libraries(app-dependent-I INTERFACE IA IB) > > # here we "implement" > > > > add_library(IA ...) > > add_library(IB ...) > > > > app-dependent-I is a forward declared libraries - cmake will evaluate > > this at generation-time. This will get you the dependencies right. > > > > I hope I correctly understood your question. > > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzsariysk at gmail.com Wed May 17 16:59:26 2017 From: tzsariysk at gmail.com (T.Sariyski) Date: Wed, 17 May 2017 14:59:26 -0600 Subject: [CMake] CTest question Message-ID: <014901d2cf50$78fe22e0$6afa68a0$@gmail.com> Hi, I wonder what is the reason that sometimes ctest ends with numerous ?Failed? and ?Timeout?, which ?ctest ?rerun-failed? reports ?Passed?. At times the number of these false failures is about one third. I guess that the problem is in the way I set my tests, but I have no clue where to look, or how to ?debug? the ctest run. Any advice is highly appreciated. Thanks, Ted -------------- next part -------------- An HTML attachment was scrubbed... URL: From kissling at oberon.ch Wed May 17 17:15:39 2017 From: kissling at oberon.ch (Etan Kissling) Date: Wed, 17 May 2017 21:15:39 +0000 Subject: [CMake] Link order and interface multiplicity In-Reply-To: References: <20170516103942.7c428145@posteo.de> , Message-ID: <0CE4AAED-49BF-4B39-BF9C-D12BB5A09582@oberon.ch> Not sure if I understand that correctly, but isn't that essential the same as creating a FooA and BarA that link to IA, and a FooB and BarB that link to IB, and linking ExeA to FooA and ExeB to FooB? Problem with this approach is that there are more than two implementations of I, and way more than two Exes ^_^ Thanks for the input, though! Etan On 17 May 2017, at 18:49, Robert Maynard > wrote: I have a feeling that you could do this with generator expressions. You would have the interface link line for I have a generator expression that switches between IA and IB. Than you would setup ExeA and ExeB to trigger this switch. Maybe using something like $? On Wed, May 17, 2017 at 8:28 AM, Etan Kissling > wrote: Hi, and thanks for the quick reaction :-) The approach with forward declaration looks interesting. However, I don't think that it will resolve all the problems. One issue is that there are multiple apps, each using separate implementations. * ExeA uses the generic libraries Foo and Bar, as well as the **IA** implementation of interface library I. * ExeB uses the generic libraries Foo and Bar, as well as the **IB** implementation of interface library I. On top of that, I'd like to be able to build Foo and Bar independently as static libraries, without IA or IB being present. Is it possible to replace references to interface library I with implementation IA, but only while ExeA is being compiled, and vice versa for ExeB? There are only static libraries involved, so the compilation of Foo / Bar should be the same in both cases. Thanks Etan > On 16 May 2017, at 10:39, Patrick Boettcher > wrote: > > Hi, > > On Mon, 15 May 2017 12:30:10 +0000 > Etan Kissling > wrote: >> I have a project with a layer consisting of interface libraries: >> add_library(I INTERFACE) >> >> These interface libraries are then implemented several times, to fit >> the different environments of applications: add_library(IA STATIC ...) >> target_link_libraries(IA PUBLIC I) >> >> add_library(IB STATIC ...) >> target_link_libraries(IB PUBLIC I) >> >> There are also application independent libraries, that make use of >> the interface libraries. add_library(Foo STATIC ...) >> target_link_libraries(Foo PUBLIC I) >> >> add_library(Bar STATIC ...) >> target_link_libraries(Bar PUBLIC I) >> >> And finally, the application defines which implementation of the >> interface library layer is being used. >> >> add_executable(ExeA ...) >> target_link_libraries(ExeA Foo Bar IA) >> >> add_executable(ExeB ...) >> target_link_libraries(ExeB Foo Bar IB) >> >> >> Luckily, this is okay, as long as IA is listed after Foo and Bar in >> the synthesized link command. >> >> However, certain implementations of I make use of the application >> independent libraries again. On these environments, the link command >> line becomes something like this: >> >> IA Foo Bar >> >> While it should be >> >> Foo Bar IA Foo Bar >> >> This make sense, because there is no explicit dependency being >> described that Foo / Bar depend on IA while compiling ExeA. In the >> simple case, we just get lucky, because it happens to be the default >> that link command line has the same order as in the >> target_link_libraries call. > > I wouldn't try my luck if I were you. Always be explicit, especially > with dependencies, otherwise, at some point in time, cmake won't get it > right when generating the order of link. > > What you could try is "forward" declaring a > platform/app-dependent dependencies with interface libraries: > > In CMakeLists.txt > > add_library(top-level-I INTERFACE) > target_link_libraries(top-level-I INTERFACE app-dependent-I) > # here we forward declare app-dependent-I > > add_subdirectory(app) # app-dependent > > add_executable(test2 test2.cpp) > target_link_libraries(test2 top-level-I) # will link with IA and IB > > In app/CMakeLists.txt > > add_library(app-dependent-I INTERFACE) > target_link_libraries(app-dependent-I INTERFACE IA IB) > # here we "implement" > > add_library(IA ...) > add_library(IB ...) > > app-dependent-I is a forward declared libraries - cmake will evaluate > this at generation-time. This will get you the dependencies right. > > I hope I correctly understood your question. > > -- > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Wed May 17 17:26:49 2017 From: DLRdave at aol.com (David Cole) Date: Wed, 17 May 2017 17:26:49 -0400 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: The way I know how to do this is to add it last at the bottom of the top-level CMakeLists.txt file, and then use add_dependencies to make it depend on all other targets. (Or at least all other "leaf" targets, which further depend on others, ... the sum of which is "all other targets" besides the new "last" target.) So it's not pretty, but it's possible. HTH, David C. On Wed, May 17, 2017 at 11:36 AM, Robert Dailey wrote: > I have a custom target that must meet the following requirements: > > * It must always run, regardless of what subset of other targets are being built > * It must always be the very last thing run. In parallelized builds, > it must wait until all other targets are done building before > starting, so that it is the very last target run, and should not run > in parallel with others. > > Is this possible? I'm willing to use hackery if needed... > > Running CMake 3.8.0. Thanks! > -- > > 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 robert.maynard at kitware.com Wed May 17 17:42:42 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 17 May 2017 17:42:42 -0400 Subject: [CMake] Link order and interface multiplicity In-Reply-To: <0CE4AAED-49BF-4B39-BF9C-D12BB5A09582@oberon.ch> References: <20170516103942.7c428145@posteo.de> <0CE4AAED-49BF-4B39-BF9C-D12BB5A09582@oberon.ch> Message-ID: No you would set the properties on ExeA and ExeB and that would effect the target_link_library generation for the interface library I I have written an example that drops the Foo libraries as they aren't needed to show my example. https://github.com/robertmaynard/Sandbox/blob/master/CMakeInterfaceChangesLibrary/CMakeLists.txt On Wed, May 17, 2017 at 5:15 PM, Etan Kissling wrote: > Not sure if I understand that correctly, but isn't that essential the same > as creating a FooA and BarA that link to IA, and a FooB and BarB that link > to IB, and linking ExeA to FooA and ExeB to FooB? > > Problem with this approach is that there are more than two implementations > of I, and way more than two Exes ^_^ > > Thanks for the input, though! > > Etan > > On 17 May 2017, at 18:49, Robert Maynard > wrote: > > I have a feeling that you could do this with generator expressions. You > would have the interface link line for I have a generator expression that > switches between IA and IB. Than you would setup ExeA and ExeB to trigger > this switch. Maybe using something like $? > > On Wed, May 17, 2017 at 8:28 AM, Etan Kissling wrote: > >> Hi, and thanks for the quick reaction :-) >> >> The approach with forward declaration looks interesting. However, I don't >> think that it will resolve all the problems. >> >> One issue is that there are multiple apps, each using separate >> implementations. >> ? ExeA uses the generic libraries Foo and Bar, as well as the **IA** >> implementation of interface library I. >> ? ExeB uses the generic libraries Foo and Bar, as well as the **IB** >> implementation of interface library I. >> >> On top of that, I'd like to be able to build Foo and Bar independently as >> static libraries, without IA or IB being present. >> >> Is it possible to replace references to interface library I with >> implementation IA, but only while ExeA is being compiled, and vice versa >> for ExeB? >> There are only static libraries involved, so the compilation of Foo / Bar >> should be the same in both cases. >> >> Thanks >> >> Etan >> >> >> >> > On 16 May 2017, at 10:39, Patrick Boettcher < >> patrick.boettcher at posteo.de> wrote: >> > >> > Hi, >> > >> > On Mon, 15 May 2017 12:30:10 +0000 >> > Etan Kissling wrote: >> >> I have a project with a layer consisting of interface libraries: >> >> add_library(I INTERFACE) >> >> >> >> These interface libraries are then implemented several times, to fit >> >> the different environments of applications: add_library(IA STATIC ...) >> >> target_link_libraries(IA PUBLIC I) >> >> >> >> add_library(IB STATIC ...) >> >> target_link_libraries(IB PUBLIC I) >> >> >> >> There are also application independent libraries, that make use of >> >> the interface libraries. add_library(Foo STATIC ...) >> >> target_link_libraries(Foo PUBLIC I) >> >> >> >> add_library(Bar STATIC ...) >> >> target_link_libraries(Bar PUBLIC I) >> >> >> >> And finally, the application defines which implementation of the >> >> interface library layer is being used. >> >> >> >> add_executable(ExeA ...) >> >> target_link_libraries(ExeA Foo Bar IA) >> >> >> >> add_executable(ExeB ...) >> >> target_link_libraries(ExeB Foo Bar IB) >> >> >> >> >> >> Luckily, this is okay, as long as IA is listed after Foo and Bar in >> >> the synthesized link command. >> >> >> >> However, certain implementations of I make use of the application >> >> independent libraries again. On these environments, the link command >> >> line becomes something like this: >> >> >> >> IA Foo Bar >> >> >> >> While it should be >> >> >> >> Foo Bar IA Foo Bar >> >> >> >> This make sense, because there is no explicit dependency being >> >> described that Foo / Bar depend on IA while compiling ExeA. In the >> >> simple case, we just get lucky, because it happens to be the default >> >> that link command line has the same order as in the >> >> target_link_libraries call. >> > >> > I wouldn't try my luck if I were you. Always be explicit, especially >> > with dependencies, otherwise, at some point in time, cmake won't get it >> > right when generating the order of link. >> > >> > What you could try is "forward" declaring a >> > platform/app-dependent dependencies with interface libraries: >> > >> > In CMakeLists.txt >> > >> > add_library(top-level-I INTERFACE) >> > target_link_libraries(top-level-I INTERFACE app-dependent-I) >> > # here we forward declare app-dependent-I >> > >> > add_subdirectory(app) # app-dependent >> > >> > add_executable(test2 test2.cpp) >> > target_link_libraries(test2 top-level-I) # will link with IA and IB >> > >> > In app/CMakeLists.txt >> > >> > add_library(app-dependent-I INTERFACE) >> > target_link_libraries(app-dependent-I INTERFACE IA IB) >> > # here we "implement" >> > >> > add_library(IA ...) >> > add_library(IB ...) >> > >> > app-dependent-I is a forward declared libraries - cmake will evaluate >> > this at generation-time. This will get you the dependencies right. >> > >> > I hope I correctly understood your question. >> > >> > -- >> > 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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan.e.sanchez at gmail.com Wed May 17 19:38:50 2017 From: juan.e.sanchez at gmail.com (Juan E. Sanchez) Date: Wed, 17 May 2017 18:38:50 -0500 Subject: [CMake] ctest test run order Message-ID: <531876ba-db1f-ae51-0e20-562454f007e0@gmail.com> I remember that the longest tests used to run first. Now they seem to run in a random order on Windows, Mac, Linux. Is this the expected behavior? How can I get longest test first? Regards, Juan From pawel.veselov at gmail.com Wed May 17 20:13:13 2017 From: pawel.veselov at gmail.com (Pawel Veselov) Date: Wed, 17 May 2017 17:13:13 -0700 Subject: [CMake] RPATH for external library In-Reply-To: <20170517115449.778f940e@posteo.de> References: <20170516102059.1a0f21de@posteo.de> <20170516210908.3e3381da@posteo.de> <20170517115449.778f940e@posteo.de> Message-ID: On Wed, May 17, 2017 at 2:55 AM, Patrick Boettcher > My reason of preferring pkg-config is because it may have all >> other kind of stuff in it that the maintainer thought is necessary. >> I'd imagine some .pc files export a boatload of flags for all 3 >> stages, and I rather not ignored them. It is also quite important >> when there are chained dependencies. > > Understandable. > > If I understand things correctly, pkg-config does not return the > RPATH-arguments necessary to link with. IOW, if used in a GNU > Makefile you would also need to add these by yourself, right? So your > problem is not a cmake-problem. IMHO it's not fair to say - if it's not supported by GNUmake, it shouldn't be supported by CMake. In any case, the CMake documentation says that INSTALL_RPATH_USE_LINK_PATH "...will append directories in the linker search path and outside the project to the INSTALL_RPATH...", there is no statement that it only applies to linker search paths that were supplied in a certain way. [skipped] From eric.noulard at gmail.com Thu May 18 00:53:42 2017 From: eric.noulard at gmail.com (Eric Noulard) Date: Thu, 18 May 2017 06:53:42 +0200 Subject: [CMake] CTest question In-Reply-To: <014901d2cf50$78fe22e0$6afa68a0$@gmail.com> References: <014901d2cf50$78fe22e0$6afa68a0$@gmail.com> Message-ID: We lack information on how your test are failing. If they all timeout then may be you should setup a proper timeout for the test. The actual execution speed of a test may depend on the load of your machine or the network (depending on what the test are actually doing). This may be even more sensible if your test are run in parallel. Do you run ctest with --parallel option? Do your tests depends on each other? If so did you setup test dependencies? Le 17 mai 2017 10:59 PM, "T.Sariyski" a ?crit : > Hi, > > > > I wonder what is the reason that sometimes ctest ends with numerous > ?Failed? and ?Timeout?, which ?ctest ?rerun-failed? reports ?Passed?. At > times the number of these false failures is about one third. I guess that > the problem is in the way I set my tests, but I have no clue where to look, > or how to ?debug? the ctest run. > > Any advice is highly appreciated. > > > > Thanks, > > Ted > > -- > > 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 patrick.boettcher at posteo.de Thu May 18 02:19:19 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Thu, 18 May 2017 08:19:19 +0200 Subject: [CMake] RPATH for external library In-Reply-To: References: <20170516102059.1a0f21de@posteo.de> <20170516210908.3e3381da@posteo.de> <20170517115449.778f940e@posteo.de> Message-ID: <20170518081919.394107ff@posteo.de> On Wed, 17 May 2017 17:13:13 -0700 Pawel Veselov wrote: > On Wed, May 17, 2017 at 2:55 AM, Patrick Boettcher > > My reason of preferring pkg-config is > because it may have all > >> other kind of stuff in it that the maintainer thought is necessary. > >> I'd imagine some .pc files export a boatload of flags for all 3 > >> stages, and I rather not ignored them. It is also quite important > >> when there are chained dependencies. > > > > Understandable. > > > > If I understand things correctly, pkg-config does not return the > > RPATH-arguments necessary to link with. IOW, if used in a GNU > > Makefile you would also need to add these by yourself, right? So > > your problem is not a cmake-problem. > > IMHO it's not fair to say - if it's not supported by GNUmake, it > shouldn't be supported by CMake. That was not my intention to say. But rather I thought that somewhere this problem was already solved, as it is not a cmake-only-problem, but a general build problem when using pkg-config on libraries which are not in default search-pathes. > In any case, the CMake documentation says that > INSTALL_RPATH_USE_LINK_PATH "...will append directories in the linker > search path and outside the project to the INSTALL_RPATH...", there > is no statement that it only applies to linker search paths that were > supplied in a certain way. That applies only to libraries, not the linker-flags which have been added behind the back of cmake's library-dependency mechanism. > [skipped] This skipped part was trying to point out a solution based on the -l and -L arguments returned by pkg-config and some cmake parsing. It wouldn't be beautiful, but it'll work. -- Patrick. From patrick.boettcher at posteo.de Thu May 18 02:23:01 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Thu, 18 May 2017 08:23:01 +0200 Subject: [CMake] Link order and interface multiplicity In-Reply-To: <0CE4AAED-49BF-4B39-BF9C-D12BB5A09582@oberon.ch> References: <20170516103942.7c428145@posteo.de> <0CE4AAED-49BF-4B39-BF9C-D12BB5A09582@oberon.ch> Message-ID: <20170518082301.35f8bfb0@posteo.de> On Wed, 17 May 2017 21:15:39 +0000 Etan Kissling wrote: > Not sure if I understand that correctly, but isn't that essential the > same as creating a FooA and BarA that link to IA, and a FooB and BarB > that link to IB, and linking ExeA to FooA and ExeB to FooB? > > Problem with this approach is that there are more than two > implementations of I, and way more than two Exes ^_^ Could you create an example repository (on github for example) which templates what you're trying to achieve? From what I understood so far, I doubt that all of it can be achieved in one cmake-build. Maybe you need to create a super-project and work with export() and include(). regards, -- Patrick. From patrick.boettcher at posteo.de Thu May 18 03:07:35 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Thu, 18 May 2017 09:07:35 +0200 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: <20170518090735.330a14d9@posteo.de> On Wed, 17 May 2017 10:36:59 -0500 Robert Dailey wrote: > I have a custom target that must meet the following requirements: > > * It must always run, regardless of what subset of other targets are > being built > * It must always be the very last thing run. In parallelized builds, > it must wait until all other targets are done building before > starting, so that it is the very last target run, and should not run > in parallel with others. > > Is this possible? I'm willing to use hackery if needed... > > Running CMake 3.8.0. Thanks! One way would be to create a super-project-like CMakeLists.txt which will add your current project via ExternalProject_Add() . Then you add your always-build-last-target to this super-CMakeLists.txt as depending on the target created by this external-project in this super-CMakeLists.txt . regards, -- Patrick. From tzsariysk at gmail.com Thu May 18 09:37:53 2017 From: tzsariysk at gmail.com (T.Sariyski) Date: Thu, 18 May 2017 07:37:53 -0600 Subject: [CMake] CTest question In-Reply-To: References: <014901d2cf50$78fe22e0$6afa68a0$@gmail.com> Message-ID: <01c901d2cfdb$f43c84c0$dcb58e40$@gmail.com> Hi Eric, I am sorry I did not state the question clear enough. Let me first say that tests does not depend on each other, and running with or without ?parallel does not make much of difference. Here is how I set the tests . This is a Fortran code, it does not return. ADD_TEST command is a call to CMAKE, which (i) executes the Fortran code, and (ii) executes a python script, a metrics of how close the solution is to the reference data. I have a PASS_REGULAR_EXPRESSION property, passRegex, associated with the test. When a test fails, the output is that the required regular expression ${passRegex} is not found. A test and the python script are attached. Please let me know if more information is needed. Thanks in advance, Ted CMAKE_MINIMUM_REQUIRED(VERSION 2.8) project(project_name Fortran ) enable_testing() set (SRUN_COMMAND /bin/sh -c "cd ${ CMAKE_CURRENT_BINARY_DIR } && $ ${PROJECT_NAME}") add_custom_target(${PROJECT_NAME}_srun COMMAND ${SRUN_COMMAND}) set(TARGET_NAME ${PROJECT_NAME}_serial) add_test(NAME ${TARGET_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -D "PRE_DELETE_OUTPUT_FILES:BOOL=true" -D "OUTPUT_FILES:STRING=${files_to_delete}" -D "PROGRAM1:STRING=${SRUN_COMMAND}" -D "PROGRAM2:STRING=python;${assert_case};${hs_work_file};${hs_gold_file};0" -P "run_and_assert.cmake") set(passRegex "CALCULATION TERMINATED BECAUSE STOP TIME ACHIEVED" "ctest: SUCCESS") set_property(TEST ${TARGET_NAME} PROPERTY PASS_REGULAR_EXPRESSION "${passRegex}") /> cat run_and_assert.cmake ? EXECUTE_PROCESS(COMMAND ${PROGRAM1} RESULT_VARIABLE error ERROR_FILE err.log OUTPUT_FILE out.log ) IF(error) MESSAGE(FATAL_ERROR "Executing \"${PROGRAM1}\" FAIED! error=${error}") ENDIF() EXECUTE_PROCESS(COMMAND ${PROGRAM2} RESULT_VARIABLE status) IF(status) MESSAGE(SEND_ERROR "Executing \"${PROGRAM2}\" FAILED! status=${status}") ENDIF() From: Eric Noulard [mailto:eric.noulard at gmail.com] Sent: Wednesday, May 17, 2017 10:54 PM To: T.Sariyski Cc: CMake ML Subject: Re: [CMake] CTest question We lack information on how your test are failing. If they all timeout then may be you should setup a proper timeout for the test. The actual execution speed of a test may depend on the load of your machine or the network (depending on what the test are actually doing). This may be even more sensible if your test are run in parallel. Do you run ctest with --parallel option? Do your tests depends on each other? If so did you setup test dependencies? Le 17 mai 2017 10:59 PM, "T.Sariyski" > a ?crit : Hi, I wonder what is the reason that sometimes ctest ends with numerous ?Failed? and ?Timeout?, which ?ctest ?rerun-failed? reports ?Passed?. At times the number of these false failures is about one third. I guess that the problem is in the way I set my tests, but I have no clue where to look, or how to ?debug? the ctest run. Any advice is highly appreciated. Thanks, Ted -- 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 rcdailey.lists at gmail.com Thu May 18 10:24:12 2017 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Thu, 18 May 2017 09:24:12 -0500 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: David, Thanks for your help. So if I do it as you suggest, this will also require I specify `ALL` to add_custom_target(), correct? If I do it this way, will it still run even if it isn't a dependency of the target I'm building? Let me set up a simple scenario for my own understanding. Suppose I have the following targets: * A (add_library target) * B (add_library target) * C (add_custom_target target) Dependencies: B depends on A C depends on B and A Normally if I build B, only A and B will build. However, if C was set up using `ALL`, will it build C when I build B? So the expected build order in this case would be: 1. A 2. B 3. C Thanks in advance. On Wed, May 17, 2017 at 4:26 PM, David Cole wrote: > The way I know how to do this is to add it last at the bottom of the > top-level CMakeLists.txt file, and then use add_dependencies to make > it depend on all other targets. (Or at least all other "leaf" targets, > which further depend on others, ... the sum of which is "all other > targets" besides the new "last" target.) > > So it's not pretty, but it's possible. > > > HTH, > David C. > > > > On Wed, May 17, 2017 at 11:36 AM, Robert Dailey > wrote: >> I have a custom target that must meet the following requirements: >> >> * It must always run, regardless of what subset of other targets are being built >> * It must always be the very last thing run. In parallelized builds, >> it must wait until all other targets are done building before >> starting, so that it is the very last target run, and should not run >> in parallel with others. >> >> Is this possible? I'm willing to use hackery if needed... >> >> Running CMake 3.8.0. Thanks! >> -- >> >> 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 DLRdave at aol.com Thu May 18 11:51:08 2017 From: DLRdave at aol.com (David Cole) Date: Thu, 18 May 2017 11:51:08 -0400 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: I'm sorry, I misunderstood that you wanted it to run last regardless of what target you are building. I was assuming you wanted it to happen when you build the "all" target. I didn't think you wanted to run it after any other *individual* target which you might specify. I don't know of an easy way to do that. You could add a custom command as a post-build command on every single target, but that seems like it wouldn't work for you either, as it would run the command potentially multiple times, with no way to tell whether you're being called last or not. Sorry. Why does this need to run after the build of any individual target? Why not just say there are two ways to get it to run: build "all" or explicitly build it after you build the other individual thing you want? On Thu, May 18, 2017 at 10:24 AM, Robert Dailey wrote: > David, > > Thanks for your help. So if I do it as you suggest, this will also > require I specify `ALL` to add_custom_target(), correct? If I do it > this way, will it still run even if it isn't a dependency of the > target I'm building? > > Let me set up a simple scenario for my own understanding. Suppose I > have the following targets: > > * A (add_library target) > * B (add_library target) > * C (add_custom_target target) > > Dependencies: > > B depends on A > C depends on B and A > > Normally if I build B, only A and B will build. However, if C was set > up using `ALL`, will it build C when I build B? So the expected build > order in this case would be: > > 1. A > 2. B > 3. C > > Thanks in advance. > > On Wed, May 17, 2017 at 4:26 PM, David Cole wrote: >> The way I know how to do this is to add it last at the bottom of the >> top-level CMakeLists.txt file, and then use add_dependencies to make >> it depend on all other targets. (Or at least all other "leaf" targets, >> which further depend on others, ... the sum of which is "all other >> targets" besides the new "last" target.) >> >> So it's not pretty, but it's possible. >> >> >> HTH, >> David C. >> >> >> >> On Wed, May 17, 2017 at 11:36 AM, Robert Dailey >> wrote: >>> I have a custom target that must meet the following requirements: >>> >>> * It must always run, regardless of what subset of other targets are being built >>> * It must always be the very last thing run. In parallelized builds, >>> it must wait until all other targets are done building before >>> starting, so that it is the very last target run, and should not run >>> in parallel with others. >>> >>> Is this possible? I'm willing to use hackery if needed... >>> >>> Running CMake 3.8.0. Thanks! >>> -- >>> >>> 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 rcdailey.lists at gmail.com Thu May 18 12:16:47 2017 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Thu, 18 May 2017 11:16:47 -0500 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: So let me go over the problem I'm trying to solve, because it's possible at this point I'm over-engineering it, but it's hard to fix. So my build process is for native shared library targets that eventually get included in an APK for Android. I'm using the NDK toolchain to build my native targets. The general flow from nothing to complete APK is as follows: 1. Build all native library targets 2. Copy native *.so outputs from the CMake build to `libs/armeabi-v7a` in the android project directory (where the src, res, and other android directories are located) 3. Run custom commands that basically invoke 'ant release', and since I positioned the *.so files under 'libs' they get packaged with the APK itself. This is how I provide support for using CMake to build native, run java build, and perform APK packaging. There's a lot of setup that happens in CMake in order to make sure the 'ant release' command behaves as expected. I have to handle a few corner cases: * Each new build of the custom target that runs the 'ant release' command has to only contain the *.so files that were built during that run * Various third-party libraries (pre-compiled *.so files) have to also be copied to libs/armeabi-v7a for only certain android projects, because we do not want duplicated *.so files across multiple android libraries (ant release will fail if there are duplicate *.so files across android project dependencies) So given this, my complete pipeline is as follows: 1. A `android_clean_libs` custom target is run which iterates all known native targets with mapped java projects and completely deletes its 'libs' directory (this is a forced clean prior to building) 2. A `copy_dlls` target runs next, which copies third party (precompiled) *.so files to a single common java project, in its 'libs/armeabi-v7a' directory. 3. Each native target now builds in parallel, as a post-build event it copies its output *.so file to its respective libs/armeabi-v7a directory for packaging. 4. A final 'package' custom target runs which runs 'ant release' on the bottom-most android project (that is not a library target by itself). The part I don't like here is step #1. I don't like the clean to require keeping track of a global property of a list of directories to remove. Ideally, #1 should run as a post-build event during step 3. Basically each native target should delete its 'libs' directory prior to copying its own *.so target to that directory. However, I can't do this because of step #2. Step 2 must happen first, because it's the only way I can guarantee that it will execute regardless of which target I build (all, or specific target). I make `copy_dlls` a dependency of every other target, so it always runs. If I could force it to run *last*, then I could simplify step 1. Sorry if this is too much information or if I've not explained things clearly, but I wanted to hash out the details because maybe there is a better approach. I'm willing to start from scratch on this if it improves the design of the targets. Thanks again!! On Thu, May 18, 2017 at 10:51 AM, David Cole wrote: > I'm sorry, I misunderstood that you wanted it to run last regardless > of what target you are building. I was assuming you wanted it to > happen when you build the "all" target. I didn't think you wanted to > run it after any other *individual* target which you might specify. > > I don't know of an easy way to do that. You could add a custom command > as a post-build command on every single target, but that seems like it > wouldn't work for you either, as it would run the command potentially > multiple times, with no way to tell whether you're being called last > or not. > > Sorry. > > Why does this need to run after the build of any individual target? > Why not just say there are two ways to get it to run: build "all" or > explicitly build it after you build the other individual thing you > want? > > > > > On Thu, May 18, 2017 at 10:24 AM, Robert Dailey > wrote: >> David, >> >> Thanks for your help. So if I do it as you suggest, this will also >> require I specify `ALL` to add_custom_target(), correct? If I do it >> this way, will it still run even if it isn't a dependency of the >> target I'm building? >> >> Let me set up a simple scenario for my own understanding. Suppose I >> have the following targets: >> >> * A (add_library target) >> * B (add_library target) >> * C (add_custom_target target) >> >> Dependencies: >> >> B depends on A >> C depends on B and A >> >> Normally if I build B, only A and B will build. However, if C was set >> up using `ALL`, will it build C when I build B? So the expected build >> order in this case would be: >> >> 1. A >> 2. B >> 3. C >> >> Thanks in advance. >> >> On Wed, May 17, 2017 at 4:26 PM, David Cole wrote: >>> The way I know how to do this is to add it last at the bottom of the >>> top-level CMakeLists.txt file, and then use add_dependencies to make >>> it depend on all other targets. (Or at least all other "leaf" targets, >>> which further depend on others, ... the sum of which is "all other >>> targets" besides the new "last" target.) >>> >>> So it's not pretty, but it's possible. >>> >>> >>> HTH, >>> David C. >>> >>> >>> >>> On Wed, May 17, 2017 at 11:36 AM, Robert Dailey >>> wrote: >>>> I have a custom target that must meet the following requirements: >>>> >>>> * It must always run, regardless of what subset of other targets are being built >>>> * It must always be the very last thing run. In parallelized builds, >>>> it must wait until all other targets are done building before >>>> starting, so that it is the very last target run, and should not run >>>> in parallel with others. >>>> >>>> Is this possible? I'm willing to use hackery if needed... >>>> >>>> Running CMake 3.8.0. Thanks! >>>> -- >>>> >>>> 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 tzsariysk at gmail.com Thu May 18 13:32:39 2017 From: tzsariysk at gmail.com (T.Sariyski) Date: Thu, 18 May 2017 11:32:39 -0600 Subject: [CMake] FW: CTest question In-Reply-To: <020b01d2cffc$6c4f72e0$44ee58a0$@gmail.com> References: <014901d2cf50$78fe22e0$6afa68a0$@gmail.com> <020b01d2cffc$6c4f72e0$44ee58a0$@gmail.com> Message-ID: <021201d2cffc$bf8cce30$3ea66a90$@gmail.com> Hi Eric, I noticed something that may relates to the problem. Like I said in my previous mail, add_test is a call to cmake: ADD_TEST(NAME ${TARGET_NAME} ? COMMAND ${CMAKE_COMMAND} -DPROGRAM1 -DPROGRAM2 ? Is there a chance that PROGRAM1 and PROGRAM2 are executed asynchronically? Here is what I noticed. If a test is executed from its own binary directory, ?ctest -VV?, it always pass. If the same test is executed from the main binary directory, ?ctest -VV -R zamod?, it fails because PROGRAM2 is executed before PROGRAM1 is finished. Attached are the screen outputs for both runs. Thanks, Ted ================================================================ cd CTEST/zamod s1002807:zamod tesari$ ctest -VV UpdateCTestConfiguration from :/Users/tesari/build/gnu.dbg/CTEST/zamod/DartConfiguration.tcl UpdateCTestConfiguration from :/Users/tesari/build/gnu.dbg/CTEST/zamod/DartConfiguration.tcl Test project /Users/tesari/build/gnu.dbg/CTEST/zamod Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 1 Start 1: zamod_serial 1: Test command: /Applications/CMake.app/Contents/bin/cmake "-D" "PRE_DELETE_OUTPUT_FILES:BOOL=true" "-D" "OUTPUT_FILES:STRING=*kdk*;*.exo;*.jpg;*.png;*.log;*~" "-D" "PROGRAM1:STRING=/bin/sh;-c;cd /Users/tesari/build/gnu.dbg/CTEST/zamod && /Users/tesari/build/gnu.dbg/bin/kodiak zamod" "-D" "PROGRAM2:STRING=python;/Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py;/Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk;/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk;0" "-P" "run_and_assert.cmake" 1: Test timeout computed to be: 9.99988e+06 1: -- Executing "/bin/sh;-c;cd /Users/tesari/build/gnu.dbg/CTEST/zamod && /Users/tesari/build/gnu.dbg/bin/kodiak zamod" 1: -- Executing "python;/Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py;/Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk;/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk;0" 1: /Users/tesari/kodiak/trunk/benchmark/Scripts 1: Number of arguments: 4 arguments. 1: Argument List: ['/Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py', '/Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk', '/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk', '0'] 1: /Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py called with 3 arguments: 1: 1 /Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk 1: 2 /Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk 1: 3 0 1: zamod Q0.4 PASS 1: zamod Q0.5 PASS 1: Kodiak ctest: SUCCESS 1/1 Test #1: zamod_serial ..................... Passed 5.73 sec ================================================================ s1002807:gnu.dbg tesari$ ctest -VV -R zamod UpdateCTestConfiguration from :/Users/tesari/build/gnu.dbg/DartConfiguration.tcl Parse Config file:/Users/tesari/build/gnu.dbg/DartConfiguration.tcl UpdateCTestConfiguration from :/Users/tesari/build/gnu.dbg/DartConfiguration.tcl Parse Config file:/Users/tesari/build/gnu.dbg/DartConfiguration.tcl Test project /Users/tesari/build/gnu.dbg Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 113 Start 113: zamod_serial 113: Test command: /Applications/CMake.app/Contents/bin/cmake "-D" "PRE_DELETE_OUTPUT_FILES:BOOL=true" "-D" "OUTPUT_FILES:STRING=*kdk*;*.exo;*.jpg;*.png;*.log;*~" "-D" "PROGRAM1:STRING=/bin/sh;-c;cd /Users/tesari/build/gnu.dbg/CTEST/zamod && /Users/tesari/build/gnu.dbg/bin/kodiak zamod" "-D" "PROGRAM2:STRING=python;/Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py;/Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk;/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk;0" "-P" "run_and_assert.cmake" 113: Test timeout computed to be: 1500 113: -- Executing "/bin/sh;-c;cd /Users/tesari/build/gnu.dbg/CTEST/zamod && /Users/tesari/build/gnu.dbg/bin/kodiak zamod" 113: -- Executing "python;/Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py;/Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk;/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk;0" 113: /Users/tesari/kodiak/trunk/benchmark/Scripts 113: Number of arguments: 4 arguments. 113: Argument List: ['/Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py', '/Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk', '/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk', '0'] 113: /Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py called with 3 arguments: 113: 1 /Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk 113: 2 /Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk 113: 3 0 113: /Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk does not exist! From: Eric Noulard [mailto:eric.noulard at gmail.com] Sent: Wednesday, May 17, 2017 10:54 PM To: T.Sariyski > Cc: CMake ML > Subject: Re: [CMake] CTest question We lack information on how your test are failing. If they all timeout then may be you should setup a proper timeout for the test. The actual execution speed of a test may depend on the load of your machine or the network (depending on what the test are actually doing). This may be even more sensible if your test are run in parallel. Do you run ctest with --parallel option? Do your tests depends on each other? If so did you setup test dependencies? Le 17 mai 2017 10:59 PM, "T.Sariyski" < tzsariysk at gmail.com> a ?crit : Hi, I wonder what is the reason that sometimes ctest ends with numerous ?Failed? and ?Timeout?, which ?ctest ?rerun-failed? reports ?Passed?. At times the number of these false failures is about one third. I guess that the problem is in the way I set my tests, but I have no clue where to look, or how to ?debug? the ctest run. Any advice is highly appreciated. Thanks, Ted -- 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 eric.noulard at gmail.com Thu May 18 13:38:58 2017 From: eric.noulard at gmail.com (Eric Noulard) Date: Thu, 18 May 2017 19:38:58 +0200 Subject: [CMake] FW: CTest question In-Reply-To: <021201d2cffc$bf8cce30$3ea66a90$@gmail.com> References: <014901d2cf50$78fe22e0$6afa68a0$@gmail.com> <020b01d2cffc$6c4f72e0$44ee58a0$@gmail.com> <021201d2cffc$bf8cce30$3ea66a90$@gmail.com> Message-ID: Hi, I don't that 2 execute_process in sequence in a cmake script could be executed out-of-order but I let CMake developer answer more firmly about that. The order of each test created by add_test may vary though. 2017-05-18 19:32 GMT+02:00 T.Sariyski : > Hi Eric, > > > > I noticed something that may relates to the problem. Like I said in my > previous mail, add_test is a call to cmake: > > > > ADD_TEST(NAME ${TARGET_NAME} > > ? > > COMMAND ${CMAKE_COMMAND} > > -DPROGRAM1 > > -DPROGRAM2 > > ? > > > > Is there a chance that PROGRAM1 and PROGRAM2 are executed asynchronically? > Here is what I noticed. If a test is executed from its own binary > directory, ?ctest -VV?, it always pass. If the same test is executed from > the main binary directory, ?ctest -VV -R zamod?, it fails because PROGRAM2 > is executed before PROGRAM1 is finished. Attached are the screen outputs > for both runs. > > > > Thanks, > > Ted > > > > > > ================================================================ > > cd CTEST/zamod > > s1002807:zamod tesari$ ctest -VV > > UpdateCTestConfiguration from :/Users/tesari/build/gnu.dbg/ > CTEST/zamod/DartConfiguration.tcl > > UpdateCTestConfiguration from :/Users/tesari/build/gnu.dbg/ > CTEST/zamod/DartConfiguration.tcl > > Test project /Users/tesari/build/gnu.dbg/CTEST/zamod > > Constructing a list of tests > > Done constructing a list of tests > > Updating test list for fixtures > > Added 0 tests to meet fixture requirements > > Checking test dependency graph... > > Checking test dependency graph end > > test 1 > > Start 1: zamod_serial > > > > 1: Test command: /Applications/CMake.app/Contents/bin/cmake "-D" > "PRE_DELETE_OUTPUT_FILES:BOOL=true" "-D" "OUTPUT_FILES:STRING=*kdk*;*.exo;*.jpg;*.png;*.log;*~" > "-D" "PROGRAM1:STRING=/bin/sh;-c;cd /Users/tesari/build/gnu.dbg/CTEST/zamod > && /Users/tesari/build/gnu.dbg/bin/kodiak zamod" "-D" > "PROGRAM2:STRING=python;/Users/tesari/kodiak/trunk/ > benchmark/Scripts/assert_case.py;/Users/tesari/build/gnu. > dbg/CTEST/zamod/hskdk;/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk;0" > "-P" "run_and_assert.cmake" > > 1: Test timeout computed to be: 9.99988e+06 > > 1: -- Executing "/bin/sh;-c;cd /Users/tesari/build/gnu.dbg/CTEST/zamod > && /Users/tesari/build/gnu.dbg/bin/kodiak zamod" > > 1: -- Executing "python;/Users/tesari/kodiak/trunk/benchmark/Scripts/ > assert_case.py;/Users/tesari/build/gnu.dbg/CTEST/zamod/ > hskdk;/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk;0" > > 1: /Users/tesari/kodiak/trunk/benchmark/Scripts > > 1: Number of arguments: 4 arguments. > > 1: Argument List: ['/Users/tesari/kodiak/trunk/ > benchmark/Scripts/assert_case.py', '/Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk', > '/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk', '0'] > > 1: /Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py called > with 3 arguments: > > 1: 1 /Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk > > 1: 2 /Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk > > 1: 3 0 > > 1: zamod Q0.4 PASS > > 1: zamod Q0.5 PASS > > 1: Kodiak ctest: SUCCESS > > 1/1 Test #1: zamod_serial ..................... Passed 5.73 sec > > > > > > ================================================================ > > s1002807:gnu.dbg tesari$ ctest -VV -R zamod > > UpdateCTestConfiguration from :/Users/tesari/build/gnu.dbg/ > DartConfiguration.tcl > > Parse Config file:/Users/tesari/build/gnu.dbg/DartConfiguration.tcl > > UpdateCTestConfiguration from :/Users/tesari/build/gnu.dbg/ > DartConfiguration.tcl > > Parse Config file:/Users/tesari/build/gnu.dbg/DartConfiguration.tcl > > Test project /Users/tesari/build/gnu.dbg > > Constructing a list of tests > > Done constructing a list of tests > > Updating test list for fixtures > > Added 0 tests to meet fixture requirements > > Checking test dependency graph... > > Checking test dependency graph end > > test 113 > > Start 113: zamod_serial > > > > 113: Test command: /Applications/CMake.app/Contents/bin/cmake "-D" > "PRE_DELETE_OUTPUT_FILES:BOOL=true" "-D" "OUTPUT_FILES:STRING=*kdk*;*.exo;*.jpg;*.png;*.log;*~" > "-D" "PROGRAM1:STRING=/bin/sh;-c;cd /Users/tesari/build/gnu.dbg/CTEST/zamod > && /Users/tesari/build/gnu.dbg/bin/kodiak zamod" "-D" > "PROGRAM2:STRING=python;/Users/tesari/kodiak/trunk/ > benchmark/Scripts/assert_case.py;/Users/tesari/build/gnu. > dbg/CTEST/zamod/hskdk;/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk;0" > "-P" "run_and_assert.cmake" > > 113: Test timeout computed to be: 1500 > > 113: -- Executing "/bin/sh;-c;cd /Users/tesari/build/gnu.dbg/CTEST/zamod > && /Users/tesari/build/gnu.dbg/bin/kodiak zamod" > > 113: -- Executing "python;/Users/tesari/kodiak/trunk/benchmark/Scripts/ > assert_case.py;/Users/tesari/build/gnu.dbg/CTEST/zamod/ > hskdk;/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk;0" > > 113: /Users/tesari/kodiak/trunk/benchmark/Scripts > > 113: Number of arguments: 4 arguments. > > 113: Argument List: ['/Users/tesari/kodiak/trunk/ > benchmark/Scripts/assert_case.py', '/Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk', > '/Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk', '0'] > > 113: /Users/tesari/kodiak/trunk/benchmark/Scripts/assert_case.py called > with 3 arguments: > > 113: 1 /Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk > > 113: 2 /Users/tesari/kodiak/trunk/CTEST/zamod/../GOLD/zamod/hskdk > > 113: 3 0 > > 113: /Users/tesari/build/gnu.dbg/CTEST/zamod/hskdk does not exist! > > > > > > > > *From:* Eric Noulard [mailto:eric.noulard at gmail.com > ] > *Sent:* Wednesday, May 17, 2017 10:54 PM > *To:* T.Sariyski > *Cc:* CMake ML > *Subject:* Re: [CMake] CTest question > > > > We lack information on how your test are failing. If they all timeout then > may be you should setup a proper timeout for the test. The actual execution > speed of a test may depend on the load of your machine or the network > (depending on what the test are actually doing). > > This may be even more sensible if your test are run in parallel. Do you > run ctest with --parallel option? > > > > Do your tests depends on each other? If so did you setup test dependencies? > > > > Le 17 mai 2017 10:59 PM, "T.Sariyski" a ?crit : > > Hi, > > > > I wonder what is the reason that sometimes ctest ends with numerous > ?Failed? and ?Timeout?, which ?ctest ?rerun-failed? reports ?Passed?. At > times the number of these false failures is about one third. I guess that > the problem is in the way I set my tests, but I have no clue where to look, > or how to ?debug? the ctest run. > > Any advice is highly appreciated. > > > > Thanks, > > Ted > > > -- > > 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 > -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel.veselov at gmail.com Thu May 18 13:52:04 2017 From: pawel.veselov at gmail.com (Pawel Veselov) Date: Thu, 18 May 2017 10:52:04 -0700 Subject: [CMake] RPATH for external library In-Reply-To: <20170518081919.394107ff@posteo.de> References: <20170516102059.1a0f21de@posteo.de> <20170516210908.3e3381da@posteo.de> <20170517115449.778f940e@posteo.de> <20170518081919.394107ff@posteo.de> Message-ID: >> > If I understand things correctly, pkg-config does not return the >> > RPATH-arguments necessary to link with. IOW, if used in a GNU >> > Makefile you would also need to add these by yourself, right? So >> > your problem is not a cmake-problem. >> IMHO it's not fair to say - if it's not supported by GNUmake, it >> shouldn't be supported by CMake. > That was not my intention to say. But rather I thought that somewhere > this problem was already solved, as it is not a cmake-only-problem, but > a general build problem when using pkg-config on libraries which are not > in default search-pathes. Agree. >> In any case, the CMake documentation says that >> INSTALL_RPATH_USE_LINK_PATH "...will append directories in the linker >> search path and outside the project to the INSTALL_RPATH...", there >> is no statement that it only applies to linker search paths that were >> supplied in a certain way. > That applies only to libraries, not the linker-flags which have > been added behind the back of cmake's library-dependency mechanism. Right, so it's not all search paths. I would advocate for changing the documentation so it is clear. >> [skipped] > This skipped part was trying to point out a solution based on the -l > and -L arguments returned by pkg-config and some cmake parsing. It > wouldn't be beautiful, but it'll work. Agree. I just didn't have any other comment for that. From DLRdave at aol.com Thu May 18 14:22:55 2017 From: DLRdave at aol.com (David Cole) Date: Thu, 18 May 2017 14:22:55 -0400 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: Seems to me the simplest thing to do would be to have copy_dlls depend on nothing, and have package depend on copy_dlls and all the native targets, and then tell your developers to run: make individualTarget && make package Either that, or introduce a packageIndividualTarget target for each individualTarget. Maybe I just don't understand fully, but why would you ever "make individualTarget" and then expect package to work properly? What if stuff that depends on that individualTarget also needs to rebuild before packaging? Shouldn't you have to do a build all to guarantee that packaging the results works properly? On Thu, May 18, 2017 at 12:16 PM, Robert Dailey wrote: > So let me go over the problem I'm trying to solve, because it's > possible at this point I'm over-engineering it, but it's hard to fix. > > So my build process is for native shared library targets that > eventually get included in an APK for Android. I'm using the NDK > toolchain to build my native targets. The general flow from nothing to > complete APK is as follows: > > 1. Build all native library targets > 2. Copy native *.so outputs from the CMake build to `libs/armeabi-v7a` > in the android project directory (where the src, res, and other > android directories are located) > 3. Run custom commands that basically invoke 'ant release', and since > I positioned the *.so files under 'libs' they get packaged with the > APK itself. > > This is how I provide support for using CMake to build native, run > java build, and perform APK packaging. > > There's a lot of setup that happens in CMake in order to make sure the > 'ant release' command behaves as expected. I have to handle a few > corner cases: > > * Each new build of the custom target that runs the 'ant release' > command has to only contain the *.so files that were built during that > run > * Various third-party libraries (pre-compiled *.so files) have to also > be copied to libs/armeabi-v7a for only certain android projects, > because we do not want duplicated *.so files across multiple android > libraries (ant release will fail if there are duplicate *.so files > across android project dependencies) > > So given this, my complete pipeline is as follows: > > 1. A `android_clean_libs` custom target is run which iterates all > known native targets with mapped java projects and completely deletes > its 'libs' directory (this is a forced clean prior to building) > 2. A `copy_dlls` target runs next, which copies third party > (precompiled) *.so files to a single common java project, in its > 'libs/armeabi-v7a' directory. > 3. Each native target now builds in parallel, as a post-build event it > copies its output *.so file to its respective libs/armeabi-v7a > directory for packaging. > 4. A final 'package' custom target runs which runs 'ant release' on > the bottom-most android project (that is not a library target by > itself). > > The part I don't like here is step #1. I don't like the clean to > require keeping track of a global property of a list of directories to > remove. Ideally, #1 should run as a post-build event during step 3. > Basically each native target should delete its 'libs' directory prior > to copying its own *.so target to that directory. However, I can't do > this because of step #2. Step 2 must happen first, because it's the > only way I can guarantee that it will execute regardless of which > target I build (all, or specific target). I make `copy_dlls` a > dependency of every other target, so it always runs. If I could force > it to run *last*, then I could simplify step 1. > > Sorry if this is too much information or if I've not explained things > clearly, but I wanted to hash out the details because maybe there is a > better approach. I'm willing to start from scratch on this if it > improves the design of the targets. > > Thanks again!! > > > On Thu, May 18, 2017 at 10:51 AM, David Cole wrote: >> I'm sorry, I misunderstood that you wanted it to run last regardless >> of what target you are building. I was assuming you wanted it to >> happen when you build the "all" target. I didn't think you wanted to >> run it after any other *individual* target which you might specify. >> >> I don't know of an easy way to do that. You could add a custom command >> as a post-build command on every single target, but that seems like it >> wouldn't work for you either, as it would run the command potentially >> multiple times, with no way to tell whether you're being called last >> or not. >> >> Sorry. >> >> Why does this need to run after the build of any individual target? >> Why not just say there are two ways to get it to run: build "all" or >> explicitly build it after you build the other individual thing you >> want? >> >> >> >> >> On Thu, May 18, 2017 at 10:24 AM, Robert Dailey >> wrote: >>> David, >>> >>> Thanks for your help. So if I do it as you suggest, this will also >>> require I specify `ALL` to add_custom_target(), correct? If I do it >>> this way, will it still run even if it isn't a dependency of the >>> target I'm building? >>> >>> Let me set up a simple scenario for my own understanding. Suppose I >>> have the following targets: >>> >>> * A (add_library target) >>> * B (add_library target) >>> * C (add_custom_target target) >>> >>> Dependencies: >>> >>> B depends on A >>> C depends on B and A >>> >>> Normally if I build B, only A and B will build. However, if C was set >>> up using `ALL`, will it build C when I build B? So the expected build >>> order in this case would be: >>> >>> 1. A >>> 2. B >>> 3. C >>> >>> Thanks in advance. >>> >>> On Wed, May 17, 2017 at 4:26 PM, David Cole wrote: >>>> The way I know how to do this is to add it last at the bottom of the >>>> top-level CMakeLists.txt file, and then use add_dependencies to make >>>> it depend on all other targets. (Or at least all other "leaf" targets, >>>> which further depend on others, ... the sum of which is "all other >>>> targets" besides the new "last" target.) >>>> >>>> So it's not pretty, but it's possible. >>>> >>>> >>>> HTH, >>>> David C. >>>> >>>> >>>> >>>> On Wed, May 17, 2017 at 11:36 AM, Robert Dailey >>>> wrote: >>>>> I have a custom target that must meet the following requirements: >>>>> >>>>> * It must always run, regardless of what subset of other targets are being built >>>>> * It must always be the very last thing run. In parallelized builds, >>>>> it must wait until all other targets are done building before >>>>> starting, so that it is the very last target run, and should not run >>>>> in parallel with others. >>>>> >>>>> Is this possible? I'm willing to use hackery if needed... >>>>> >>>>> Running CMake 3.8.0. Thanks! >>>>> -- >>>>> >>>>> 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 rcdailey.lists at gmail.com Thu May 18 15:42:29 2017 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Thu, 18 May 2017 14:42:29 -0500 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: To be clear, I do have a "package" target per real native target. However, if I set up the dependencies like so: Target 'A' depends on 'copy_dlls' Target 'A' depends on target 'B' Target 'A_package' depends on 'A' Target 'A_package' depends on 'copy_dlls' Furthermore, the add_custom_command() to delete 'libs' and copy the *.so is added to 'A' and 'B' (each for their own 'libs' directory and their own *.so output) Then when I do: $ ninja A_package The following items are built in any order (due to parallel builds): * B * A (after B) * copy_dlls If 'copy_dlls' happens while 'B' is building, then it's possible the post-build event run by B that deletes the 'libs' directory also deletes some files copied by 'copy_dlls', which means those files will not get packaged when 'A_package' invokes `ant release` for the APK packaging. I hope that makes the issue a little clearer... sorry for the confusion. On Thu, May 18, 2017 at 1:22 PM, David Cole wrote: > Seems to me the simplest thing to do would be to have copy_dlls depend > on nothing, and have package depend on copy_dlls and all the native > targets, and then tell your developers to run: > > make individualTarget && make package > > Either that, or introduce a packageIndividualTarget target for each > individualTarget. > > Maybe I just don't understand fully, but why would you ever "make > individualTarget" and then expect package to work properly? What if > stuff that depends on that individualTarget also needs to rebuild > before packaging? Shouldn't you have to do a build all to guarantee > that packaging the results works properly? > > > > > > > On Thu, May 18, 2017 at 12:16 PM, Robert Dailey > wrote: >> So let me go over the problem I'm trying to solve, because it's >> possible at this point I'm over-engineering it, but it's hard to fix. >> >> So my build process is for native shared library targets that >> eventually get included in an APK for Android. I'm using the NDK >> toolchain to build my native targets. The general flow from nothing to >> complete APK is as follows: >> >> 1. Build all native library targets >> 2. Copy native *.so outputs from the CMake build to `libs/armeabi-v7a` >> in the android project directory (where the src, res, and other >> android directories are located) >> 3. Run custom commands that basically invoke 'ant release', and since >> I positioned the *.so files under 'libs' they get packaged with the >> APK itself. >> >> This is how I provide support for using CMake to build native, run >> java build, and perform APK packaging. >> >> There's a lot of setup that happens in CMake in order to make sure the >> 'ant release' command behaves as expected. I have to handle a few >> corner cases: >> >> * Each new build of the custom target that runs the 'ant release' >> command has to only contain the *.so files that were built during that >> run >> * Various third-party libraries (pre-compiled *.so files) have to also >> be copied to libs/armeabi-v7a for only certain android projects, >> because we do not want duplicated *.so files across multiple android >> libraries (ant release will fail if there are duplicate *.so files >> across android project dependencies) >> >> So given this, my complete pipeline is as follows: >> >> 1. A `android_clean_libs` custom target is run which iterates all >> known native targets with mapped java projects and completely deletes >> its 'libs' directory (this is a forced clean prior to building) >> 2. A `copy_dlls` target runs next, which copies third party >> (precompiled) *.so files to a single common java project, in its >> 'libs/armeabi-v7a' directory. >> 3. Each native target now builds in parallel, as a post-build event it >> copies its output *.so file to its respective libs/armeabi-v7a >> directory for packaging. >> 4. A final 'package' custom target runs which runs 'ant release' on >> the bottom-most android project (that is not a library target by >> itself). >> >> The part I don't like here is step #1. I don't like the clean to >> require keeping track of a global property of a list of directories to >> remove. Ideally, #1 should run as a post-build event during step 3. >> Basically each native target should delete its 'libs' directory prior >> to copying its own *.so target to that directory. However, I can't do >> this because of step #2. Step 2 must happen first, because it's the >> only way I can guarantee that it will execute regardless of which >> target I build (all, or specific target). I make `copy_dlls` a >> dependency of every other target, so it always runs. If I could force >> it to run *last*, then I could simplify step 1. >> >> Sorry if this is too much information or if I've not explained things >> clearly, but I wanted to hash out the details because maybe there is a >> better approach. I'm willing to start from scratch on this if it >> improves the design of the targets. >> >> Thanks again!! >> >> >> On Thu, May 18, 2017 at 10:51 AM, David Cole wrote: >>> I'm sorry, I misunderstood that you wanted it to run last regardless >>> of what target you are building. I was assuming you wanted it to >>> happen when you build the "all" target. I didn't think you wanted to >>> run it after any other *individual* target which you might specify. >>> >>> I don't know of an easy way to do that. You could add a custom command >>> as a post-build command on every single target, but that seems like it >>> wouldn't work for you either, as it would run the command potentially >>> multiple times, with no way to tell whether you're being called last >>> or not. >>> >>> Sorry. >>> >>> Why does this need to run after the build of any individual target? >>> Why not just say there are two ways to get it to run: build "all" or >>> explicitly build it after you build the other individual thing you >>> want? >>> >>> >>> >>> >>> On Thu, May 18, 2017 at 10:24 AM, Robert Dailey >>> wrote: >>>> David, >>>> >>>> Thanks for your help. So if I do it as you suggest, this will also >>>> require I specify `ALL` to add_custom_target(), correct? If I do it >>>> this way, will it still run even if it isn't a dependency of the >>>> target I'm building? >>>> >>>> Let me set up a simple scenario for my own understanding. Suppose I >>>> have the following targets: >>>> >>>> * A (add_library target) >>>> * B (add_library target) >>>> * C (add_custom_target target) >>>> >>>> Dependencies: >>>> >>>> B depends on A >>>> C depends on B and A >>>> >>>> Normally if I build B, only A and B will build. However, if C was set >>>> up using `ALL`, will it build C when I build B? So the expected build >>>> order in this case would be: >>>> >>>> 1. A >>>> 2. B >>>> 3. C >>>> >>>> Thanks in advance. >>>> >>>> On Wed, May 17, 2017 at 4:26 PM, David Cole wrote: >>>>> The way I know how to do this is to add it last at the bottom of the >>>>> top-level CMakeLists.txt file, and then use add_dependencies to make >>>>> it depend on all other targets. (Or at least all other "leaf" targets, >>>>> which further depend on others, ... the sum of which is "all other >>>>> targets" besides the new "last" target.) >>>>> >>>>> So it's not pretty, but it's possible. >>>>> >>>>> >>>>> HTH, >>>>> David C. >>>>> >>>>> >>>>> >>>>> On Wed, May 17, 2017 at 11:36 AM, Robert Dailey >>>>> wrote: >>>>>> I have a custom target that must meet the following requirements: >>>>>> >>>>>> * It must always run, regardless of what subset of other targets are being built >>>>>> * It must always be the very last thing run. In parallelized builds, >>>>>> it must wait until all other targets are done building before >>>>>> starting, so that it is the very last target run, and should not run >>>>>> in parallel with others. >>>>>> >>>>>> Is this possible? I'm willing to use hackery if needed... >>>>>> >>>>>> Running CMake 3.8.0. Thanks! >>>>>> -- >>>>>> >>>>>> 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 DLRdave at aol.com Thu May 18 16:11:26 2017 From: DLRdave at aol.com (David Cole) Date: Thu, 18 May 2017 16:11:26 -0400 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: Hopefully, somebody else doing something similar to what you're doing will chime in here. Seems overly complicated from an outsider's perspective. If what you say is true ...: "If 'copy_dlls' happens while 'B' is building, then it's possible the post-build event run by B that deletes the 'libs' directory also deletes some files copied by 'copy_dlls'" ...then copy_dlls depends on B, because if it runs before or while B is running, you have problems. So it has to run after. Seems like you have some untangling to do. On Thu, May 18, 2017 at 3:42 PM, Robert Dailey wrote: > To be clear, I do have a "package" target per real native target. > However, if I set up the dependencies like so: > > Target 'A' depends on 'copy_dlls' > Target 'A' depends on target 'B' > Target 'A_package' depends on 'A' > Target 'A_package' depends on 'copy_dlls' > > Furthermore, the add_custom_command() to delete 'libs' and copy the > *.so is added to 'A' and 'B' (each for their own 'libs' directory and > their own *.so output) > > Then when I do: > > $ ninja A_package > > The following items are built in any order (due to parallel builds): > > * B > * A (after B) > * copy_dlls > > If 'copy_dlls' happens while 'B' is building, then it's possible the > post-build event run by B that deletes the 'libs' directory also > deletes some files copied by 'copy_dlls', which means those files will > not get packaged when 'A_package' invokes `ant release` for the APK > packaging. > > I hope that makes the issue a little clearer... sorry for the confusion. > > On Thu, May 18, 2017 at 1:22 PM, David Cole wrote: >> Seems to me the simplest thing to do would be to have copy_dlls depend >> on nothing, and have package depend on copy_dlls and all the native >> targets, and then tell your developers to run: >> >> make individualTarget && make package >> >> Either that, or introduce a packageIndividualTarget target for each >> individualTarget. >> >> Maybe I just don't understand fully, but why would you ever "make >> individualTarget" and then expect package to work properly? What if >> stuff that depends on that individualTarget also needs to rebuild >> before packaging? Shouldn't you have to do a build all to guarantee >> that packaging the results works properly? >> >> >> >> >> >> >> On Thu, May 18, 2017 at 12:16 PM, Robert Dailey >> wrote: >>> So let me go over the problem I'm trying to solve, because it's >>> possible at this point I'm over-engineering it, but it's hard to fix. >>> >>> So my build process is for native shared library targets that >>> eventually get included in an APK for Android. I'm using the NDK >>> toolchain to build my native targets. The general flow from nothing to >>> complete APK is as follows: >>> >>> 1. Build all native library targets >>> 2. Copy native *.so outputs from the CMake build to `libs/armeabi-v7a` >>> in the android project directory (where the src, res, and other >>> android directories are located) >>> 3. Run custom commands that basically invoke 'ant release', and since >>> I positioned the *.so files under 'libs' they get packaged with the >>> APK itself. >>> >>> This is how I provide support for using CMake to build native, run >>> java build, and perform APK packaging. >>> >>> There's a lot of setup that happens in CMake in order to make sure the >>> 'ant release' command behaves as expected. I have to handle a few >>> corner cases: >>> >>> * Each new build of the custom target that runs the 'ant release' >>> command has to only contain the *.so files that were built during that >>> run >>> * Various third-party libraries (pre-compiled *.so files) have to also >>> be copied to libs/armeabi-v7a for only certain android projects, >>> because we do not want duplicated *.so files across multiple android >>> libraries (ant release will fail if there are duplicate *.so files >>> across android project dependencies) >>> >>> So given this, my complete pipeline is as follows: >>> >>> 1. A `android_clean_libs` custom target is run which iterates all >>> known native targets with mapped java projects and completely deletes >>> its 'libs' directory (this is a forced clean prior to building) >>> 2. A `copy_dlls` target runs next, which copies third party >>> (precompiled) *.so files to a single common java project, in its >>> 'libs/armeabi-v7a' directory. >>> 3. Each native target now builds in parallel, as a post-build event it >>> copies its output *.so file to its respective libs/armeabi-v7a >>> directory for packaging. >>> 4. A final 'package' custom target runs which runs 'ant release' on >>> the bottom-most android project (that is not a library target by >>> itself). >>> >>> The part I don't like here is step #1. I don't like the clean to >>> require keeping track of a global property of a list of directories to >>> remove. Ideally, #1 should run as a post-build event during step 3. >>> Basically each native target should delete its 'libs' directory prior >>> to copying its own *.so target to that directory. However, I can't do >>> this because of step #2. Step 2 must happen first, because it's the >>> only way I can guarantee that it will execute regardless of which >>> target I build (all, or specific target). I make `copy_dlls` a >>> dependency of every other target, so it always runs. If I could force >>> it to run *last*, then I could simplify step 1. >>> >>> Sorry if this is too much information or if I've not explained things >>> clearly, but I wanted to hash out the details because maybe there is a >>> better approach. I'm willing to start from scratch on this if it >>> improves the design of the targets. >>> >>> Thanks again!! >>> >>> >>> On Thu, May 18, 2017 at 10:51 AM, David Cole wrote: >>>> I'm sorry, I misunderstood that you wanted it to run last regardless >>>> of what target you are building. I was assuming you wanted it to >>>> happen when you build the "all" target. I didn't think you wanted to >>>> run it after any other *individual* target which you might specify. >>>> >>>> I don't know of an easy way to do that. You could add a custom command >>>> as a post-build command on every single target, but that seems like it >>>> wouldn't work for you either, as it would run the command potentially >>>> multiple times, with no way to tell whether you're being called last >>>> or not. >>>> >>>> Sorry. >>>> >>>> Why does this need to run after the build of any individual target? >>>> Why not just say there are two ways to get it to run: build "all" or >>>> explicitly build it after you build the other individual thing you >>>> want? >>>> >>>> >>>> >>>> >>>> On Thu, May 18, 2017 at 10:24 AM, Robert Dailey >>>> wrote: >>>>> David, >>>>> >>>>> Thanks for your help. So if I do it as you suggest, this will also >>>>> require I specify `ALL` to add_custom_target(), correct? If I do it >>>>> this way, will it still run even if it isn't a dependency of the >>>>> target I'm building? >>>>> >>>>> Let me set up a simple scenario for my own understanding. Suppose I >>>>> have the following targets: >>>>> >>>>> * A (add_library target) >>>>> * B (add_library target) >>>>> * C (add_custom_target target) >>>>> >>>>> Dependencies: >>>>> >>>>> B depends on A >>>>> C depends on B and A >>>>> >>>>> Normally if I build B, only A and B will build. However, if C was set >>>>> up using `ALL`, will it build C when I build B? So the expected build >>>>> order in this case would be: >>>>> >>>>> 1. A >>>>> 2. B >>>>> 3. C >>>>> >>>>> Thanks in advance. >>>>> >>>>> On Wed, May 17, 2017 at 4:26 PM, David Cole wrote: >>>>>> The way I know how to do this is to add it last at the bottom of the >>>>>> top-level CMakeLists.txt file, and then use add_dependencies to make >>>>>> it depend on all other targets. (Or at least all other "leaf" targets, >>>>>> which further depend on others, ... the sum of which is "all other >>>>>> targets" besides the new "last" target.) >>>>>> >>>>>> So it's not pretty, but it's possible. >>>>>> >>>>>> >>>>>> HTH, >>>>>> David C. >>>>>> >>>>>> >>>>>> >>>>>> On Wed, May 17, 2017 at 11:36 AM, Robert Dailey >>>>>> wrote: >>>>>>> I have a custom target that must meet the following requirements: >>>>>>> >>>>>>> * It must always run, regardless of what subset of other targets are being built >>>>>>> * It must always be the very last thing run. In parallelized builds, >>>>>>> it must wait until all other targets are done building before >>>>>>> starting, so that it is the very last target run, and should not run >>>>>>> in parallel with others. >>>>>>> >>>>>>> Is this possible? I'm willing to use hackery if needed... >>>>>>> >>>>>>> Running CMake 3.8.0. Thanks! >>>>>>> -- >>>>>>> >>>>>>> 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 patrick.boettcher at posteo.de Thu May 18 17:07:49 2017 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Thu, 18 May 2017 23:07:49 +0200 Subject: [CMake] Force target to always run last? In-Reply-To: References: Message-ID: <20170518230749.5bd335ce@posteo.de> Now that you described in more detail what you're trying to do I realized that I had a similar problem to solve. It's about generating packages for an arm-based linux-build (Yocto-based). I decided against integrating my build into the Yocto-build and instead I'm using cmake to cross-compile the executables and libraries (C and C++). Packaging is done with an IPK-file via a script launched by cmake as the last step of the build process. For each library and executable which belongs to a future ipk-package I'm adding an install()-command which will, when the install-target is run, place the files into a directory inside the build dir. This directory is a dedicated one for the package: For example: top-level: set(PACKAGE_DIR ${CMAKE_BINARY_DIR}/common-exe-package) Somewhere in the hierarchy of the project's CMakeLists.txt add_library(common src.cpp [..]) install(TARGETS common DESTINATION ${PACKAGE_DIR}/usr/lib) and again somewhere else add_executable(exe exe.cpp) target_link_libraries(exe PRIVATE common) install(TARGETS exe DESTINATION ${PACKAGE_DIR}/usr/bin) Then I create a custom_target to create the package: add_custom_target( ipk-common-exe COMMAND [..] # commands to finalize the ipk-tree and # tar xfz ... to make the ipk-files COMMENT "creating common-exe IPK" WORKING_DIRECTORY ${PACKAGE_DIR} ) # add dependencies to a install-and-strip-target add_dependencies(ipk-common-exe install-and-strip) The "install-and-strip"-target is defined at the top-level add_custom_target( install-and-strip COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target install/strip) the built-in install/strip-target has a dependency to all targets use with install(TARGET ...) I'm using ninja and make -jX, both work in parallel. I'm build several packages in one cmake-build. Works like a charm. An additional bonus is that the install-target also removed RPATHs from executables. HTH, -- Patrick. On Thu, 18 May 2017 11:16:47 -0500 Robert Dailey wrote: > So let me go over the problem I'm trying to solve, because it's > possible at this point I'm over-engineering it, but it's hard to fix. > > So my build process is for native shared library targets that > eventually get included in an APK for Android. I'm using the NDK > toolchain to build my native targets. The general flow from nothing to > complete APK is as follows: > > 1. Build all native library targets > 2. Copy native *.so outputs from the CMake build to `libs/armeabi-v7a` > in the android project directory (where the src, res, and other > android directories are located) > 3. Run custom commands that basically invoke 'ant release', and since > I positioned the *.so files under 'libs' they get packaged with the > APK itself. > > This is how I provide support for using CMake to build native, run > java build, and perform APK packaging. > > There's a lot of setup that happens in CMake in order to make sure the > 'ant release' command behaves as expected. I have to handle a few > corner cases: > > * Each new build of the custom target that runs the 'ant release' > command has to only contain the *.so files that were built during that > run > * Various third-party libraries (pre-compiled *.so files) have to also > be copied to libs/armeabi-v7a for only certain android projects, > because we do not want duplicated *.so files across multiple android > libraries (ant release will fail if there are duplicate *.so files > across android project dependencies) > > So given this, my complete pipeline is as follows: > > 1. A `android_clean_libs` custom target is run which iterates all > known native targets with mapped java projects and completely deletes > its 'libs' directory (this is a forced clean prior to building) > 2. A `copy_dlls` target runs next, which copies third party > (precompiled) *.so files to a single common java project, in its > 'libs/armeabi-v7a' directory. > 3. Each native target now builds in parallel, as a post-build event it > copies its output *.so file to its respective libs/armeabi-v7a > directory for packaging. > 4. A final 'package' custom target runs which runs 'ant release' on > the bottom-most android project (that is not a library target by > itself). > > The part I don't like here is step #1. I don't like the clean to > require keeping track of a global property of a list of directories to > remove. Ideally, #1 should run as a post-build event during step 3. > Basically each native target should delete its 'libs' directory prior > to copying its own *.so target to that directory. However, I can't do > this because of step #2. Step 2 must happen first, because it's the > only way I can guarantee that it will execute regardless of which > target I build (all, or specific target). I make `copy_dlls` a > dependency of every other target, so it always runs. If I could force > it to run *last*, then I could simplify step 1. > > Sorry if this is too much information or if I've not explained things > clearly, but I wanted to hash out the details because maybe there is a > better approach. I'm willing to start from scratch on this if it > improves the design of the targets. > > Thanks again!! > > > On Thu, May 18, 2017 at 10:51 AM, David Cole wrote: > > I'm sorry, I misunderstood that you wanted it to run last regardless > > of what target you are building. I was assuming you wanted it to > > happen when you build the "all" target. I didn't think you wanted to > > run it after any other *individual* target which you might specify. > > > > I don't know of an easy way to do that. You could add a custom > > command as a post-build command on every single target, but that > > seems like it wouldn't work for you either, as it would run the > > command potentially multiple times, with no way to tell whether > > you're being called last or not. > > > > Sorry. > > > > Why does this need to run after the build of any individual target? > > Why not just say there are two ways to get it to run: build "all" or > > explicitly build it after you build the other individual thing you > > want? > > > > > > > > > > On Thu, May 18, 2017 at 10:24 AM, Robert Dailey > > wrote: > >> David, > >> > >> Thanks for your help. So if I do it as you suggest, this will also > >> require I specify `ALL` to add_custom_target(), correct? If I do it > >> this way, will it still run even if it isn't a dependency of the > >> target I'm building? > >> > >> Let me set up a simple scenario for my own understanding. Suppose I > >> have the following targets: > >> > >> * A (add_library target) > >> * B (add_library target) > >> * C (add_custom_target target) > >> > >> Dependencies: > >> > >> B depends on A > >> C depends on B and A > >> > >> Normally if I build B, only A and B will build. However, if C was > >> set up using `ALL`, will it build C when I build B? So the > >> expected build order in this case would be: > >> > >> 1. A > >> 2. B > >> 3. C > >> > >> Thanks in advance. > >> > >> On Wed, May 17, 2017 at 4:26 PM, David Cole > >> wrote: > >>> The way I know how to do this is to add it last at the bottom of > >>> the top-level CMakeLists.txt file, and then use add_dependencies > >>> to make it depend on all other targets. (Or at least all other > >>> "leaf" targets, which further depend on others, ... the sum of > >>> which is "all other targets" besides the new "last" target.) > >>> > >>> So it's not pretty, but it's possible. > >>> > >>> > >>> HTH, > >>> David C. > >>> > >>> > >>> > >>> On Wed, May 17, 2017 at 11:36 AM, Robert Dailey > >>> wrote: > >>>> I have a custom target that must meet the following requirements: > >>>> > >>>> * It must always run, regardless of what subset of other targets > >>>> are being built > >>>> * It must always be the very last thing run. In parallelized > >>>> builds, it must wait until all other targets are done building > >>>> before starting, so that it is the very last target run, and > >>>> should not run in parallel with others. > >>>> > >>>> Is this possible? I'm willing to use hackery if needed... > >>>> > >>>> Running CMake 3.8.0. Thanks! > >>>> -- > >>>> > >>>> 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 aishwaryaselvaraj1708 at gmail.com Fri May 19 01:06:40 2017 From: aishwaryaselvaraj1708 at gmail.com (aishwarya selvaraj) Date: Fri, 19 May 2017 09:36:40 +0430 Subject: [CMake] cmake to download and compile fftw library Message-ID: Hi all, I have written the below cmakelist.txt . CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(PROSE) ################################################################ include(ExternalProject) MESSAGE(STATUS "Trying to install fftw...") ExternalProject_Add(project_fftw #GIT_REPOSITORY https://github.com/FFTW/fftw3 URL "http://www.fftw.org/fftw-3.3.2.tar.gz" PREFIX ${CMAKE_CURRENT_BINARY_DIR}/fftw CONFIGURE_COMMAND "" #--Build step----------------- BUILD_COMMAND "" #--Install step--------------- UPDATE_COMMAND "" # Skip annoying updates for every build INSTALL_COMMAND "" ) ADD_LIBRARY(fftw INTERFACE) TARGET_INCLUDE_DIRECTORIES(fftw INTERFACE "${install_dir}/src/project_fftw/api/") ?ADD_EXECUTABLE(prose ${PROJECT_SOURCE_DIR}/src/read.cpp) TARGET_LINK_LIBRARIES(prose fftw ) ? ?But when I run it in cygwin (windows) I get the following error: *Scanning dependencies of target prose* *[ 94%] Building CXX object CMakeFiles/prose.dir/src/read.cpp.o* */home/computing7/prose/src/read.cpp:17:19: fatal error: fftw3.h: No such file or directory* *compilation terminated.* *make[2]: *** [CMakeFiles/prose.dir/build.make:63: CMakeFiles/prose.dir/src/read. cpp.o] Error 1* *make[1]: *** [CMakeFiles/Makefile2:142: CMakeFiles/prose.dir/all] Error 2* *make: *** [Makefile:84: all] Error 2* ? ?Could anyone please tell me on how to solve this problem .? -- Regards, Aishwarya Selvaraj -------------- next part -------------- An HTML attachment was scrubbed... URL: From josp.jorge at gmail.com Fri May 19 07:57:22 2017 From: josp.jorge at gmail.com (Jorge Perez) Date: Fri, 19 May 2017 13:57:22 +0200 Subject: [CMake] cmake to download and compile fftw library In-Reply-To: References: Message-ID: Hi, here you have a working example for your requirement. Attached also a zip file to test. CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(PROSE) ################################################################ include(ExternalProject) MESSAGE(STATUS "Trying to install fftw...") ExternalProject_Add(project_fftw #GIT_REPOSITORY https://github.com/FFTW/fftw3 URL http://www.fftw.org/fftw-3.3.2.tar.gz PREFIX ${CMAKE_CURRENT_BINARY_DIR}/fftw CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fftw/src/project_fftw/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/fftw/install INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/fftw/install ) add_library(fftw STATIC IMPORTED) set(lib_fftw_name ${CMAKE_STATIC_LIBRARY_PREFIX}fftw3${CMAKE_STATIC_LIBRARY_SUFFIX}) set_target_properties(fftw PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/fftw/install/lib/${lib_fftw_name}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/fftw/install/include) add_executable(prose src/read.cpp) add_dependencies(prose project_fftw) TARGET_LINK_LIBRARIES(prose fftw) HTH Jorge 2017-05-19 7:06 GMT+02:00 aishwarya selvaraj < aishwaryaselvaraj1708 at gmail.com>: > Hi all, > I have written the below cmakelist.txt . > > > > CMAKE_MINIMUM_REQUIRED(VERSION 2.8) > PROJECT(PROSE) > ################################################################ > > include(ExternalProject) > MESSAGE(STATUS "Trying to install fftw...") > > ExternalProject_Add(project_fftw > #GIT_REPOSITORY https://github.com/FFTW/fftw3 > URL "http://www.fftw.org/fftw-3.3.2.tar.gz" > PREFIX ${CMAKE_CURRENT_BINARY_DIR}/fftw > CONFIGURE_COMMAND "" > #--Build step----------------- > BUILD_COMMAND "" > #--Install step--------------- > UPDATE_COMMAND "" # Skip annoying updates for every build > INSTALL_COMMAND "" > ) > > ADD_LIBRARY(fftw INTERFACE) > > > TARGET_INCLUDE_DIRECTORIES(fftw INTERFACE "${install_dir}/src/project_fftw/api/") > > > ?ADD_EXECUTABLE(prose ${PROJECT_SOURCE_DIR}/src/read.cpp) > TARGET_LINK_LIBRARIES(prose fftw ) > ? > > > ?But when I run it in cygwin (windows) I get the following error: > *Scanning dependencies of target prose* > *[ 94%] Building CXX object CMakeFiles/prose.dir/src/read.cpp.o* > */home/computing7/prose/src/read.cpp:17:19: fatal error: fftw3.h: No such > file or directory* > *compilation terminated.* > *make[2]: *** [CMakeFiles/prose.dir/build.make:63: > CMakeFiles/prose.dir/src/read. > cpp.o] Error 1* > *make[1]: *** [CMakeFiles/Makefile2:142: CMakeFiles/prose.dir/all] Error 2* > *make: *** [Makefile:84: all] Error 2* > ? > ?Could anyone please tell me on how to solve this problem .? > > -- > Regards, > Aishwarya Selvaraj > > -- > > 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: fftw_imported.zip Type: application/zip Size: 1274 bytes Desc: not available URL: From urs at isnogud.escape.de Fri May 19 16:00:21 2017 From: urs at isnogud.escape.de (Urs Thuermann) Date: 19 May 2017 22:00:21 +0200 Subject: [CMake] Generating include files Message-ID: How can I write a CMakeFile that will include a generated source file into another C source? I have read the FAQ, searched the mailing list archives and have tried for two hours without success. With standard make this would be quite simple: $ cat Makefile foo: foo.o foo.o: tab.c tab.c: awk -f mktab > $@ $ cat foo.c #include "tab.c" int main() { return tab[0]; } $ cat mktab #!/usr/bin/awk BEGIN{ print "static int tab[] = { 0, 1, 2 };"; exit } $ make awk -f mktab > tab.c cc -c -o foo.o foo.c cc foo.o -o foo $ How would I do this with cmake? urs From mellery451 at gmail.com Fri May 19 16:36:33 2017 From: mellery451 at gmail.com (Michael Ellery) Date: Fri, 19 May 2017 13:36:33 -0700 Subject: [CMake] Generating include files In-Reply-To: References: Message-ID: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> > On May 19, 2017, at 1:00 PM, Urs Thuermann wrote: > > How can I write a CMakeFile that will include a generated source file > into another C source? I have read the FAQ, searched the mailing list > archives and have tried for two hours without success. > > With standard make this would be quite simple: > > $ cat Makefile > foo: foo.o > > foo.o: tab.c > > tab.c: > awk -f mktab > $@ > $ cat foo.c > #include "tab.c" > > int main() { return tab[0]; } > $ cat mktab > #!/usr/bin/awk > > BEGIN{ print "static int tab[] = { 0, 1, 2 };"; exit } > $ make > awk -f mktab > tab.c > cc -c -o foo.o foo.c > cc foo.o -o foo > $ > > How would I do this with cmake? > > urs > ? > if your source can be generated by simple substitution of variable values (like a template file), then configure_file() will do the trick. If the process to create the file is more complex, then add_custom_command() with an appropriate OUTPUT specification is probably what you want, something like: add_custom_command(OUTPUT tab.c COMMAND "awk -f mktab > tab.c") If you don?t like where the files are generated, you can tweak WORKING_DIR and/or use full-paths to the file(s). You will need to make sure that some other target explicitly depends on tab.c (or whatever you name the output) to cause this custom rule to be executed. -Mike From urs at isnogud.escape.de Fri May 19 17:00:33 2017 From: urs at isnogud.escape.de (Urs Thuermann) Date: 19 May 2017 23:00:33 +0200 Subject: [CMake] Generating include files In-Reply-To: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com>; from Michael Ellery on Fri, 19 May 2017 13:36:33 -0700 References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> Message-ID: Michael Ellery writes: > if your source can be generated by simple substitution of variable > values (like a template file), then configure_file() will do the > trick. If the process to create the file is more complex, then > add_custom_command() with an appropriate OUTPUT specification is > probably what you want, something like: Yes, the awk example was a simplification. The table to be generated is much larger using a somewhat more complex specification. I don't want to calculate at run-time in foo.c, but at compile-time so that it can go into a static const int array. > add_custom_command(OUTPUT tab.c COMMAND "awk -f mktab > tab.c") I have tried dozens of combinations with add_custom_command(), include_directories(), and ${CMAKE_BINARY_DIR}. Also the way you show. But the only way I found to have tab.c actually generated was to put tab.c into the add_executable() specification, but then it generates a tab.o which is linked into the executable. But I want to have the tab[] static, i.e. included into a C file, not linked in. > You will need to make sure that some other target explicitly depends > on tab.c (or whatever you name the output) to cause this custom rule > to be executed. Is there a way to specify that foo.o depends on tab.c? For some reason cmake's scan does not seem to find this. urs From mellery451 at gmail.com Fri May 19 17:13:36 2017 From: mellery451 at gmail.com (Michael Ellery) Date: Fri, 19 May 2017 14:13:36 -0700 Subject: [CMake] Generating include files In-Reply-To: References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> Message-ID: <7AAD04D8-B66E-422E-ABEE-2848B853BBC1@gmail.com> > On May 19, 2017, at 2:00 PM, Urs Thuermann wrote: > > Michael Ellery writes: > >> if your source can be generated by simple substitution of variable >> values (like a template file), then configure_file() will do the >> trick. If the process to create the file is more complex, then >> add_custom_command() with an appropriate OUTPUT specification is >> probably what you want, something like: > > Yes, the awk example was a simplification. The table to be generated > is much larger using a somewhat more complex specification. I don't > want to calculate at run-time in foo.c, but at compile-time so that it > can go into a static const int array. > >> add_custom_command(OUTPUT tab.c COMMAND "awk -f mktab > tab.c") > > I have tried dozens of combinations with add_custom_command(), > include_directories(), and ${CMAKE_BINARY_DIR}. Also the way you > show. But the only way I found to have tab.c actually generated was > to put tab.c into the add_executable() specification, but then it > generates a tab.o which is linked into the executable. But I want to > have the tab[] static, i.e. included into a C file, not linked in. > >> You will need to make sure that some other target explicitly depends >> on tab.c (or whatever you name the output) to cause this custom rule >> to be executed. > > Is there a way to specify that foo.o depends on tab.c? For some > reason cmake's scan does not seem to find this. > well, if you rename tab.c to tab.h, I?m pretty sure CMAKE will honor it as a dependency but won?t compile it..so that might be the easiest. Alternatively, use set_source_file_properties to set https://cmake.org/cmake/help/v3.8/prop_sf/OBJECT_DEPENDS.html#prop_sf:OBJECT_DEPENDS -Mike From craig.scott at crascit.com Fri May 19 17:24:56 2017 From: craig.scott at crascit.com (Craig Scott) Date: Sat, 20 May 2017 07:24:56 +1000 Subject: [CMake] Generating include files In-Reply-To: References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> Message-ID: A bit of a long-shot, have you tried generating the file with the extension .h instead of .c? That might allow it to be picked up by the dependency scanner (I don't know if it treats file extensions differently). Also, the add_custom_command(OUTPUT...) call needs to be in the same CMakeLists.txt file as the one where you create the target that pulls in foo.c or else the dependency relationship isn't created by CMake. I wrote an article on working with generated sources recently which covers some of these details, maybe it contains some useful info for you. On Sat, May 20, 2017 at 7:00 AM, Urs Thuermann wrote: > Michael Ellery writes: > > > if your source can be generated by simple substitution of variable > > values (like a template file), then configure_file() will do the > > trick. If the process to create the file is more complex, then > > add_custom_command() with an appropriate OUTPUT specification is > > probably what you want, something like: > > Yes, the awk example was a simplification. The table to be generated > is much larger using a somewhat more complex specification. I don't > want to calculate at run-time in foo.c, but at compile-time so that it > can go into a static const int array. > > > add_custom_command(OUTPUT tab.c COMMAND "awk -f mktab > tab.c") > > I have tried dozens of combinations with add_custom_command(), > include_directories(), and ${CMAKE_BINARY_DIR}. Also the way you > show. But the only way I found to have tab.c actually generated was > to put tab.c into the add_executable() specification, but then it > generates a tab.o which is linked into the executable. But I want to > have the tab[] static, i.e. included into a C file, not linked in. > > > You will need to make sure that some other target explicitly depends > > on tab.c (or whatever you name the output) to cause this custom rule > > to be executed. > > Is there a way to specify that foo.o depends on tab.c? For some > reason cmake's scan does not seem to find this. > > urs > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Fri May 19 17:52:28 2017 From: daviddoria at gmail.com (David Doria) Date: Fri, 19 May 2017 16:52:28 -0500 Subject: [CMake] Release build from bootstrap? Message-ID: When I run 'bootstrap' followed by 'make' on a cmake source tree, I get a debug build of the 'cmake' binary. If I have an existing CMake available, I can build cmake by setting CMAKE_BUILD_TYPE=Release and I end up with a release build of the new CMake. Is it possible to get a release build directly out of the bootstrap procedure? Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.scott at crascit.com Fri May 19 17:55:23 2017 From: craig.scott at crascit.com (Craig Scott) Date: Sat, 20 May 2017 07:55:23 +1000 Subject: [CMake] Release build from bootstrap? In-Reply-To: References: Message-ID: Yes you can pass extra CMake options on the bootstrap command line. Appending the following should do the trick: ../cmake/bootstrap -- -DCMAKE_BUILD_TYPE=Release You can get full help on the bootstrap options by giving it the --help option: ../cmake/bootstrap --help On Sat, May 20, 2017 at 7:52 AM, David Doria wrote: > When I run 'bootstrap' followed by 'make' on a cmake source tree, I get a > debug build of the 'cmake' binary. If I have an existing CMake available, I > can build cmake by setting CMAKE_BUILD_TYPE=Release and I end up with a > release build of the new CMake. Is it possible to get a release build > directly out of the bootstrap procedure? > > 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 > -- Craig Scott Melbourne, Australia https://crascit.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From urs at isnogud.escape.de Fri May 19 18:48:34 2017 From: urs at isnogud.escape.de (Urs Thuermann) Date: 20 May 2017 00:48:34 +0200 Subject: [CMake] Generating include files In-Reply-To: ; from Craig Scott on Sat, 20 May 2017 07:24:56 +1000 References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> Message-ID: Craig Scott writes: > A bit of a long-shot, have you tried generating the file with the extension > .h instead of .c? That might allow it to be picked up by the dependency > scanner (I don't know if it treats file extensions differently). Also, the > add_custom_command(OUTPUT...) call needs to be in the same > CMakeLists.txt No, I have tried that before in several variations, and nothing worked. For exmaple: $ cat simple/mktab #!/usr/bin/awk BEGIN{ print "static int tab[] = { 0, 1, 2 };"; exit } $ cat simple/foo.c #include "tab.h" int main() { return tab[0]; } $ cat simple/CMakeLists.txt cmake_minimum_required(VERSION 3.0) project(simple) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/tab.h COMMAND "mktab > ${CMAKE_BINARY_DIR}/tab.h" ) include_directories(${CMAKE_BINARY_DIR}) add_executable(foo foo.c) $ mkdir simple-build $ cd simple-build $ cmake ../simple -- The C compiler identification is GNU 4.9.2 -- The CXX compiler identification is GNU 4.9.2 -- 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 -- Configuring done -- Generating done -- Build files have been written to: /home/urs/playground/cmake/simple-build $ make Scanning dependencies of target foo [100%] Building C object CMakeFiles/foo.dir/foo.c.o /home/urs/playground/cmake/simple/foo.c:1:17: fatal error: tab.h: No such file or directory #include "tab.h" ^ compilation terminated. CMakeFiles/foo.dir/build.make:54: recipe for target 'CMakeFiles/foo.dir/foo.c.o' failed make[2]: *** [CMakeFiles/foo.dir/foo.c.o] Error 1 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/foo.dir/all' failed make[1]: *** [CMakeFiles/foo.dir/all] Error 2 Makefile:76: recipe for target 'all' failed make: *** [all] Error 2 $ make tab.h make: *** No rule to make target 'tab.h'. Stop. The call to make seems to show that cmake does not even try to generate tab.h and the next command shows that it also does not know how to generate it, if it would try. How does cmake scan for dependencies of target foo? Using gcc -MM would fail and gcc -MM -MG would yield the correct dependency: $ cc -MG ../simple/foo.c cc1: error: to generate dependencies you must specify either -M or -MM cc1: error: -MG may only be used with -M or -MM $ cc -MM -MG ../simple/foo.c foo.o: ../simple/foo.c tab.h > I wrote an article on working with generated sources > > recently which covers some of these details, maybe it contains some useful > info for you. Hm, it's the same info I've already found in other places. Unfortunately, I still don't see a way to generate a source file that should be #include'd instead of linked into an executable. urs From afuller at teradici.com Fri May 19 19:08:43 2017 From: afuller at teradici.com (Andrew Fuller) Date: Fri, 19 May 2017 23:08:43 +0000 Subject: [CMake] Generating include files In-Reply-To: References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com>, Message-ID: > Is there a way to specify that foo.o depends on tab.c? For some > reason cmake's scan does not seem to find this. Does the following work for you? The first bit is just putting some fixed files for convenience. The second bit is the interesting bit. In your build directory you won't have a data.c file until you compile. When it compiles, data.c will first be generated, placed in your build directory, then compiled into data.c.o and archived into libdata.a. Finally the executable links against libdata.a cmake_minimum_required( VERSION 3.0 ) # Files that exist before the build starts: # Header file with with no matching .c file file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/data.h "extern int somevalue;" ) # main() that references the header file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/hello.c " #include \"data.h\" #include int main() { printf( \"Magic data: %d\\n\", somevalue ); } " ) # This file is generated at build time and is relative to the binary dir add_custom_command( OUTPUT data.c COMMAND echo "int somevalue = 42; " > data.c VERBATIM ) add_library( data ${CMAKE_CURRENT_BINARY_DIR}/data.c ) add_executable( hello hello.c ) target_link_libraries( hello PRIVATE data ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mellery451 at gmail.com Fri May 19 19:10:25 2017 From: mellery451 at gmail.com (Michael Ellery) Date: Fri, 19 May 2017 16:10:25 -0700 Subject: [CMake] Generating include files In-Reply-To: References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> Message-ID: <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> > On May 19, 2017, at 3:48 PM, Urs Thuermann wrote: > > Craig Scott writes: > >> A bit of a long-shot, have you tried generating the file with the extension >> .h instead of .c? That might allow it to be picked up by the dependency >> scanner (I don't know if it treats file extensions differently). Also, the >> add_custom_command(OUTPUT...) call needs to be in the same >> CMakeLists.txt > > No, I have tried that before in several variations, and nothing > worked. > Here: https://github.com/mellery451/gen_header works for with me with makefile generator. -Mike From afuller at teradici.com Fri May 19 19:15:46 2017 From: afuller at teradici.com (Andrew Fuller) Date: Fri, 19 May 2017 23:15:46 +0000 Subject: [CMake] Generating include files In-Reply-To: References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> , Message-ID: > Hm, it's the same info I've already found in other places. > Unfortunately, I still don't see a way to generate a source file that > should be #include'd instead of linked into an executable. I missed that you wanted a .h file that other libraries would pick up. Since CMake isn't aware of which header files a library #includes, you're not getting that dependency information which I guess is what you're running into. I haven't needed to do it myself, but have you tried setting your generated header file in the SOURCES property of your library PUBLICly (or possibly INTERFACE). CMake knows the custom command that OUTPUTs a file, so when it tracks the file it should know the dependency to make it happen. By exporting the header it should convey the dependency to the consumer(s). -------------- next part -------------- An HTML attachment was scrubbed... URL: From mellery451 at gmail.com Fri May 19 20:03:15 2017 From: mellery451 at gmail.com (Michael Ellery) Date: Fri, 19 May 2017 17:03:15 -0700 Subject: [CMake] rpath linker args Message-ID: <9FE0551E-9658-40F3-9E6F-E299A2B9395D@gmail.com> I?m wondering if anyone knows the details of rpath linker args. In particular, I have two paths in my CMAKE_BUILD_RPATH. On macOS, I end-up with something like this: ?. -Wl,rpath=/path/number/one -Wl,rpath=/path/number/two ?. and on linux with the same CMakeLists.txt file, I get: ?. -Wl,rpath=/path/number/one:/path/number/two ? I can?t tell from man pages if that second form is even allowed or what the linker will do with it, but my observation is that the RPATH is indeed set for the macOS binary and it is NOT set for the linux binary. Thoughts/advice ? Anything else I can try to force the first format to be used on linux? Thanks, Mike Ellery From craig.scott at crascit.com Sat May 20 01:33:08 2017 From: craig.scott at crascit.com (Craig Scott) Date: Sat, 20 May 2017 15:33:08 +1000 Subject: [CMake] Generating include files In-Reply-To: <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> Message-ID: Okay you got me curious so I did some further digging and testing. Michael's example works because the generated header is listed as a source file in the add_executable() call. Therefore CMake automatically sets up the required dependency for you. If you don't want to do that, two other approaches also achieve your end goal. The wording of the OBJECT_DEPENDS source property documentation gives a clue for one method, although it's easy to miss (emphasis added by me): This property need not be used to specify the dependency of a source file on a generated header file that it includes. Although the property was originally introduced for this purpose, it is no longer necessary. If the generated header file is created by a custom command *in the same target as the source file*, the automatic dependency scanning process will recognize the dependency. If the generated header file is created *by another target*, an inter-target dependency should be created with the add_dependencies() command (if one does not already exist due to linking relationships). As far as I can tell, the only way to create a custom command in the same target and have that custom command execute before the source file compiles is to use a PRE_BUILD custom command, but these are only supported with the Visual Studio generator and therefore are not so useful. Instead, you can create another target with add_custom_target() which depends on the generated header and then use add_dependencies() to specify the executable target depends on the new custom target, something like this: cmake_minimum_required(VERSION 3.0) project(simple) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/tab.h COMMAND "mktab > ${CMAKE_BINARY_DIR}/tab.h" ) add_custom_target(gentab DEPENDS ${CMAKE_BINARY_DIR}/tab.h) include_directories(${CMAKE_BINARY_DIR}) add_executable(foo foo.c) add_dependencies(foo gentab) Another choice is to set the OBJECT_DEPENDS property on foo.c, even though the documentation for that source property says it shouldn't be needed. The OBJECT_DEPENDS property sets up a dependency between files rather than targets and can be used like this: cmake_minimum_required(VERSION 3.0) project(simple) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/tab.h COMMAND "mktab > ${CMAKE_BINARY_DIR}/tab.h" ) include_directories(${CMAKE_BINARY_DIR}) add_executable(foo foo.c) set_source_files_properties(foo.c PROPERTIES OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/tab.h) Either approach or Michael's would seem to achieve the goal of your original question. On Sat, May 20, 2017 at 9:10 AM, Michael Ellery wrote: > > > On May 19, 2017, at 3:48 PM, Urs Thuermann > wrote: > > > > Craig Scott writes: > > > >> A bit of a long-shot, have you tried generating the file with the > extension > >> .h instead of .c? That might allow it to be picked up by the dependency > >> scanner (I don't know if it treats file extensions differently). Also, > the > >> add_custom_command(OUTPUT...) call needs to be in the same > >> CMakeLists.txt > > > > No, I have tried that before in several variations, and nothing > > worked. > > > > > Here: > > https://github.com/mellery451/gen_header > > works for with me with makefile generator. > > -Mike > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From urs at isnogud.escape.de Sat May 20 04:46:53 2017 From: urs at isnogud.escape.de (Urs Thuermann) Date: 20 May 2017 10:46:53 +0200 Subject: [CMake] Generating include files In-Reply-To: <964136FA-732D-4621-B5F1-38A19E625325@gmail.com>; from Michael Ellery on Fri, 19 May 2017 16:10:25 -0700 References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> Message-ID: Michael Ellery writes: > https://github.com/mellery451/gen_header > > works for with me with makefile generator. Yes, that's similar to what I have found yesterday after my posting. It works but I'd prefer not to have to add the dependency to the add_executable() specification. I am new to cmake, but I still prefer standard make. I work in a project were I am supposed to use cmake, so I try to learn about it by doing little examples. But I find cmake makes simple things more complicated, it seems much bigger and more complex than make and provides less flexibility. I prefer simple tools with simple basic primitives that can be combined flexibly to build powerful systems. I dislike that I should add tab.h as dependency to the executable since it's actually the object file that depends on the header file. The executable then only depends on the object file. Say I have add_custom_command(output crctab.h command mkcrctab > crctab.h) add_executable(send send.c crc.c) add_executable(recv recv.c crc.c) add_executable(foo foo.c crc.c) and crc.c does #include "crctab.h". Would I then really have to add crctab.h to all add_executable() specifications? IMO the executables shouldn't have to "know" how crc.c is implemented. The just link crc.o. urs From urs at isnogud.escape.de Sat May 20 05:16:54 2017 From: urs at isnogud.escape.de (Urs Thuermann) Date: 20 May 2017 11:16:54 +0200 Subject: [CMake] Generating include files In-Reply-To: ; from Craig Scott on Sat, 20 May 2017 15:33:08 +1000 References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> Message-ID: Craig Scott writes: > This property need not be used to specify the dependency of a source file > on a generated header file that it includes. Although the property was > originally introduced for this purpose, it is no longer necessary. If the > generated header file is created by a custom command *in the same target as > the source file*, the automatic dependency scanning process will recognize > the dependency. If the generated header file is created *by another target*, > an inter-target dependency should be created with the add_dependencies() > command (if one does not already exist due to linking relationships). > cmake_minimum_required(VERSION 3.0) > project(simple) > > add_custom_command( > OUTPUT ${CMAKE_BINARY_DIR}/tab.h > COMMAND "mktab > ${CMAKE_BINARY_DIR}/tab.h" > ) > add_custom_target(gentab DEPENDS ${CMAKE_BINARY_DIR}/tab.h) > > include_directories(${CMAKE_BINARY_DIR}) > > add_executable(foo foo.c) > add_dependencies(foo gentab) I have to add that to executables that use foo.o, when only foo.o actually depends on tab.h? That looks cumbersome. > Another choice is to set the OBJECT_DEPENDS property on foo.c, even though > the documentation for that source property says it shouldn't be needed. The > OBJECT_DEPENDS property sets up a dependency between files rather than > targets and can be used like this: > > cmake_minimum_required(VERSION 3.0) > project(simple) > > add_custom_command( > OUTPUT ${CMAKE_BINARY_DIR}/tab.h > COMMAND "mktab > ${CMAKE_BINARY_DIR}/tab.h" > ) > > include_directories(${CMAKE_BINARY_DIR}) > > add_executable(foo foo.c) > set_source_files_properties(foo.c PROPERTIES OBJECT_DEPENDS > ${CMAKE_BINARY_DIR}/tab.h) IMO that feels just wrong. foo.c does NOT depend on tab.h, foo.c does not depend on anything, it's not even generated by the build system. *I* edit it. Instead, it is the object file foo.o that depends on tab.h. But it seems that cmake doesn't want the developer to see or talk about object files. It hides them somewhere in subdirs (with unpredictable names (sometimes foo.o, sometimes a silly name like foo.c.o, sometimes both), so after make foo.o I don't know which one is current), gives error messages if I use them in CMakeLists.txt... urs From craig.scott at crascit.com Sat May 20 05:25:05 2017 From: craig.scott at crascit.com (Craig Scott) Date: Sat, 20 May 2017 19:25:05 +1000 Subject: [CMake] Generating include files In-Reply-To: References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> Message-ID: On Sat, May 20, 2017 at 7:16 PM, Urs Thuermann wrote: > Craig Scott writes: > > > Another choice is to set the OBJECT_DEPENDS property on foo.c, even > though > > the documentation for that source property says it shouldn't be needed. > The > > OBJECT_DEPENDS property sets up a dependency between files rather than > > targets and can be used like this: > > > > cmake_minimum_required(VERSION 3.0) > > project(simple) > > > > add_custom_command( > > OUTPUT ${CMAKE_BINARY_DIR}/tab.h > > COMMAND "mktab > ${CMAKE_BINARY_DIR}/tab.h" > > ) > > > > include_directories(${CMAKE_BINARY_DIR}) > > > > add_executable(foo foo.c) > > set_source_files_properties(foo.c PROPERTIES OBJECT_DEPENDS > > ${CMAKE_BINARY_DIR}/tab.h) > > IMO that feels just wrong. foo.c does NOT depend on tab.h, foo.c does > not depend on anything, it's not even generated by the build system. > *I* edit it. Instead, it is the object file foo.o that depends on > tab.h. But it seems that cmake doesn't want the developer to see or > talk about object files. It hides them somewhere in subdirs (with > unpredictable names (sometimes foo.o, sometimes a silly name like > foo.c.o, sometimes both), so after make foo.o I don't know which one > is current), gives error messages if I use them in CMakeLists.txt... > OBJECT_DEPENDS expresses exactly that. It says "object files built from this source file depend on these things". That's why it's called OBJECT_DEPENDS instead of just DEPENDS like other dependency-related keywords. But I do agree with your general feeling that this is more complicated than it should ideally be. Intuitively, it feels like something CMake should be able to work out for itself, but perhaps there's some limitation in the implementation of one or more of the generator types which makes it hard. I'll leave that for those with a more intimate knowledge of CMake's internals to comment on. -- Craig Scott Melbourne, Australia https://crascit.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From post at hendrik-sattler.de Sat May 20 05:59:45 2017 From: post at hendrik-sattler.de (Hendrik Sattler) Date: Sat, 20 May 2017 11:59:45 +0200 Subject: [CMake] Generating include files In-Reply-To: References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> Message-ID: <1EA219DF-5DDB-41AD-80BF-F34943AD6B5D@hendrik-sattler.de> Am 20. Mai 2017 11:16:54 MESZ schrieb Urs Thuermann : >Craig Scott writes: >> add_executable(foo foo.c) >> set_source_files_properties(foo.c PROPERTIES OBJECT_DEPENDS >> ${CMAKE_BINARY_DIR}/tab.h) > >IMO that feels just wrong. foo.c does NOT depend on tab.h, foo.c does >not depend on anything, it's not even generated by the build system. >*I* edit it. Instead, it is the object file foo.o that depends on >tab.h. But it seems that cmake doesn't want the developer to see or >talk about object files. It hides them somewhere in subdirs (with >unpredictable names (sometimes foo.o, sometimes a silly name like >foo.c.o, sometimes both), so after make foo.o I don't know which one >is current), gives error messages if I use them in CMakeLists.txt... This is not quite correct. Either your code generates a header file to be included by foo.c, then foo.c depends on it. Or it creates data and methods that need to be linked, then the executable depends on it. An object file only makes the executable need unresolved symbols but that is not a dependency of the object file. Or you simply failed to explain how parts relate to each other and the dependency between the parts is totally different. OTOH, table-driven CRC is usually not that complicates to integrate. CMake handles lots of compilers that REQUIRE other object file extensions than .o. It also generates for more that only make, allowing better working with IDEs. These bring their own strange rules that you cannot match to any make logic. HS -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. From urs at isnogud.escape.de Sat May 20 07:32:56 2017 From: urs at isnogud.escape.de (Urs Thuermann) Date: 20 May 2017 13:32:56 +0200 Subject: [CMake] Generating include files In-Reply-To: <1EA219DF-5DDB-41AD-80BF-F34943AD6B5D@hendrik-sattler.de>; from Hendrik Sattler on Sat, 20 May 2017 11:59:45 +0200 References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> <1EA219DF-5DDB-41AD-80BF-F34943AD6B5D@hendrik-sattler.de> Message-ID: Hendrik Sattler writes: > >IMO that feels just wrong. foo.c does NOT depend on tab.h, foo.c does > >not depend on anything, it's not even generated by the build system. > >*I* edit it. Instead, it is the object file foo.o that depends on > >tab.h. > This is not quite correct. Obviously, we have different definitions of "depends on". My use of the term (and IMO that's the common meaning of "depends on" in build systems) means "is generated from". That is, when I say a depend on b, that means the a has to be recreated when b changes. As far as I have read (admittedly not very much yet) in the cmake doc and tutorial, that terminolgy is also use in cmake. For example as Craig writes, set_source_files_properties(foo.c PROPERTIES OBJECT_DEPENDS bar.h) means that the object generated from foo.c depends on bar.h, and not that foo.c depends on bar.h. > Either your code generates a header file to be included by foo.c, > then foo.c depends on it. Not with the usual use of "depends on". See above. > Or it creates data and methods that need to be linked, then the > executable depends on it. Yes, but not directly. The executable depends on the object file, and the object file depends on the (created) source file. Since "depends on" is transitive, the executable also depends on the source file. Still, I would prefer to write add_executable(foo foo.o) and have cmake determine that foo.o depends on foo.c like in make. > OTOH, table-driven CRC is usually not that complicates to integrate. Of course, it was just a simple experiment to how to deal with generated sources in cmake. Using set_source_files_properties() it looks quite OK: cmake_minimum_required(VERSION 3.0) project(simple) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/tab.c COMMAND awk -f ${CMAKE_SOURCE_DIR}/mktab > ${CMAKE_BINARY_DIR}/tab.c ) include_directories(${CMAKE_BINARY_DIR}) set_source_files_properties(crc.c PROPERTIES OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/tab.c) add_executable(foo foo.c crc.c) add_executable(bar bar.c crc.c) > CMake handles lots of compilers that REQUIRE other object file > extensions than .o. It also generates for more that only make, > allowing better working with IDEs. These bring their own strange > rules that you cannot match to any make logic. Maybe, I don't use fancy GUI IDEs. My IDE is Unix and have never found rules that cannot be matched with make and other simple Unix tools. urs -- GUIs normally make it simple to accomplish simple actions and impossible to accomplish complex actions. -- Doug Gwyn (22/Jun/91 in comp.unix.wizards) From florent.castelli at gmail.com Sat May 20 23:57:57 2017 From: florent.castelli at gmail.com (Florent Castelli) Date: Sun, 21 May 2017 05:57:57 +0200 Subject: [CMake] Generating include files In-Reply-To: References: <95384953-F52B-40C0-A5C8-D418B2458A10@gmail.com> <964136FA-732D-4621-B5F1-38A19E625325@gmail.com> <1EA219DF-5DDB-41AD-80BF-F34943AD6B5D@hendrik-sattler.de> Message-ID: <46ce9585-cfc7-b4b3-c59d-6ee79269d3aa@gmail.com> On 20/05/2017 13:32, Urs Thuermann wrote: > Yes, but not directly. The executable depends on the object file, and > the object file depends on the (created) source file. Since "depends > on" is transitive, the executable also depends on the source file. > > Still, I would prefer to write add_executable(foo foo.o) and have > cmake determine that foo.o depends on foo.c like in make. But "foo.o" is an intermediate file, an implementation detail that isn't cross-platform when CMake wants to work everywhere. You shouldn't try to express that, it is just wrong. The proper solution for CMake that works cross-platform is the one expressed before with another target that generates only the headers and your executable depending on it. You can't really have the header generated in the same target that is using them as that doesn't port well to some build systems that are more high level (aka not Make or Ninja). Files will sometimes fail to preprocess. Since your foo.c file can be preprocessed before the data has been generated and build tools can't extract the dependency information automatically as they usually do. That preprocessing step needs to always work for most build tool, if it doesn't they'll just fail the build and they won't check if it did fail because that's a file generated in the same target. Another solution is just not to have that weird requirement to compile it "static". From what I understand, you had it as a .c file and included it. So you know the object that is exported and its type. You could just decouple your files using an extern declaration, this way you can compile them both in parallel without an actual compile dependency from foo.c to tab.c, but instead use a link dependency. /Florent From elvis.stansvik at orexplore.com Wed May 24 09:23:25 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 24 May 2017 15:23:25 +0200 Subject: [CMake] Confusion with fixup_bundle(..) and RPATH on macOS Message-ID: Hi all, My application consists of an executable (orexplore-insight) and two shared libraries (libinsightview and libinsightmodel). In addition to that, I'm linking against Qt 5.8.0, VTK 8.0.0.rc1, HDF5 1.8.18 and Qwt 6.1.2. My goal is to make a self-contained .app bundle (and eventually a .dmg). This is what otool -L looks like on my executable, when installed: Kevins-MacBook-Pro:build insight$ otool -L ~/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight: @rpath/libinsightview.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/libinsightmodel.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/libhdf5.10.2.1.dylib (compatibility version 10.2.1, current version 1.8.18) @rpath/QtConcurrent.framework/Versions/5/QtConcurrent (compatibility version 5.8.0, current version 5.8.0) libvtkChartsCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkImagingStatistics-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkRenderingContextOpenGL2-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkRenderingQt-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkGUISupportQt-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.8.0, current version 5.8.0) @rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.8.0, current version 5.8.0) @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.8.0, current version 5.8.0) libvtkRenderingLabel-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkRenderingVolumeOpenGL2-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkRenderingOpenGL2-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 22.0.0) libvtkImagingMath-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkglew-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkViewsContext2D-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkRenderingContext2D-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkViewsCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkInteractionWidgets-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkInteractionStyle-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkRenderingAnnotation-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkRenderingFreeType-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkfreetype-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 775.19.0) libvtkRenderingVolume-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkRenderingCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkFiltersSources-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkFiltersGeneral-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkFiltersCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkImagingCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkCommonExecutionModel-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkCommonDataModel-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkCommonTransforms-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkCommonMisc-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkCommonMath-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkCommonCore-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtksys-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libvtkzlib-8.0.1.dylib (compatibility version 1.0.0, current version 1.0.0) libqwt.6.dylib (compatibility version 6.1.0, current version 6.1.2) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2) Kevins-MacBook-Pro:build insight$ So from this I can see that Qt and HDF5 install libraries with an "@rpath/..."-style install_name, while VTK and Qwt does not (they use a filename-only install_name). So far so good I suppose. If I understand correctly, to make my application work as a self-containing .app bundle in this scenario, I must: 1. Bundle all dependent frameworks/libraries inside the .app (of course) 2. Ensure my executable has an LC_RPATH pointing to @executable_path/.., @executable_path/../Frameworks et.c., which makes sure the bundled libraries with "@rpath/..."-style install_names are found correctly. 3. Ensure my app is started with DYLD_LIBRARY_PATH pointing to wherever I bundle the libraries that do not use "@rpath/..."-style install_name's, so that they are found as well. Does this sound about right? Now on to my current problem: I can make sure my installed executable has e.g. an @executable_path/../Frameworks LC_RPATH by setting the INSTALL_RPATH target property. I've verified with otool -l on the installed executable that this is working. E.g: Load command 59 cmd LC_RPATH cmdsize 48 path @executable_path/../Frameworks (offset 12) However, if I try to make the bundle self-containing with fixup_bundle(...) from BundleUtilities, using an install snippet like: fixup_bundle("${CMAKE_INSTALL_PREFIX}/orexplore-insight.app" "" "") (the above is from an install(SCRIPT ...) of mine), then I get warnings and errors during `make install`, such as: warning: cannot resolve item '@rpath/libhdf5.10.2.1.dylib' and warning: target '@rpath/libhdf5.10.2.1.dylib' is not absolute... and warning: target '@rpath/libhdf5.10.2.1.dylib' does not exist... and warning: unexpected reference to '@rpath/libhdf5.10.2.1.dylib' And none of the libraries have been copied into the bundle. Furthermore, and what surprises me, is that after this failed install, if I look at the installed executable again with otool -l, then it seems fixup_bundle has removed the LC_RPATH :( I'm attaching the full output from `make install`. You can ignore that the installed paths of my own libraries (libinsightview and libinsightmodel) are a bit wrong, I'll fix that and I'm focusing on the third party libs for now. My questions are: 1. Anyone know what is going wrong with the fixup_bundle(...) here? Why can't it bundle the libraries? I've tried adding the directories of the third party libraries to DYLD_LIBRARY_PATH during the `make install`, to help fixup_bundle(...) find them, but it didn't make any difference. 2. Why is fixup_bundle(...) stripping out the LC_RPATH I added by means of setting the INSTALL_RPATH target property? I want that LC_RPATH to be there, so that bundled libraries with @rpath are found. Many thanks in advance, A confused Elvis -------------- next part -------------- [ 2%] Automatic MOC, UIC and RCC for target insightview [ 2%] Built target insightview_autogen [ 4%] Automatic MOC for target insightmodel [ 4%] Built target insightmodel_autogen [ 31%] Built target insightmodel [ 86%] Built target insightview [ 91%] Built target orexplore-insight [ 93%] Automatic MOC for target TestHDF5File [ 93%] Built target TestHDF5File_autogen [100%] Built target TestHDF5File Install the project... -- Install configuration: "Release" -- Installing: /Users/insight/Insight/insight-inst/./orexplore-insight.app -- Installing: /Users/insight/Insight/insight-inst/./orexplore-insight.app/Contents -- Installing: /Users/insight/Insight/insight-inst/./orexplore-insight.app/Contents/Info.plist -- Installing: /Users/insight/Insight/insight-inst/./orexplore-insight.app/Contents/MacOS -- Installing: /Users/insight/Insight/insight-inst/./orexplore-insight.app/Contents/MacOS/orexplore-insight -- Installing: /Users/insight/Insight/insight-inst/./libinsightmodel.dylib -- Installing: /Users/insight/Insight/insight-inst/./libinsightview.dylib -- fixup_bundle -- app='/Users/insight/Insight/insight-inst/orexplore-insight.app' -- libs='' -- dirs='' -- ignoreItems='' -- fixup_bundle: preparing... -- warning: cannot resolve item '@rpath/libinsightview.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libinsightview.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/libinsightview.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/libinsightmodel.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libinsightmodel.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/libinsightmodel.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/libhdf5.10.2.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libhdf5.10.2.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/libhdf5.10.2.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkChartsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkChartsCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkChartsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkImagingStatistics-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingStatistics-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingStatistics-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingContextOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingContextOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingContextOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingQt-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkGUISupportQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkGUISupportQt-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkGUISupportQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/QtWidgets.framework/Versions/5/QtWidgets' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtWidgets.framework/Versions/5/QtWidgets' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtWidgets.framework/Versions/5/QtWidgets' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/QtGui.framework/Versions/5/QtGui' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtGui.framework/Versions/5/QtGui' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtGui.framework/Versions/5/QtGui' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/QtCore.framework/Versions/5/QtCore' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtCore.framework/Versions/5/QtCore' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtCore.framework/Versions/5/QtCore' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingLabel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingLabel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingLabel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkImagingMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingMath-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkglew-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkglew-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkglew-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkViewsContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkViewsContext2D-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkViewsContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingContext2D-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkViewsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkViewsCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkViewsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkInteractionWidgets-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkInteractionWidgets-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkInteractionWidgets-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkInteractionStyle-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkInteractionStyle-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkInteractionStyle-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingAnnotation-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingAnnotation-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingAnnotation-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingFreeType-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingFreeType-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingFreeType-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkfreetype-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkfreetype-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkfreetype-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingVolume-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingVolume-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingVolume-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkFiltersSources-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersSources-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersSources-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkFiltersGeneral-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersGeneral-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersGeneral-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkFiltersCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkImagingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonExecutionModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonExecutionModel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonExecutionModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonDataModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonDataModel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonDataModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonTransforms-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonTransforms-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonTransforms-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonMisc-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonMisc-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonMisc-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonMath-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtksys-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtksys-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtksys-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkzlib-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkzlib-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkzlib-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libqwt.6.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libqwt.6.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libqwt.6.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? warning: target '@rpath/libinsightview.dylib' is not absolute... warning: target '@rpath/libinsightview.dylib' does not exist... warning: target '@rpath/libinsightmodel.dylib' is not absolute... warning: target '@rpath/libinsightmodel.dylib' does not exist... warning: target '@rpath/libhdf5.10.2.1.dylib' is not absolute... warning: target '@rpath/libhdf5.10.2.1.dylib' does not exist... warning: target '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' is not absolute... warning: target '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' does not exist... warning: target 'libvtkChartsCore-8.0.1.dylib' is not absolute... warning: target 'libvtkChartsCore-8.0.1.dylib' does not exist... warning: target 'libvtkImagingStatistics-8.0.1.dylib' is not absolute... warning: target 'libvtkImagingStatistics-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingContextOpenGL2-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingContextOpenGL2-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingQt-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingQt-8.0.1.dylib' does not exist... warning: target 'libvtkGUISupportQt-8.0.1.dylib' is not absolute... warning: target 'libvtkGUISupportQt-8.0.1.dylib' does not exist... warning: target '@rpath/QtWidgets.framework/Versions/5/QtWidgets' is not absolute... warning: target '@rpath/QtWidgets.framework/Versions/5/QtWidgets' does not exist... warning: target '@rpath/QtGui.framework/Versions/5/QtGui' is not absolute... warning: target '@rpath/QtGui.framework/Versions/5/QtGui' does not exist... warning: target '@rpath/QtCore.framework/Versions/5/QtCore' is not absolute... warning: target '@rpath/QtCore.framework/Versions/5/QtCore' does not exist... warning: target 'libvtkRenderingLabel-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingLabel-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingOpenGL2-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingOpenGL2-8.0.1.dylib' does not exist... warning: target 'libvtkImagingMath-8.0.1.dylib' is not absolute... warning: target 'libvtkImagingMath-8.0.1.dylib' does not exist... warning: target 'libvtkglew-8.0.1.dylib' is not absolute... warning: target 'libvtkglew-8.0.1.dylib' does not exist... warning: target 'libvtkViewsContext2D-8.0.1.dylib' is not absolute... warning: target 'libvtkViewsContext2D-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingContext2D-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingContext2D-8.0.1.dylib' does not exist... warning: target 'libvtkViewsCore-8.0.1.dylib' is not absolute... warning: target 'libvtkViewsCore-8.0.1.dylib' does not exist... warning: target 'libvtkInteractionWidgets-8.0.1.dylib' is not absolute... warning: target 'libvtkInteractionWidgets-8.0.1.dylib' does not exist... warning: target 'libvtkInteractionStyle-8.0.1.dylib' is not absolute... warning: target 'libvtkInteractionStyle-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingAnnotation-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingAnnotation-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingFreeType-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingFreeType-8.0.1.dylib' does not exist... warning: target 'libvtkfreetype-8.0.1.dylib' is not absolute... warning: target 'libvtkfreetype-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingVolume-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingVolume-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingCore-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingCore-8.0.1.dylib' does not exist... warning: target 'libvtkFiltersSources-8.0.1.dylib' is not absolute... warning: target 'libvtkFiltersSources-8.0.1.dylib' does not exist... warning: target 'libvtkFiltersGeneral-8.0.1.dylib' is not absolute... warning: target 'libvtkFiltersGeneral-8.0.1.dylib' does not exist... warning: target 'libvtkFiltersCore-8.0.1.dylib' is not absolute... warning: target 'libvtkFiltersCore-8.0.1.dylib' does not exist... warning: target 'libvtkImagingCore-8.0.1.dylib' is not absolute... warning: target 'libvtkImagingCore-8.0.1.dylib' does not exist... warning: target 'libvtkCommonExecutionModel-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonExecutionModel-8.0.1.dylib' does not exist... warning: target 'libvtkCommonDataModel-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonDataModel-8.0.1.dylib' does not exist... warning: target 'libvtkCommonTransforms-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonTransforms-8.0.1.dylib' does not exist... warning: target 'libvtkCommonMisc-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonMisc-8.0.1.dylib' does not exist... warning: target 'libvtkCommonMath-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonMath-8.0.1.dylib' does not exist... warning: target 'libvtkCommonCore-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonCore-8.0.1.dylib' does not exist... warning: target 'libvtksys-8.0.1.dylib' is not absolute... warning: target 'libvtksys-8.0.1.dylib' does not exist... warning: target 'libvtkzlib-8.0.1.dylib' is not absolute... warning: target 'libvtkzlib-8.0.1.dylib' does not exist... warning: target 'libqwt.6.dylib' is not absolute... warning: target 'libqwt.6.dylib' does not exist... -- fixup_bundle: copying... -- 1/2: *NOT* copying '/Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight' -- fixup_bundle: fixing... -- 2/2: fixing up '/Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight' -- warning: cannot resolve item '@rpath/libinsightview.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libinsightview.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/libinsightmodel.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libinsightmodel.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/libhdf5.10.2.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libhdf5.10.2.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkChartsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkChartsCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingStatistics-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingStatistics-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingContextOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingContextOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingQt-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkGUISupportQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkGUISupportQt-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtWidgets.framework/Versions/5/QtWidgets' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtWidgets.framework/Versions/5/QtWidgets' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtGui.framework/Versions/5/QtGui' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtGui.framework/Versions/5/QtGui' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtCore.framework/Versions/5/QtCore' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtCore.framework/Versions/5/QtCore' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingLabel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingLabel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingMath-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkglew-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkglew-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkViewsContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkViewsContext2D-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingContext2D-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkViewsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkViewsCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkInteractionWidgets-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkInteractionWidgets-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkInteractionStyle-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkInteractionStyle-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingAnnotation-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingAnnotation-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingFreeType-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingFreeType-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkfreetype-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkfreetype-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingVolume-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingVolume-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersSources-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersSources-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersGeneral-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersGeneral-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonExecutionModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonExecutionModel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonDataModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonDataModel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonTransforms-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonTransforms-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonMisc-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonMisc-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonMath-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtksys-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtksys-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkzlib-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkzlib-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libqwt.6.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libqwt.6.dylib' returning type 'other' -- possibly incorrect warning: unexpected reference to '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' warning: unexpected reference to '@rpath/QtCore.framework/Versions/5/QtCore' warning: unexpected reference to '@rpath/QtGui.framework/Versions/5/QtGui' warning: unexpected reference to '@rpath/QtWidgets.framework/Versions/5/QtWidgets' warning: unexpected reference to '@rpath/libhdf5.10.2.1.dylib' warning: unexpected reference to '@rpath/libinsightmodel.dylib' warning: unexpected reference to '@rpath/libinsightview.dylib' warning: unexpected reference to 'libqwt.6.dylib' warning: unexpected reference to 'libvtkChartsCore-8.0.1.dylib' warning: unexpected reference to 'libvtkCommonCore-8.0.1.dylib' warning: unexpected reference to 'libvtkCommonDataModel-8.0.1.dylib' warning: unexpected reference to 'libvtkCommonExecutionModel-8.0.1.dylib' warning: unexpected reference to 'libvtkCommonMath-8.0.1.dylib' warning: unexpected reference to 'libvtkCommonMisc-8.0.1.dylib' warning: unexpected reference to 'libvtkCommonTransforms-8.0.1.dylib' warning: unexpected reference to 'libvtkFiltersCore-8.0.1.dylib' warning: unexpected reference to 'libvtkFiltersGeneral-8.0.1.dylib' warning: unexpected reference to 'libvtkFiltersSources-8.0.1.dylib' warning: unexpected reference to 'libvtkGUISupportQt-8.0.1.dylib' warning: unexpected reference to 'libvtkImagingCore-8.0.1.dylib' warning: unexpected reference to 'libvtkImagingMath-8.0.1.dylib' warning: unexpected reference to 'libvtkImagingStatistics-8.0.1.dylib' warning: unexpected reference to 'libvtkInteractionStyle-8.0.1.dylib' warning: unexpected reference to 'libvtkInteractionWidgets-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingAnnotation-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingContext2D-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingContextOpenGL2-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingCore-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingFreeType-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingLabel-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingOpenGL2-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingQt-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingVolume-8.0.1.dylib' warning: unexpected reference to 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' warning: unexpected reference to 'libvtkViewsContext2D-8.0.1.dylib' warning: unexpected reference to 'libvtkViewsCore-8.0.1.dylib' warning: unexpected reference to 'libvtkfreetype-8.0.1.dylib' warning: unexpected reference to 'libvtkglew-8.0.1.dylib' warning: unexpected reference to 'libvtksys-8.0.1.dylib' warning: unexpected reference to 'libvtkzlib-8.0.1.dylib' -- fixup_bundle: cleaning up... -- fixup_bundle: verifying... -- =========================================================================== -- Analyzing app='/Users/insight/Insight/insight-inst/orexplore-insight.app' -- bundle='/Users/insight/Insight/insight-inst/orexplore-insight.app' -- executable='/Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight' -- valid='1' -- executable file 1: /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight -- warning: cannot resolve item '@rpath/libinsightview.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libinsightview.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/libinsightview.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/libinsightmodel.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libinsightmodel.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/libinsightmodel.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/libhdf5.10.2.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/libhdf5.10.2.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/libhdf5.10.2.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkChartsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkChartsCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkChartsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkImagingStatistics-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingStatistics-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingStatistics-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingContextOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingContextOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingContextOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingQt-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkGUISupportQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkGUISupportQt-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkGUISupportQt-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/QtWidgets.framework/Versions/5/QtWidgets' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtWidgets.framework/Versions/5/QtWidgets' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtWidgets.framework/Versions/5/QtWidgets' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/QtGui.framework/Versions/5/QtGui' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtGui.framework/Versions/5/QtGui' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtGui.framework/Versions/5/QtGui' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item '@rpath/QtCore.framework/Versions/5/QtCore' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file '@rpath/QtCore.framework/Versions/5/QtCore' returning type 'other' -- possibly incorrect -- warning: cannot resolve item '@rpath/QtCore.framework/Versions/5/QtCore' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingLabel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingLabel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingLabel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingOpenGL2-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingOpenGL2-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkImagingMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingMath-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkglew-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkglew-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkglew-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkViewsContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkViewsContext2D-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkViewsContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingContext2D-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingContext2D-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkViewsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkViewsCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkViewsCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkInteractionWidgets-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkInteractionWidgets-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkInteractionWidgets-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkInteractionStyle-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkInteractionStyle-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkInteractionStyle-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingAnnotation-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingAnnotation-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingAnnotation-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingFreeType-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingFreeType-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingFreeType-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkfreetype-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkfreetype-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkfreetype-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingVolume-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingVolume-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingVolume-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkRenderingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkRenderingCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkRenderingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkFiltersSources-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersSources-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersSources-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkFiltersGeneral-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersGeneral-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersGeneral-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkFiltersCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkFiltersCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkFiltersCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkImagingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkImagingCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkImagingCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonExecutionModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonExecutionModel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonExecutionModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonDataModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonDataModel-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonDataModel-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonTransforms-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonTransforms-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonTransforms-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonMisc-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonMisc-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonMisc-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonMath-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonMath-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkCommonCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkCommonCore-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkCommonCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtksys-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtksys-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtksys-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libvtkzlib-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libvtkzlib-8.0.1.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libvtkzlib-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: cannot resolve item 'libqwt.6.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'libqwt.6.dylib' returning type 'other' -- possibly incorrect -- warning: cannot resolve item 'libqwt.6.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? warning: target '@rpath/libinsightview.dylib' is not absolute... warning: target '@rpath/libinsightview.dylib' does not exist... warning: target '@rpath/libinsightmodel.dylib' is not absolute... warning: target '@rpath/libinsightmodel.dylib' does not exist... warning: target '@rpath/libhdf5.10.2.1.dylib' is not absolute... warning: target '@rpath/libhdf5.10.2.1.dylib' does not exist... warning: target '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' is not absolute... warning: target '@rpath/QtConcurrent.framework/Versions/5/QtConcurrent' does not exist... warning: target 'libvtkChartsCore-8.0.1.dylib' is not absolute... warning: target 'libvtkChartsCore-8.0.1.dylib' does not exist... warning: target 'libvtkImagingStatistics-8.0.1.dylib' is not absolute... warning: target 'libvtkImagingStatistics-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingContextOpenGL2-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingContextOpenGL2-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingQt-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingQt-8.0.1.dylib' does not exist... warning: target 'libvtkGUISupportQt-8.0.1.dylib' is not absolute... warning: target 'libvtkGUISupportQt-8.0.1.dylib' does not exist... warning: target '@rpath/QtWidgets.framework/Versions/5/QtWidgets' is not absolute... warning: target '@rpath/QtWidgets.framework/Versions/5/QtWidgets' does not exist... warning: target '@rpath/QtGui.framework/Versions/5/QtGui' is not absolute... warning: target '@rpath/QtGui.framework/Versions/5/QtGui' does not exist... warning: target '@rpath/QtCore.framework/Versions/5/QtCore' is not absolute... warning: target '@rpath/QtCore.framework/Versions/5/QtCore' does not exist... warning: target 'libvtkRenderingLabel-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingLabel-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingVolumeOpenGL2-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingOpenGL2-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingOpenGL2-8.0.1.dylib' does not exist... warning: target 'libvtkImagingMath-8.0.1.dylib' is not absolute... warning: target 'libvtkImagingMath-8.0.1.dylib' does not exist... warning: target 'libvtkglew-8.0.1.dylib' is not absolute... warning: target 'libvtkglew-8.0.1.dylib' does not exist... warning: target 'libvtkViewsContext2D-8.0.1.dylib' is not absolute... warning: target 'libvtkViewsContext2D-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingContext2D-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingContext2D-8.0.1.dylib' does not exist... warning: target 'libvtkViewsCore-8.0.1.dylib' is not absolute... warning: target 'libvtkViewsCore-8.0.1.dylib' does not exist... warning: target 'libvtkInteractionWidgets-8.0.1.dylib' is not absolute... warning: target 'libvtkInteractionWidgets-8.0.1.dylib' does not exist... warning: target 'libvtkInteractionStyle-8.0.1.dylib' is not absolute... warning: target 'libvtkInteractionStyle-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingAnnotation-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingAnnotation-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingFreeType-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingFreeType-8.0.1.dylib' does not exist... warning: target 'libvtkfreetype-8.0.1.dylib' is not absolute... warning: target 'libvtkfreetype-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingVolume-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingVolume-8.0.1.dylib' does not exist... warning: target 'libvtkRenderingCore-8.0.1.dylib' is not absolute... warning: target 'libvtkRenderingCore-8.0.1.dylib' does not exist... warning: target 'libvtkFiltersSources-8.0.1.dylib' is not absolute... warning: target 'libvtkFiltersSources-8.0.1.dylib' does not exist... warning: target 'libvtkFiltersGeneral-8.0.1.dylib' is not absolute... warning: target 'libvtkFiltersGeneral-8.0.1.dylib' does not exist... warning: target 'libvtkFiltersCore-8.0.1.dylib' is not absolute... warning: target 'libvtkFiltersCore-8.0.1.dylib' does not exist... warning: target 'libvtkImagingCore-8.0.1.dylib' is not absolute... warning: target 'libvtkImagingCore-8.0.1.dylib' does not exist... warning: target 'libvtkCommonExecutionModel-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonExecutionModel-8.0.1.dylib' does not exist... warning: target 'libvtkCommonDataModel-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonDataModel-8.0.1.dylib' does not exist... warning: target 'libvtkCommonTransforms-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonTransforms-8.0.1.dylib' does not exist... warning: target 'libvtkCommonMisc-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonMisc-8.0.1.dylib' does not exist... warning: target 'libvtkCommonMath-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonMath-8.0.1.dylib' does not exist... warning: target 'libvtkCommonCore-8.0.1.dylib' is not absolute... warning: target 'libvtkCommonCore-8.0.1.dylib' does not exist... warning: target 'libvtksys-8.0.1.dylib' is not absolute... warning: target 'libvtksys-8.0.1.dylib' does not exist... warning: target 'libvtkzlib-8.0.1.dylib' is not absolute... warning: target 'libvtkzlib-8.0.1.dylib' does not exist... warning: target 'libqwt.6.dylib' is not absolute... warning: target 'libqwt.6.dylib' does not exist... -- verified='1' -- info='Verified 1 executable files in '/Users/insight/Insight/insight-inst/orexplore-insight.app'' -- -- verified='1' -- info='' -- -- fixup_bundle: done From elvis.stansvik at orexplore.com Wed May 24 09:44:22 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 24 May 2017 15:44:22 +0200 Subject: [CMake] Confusion with fixup_bundle(..) and RPATH on macOS In-Reply-To: References: Message-ID: 2017-05-24 15:23 GMT+02:00 Elvis Stansvik : > Hi all, > > My application consists of an executable (orexplore-insight) and two > shared libraries (libinsightview and libinsightmodel). > > In addition to that, I'm linking against Qt 5.8.0, VTK 8.0.0.rc1, HDF5 > 1.8.18 and Qwt 6.1.2. > > My goal is to make a self-contained .app bundle (and eventually a .dmg). > > This is what otool -L looks like on my executable, when installed: > > Kevins-MacBook-Pro:build insight$ otool -L > ~/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight > /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight: > @rpath/libinsightview.dylib (compatibility version 0.0.0, > current version 0.0.0) > @rpath/libinsightmodel.dylib (compatibility version 0.0.0, > current version 0.0.0) > @rpath/libhdf5.10.2.1.dylib (compatibility version 10.2.1, > current version 1.8.18) > @rpath/QtConcurrent.framework/Versions/5/QtConcurrent > (compatibility version 5.8.0, current version 5.8.0) > libvtkChartsCore-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkImagingStatistics-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkRenderingContextOpenGL2-8.0.1.dylib (compatibility > version 1.0.0, current version 1.0.0) > libvtkRenderingQt-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkGUISupportQt-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility > version 5.8.0, current version 5.8.0) > @rpath/QtGui.framework/Versions/5/QtGui (compatibility version > 5.8.0, current version 5.8.0) > @rpath/QtCore.framework/Versions/5/QtCore (compatibility > version 5.8.0, current version 5.8.0) > libvtkRenderingLabel-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkRenderingVolumeOpenGL2-8.0.1.dylib (compatibility > version 1.0.0, current version 1.0.0) > libvtkRenderingOpenGL2-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa > (compatibility version 1.0.0, current version 22.0.0) > libvtkImagingMath-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkglew-8.0.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > libvtkViewsContext2D-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkRenderingContext2D-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkViewsCore-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkInteractionWidgets-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkInteractionStyle-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkRenderingAnnotation-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkRenderingFreeType-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkfreetype-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices > (compatibility version 1.0.0, current version 48.0.0) > /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices > (compatibility version 1.0.0, current version 775.19.0) > libvtkRenderingVolume-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkRenderingCore-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkFiltersSources-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkFiltersGeneral-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkFiltersCore-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkImagingCore-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkCommonExecutionModel-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkCommonDataModel-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkCommonTransforms-8.0.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > libvtkCommonMisc-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkCommonMath-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtkCommonCore-8.0.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > libvtksys-8.0.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > libvtkzlib-8.0.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > libqwt.6.dylib (compatibility version 6.1.0, current version 6.1.2) > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current > version 307.5.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > current version 1238.50.2) > Kevins-MacBook-Pro:build insight$ > > So from this I can see that Qt and HDF5 install libraries with an > "@rpath/..."-style install_name, while VTK and Qwt does not (they use > a filename-only install_name). > > So far so good I suppose. > > If I understand correctly, to make my application work as a > self-containing .app bundle in this scenario, I must: > > 1. Bundle all dependent frameworks/libraries inside the .app (of course) > > 2. Ensure my executable has an LC_RPATH pointing to > @executable_path/.., @executable_path/../Frameworks et.c., which makes > sure the bundled libraries with "@rpath/..."-style install_names are > found correctly. > > 3. Ensure my app is started with DYLD_LIBRARY_PATH pointing to > wherever I bundle the libraries that do not use "@rpath/..."-style > install_name's, so that they are found as well. > > Does this sound about right? > > Now on to my current problem: > > I can make sure my installed executable has e.g. an > @executable_path/../Frameworks LC_RPATH by setting the INSTALL_RPATH > target property. I've verified with otool -l on the installed > executable that this is working. E.g: > > Load command 59 > cmd LC_RPATH > cmdsize 48 > path @executable_path/../Frameworks (offset 12) > > However, if I try to make the bundle self-containing with > fixup_bundle(...) from BundleUtilities, using an install snippet like: > > fixup_bundle("${CMAKE_INSTALL_PREFIX}/orexplore-insight.app" "" "") > > (the above is from an install(SCRIPT ...) of mine), then I get > warnings and errors during `make install`, such as: > > warning: cannot resolve item '@rpath/libhdf5.10.2.1.dylib' > > and > > warning: target '@rpath/libhdf5.10.2.1.dylib' is not absolute... > > and > > warning: target '@rpath/libhdf5.10.2.1.dylib' does not exist... > > and > > warning: unexpected reference to '@rpath/libhdf5.10.2.1.dylib' > > And none of the libraries have been copied into the bundle. Note also that the two libraries that _don't_ use @rpath install_name (VTK and Qwt) are not found/copied either. So I'm not sure my issue is related to @rpath at all. As a test, I've also tried passing in the path to the VTK library directory to the dirs parameter of fixup_bundle(..): fixup_bundle("${CMAKE_INSTALL_PREFIX}/orexplore-insight.app" "" "/Users/insight/Insight/VTK-8.0.0.rc1-inst/lib") but the problem is the same. The libraries are not found, and I'm getting warnings like: warning: cannot resolve item 'libvtkFiltersCore-8.0.1.dylib' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? and: warning: target 'libvtkFiltersCore-8.0.1.dylib' is not absolute... warning: target 'libvtkFiltersCore-8.0.1.dylib' does not exist... And the library is not copied. Elvis > > Furthermore, and what surprises me, is that after this failed install, > if I look at the installed executable again with otool -l, then it > seems fixup_bundle has removed the LC_RPATH :( > > I'm attaching the full output from `make install`. You can ignore that > the installed paths of my own libraries (libinsightview and > libinsightmodel) are a bit wrong, I'll fix that and I'm focusing on > the third party libs for now. > > My questions are: > > 1. Anyone know what is going wrong with the fixup_bundle(...) here? > Why can't it bundle the libraries? I've tried adding the directories > of the third party libraries to DYLD_LIBRARY_PATH during the `make > install`, to help fixup_bundle(...) find them, but it didn't make any > difference. > > 2. Why is fixup_bundle(...) stripping out the LC_RPATH I added by > means of setting the INSTALL_RPATH target property? I want that > LC_RPATH to be there, so that bundled libraries with @rpath are found. > > Many thanks in advance, > A confused Elvis From elvis.stansvik at orexplore.com Wed May 24 10:30:03 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 24 May 2017 16:30:03 +0200 Subject: [CMake] Confusion with fixup_bundle(..) and RPATH on macOS In-Reply-To: References: Message-ID: 2017-05-24 15:44 GMT+02:00 Elvis Stansvik : > 2017-05-24 15:23 GMT+02:00 Elvis Stansvik : >> Hi all, >> >> My application consists of an executable (orexplore-insight) and two >> shared libraries (libinsightview and libinsightmodel). >> >> In addition to that, I'm linking against Qt 5.8.0, VTK 8.0.0.rc1, HDF5 >> 1.8.18 and Qwt 6.1.2. >> >> My goal is to make a self-contained .app bundle (and eventually a .dmg). >> >> This is what otool -L looks like on my executable, when installed: >> >> Kevins-MacBook-Pro:build insight$ otool -L >> ~/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight >> /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight: >> @rpath/libinsightview.dylib (compatibility version 0.0.0, >> current version 0.0.0) >> @rpath/libinsightmodel.dylib (compatibility version 0.0.0, >> current version 0.0.0) >> @rpath/libhdf5.10.2.1.dylib (compatibility version 10.2.1, >> current version 1.8.18) >> @rpath/QtConcurrent.framework/Versions/5/QtConcurrent >> (compatibility version 5.8.0, current version 5.8.0) >> libvtkChartsCore-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkImagingStatistics-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkRenderingContextOpenGL2-8.0.1.dylib (compatibility >> version 1.0.0, current version 1.0.0) >> libvtkRenderingQt-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkGUISupportQt-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility >> version 5.8.0, current version 5.8.0) >> @rpath/QtGui.framework/Versions/5/QtGui (compatibility version >> 5.8.0, current version 5.8.0) >> @rpath/QtCore.framework/Versions/5/QtCore (compatibility >> version 5.8.0, current version 5.8.0) >> libvtkRenderingLabel-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkRenderingVolumeOpenGL2-8.0.1.dylib (compatibility >> version 1.0.0, current version 1.0.0) >> libvtkRenderingOpenGL2-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa >> (compatibility version 1.0.0, current version 22.0.0) >> libvtkImagingMath-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkglew-8.0.1.dylib (compatibility version 1.0.0, current >> version 1.0.0) >> libvtkViewsContext2D-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkRenderingContext2D-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkViewsCore-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkInteractionWidgets-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkInteractionStyle-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkRenderingAnnotation-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkRenderingFreeType-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkfreetype-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices >> (compatibility version 1.0.0, current version 48.0.0) >> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices >> (compatibility version 1.0.0, current version 775.19.0) >> libvtkRenderingVolume-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkRenderingCore-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkFiltersSources-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkFiltersGeneral-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkFiltersCore-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkImagingCore-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkCommonExecutionModel-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkCommonDataModel-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkCommonTransforms-8.0.1.dylib (compatibility version >> 1.0.0, current version 1.0.0) >> libvtkCommonMisc-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkCommonMath-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtkCommonCore-8.0.1.dylib (compatibility version 1.0.0, >> current version 1.0.0) >> libvtksys-8.0.1.dylib (compatibility version 1.0.0, current >> version 1.0.0) >> libvtkzlib-8.0.1.dylib (compatibility version 1.0.0, current >> version 1.0.0) >> libqwt.6.dylib (compatibility version 6.1.0, current version 6.1.2) >> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current >> version 307.5.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >> current version 1238.50.2) >> Kevins-MacBook-Pro:build insight$ >> >> So from this I can see that Qt and HDF5 install libraries with an >> "@rpath/..."-style install_name, while VTK and Qwt does not (they use >> a filename-only install_name). >> >> So far so good I suppose. >> >> If I understand correctly, to make my application work as a >> self-containing .app bundle in this scenario, I must: >> >> 1. Bundle all dependent frameworks/libraries inside the .app (of course) >> >> 2. Ensure my executable has an LC_RPATH pointing to >> @executable_path/.., @executable_path/../Frameworks et.c., which makes >> sure the bundled libraries with "@rpath/..."-style install_names are >> found correctly. >> >> 3. Ensure my app is started with DYLD_LIBRARY_PATH pointing to >> wherever I bundle the libraries that do not use "@rpath/..."-style >> install_name's, so that they are found as well. >> >> Does this sound about right? >> >> Now on to my current problem: >> >> I can make sure my installed executable has e.g. an >> @executable_path/../Frameworks LC_RPATH by setting the INSTALL_RPATH >> target property. I've verified with otool -l on the installed >> executable that this is working. E.g: >> >> Load command 59 >> cmd LC_RPATH >> cmdsize 48 >> path @executable_path/../Frameworks (offset 12) >> >> However, if I try to make the bundle self-containing with >> fixup_bundle(...) from BundleUtilities, using an install snippet like: >> >> fixup_bundle("${CMAKE_INSTALL_PREFIX}/orexplore-insight.app" "" "") >> >> (the above is from an install(SCRIPT ...) of mine), then I get >> warnings and errors during `make install`, such as: >> >> warning: cannot resolve item '@rpath/libhdf5.10.2.1.dylib' >> >> and >> >> warning: target '@rpath/libhdf5.10.2.1.dylib' is not absolute... >> >> and >> >> warning: target '@rpath/libhdf5.10.2.1.dylib' does not exist... >> >> and >> >> warning: unexpected reference to '@rpath/libhdf5.10.2.1.dylib' >> >> And none of the libraries have been copied into the bundle. > > Note also that the two libraries that _don't_ use @rpath install_name > (VTK and Qwt) are not found/copied either. So I'm not sure my issue is > related to @rpath at all. > > As a test, I've also tried passing in the path to the VTK library > directory to the dirs parameter of fixup_bundle(..): > > fixup_bundle("${CMAKE_INSTALL_PREFIX}/orexplore-insight.app" "" > "/Users/insight/Insight/VTK-8.0.0.rc1-inst/lib") > > but the problem is the same. The libraries are not found, and I'm > getting warnings like: > > warning: cannot resolve item 'libvtkFiltersCore-8.0.1.dylib' > > possible problems: > need more directories? > need to use InstallRequiredSystemLibraries? > run in install tree instead of build tree? > > and: > > warning: target 'libvtkFiltersCore-8.0.1.dylib' is not absolute... > warning: target 'libvtkFiltersCore-8.0.1.dylib' does not exist... > > And the library is not copied. > > Elvis > >> >> Furthermore, and what surprises me, is that after this failed install, >> if I look at the installed executable again with otool -l, then it >> seems fixup_bundle has removed the LC_RPATH :( >> >> I'm attaching the full output from `make install`. You can ignore that >> the installed paths of my own libraries (libinsightview and >> libinsightmodel) are a bit wrong, I'll fix that and I'm focusing on >> the third party libs for now. >> >> My questions are: >> >> 1. Anyone know what is going wrong with the fixup_bundle(...) here? >> Why can't it bundle the libraries? I've tried adding the directories >> of the third party libraries to DYLD_LIBRARY_PATH during the `make >> install`, to help fixup_bundle(...) find them, but it didn't make any >> difference. >> >> 2. Why is fixup_bundle(...) stripping out the LC_RPATH I added by >> means of setting the INSTALL_RPATH target property? I want that >> LC_RPATH to be there, so that bundled libraries with @rpath are found. >> >> Many thanks in advance, >> A confused Elvis Okay, nevermind, it was just a matter of specifying _all_ library directories to the third parameter to fixup_bundle(...), since there were some interdependencies involved among my third party libraries. With all library directories specified, fixup_bundle(..) seems to have succeeded in bundling everything: Kevins-MacBook-Pro:build insight$ find ~/Insight/insight-inst /Users/insight/Insight/insight-inst /Users/insight/Insight/insight-inst/libinsightmodel.dylib /Users/insight/Insight/insight-inst/libinsightview.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework/QtConcurrent /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework/Versions /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework/Versions/5 /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework/Versions/5/QtConcurrent /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework/Versions/5/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework/Versions/5/Resources/Info.plist /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtConcurrent.framework/Versions/Current /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework/QtCore /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework/Versions /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework/Versions/5 /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework/Versions/5/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework/Versions/5/Resources/Info.plist /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtCore.framework/Versions/Current /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework/QtGui /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework/Versions /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework/Versions/5 /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework/Versions/5/QtGui /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework/Versions/5/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework/Versions/5/Resources/Info.plist /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtGui.framework/Versions/Current /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework/QtOpenGL /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework/Versions /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework/Versions/5 /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework/Versions/5/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework/Versions/5/Resources/Info.plist /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtOpenGL.framework/Versions/Current /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework/QtPrintSupport /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework/Versions /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework/Versions/5 /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework/Versions/5/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework/Versions/5/Resources/Info.plist /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtPrintSupport.framework/Versions/Current /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework/QtSvg /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework/Versions /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework/Versions/5 /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework/Versions/5/QtSvg /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework/Versions/5/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework/Versions/5/Resources/Info.plist /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtSvg.framework/Versions/Current /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework/QtWidgets /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework/Versions /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework/Versions/5 /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework/Versions/5/Resources /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework/Versions/5/Resources/Info.plist /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Frameworks/QtWidgets.framework/Versions/Current /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/Info.plist /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libhdf5.1.8.18.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libhdf5.10.2.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libinsightmodel.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libinsightview.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libqwt.6.1.2.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libqwt.6.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libszip.2.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkalglib-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkChartsCore-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonColor-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonComputationalGeometry-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonCore-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonDataModel-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonExecutionModel-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonMath-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonMisc-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonSystem-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkCommonTransforms-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkDICOMParser-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkexpat-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersCore-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersExtraction-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersGeneral-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersGeometry-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersHybrid-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersModeling-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersSources-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersStatistics-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkFiltersTexture-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkfreetype-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkglew-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkGUISupportQt-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkImagingColor-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkImagingCore-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkImagingFourier-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkImagingGeneral-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkImagingHybrid-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkImagingMath-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkImagingSources-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkImagingStatistics-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkInfovisCore-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkInteractionStyle-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkInteractionWidgets-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkIOCore-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkIOImage-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkIOXML-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkIOXMLParser-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkjpeg-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtklz4-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkmetaio-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkpng-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingAnnotation-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingContext2D-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingContextOpenGL2-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingCore-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingFreeType-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingLabel-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingOpenGL2-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingQt-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingVolume-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkRenderingVolumeOpenGL2-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtksys-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtktiff-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkViewsContext2D-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkViewsCore-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libvtkzlib-8.0.1.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/libz.1.2.dylib /Users/insight/Insight/insight-inst/orexplore-insight.app/Contents/MacOS/orexplore-insight Kevins-MacBook-Pro:build insight$ So my question is now: Is there some environment variable I can set instead, to guide the fixup_bundle(..) library search? I don't like hardcoding these paths in my CMake config, but would like to set them in my CI/package build job. Elvis From biologismksa2 at gmail.com Sat May 27 03:49:35 2017 From: biologismksa2 at gmail.com (biologi spm) Date: Sat, 27 May 2017 15:49:35 +0800 Subject: [CMake] Feature request: change how CMake chooses compiler when Ninja is used (Windows) Message-ID: Hi CMake developers, When both Mingw64 GCC and MSVC is available in PATH and run cmake -GNinja, cmake always choose GCC. I have to manually remove GCC from PATH or type -DCMAKE_IGNORE_PATH= which is very long. I suggest when both compilers are found in PATH when running cmake -GNinja, cmake should choose the first compiler found in PATH. Case 1: PATH=/path/to/cl.exe;/path/to/gcc.exe;, choose MSVC. Case 2: PATH=/path/to/gcc.exe;/path/to/cl.exe;, choose GCC. Thanks in advance. - John London From redradist at gmail.com Sun May 28 09:58:27 2017 From: redradist at gmail.com (Denis Kotov) Date: Sun, 28 May 2017 16:58:27 +0300 Subject: [CMake] Is there analog of source command from bash ? Message-ID: Hi everyone, I have tried to find solution to the following problem: There is the project with environment variable described in *setenv.sh* file Old build process looks like: source *setenv.sh* make release But I want to accomplish this by *CMake*. But I have realized that *CMake* does not have analog of source command that's why the following command does not work: execute_process(COMMAND bash -c "source ../setenv") Because *CMake* creates a child process. How can I import variables that was set in some sh file ? *Thanks,* *Best RegardsDenis Kotov* -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus at therning.org Sun May 28 17:14:49 2017 From: magnus at therning.org (Magnus Therning) Date: Sun, 28 May 2017 23:14:49 +0200 Subject: [CMake] Is there analog of source command from bash ? In-Reply-To: References: Message-ID: <87inkkfzue.fsf@therning.org> Denis Kotov writes: > Hi everyone, > > I have tried to find solution to the following problem: There is the > project with environment variable described in *setenv.sh* file > Old build process looks like: > source *setenv.sh* > make release > > But I want to accomplish this by *CMake*. But I have realized that > *CMake* does not have analog of source command that's why the > following command does not work: > execute_process(COMMAND bash -c "source ../setenv") > > Because *CMake* creates a child process. > How can I import variables that was set in some sh file ? What I usually do is rewrite the sh file into a proper CMake package and then use find_package() to pull it in. Another option is of course to just include() it. /M -- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus at therning.org jabber: magnus at therning.org twitter: magthe http://therning.org/magnus If our ideas of intellectual property are wrong, we must change them, improve them and return them to their original purpose. When intellectual property rules diminish the supply of new ideas, they steal from all of us. ? Andrew Brown, November 19, 2005, The Guardian -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From annulen at yandex.ru Sun May 28 17:36:07 2017 From: annulen at yandex.ru (Konstantin Tokarev) Date: Mon, 29 May 2017 00:36:07 +0300 Subject: [CMake] Is there analog of source command from bash ? In-Reply-To: References: Message-ID: <6088191496007367@web45g.yandex.ru> 28.05.2017, 16:58, "Denis Kotov" : > Hi everyone, > > I have tried to find solution to the following problem: > There is the project with environment variable described in setenv.sh file > Old build process looks like: > source setenv.sh > make release > > But I want to accomplish this by CMake. But I have realized that CMake does not have analog of source command that's why the following command does not work: > execute_process(COMMAND bash -c "source ../setenv") You can run source setenv.sh before you run cmake, or in the same shell invocation with command that requires environment > > Because CMake creates a child process. > How can I import variables that was set in some sh file ? > > Thanks, > Best Regards > Denis Kotov > ,-- > > 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 --? Regards, Konstantin From irwin at beluga.phys.uvic.ca Sun May 28 20:15:17 2017 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Sun, 28 May 2017 17:15:17 -0700 (PDT) Subject: [CMake] Is there analog of source command from bash ? In-Reply-To: <6088191496007367@web45g.yandex.ru> References: <6088191496007367@web45g.yandex.ru> Message-ID: On 2017-05-29 00:36+0300 Konstantin Tokarev wrote: > > > 28.05.2017, 16:58, "Denis Kotov" : >> Hi everyone, >> >> I have tried to find solution to the following problem: >> There is the project with environment variable described in setenv.sh file >> Old build process looks like: >> source setenv.sh >> make release >> >> But I want to accomplish this by CMake. But I have realized that CMake does not have analog of source command that's why the following command does not work: >> execute_process(COMMAND bash -c "source ../setenv") > > You can run source setenv.sh before you run cmake, or in the same shell invocation with command that requires environment That method just makes those environment variables available at cmake time and it will require more work to propagate that environment to the environment used at make time. @Denis (the OP). I have an entirely different suggestion. You will have to experiment (since I have never tried this myself), but fundamentally you want a command to run at make time before you build the release target. I am pretty sure the following idea would implement this without issues: add_custom_target(update_environment COMMAND bash -c "source " ) add_custom_target(release ALL COMMAND command1 COMMAND command2 [...] ) # Make sure the above command is run every time before the release # target is built add_dependencies(release update_environment) N.B. according to this method will only work on top-level targets that you create yourself with add_executable, add_library, and add_custom_target; and will NOT work (for good reasons, see below) on CMake-generated high-level targets such as "test", "all", and "install". But for example, if you implement your add_custom_target for the "release" target with the ALL attribute as above, it will make that custom target a dependency of the "all" target which itself is (automatically) a dependency of the "install" target. So the target dependency chain resulting from the above idea would be install -> all -> release -> update_environment And similarly for the "test" high-level target. Which I think is what you want for the dependency chain between the high-level targets and custom targets. Good luck, and please let us know the results of your experiments with this idea. 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 __________________________ From boxerab at gmail.com Sun May 28 21:37:55 2017 From: boxerab at gmail.com (Aaron Boxer) Date: Sun, 28 May 2017 21:37:55 -0400 Subject: [CMake] Trouble finding libjpeg package on ubuntu Message-ID: Hello, I would like cmake to find the libjpeg installation on my ubuntu system. I have the find_package(jpeg) line in my cmake file, and this works on windows, but on Ubuntu with libjpeg-turbo installed, it can't find it. Here is a list of the install directories for the libjpeg-turbo8-dev package: /. /usr /usr/include /usr/include/turbojpeg.h /usr/include/jerror.h /usr/include/x86_64-linux-gnu /usr/include/x86_64-linux-gnu/jconfig.h /usr/include/jmorecfg.h /usr/include/jpegint.h /usr/include/jpeglib.h /usr/share /usr/share/doc /usr/share/doc/libjpeg-turbo8-dev /usr/share/doc/libjpeg-turbo8-dev/copyright /usr/share/doc/libjpeg-turbo8-dev/libjpeg.txt.gz /usr/share/doc/libjpeg-turbo8-dev/structure.txt.gz /usr/share/doc/libjpeg-turbo8-dev/README.gz /usr/share/doc/libjpeg-turbo8-dev/README-turbo.txt.gz /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libturbojpeg.a /usr/lib/x86_64-linux-gnu/libjpeg.a /usr/lib/x86_64-linux-gnu/pkgconfig Any help would be greatly appreciated. Thanks! Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From michele.portolan at grenoble-inp.fr Mon May 29 02:57:02 2017 From: michele.portolan at grenoble-inp.fr (Michele Portolan) Date: Mon, 29 May 2017 08:57:02 +0200 Subject: [CMake] Trouble finding libjpeg package on ubuntu In-Reply-To: References: Message-ID: Did you install the dev version of the library? Michele On 29/05/17 03:37, Aaron Boxer wrote: > Hello, > I would like cmake to find the libjpeg installation on my ubuntu system. > > I have the > > find_package(jpeg) line in my cmake file, and this works on windows, > but on > Ubuntu with libjpeg-turbo installed, it can't find it. > > Here is a list of the install directories for the libjpeg-turbo8-dev > package: > > /. > /usr > /usr/include > /usr/include/turbojpeg.h > /usr/include/jerror.h > /usr/include/x86_64-linux-gnu > /usr/include/x86_64-linux-gnu/jconfig.h > /usr/include/jmorecfg.h > /usr/include/jpegint.h > /usr/include/jpeglib.h > /usr/share > /usr/share/doc > /usr/share/doc/libjpeg-turbo8-dev > /usr/share/doc/libjpeg-turbo8-dev/copyright > /usr/share/doc/libjpeg-turbo8-dev/libjpeg.txt.gz > /usr/share/doc/libjpeg-turbo8-dev/structure.txt.gz > /usr/share/doc/libjpeg-turbo8-dev/README.gz > /usr/share/doc/libjpeg-turbo8-dev/README-turbo.txt.gz > /usr/lib > /usr/lib/x86_64-linux-gnu > /usr/lib/x86_64-linux-gnu/libturbojpeg.a > /usr/lib/x86_64-linux-gnu/libjpeg.a > /usr/lib/x86_64-linux-gnu/pkgconfig > > > Any help would be greatly appreciated. > > Thanks! > > Aaron > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Mon May 29 06:43:04 2017 From: boxerab at gmail.com (Aaron Boxer) Date: Mon, 29 May 2017 06:43:04 -0400 Subject: [CMake] Fwd: Re: Trouble finding libjpeg package on ubuntu In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: "Aaron Boxer" Date: May 29, 2017 6:42 AM Subject: Re: [CMake] Trouble finding libjpeg package on ubuntu To: "Michele Portolan" Cc: Yes, installed dev version. On May 29, 2017 2:57 AM, "Michele Portolan" wrote: > Did you install the dev version of the library? > > > Michele > > On 29/05/17 03:37, Aaron Boxer wrote: > > Hello, > I would like cmake to find the libjpeg installation on my ubuntu system. > > I have the > > find_package(jpeg) line in my cmake file, and this works on windows, but on > Ubuntu with libjpeg-turbo installed, it can't find it. > > Here is a list of the install directories for the libjpeg-turbo8-dev > package: > > /. > /usr > /usr/include > /usr/include/turbojpeg.h > /usr/include/jerror.h > /usr/include/x86_64-linux-gnu > /usr/include/x86_64-linux-gnu/jconfig.h > /usr/include/jmorecfg.h > /usr/include/jpegint.h > /usr/include/jpeglib.h > /usr/share > /usr/share/doc > /usr/share/doc/libjpeg-turbo8-dev > /usr/share/doc/libjpeg-turbo8-dev/copyright > /usr/share/doc/libjpeg-turbo8-dev/libjpeg.txt.gz > /usr/share/doc/libjpeg-turbo8-dev/structure.txt.gz > /usr/share/doc/libjpeg-turbo8-dev/README.gz > /usr/share/doc/libjpeg-turbo8-dev/README-turbo.txt.gz > /usr/lib > /usr/lib/x86_64-linux-gnu > /usr/lib/x86_64-linux-gnu/libturbojpeg.a > /usr/lib/x86_64-linux-gnu/libjpeg.a > /usr/lib/x86_64-linux-gnu/pkgconfig > > > Any help would be greatly appreciated. > > Thanks! > > Aaron > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Mon May 29 10:21:15 2017 From: boxerab at gmail.com (Aaron Boxer) Date: Mon, 29 May 2017 10:21:15 -0400 Subject: [CMake] Trouble finding libjpeg package on ubuntu In-Reply-To: References: Message-ID: Damn!!! Unix is case sensitive. find_package(JPEG) works. On Sun, May 28, 2017 at 9:37 PM, Aaron Boxer wrote: > Hello, > I would like cmake to find the libjpeg installation on my ubuntu system. > > I have the > > find_package(jpeg) line in my cmake file, and this works on windows, but on > Ubuntu with libjpeg-turbo installed, it can't find it. > > Here is a list of the install directories for the libjpeg-turbo8-dev > package: > > /. > /usr > /usr/include > /usr/include/turbojpeg.h > /usr/include/jerror.h > /usr/include/x86_64-linux-gnu > /usr/include/x86_64-linux-gnu/jconfig.h > /usr/include/jmorecfg.h > /usr/include/jpegint.h > /usr/include/jpeglib.h > /usr/share > /usr/share/doc > /usr/share/doc/libjpeg-turbo8-dev > /usr/share/doc/libjpeg-turbo8-dev/copyright > /usr/share/doc/libjpeg-turbo8-dev/libjpeg.txt.gz > /usr/share/doc/libjpeg-turbo8-dev/structure.txt.gz > /usr/share/doc/libjpeg-turbo8-dev/README.gz > /usr/share/doc/libjpeg-turbo8-dev/README-turbo.txt.gz > /usr/lib > /usr/lib/x86_64-linux-gnu > /usr/lib/x86_64-linux-gnu/libturbojpeg.a > /usr/lib/x86_64-linux-gnu/libjpeg.a > /usr/lib/x86_64-linux-gnu/pkgconfig > > > Any help would be greatly appreciated. > > Thanks! > > Aaron > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tonka3100 at gmail.com Mon May 29 15:26:51 2017 From: tonka3100 at gmail.com (tonka tonka) Date: Mon, 29 May 2017 21:26:51 +0200 Subject: [CMake] cmake install script In-Reply-To: References: Message-ID: Hey at everybody, I have a little problem with the cmake installer script on Ubuntu. I need the latest cmake,so that's the only way. The script works fine but now I want to automate the cmake install on my ci server, but the license accept prompt block me. The default answer is no, so the script abort. Does anybody know how I can automatically accept the license? Greetings Tonka -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.scott at crascit.com Mon May 29 16:57:13 2017 From: craig.scott at crascit.com (Craig Scott) Date: Tue, 30 May 2017 06:57:13 +1000 Subject: [CMake] cmake install script In-Reply-To: References: Message-ID: Try the tarball rather than the self-extracting script. The contents are the same, but the tarball won't require a license acceptance. On Tue, May 30, 2017 at 5:26 AM, tonka tonka wrote: > Hey at everybody, > > I have a little problem with the cmake installer script on Ubuntu. I need > the latest cmake,so that's the only way. The script works fine but now I > want to automate the cmake install on my ci server, but the license accept > prompt block me. The default answer is no, so the script abort. > Does anybody know how I can automatically accept the license? > > Greetings > Tonka > > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.neundorf-work at gmx.net Tue May 30 15:25:14 2017 From: a.neundorf-work at gmx.net (Alexander Neundorf) Date: Tue, 30 May 2017 21:25:14 +0200 Subject: [CMake] Feature request: change how CMake chooses compiler when Ninja is used (Windows) In-Reply-To: References: Message-ID: <5155223.fYa3qerZ60@linux-l7nd> On 2017 M05 27, Sat 15:49:35 CEST biologi spm wrote: > Hi CMake developers, > > When both Mingw64 GCC and MSVC is available in PATH and run cmake > -GNinja, cmake always choose GCC. I have to manually remove GCC from > PATH or type -DCMAKE_IGNORE_PATH= which is very long. you can set the CC and CXX env. variables to point at the compiler you want to use. CMake should pick this one up then. Alex From valmiki_rampersad at hotmail.com Tue May 30 22:44:47 2017 From: valmiki_rampersad at hotmail.com (Valmiki Rampersad) Date: Wed, 31 May 2017 02:44:47 +0000 Subject: [CMake] Choosing Toolset v140 for Generator VS 15 2017 Win64 Message-ID: I have Visual Studio 2017 Community, with toolsets v141 and v140, installed. If I run 'cmake -G "Visual Studio 15 2017 Win64" -T v141', it correctly configures and generates the project. However, if I run 'cmake -G "Visual Studio 15 2017 Win64" -T v140' it returns with the errors "No CMAKE_C_COMPILER could be found" and "No CMAKE_CXX_COMPILER could be found". I am using CMake 3.8.1. Any help in solving this would be greatly appreciated! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ryan.H.Kawicki at boeing.com Wed May 31 12:30:13 2017 From: Ryan.H.Kawicki at boeing.com (Kawicki, Ryan H) Date: Wed, 31 May 2017 16:30:13 +0000 Subject: [CMake] Mixed Tool Chains Within A Single Build Environment (Windows Universal) Message-ID: <980a4cbe64174e4e8f61bd5fd5901589@XCH15-03-10.nw.nos.boeing.com> I am curious to know if it is possible to have a mixed tool chain environment within a single Visual Studio IDE. I am playing around with changing up the frontend of an application to use the Window Universal Binary and XAML but many of the support libraries will not be converted to the universal binary format. With C++/CX this is possible to do. I can create a solution and add the appropriate projects to them, but this does not seem possible with CMake (or at least I have overlooked it). With CMake, I create a project that references the Windows Universal Application toolchain, but each subsequent adding of a project library assumes it to also be a universal DLL or static library. The work around I have created thus far is to just create two solution sets and build them independently, but it would be great if the two solutions could be merged into a single IDE for Visual Studio. Any ideas if this is possible to do? Is this something that CMake should provide in its functionality? Thanks, Ryan Kawicki -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.maynard at kitware.com Wed May 31 12:36:19 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 31 May 2017 12:36:19 -0400 Subject: [CMake] [ANNOUNCE] CMake 3.8.2 available for download Message-ID: We are pleased to announce that CMake 3.8.2 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! ------------------------------------------------------------------------- Changes in 3.8.2 since 3.8.1: Aleksey Chernov (2): bootstrap: fix build on mingw-w64 cmFileCommand: Fix build on mingw-w64 Alex Ghosh (2): GNUtoMS: Add search path for VS 2015 environment scripts GNUtoMS: Add search path for VS 2017 environment scripts Brad King (3): FindDevIL: Restore IL_FOUND result variable FindOpenSSL: Restore support for crypto-only result CMake 3.8.2 Mateusz Janek (1): source_group: Restore TREE support for relative paths Michael St?rmer (1): VS: Fix debugging of C++ executables if CSharp is enabled From liusong at zerozero.cn Wed May 31 12:50:38 2017 From: liusong at zerozero.cn (=?utf-8?B?5YiY5p2+?=) Date: Wed, 31 May 2017 16:50:38 +0000 Subject: [CMake] Mixed Tool Chains Within A Single Build Environment (Windows Universal) In-Reply-To: <980a4cbe64174e4e8f61bd5fd5901589@XCH15-03-10.nw.nos.boeing.com> References: <980a4cbe64174e4e8f61bd5fd5901589@XCH15-03-10.nw.nos.boeing.com> Message-ID: <4ABF83D4-3984-47B4-BC60-FAD938D3FCCE@zerozero.cn> One possible way is using ?include toolchain_xxx.cmake" instead of using CMAKE_TOOLCHAIN_FILE, which is allowed a single toolchain in project. And there the toolchain_xxx.cmake is setting up the compiler to be included in your sub cmake project. ???? iPhone ? 2017?6?1??00:36?Kawicki, Ryan H > ??? I am curious to know if it is possible to have a mixed tool chain environment within a single Visual Studio IDE. I am playing around with changing up the frontend of an application to use the Window Universal Binary and XAML but many of the support libraries will not be converted to the universal binary format. With C++/CX this is possible to do. I can create a solution and add the appropriate projects to them, but this does not seem possible with CMake (or at least I have overlooked it). With CMake, I create a project that references the Windows Universal Application toolchain, but each subsequent adding of a project library assumes it to also be a universal DLL or static library. The work around I have created thus far is to just create two solution sets and build them independently, but it would be great if the two solutions could be merged into a single IDE for Visual Studio. Any ideas if this is possible to do? Is this something that CMake should provide in its functionality? Thanks, Ryan Kawicki -- 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 pfultz2 at yahoo.com Wed May 31 14:49:36 2017 From: pfultz2 at yahoo.com (paul) Date: Wed, 31 May 2017 13:49:36 -0500 Subject: [CMake] Evaluate generator expressions with install interface In-Reply-To: References: Message-ID: <1496256576.3832.224.camel@yahoo.com> So if I do something like this: function(auto_pkgconfig TARGET) ????get_target_property(INCLUDE_DIRS ${TARGET} INTERFACE_INCLUDE_DIRECTORIES) ????string(REPLACE "$" "${CMAKE_INSTALL_PREFIX}" INCLUDE_DIRS "${INCLUDE_DIRS}") ????file(GENERATE OUTPUT ${TARGET}.pc CONTENT " Name: ${TARGET} Cflags: -I$ Libs: -L${CMAKE_INSTALL_PREFIX}/lib -l${TARGET} ") ????install(FILES ${TARGET}.pc DESTINATION lib/pkgconfig) endfunction() It will evaluate the `INSTALL_INTERFACE`. It seems looking at the source code of cmake, the export targets do something similiar. The only problem with this approach is that it doesn't handle the properties if they are set after calling `auto_pkgconfig`.? Is there a way to have cmake call a function or cmake code at the end of configuration or after? Using `install(CODE)` will not work as it doesn't have access to the targets during install. On Tue, 2017-05-16 at 13:02 -0500, P F wrote: > Hi, > > I would like to evaluate generator expressions to generate a pkgconfig file. > Something like: > > function(auto_pkgconfig TARGET) > ????file(GENERATE OUTPUT ${TARGET}.pc CONTENT " > Name: ${TARGET} > Cflags: -I$, > -I> > Libs: -L$ -l${TARGET} > ") > ????install(FILES ${TARGET}.pc DESTINATION lib/pkgconfig) > endfunction() > > However, this doesn?t work very well. It always evaluates the build > interface or computes the TARGET_FILE_DIR according the build directory > instead of installation. Also, if include directories are added to the > target after calling `auto_pkgconfig` it doesn?t capture those(ie it runs > file(GENERATE) at config time instead of generator time). > > So, is there a way to evaluate generator expressions for installation? And > evaluate them at generator time?? > > Calling `file(GENERATE)` at installation time(with install(CODE) or > install(SCRIPT)) does not solve this problem either. > > Thanks, > Paul