Re: [CMake] How to work around permission deficiencies of file(GENERATE...)? (was cmp0026, file(GENERATE...), and configure_file)

2015-04-29 Thread Alan W. Irwin
On 2015-04-29 20:36-0400 David Cole wrote: It seems like a reasonable feature request to me to ask for file(GENERATE to support a similar or sub-set of permissions related options which other file subcommands already provide: [FILE_PERMISSIONS ...] [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERM

Re: [CMake] Linking to MySQL C++ Connector libraries using extra flags, Ubuntu 14.04 LTS, gcc

2015-04-29 Thread Peleg Bar-Sapir
Oh, ok. It works (had to solve some conflicting definitions between OpenCV and MySQL libraries, but I managed that). Thanks a lot! I would excuse the the obvious issue with mainexe by stating it's late (3AM here), but I'm a night-owl, so that's not really an excuse... should be more sharp next ti

Re: [CMake] Linking to MySQL C++ Connector libraries using extra flags, Ubuntu 14.04 LTS, gcc

2015-04-29 Thread Daniel Schepler
OK, my target_link_libraries() line was just an example not knowing your executable name - you'd want to update it to target_link_libraries(entity_find_visual ${MYSQL_LIBRARY}) . (And personally, I'd group the find_package calls together, then combine the target_link_libraries lines into one -

Re: [CMake] How to work around permission deficiencies of file(GENERATE...)? (was cmp0026, file(GENERATE...), and configure_file)

2015-04-29 Thread David Cole via CMake
It seems like a reasonable feature request to me to ask for file(GENERATE to support a similar or sub-set of permissions related options which other file subcommands already provide: [FILE_PERMISSIONS ...] [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS] Doesn't seem like it should be tha

Re: [CMake] Linking to MySQL C++ Connector libraries using extra flags, Ubuntu 14.04 LTS, gcc

2015-04-29 Thread Peleg Bar-Sapir
For some reasons, now the "cmake ." command doesn't work either. I haven't yet begun debugging, but I played a bit with the CMakeLists.txt file, and then returned it to it's original state, with your added lines (replacing mariadb with mysqldb, of course). Now I get this error: $ cmake . CMake Err

Re: [CMake] Issues with adding -flto in CMAKE_C[XX]_FLAGS_RELEASE

2015-04-29 Thread Daniel Schepler
I've managed to create a small test case that reproduces the issue, and posted a bug report: http://www.cmake.org/Bug/view.php?id=15547 . It would seem that the issue occurs if you try to update CMAKE_AR and CMAKE_RANLIB after a previous run of CMake - though not if you include those settings o

Re: [CMake] Linking to MySQL C++ Connector libraries using extra flags, Ubuntu 14.04 LTS, gcc

2015-04-29 Thread Daniel Schepler
I'd put debugging statements in to see what is being returned as MYSQL_INCLUDE_DIR and MYSQL_LIBRARY; and if those look correct, I'd run "make VERBOSE=1" to check exactly what's on the compilation command line. -- Daniel From: Peleg Bar-Sapir [pel...@gmai

Re: [CMake] Linking to MySQL C++ Connector libraries using extra flags, Ubuntu 14.04 LTS, gcc

2015-04-29 Thread Peleg Bar-Sapir
Hello Daniel, Thanks for your help. I took your file and plagiarized it, replacing "MariaDB"/MARIADB"/"mariadb" with "MySQL"/"MYSQL"/"mysql" accordinly - and did the same for the CMakeLists.txt (I put FindMySQL.cmake in /CMake/Modules). Running 'cmake .' now gives no error, but running make gives

[CMake] How to work around permission deficiencies of file(GENERATE...)? (was cmp0026, file(GENERATE...), and configure_file)

2015-04-29 Thread Alan W. Irwin
While attempting to use the configure_file_generate function discussed in a recent thread here, I discovered a permission deficiency of the file(GENERATE ...) command which was that permissions are not copied from input file to output file like they are with configure_file. @CMake developers: was

Re: [CMake] Linking to MySQL C++ Connector libraries using extra flags, Ubuntu 14.04 LTS, gcc

2015-04-29 Thread Daniel Schepler
I'd say that most of the output of mysql_config --cflags and mysql_config --libs is a bug - for the shared library, there's no need to explicitly include the pthread etc. libraries (unless, of course, your program also uses them directly). In CMake terms, they should have been PRIVATE dependenc

[CMake] Linking to MySQL C++ Connector libraries using extra flags, Ubuntu 14.04 LTS, gcc

2015-04-29 Thread Peleg Bar-Sapir
Hello, First, I would like to point out that I'm new to CMake, and I'm not a professional programer by any means - just a Physics research student. I looked for answers to my issue online, but couldn't find anything that helped me. I also asked my peers and friends, but unfortunately none of them

[CMake] CheckTypeSize policy warning

2015-04-29 Thread Graham Bloice
In CMake 3.1.3 and later invoking check_type_size from the module CheckTypeSize.cmake causes a policy CMP0054 warning. For example, when building zlib-1.28 (on Windows): CMake Warning (dev) at C:/ProgramData/chocolatey/lib/cmake/content/cmake-3.1.3-win32-x86/share/cmake-3.1/Modules/CheckTypeSize.

[CMake] CXXFLAGS and CMAKE_REQUIRED_FLAGS correspondance

2015-04-29 Thread Mateusz Loskot
Hi, Let's consider 32-bit build target on 64-bit host, is this canonical way of setting the flags? CXXFLAGS="-m32" cmake ../src # in my CMakeLists.txt CMAKE_REQUIRED_FLAGS=${CXXFLAGS} If I don't set CMAKE_REQUIRED_FLAGS with -m32, then obviously CheckSymbolExists (and others) may give unexpecte

Re: [CMake] Detecting -m32 build target on 64-bit host

2015-04-29 Thread Mateusz Loskot
On 24 April 2015 at 21:00, Gregor Jasny wrote: > On 23/04/15 16:54, Mateusz Loskot wrote: >> Surprisingly, I'm having trouble to figure out how to determine, >> that in Linux 64-bit OS, I'm building a project with -m32 specified. >> IOW, any CMake variable or macro to tell me target architecture >

[CMake] Issues with adding -flto in CMAKE_C[XX]_FLAGS_RELEASE

2015-04-29 Thread Daniel Schepler
I just tried an experiment on our code base, adding -flto to the default values of CMAKE_C_FLAGS_RELEASE and CMAKE_CXX_FLAGS_RELEASE, and setting CMAKE_AR to /usr/bin/gcc-ar-5, CMAKE_RANLIB to /usr/bin/gcc-ranlib-5. However, make VERBOSE=1 shows that the intermediate static libraries are still

[CMake] Tegra NSight shared libraries not copied into apk

2015-04-29 Thread Max Savenkov
When I specify a shared library via target_link_libraries, it gets added to Linker options and is linked. But when the final APK is assembled, specified shared library does not get copied into it (into lib\armeabi-v7a directory), and therefore I get an error after launch, because loadLibrary cannot

[CMake] Automatic compilation of .xib's for _macosx_ target

2015-04-29 Thread Martin Percossi
Hello, I came across the following link: http://stackoverflow.com.80bola.com/questions/7462129/cmake-xib-to-nib-compilation-for-ios-target?s=1|0.8637 Described is how to set up a CMakeLists.txt in order to have .xib files automatically compiled to .nib files and placed in the Resources folder wi

Re: [CMake] CMake itself - build fails with GCC 5.1

2015-04-29 Thread Mariusz Pluciński
Ok, I have found out what is the issue. In case anyone meets this issue, here is explanation: cmsys/ios/sstream has own implementation of sstream, which is used when normal one could not be found (or is known as buggy). So it should not be even used in my build. Eventually, it shows up that the p

[CMake] CMake itself - build fails with GCC 5.1

2015-04-29 Thread Mariusz Pluciński
I have recently built newest GCC - 5.1.0 - on CentOS 7. Now, I am trying to build CMake with it. Unfortunately, it stops on "./configure" step with following message: In file included from /root/cmake-3.2.2/Source/kwsys/SystemTools.cxx:36:0: /root/cmake-3.2.2/Bootstrap.cmk/cmsys/ios/sstream: In me

Re: [CMake] cmake iOS application + framework link error

2015-04-29 Thread Eric Wing
On 4/25/15, David Hirvonen wrote: > I'm hitting a link error when linking an iOS application with an internally > created framework/library using the the CMake Xcode generator and an iOS > toolchain. I've put together a minimal CMakeLists.txt example here: > > https://github.com/headupinclouds/cm

[CMake] Request for NuGet support

2015-04-29 Thread Fredrik Orderud
NuGet have recently emerged as a "de facto" standard for managing 3rd party dependencies when building C++ applications with Visual Studio on Windows. NuGet is nicely integrated into Visual Studio, downloads & unpacks dependencies automatically, and configures include, lib & binary paths to streaml

Re: [CMake] Apple Metal Support in Xcode?

2015-04-29 Thread Gregor Jasny
Hello, On 29/04/15 01:25, Marek Vojtko (Firaxis) wrote: My questions: 1) Is there anything I can do right now (with CMake 3.2.2.) that would make Xcode handle .metal files correctly? 2) Are there plans to support .metal files via CMake and if so, how far along are they? Does the XCODE_EXPLIC