[CMake] CMake 3.6 and OSX

2016-10-29 Thread Robert Ramey
I've just "upgraded" to version 3.6 of CMake. I'm using Xcode with the clang compiler. Now when I'm trying to configure a project I'm getting: The C compiler identification is unknown The CXX compiler identification is unknown CMake Error at CMakeLists.txt:14 (project): No CMAKE_C_COMPILER c

Re: [CMake] CPack: avoid creating unnecessary man dirs

2016-10-29 Thread Alex Turbov
set `CPACK_INSTALL_PREFIX` to `/usr`... by default it set to `CMAKE_INSTALL_PREFIX` which is `/usr/local` if you don't set it at `cmake` run On Sun, Oct 30, 2016 at 2:39 AM, Robert J. Hansen wrote: > > Use `|CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION` to add a man's dir > > to 'exclude' list

Re: [CMake] CPack: avoid creating unnecessary man dirs

2016-10-29 Thread Robert J. Hansen
> Use `|CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION` to add a man's dir > to 'exclude' list, so RPM package wouldn't have a dir, but files from > it... so it wouldn't conflict w/ `filesystem` package. Thank you; that solved one problem and exposed another. In my old Autotools build, I used prep

Re: [CMake] CPack: avoid creating unnecessary man dirs

2016-10-29 Thread Alex Turbov
Use `CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION` to add a man's dir to 'exclude' list, so RPM package wouldn't have a dir, but files from it... so it wouldn't conflict w/ `filesystem` package. On Sun, Oct 30, 2016 at 12:14 AM, Robert J. Hansen wrote: > I'm migrating a project from Autotools t

[CMake] CPack: avoid creating unnecessary man dirs

2016-10-29 Thread Robert J. Hansen
I'm migrating a project from Autotools to CMake. So far it's been a good experience save for installing manpages. I'm using include(GNUInstallDirs) to help make the migration easier. In my manpage subdir I have the following CMakeLists.txt: set(MAN_NAMES nsrlsvr.1 nsrlupdate.1) add_custom_targe

Re: [CMake] Proper way to support 64bit and 32bit builds

2016-10-29 Thread J Decker
I would think the find is using something like... so you'll need to adjust cmake_sizeof_void_p if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) DEFINE_DEFAULT( __64__ ON ) else( CMAKE_SIZEOF_VOID_P EQUAL 8 ) DEFINE_DEFAULT( __64__ OFF ) endif( CMAKE_SIZEOF_VOID_P EQUAL 8 ) SET( __64__ ${__64__} CACHE BO

Re: [CMake] Proper way to support 64bit and 32bit builds

2016-10-29 Thread Konstantin Tokarev
29.10.2016, 16:46, "cen" : > I tried setting CXXFLAGS and CMAKE_CXX_FLAGS to -m32 before the > project() call but nothing changed. I could make it fail with > "CXXFLAGS=-m32 cmake -G ..." from command line but this seems wrong. A > minimal CMakeLists.txt example would be nice. Use toolchain file

Re: [CMake] Proper way to support 64bit and 32bit builds

2016-10-29 Thread cen
I tried setting CXXFLAGS and CMAKE_CXX_FLAGS to -m32 before the project() call but nothing changed. I could make it fail with "CXXFLAGS=-m32 cmake -G ..." from command line but this seems wrong. A minimal CMakeLists.txt example would be nice. Hendrik Sattler je 29. 10. 2016 ob 15:25 napisal:

Re: [CMake] Proper way to support 64bit and 32bit builds

2016-10-29 Thread Hendrik Sattler
You need to set these compiler flags BEFORE the project() call to let CMake detect all stuff properly. There is a CMake variable telling you the size of a void*. Am 29. Oktober 2016 12:22:07 MESZ, schrieb cen : >Hi > >Once I switch to 32bit builds, CMake fails to recognise that >glibc-devel.i

[CMake] Proper way to support 64bit and 32bit builds

2016-10-29 Thread cen
Hi Once I switch to 32bit builds, CMake fails to recognise that glibc-devel.i686 is not installed resulting in an error when running make. In the same way, my own FindGMP fails to recognize that gmp-devel.i686 is not installed. I need CMake to fail if these things are missing. At least for the