From steve.lorimer at gmail.com Thu Sep 1 01:16:48 2016 From: steve.lorimer at gmail.com (Steve Lorimer) Date: Thu, 1 Sep 2016 00:16:48 -0500 Subject: [CMake] set_directory_properties ADDITIONAL_MAKE_CLEAN_FILES globbing pattern? In-Reply-To: References: Message-ID: Is this just not possible? On 24 August 2016 at 11:35, Steve Lorimer wrote: > As part of our build process we tag certain binary files with version > information such as git branch, number of commits, build variant etc. > > Eg, for a binary called "app" we could install a file in the local source > directory with the name "app.branch_foo.91.debug" > > The shell globbing pattern that matches is "app.*[0-9]*" > > I need a globbing pattern because the tag can change without the makefiles > changing, so the tag can't be hardcoded into the makefile. > > If I specify a globbing pattern for ADDITIONAL_MAKE_CLEAN_FILES it > specifies this as an actual file > > set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES > app.*[0-9]*) > > This results in > > file(REMOVE_RECURSE > "../../../app/app.*[0-9]*" > ... > ) > > I've tried adding a nested file(GLOB ...) into the > set_directory_properties but that doesn't work either. > > Is it possible to specify a globbing pattern in set_directory_properties(PROPERTIES > ADDITIONAL_MAKE_CLEAN_FILES ...)? > > Is it possible to specify a globbing pattern in file(REMOVE_RECURSE ...)? > > TIA > Steve > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick at appletonaudio.com Thu Sep 1 01:34:39 2016 From: nick at appletonaudio.com (nick at appletonaudio.com) Date: Thu, 01 Sep 2016 15:34:39 +1000 Subject: [CMake] CMake library installations and pkg-config In-Reply-To: <1241801472650343@web16o.yandex.ru> References: <6BE05649-B850-412A-BEAC-CF485D91EDF0@appletonaudio.com> <1241801472650343@web16o.yandex.ru> Message-ID: On 2016-08-31 23:32, Konstantin Tokarev wrote: > 31.08.2016, 16:22, "Nick Appleton" : >> Hi, >> >> I?ve been recently doing a bit of work for an open source project >> trying to extend it?s support for CMake. I?ve been trying to get CMake >> to be able to replicate most of the functionality which can be >> achieved with the existing autoconf-based infrastructure (and have had >> pretty good success) but am struggling to figure out how to get CMake >> to generate pkg-config files on unix-ey systems. I?ve done quite a lot >> of searching, but have not found anything which provides a good >> solution for our use case. > > Do you consider contributing to > https://api.kde.org/ecm/module/ECMGeneratePkgConfigFile.html ? > Hi Konstantin, Thanks for the reply and pointing me at the ECM repository. I was hoping that this would be something that CMake would be able to do without requiring an external package - particularly since CMake provides support for finding packages on the system with pkg-config files. I think adding documentation to our project which says "if you want to install portaudio into the host system in a way compatible with autotools-based projects, you will need to get this other repository" seems a little bit much to me. Cheers, Nick From annulen at yandex.ru Thu Sep 1 11:44:00 2016 From: annulen at yandex.ru (Konstantin Tokarev) Date: Thu, 01 Sep 2016 18:44:00 +0300 Subject: [CMake] CMake library installations and pkg-config In-Reply-To: References: <6BE05649-B850-412A-BEAC-CF485D91EDF0@appletonaudio.com> <1241801472650343@web16o.yandex.ru> Message-ID: <45781472744640@web3j.yandex.ru> 01.09.2016, 08:34, "nick at appletonaudio.com" : > On 2016-08-31 23:32, Konstantin Tokarev wrote: >> ?31.08.2016, 16:22, "Nick Appleton" : >>> ?Hi, >>> >>> ?I?ve been recently doing a bit of work for an open source project >>> ?trying to extend it?s support for CMake. I?ve been trying to get CMake >>> ?to be able to replicate most of the functionality which can be >>> ?achieved with the existing autoconf-based infrastructure (and have had >>> ?pretty good success) but am struggling to figure out how to get CMake >>> ?to generate pkg-config files on unix-ey systems. I?ve done quite a lot >>> ?of searching, but have not found anything which provides a good >>> ?solution for our use case. >> >> ?Do you consider contributing to >> ?https://api.kde.org/ecm/module/ECMGeneratePkgConfigFile.html ? > > Hi Konstantin, > > Thanks for the reply and pointing me at the ECM repository. > > I was hoping that this would be something that CMake would be able to do > without requiring an external package - particularly since CMake > provides support for finding packages on the system with pkg-config > files. I think adding documentation to our project which says "if you > want to install portaudio into the host system in a way compatible with > autotools-based projects, you will need to get this other repository" > seems a little bit much to me. It's a usual practice to copy ECM modules into your project, they mostly don't depend on each other. For example, ECMGeneratePkgConfigFile is completely stand-alone. > > Cheers, > > Nick -- Regards, Konstantin From steveire at gmail.com Thu Sep 1 12:57:32 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 01 Sep 2016 18:57:32 +0200 Subject: [CMake] User-overriding IMPORTED targets (overlaying libraries, ...) References: <1472644654.10750.42.camel@intelfx.name> Message-ID: Ivan Shapovalov wrote: > Of course, I can always edit the FooConfig.cmake file manually, but I'd > better avoid patching anything (installing new files or running any > cmake commands is OK). > > Is there any nice way to solve this? After find_package(Foo CONFIG) do set_property(TARGET Foo::Foo PROPERTY LOCATION "foo_overlay.so") Apply whatever platform-specific conditions, suffix and prefix are appropriate. Thanks, Steve. From steveire at gmail.com Thu Sep 1 12:53:04 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 01 Sep 2016 18:53:04 +0200 Subject: [CMake] set_directory_properties ADDITIONAL_MAKE_CLEAN_FILES globbing pattern? References: Message-ID: Steve Lorimer wrote: > Is this just not possible? Indeed - this is not possible. Thanks, Steve. From ning.an at ghiocel-tech.com Thu Sep 1 16:15:46 2016 From: ning.an at ghiocel-tech.com (ning.an at ghiocel-tech.com) Date: 1 Sep 2016 20:15:46 -0000 Subject: [CMake] Error: no cmake_fortran_compiler could be found. Message-ID: <20160901201546.23188.qmail@ns25.webmasters.com> Dear There, This is first time to use CMAKE. I got the error that says "no cmake_fortran_compiler could be found." I use it on Windows 8.1, which have installed Visual Studio Community 2015, Intel FORTRAN Composer XE 2013, and CUDA 7.0. The Fortran compiler identification is unknown CMake Error at CMakeLists.txt:9 (project): No CMAKE_Fortran_COMPILER could be found. When I run CMake GUI to configure it. I guess that CMake may need environment variable to tell the Fortran compiler, but I don't know what this enviroment variable should be. Please give me a hand to solve it. Thank you very much. Ning An -------------- next part -------------- An HTML attachment was scrubbed... URL: From demelier.david at gmail.com Fri Sep 2 07:12:27 2016 From: demelier.david at gmail.com (David Demelier) Date: Fri, 02 Sep 2016 13:12:27 +0200 Subject: [CMake] Include directories problem when cross compiling with MinGW Message-ID: <1472814747.4005.6.camel@gmail.com> Hello, I'm trying to cross compile a project on Arch Linux using MinGW for Windows. I've installed a lot of libraries from their AUR into?/usr/x86_64-w64- mingw32. This seems okay as CMake finds every library needed. My example project consists of: cmake_minimum_required(VERSION 3.5) project(test) find_package(PNG REQUIRED) add_executable(main main.cpp) target_link_libraries(main PNG::PNG) The main.cpp only contains an #include statement. The toolchain file contains: set (CMAKE_SYSTEM_NAME Windows) set (CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) set (CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) set (CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set (QT_BINARY_DIR /usr/x86_64-w64-mingw32/bin /usr/bin) set (QT_INCLUDE_DIRS_NO_SYSTEM ON) set (CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) set (CMAKE_MC_COMPILER x86_64-w64-mingw32-windmc) set (Boost_THREADAPI win32) set (CMAKE_Fortran_COMPILER x86_64-w64-mingw32-gfortran) set (CMAKE_AR:FILEPATH x86_64-w64-mingw32-ar) set (CMAKE_RANLIB:FILEPATH x86_64-w64-mingw32-ranlib) Then, running CMake with that toolchain produce: $ cmake -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-x86_64-w64- mingw32.cmake .. -- The C compiler identification is GNU 6.1.1 -- The CXX compiler identification is GNU 6.1.1 -- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc -- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ -- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found ZLIB: /usr/x86_64-w64-mingw32/lib/libz.dll.a (found version "1.2.8")? -- Found PNG: /usr/x86_64-w64-mingw32/lib/libpng.dll.a (found version "1.6.24")? -- Configuring done -- Generating done -- Build files have been written to: /tmp/test/build So as you can see, the libraries are correctly found. However, compile fails with: $ make Scanning dependencies of target main [ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.obj In file included from /tmp/test/main.cpp:1:0: /usr/x86_64-w64-mingw32/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory ?#include_next ?????????????????????????^ compilation terminated. The includes directories specified in the CMakeFiles/main.dir/includes_CSS.rsp seems to be the culprit: $ cat CMakeFiles/main.dir/includes_CXX.rsp -isystem /usr/x86_64-w64-mingw32/include? Removing that option from the file ends with a successful build. I don't understand why it does not work with that because stdlib.h can be found as /usr/x86_64-w64-mingw32/include/stdilb.h. Do you have any clue? Regards, --? David Demelier From annulen at yandex.ru Fri Sep 2 08:34:12 2016 From: annulen at yandex.ru (Konstantin Tokarev) Date: Fri, 02 Sep 2016 15:34:12 +0300 Subject: [CMake] Error: no cmake_fortran_compiler could be found. In-Reply-To: <20160901201546.23188.qmail@ns25.webmasters.com> References: <20160901201546.23188.qmail@ns25.webmasters.com> Message-ID: <598621472819652@web3h.yandex.ru> 01.09.2016, 23:22, "ning.an at ghiocel-tech.com" : > Dear There, > > This is first time to use CMAKE. I got the error that says "no cmake_fortran_compiler could be found." > I use it on Windows 8.1, which have installed Visual Studio Community 2015, Intel FORTRAN Composer XE 2013, and CUDA 7.0. > > ??? The Fortran compiler identification is unknown > ??? CMake Error at CMakeLists.txt:9 (project): > ??? No CMAKE_Fortran_COMPILER could be found. > > When I run CMake GUI to configure it. I guess that CMake may need environment variable to tell the Fortran compiler, but I don't know what this enviroment variable should be. FC, how else can it be named :) > > Please give me a hand to solve it. > > Thank you very much. > > Ning An > > ,-- > > 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 cottoncandycoder at gmail.com Tue Sep 6 04:56:56 2016 From: cottoncandycoder at gmail.com (Cotton Candy) Date: Tue, 6 Sep 2016 10:56:56 +0200 Subject: [CMake] works when I build using XCode, but not with CMake makefile Message-ID: Hi, I have a project that I originally coded up using XCode. It builds and runs just fine using XCode. Now I have tried to set up the same project using CMake to generate a makefile. The project builds 100% without any errors using 'make', but the resulting code doesn't work. I get error: dyld: Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/schurger/tmp/test_CMake2/./skedmo-solver Reason: image not found Trace/BPT trap: 5 Any idea how it could build OK without any errors if there was a missing library? Thanks! Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From steinbach at scionics.de Tue Sep 6 05:03:16 2016 From: steinbach at scionics.de (Peter Steinbach) Date: Tue, 6 Sep 2016 11:03:16 +0200 Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: References: Message-ID: Hi Mr. Cotton ;), is the location of libmysqlclient* available through DYLD_LIBRARY_PATH at runtime of your code? Best, P On 09/06/2016 10:56 AM, Cotton Candy wrote: > Hi, > I have a project that I originally coded up using XCode. It builds and runs > just fine using XCode. Now I have tried to set up the same project using > CMake to generate a makefile. The project builds 100% without any errors > using 'make', but the resulting code doesn't work. I get error: > dyld: Library not loaded: libmysqlclient.18.dylib > Referenced from: /Users/schurger/tmp/test_CMake2/./skedmo-solver > Reason: image not found > Trace/BPT trap: 5 > > Any idea how it could build OK without any errors if there was a missing > library? > > Thanks! > Aaron > > > From steinbach at scionics.de Tue Sep 6 08:20:18 2016 From: steinbach at scionics.de (Peter Steinbach) Date: Tue, 6 Sep 2016 14:20:18 +0200 Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: References: Message-ID: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> Aaron, it's about the way that you compile your binary and link libmysqlclient into it. I guess (@all: please correct me if I am wrong) as I don't know how you use cmake to build your libraries/binaries, that you don't set the rpath of libmysqlclient inside your binary. Doing so will ensure that the absolute path of libmysqlclient is stored into your binary, so that the runtime environment can pick it up and use (keeping fingers crossed that the path is still valid). The alternative to doing so, is linking against the static version of libmysqlclient (which comes at a cost on another front as well). Best, P From cottoncandycoder at gmail.com Tue Sep 6 14:12:52 2016 From: cottoncandycoder at gmail.com (Cotton Candy) Date: Tue, 6 Sep 2016 20:12:52 +0200 Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> Message-ID: Peter, In XCode I have this list of "settings" that includes "Other Linker Flags" that I have set to "-lmysqlclient -lpthread -lm -lz" and "Other C++ Flags" that I have set to "-L/Applications/MAMP/Library/lib -lmysqlclient -lpthread -lz" Maybe these explain why things work when I build with XCode, but not with CMake. In my CMakeLists.txt file I included: set( CMAKE_CXX_FLAGS "-L/Applications/MAMP/Library/lib -lmysqlclient -lpthread -lz" ) set( CMAKE_EXE_LINKER_FLAGS "-lmysqlclient -lpthread -lm -lz" ) but when I run the make it always says it is ignoring these (e.g. "warning: argument unused during compilation: '-L/Applications/MAMP/Library/lib'"). Thanks again for you help. Aaron On Tue, Sep 6, 2016 at 2:20 PM, Peter Steinbach wrote: > Aaron, > > it's about the way that you compile your binary and link libmysqlclient > into it. I guess (@all: please correct me if I am wrong) as I don't know > how you use cmake to build your libraries/binaries, that you don't set the > rpath of libmysqlclient inside your binary. Doing so will ensure that the > absolute path of libmysqlclient is stored into your binary, so that the > runtime environment can pick it up and use (keeping fingers crossed that > the path is still valid). The alternative to doing so, is linking against > the static version of libmysqlclient (which comes at a cost on another > front as well). > > Best, > P > -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Tue Sep 6 14:21:32 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 6 Sep 2016 14:21:32 -0400 Subject: [CMake] Job Posting: Software Developer at Kitware Message-ID: Folks, I wanted to draw your attention to this job posting: https://www.smartrecruiters.com/kitware/90427842-software-developer The posting itself is quite general and targets multiple teams, so I figured I'd give a few more details on what our team is looking for. We are the VTK, ParaView, VTK-m (and related technologies) team. If you think you can make contributions to these projects on algorithms or applications side, then certainly apply. At the same time, however, if you are a systems guy or gal, with interests in the workings of different computer systems including Crays, BlueGenes, with aptitude for overcoming platform (and compiler) quirks, or are at home with CMake scripts, then you may be a good match. If development workflows is your thing: toying with testing systems like Buildbot, setting up Git hooks and configurations to simplify development, etc, then this job posting may be of interest to you too. We routinely work with various National (and Intentional) Labs to get our tools built and deployed on the latest and greatest super-computing system. If that's of interest to you, I'd strongly encourage you to apply for this position. If you have any questions, feel free to email me directly. Look forward to hearing from you all. Utkarsh From dushistov at gmail.com Tue Sep 6 18:01:37 2016 From: dushistov at gmail.com (Evgeniy Dushistov) Date: Wed, 7 Sep 2016 01:01:37 +0300 Subject: [CMake] add_custom_command dependencies from file? Message-ID: Hi, I need to solve problem described here: https://cmake.org/pipermail/cmake/2005-August/007091.html Basically I have test.i (swig input): %module native %include "lib.hpp" %{ #include "lib.hpp" %} swig with -M option can tell that generated by it code depend on "lib.hpp", but how I can reuse this data, can add_custom_command accept input from file, not from variable? Is something changed till 2005? From ewmailing at gmail.com Tue Sep 6 19:52:12 2016 From: ewmailing at gmail.com (Eric Wing) Date: Tue, 6 Sep 2016 16:52:12 -0700 Subject: [CMake] How to codesign .msi from WIX/CPack? Message-ID: I'm finally trying the WIX/CPack MSI generator. Pretty nice! One thing I need to do is instruct the build process to codesign via signtool.exe. I've managed to figure out how to codesign my .exe via a POST_BUILD add_custom_command step. But now I would like to make sure the .msi that gets generated also gets code signed. But I can't figure out how to do it. I seem to need at least two things: 1) A post-build hook into the PACKAGE target (add_custom_command doesn't seem to do anything when I try to refer to this target). 2) The name and location of the .msi that CPack/WIX generated so I can refer to it with the signtool command. Any advice? Thanks, Eric From Robert.Bielik at dirac.com Wed Sep 7 02:55:15 2016 From: Robert.Bielik at dirac.com (Robert Bielik) Date: Wed, 7 Sep 2016 06:55:15 +0000 Subject: [CMake] Windows path too long Message-ID: <75e960c69ce7440bb34b24603346e400@hosted3-mb01.itm.host> I have a problem with a VS 2015 project, where the build state path becomes too long: Severity Code Description Project File Line Suppression State Error MSB3491 Could not write lines to file "processor_withAVeryVeryLongName.dir\Release\processo.92BD73FC.tlog\processor_withAVeryVeryLongName.lastbuildstate". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. processor_withAVeryVeryLongName C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 312 The line in Microsoft.CppBuild.targets is: I've set CMAKE_OBJECT_PATH_MAX to 240, but I don't think it will affect this... Ideas ? This is with CMake 3.5.2. Regards /Robert From steinbach at scionics.de Wed Sep 7 03:36:31 2016 From: steinbach at scionics.de (Peter Steinbach) Date: Wed, 7 Sep 2016 09:36:31 +0200 Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> Message-ID: <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> Hi Mr Candy (I am still getting a heck out of cottoncandycoder, sorry :D ) 1) the way you do it, is not really the way cmake should be used AFAIK. > In my CMakeLists.txt file I included: > set( CMAKE_CXX_FLAGS "-L/Applications/MAMP/Library/lib -lmysqlclient > -lpthread -lz" ) > set( CMAKE_EXE_LINKER_FLAGS "-lmysqlclient -lpthread -lm -lz" ) change this to: #I assume you have something like this somewhere add_executable(my_exe_name SOURCES my_exe_name.???) #here comes the "magic" link_directories(/Applications/MAMP/Library/lib) target_link_libraries(mysqlclient pthread m z) In theory, if all those dependencies are available at cmake-invocation, this should emit compiler calls that produce your binary and link mysqlclient into it (by default with using RPATH, see the docs on this: https://cmake.org/cmake/help/v3.0/prop_tgt/MACOSX_RPATH.html#prop_tgt:MACOSX_RPATH ). Depending on whether you wanna distribute your binary and cannot be sure if (at build time) pthreads etc are available, there are cmake find modules for pthreads and libz (FindThreads, FindZLIB) which you can use. libm should come with the libc of the system AFAIK. I also just checked but up to cmake 3.5, there is no MYSQL Find module. Which is kinda sad as there is a FindPostgreSQL module. :( If there would be, you could use it in a (hopefully) platform independent way and not bother with finding the right paths to libmysqlclient. 2) The compiler flags you posted do not explain, why Xcode apparently sets the rpath inside the binary and your cmake script doesn't (haven't seen the full CMakeLists.txt of your project yet). I hope the above gets you going. @cmake developers: it would be nice to have more obvious pointers to cmake example projects like an example SDK or so. If there is, please let me know. I only found this: http://www.vtk.org/Wiki/CMake/Examples#Finding_Packages but that's tied to vtk. Best, peter On 09/06/2016 08:12 PM, Cotton Candy wrote: > Peter, > In XCode I have this list of "settings" that includes > "Other Linker Flags" that I have set to "-lmysqlclient -lpthread -lm -lz" > and > "Other C++ Flags" that I have set to "-L/Applications/MAMP/Library/lib > -lmysqlclient -lpthread -lz" > > Maybe these explain why things work when I build with XCode, but not with > CMake. > > > but when I run the make it always says it is ignoring these (e.g. "warning: > argument unused during compilation: '-L/Applications/MAMP/Library/lib'"). > > Thanks again for you help. > Aaron > > > > > > On Tue, Sep 6, 2016 at 2:20 PM, Peter Steinbach > wrote: > >> Aaron, >> >> it's about the way that you compile your binary and link libmysqlclient >> into it. I guess (@all: please correct me if I am wrong) as I don't know >> how you use cmake to build your libraries/binaries, that you don't set the >> rpath of libmysqlclient inside your binary. Doing so will ensure that the >> absolute path of libmysqlclient is stored into your binary, so that the >> runtime environment can pick it up and use (keeping fingers crossed that >> the path is still valid). The alternative to doing so, is linking against >> the static version of libmysqlclient (which comes at a cost on another >> front as well). >> >> Best, >> P >> > From cottoncandycoder at gmail.com Wed Sep 7 07:18:25 2016 From: cottoncandycoder at gmail.com (Cotton Candy) Date: Wed, 7 Sep 2016 13:18:25 +0200 Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> Message-ID: Hi Peter, I attach my CMakeLists.txt file as well as the FindMySQL.cmake finder that I used, in case these help. I still get the same error when I run the executable: dyld: Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/schurger/tmp/test_CMake2/./skedmo-solver Reason: image not found Trace/BPT trap: 5 This library (libmysqlclient.18.dylib) is in /usr/lib on my machine. Thanks for all your help. Aaron On Wed, Sep 7, 2016 at 9:36 AM, Peter Steinbach wrote: > Hi Mr Candy (I am still getting a heck out of cottoncandycoder, sorry :D ) > > 1) the way you do it, is not really the way cmake should be used AFAIK. > > In my CMakeLists.txt file I included: > > set( CMAKE_CXX_FLAGS "-L/Applications/MAMP/Library/lib -lmysqlclient > > -lpthread -lz" ) > > set( CMAKE_EXE_LINKER_FLAGS "-lmysqlclient -lpthread -lm -lz" ) > > change this to: > #I assume you have something like this somewhere > add_executable(my_exe_name SOURCES my_exe_name.???) > #here comes the "magic" > link_directories(/Applications/MAMP/Library/lib) > target_link_libraries(mysqlclient pthread m z) > > In theory, if all those dependencies are available at cmake-invocation, > this should emit compiler calls that produce your binary and link > mysqlclient into it (by default with using RPATH, see the docs on this: > https://cmake.org/cmake/help/v3.0/prop_tgt/MACOSX_RPATH. > html#prop_tgt:MACOSX_RPATH > ). Depending on whether you wanna distribute your binary and cannot be > sure if (at build time) pthreads etc are available, there are cmake find > modules for pthreads and libz (FindThreads, FindZLIB) which you can use. > libm should come with the libc of the system AFAIK. > > I also just checked but up to cmake 3.5, there is no MYSQL Find module. > Which is kinda sad as there is a FindPostgreSQL module. :( If there would > be, you could use it in a (hopefully) platform independent way and not > bother with finding the right paths to libmysqlclient. > > 2) The compiler flags you posted do not explain, why Xcode apparently sets > the rpath inside the binary and your cmake script doesn't (haven't seen the > full CMakeLists.txt of your project yet). > > I hope the above gets you going. > > @cmake developers: it would be nice to have more obvious pointers to cmake > example projects like an example SDK or so. If there is, please let me > know. I only found this: > http://www.vtk.org/Wiki/CMake/Examples#Finding_Packages > but that's tied to vtk. > > Best, > peter > > On 09/06/2016 08:12 PM, Cotton Candy wrote: > > Peter, > > In XCode I have this list of "settings" that includes > > "Other Linker Flags" that I have set to "-lmysqlclient -lpthread -lm -lz" > > and > > "Other C++ Flags" that I have set to "-L/Applications/MAMP/Library/lib > > -lmysqlclient -lpthread -lz" > > > > Maybe these explain why things work when I build with XCode, but not with > > CMake. > > > > > > but when I run the make it always says it is ignoring these (e.g. > "warning: > > argument unused during compilation: '-L/Applications/MAMP/Library/ > lib'"). > > > > Thanks again for you help. > > Aaron > > > > > > > > > > > > On Tue, Sep 6, 2016 at 2:20 PM, Peter Steinbach > > wrote: > > > >> Aaron, > >> > >> it's about the way that you compile your binary and link libmysqlclient > >> into it. I guess (@all: please correct me if I am wrong) as I don't know > >> how you use cmake to build your libraries/binaries, that you don't set > the > >> rpath of libmysqlclient inside your binary. Doing so will ensure that > the > >> absolute path of libmysqlclient is stored into your binary, so that the > >> runtime environment can pick it up and use (keeping fingers crossed that > >> the path is still valid). The alternative to doing so, is linking > against > >> the static version of libmysqlclient (which comes at a cost on another > >> front as well). > >> > >> Best, > >> P > >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- cmake_minimum_required(VERSION 3.5) project(skedmo_solver_lean) #set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_BUILD_TYPE Debug) set(SOURCE_FILES cgi_input.cpp cgi_input.h main.cpp main.h solver.cpp solver.h stack.cpp stack.h supporting.cpp supporting.h) set(skedmo_INCLUDE_DIRS /usr/local/eigen /usr/local/boost_1_56_0 /usr/local/connector-c/include /usr/local/connector-c/lib /usr/local/lib /usr/local/connector-c) include_directories(${skedmo_INCLUDE_DIRS}) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/Users/schurger/Dropbox/Skedmo/skedmo-solver-lean/cmake/") find_package(MySQL) add_executable(skedmo-solver ${SOURCE_FILES}) link_directories(/Applications/MAMP/Library/lib /usr/lib) target_link_libraries(skedmo-solver mysqlclient pthread m z) target_link_libraries(skedmo-solver ${MYSQL_LIBRARY}) -------------- next part -------------- A non-text attachment was scrubbed... Name: FindMySQL.cmake Type: application/octet-stream Size: 1231 bytes Desc: not available URL: From clinton at elemtech.com Wed Sep 7 08:52:42 2016 From: clinton at elemtech.com (clinton at elemtech.com) Date: Wed, 7 Sep 2016 06:52:42 -0600 (MDT) Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> Message-ID: <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> It may help to include the output of "otool -L" on skedmo-solver, /usr/lib/libmysqlclient.18.dylib and /Applications/MAMP/Library/lib/libmysqlclient.18.dylib. And it may also help to see if there is a difference in the otool output in the Xcode vs makefile scenario. Also, it may help to check the output of "otool -l skedmo-solver" for both the Xcode and makefile scenario. Clint ----- On Sep 7, 2016, at 5:18 AM, Cotton Candy wrote: > Hi Peter, > I attach my CMakeLists.txt file as well as the FindMySQL.cmake finder that I > used, in case these help. > I still get the same error when I run the executable: > dyld: Library not loaded: libmysqlclient.18.dylib > Referenced from: /Users/schurger/tmp/test_CMake2/./skedmo-solver > Reason: image not found > Trace/BPT trap: 5 > This library (libmysqlclient.18.dylib) is in /usr/lib on my machine. > Thanks for all your help. > Aaron > On Wed, Sep 7, 2016 at 9:36 AM, Peter Steinbach < steinbach at scionics.de > wrote: >> Hi Mr Candy (I am still getting a heck out of cottoncandycoder, sorry :D ) >> 1) the way you do it, is not really the way cmake should be used AFAIK. >> > In my CMakeLists.txt file I included: >> > set( CMAKE_CXX_FLAGS "-L/Applications/MAMP/Library/lib -lmysqlclient >> > -lpthread -lz" ) >> > set( CMAKE_EXE_LINKER_FLAGS "-lmysqlclient -lpthread -lm -lz" ) >> change this to: >> #I assume you have something like this somewhere >> add_executable(my_exe_name SOURCES my_exe_name.???) >> #here comes the "magic" >> link_directories(/Applications/MAMP/Library/lib) >> target_link_libraries(mysqlclient pthread m z) >> In theory, if all those dependencies are available at cmake-invocation, this >> should emit compiler calls that produce your binary and link mysqlclient into >> it (by default with using RPATH, see the docs on this: >> https://cmake.org/cmake/help/v3.0/prop_tgt/MACOSX_RPATH.html#prop_tgt:MACOSX_RPATH >> ). Depending on whether you wanna distribute your binary and cannot be sure if >> (at build time) pthreads etc are available, there are cmake find modules for >> pthreads and libz (FindThreads, FindZLIB) which you can use. libm should come >> with the libc of the system AFAIK. >> I also just checked but up to cmake 3.5, there is no MYSQL Find module. Which is >> kinda sad as there is a FindPostgreSQL module. :( If there would be, you could >> use it in a (hopefully) platform independent way and not bother with finding >> the right paths to libmysqlclient. >> 2) The compiler flags you posted do not explain, why Xcode apparently sets the >> rpath inside the binary and your cmake script doesn't (haven't seen the full >> CMakeLists.txt of your project yet). >> I hope the above gets you going. >> @cmake developers: it would be nice to have more obvious pointers to cmake >> example projects like an example SDK or so. If there is, please let me know. I >> only found this: >> http://www.vtk.org/Wiki/CMake/Examples#Finding_Packages >> but that's tied to vtk. >> Best, >> peter >> On 09/06/2016 08:12 PM, Cotton Candy wrote: >> > Peter, >> > In XCode I have this list of "settings" that includes >> > "Other Linker Flags" that I have set to "-lmysqlclient -lpthread -lm -lz" >> > and >> > "Other C++ Flags" that I have set to "-L/Applications/MAMP/Library/lib >> > -lmysqlclient -lpthread -lz" >> > Maybe these explain why things work when I build with XCode, but not with >> > CMake. >> > but when I run the make it always says it is ignoring these (e.g. "warning: >> > argument unused during compilation: '-L/Applications/MAMP/Library/lib'"). >> > Thanks again for you help. >> > Aaron >> > On Tue, Sep 6, 2016 at 2:20 PM, Peter Steinbach < steinbach at scionics.de > >> > wrote: >> >> Aaron, >> >> it's about the way that you compile your binary and link libmysqlclient >> >> into it. I guess (@all: please correct me if I am wrong) as I don't know >> >> how you use cmake to build your libraries/binaries, that you don't set the >> >> rpath of libmysqlclient inside your binary. Doing so will ensure that the >> >> absolute path of libmysqlclient is stored into your binary, so that the >> >> runtime environment can pick it up and use (keeping fingers crossed that >> >> the path is still valid). The alternative to doing so, is linking against >> >> the static version of libmysqlclient (which comes at a cost on another >> >> front as well). >> >> Best, >> >> P > -- > 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 Sep 7 09:07:07 2016 From: DLRdave at aol.com (David Cole) Date: Wed, 7 Sep 2016 09:07:07 -0400 Subject: [CMake] Windows path too long In-Reply-To: <75e960c69ce7440bb34b24603346e400@hosted3-mb01.itm.host> References: <75e960c69ce7440bb34b24603346e400@hosted3-mb01.itm.host> Message-ID: <3CDE538B-8A0B-4636-8923-72CE012B9057@aol.com> I suppose the obvious "use shorter paths and names" is not possible or hard to enforce? David > On Sep 7, 2016, at 2:55 AM, Robert Bielik wrote: > > I have a problem with a VS 2015 project, where the build state path becomes too long: > > Severity Code Description Project File Line Suppression State > Error MSB3491 Could not write lines to file "processor_withAVeryVeryLongName.dir\Release\processo.92BD73FC.tlog\processor_withAVeryVeryLongName.lastbuildstate". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. processor_withAVeryVeryLongName C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 312 > > The line in Microsoft.CppBuild.targets is: > > > > I've set CMAKE_OBJECT_PATH_MAX to 240, but I don't think it will affect this... > > Ideas ? > > This is with CMake 3.5.2. > > Regards > /Robert > > -- > > 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 Wed Sep 7 09:10:23 2016 From: DLRdave at aol.com (David Cole) Date: Wed, 7 Sep 2016 09:10:23 -0400 Subject: [CMake] How to codesign .msi from WIX/CPack? In-Reply-To: References: Message-ID: There may be a hook at the CPack level you can implement, but I'd have to dig to figure out what it is and if it even presently exists. The easy thing to do would be to implement a custom target which does two custom commands: the first the same as CPack (the built-in package target) and the second, a custom command to sign the generated .msi file. David > On Sep 6, 2016, at 7:52 PM, Eric Wing wrote: > > I'm finally trying the WIX/CPack MSI generator. Pretty nice! > > One thing I need to do is instruct the build process to codesign via > signtool.exe. I've managed to figure out how to codesign my .exe via a > POST_BUILD add_custom_command step. > > But now I would like to make sure the .msi that gets generated also > gets code signed. But I can't figure out how to do it. > > > I seem to need at least two things: > > 1) A post-build hook into the PACKAGE target (add_custom_command > doesn't seem to do anything when I try to refer to this target). > > 2) The name and location of the .msi that CPack/WIX generated so I can > refer to it with the signtool command. > > > Any advice? > > Thanks, > Eric > -- > > 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 david.manthey at kitware.com Wed Sep 7 09:47:42 2016 From: david.manthey at kitware.com (David Manthey) Date: Wed, 7 Sep 2016 09:47:42 -0400 Subject: [CMake] Using the same file in multiple tests with ExternalData Message-ID: I found a bug using the same external data file with multiple tests. When I specify the same file in three different tests, I get an error: CMake Error: Attempt to add a custom rule to output "/home/ubuntu/misc/large_image/_build/data/plugins/large_image/sample_image.ptif.sha512-stamp.rule" which already has a custom rule. Specifically, I'm using cmake ExternalData via the route exposed in Girder's build process. I have a branch here: *https://github.com/DigitalSlideArchive/large_image/blob/0b06690265866d3bb3f0f92132716fe1e5ad3c69/plugin.cmake#L74 * where I include external data in multiple tests. I have three test files that are used in various tests, but not all are used in each test. I can use any data file TWICE, but not three times. The error is thrown when add_custom_command is called in Modules/ExternalData.cmake, and that function(ExternalData_add_target target) is called the number of times I expect. This function sets a variable called _ExternalData_FILE_${file} to avoid adding custom commands more than once, but the context is such that this variable is never set when the function gets called. I have attached a patch that fixes this problem and tests the fix. - David -- David Manthey R&D Engineer Kitware Inc. (518) 881-4439 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Allow-external-files-in-multiple-tests.patch Type: application/octet-stream Size: 3778 bytes Desc: not available URL: From jack.stalnaker at gmail.com Wed Sep 7 12:31:06 2016 From: jack.stalnaker at gmail.com (Jack Stalnaker) Date: Wed, 7 Sep 2016 11:31:06 -0500 Subject: [CMake] Visual Studios platform choice Message-ID: Hi, I understand from reading this newgroup (e.g. https://cmake.org/pipermail/cmake/2013-March/053775.html) that the only way to support multiple platforms in Visual Studio is to run CMake multiple times, once for each platform. I'm porting some linux based code to the Windows world, and the Windows dev showed me that in Visual Studio, platform choice is a pulldown menu at the top of the screen. This pulldown appears even if we run CMake without specifying a 64 bit platform. This is a bit confusing, because we've only generated a solution and project file for 32 bit. So what happens when someone selects 64 bit on the pulldown menu? What's being built? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From masariello+cmake.org at gmail.com Wed Sep 7 13:18:57 2016 From: masariello+cmake.org at gmail.com (Alessio) Date: Wed, 7 Sep 2016 18:18:57 +0100 Subject: [CMake] How can I silence a cmake warning? Message-ID: Hi All Quick question: how can silence the following warnings? Thank you! CMake Warning at cmake/TargetFunctions.cmake:383 (add_library): Cannot generate a safe runtime search path for target pyfinlinearPy because there is a cycle in the constraint graph: dir 0 is [/some/path] dir 2 must precede it due to runtime library [libcurl.so.4] dir 1 is [/some/other/path] dir 2 is [/yet/another/path] dir 0 must precede it due to runtime library [libpython2.7.so.1.0] dir 3 is [/etc/etc/etc] ... -------------- next part -------------- An HTML attachment was scrubbed... URL: From intelfx at intelfx.name Wed Sep 7 13:41:11 2016 From: intelfx at intelfx.name (Ivan Shapovalov) Date: Wed, 07 Sep 2016 20:41:11 +0300 Subject: [CMake] User-overriding IMPORTED targets (overlaying libraries, ...) In-Reply-To: References: <1472644654.10750.42.camel@intelfx.name> Message-ID: <1473270071.2344.15.camel@intelfx.name> On 2016-09-01 at 18:57 +0200, Stephen Kelly wrote: > Ivan Shapovalov wrote: > > > > > Of course, I can always edit the FooConfig.cmake file manually, but > > I'd > > better avoid patching anything (installing new files or running any > > cmake commands is OK). > > > > Is there any nice way to solve this? > > After? > > ?find_package(Foo CONFIG) > > do > > ?set_property(TARGET Foo::Foo PROPERTY LOCATION "foo_overlay.so") > > Apply whatever platform-specific conditions, suffix and prefix are? > appropriate. Yes, I thought of this, but I'd better avoid patching either project's buildsystem. Is it possible to do this entirely by installing new files or passing arguments in cmake command line? Thanks, -- Ivan Shapovalov / intelfx / -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: This is a digitally signed message part URL: From cottoncandycoder at gmail.com Wed Sep 7 14:52:12 2016 From: cottoncandycoder at gmail.com (Cotton Candy) Date: Wed, 7 Sep 2016 20:52:12 +0200 Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> Message-ID: Here is the output from otool -L on skedmo-solver that you requested: skedmo-solver: libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) on /usr/lib/libmysqlclient.18.dylib I get an error aaron-schurgers-computer-3:lib schurger$ otool -L libmysqlclient.18.dylib error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: libmysqlclient.18.dylib (No such file or directory) even though the file libmysqlclient.18.dylib is clearly there when I do ls However, when I try it on /usr/lib/libmysqlclient.dylib it works: aaron-schurgers-computer-3:lib schurger$ otool -L libmysqlclient.dylib libmysqlclient.dylib: libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 65.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) There is no libmysqlclient.18.dylib in /Applications/MAMP/Library/lib. Thanks, Aaron On Wed, Sep 7, 2016 at 2:52 PM, wrote: > It may help to include the output of "otool -L" on skedmo-solver, > /usr/lib/libmysqlclient.18.dylib and /Applications/MAMP/Library/ > lib/libmysqlclient.18.dylib. > And it may also help to see if there is a difference in the otool output > in the Xcode vs makefile scenario. > > Also, it may help to check the output of "otool -l skedmo-solver" for both > the Xcode and makefile scenario. > > Clint > > ----- On Sep 7, 2016, at 5:18 AM, Cotton Candy > wrote: > > Hi Peter, > I attach my CMakeLists.txt file as well as the FindMySQL.cmake finder that > I used, in case these help. > > I still get the same error when I run the executable: > dyld: Library not loaded: libmysqlclient.18.dylib > Referenced from: /Users/schurger/tmp/test_CMake2/./skedmo-solver > Reason: image not found > Trace/BPT trap: 5 > > This library (libmysqlclient.18.dylib) is in /usr/lib on my machine. > > Thanks for all your help. > Aaron > > On Wed, Sep 7, 2016 at 9:36 AM, Peter Steinbach > wrote: > >> Hi Mr Candy (I am still getting a heck out of cottoncandycoder, sorry :D ) >> >> 1) the way you do it, is not really the way cmake should be used AFAIK. >> > In my CMakeLists.txt file I included: >> > set( CMAKE_CXX_FLAGS "-L/Applications/MAMP/Library/lib -lmysqlclient >> > -lpthread -lz" ) >> > set( CMAKE_EXE_LINKER_FLAGS "-lmysqlclient -lpthread -lm -lz" ) >> >> change this to: >> #I assume you have something like this somewhere >> add_executable(my_exe_name SOURCES my_exe_name.???) >> #here comes the "magic" >> link_directories(/Applications/MAMP/Library/lib) >> target_link_libraries(mysqlclient pthread m z) >> >> In theory, if all those dependencies are available at cmake-invocation, >> this should emit compiler calls that produce your binary and link >> mysqlclient into it (by default with using RPATH, see the docs on this: >> https://cmake.org/cmake/help/v3.0/prop_tgt/MACOSX_RPATH. >> html#prop_tgt:MACOSX_RPATH >> ). Depending on whether you wanna distribute your binary and cannot be >> sure if (at build time) pthreads etc are available, there are cmake find >> modules for pthreads and libz (FindThreads, FindZLIB) which you can use. >> libm should come with the libc of the system AFAIK. >> >> I also just checked but up to cmake 3.5, there is no MYSQL Find module. >> Which is kinda sad as there is a FindPostgreSQL module. :( If there would >> be, you could use it in a (hopefully) platform independent way and not >> bother with finding the right paths to libmysqlclient. >> >> 2) The compiler flags you posted do not explain, why Xcode apparently >> sets the rpath inside the binary and your cmake script doesn't (haven't >> seen the full CMakeLists.txt of your project yet). >> >> I hope the above gets you going. >> >> @cmake developers: it would be nice to have more obvious pointers to >> cmake example projects like an example SDK or so. If there is, please let >> me know. I only found this: >> http://www.vtk.org/Wiki/CMake/Examples#Finding_Packages >> but that's tied to vtk. >> >> Best, >> peter >> >> On 09/06/2016 08:12 PM, Cotton Candy wrote: >> > Peter, >> > In XCode I have this list of "settings" that includes >> > "Other Linker Flags" that I have set to "-lmysqlclient -lpthread -lm >> -lz" >> > and >> > "Other C++ Flags" that I have set to "-L/Applications/MAMP/Library/lib >> > -lmysqlclient -lpthread -lz" >> > >> > Maybe these explain why things work when I build with XCode, but not >> with >> > CMake. >> > >> > >> > but when I run the make it always says it is ignoring these (e.g. >> "warning: >> > argument unused during compilation: '-L/Applications/MAMP/Library/ >> lib'"). >> > >> > Thanks again for you help. >> > Aaron >> > >> > >> > >> > >> > >> > On Tue, Sep 6, 2016 at 2:20 PM, Peter Steinbach >> > wrote: >> > >> >> Aaron, >> >> >> >> it's about the way that you compile your binary and link libmysqlclient >> >> into it. I guess (@all: please correct me if I am wrong) as I don't >> know >> >> how you use cmake to build your libraries/binaries, that you don't set >> the >> >> rpath of libmysqlclient inside your binary. Doing so will ensure that >> the >> >> absolute path of libmysqlclient is stored into your binary, so that the >> >> runtime environment can pick it up and use (keeping fingers crossed >> that >> >> the path is still valid). The alternative to doing so, is linking >> against >> >> the static version of libmysqlclient (which comes at a cost on another >> >> front as well). >> >> >> >> Best, >> >> P >> >> >> > >> > > > -- > > 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 robert.maynard at kitware.com Wed Sep 7 15:27:40 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 7 Sep 2016 15:27:40 -0400 Subject: [CMake] [ANNOUNCE] CMake 3.6.2 available for download Message-ID: We are pleased to announce that CMake 3.6.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.6.2 since 3.6.1: Ben Boeckel (3): Intel-C: declare support for gnu11 Intel-C: support gnu89 and gnu99 extension flags Intel-C: standard flags are also supported in 12.0 Brad King (11): Add script to update curl from upstream curl: Update script to get curl 7.50.1 curl: Remove CMake-specific README VS: Fix VS 2015 .vcxproj debug setting for Windows7.1SDK toolset GetPrerequisites: Fix regression in gp_resolved_file_type Fortran: Fix .mod file comparison for Intel 16 format VS: Fix VS 2015 .vcxproj debug setting for v80 toolset FindHDF5: Fix regression in providing HDF5_IS_PARALLEL FindHDF5: Fix regression in finding hdf5hl_fortran curl: Backport certificate reuse fix from 7.50.2 CMake 3.6.2 Chuck Atkins (2): FindHDF5: Make sure compile definition vars keep the -D flag CrayLinuxEnvironment: Add alternative methods to get version info Curl Upstream (2): curl 2015-08-11 (1a7f66a3) curl 2016-08-03 (f2cb3a01) Fujii Hironori (1): VS: Fix out-of-bounds write on empty Nsight Tegra version Konstantin Sinitsyn (1): FindProtobuf: Restore support for PROTOBUF_IMPORT_DIRS From ewmailing at gmail.com Thu Sep 8 02:08:18 2016 From: ewmailing at gmail.com (Eric Wing) Date: Wed, 7 Sep 2016 23:08:18 -0700 Subject: [CMake] How to codesign .msi from WIX/CPack? In-Reply-To: References: Message-ID: On 9/7/16, David Cole wrote: > There may be a hook at the CPack level you can implement, but I'd have to > dig to figure out what it is and if it even presently exists. > > The easy thing to do would be to implement a custom target which does two > custom commands: the first the same as CPack (the built-in package target) > and the second, a custom command to sign the generated .msi file. > > > David > Thanks David. If you happen to find the hook, please let me know as I am interested in that. Most of my users are not familiar with CMake, so all the different built-in targets are already kind of confusing to them already. I'm not keen on adding another if I can avoid it (especially one that has fussy external dependencies, such as keyfiles and passwords). Thanks, Eric From Dvir.Yitzchaki at ceva-dsp.com Thu Sep 8 04:21:23 2016 From: Dvir.Yitzchaki at ceva-dsp.com (Dvir Yitzchaki) Date: Thu, 8 Sep 2016 08:21:23 +0000 Subject: [CMake] Visual Studios platform choice In-Reply-To: References: Message-ID: We?re generating both 32 bit and 64 bit solutions and the drop down only shows one architecture on each solution. Checked on VS 2013 and 2015. Regards, Dvir Yitzchaki Debugger Software Engineer, SDT [cid:image001.png at 01D209C3.2089CC20] [cid:image002.png at 01D209C3.2089CC20] [https://g.twimg.com/twitter-bird-16x16.png] [http://img2.wikia.nocookie.net/__cb20100109182754/half-life/en/images/e/ec/YouTube_favicon.png] [http://developer.linkedin.com/sites/default/files/LinkedIn_Logo16px.png] From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Jack Stalnaker Sent: Wednesday, September 07, 2016 7:31 PM To: cmake at cmake.org Subject: [CMake] Visual Studios platform choice Hi, I understand from reading this newgroup (e.g. https://cmake.org/pipermail/cmake/2013-March/053775.html) that the only way to support multiple platforms in Visual Studio is to run CMake multiple times, once for each platform. I'm porting some linux based code to the Windows world, and the Windows dev showed me that in Visual Studio, platform choice is a pulldown menu at the top of the screen. This pulldown appears even if we run CMake without specifying a 64 bit platform. This is a bit confusing, because we've only generated a solution and project file for 32 bit. So what happens when someone selects 64 bit on the pulldown menu? What's being built? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 1340 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 859 bytes Desc: image002.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 1509 bytes Desc: image003.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 493 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 716 bytes Desc: image005.png URL: From mikelojkovic at gmail.com Thu Sep 8 09:58:12 2016 From: mikelojkovic at gmail.com (mike lojkovic) Date: Thu, 8 Sep 2016 08:58:12 -0500 Subject: [CMake] Windows path too long In-Reply-To: <3CDE538B-8A0B-4636-8923-72CE012B9057@aol.com> References: <75e960c69ce7440bb34b24603346e400@hosted3-mb01.itm.host> <3CDE538B-8A0B-4636-8923-72CE012B9057@aol.com> Message-ID: Can you change to windows 10? If you are on 10, you can turn the restriction off. Otherwise, I believe there's complicated ways to shorten the path. http://m.slashdot.org/story/311861 On Sep 7, 2016 8:07 AM, "David Cole via CMake" wrote: > I suppose the obvious "use shorter paths and names" is not possible or > hard to enforce? > > > David > > > > On Sep 7, 2016, at 2:55 AM, Robert Bielik > wrote: > > > > I have a problem with a VS 2015 project, where the build state path > becomes too long: > > > > Severity Code Description Project File Line > Suppression State > > Error MSB3491 Could not write lines to file "processor_ > withAVeryVeryLongName.dir\Release\processo.92BD73FC.tlog\processor_ > withAVeryVeryLongName.lastbuildstate". The specified path, file name, or > both are too long. The fully qualified file name must be less than 260 > characters, and the directory name must be less than 248 characters. > processor_withAVeryVeryLongName C:\Program Files > (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 312 > > > > The line in Microsoft.CppBuild.targets is: > > > > Lines="$(ProjectStateLine);$(ProjectEvaluationFingerprint)"/> > > > > I've set CMAKE_OBJECT_PATH_MAX to 240, but I don't think it will affect > this... > > > > Ideas ? > > > > This is with CMake 3.5.2. > > > > Regards > > /Robert > > > > -- > > > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gilles.khouzam at microsoft.com Thu Sep 8 16:30:58 2016 From: gilles.khouzam at microsoft.com (Gilles Khouzam) Date: Thu, 8 Sep 2016 20:30:58 +0000 Subject: [CMake] Windows path too long In-Reply-To: References: <75e960c69ce7440bb34b24603346e400@hosted3-mb01.itm.host> <3CDE538B-8A0B-4636-8923-72CE012B9057@aol.com> Message-ID: It?s a little more complicated than just saying Windows 10 and turning on a regkey. There are other changes that need to be enabled in order to get the whole scenario working. The main one being that MSBuild needs to be updated and manifested to be able to use paths longer than 260 characters. Even if the files were created properly, they couldn?t be read or written without the tool that was using them being updated. Many pieces of the system have assumptions on the 260 character limit and they all need to be moved forward for this to work properly. This will be a staged migration. Thanks From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of mike lojkovic Sent: Thursday, September 8, 2016 06:58 To: Cmake at cmake.org Subject: Re: [CMake] Windows path too long Can you change to windows 10? If you are on 10, you can turn the restriction off. Otherwise, I believe there's complicated ways to shorten the path. http://m.slashdot.org/story/311861 On Sep 7, 2016 8:07 AM, "David Cole via CMake" > wrote: I suppose the obvious "use shorter paths and names" is not possible or hard to enforce? David > On Sep 7, 2016, at 2:55 AM, Robert Bielik > wrote: > > I have a problem with a VS 2015 project, where the build state path becomes too long: > > Severity Code Description Project File Line Suppression State > Error MSB3491 Could not write lines to file "processor_withAVeryVeryLongName.dir\Release\processo.92BD73FC.tlog\processor_withAVeryVeryLongName.lastbuildstate". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. processor_withAVeryVeryLongName C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 312 > > The line in Microsoft.CppBuild.targets is: > > > > I've set CMAKE_OBJECT_PATH_MAX to 240, but I don't think it will affect this... > > Ideas ? > > This is with CMake 3.5.2. > > Regards > /Robert > > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gilles.khouzam at microsoft.com Thu Sep 8 16:24:38 2016 From: gilles.khouzam at microsoft.com (Gilles Khouzam) Date: Thu, 8 Sep 2016 20:24:38 +0000 Subject: [CMake] Visual Studios platform choice In-Reply-To: References: Message-ID: When Visual Studio creates a project, by default it will create it for multiple architectures. When running through CMake, only 1 platform is generated. Therefore Visual Studio shows the platform options but only the available platforms are shown. We wrote a prototype to support creating multiple platforms for Windows Store apps in CMake a while back that?s available on https://github.com/Microsoft/CMake/tree/feature/MSMultiPlatform but hasn?t been updated in some time. There are issues with it as some things don?t port well when switching architectures. From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Dvir Yitzchaki Sent: Thursday, September 8, 2016 01:21 To: 'Jack Stalnaker' ; cmake at cmake.org Subject: Re: [CMake] Visual Studios platform choice We?re generating both 32 bit and 64 bit solutions and the drop down only shows one architecture on each solution. Checked on VS 2013 and 2015. Regards, Dvir Yitzchaki Debugger Software Engineer, SDT [cid:image001.png at 01D209C3.2089CC20][cid:image002.png at 01D209C3.2089CC20] [https://g.twimg.com/twitter-bird-16x16.png] [http://img2.wikia.nocookie.net/__cb20100109182754/half-life/en/images/e/ec/YouTube_favicon.png] [http://developer.linkedin.com/sites/default/files/LinkedIn_Logo16px.png] From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Jack Stalnaker Sent: Wednesday, September 07, 2016 7:31 PM To: cmake at cmake.org Subject: [CMake] Visual Studios platform choice Hi, I understand from reading this newgroup (e.g. https://cmake.org/pipermail/cmake/2013-March/053775.html) that the only way to support multiple platforms in Visual Studio is to run CMake multiple times, once for each platform. I'm porting some linux based code to the Windows world, and the Windows dev showed me that in Visual Studio, platform choice is a pulldown menu at the top of the screen. This pulldown appears even if we run CMake without specifying a 64 bit platform. This is a bit confusing, because we've only generated a solution and project file for 32 bit. So what happens when someone selects 64 bit on the pulldown menu? What's being built? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1251 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 825 bytes Desc: image002.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 1446 bytes Desc: image003.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 1263 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 1404 bytes Desc: image005.png URL: From Robert.Bielik at dirac.com Fri Sep 9 03:26:04 2016 From: Robert.Bielik at dirac.com (Robert Bielik) Date: Fri, 9 Sep 2016 07:26:04 +0000 Subject: [CMake] Windows path too long In-Reply-To: References: <75e960c69ce7440bb34b24603346e400@hosted3-mb01.itm.host> <3CDE538B-8A0B-4636-8923-72CE012B9057@aol.com> Message-ID: <1b6600912a7e4b639b2b135b65d06d6b@hosted3-mb01.itm.host> Hi Mike, Thanks, I didn?t know that. Well... gonna have to take the plunge some day, might aswell be now... :) Regards /R From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of mike lojkovic Sent: den 8 september 2016 15:58 To: Cmake at cmake.org Subject: Re: [CMake] Windows path too long Can you change to windows 10? If you are on 10, you can turn the restriction off. Otherwise, I believe there's complicated ways to shorten the path. http://m.slashdot.org/story/311861 On Sep 7, 2016 8:07 AM, "David Cole via CMake" > wrote: I suppose the obvious "use shorter paths and names" is not possible or hard to enforce? David > On Sep 7, 2016, at 2:55 AM, Robert Bielik > wrote: > > I have a problem with a VS 2015 project, where the build state path becomes too long: > > Severity Code Description Project File Line Suppression State > Error MSB3491 Could not write lines to file "processor_withAVeryVeryLongName.dir\Release\processo.92BD73FC.tlog\processor_withAVeryVeryLongName.lastbuildstate". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. processor_withAVeryVeryLongName C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 312 > > The line in Microsoft.CppBuild.targets is: > > > > I've set CMAKE_OBJECT_PATH_MAX to 240, but I don't think it will affect this... > > Ideas ? > > This is with CMake 3.5.2. > > Regards > /Robert > > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmstima at gmail.com Fri Sep 9 03:27:55 2016 From: gmstima at gmail.com (Roman Savchenko) Date: Fri, 9 Sep 2016 10:27:55 +0300 Subject: [CMake] Toolchain rpath libraries Message-ID: Dear all, I created toolchain file: set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSROOT "/srv/chroots/centos6-amd64") set(CMAKE_C_FLAGS "-gcc-name=${CMAKE_SYSROOT}/usr/bin/gcc -L${CMAKE_SYSROOT}/usr/lib64") set(CMAKE_CXX_FLAGS "-gxx-name=${CMAKE_SYSROOT}/usr/bin/g++ -L${CMAKE_SYSROOT}/usr/lib64") set(CMAKE_C_COMPILER ${CMAKE_SYSROOT}/opt/intel/bin/icc CACHE STRING "cc") set(CMAKE_CXX_COMPILER ${CMAKE_SYSROOT}/opt/intel/bin/icpc CACHE STRING "cxx") set(CMAKE_LINKER ${CMAKE_SYSROOT}/usr/bin/ld CACHE STRING "ld") set(CMAKE_AR ${CMAKE_SYSROOT}/usr/bin/ar CACHE STRING "ar") set(CMAKE_NM ${CMAKE_SYSROOT}/usr/bin/nm CACHE STRING "nm" ) set(CMAKE_OBJCOPY ${CMAKE_SYSROOT}/usr/bin/objcopy CACHE STRING "objcopy") set(CMAKE_OBJDUMP ${CMAKE_SYSROOT}/usr/bin/objdump CACHE STRING "objdump") set(CMAKE_RANLIB ${CMAKE_SYSROOT}/usr/bin/ranlib CACHE STRING "ranlib") set(CMAKE_STRIP ${CMAKE_SYSROOT}/usr/bin/strip CACHE STRING "strip") set(CMAKE_SKIP_RPATH TRUE) set(CMAKE_FIND_ROOT_PATH "${CMAKE_SYSROOT}") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) But there is a broblem with compilation - wrong path to libraries: /usr/bin/cmake -E cmake_link_script CMakeFiles/Test.dir/link.txt --verbose=1 /srv/chroots/centos6-amd64/opt/intel/bin/icpc -std=c++11 -Wall -ggdb -O0 CMakeFiles/Test.dir/main.cpp.o CMakeFiles/TestBed.dir/test.cpp.o -o Test -L/srv/chroots/centos6-amd64/usr/lib64 -lrt -lnuma -lzlib -Wl,-rpath,/usr/lib64 ld: cannot find /lib64/libc.so.6 ld: cannot find /usr/lib64/libc_nonshared.a This libraries exist under: ${CMAKE_SYSROOT}/lib64 So how can I tell toolchain to look up there? Many thanls, R. Savchenko From clinton at elemtech.com Fri Sep 9 10:36:56 2016 From: clinton at elemtech.com (clinton at elemtech.com) Date: Fri, 9 Sep 2016 08:36:56 -0600 (MDT) Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> Message-ID: <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> ----- On Sep 7, 2016, at 12:52 PM, Cotton Candy wrote: > Here is the output from otool -L on skedmo-solver that you requested: > skedmo-solver: > libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1197.1.1) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) > on /usr/lib/libmysqlclient.18.dylib I get an error > aaron-schurgers-computer-3:lib schurger$ otool -L libmysqlclient.18.dylib > error: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: > can't open file: libmysqlclient.18.dylib (No such file or directory) > even though the file libmysqlclient.18.dylib is clearly there when I do ls Try doing "ls -l" Perhaps its a softlink to a file which doesn't exist. Clint -------------- next part -------------- An HTML attachment was scrubbed... URL: From vania.joloboff at inria.fr Fri Sep 9 11:17:17 2016 From: vania.joloboff at inria.fr (Vania Joloboff) Date: Fri, 9 Sep 2016 17:17:17 +0200 Subject: [CMake] cmake source tree pollution ? In-Reply-To: <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> Message-ID: Hi, I have started to use CMake for my software. I build in a separate directory using : $> cmake -G "Unix Makefiles" Everything is built correctly and the software works fine. However all of my source code directories get polluted. Into each source directory, a new Makefile is created. All of these Makefiles are identical. They are ------------------------------------------------- # Generated by cpputils-cmake. include /flags.make .PHONY: check-syntax check-syntax: ${CC} -o /dev/null ${C_FLAGS} ${C_DEFINES} -I/usr/src/linux/include -DNDEBUG -S ${CHK_SOURCES} ---------------------------------------------------- Any clue ?? Vania From mellery451 at gmail.com Fri Sep 9 11:45:48 2016 From: mellery451 at gmail.com (Michael Ellery) Date: Fri, 9 Sep 2016 08:45:48 -0700 Subject: [CMake] cmake source tree pollution ? In-Reply-To: References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> Message-ID: This kinda? sounds like you are doing an in-source build. Are you certain that your currrent/working directory is different from your source tree root when you run cmake? The typical way of doing this is just to make a subdirectory of your source root: mkdir my_build cd my_build cmake .. make > On Sep 9, 2016, at 8:17 AM, Vania Joloboff wrote: > > Hi, > > I have started to use CMake for my software. > I build in a separate directory using : > $> cmake -G "Unix Makefiles" > > Everything is built correctly and the software works fine. > However all of my source code directories get polluted. > Into each source directory, a new Makefile is created. > All of these Makefiles are identical. They are > > ------------------------------------------------- > # Generated by cpputils-cmake. > include /flags.make > .PHONY: check-syntax > check-syntax: > ${CC} -o /dev/null ${C_FLAGS} ${C_DEFINES} -I/usr/src/linux/include -DNDEBUG -S ${CHK_SOURCES} > ---------------------------------------------------- > > Any clue ?? > > Vania > > -- > > 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 bruce.r.stephens at gmail.com Fri Sep 9 11:49:34 2016 From: bruce.r.stephens at gmail.com (Bruce Stephens) Date: Fri, 9 Sep 2016 16:49:34 +0100 Subject: [CMake] cmake source tree pollution ? In-Reply-To: References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> Message-ID: On Fri, Sep 9, 2016 at 4:45 PM, Michael Ellery wrote: > This kinda? sounds like you are doing an in-source build. Are you certain that your currrent/working directory is different from your source tree root when you run cmake? The typical way of doing this is just to make a subdirectory of your source root: Not to me. Looks like something (called cpputils, probably) is deliberately adding these Makefiles to the source tree. The check-syntax rule is something used by flymake-mode in Emacs (possibly other things, but that's the one I know of). [...] >> On Sep 9, 2016, at 8:17 AM, Vania Joloboff wrote: >> >> Hi, >> >> I have started to use CMake for my software. >> I build in a separate directory using : >> $> cmake -G "Unix Makefiles" >> >> Everything is built correctly and the software works fine. >> However all of my source code directories get polluted. >> Into each source directory, a new Makefile is created. >> All of these Makefiles are identical. They are >> >> ------------------------------------------------- >> # Generated by cpputils-cmake. >> include /flags.make >> .PHONY: check-syntax >> check-syntax: >> ${CC} -o /dev/null ${C_FLAGS} ${C_DEFINES} -I/usr/src/linux/include -DNDEBUG -S ${CHK_SOURCES} >> ---------------------------------------------------- >> >> Any clue ?? >> >> Vania >> >> -- >> >> 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 From vania.joloboff at inria.fr Fri Sep 9 12:04:19 2016 From: vania.joloboff at inria.fr (Vania Joloboff) Date: Fri, 9 Sep 2016 18:04:19 +0200 Subject: [CMake] cmake source tree pollution ? In-Reply-To: References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> Message-ID: On 09/09/2016 05:45 PM, Michael Ellery wrote: > This kinda? sounds like you are doing an in-source build. Are you certain that your currrent/working directory is different from your source tree root when you run cmake? The typical way of doing this is just to make a subdirectory of your source root: > > mkdir my_build > cd my_build > cmake .. > make > Yes this is what I do. And indeed there is a big Makefile with 730 lines created in my build directory, that builds the software. The source directories get polluted only with the 5 lines Makefiles attached in my previous mail. It seems only one thing related to cpp-utils is writing where it should not. All binaries are built in my build directory. I do have a full hierarchy of CMakefiles directories that contain what they should contain. The top level build/CMakefiles directory does contain the CMakeOutput.log file but I can't make sense of what is wrong at which point. It contains also a fille CMakeFiles/TargetDirectories.txt with the right directories I list below the first 5 lines. They are correct and you can see there is a build directory The source is in trunk /home/vjf/workspace/merging/simsoc/trunk/build/libsimsoc/tools/debugger/CMakeFiles/debugger.dir /home/vjf/workspace/merging/simsoc/trunk/build/examples/SerialISS/CMakeFiles/build_serial_iss.dir /home/vjf/workspace/merging/simsoc/trunk/build/utils/ISC/CMakeFiles/isc.dir /home/vjf/workspace/merging/simsoc/trunk/build/examples/TI_AM1707/CMakeFiles/ti-am1707.dir /home/vjf/workspace/merging/simsoc/trunk/build/examples/SPEAr/CMakeFiles/spear.dir The source directory (trunk) remains entirely clean, except for these strange 5 lines Makefiles. Vania >> On Sep 9, 2016, at 8:17 AM, Vania Joloboff wrote: >> >> Hi, >> >> I have started to use CMake for my software. >> I build in a separate directory using : >> $> cmake -G "Unix Makefiles" >> >> Everything is built correctly and the software works fine. >> However all of my source code directories get polluted. >> Into each source directory, a new Makefile is created. >> All of these Makefiles are identical. They are >> >> ------------------------------------------------- >> # Generated by cpputils-cmake. >> include /flags.make >> .PHONY: check-syntax >> check-syntax: >> ${CC} -o /dev/null ${C_FLAGS} ${C_DEFINES} -I/usr/src/linux/include -DNDEBUG -S ${CHK_SOURCES} >> ---------------------------------------------------- >> >> Any clue ?? >> >> Vania >> >> -- >> >> 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 bruce.r.stephens at gmail.com Fri Sep 9 12:09:39 2016 From: bruce.r.stephens at gmail.com (Bruce Stephens) Date: Fri, 9 Sep 2016 17:09:39 +0100 Subject: [CMake] cmake source tree pollution ? In-Reply-To: References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> Message-ID: Looks like https://github.com/redguardtoo/cpputils-cmake might be involved... On Fri, Sep 9, 2016 at 5:04 PM, Vania Joloboff wrote: > On 09/09/2016 05:45 PM, Michael Ellery wrote: >> >> This kinda? sounds like you are doing an in-source build. Are you certain >> that your currrent/working directory is different from your source tree root >> when you run cmake? The typical way of doing this is just to make a >> subdirectory of your source root: >> >> mkdir my_build >> cd my_build >> cmake .. >> make >> > Yes this is what I do. And indeed there is a big Makefile with 730 lines > created in my build directory, that builds the software. > The source directories get polluted only with the 5 lines Makefiles attached > in my previous mail. > It seems only one thing related to cpp-utils is writing where it should not. > All binaries are built in my build directory. > I do have a full hierarchy of CMakefiles directories that contain what they > should contain. > The top level build/CMakefiles directory does contain the CMakeOutput.log > file > but I can't make sense of what is wrong at which point. > It contains also a fille CMakeFiles/TargetDirectories.txt with the right > directories > I list below the first 5 lines. They are correct and you can see there is a > build directory > The source is in trunk > > /home/vjf/workspace/merging/simsoc/trunk/build/libsimsoc/tools/debugger/CMakeFiles/debugger.dir > /home/vjf/workspace/merging/simsoc/trunk/build/examples/SerialISS/CMakeFiles/build_serial_iss.dir > /home/vjf/workspace/merging/simsoc/trunk/build/utils/ISC/CMakeFiles/isc.dir > /home/vjf/workspace/merging/simsoc/trunk/build/examples/TI_AM1707/CMakeFiles/ti-am1707.dir > /home/vjf/workspace/merging/simsoc/trunk/build/examples/SPEAr/CMakeFiles/spear.dir > > > The source directory (trunk) remains entirely clean, > except for these strange 5 lines Makefiles. > > Vania > > >>> On Sep 9, 2016, at 8:17 AM, Vania Joloboff >>> wrote: >>> >>> Hi, >>> >>> I have started to use CMake for my software. >>> I build in a separate directory using : >>> $> cmake -G "Unix Makefiles" >>> >>> Everything is built correctly and the software works fine. >>> However all of my source code directories get polluted. >>> Into each source directory, a new Makefile is created. >>> All of these Makefiles are identical. They are >>> >>> ------------------------------------------------- >>> # Generated by cpputils-cmake. >>> include /flags.make >>> .PHONY: check-syntax >>> check-syntax: >>> ${CC} -o /dev/null ${C_FLAGS} ${C_DEFINES} -I/usr/src/linux/include >>> -DNDEBUG -S ${CHK_SOURCES} >>> ---------------------------------------------------- >>> >>> Any clue ?? >>> >>> Vania >>> >>> -- >>> >>> 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 From beachboy44 at me.com Fri Sep 9 12:46:16 2016 From: beachboy44 at me.com (James Beach) Date: Fri, 09 Sep 2016 16:46:16 +0000 (GMT) Subject: [CMake] Problem with MSVC compiler flags Message-ID: Hi there, I'm using CMake 3.6.2 to generate solution/project files for Visual Studio 14 (2015) Win64 on Windows 10.?The problem is that "/Zc:inline" and "/Zc:rvalueCast" do not set properly (but all other compiler flags do); Both flags show up in the 'Additional Options' box in 'Configuration Properties' -> 'C/C++' -> 'Command Line', but not in the 'All Options' box as they should.?The case is not so bad for?"/Zc:inline" as it is set by default, but?"/Zc:rvalueCast" is not set at all. I've looked inside the corresponding project file and the true true lines are indeed missing. Thanks a lot in advance for any help, James -------------- next part -------------- An HTML attachment was scrubbed... URL: From b2b at humanenginuity.com Fri Sep 9 19:17:29 2016 From: b2b at humanenginuity.com (Brad Gibson) Date: Fri, 09 Sep 2016 16:17:29 -0700 Subject: [CMake] Clang/C2 Visual Studio generator non-functional with cmake v3.6.1 and v3.6.2 Message-ID: <57D34309.70504@humanenginuity.com> Hi everyone. I've been working on this issue for almost 2 weeks now, originally with cmake v3.6.1 and now with cmake v3.6.2. I have looked far and wide for help, but with Clang/C2 support under Visual Studio being experimental, I haven't been able to find much. The problem is that when I run the line cmake -G "Visual Studio 14 2015" -T "v140_clang_3_8" cmake reports -- The C compiler identification is unknown -- The CXX compiler identification is unknown ... I have visited the source code and saw that cmake appears to be matching against "v[\d]+_clang_.*", so the above switch should work, AFAICT. I have tried "v140_clang_3_7" as well, to be certain, and get the same behavior. Everything works fine, of course without the -T "v140_clang_3_8", but generates VC++ project files, of course. Here is my Visual Studio version information: Microsoft Visual Studio Community 2015 Version 14.0.25425.01 Update 3 Microsoft .NET Framework Version 4.6.02001 Installed Version: Community ... Visual C++ 2015 00322-20000-00000-AA060 Microsoft Visual C++ 2015 ... Clang with Microsoft CodeGen 14.0.25516 Clang with Microsoft CodeGen I have ensured Clang/C2 is on my path (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ClangC2\bin\x86). I know the feature is experimental, but I'm pretty sure it's supposed to do more than this... :) Any ideas on what I should be checking? CMakeError.log excerpt: Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: gcc Build flags: Id flags: The output was: 1 Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved. Build started 9/9/2016 4:13:27 PM. Project "C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets). C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v140_clang_3_8 (Platform Toolset = 'v140_clang_3_8') cannot be found. To build using the v140_clang_3_8 build tools, please install v140_clang_3_8 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdC\CompilerIdC.vcxproj] Done Building Project "C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED. Build FAILED. "C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) -> (PlatformPrepareForBuild target) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v140_clang_3_8 (Platform Toolset = 'v140_clang_3_8') cannot be found. To build using the v140_clang_3_8 build tools, please install v140_clang_3_8 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdC\CompilerIdC.vcxproj] 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.10 Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler": gcc: fatal error: no input files compilation terminated. Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: g++ Build flags: Id flags: The output was: 1 Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved. Build started 9/9/2016 4:13:28 PM. Project "C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets). C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v140_clang_3_8 (Platform Toolset = 'v140_clang_3_8') cannot be found. To build using the v140_clang_3_8 build tools, please install v140_clang_3_8 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdCXX\CompilerIdCXX.vcxproj] Done Building Project "C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED. Build FAILED. "C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) -> (PlatformPrepareForBuild target) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v140_clang_3_8 (Platform Toolset = 'v140_clang_3_8') cannot be found. To build using the v140_clang_3_8 build tools, please install v140_clang_3_8 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\bRad\Development\FIT-MFA\Builds\CMakeFiles\3.6.2\CompilerIdCXX\CompilerIdCXX.vcxproj] 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.10 Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": g++: fatal error: no input files compilation terminated. -- Many thanks, -Brad From magnus at therning.org Mon Sep 12 03:42:25 2016 From: magnus at therning.org (Magnus Therning) Date: Mon, 12 Sep 2016 09:42:25 +0200 Subject: [CMake] cmake source tree pollution ? In-Reply-To: References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> Message-ID: <87r38pef8e.fsf@sobel.cipherstone.com> Bruce Stephens writes: > Looks like https://github.com/redguardtoo/cpputils-cmake might be involved... If that is the case then this section could be of interest: https://github.com/redguardtoo/cpputils-cmake#stop-creating-makefiles-for-flymake /M -- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus at therning.org jabber: magnus at therning.org twitter: magthe http://therning.org/magnus The man who is denied the opportunity of taking decisions of importance begins to regard as important the decisions he is allowed to take. ? C Northcote Parkinson -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 800 bytes Desc: not available URL: From cottoncandycoder at gmail.com Mon Sep 12 07:12:21 2016 From: cottoncandycoder at gmail.com (Cotton Candy) Date: Mon, 12 Sep 2016 13:12:21 +0200 Subject: [CMake] works when I build using XCode, but not with CMake makefile In-Reply-To: <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> Message-ID: Thanks. I checked the link (it is a softlink) and the target of the link exists with a file size of 4.2 Mb. Aaron On Fri, Sep 9, 2016 at 4:36 PM, wrote: > > > ----- On Sep 7, 2016, at 12:52 PM, Cotton Candy < > cottoncandycoder at gmail.com> wrote: > > Here is the output from otool -L on skedmo-solver that you requested: > > skedmo-solver: > libmysqlclient.18.dylib (compatibility version 18.0.0, current version > 18.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current > version 1197.1.1) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version > 1.2.5) > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version > 120.0.0) > > on /usr/lib/libmysqlclient.18.dylib I get an error > aaron-schurgers-computer-3:lib schurger$ otool -L libmysqlclient.18.dylib > error: /Applications/Xcode.app/Contents/Developer/Toolchains/ > XcodeDefault.xctoolchain/usr/bin/otool: can't open file: > libmysqlclient.18.dylib (No such file or directory) > > even though the file libmysqlclient.18.dylib is clearly there when I do ls > > Try doing "ls -l" > Perhaps its a softlink to a file which doesn't exist. > > Clint > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vania.joloboff at inria.fr Mon Sep 12 10:17:18 2016 From: vania.joloboff at inria.fr (Vania Joloboff) Date: Mon, 12 Sep 2016 16:17:18 +0200 Subject: [CMake] cmake source tree pollution ? In-Reply-To: <87r38pef8e.fsf@sobel.cipherstone.com> References: <6123e047-1e11-2826-fa55-54cdc10f452e@scionics.de> <6339786b-3fa8-62ca-8d6f-7db5aabf8991@scionics.de> <448376883.32306499.1473252762667.JavaMail.zimbra@elemtech.com> <1292841556.35757433.1473431816925.JavaMail.zimbra@elemtech.com> <87r38pef8e.fsf@sobel.cipherstone.com> Message-ID: <177f972b-04fa-c6ef-6401-d85c4456d595@inria.fr> It seems to be the cause. Thanks Vania On 09/12/2016 09:42 AM, Magnus Therning wrote: > Bruce Stephens writes: > >> Looks like https://github.com/redguardtoo/cpputils-cmake might be involved... > If that is the case then this section could be of interest: > > https://github.com/redguardtoo/cpputils-cmake#stop-creating-makefiles-for-flymake > > /M > From reavertm at gmail.com Mon Sep 12 17:22:00 2016 From: reavertm at gmail.com (Maciej Mrozowski) Date: Mon, 12 Sep 2016 23:22:00 +0200 Subject: [CMake] Include directories problem when cross compiling with MinGW In-Reply-To: <1472814747.4005.6.camel@gmail.com> References: <1472814747.4005.6.camel@gmail.com> Message-ID: <1951615.tA1mebcE4G@liwardyna> On pi?tek, 2 wrze?nia 2016 13:12:27 CEST David Demelier wrote: > Do you have any clue? It seems your toolchain does not have include/library path built-in or they are different that those it was built with. You can inspect them by passing one of below parameters to mingw-*-gcc: -print-search-dirs Display the directories in the compiler's search path -print-libgcc-file-name Display the name of the compiler's companion library -print-file-name= Display the full path to library -print-prog-name= Display the full path to compiler component -print-multiarch Display the target's normalized GNU triplet, used as a component in the library path -print-multi-directory Display the root directory for versions of libgcc -print-multi-lib Display the mapping between command line options and multiple library search directories -print-multi-os-directory Display the relative path to OS libraries -print-sysroot Display the target libraries directory -print-sysroot-headers-suffix Display the sysroot suffix used to find headers In any case, you should additionally set sysroot via CMAKE_CXX_FLAGS (or CMAKE_CXX_COMPILER) in your toolchain file: --sysroot=dir -- regards MM From steve at sumost.ca Wed Sep 14 00:52:30 2016 From: steve at sumost.ca (Steve M. Robbins) Date: Tue, 13 Sep 2016 23:52:30 -0500 Subject: [CMake] add_test CONFIGURATIONS and linux Message-ID: <6496491.rxXn0R7mz2@riemann> Hi, I'm failing to be able to use "run-only-in-release" tests when running under linux (Debian). Below is a short reproduction. CmakeLists.txt ============= cmake_minimum_required(VERSION 3.0) ============= CMAKE_BUILD_TYPE=Release. Correct? Doesn't work for me: Run Script ========== steve at riemann{build}rm -rf * Running tests... Where am I going wrong? Thanks! -Steve P.S. After writing this, I discovered that "ctest -C Release" will run the tests as desired. Why doesn't simple "make test" work? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: This is a digitally signed message part. URL: From steve at sumost.ca Wed Sep 14 02:12:01 2016 From: steve at sumost.ca (Steve M. Robbins) Date: Wed, 14 Sep 2016 01:12:01 -0500 Subject: [CMake] add_test CONFIGURATIONS and linux Message-ID: <35095128.80jOM4JZmA@riemann> [Re-sending in text-form] Hi, I'm failing to be able to use "run-only-in-release" tests when running under linux (Debian). Below is a short reproduction. CmakeLists.txt ============= cmake_minimum_required(VERSION 3.0) enable_testing() add_test(NAME list-stuff CONFIGURATIONS Release COMMAND ls) ============= My understanding is that test will run only when the "configuration" is release. I am guessing that for the single-configuration Makefile generator, this is true when CMAKE_BUILD_TYPE=Release. Correct? Doesn't work for me: Run Script ========== steve at riemann{build}rm -rf * steve at riemann{build}cmake --version cmake version 3.6.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). steve at riemann{build}cmake -D CMAKE_BUILD_TYPE=Release .. -- The C compiler identification is GNU 6.2.0 -- The CXX compiler identification is GNU 6.2.0 -- 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 -- Detecting C compile features -- Detecting C compile features - 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 -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /home/steve/src/test/cmake/build steve at riemann{build}make steve at riemann{build}make test Running tests... Test project /home/steve/src/test/cmake/build No tests were found!!! steve at riemann{build} ========== Where am I going wrong? Thanks! -Steve P.S. After writing this, I discovered that "ctest -C Release" will run the tests as desired. Why doesn't simple "make test" work? From rjvbertin at gmail.com Wed Sep 14 09:09:44 2016 From: rjvbertin at gmail.com (=?ISO-8859-1?Q?Ren=E9_J=2EV=2E?= Bertin) Date: Wed, 14 Sep 2016 15:09:44 +0200 Subject: [CMake] OS X Info.plist with POSIX executables and libraries (no app/framework bundles) Message-ID: <1868676.iNpjsRJ1MY@portia.local> Hi, I'd like to do something like set_target_properties(foo PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist.in) set_target_properties(foo PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.bar.foo") # etc for an application that will not be an app bundle but a regular POSIX executable. The resulting Info.plist can easily be included in the executable by target_link_libraries(foo "-sectcreate __TEXT __info_plist ${CMAKE_CURRENT_BINARY_DIR}/Info.plist") but the template Info.plist isn't processed at all. What's the best way to replace the above standard sequence of Info.plist set-up commands to obtain a preprocessed Info.plist that has the correct values substituted for the variables in the template? Thanks, Ren? From dzenan.zukic at kitware.com Wed Sep 14 15:26:12 2016 From: dzenan.zukic at kitware.com (Dzenan Zukic) Date: Wed, 14 Sep 2016 15:26:12 -0400 Subject: [CMake] VS15 support Message-ID: Hi guys, I thought I read in some announcement that support has been added for VS15 generator. Is my memory faulty? If it is, when is support for it expected? Regards, D?enan Zuki?, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenan.zukic at kitware.com Wed Sep 14 15:52:54 2016 From: dzenan.zukic at kitware.com (Dzenan Zukic) Date: Wed, 14 Sep 2016 15:52:54 -0400 Subject: [CMake] VS15 support In-Reply-To: References: Message-ID: To answer my own question: it was added on 2nd September, but merged into master on 8th (after 3.6.2 release). I will build from source to use it. D?enan Zuki?, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.) On Wed, Sep 14, 2016 at 3:26 PM, Dzenan Zukic wrote: > Hi guys, > > I thought I read in some announcement that support has been added for VS15 > > generator. Is my memory faulty? If it is, when is support for it expected? > > Regards, > D?enan Zuki?, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Harry at codexdigital.com Thu Sep 15 08:15:12 2016 From: Harry at codexdigital.com (Harry Mallon) Date: Thu, 15 Sep 2016 12:15:12 +0000 Subject: [CMake] xcode-select and CMake -G Xcode Message-ID: <56EC612A-0548-415F-8BAB-F41EF425EE60@codexdigital.com> Hello, I saw XCode 8 was released so i duplicated my XCode install and updated it. CMake now fails if I use xcode-select -s to choose the old XCode. It seems that if the XCode path has a space in it it fails. i.e. With "xcode-select -s /Applications/Xcode\ copy.app/Contents/Developer": $ cmake -GXcode ../src/ -- The C compiler identification is AppleClang 7.3.0.7030031 -- The CXX compiler identification is AppleClang 7.3.0.7030031 CMake Error at CMakeLists.txt:71 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:71 (project): No CMAKE_CXX_COMPILER could be found. -- Configuring incomplete, errors occurred! With "xcode-select -s /Applications/Xcode2.app/Contents/Developer" it is fine and this is a reasonable workaround for me. Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E harry at codexdigital.com | T +44 203 7000 989 From demelier.david at gmail.com Thu Sep 15 10:42:23 2016 From: demelier.david at gmail.com (David Demelier) Date: Thu, 15 Sep 2016 16:42:23 +0200 Subject: [CMake] ExternalProject autotools with MSYS from a MinGW root project Message-ID: Hello, I was guessing if it is possible to build a autotools based project that requires MSYS from a MinGW project. The ExternalProject could works but using the MinGW generator in the root projects requires to *not* have the sh.exe in the PATH. So I'm stuck on how to achieve this. Do you have any ideas/recommandations? Regards, -- Demelier David From Walter.Gunter at dematic.com Thu Sep 15 13:03:02 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Thu, 15 Sep 2016 17:03:02 +0000 Subject: [CMake] after running cmake, getting an error cannot find -levent Message-ID: Subject: after running cmake, getting an error cannot find -levent I am cross-compiling for an arm, and can run cmake successfully, but when I run make, I am getting the following: /opt/toolchains/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -levent I tried adding ?levent to COMPILE_FLAGS, but that didn?t work either. set(COMPILE_FLAGS "-lrt ?levent -Wall -lpthread") Thoughts? Walter E. Gunter, Jr. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Walter.Gunter at dematic.com Thu Sep 15 12:56:25 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Thu, 15 Sep 2016 16:56:25 +0000 Subject: [CMake] after running cmake, getting an error cannot find -levent Message-ID: I am cross-compiling for an arm, and can run cmake successfully, but when I run make, I am getting the following: /opt/toolchains/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -levent I tried adding ?levent to COMPILE_FLAGS, but that didn?t work either. set(COMPILE_FLAGS "-lrt ?levent -Wall -lpthread") Thoughts? Walter E. Gunter, Jr. Mechatronics Engineer/Roboticist AGV R&D Dematic North America 265 S 5200 W Salt Lake City, UT 84104 801.715.2602 Customer Service 1.800.530.9153 DEMATIC l We Optimize Your Supply Chain www.dematic.com MATERIAL HANDLING & LOGISTICS CONFERENCE www.mhlc.com CONFIDENTIALITY NOTICE: This email message and any attachments to it, is intended only for the individual or entity to which it is addressed and may contain confidential material. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, please do not disclose, copy, forward, or retain. If you have received this in error, please contact the sender by reply email and destroy all copies of the original message. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mellery451 at gmail.com Thu Sep 15 13:13:12 2016 From: mellery451 at gmail.com (Michael Ellery) Date: Thu, 15 Sep 2016 10:13:12 -0700 Subject: [CMake] after running cmake, getting an error cannot find -levent In-Reply-To: References: Message-ID: that seems to refer to libevent and the linker is not finding it - so you probably need to build/install that lib for your toolchain. It doesn?t look like there is a standard finder module for libevent currently, but if there were then find_package(LibEvent) would have likely alerted you when running cmake. -Mike > On Sep 15, 2016, at 10:03 AM, Gunter, Walter E wrote: > > Subject: after running cmake, getting an error cannot find -levent > > I am cross-compiling for an arm, and can run cmake successfully, but when I run make, I am getting the following: > > /opt/toolchains/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -levent > > I tried adding ?levent to COMPILE_FLAGS, but that didn?t work either. > > set(COMPILE_FLAGS "-lrt ?levent -Wall -lpthread") > > Thoughts? > > > Walter E. Gunter, Jr. > > -- > > 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 Walter.Gunter at dematic.com Thu Sep 15 11:48:02 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Thu, 15 Sep 2016 15:48:02 +0000 Subject: [CMake] cross-compiling for arm Message-ID: I am using the arm-2008q3 toolchain and having some issues with compiling. Doing a c++ compile for RT Linux, I have setup the following in my main CMakeLists.txt arm-none-linux-gnueabi-g++ cmake_minimum_required(VERSION 3.2) project(enterprise CXX) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_CXX_COMPILER /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-g++) set(CMAKE_C_COMPILER /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-gcc) set(CMAKE_SYSTEM_PROCESSOR arm) set(CMAKE_AR /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-ar) set(CMAKE_FIND_ROOT_PATH /mnt/root) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(COMPILE_FLAGS "-lrt -Wall -lpthread") set(CROSS_COMPILE_INCLUDES /opt/toolchains/arm-2008q3/arm-none-linux-gnueabi/libc/usr/include/linux) set(LOCAL_PROJECT_HEADER_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/includes) find_package(Threads) add_subdirectory(src) Here is the /src folder CMakeLists.txt set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR} files.cpp ) include_directories("../includes") set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) set(VENDOR_LIBRARY mycan.c evgpio.c) add_library(vendorLib ${VENDOR_LIBRARY}) set_target_properties(vendorLib PROPERTIES LINKER_LANGUAGE CXX) add_executable(enterprise ${SOURCES}) target_link_libraries(enterprise vendorLib ${CMAKE_THREAD_LIBS_INIT} pthread event config pcan) I am able to complete ../cmake, but when I run make, I get the following error: arm-none-linux-gnueabi-g++: /home/wegunterjr/Documents/projects/Enterprise_Dev_cmake/src: linker input file unused because linking not done [100%] Linking CXX executable enterprise arm-none-linux-gnueabi-g++: CMakeFiles/enterprise.dir/..o: No such file or directory src/CMakeFiles/enterprise.dir/build.make:485: recipe for target 'src/enterprise' failed make[2]: *** [src/enterprise] Error 1 CMakeFiles/Makefile2:87: recipe for target 'src/CMakeFiles/enterprise.dir/all' failed make[1]: *** [src/CMakeFiles/enterprise.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 Any thoughts? Walter E. Gunter, Jr. Mechatronics Engineer/Roboticist AGV R&D Dematic North America 265 S 5200 W Salt Lake City, UT 84104 801.715.2602 Customer Service 1.800.530.9153 DEMATIC l We Optimize Your Supply Chain www.dematic.com MATERIAL HANDLING & LOGISTICS CONFERENCE www.mhlc.com CONFIDENTIALITY NOTICE: This email message and any attachments to it, is intended only for the individual or entity to which it is addressed and may contain confidential material. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, please do not disclose, copy, forward, or retain. If you have received this in error, please contact the sender by reply email and destroy all copies of the original message. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From eike at sf-mail.de Thu Sep 15 14:06:25 2016 From: eike at sf-mail.de (Rolf Eike Beer) Date: Thu, 15 Sep 2016 20:06:25 +0200 Subject: [CMake] cross-compiling for arm In-Reply-To: References: Message-ID: <3382570.iGkMT5kZoc@daneel.sf-tec.de> Am Donnerstag, 15. September 2016, 15:48:02 schrieb Gunter, Walter E: > I am using the arm-2008q3 toolchain and having some issues with compiling. > Doing a c++ compile for RT Linux, > I have setup the following in my main CMakeLists.txt Use a toolchain file. project() will scan for the compiler and do all sorts of setup code, you can never be sure to override enough afterwards. In fact, you probably can't. https://cmake.org/cmake/help/v3.6/manual/cmake-toolchains.7.html Eike -- -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: This is a digitally signed message part. URL: From loose at astron.nl Fri Sep 16 10:15:00 2016 From: loose at astron.nl (Marcel Loose) Date: Fri, 16 Sep 2016 16:15:00 +0200 Subject: [CMake] after running cmake, getting an error cannot find -levent In-Reply-To: References: Message-ID: <92944b87-67cc-ae77-5749-124c2b441d57@astron.nl> Hi Walter, The dash before levent looks different from the ones before lrt and lpthread. Are you sure it's not some kind of Unicode character? Cheers, Marcel Loose. On 15/09/16 18:56, Gunter, Walter E wrote: > > I am cross-compiling for an arm, and can run cmake successfully, but > when I run make, I am getting the following: > > > > /opt/toolchains/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: > cannot find -levent > > > > I tried adding ?levent to COMPILE_FLAGS, but that didn?t work either. > > > > set(COMPILE_FLAGS "-lrt ?levent -Wall -lpthread") > > > > Thoughts? > > > > > > Walter E. Gunter, Jr. > > Mechatronics Engineer/Roboticist > > AGV R&D > > Dematic North America > > 265 S 5200 W > > Salt Lake City, UT 84104 > > 801.715.2602 > > > > Customer Service 1.800.530.9153 > > > > *DEMATIC **l*We Optimize Your Supply Chain www.dematic.com > > > *MATERIAL HANDLING & LOGISTICS CONFERENCE * www.mhlc.com > > > > > CONFIDENTIALITY NOTICE: This email message and any attachments to it, > is intended only for the individual or entity to which it is addressed > and may contain confidential material. If you are not the intended > recipient, or the employee or agent responsible for delivering it to > the intended recipient, please do not disclose, copy, forward, or > retain. If you have received this in error, please contact the sender > by reply email and destroy all copies of the original message. ? > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loose.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: OpenPGP digital signature URL: From fifteenknots505 at gmail.com Fri Sep 16 13:22:35 2016 From: fifteenknots505 at gmail.com (Martin Weber) Date: Fri, 16 Sep 2016 19:22:35 +0200 Subject: [CMake] default generator officially supported? Message-ID: <2007841.jrNYNkUmQ8@linux> Hi, in [1] some pointed out that cmake seems to have a notion of _default genrator_, that is: If you invoke cmake without the -D option, it chose a generator depending on the platform and create the build scripts. Is this nice feature officially supported by cmake? I could not find it documented anywhere. TIA, Martin [1] https://issues.jenkins-ci.org/browse/JENKINS-38227 -- Cd wrttn wtht vwls s mch trsr. From Walter.Gunter at dematic.com Fri Sep 16 13:44:12 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Fri, 16 Sep 2016 17:44:12 +0000 Subject: [CMake] after running cmake, getting an error cannot find -levent In-Reply-To: References: Message-ID: Okay. I made some changes to my cmake and am getting different errors, but still make me think I am not cross compiling: Should those be my cross compile toolchain instead of /usr/bin/c++ ?? -- The CXX compiler identification is GNU 5.4.0 -- 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 -- Detecting CXX compile features -- Detecting CXX compile features - done -----Original Message----- From: Michael Ellery [mailto:mellery451 at gmail.com] Sent: Thursday, September 15, 2016 11:13 AM To: Gunter, Walter E; cmake at cmake.org Subject: Re: [CMake] after running cmake, getting an error cannot find -levent that seems to refer to libevent and the linker is not finding it - so you probably need to build/install that lib for your toolchain. It doesn?t look like there is a standard finder module for libevent currently, but if there were then find_package(LibEvent) would have likely alerted you when running cmake. -Mike > On Sep 15, 2016, at 10:03 AM, Gunter, Walter E wrote: > > Subject: after running cmake, getting an error cannot find -levent > > I am cross-compiling for an arm, and can run cmake successfully, but when I run make, I am getting the following: > > /opt/toolchains/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -levent > > I tried adding ?levent to COMPILE_FLAGS, but that didn?t work either. > > set(COMPILE_FLAGS "-lrt ?levent -Wall -lpthread") > > Thoughts? > > > Walter E. Gunter, Jr. > > -- > > 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 Walter.Gunter at dematic.com Fri Sep 16 15:12:03 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Fri, 16 Sep 2016 19:12:03 +0000 Subject: [CMake] cross-compiling for arm In-Reply-To: <3382570.iGkMT5kZoc@daneel.sf-tec.de> References: <3382570.iGkMT5kZoc@daneel.sf-tec.de> Message-ID: I setup the Main CMakeLists.txt to cross_compile using an arm toolchain: cmake_minimum_required(VERSION 3.2) project(enterprise CXX) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_CXX_COMPILER /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-g++) set(CMAKE_SYSTEM_PROCESSOR arm) set(CMAKE_AR /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-ar) set(CMAKE_FIND_ROOT_PATH /mnt/root) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(COMPILE_FLAGS "-lrt -Wall -lpthread") find_package(Threads) add_subdirectory(src) if(CMAKE_CROSSCOMPILING) message("I should be cross compiling: ") endif() #find_package(GTest REQUIRED) -------------------------------------------------------- I made some changes to my cmakelists.txt in my src file : set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR} *list of files*.cpp Mainfile.cpp Mycan.cpp #this one references the linux/can.h ) include_directories("../includes") set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) add_executable(enterprise ${SOURCES}) target_link_libraries(enterprise ${CMAKE_THREAD_LIBS_INIT} pthread) I am now getting an error that it can't find a linux can header that is included in the toolchain: error: 'PF_CAN' was not declared in this scope This is referenced in the linux/can.h (a socket can define that is preset) #include < -----Original Message----- From: Rolf Eike Beer [mailto:eike at sf-mail.de] Sent: Thursday, September 15, 2016 12:06 PM To: cmake at cmake.org Cc: Gunter, Walter E Subject: Re: [CMake] cross-compiling for arm Am Donnerstag, 15. September 2016, 15:48:02 schrieb Gunter, Walter E: > I am using the arm-2008q3 toolchain and having some issues with compiling. > Doing a c++ compile for RT Linux, > I have setup the following in my main CMakeLists.txt Use a toolchain file. project() will scan for the compiler and do all sorts of setup code, you can never be sure to override enough afterwards. In fact, you probably can't. https://cmake.org/cmake/help/v3.6/manual/cmake-toolchains.7.html Eike -- From Walter.Gunter at dematic.com Fri Sep 16 15:18:34 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Fri, 16 Sep 2016 19:18:34 +0000 Subject: [CMake] cross-compiling for embedded device running linux, how to include linux headers Message-ID: I am referencing some includes that are part of my embedded device toolchain, #include If I have setup the cross compile directory correctly, does it know about these or do I need to make it known? if so, what? the best approach? Current Main CMakeLists.txt cmake_minimum_required(VERSION 3.2) project(enterprise CXX) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_CXX_COMPILER /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-g++) #set(CMAKE_C_COMPILER /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-gcc) set(CMAKE_SYSTEM_PROCESSOR arm) set(CMAKE_AR /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-ar) set(CMAKE_FIND_ROOT_PATH /mnt/root) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) Walter E. Gunter, Jr. Mechatronics Engineer/Roboticist AGV R&D Dematic North America 265 S 5200 W Salt Lake City, UT 84104 801.715.2602 Customer Service 1.800.530.9153 DEMATIC l We Optimize Your Supply Chain www.dematic.com MATERIAL HANDLING & LOGISTICS CONFERENCE www.mhlc.com CONFIDENTIALITY NOTICE: This email message and any attachments to it, is intended only for the individual or entity to which it is addressed and may contain confidential material. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, please do not disclose, copy, forward, or retain. If you have received this in error, please contact the sender by reply email and destroy all copies of the original message. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From Walter.Gunter at dematic.com Fri Sep 16 16:26:23 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Fri, 16 Sep 2016 20:26:23 +0000 Subject: [CMake] is it worth using cmake to cross-compile for embedded arm device? Message-ID: I am having some troubles getting cmake setup and wonder if cmake is the right tool. Thoughts? Suggestions? Walter E. Gunter, Jr. Mechatronics Engineer/Roboticist AGV R&D Dematic North America 265 S 5200 W Salt Lake City, UT 84104 801.715.2602 Customer Service 1.800.530.9153 DEMATIC l We Optimize Your Supply Chain www.dematic.com MATERIAL HANDLING & LOGISTICS CONFERENCE www.mhlc.com CONFIDENTIALITY NOTICE: This email message and any attachments to it, is intended only for the individual or entity to which it is addressed and may contain confidential material. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, please do not disclose, copy, forward, or retain. If you have received this in error, please contact the sender by reply email and destroy all copies of the original message. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From eike at sf-mail.de Fri Sep 16 17:42:41 2016 From: eike at sf-mail.de (Rolf Eike Beer) Date: Fri, 16 Sep 2016 23:42:41 +0200 Subject: [CMake] cross-compiling for arm In-Reply-To: References: <3382570.iGkMT5kZoc@daneel.sf-tec.de> Message-ID: <3012157.2duvtvnA4J@eto> Gunter, Walter E wrote: > I setup the Main CMakeLists.txt to cross_compile using an arm toolchain: > > cmake_minimum_required(VERSION 3.2) > > project(enterprise CXX) > > set(CMAKE_SYSTEM_NAME Linux) > set(CMAKE_CXX_COMPILER > /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-g++) > set(CMAKE_SYSTEM_PROCESSOR arm) > > set(CMAKE_AR /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-ar) > set(CMAKE_FIND_ROOT_PATH /mnt/root) > > set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) > set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) > set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) > set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) > > set(COMPILE_FLAGS "-lrt -Wall -lpthread") > > find_package(Threads) > > add_subdirectory(src) > > if(CMAKE_CROSSCOMPILING) > message("I should be cross compiling: ") > endif() > > #find_package(GTest REQUIRED) > > -------------------------------------------------------- > > I made some changes to my cmakelists.txt in my src file : > > set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR} > *list of files*.cpp > Mainfile.cpp > Mycan.cpp #this one references the linux/can.h > ) > > include_directories("../includes") > set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX) This is not needed, CMake will automatically detect this. > add_executable(enterprise ${SOURCES}) > target_link_libraries(enterprise ${CMAKE_THREAD_LIBS_INIT} pthread) pthread is not needed here. If CMAKE_THREAD_LIBS_INIT is empty you probably have a problem already. Also you should do set(CMAKE_THREAD_PREFER_PTHREAD TRUE) before find_package(Threads), and ideally target_link_libraries(enterprise Threads::Threads) afterwards, as this will also add the -pthread flag to compilation. I still doubt that you properly use a toolchain file (i.e. "cmake -D CMAKE_TOOLCHAIN_FILE=my_arm_stuff.cmake ?" in a clean build dir). Eike -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From eike at sf-mail.de Fri Sep 16 17:44:01 2016 From: eike at sf-mail.de (Rolf Eike Beer) Date: Fri, 16 Sep 2016 23:44:01 +0200 Subject: [CMake] is it worth using cmake to cross-compile for embedded arm device? In-Reply-To: References: Message-ID: <2612826.eRKRzpdKc3@eto> Gunter, Walter E wrote: > I am having some troubles getting cmake setup and wonder if cmake is the > right tool. > Thoughts? Suggestions? Yes, it is. I do it basically every day. Read my advise and properly set up a toolchain file, that is very likely the missing magic. https://cmake.org/cmake/help/v3.6/manual/cmake-toolchains.7.html Eike From Walter.Gunter at dematic.com Fri Sep 16 18:11:13 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Fri, 16 Sep 2016 22:11:13 +0000 Subject: [CMake] is it worth using cmake to cross-compile for embedded arm device? In-Reply-To: References: Message-ID: Okay?that made a huge difference. Just moving those set commands to a separate toolchain.cmake file worked. Even though the commands were the same, and I had the CMAKE_FIND_ROOT_PATH at the top of the toplevel CMakeLists.txt before project: # where is the target environment set(CMAKE_FIND_ROOT_PATH /opt/toolchains/arm-2008q3/) and then had all the settings that I moved into the toolchain.cmake file. The difference came from moving the cross compile settings I had in the top level CMakeLists.txt to the myhardware_toolchain.cmake. Now, I added the CMAKE_TOOLCHAIN_FILE to the toplevel CMakeLists.txt at the top (right under cmake_minimum_required 3.2) and the output of cmake is now looking right: #set toolchain to use set(CMAKE_TOOLCHAIN_FILE cmake/myHardware_toolchain.cmake) >cmake ../projectFolder -- The C compiler identification is GNU 4.3.2 -- The CXX compiler identification is GNU 4.3.2 -- Check for working C compiler: /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-gcc -- Check for working C compiler: /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-gcc -- works Now to see why it doesn?t make?. It is getting hung up on some of the includes that should be fine. Any suggestions on why when including #include The compiler has an issue with using its own linux headers from the toolchain? From: dflogeras at gmail.com [mailto:dflogeras at gmail.com] On Behalf Of Dave Flogeras Sent: Friday, September 16, 2016 3:43 PM To: Gunter, Walter E Subject: Re: [CMake] is it worth using cmake to cross-compile for embedded arm device? I personally use cmake with multiple cross toolchains successfully. I guess it depends on what you are trying to achieve. I prefer it because I can use the same CMakeLists.txt to build natively on linux/mac/windows, as well as cross-compile against an embedded arm linux. I'd also agree with the previous discussion about using a toolchain file for your platform, it does simplify things. On Fri, Sep 16, 2016 at 5:26 PM, Gunter, Walter E > wrote: I am having some troubles getting cmake setup and wonder if cmake is the right tool. Thoughts? Suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: From Walter.Gunter at dematic.com Fri Sep 16 18:13:14 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Fri, 16 Sep 2016 22:13:14 +0000 Subject: [CMake] using arm toolchain and having issues with linux socket can Message-ID: So, now that I am rocking and rolling using the correct toolchain, I am stuck with a failed compile. error: 'PF_CAN' was not declared in this scope Does this mean it can?t find the header file? I am just implementing the CAN interface; nothing complex. Here is my file? Mycan.c #include Walter E. Gunter, Jr. Mechatronics Engineer/Roboticist AGV R&D Dematic North America 265 S 5200 W Salt Lake City, UT 84104 801.715.2602 Customer Service 1.800.530.9153 DEMATIC l We Optimize Your Supply Chain www.dematic.com MATERIAL HANDLING & LOGISTICS CONFERENCE www.mhlc.com CONFIDENTIALITY NOTICE: This email message and any attachments to it, is intended only for the individual or entity to which it is addressed and may contain confidential material. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, please do not disclose, copy, forward, or retain. If you have received this in error, please contact the sender by reply email and destroy all copies of the original message. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From eike at sf-mail.de Fri Sep 16 18:21:21 2016 From: eike at sf-mail.de (Rolf Eike Beer) Date: Sat, 17 Sep 2016 00:21:21 +0200 Subject: [CMake] using arm toolchain and having issues with linux socket can In-Reply-To: References: Message-ID: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> Am Freitag, 16. September 2016, 22:13:14 schrieb Gunter, Walter E: > So, now that I am rocking and rolling using the correct toolchain, I am > stuck with a failed compile. > error: 'PF_CAN' was not declared in this scope > > Does this mean it can?t find the header file? I am just implementing the > CAN interface; nothing complex. If it would not find linux/can.h it would tell you. It does not find the define, which means it actually can include linux/can.h. And this makes sense, as PF_CAN is in indirectly in sys/socket.h, so you should (also) include that. Eike -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: This is a digitally signed message part. URL: From Walter.Gunter at dematic.com Fri Sep 16 19:00:51 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Fri, 16 Sep 2016 23:00:51 +0000 Subject: [CMake] using arm toolchain and having issues with linux socket can In-Reply-To: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> References: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> Message-ID: Okay, so temporarily, to get it to compile, I did this in my mycan.c #ifndef PF_CAN #define PF_CAN 29 #endif #ifndef AF_CAN #define AF_CAN PF_CAN #endit Doesn't seem ideal, but I tried it. I got past that part, and now on to something I have seen before: [ 68%] Linking CXX executable enterprise arm-none-linux-gnueabi-g++: CMakeFiles/enterprise.dir/..o: No such file or directory What does that mean? -----Original Message----- From: Rolf Eike Beer [mailto:eike at sf-mail.de] Sent: Friday, September 16, 2016 4:21 PM To: cmake at cmake.org Cc: Gunter, Walter E Subject: Re: [CMake] using arm toolchain and having issues with linux socket can Am Freitag, 16. September 2016, 22:13:14 schrieb Gunter, Walter E: > So, now that I am rocking and rolling using the correct toolchain, I > am stuck with a failed compile. > error: 'PF_CAN' was not declared in this scope > > Does this mean it can?t find the header file? I am just implementing > the CAN interface; nothing complex. If it would not find linux/can.h it would tell you. It does not find the define, which means it actually can include linux/can.h. And this makes sense, as PF_CAN is in indirectly in sys/socket.h, so you should (also) include that. Eike From Walter.Gunter at dematic.com Fri Sep 16 18:54:25 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Fri, 16 Sep 2016 22:54:25 +0000 Subject: [CMake] using arm toolchain and having issues with linux socket can In-Reply-To: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> References: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> Message-ID: Ah..got ya. There are two in my toolchain: Sys/socket.h Linux/socket.h I couldn't find AF_CAN or PF_CAN defined in the sys one, but it is in the linux. I included it, but still getting the error when building that it can't find it. -----Original Message----- From: Rolf Eike Beer [mailto:eike at sf-mail.de] Sent: Friday, September 16, 2016 4:21 PM To: cmake at cmake.org Cc: Gunter, Walter E Subject: Re: [CMake] using arm toolchain and having issues with linux socket can Am Freitag, 16. September 2016, 22:13:14 schrieb Gunter, Walter E: > So, now that I am rocking and rolling using the correct toolchain, I > am stuck with a failed compile. > error: 'PF_CAN' was not declared in this scope > > Does this mean it can?t find the header file? I am just implementing > the CAN interface; nothing complex. If it would not find linux/can.h it would tell you. It does not find the define, which means it actually can include linux/can.h. And this makes sense, as PF_CAN is in indirectly in sys/socket.h, so you should (also) include that. Eike From eike at sf-mail.de Sat Sep 17 03:19:29 2016 From: eike at sf-mail.de (Rolf Eike Beer) Date: Sat, 17 Sep 2016 09:19:29 +0200 Subject: [CMake] using arm toolchain and having issues with linux socket can In-Reply-To: References: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> Message-ID: <1492414.xbVrAAdNhP@daneel.sf-tec.de> Am Freitag, 16. September 2016, 22:54:25 schrieb Gunter, Walter E: > Ah..got ya. > There are two in my toolchain: > Sys/socket.h > Linux/socket.h > > I couldn't find AF_CAN or PF_CAN defined in the sys one, but it is in the > linux. I included it, but still getting the error when building that it > can't find it. I already told you it's sys/socket.h. In fact it's bits/socket.h, but the bits/* stuff should never be included directly. But it is included in sys/socket.h, so just use this. Eike -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: This is a digitally signed message part. URL: From eike at sf-mail.de Sat Sep 17 03:21:12 2016 From: eike at sf-mail.de (Rolf Eike Beer) Date: Sat, 17 Sep 2016 09:21:12 +0200 Subject: [CMake] using arm toolchain and having issues with linux socket can In-Reply-To: References: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> Message-ID: <4932011.G3SfhFy7js@daneel.sf-tec.de> > Doesn't seem ideal, but I tried it. I got past that part, and now on to > something I have seen before: > [ 68%] Linking CXX executable enterprise > arm-none-linux-gnueabi-g++: CMakeFiles/enterprise.dir/..o: No such file or > directory > What does that mean? That you probably have something fishy in your list of source files or so, like "..c" or something like that. Eike -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: This is a digitally signed message part. URL: From Walter.Gunter at dematic.com Sun Sep 18 10:57:54 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Sun, 18 Sep 2016 14:57:54 +0000 Subject: [CMake] using arm toolchain and having issues with linux socket can In-Reply-To: <1492414.xbVrAAdNhP@daneel.sf-tec.de> References: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> <1492414.xbVrAAdNhP@daneel.sf-tec.de> Message-ID: Okay...made the change, but am still getting the error. Here is the top level of mycan.cpp #include #include #include #include #include #include #include #include #include #include #include -----Original Message----- From: Rolf Eike Beer [mailto:eike at sf-mail.de] Sent: Saturday, September 17, 2016 1:19 AM To: Gunter, Walter E Cc: cmake at cmake.org Subject: Re: [CMake] using arm toolchain and having issues with linux socket can Am Freitag, 16. September 2016, 22:54:25 schrieb Gunter, Walter E: > Ah..got ya. > There are two in my toolchain: > Sys/socket.h > Linux/socket.h > > I couldn't find AF_CAN or PF_CAN defined in the sys one, but it is in > the linux. I included it, but still getting the error when building that it > can't find it. I already told you it's sys/socket.h. In fact it's bits/socket.h, but the bits/* stuff should never be included directly. But it is included in sys/socket.h, so just use this. Eike From Walter.Gunter at dematic.com Sun Sep 18 10:59:37 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Sun, 18 Sep 2016 14:59:37 +0000 Subject: [CMake] using arm toolchain and having issues with linux socket can In-Reply-To: <1492414.xbVrAAdNhP@daneel.sf-tec.de> References: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> <1492414.xbVrAAdNhP@daneel.sf-tec.de> Message-ID: Just checked the contents of: Sys/socket.h And there is a line that references the bits/socket.h But AF_CAN and PF_CAN are not defined in either. They are defined in my linux/socket.h -----Original Message----- From: Rolf Eike Beer [mailto:eike at sf-mail.de] Sent: Saturday, September 17, 2016 1:19 AM To: Gunter, Walter E Cc: cmake at cmake.org Subject: Re: [CMake] using arm toolchain and having issues with linux socket can Am Freitag, 16. September 2016, 22:54:25 schrieb Gunter, Walter E: > Ah..got ya. > There are two in my toolchain: > Sys/socket.h > Linux/socket.h > > I couldn't find AF_CAN or PF_CAN defined in the sys one, but it is in > the linux. I included it, but still getting the error when building that it > can't find it. I already told you it's sys/socket.h. In fact it's bits/socket.h, but the bits/* stuff should never be included directly. But it is included in sys/socket.h, so just use this. Eike From demelier.david at gmail.com Mon Sep 19 04:22:53 2016 From: demelier.david at gmail.com (David Demelier) Date: Mon, 19 Sep 2016 10:22:53 +0200 Subject: [CMake] Include directories problem when cross compiling with MinGW In-Reply-To: <1951615.tA1mebcE4G@liwardyna> References: <1472814747.4005.6.camel@gmail.com> <1951615.tA1mebcE4G@liwardyna> Message-ID: 2016-09-12 23:22 GMT+02:00 Maciej Mrozowski : > On pi?tek, 2 wrze?nia 2016 13:12:27 CEST David Demelier wrote: > >> Do you have any clue? > > It seems your toolchain does not have include/library path built-in or they > are different that those it was built with. After some discuss with ngladitz, we discovered some troubles between gcc 6 and CMake which both have safety guards. We finally added CMAKE__IMPLICIT_INCLUDE_DIRECTORIES as workaround in our MinGW scripts and it works fine at the moment. Thanks for feedback :) -- Demelier David From uwe.koloska at voiceinterconnect.de Mon Sep 19 05:16:13 2016 From: uwe.koloska at voiceinterconnect.de (Uwe Koloska) Date: Mon, 19 Sep 2016 11:16:13 +0200 Subject: [CMake] is it worth using cmake to cross-compile for embedded arm device? In-Reply-To: References: Message-ID: <6c4eedf3-ba45-6fe6-ebea-71be5da3b227@voiceinterconnect.de> On 17.09.2016 00:11, Gunter, Walter E wrote: > Okay?that made a huge difference. Just a silly question: Where have been the commands that you now have moved to the toolchain file? Before or after project()? For project() triggers the process of finding the compiler etc. and I'm not sure wether it uses variables defined after it. Uwe From marco.schuler at gmail.com Mon Sep 19 10:21:31 2016 From: marco.schuler at gmail.com (Marco Schuler) Date: Mon, 19 Sep 2016 16:21:31 +0200 Subject: [CMake] Correct way to use ARMCC (Files in Modules/Compiler/ARMCC*) Message-ID: Hello While investigating on how I can use cmake to build my embedded targets (cortex m3), I struggled over the the files in Modules/Compiler/ (distributed with cmake installation). There seems to be native support for my armcc compiler. However, I could not find any information on how to properly use these files. Do I have to provide ARMCC.cmake to cmake as toolchain file? Do I use them in my toolchain file? In my CMakeLists.txt? Is the documantation "cmake-toolchain(7)" related to it? Any directions and hint on how to use these files are highly appreciated! Many thanks in advance! -- Cheers, Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From Walter.Gunter at dematic.com Mon Sep 19 20:36:04 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Tue, 20 Sep 2016 00:36:04 +0000 Subject: [CMake] using arm toolchain and having issues with linux socket can In-Reply-To: <4932011.G3SfhFy7js@daneel.sf-tec.de> References: <1492381.1vk1Vx5JQz@daneel.sf-tec.de> <4932011.G3SfhFy7js@daneel.sf-tec.de> Message-ID: Checked all that...no issues with spelling of the source files... Super confused on this... -----Original Message----- From: Rolf Eike Beer [mailto:eike at sf-mail.de] Sent: Saturday, September 17, 2016 1:21 AM To: Gunter, Walter E Cc: cmake at cmake.org Subject: Re: [CMake] using arm toolchain and having issues with linux socket can > Doesn't seem ideal, but I tried it. I got past that part, and now on > to something I have seen before: > [ 68%] Linking CXX executable enterprise > arm-none-linux-gnueabi-g++: CMakeFiles/enterprise.dir/..o: No such > arm-none-linux-gnueabi-g++file or > directory > What does that mean? That you probably have something fishy in your list of source files or so, like "..c" or something like that. Eike From Walter.Gunter at dematic.com Mon Sep 19 20:43:03 2016 From: Walter.Gunter at dematic.com (Gunter, Walter E) Date: Tue, 20 Sep 2016 00:43:03 +0000 Subject: [CMake] Correct way to use ARMCC (Files in Modules/Compiler/ARMCC*) Message-ID: I am not 100% certain with all this cmake, but it does seem to appear that two things need to happen: 1. Toolchain needs to be in a separate file 2. That file needs to be called before the project line of your CMakeLists.txt I put the same exact commands in the CMakeLists.txt that I ended up putting into my myhardtoolchain.cmake file, and it didn't work. As soon, as I made the change to put the commands in the separate file, magic happened. Hope that helps. Walter -----Original Message----- From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of cmake-request at cmake.org Sent: Monday, September 19, 2016 10:00 AM To: cmake at cmake.org Subject: CMake Digest, Vol 149, Issue 25 Send CMake mailing list submissions to cmake at cmake.org To subscribe or unsubscribe via the World Wide Web, visit http://public.kitware.com/mailman/listinfo/cmake or, via email, send a message with subject or body 'help' to cmake-request at cmake.org You can reach the person managing the list at cmake-owner at cmake.org When replying, please edit your Subject line so it is more specific than "Re: Contents of CMake digest..." Today's Topics: 1. Re: Include directories problem when cross compiling with MinGW (David Demelier) 2. Re: is it worth using cmake to cross-compile for embedded arm device? (Uwe Koloska) 3. Correct way to use ARMCC (Files in Modules/Compiler/ARMCC*) (Marco Schuler) ---------------------------------------------------------------------- Message: 1 Date: Mon, 19 Sep 2016 10:22:53 +0200 From: David Demelier To: Maciej Mrozowski Cc: cmake at cmake.org Subject: Re: [CMake] Include directories problem when cross compiling with MinGW Message-ID: Content-Type: text/plain; charset=UTF-8 2016-09-12 23:22 GMT+02:00 Maciej Mrozowski : > On pi?tek, 2 wrze?nia 2016 13:12:27 CEST David Demelier wrote: > >> Do you have any clue? > > It seems your toolchain does not have include/library path built-in or > they are different that those it was built with. After some discuss with ngladitz, we discovered some troubles between gcc 6 and CMake which both have safety guards. We finally added CMAKE__IMPLICIT_INCLUDE_DIRECTORIES as workaround in our MinGW scripts and it works fine at the moment. Thanks for feedback :) -- Demelier David ------------------------------ Message: 2 Date: Mon, 19 Sep 2016 11:16:13 +0200 From: Uwe Koloska To: "Gunter, Walter E" , Dave Flogeras , "cmake at cmake.org" Subject: Re: [CMake] is it worth using cmake to cross-compile for embedded arm device? Message-ID: <6c4eedf3-ba45-6fe6-ebea-71be5da3b227 at voiceinterconnect.de> Content-Type: text/plain; charset=windows-1252 On 17.09.2016 00:11, Gunter, Walter E wrote: > Okay?that made a huge difference. Just a silly question: Where have been the commands that you now have moved to the toolchain file? Before or after project()? For project() triggers the process of finding the compiler etc. and I'm not sure wether it uses variables defined after it. Uwe ------------------------------ Message: 3 Date: Mon, 19 Sep 2016 16:21:31 +0200 From: Marco Schuler To: cmake at cmake.org Subject: [CMake] Correct way to use ARMCC (Files in Modules/Compiler/ARMCC*) Message-ID: Content-Type: text/plain; charset="utf-8" Hello While investigating on how I can use cmake to build my embedded targets (cortex m3), I struggled over the the files in Modules/Compiler/ (distributed with cmake installation). There seems to be native support for my armcc compiler. However, I could not find any information on how to properly use these files. Do I have to provide ARMCC.cmake to cmake as toolchain file? Do I use them in my toolchain file? In my CMakeLists.txt? Is the documantation "cmake-toolchain(7)" related to it? Any directions and hint on how to use these files are highly appreciated! Many thanks in advance! -- Cheers, Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer -- 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 ------------------------------ End of CMake Digest, Vol 149, Issue 25 ************************************** From amit112amit at yahoo.co.in Tue Sep 20 18:18:05 2016 From: amit112amit at yahoo.co.in (Amit Singh) Date: Tue, 20 Sep 2016 22:18:05 +0000 (UTC) Subject: [CMake] Browse buttons in CMake-Gui give URL cannot be listed Malformed URL error (Manjaro KDE Plasma 5.7 Qt 5.7) References: <2091860269.1569375.1474409885340.ref@mail.yahoo.com> Message-ID: <2091860269.1569375.1474409885340@mail.yahoo.com> Hi.When I click "Browse source" or "Browse build" location buttons in the GUI I get an error dialog saying that "URL cannot be listed file://" followed by another dialog "Malformed URL".? - I built and reinstalled CMake from source but the problem persists. - I searched the web but could not find anyone reporting this issue for CMake. - When I launch CMake-gui from terminal, when I click the Browse buttons it prints "kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "file"" in the terminal. I tried looking up for this message but again I could not find anything about CMake. Please let me know if you need some logs. Machine: x64, Manjaro KDE Plasma 5.7, Qt 5.7 Nvidia GTX 960m, i7-6700 HQ Regards, Amit -------------- next part -------------- An HTML attachment was scrubbed... URL: From braden at endoframe.com Tue Sep 20 11:00:21 2016 From: braden at endoframe.com (Braden McDaniel) Date: Tue, 20 Sep 2016 11:00:21 -0400 Subject: [CMake] CMAKE_OSX_DEPLOYMENT_TARGET vs CMAKE_OSX_SYSROOT Message-ID: <5345837b611d69e3cf3a4d36e377127499d1a99a@webmail.endoframe.com> When setting CMAKE_OSX_SYSROOT to the unversioned directory name (using Xcode 8, as it happens) and setting CMAKE_OSX_DEPLOYMENT_TARGET, I get this error: -- The CXX compiler identification is AppleClang 8.0.0.8000038 CMake Error at /Applications/CMake.app/Contents/share/cmake-3.6/Modules/Platform/Darwin.cmake:76 (message): CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT: "/Applications/Xcode-8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" is not set to a MacOSX SDK with a recognized version. Either set CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to empty. Call Stack (most recent call first): /Applications/CMake.app/Contents/share/cmake-3.6/Modules/CMakeSystemSpecificInformation.cmake:36 (include) CMakeLists.txt:37 (project) I'm able to suppress the error by using the versioned (symlink) directory; but isn't the premise of this error message invalid? As I understand it, since Xcode 7 (or perhaps earlier?), there is no requirement that the deployment target match the SDK version. Braden -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.turner at kdab.com Wed Sep 21 04:54:54 2016 From: james.turner at kdab.com (James Turner) Date: Wed, 21 Sep 2016 09:54:54 +0100 Subject: [CMake] CMAKE_OSX_DEPLOYMENT_TARGET vs CMAKE_OSX_SYSROOT In-Reply-To: <5345837b611d69e3cf3a4d36e377127499d1a99a@webmail.endoframe.com> References: <5345837b611d69e3cf3a4d36e377127499d1a99a@webmail.endoframe.com> Message-ID: <75FAC1D1-D586-4F62-8A8A-790320272B44@kdab.com> > On 20 Sep 2016, at 16:00, Braden McDaniel wrote: > > When setting CMAKE_OSX_SYSROOT to the unversioned directory name (using Xcode 8, as it happens) and setting CMAKE_OSX_DEPLOYMENT_TARGET, I get this error: > > > -- The CXX compiler identification is AppleClang 8.0.0.8000038 > CMake Error at /Applications/CMake.app/Contents/share/cmake-3.6/Modules/Platform/Darwin.cmake:76 (message): > CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT: > > "/Applications/Xcode-8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" > > is not set to a MacOSX SDK with a recognized version. Either set > CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to > empty. > Call Stack (most recent call first): > /Applications/CMake.app/Contents/share/cmake-3.6/Modules/CMakeSystemSpecificInformation.cmake:36 (include) > CMakeLists.txt:37 (project) > > > I'm able to suppress the error by using the versioned (symlink) directory; but isn't the premise of this error message invalid? As I understand it, since Xcode 7 (or perhaps earlier?), there is no requirement that the deployment target match the SDK version. I?m seeing a similar error when setting CMAKE_OSX_DEPLOYMENT_TARGET to 10.7 with XCode 8, and leaving CMAKE_OSX_SYSROOT unset. I?m couldn?t identify where (from Modules/Platform/Darwin.cmake) the detected value of _CMAKE_OSX_SYSROOT is computed. (I don?t wish to explicitly set it) Kind regards, James -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3868 bytes Desc: not available URL: From roman.wueger at gmx.at Wed Sep 21 17:04:46 2016 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Wed, 21 Sep 2016 23:04:46 +0200 Subject: [CMake] CPack [NSIS] Install directory per component Message-ID: Hello, Per default the install directory for a component is $INSTDIR. Is there a chance to change the install dir per component? Thanks Roman -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Thu Sep 22 13:58:00 2016 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 22 Sep 2016 13:58:00 -0400 Subject: [CMake] Windows Visual Studio 13 with Ninja & CMake Message-ID: <57E41BA8.4010009@bluequartz.net> My combination is Windows 10 (Anniversary Update), Visual Studio 12 2013 Update 5, Ninja and CMake 3.5/3.6. I launch CMake-GUI.exe, select my Source and binary directories and then "Configure", select "Ninja" as the generator and then I instantly get the error that CMake can not find the C/C++ compilers. I do not recall ever having this issue. I just recently updated Windows 10 to the latest so I am not sure if that caused something to go wrong? I use the "Zipped" version of CMake if that makes a difference. I did have to install the "Windows 8.1 SDK" in order for QtCreator to work correctly. I can successfully do the following: * Configure and generate from the command line for Ninja * Use the CMake-Gui to generate a VS 12 2013 solution file without any issues. * QtCreator 4.1 can use ninja to properly generate its own projects with a correctly detected compiler. Thoughts? -- Michael A. Jackson BlueQuartz Software From DLRdave at aol.com Thu Sep 22 14:22:09 2016 From: DLRdave at aol.com (David Cole) Date: Thu, 22 Sep 2016 14:22:09 -0400 Subject: [CMake] Windows Visual Studio 13 with Ninja & CMake In-Reply-To: <57E41BA8.4010009@bluequartz.net> References: <57E41BA8.4010009@bluequartz.net> Message-ID: Does it work if you launch cmake-gui from the command prompt that works for your "from the command line" scenario? On Thu, Sep 22, 2016 at 1:58 PM, Michael Jackson wrote: > My combination is Windows 10 (Anniversary Update), Visual Studio 12 2013 > Update 5, Ninja and CMake 3.5/3.6. > > I launch CMake-GUI.exe, select my Source and binary directories and then > "Configure", select "Ninja" as the generator and then I instantly get the > error that CMake can not find the C/C++ compilers. I do not recall ever > having this issue. I just recently updated Windows 10 to the latest so I am > not sure if that caused something to go wrong? I use the "Zipped" version of > CMake if that makes a difference. I did have to install the "Windows 8.1 > SDK" in order for QtCreator to work correctly. > > I can successfully do the following: > * Configure and generate from the command line for Ninja > * Use the CMake-Gui to generate a VS 12 2013 solution file without any > issues. > * QtCreator 4.1 can use ninja to properly generate its own projects with a > correctly detected compiler. > > Thoughts? > -- > Michael A. Jackson > BlueQuartz Software > -- > > 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 clinton at elemtech.com Thu Sep 22 14:43:12 2016 From: clinton at elemtech.com (clinton at elemtech.com) Date: Thu, 22 Sep 2016 12:43:12 -0600 (MDT) Subject: [CMake] Browse buttons in CMake-Gui give URL cannot be listed Malformed URL error (Manjaro KDE Plasma 5.7 Qt 5.7) In-Reply-To: <2091860269.1569375.1474409885340@mail.yahoo.com> References: <2091860269.1569375.1474409885340.ref@mail.yahoo.com> <2091860269.1569375.1474409885340@mail.yahoo.com> Message-ID: <717192987.13478787.1474569792581.JavaMail.zimbra@elemtech.com> Hi, Thanks for reporting this. I was also able to reproduce it. The problem comes from cmake-gui calling QApplication::removeLibraryPath() in CMakeSetup.cxx. I think the solution is to remove that bit of code, but it may require some additional cpack related code to handle plugins correctly. It appears we are doing that cpack code for Windows and Mac already, but not for Linux (see CMake/Source/QtDialog/CMakeLists.txt line 48 to 85). Clint ----- On Sep 20, 2016, at 4:18 PM, cmake wrote: > Hi. > When I click "Browse source" or "Browse build" location buttons in the GUI I get > an error dialog saying that "URL cannot be listed file://" followed by another > dialog "Malformed URL". > 1. I built and reinstalled CMake from source but the problem persists. > 2. I searched the web but could not find anyone reporting this issue for CMake. > 3. When I launch CMake-gui from terminal, when I click the Browse buttons it > prints "kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find > "file"" in the terminal. I tried looking up for this message but again I could > not find anything about CMake. > Please let me know if you need some logs. > Machine: x64, Manjaro KDE Plasma 5.7, Qt 5.7 Nvidia GTX 960m, i7-6700 HQ > Regards, > Amit > -- > 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 mike.jackson at bluequartz.net Thu Sep 22 15:11:54 2016 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 22 Sep 2016 15:11:54 -0400 Subject: [CMake] Windows Visual Studio 13 with Ninja & CMake In-Reply-To: References: <57E41BA8.4010009@bluequartz.net> Message-ID: Yes. It works from there. BUT I run a custom command prompt through a variation of the standard "vcvarsall.bat" file where I add in my own environment variables but essentially it is the standard Visual Studio Command Prompt. Thanks Mike Jackson _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Thu, Sep 22, 2016 at 2:22 PM, David Cole wrote: > Does it work if you launch cmake-gui from the command prompt that > works for your "from the command line" scenario? > > On Thu, Sep 22, 2016 at 1:58 PM, Michael Jackson > wrote: > > My combination is Windows 10 (Anniversary Update), Visual Studio 12 2013 > > Update 5, Ninja and CMake 3.5/3.6. > > > > I launch CMake-GUI.exe, select my Source and binary directories and then > > "Configure", select "Ninja" as the generator and then I instantly get the > > error that CMake can not find the C/C++ compilers. I do not recall ever > > having this issue. I just recently updated Windows 10 to the latest so I > am > > not sure if that caused something to go wrong? I use the "Zipped" > version of > > CMake if that makes a difference. I did have to install the "Windows 8.1 > > SDK" in order for QtCreator to work correctly. > > > > I can successfully do the following: > > * Configure and generate from the command line for Ninja > > * Use the CMake-Gui to generate a VS 12 2013 solution file without any > > issues. > > * QtCreator 4.1 can use ninja to properly generate its own projects with > a > > correctly detected compiler. > > > > Thoughts? > > -- > > Michael A. Jackson > > BlueQuartz Software > > -- > > > > 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 clinton at elemtech.com Thu Sep 22 15:22:24 2016 From: clinton at elemtech.com (clinton at elemtech.com) Date: Thu, 22 Sep 2016 13:22:24 -0600 (MDT) Subject: [CMake] Browse buttons in CMake-Gui give URL cannot be listed Malformed URL error (Manjaro KDE Plasma 5.7 Qt 5.7) In-Reply-To: <2091860269.1569375.1474409885340@mail.yahoo.com> References: <2091860269.1569375.1474409885340.ref@mail.yahoo.com> <2091860269.1569375.1474409885340@mail.yahoo.com> Message-ID: <556784328.13567790.1474572144217.JavaMail.zimbra@elemtech.com> ----- On Sep 20, 2016, at 4:18 PM, cmake wrote: > Hi. > When I click "Browse source" or "Browse build" location buttons in the GUI I get > an error dialog saying that "URL cannot be listed file://" followed by another > dialog "Malformed URL". > 1. I built and reinstalled CMake from source but the problem persists. > 2. I searched the web but could not find anyone reporting this issue for CMake. > 3. When I launch CMake-gui from terminal, when I click the Browse buttons it > prints "kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find > "file"" in the terminal. I tried looking up for this message but again I could > not find anything about CMake. > Please let me know if you need some logs. > Machine: x64, Manjaro KDE Plasma 5.7, Qt 5.7 Nvidia GTX 960m, i7-6700 HQ > Regards, > Amit Hi Amit, This should fix your problem. Can you verify? https://cmake.org/gitweb?p=cmake.git;a=commit;h=48624b3c Thanks, Clint -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.hoffman at kitware.com Thu Sep 22 22:34:25 2016 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Thu, 22 Sep 2016 22:34:25 -0400 Subject: [CMake] Windows Visual Studio 13 with Ninja & CMake In-Reply-To: <57E41BA8.4010009@bluequartz.net> References: <57E41BA8.4010009@bluequartz.net> Message-ID: <7e0e8594-3407-53fc-b7f6-2bf0312a02ae@kitware.com> On 9/22/2016 1:58 PM, Michael Jackson wrote: > My combination is Windows 10 (Anniversary Update), Visual Studio 12 2013 > Update 5, Ninja and CMake 3.5/3.6. > > I launch CMake-GUI.exe, select my Source and binary directories and then > "Configure", select "Ninja" as the generator and then I instantly get > the error that CMake can not find the C/C++ compilers. I do not recall > ever having this issue. I just recently updated Windows 10 to the latest > so I am not sure if that caused something to go wrong? I use the > "Zipped" version of CMake if that makes a difference. I did have to > install the "Windows 8.1 SDK" in order for QtCreator to work correctly. > > I can successfully do the following: > * Configure and generate from the command line for Ninja > * Use the CMake-Gui to generate a VS 12 2013 solution file without any > issues. > * QtCreator 4.1 can use ninja to properly generate its own projects with > a correctly detected compiler. > > Thoughts? You have to run cmake-gui from an environment that has been setup to run the compiler. VS command prompt. If you run cmake-gui from a menu or clicking on an icon it won't have that and things won't work unless you use the VS generator which does not require a special environment. -Bill From roman.wueger at gmx.at Fri Sep 23 03:03:37 2016 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Fri, 23 Sep 2016 09:03:37 +0200 Subject: [CMake] [cmake-developers] CPack [NSIS] Install directory per component In-Reply-To: References: Message-ID: <11B2F93C-843A-41A4-991F-BB8F2F4BAE65@gmx.at> Hello, I've attached a patch with which it is now possible to set custom install directories per component. Best Regards Roman > Am 21.09.2016 um 23:04 schrieb Roman W?ger : > > Hello, > > Per default the install directory for a > component is $INSTDIR. > > Is there a chance to change the install dir per component? > > Thanks > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-CPack-NSIS-custom-component-install-directory.patch Type: application/octet-stream Size: 5563 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From amit112amit at yahoo.co.in Fri Sep 23 07:01:15 2016 From: amit112amit at yahoo.co.in (Amit Singh) Date: Fri, 23 Sep 2016 11:01:15 +0000 (UTC) Subject: [CMake] Browse buttons in CMake-Gui give URL cannot be listed Malformed URL error (Manjaro KDE Plasma 5.7 Qt 5.7) In-Reply-To: <556784328.13567790.1474572144217.JavaMail.zimbra@elemtech.com> References: <2091860269.1569375.1474409885340.ref@mail.yahoo.com> <2091860269.1569375.1474409885340@mail.yahoo.com> <556784328.13567790.1474572144217.JavaMail.zimbra@elemtech.com> Message-ID: <1078076775.3069897.1474628475225@mail.yahoo.com> Hi Clint.Thank you for the prompt response.?I want to confirm that your change fixes the problem. Regards, Amit On Thursday, 22 September 2016 12:22 PM, "clinton at elemtech.com" wrote: ----- On Sep 20, 2016, at 4:18 PM, cmake wrote: Hi.When I click "Browse source" or "Browse build" location buttons in the GUI I get an error dialog saying that "URL cannot be listed file://" followed by another dialog "Malformed URL".? - I built and reinstalled CMake from source but the problem persists. - I searched the web but could not find anyone reporting this issue for CMake. - When I launch CMake-gui from terminal, when I click the Browse buttons it prints "kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "file"" in the terminal. I tried looking up for this message but again I could not find anything about CMake. Please let me know if you need some logs. Machine: x64, Manjaro KDE Plasma 5.7, Qt 5.7 Nvidia GTX 960m, i7-6700 HQ Regards, Amit Hi Amit, This should fix your problem.? Can you verify? https://cmake.org/gitweb?p=cmake.git;a=commit;h=48624b3c Thanks, Clint -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhongle at proplussolution.com Fri Sep 23 11:14:09 2016 From: zhongle at proplussolution.com (vakano) Date: Fri, 23 Sep 2016 08:14:09 -0700 (MST) Subject: [CMake] Build single file with Cmake in Qtcreator Message-ID: <1474643649373-7594306.post@n2.nabble.com> Hi? All, I know Qt Creator support to build single file from Menu "Build" -> ?Build File?? or right click one source file in project tree to build single file, but when I load a Cmake Project, Menu ?Build File? and ?right click? are both disappeared. Does it mean build single file functionality is only available for qmake? Does cmake project support build single file, if so, how to do it? Thanks? Le -- View this message in context: http://cmake.3232098.n2.nabble.com/Build-single-file-with-Cmake-in-Qtcreator-tp7594306.html Sent from the CMake mailing list archive at Nabble.com. From tgwozdz at bigvikinggames.com Fri Sep 23 11:14:43 2016 From: tgwozdz at bigvikinggames.com (Tom Gwozdz) Date: Fri, 23 Sep 2016 11:14:43 -0400 Subject: [CMake] cross platform build with external dependencies Message-ID: Hello! I'm working on a relatively large game engine project which consists of several libraries and a few executables. The project is supposed to be cross platform, so should be buildable on OSX with XCode, Windows with Visual Studio and for the web using the Emscripten cross-compiler. The project also has a few external dependencies, libraries like pugixml, glm, sdl2, gtest, etc. Part of the goal is to make it super easy to build across all the supported platforms, without having to go out and try to track down dependencies manually for each platform. Originally I had set this up as two projects. There's a Engine project which contains the libraries and executables that are built on all the platforms. There's also an Engine-External project which pulls in all our dependency libraries using ExternalProject calls. All of these get built for a specific platform, and are then placed in ${CMAKE_INSTALL_PREFIX}/${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}/${CMAKE_CXX_COMPILER_ID} (for example Darwin/x86_64/AppleClang/). The idea was that we could eventually just build this once (since our dependencies aren't changing very often), then just have everyone's build point at that installation and it'll work for all their various platform builds. Our project is mostly designed to be used as a library, so then there will be other projects depending on our Engine project. I've set up our Engine project to install to a specific directory, and I exported all our symbols there. I also have an EngineConfig.cmake file set up that includes our exported symbols, so 3rd party apps should be able to find our libraries just fine. My question is about the external dependencies that we've built in the Engine-External project. Currently a 3rd party project just depending on our Engine project doesn't get all of those included transitively, since those Engine-External symbols aren't being exported anywhere. What would be the best way of getting 3rd party projects to get our Engine-External dependencies as well? I can think of a few potential solutions, but I'm not sure what is the intended CMake solution. 1. Have 3rd party library set its CMAKE_MODULE_PATH to point at both the Engine install and the Engine-External// install. Then do find_package(Engine CONFIG REQUIRED), and do a find_package(...) for each external dependency manually. This is what we currently do, but I don't really like this since 3rd party projects shouldn't have to care about our external dependencies. 2. Have our EngineConfig.cmake have the find_package(...) calls for the external dependencies itself. The 3rd party project would still have to set its CMAKE_MODULE_PATH to point at both the Engine and the Engine-External// installs. 3. Option 2 could be simplified somewhat by installing both Engine and Engine-External to the same place, so that CMAKE_MODULE_PATH would then only have to point at one location. 4. Set up some kind of Engine-ExternalConfig.cmake that would have the library imports for all our externals, and have 3rd parties then find_package(Engine ...) and find_package(Engine-External ...) along with the appropriate CMAKE_MODULE_PATH. Are any of these valid approaches? I'm reluctant to just install all the Engine and Engine-External implementations globally, because there may be multiple versions (ie. builds for various different platforms) on the same machine. Is there a better way of managing all this so that it works for a bunch of different local, cross platform, and cross-compiling builds? Thanks! Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From leventelist at gmail.com Fri Sep 23 13:54:35 2016 From: leventelist at gmail.com (Lev) Date: Fri, 23 Sep 2016 19:54:35 +0200 Subject: [CMake] set the compiler Message-ID: <20160923195435.478f24e0@jive> Hello all, I know it is not recommended, but I try to do something like this: if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux") set (CMAKE_C_COMPILER "gcc") elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD") set (CMAKE_C_COMPILER "clang37") endif () cmake complains, that gcc is not in my path, but it is. leva at jive:~$ which gcc /usr/bin/gcc I haven't tried it on the FreeBSD yet. Any solutions for this? Thanks, Lev -- 73 de HA5OGL Op.: Levente From gjasny at googlemail.com Fri Sep 23 16:35:15 2016 From: gjasny at googlemail.com (Gregor Jasny) Date: Fri, 23 Sep 2016 22:35:15 +0200 Subject: [CMake] CMAKE_OSX_DEPLOYMENT_TARGET vs CMAKE_OSX_SYSROOT In-Reply-To: <75FAC1D1-D586-4F62-8A8A-790320272B44@kdab.com> References: <5345837b611d69e3cf3a4d36e377127499d1a99a@webmail.endoframe.com> <75FAC1D1-D586-4F62-8A8A-790320272B44@kdab.com> Message-ID: On 21/09/2016 10:54, James Turner wrote: > >> On 20 Sep 2016, at 16:00, Braden McDaniel wrote: >> >> When setting CMAKE_OSX_SYSROOT to the unversioned directory name (using Xcode 8, as it happens) and setting CMAKE_OSX_DEPLOYMENT_TARGET, I get this error: >> >> >> -- The CXX compiler identification is AppleClang 8.0.0.8000038 >> CMake Error at /Applications/CMake.app/Contents/share/cmake-3.6/Modules/Platform/Darwin.cmake:76 (message): >> CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT: >> >> "/Applications/Xcode-8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" >> >> is not set to a MacOSX SDK with a recognized version. Either set >> CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to >> empty. >> Call Stack (most recent call first): >> /Applications/CMake.app/Contents/share/cmake-3.6/Modules/CMakeSystemSpecificInformation.cmake:36 (include) >> CMakeLists.txt:37 (project) >> >> >> I'm able to suppress the error by using the versioned (symlink) directory; but isn't the premise of this error message invalid? As I understand it, since Xcode 7 (or perhaps earlier?), there is no requirement that the deployment target match the SDK version. > > I?m seeing a similar error when setting CMAKE_OSX_DEPLOYMENT_TARGET to 10.7 with XCode 8, and leaving CMAKE_OSX_SYSROOT unset. I?m couldn?t identify where (from Modules/Platform/Darwin.cmake) the detected value of _CMAKE_OSX_SYSROOT is computed. (I don?t wish to explicitly set it) Could you please file a bug report and CC me? I'll try to submit a patch next week but would appreciate a reminder :) In my projects and toolchain files I always used xcrun to query for the SDK path: $ xcrun --sdk macosx --show-sdk-path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk The xcrun approach has the advantage that it respects the DEVELOPER_DIR environment variable and thus works with different Xcode installations. Thanks, Gregor From gjasny at googlemail.com Sun Sep 25 05:54:30 2016 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 25 Sep 2016 11:54:30 +0200 Subject: [CMake] CMAKE_OSX_DEPLOYMENT_TARGET vs CMAKE_OSX_SYSROOT In-Reply-To: References: <5345837b611d69e3cf3a4d36e377127499d1a99a@webmail.endoframe.com> <75FAC1D1-D586-4F62-8A8A-790320272B44@kdab.com> Message-ID: <2bf7149f-0841-34d8-8c65-235b14de3f51@googlemail.com> On 23/09/2016 22:35, Gregor Jasny wrote: > On 21/09/2016 10:54, James Turner wrote: >> >>> On 20 Sep 2016, at 16:00, Braden McDaniel wrote: >>> >>> When setting CMAKE_OSX_SYSROOT to the unversioned directory name (using Xcode 8, as it happens) and setting CMAKE_OSX_DEPLOYMENT_TARGET, I get this error: >>> >>> >>> -- The CXX compiler identification is AppleClang 8.0.0.8000038 >>> CMake Error at /Applications/CMake.app/Contents/share/cmake-3.6/Modules/Platform/Darwin.cmake:76 (message): >>> CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT: >>> >>> "/Applications/Xcode-8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" >>> >>> is not set to a MacOSX SDK with a recognized version. Either set >>> CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to >>> empty. >>> Call Stack (most recent call first): >>> /Applications/CMake.app/Contents/share/cmake-3.6/Modules/CMakeSystemSpecificInformation.cmake:36 (include) >>> CMakeLists.txt:37 (project) >>> >>> >>> I'm able to suppress the error by using the versioned (symlink) directory; but isn't the premise of this error message invalid? As I understand it, since Xcode 7 (or perhaps earlier?), there is no requirement that the deployment target match the SDK version. The deployment target gives you backwards compatibility back to the specified version. In your example the binary should be runnable on macOS 10.10 and later even that you used a newer SDK. That way you have access to the latest SDK features which you could use after a thorough check at runtime. >> I?m seeing a similar error when setting CMAKE_OSX_DEPLOYMENT_TARGET to 10.7 with XCode 8, and leaving CMAKE_OSX_SYSROOT unset. I?m couldn?t identify where (from Modules/Platform/Darwin.cmake) the detected value of _CMAKE_OSX_SYSROOT is computed. (I don?t wish to explicitly set it) Will be fixed, too. > Could you please file a bug report and CC me? I'll try to submit a patch > next week but would appreciate a reminder :) I filed https://gitlab.kitware.com/cmake/cmake/issues/16323 and will push a fix soon. From braden at endoframe.com Sun Sep 25 11:53:08 2016 From: braden at endoframe.com (Braden McDaniel) Date: Sun, 25 Sep 2016 11:53:08 -0400 Subject: [CMake] CMAKE_OSX_DEPLOYMENT_TARGET vs CMAKE_OSX_SYSROOT In-Reply-To: <2bf7149f-0841-34d8-8c65-235b14de3f51@googlemail.com> References: <5345837b611d69e3cf3a4d36e377127499d1a99a@webmail.endoframe.com> <75FAC1D1-D586-4F62-8A8A-790320272B44@kdab.com> <2bf7149f-0841-34d8-8c65-235b14de3f51@googlemail.com> Message-ID: <1474818788.2231.5.camel@endoframe.com> On Sun, 2016-09-25 at 11:54 +0200, Gregor Jasny wrote: > On 23/09/2016 22:35, Gregor Jasny wrote: > > > > On 20 Sep 2016, at 16:00, Braden McDaniel > > > > wrote: > > > > > > > > When setting CMAKE_OSX_SYSROOT to the unversioned directory > > > > name (using Xcode 8, as it happens) and setting > > > > CMAKE_OSX_DEPLOYMENT_TARGET, I get this error: > > > > > > > > > > > > -- The CXX compiler identification is AppleClang 8.0.0.8000038 > > > > CMake Error at /Applications/CMake.app/Contents/share/cmake- > > > > 3.6/Modules/Platform/Darwin.cmake:76 (message): > > > > CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT: > > > > > > > > "/Applications/Xcode- > > > > 8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SD > > > > Ks/MacOSX.sdk" > > > > > > > > is not set to a MacOSX SDK with a recognized version. Either > > > > set > > > > CMAKE_OSX_SYSROOT to a valid SDK or set > > > > CMAKE_OSX_DEPLOYMENT_TARGET to > > > > empty. > > > > Call Stack (most recent call first): > > > > /Applications/CMake.app/Contents/share/cmake- > > > > 3.6/Modules/CMakeSystemSpecificInformation.cmake:36 (include) > > > > CMakeLists.txt:37 (project) > > > > > > > > > > > > I'm able to suppress the error by using the versioned (symlink) > > > > directory; but isn't the premise of this error message invalid? > > > > As I understand it, since Xcode 7 (or perhaps earlier?), there > > > > is no requirement that the deployment target match the SDK > > > > version. > > The deployment target gives you backwards compatibility back to the > specified version. In your example the binary should be runnable on > macOS 10.10 and later even that you used a newer SDK. That way you > have > access to the latest SDK features which you could use after a > thorough > check at runtime. Yes, that squares with my understanding of the current semantics. Interestingly, in Xcode 8, the versioned SDK directory is actually a symlink to the unversioned one. ?It would not surprise me if the versioned SDK directory went away altogether in a future release; this version number is moot with the current semantics. > I filed https://gitlab.kitware.com/cmake/cmake/issues/16323 and will > push a fix soon. Thanks! -- Braden McDaniel From intelfx at intelfx.name Mon Sep 26 00:09:48 2016 From: intelfx at intelfx.name (Ivan Shapovalov) Date: Mon, 26 Sep 2016 07:09:48 +0300 Subject: [CMake] Editing IMPORTED targets Message-ID: <1474862988.10826.5.camel@intelfx.name> Hello! Using find modules to detect dependencies has a nice feature: it is then possible to edit the resulting cache entries to link to different libraries (or add other libraries along the found ones, for whatever purposes), or change directories, or flags, or whatever. Using find configs and IMPORTED targets, however, prevents doing this, because IMPORTED targets are not stored in CMake?cache. This can be a significant disadvantage at times. So: is there any workaround/hidden feature to edit IMPORTED targets? Or is such a feature planned? Thanks, -- Ivan Shapovalov / intelfx / -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: This is a digitally signed message part URL: From james.turner at kdab.com Mon Sep 26 02:57:11 2016 From: james.turner at kdab.com (James Turner) Date: Mon, 26 Sep 2016 07:57:11 +0100 Subject: [CMake] CMAKE_OSX_DEPLOYMENT_TARGET vs CMAKE_OSX_SYSROOT In-Reply-To: <1474818788.2231.5.camel@endoframe.com> References: <5345837b611d69e3cf3a4d36e377127499d1a99a@webmail.endoframe.com> <75FAC1D1-D586-4F62-8A8A-790320272B44@kdab.com> <2bf7149f-0841-34d8-8c65-235b14de3f51@googlemail.com> <1474818788.2231.5.camel@endoframe.com> Message-ID: <948D63FC-3D2B-42E5-894E-9D5E37ABA661@kdab.com> > On 25 Sep 2016, at 16:53, Braden McDaniel wrote: > > Yes, that squares with my understanding of the current semantics. > > Interestingly, in Xcode 8, the versioned SDK directory is actually a > symlink to the unversioned one. It would not surprise me if the > versioned SDK directory went away altogether in a future release; this > version number is moot with the current semantics. > >> I filed https://gitlab.kitware.com/cmake/cmake/issues/16323 and will >> push a fix soon. > > Thanks! Agreed on all counts - my assumptions is that versioned SDKs will go away in the next release, we?ll simply use the one inside the chosen platform, and set the deployment target (as I already do). Thanks for working on this fix! Kind regards, James -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3868 bytes Desc: not available URL: From orion at cora.nwra.com Tue Sep 27 00:20:11 2016 From: orion at cora.nwra.com (Orion Poplawski) Date: Mon, 26 Sep 2016 22:20:11 -0600 Subject: [CMake] Running CxxTest fails on Fedora 24 In-Reply-To: References: Message-ID: On 08/11/2016 06:48 PM, Zan Lynx wrote: > The Fedora /usr/bin/cxxtestgen script calls /usr/bin/python3. NOT > python2 or python. > > CMake runs /usr/bin/python /usr/bin/cxxtestgen which is linked to > python2, and the script fails. > > I don't quite understand why CMake feels the need to call it explicitly > with the Python interpreter that it found instead of using the shebang. > Maybe Windows? Eh. > > I am fixing it in my script by doing this: > >> FIND_PACKAGE(PythonInterp 3 QUIET) >> FIND_PACKAGE(CxxTest) > > I thought this might help anyone else hitting this. > I've filed https://gitlab.kitware.com/cmake/cmake/issues/16331 -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane orion at cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com From andrew.corrigan at nrl.navy.mil Wed Sep 28 18:02:02 2016 From: andrew.corrigan at nrl.navy.mil (Andrew Corrigan) Date: Wed, 28 Sep 2016 18:02:02 -0400 Subject: [CMake] Detect Clang as the CUDA compiler Message-ID: Are there plans for having CMake detect Clang as a CUDA compiler, as opposed to NVCC? I saw this message on the developers mailing list, but with no response [1]. Support for this would be very useful. [1] https://cmake.org/pipermail/cmake-developers/2016-March/028034.html From alessandro.menti at hotmail.it Thu Sep 29 03:13:37 2016 From: alessandro.menti at hotmail.it (Alessandro Menti) Date: Thu, 29 Sep 2016 07:13:37 +0000 Subject: [CMake] Converting Autoconf-based tests that compile/run a program and check its exit code Message-ID: Hi everyone, I'm converting an Autoconf-based library (specifically, gettext [1]) to CMake to be able to compile it easily on Windows and to mark it as a dependency of another CMake-based project. I have come across a test [2] that compiles a small program, runs it and checks its exit code to determine if some functions work correctly. 1) Is there a way to perform a similar check in CMake (maybe with a custom module)? 2) If not, what would be the best way to convert it? Thanks in advance, Alessandro Menti [1] https://www.gnu.org/software/gettext/ [2] http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/fcntl-o.m4 From eric.noulard at gmail.com Thu Sep 29 03:25:43 2016 From: eric.noulard at gmail.com (Eric Noulard) Date: Thu, 29 Sep 2016 09:25:43 +0200 Subject: [CMake] Converting Autoconf-based tests that compile/run a program and check its exit code In-Reply-To: References: Message-ID: 2016-09-29 9:13 GMT+02:00 Alessandro Menti : > Hi everyone, > I'm converting an Autoconf-based library (specifically, gettext [1]) to > CMake to be able to compile it easily on Windows and to mark it as a > dependency of another CMake-based project. > > I have come across a test [2] that compiles a small program, runs it and > checks its exit code to determine if some functions work correctly. > > 1) Is there a way to perform a similar check in CMake (maybe with a > custom module)? > I guess that you should look at try_run command: https://cmake.org/cmake/help/v3.6/command/try_run.html > 2) If not, what would be the best way to convert it? > > Thanks in advance, > Alessandro Menti > > [1] https://www.gnu.org/software/gettext/ > [2] > http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext- > runtime/m4/fcntl-o.m4 > -- > > 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 alessandro.menti at hotmail.it Thu Sep 29 05:06:49 2016 From: alessandro.menti at hotmail.it (Alessandro Menti) Date: Thu, 29 Sep 2016 09:06:49 +0000 Subject: [CMake] Converting Autoconf-based tests that compile/run a program and check its exit code In-Reply-To: References: Message-ID: Il 29/09/2016 09:25, Eric Noulard ha scritto: > I guess that you should look at > > try_run command: > https://cmake.org/cmake/help/v3.6/command/try_run.html That's what I was looking for - I didn't catch that. Thank you very much! Cheers, Alessandro Menti From rjvbertin at gmail.com Thu Sep 29 13:34:26 2016 From: rjvbertin at gmail.com (=?ISO-8859-1?Q?Ren=E9_J=2EV=2E?= Bertin) Date: Thu, 29 Sep 2016 19:34:26 +0200 Subject: [CMake] check_include_file for Objective C(++) triggers what looks like a clang bug (but probably isn't) Message-ID: <1619705.MDpy4nAHMa@bola> Hi, I've been trying to use the check_include_file() macro to verify if a particular ObjC header can be compiled. This turns out to be almost impossible, but I cannot put my finger on whether there isn't a compiler error involved too. Let's take the easier case for Mac OS X, where you don't have to install GNUstep. The following statement could be expected to work: check_include_file(Foundation/Foundation.h HAVE_FOUNDATION "-v -x objective-c") but it fails. The -x argument is required, the -v option is purely for debugging. The error from CMakeError.log is copied below; it seems that the intermediate object file is corrupt. However, the same symptoms occur with a comparable test file built the same way with clang: %> clang -x objective-c -c test.c %> clang -x objective-c test.o However, %> clang test.o and %> clang -x objective-c test.c work fine, and it's clear from the trace output that the -x option should NOT be passed to clang when it's used as a linker driver. Questions: - is there a more appropriate way to check if an Objective C header can be compiled? - is there a way to configure or set up things such that the trycompile functions use a single compiler invocation, or test only the object file generation (which should be enough for testing a headerfile)? Thank, Ren? CMakeError.log extract: Building C object CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -O3 -march=native -g -v -x objective-c -isystem /usr/include/GNUstep -o CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o -c ...//src/MSWin/ SynchroTr/CMake/Release/CMakeFiles/CMakeTmp/CheckIncludeFile.c Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin13.4.0 Thread model: posix "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9 .0 -emit-obj -disable-free -disable-llvm-verifier -main-file-name CheckIncludeFile.c -mrelocation-model pic -pic-level 2 -mdisable-f p-elim -masm-verbose -munwind-tables -target-cpu corei7-avx -target-linker-version 241.9 -v -gdwarf-2 -coverage-file ...//src/MSWin/SynchroTr/CMake/Release/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o -resource-di r /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0 -isystem /usr/include/GNUs tep -I/opt/local/include -O3 -fdebug-compilation-dir ...//src/MSWin/SynchroTr/CMake/Release/CMakeFiles/ CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extend ed-block-signature -fobjc-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o CMakeFiles/cmTC_61f5f .dir/CheckIncludeFile.c.o -x objective-c ...//src/MSWin/SynchroTr/CMake/Release/CMakeFiles/CMakeTmp/Che ckIncludeFile.c clang -cc1 version 6.0 based upon LLVM 3.5svn default target x86_64-apple-darwin13.4.0 ignoring nonexistent directory "/usr/include/GNUstep" #include "..." search starts here: #include <...> search starts here: /opt/local/include /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) End of search list. Linking C executable cmTC_61f5f /opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_61f5f.dir/link.txt --verbose=1 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -O3 -march=native -g -v -x objective-c -isystem /usr/include/GNUstep -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o -o cmTC_61f5f Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin13.4.0 Thread model: posix "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -disable-free -disable-llvm-verifier -main-file-name CheckIncludeFile.c.o -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu corei7-avx -target-linker-version 241.9 -v -gdwarf-2 -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0 -isystem /usr/include/GNUstep -I/opt/local/include -O3 -fdebug-compilation-dir ...//src/MSWin/SynchroTr/CMake/Release/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fobjc-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o /var/folders/j1/1439ppj08xj8h6006s6drbq00000gs/T/CheckIncludeFile-025ed5.o -x objective-c CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o clang -cc1 version 6.0 based upon LLVM 3.5svn default target x86_64-apple-darwin13.4.0 ignoring nonexistent directory "/usr/include/GNUstep" #include "..." search starts here: #include <...> search starts here: /opt/local/include /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) End of search list. CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o:1:1: error: source file is not valid UTF-8 ^ CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o:1:2: error: source file is not valid UTF-8 ^ CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o:1:3: error: source file is not valid UTF-8 ^ CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o:1:4: error: source file is not valid UTF-8 ^ CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o:1:5: error: expected identifier or '(' ^ CMakeFiles/cmTC_61f5f.dir/CheckIncludeFile.c.o:1:6: warning: null character ignored [-Wnull-character] [etc, snip] From roman.wueger at gmx.at Fri Sep 30 02:43:46 2016 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Fri, 30 Sep 2016 08:43:46 +0200 Subject: [CMake] CPack [WiX] Customizations of individual features/components Message-ID: <1F9467E7-A7EE-4869-A68A-00F9AE92C601@gmx.at> Hello, I want to customize some with CPack generated *.wxs files. For example: directories.wxs is generated with only the TARGET_DIR. How can I add an additional directory in this file and use the newly added directory in the components (features.wxs)? I read about CPACK_WIX_PATCH_FILE. Maybe it is possible to do so with it, but if so how? Thanks in advance Regards Roman From michael.stuermer at schaeffler.com Fri Sep 30 05:59:11 2016 From: michael.stuermer at schaeffler.com (Stuermer, Michael SP/HZA-ZSEP) Date: Fri, 30 Sep 2016 09:59:11 +0000 Subject: [CMake] [cmake-developers] CPack [WiX] Customizations of individual features/components In-Reply-To: <1F9467E7-A7EE-4869-A68A-00F9AE92C601@gmx.at> References: <1F9467E7-A7EE-4869-A68A-00F9AE92C601@gmx.at> Message-ID: <4f9d7f7121ff4f108f9386d92f43fb08@DE013666.schaeffler.com> Hello Roman, directories are added automatically to the directories.wxs file if you use the install() command in cmake and set the DESTINATION to some subfolder: install(FILES DESTINATION "my/sufolder/path") To add completely new directories I'd suggest to use CPACK_WIX_EXTRA_SOURCES and use a element where you can place your new directories in. Untested example how to add a directory (not sure if it works exactly like this): I'm not sure if patching of elements is possible/implemented in cpack and I believe using the extra sources mechanism is more convenient. PS: if you want to use the CPACK_WIX_PATCH_FILE nevertheless and you have many framents to patch, CPACK_WIX_PATCH_FILE also accepts a list of filenames so you can split up your patches in an arbitrary number of files. best regards, Michael > -----Original Message----- > From: cmake-developers [mailto:cmake-developers-bounces at cmake.org] > On Behalf Of Roman W?ger > Sent: Friday, September 30, 2016 8:44 AM > To: CMake Developer MailingList; CMake MailingList > Subject: [cmake-developers] CPack [WiX] Customizations of individual > features/components > > Hello, > > I want to customize some with CPack generated *.wxs files. > > For example: directories.wxs is generated with only the TARGET_DIR. > > How can I add an additional directory in this file and use the newly added > directory in the components (features.wxs)? > > I read about CPACK_WIX_PATCH_FILE. Maybe it is possible to do so with it, > but if so how? > > Thanks in advance > > 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 nilsgladitz at gmail.com Fri Sep 30 06:53:52 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 30 Sep 2016 12:53:52 +0200 Subject: [CMake] [cmake-developers] CPack [WiX] Customizations of individual features/components In-Reply-To: <1F9467E7-A7EE-4869-A68A-00F9AE92C601@gmx.at> References: <1F9467E7-A7EE-4869-A68A-00F9AE92C601@gmx.at> Message-ID: <67244edc-d6a0-6b03-cdf3-98a448fbba06@gmail.com> On 09/30/2016 08:43 AM, Roman W?ger wrote: > Hello, > > I want to customize some with CPack generated *.wxs files. > > For example: directories.wxs is generated with only the TARGET_DIR. TARGETDIR (no underscore) is always the one and only root-directory element [1]. > How can I add an additional directory in this file and use the newly added directory in the components (features.wxs)? > > I read about CPACK_WIX_PATCH_FILE. Maybe it is possible to do so with it, but if so how? CPACK_WIX_PATCH_FILE can be used to add XML content to (some) existing elements. It can not be used to reorder or remove existing elements and can not be used to modify the attributes of existing elements. Nils [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa372064(v=vs.85).aspx From d3ck0r at gmail.com Fri Sep 30 13:57:07 2016 From: d3ck0r at gmail.com (J Decker) Date: Fri, 30 Sep 2016 10:57:07 -0700 Subject: [CMake] try_compile additional include FILES Message-ID: I've been playing with libressl; which has quite a few 'check_function_exists' In particular 'check-function-exists( inet_pton HAVE_INET_PTON )' this is failing, because, directly, there is no 'inet_pton' in windows, but by including ws2tcpip.h there is a #define that changes it to InetPton[A/W] but I don't see any way to specify additional files to include. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Fri Sep 30 15:09:43 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 30 Sep 2016 15:09:43 -0400 Subject: [CMake] Correct way to use ARMCC (Files in Modules/Compiler/ARMCC*) In-Reply-To: References: Message-ID: > > 1. Toolchain needs to be in a separate file > Yes, that is certainly best practice and makes the rest of the cross-compiling infrastructure just work better. > 2. That file needs to be called before the project line of your > CMakeLists.txt > You actually shouldn't be "calling" it at all. You specify it with cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/MyARMStuff.cmake ...[other cmake options] /path/to/source. CMake then explicitly processes the toolchain file in a few different places but handles when to do this internally. Basically you write your CMakeLists.txt without worrying much about cross-compiling and you specify the toolcain file to let CMake deal with the cross-compile aspect. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.maynard at kitware.com Fri Sep 30 15:57:35 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Fri, 30 Sep 2016 15:57:35 -0400 Subject: [CMake] Detect Clang as the CUDA compiler In-Reply-To: References: Message-ID: Hi Andrew, I am not aware of anybody working on adding clang as a CUDA compiler. After a quick glance at the clang compiler flags it seems that very few / if any of the current NVCC logic could be reused for the clang compiler ( outside of toolkit location). On Wed, Sep 28, 2016 at 6:02 PM, Andrew Corrigan wrote: > Are there plans for having CMake detect Clang as a CUDA compiler, as opposed to NVCC? I saw this message on the developers mailing list, but with no response [1]. Support for this would be very useful. > > [1] https://cmake.org/pipermail/cmake-developers/2016-March/028034.html > -- > > 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