Re: [CMake] How to find/run external host executables when using cross compiling
2013/12/10 Eric Wing : > On 12/4/13, Eric Wing wrote: >> I'm currently trying to port a rather large, complex project to >> Android. It has an existing CMake project so I'm trying to leverage >> that. I've taken and enhanced one of the Android-CMake toolchains I've >> found. >> >> This particular project I'm porting has unfortunate dependencies on >> running the host system's Perl, Python, and Ruby interpreters to do >> various kinds of on-the-fly code generation. >> >> The problem I'm having is that with the cross-compilation toolchain, >> none of these (host) dependencies are found with CMake (I think it >> uses FindPackage) because the cross-compilation toolchain has >> sandboxed off everything to look in the target toolchain which won't >> have Perl/Python/Ruby (which is completely reasonable; I'm not >> complaining). >> >> But I need to solve this problem and figure out how to find/invoke the >> host Perl/Python/Ruby/etc so my cross-compile can work. >> >> Can anybody give me suggestions on how I should approach this? > > Bump. > I have a temporary workaround in place where I comment out the > find_package calls for Perl/Python/Ruby, and then use -D switches with > CMake to pre-populate the correct values for my host system. find_package may not work entirely (because it looking for headers, lib etc...) but find_program should if you set CMAKE_FIND_ROOT_PATH_MODE_PROGRAM to NEVER (or may be BOTH) see: http://www.cmake.org/Wiki/CMake_Cross_Compiling host executable should be found. -- Erk L'élection n'est pas la démocratie -- http://www.le-message.org -- 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://www.cmake.org/mailman/listinfo/cmake
[CMake] Contents of link.txt differ between Solaris 8 and Linux
Hi, I am using cmake 2.8.11.2 on Solaris 8 and Ubuntu 12.04.2 LTS, built from source using the GCC tool chain. I noted that the link.txt for one of our binaries on Solaris 8 are: /home/tjk/gnatpro-7.1.2/bin/gnatmake -aI/home/Users/tjk/vector/build/cmake/SunOS/.common-enums -aI/home/Users/tjk/vector/build/cmake/SunOS/.chop_Linux -aI/home/Users/tjk/vector/build/cmake/SunOS/.chop -aI/home/Users/tjk/vector/build/cmake/SunOS/.chop_ada -aI/home/Users/tjk/vector/source/cmake/vcast/ -aI/home/Users/tjk/vector/source/cmake/vcast/TGT_IO -aO/home/Users/tjk/vector/build/cmake/SunOS/vcast/CMakeFiles/commonada.dir -aO/home/Users/tjk/vector/build/cmake/SunOS/vcast/CMakeFiles/commonada.dir/__/.chop -aO/home/Users/tjk/vector/build/cmake/SunOS/vcast/CMakeFiles/commonada.dir/__/.common-enums monitor -o ../../vc/IO/monitor -cargs -largs -L/home/Users/tjk/vector/build/cmake/SunOS -L/home/Users/tjk/vector/build/cmake/SunOS/vc/lib -L/home/Users/tjk/kdchart-2.3.0-qt-4.8.5/lib -L/home/FLEXlm/FLEXlm_10/sun4_u5 -L/home/FLEXlm/FLEXlm_10/sun4_u5/activation/lib -L/home/tjk/python/libs -L/usr/ccs/lib -L/export/home/tjk/gnatpro-7.1.2/lib/gcc/sparc-sun-solaris2.8/4.7.3 -L/export/home/tjk/gnatpro-7.1.2/lib/gcc -L/export/home/tjk/gnatpro-7.1.2/lib ../../vc/lib/libcinterfacetoada.a ../../vc/lib/libcpputilsforada.a ../../libcommonada.a /home/TOOLS/libxml2/libxml2-2.6.27/lib/libxml2.a -llmgr_nomt -lcrvs -lsb /home/tjk/gnatpro-7.1.2/lib/gcc/sparc-sun-solaris2.8/4.7.3/adalib/libgnat.a -lsocket -lnsl -lintl -ldl -lpthread -lrt ../../vc/lib/libvxml_c.a ../../vc/lib/libcutilsforada.a /home/FLEXlm/FLEXlm_10/sun4_u5/lm_new.o -ldl -lm /home/TOOLS/libxml2/libxml2-2.6.27/lib/libxml2.a ../../vc/lib/libcinterfacetoadastubs.a ../../vc/lib/libcinterfacetoada_ada.a -lpthread -lrt /home/FLEXlm/FLEXlm_10/sun4_u5/lm_new.o -lm -lc -lc -lstdc++ -lm -lc -lc Note the duplication of lm_new.o and several system libraries (-lm and -lc). This causes problems with GNU binutils as there are multiply defined symbols when the lm_new.o object file is duplicated. What I noted is that this duplication does not happen on Linux: /home/GCC/gcc-4.1.2/bin/gnatmake -aI/home/Users/tjk/vector/build/cmakeLinux/Linux/.common-enums -aI/home/Users/tjk/vector/build/cmakeLinux/Linux/.chop_Linux -aI/home/Users/tjk/vector/build/cmakeLinux/Linux/.chop -aI/home/Users/tjk/vector/build/cmakeLinux/Linux/.chop_ada -aI/home/Users/tjk/vector/source/cmakeLinux/vcast/ -aI/home/Users/tjk/vector/source/cmakeLinux/vcast/TGT_IO -aO/home/Users/tjk/vector/build/cmakeLinux/Linux/vcast/CMakeFiles/commonada.dir -aO/home/Users/tjk/vector/build/cmakeLinux/Linux/vcast/CMakeFiles/commonada.dir/__/.chop -aO/home/Users/tjk/vector/build/cmakeLinux/Linux/vcast/CMakeFiles/commonada.dir/__/.common-enums monitor -o ../../vc/IO/monitor -cargs -largs -L/home/Users/tjk/vector/build/cmakeLinux/Linux -L/home/Users/tjk/vector/build/cmakeLinux/Linux/vc/lib -L/home/TOOLS/kdchart-2.3.0-qt-4.6.2-release-gcc-4.1.2-release/lib -L/home/FLEXlm/FLEXlm_11_9/i86_lsb -L/home/FLEXlm/FLEXlm_11_9/i86_lsb/activation/lib -L/home/TOOLS/python-2.7.5/libs -L/Unix_Volume/GCC/Linux/gcc-4.1.2/lib/gcc/i686-pc-linux-gnu/4.1.2 -L/Unix_Volume/GCC/Linux/gcc-4.1.2/lib/gcc -L/home/GCC/gcc-4.1.2/lib/gcc/i686-pc-linux-gnu/4.1.2 -L/Unix_Volume/GCC/Linux/gcc-4.1.2/lib -L/home/GCC/gcc-4.1.2/lib -rdynamic ../../vc/lib/libcinterfacetoada.a ../../vc/lib/libcpputilsforada.a ../../libcommonada.a /home/TOOLS/libxml2/libxml2-2.6.27/lib/libxml2.a -llmgr_nomt -lcrvs -lsb -lnoact -llmgr_dongle_stub /home/GCC/gcc-4.1.2/lib/gcc/i686-pc-linux-gnu/4.1.2/adalib/libgnat.a -lutil ../../vc/lib/libvxml_c.a ../../vc/lib/libcutilsforada.a /home/FLEXlm/FLEXlm_11_9/i86_lsb/lm_new.o -ldl -lm /home/TOOLS/libxml2/libxml2-2.6.27/lib/libxml2.a ../../vc/lib/libcompat_glib_workaround.a ../../vc/lib/libcinterfacetoadastubs.a ../../vc/lib/libcinterfacetoada_ada.a -lc -lstdc++ -lm -lc What do you need from me in terms of helping diagnose this issue? Thanks, Tom -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to find/run external host executables when using cross compiling
This is a case for using the ExternalProject module! You have a top level 'SuperBuild' whose job it is to find all the prerequisites for the actual project build. Then it configures and builds it. This means that the tricky configuration is handled by CMake, instead of working it out yourself by hand. The Superbuild can be part of the project's source tree. The simplest method is to make a SuperBuild subdirectory, and put in a CMakeLists.txt something like this: project(MySuperBuild) include(ExternalProject) # find all the prerequisite tools ExternalProject_Add(MyActualProject DOWNLOAD_COMMAND "" BINARY_DIR MyActualProject-build SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. # SuperBuild is subdir of source directory CMAKE_ARGS# all the arguments to configure your project. -DPERL_EXECUTABLE:STRING=${PERL_EXECUTABLE} # for example INSTALL_COMMAND ""# deployment not handled by install ) On 12/9/13 6:57 PM, "Eric Wing" wrote: >On 12/4/13, Eric Wing wrote: >> I'm currently trying to port a rather large, complex project to >> Android. It has an existing CMake project so I'm trying to leverage >> that. I've taken and enhanced one of the Android-CMake toolchains I've >> found. >> >> This particular project I'm porting has unfortunate dependencies on >> running the host system's Perl, Python, and Ruby interpreters to do >> various kinds of on-the-fly code generation. >> >> The problem I'm having is that with the cross-compilation toolchain, >> none of these (host) dependencies are found with CMake (I think it >> uses FindPackage) because the cross-compilation toolchain has >> sandboxed off everything to look in the target toolchain which won't >> have Perl/Python/Ruby (which is completely reasonable; I'm not >> complaining). >> >> But I need to solve this problem and figure out how to find/invoke the >> host Perl/Python/Ruby/etc so my cross-compile can work. >> >> Can anybody give me suggestions on how I should approach this? > >Bump. >I have a temporary workaround in place where I comment out the >find_package calls for Perl/Python/Ruby, and then use -D switches with >CMake to pre-populate the correct values for my host system. > >Thanks, >Eric >-- >Beginning iPhone Games Development >http://playcontrol.net/iphonegamebook/ >-- > >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://www.cmake.org/mailman/listinfo/cmake Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Windows XP + CMake + VS2013
Hi Andrey, > You should add CMake command option /|-T vc120_xp > |/ Many thanks! with best regards, Stefan -- 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://www.cmake.org/mailman/listinfo/cmake
[CMake] How to prevent .lib file to be installed?
Hi, I'm creating a 'plugin' DLL and want to prevent the associated .lib file to be installed (cause its not being used). My Install code looks like this now: install (TARGETS ${target} DESTINATION plugins COMPONENT plugins ) and it installs both a .DLL and a .lib file. Any simple fix? tk -- . Totte Karlsson, Ph.D. Dune Scientific, LLC 425-296 1980 (office) 425-780 9648 (cell) www.dunescientific.com . -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to prevent .lib file to be installed?
Am Dienstag, 10. Dezember 2013, 13:07:07 schrieb Totte Karlsson: > Hi, > I'm creating a 'plugin' DLL and want to prevent the associated .lib file > to be installed (cause its not being used). > > My Install code looks like this now: > > install (TARGETS ${target} > DESTINATION plugins > COMPONENT plugins > ) > > and it installs both a .DLL and a .lib file. Any simple fix? If it is a plugin, i.e. it is only opened using dlopen() or the Windows equivalent that I forgot the name, and never linked against, don't use SHARED but MODULE in the add_library() call. Eike signature.asc Description: This is a digitally signed message part. -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to prevent .lib file to be installed?
Great, worked perfect! Thanks, Tk On 12/10/2013 1:23 PM, Rolf Eike Beer wrote: Am Dienstag, 10. Dezember 2013, 13:07:07 schrieb Totte Karlsson: Hi, I'm creating a 'plugin' DLL and want to prevent the associated .lib file to be installed (cause its not being used). My Install code looks like this now: install (TARGETS ${target} DESTINATION plugins COMPONENT plugins ) and it installs both a .DLL and a .lib file. Any simple fix? If it is a plugin, i.e. it is only opened using dlopen() or the Windows equivalent that I forgot the name, and never linked against, don't use SHARED but MODULE in the add_library() call. Eike -- . Totte Karlsson, Ph.D. Dune Scientific, LLC 425-296 1980 (office) 425-780 9648 (cell) www.dunescientific.com . -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake