Re: [CMake] FIND_LIBRARY and PATH_SUFFIXES: documentation or implementation bug
Hi Michael, AFAICS, this is not true, see cmFindBase::AddPathSuffixes(). The paths with the additional suffixes are searched first, but the paths without the suffixes are considered, too. Look at the following CMakeLists.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(PATHSUFFIXES NONE) FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/lib/config) FILE(WRITE ${CMAKE_BINARY_DIR}/lib/libxyz.so ) FILE(WRITE ${CMAKE_BINARY_DIR}/lib/config/libxyz.a ) SET(CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}) FIND_LIBRARY(XYZ1 xyz PATH_SUFFIXES config) MESSAGE(XYZ1: ${XYZ1}) SET(CMAKE_FIND_LIBRARY_SUFFIXES .so) FIND_LIBRARY(XYZ2 xyz PATH_SUFFIXES config) MESSAGE(XYZ2: ${XYZ2}) This yields: XYZ1: ${CMAKE_BINARY_DIR}/lib/config/libxyz.a XYZ2: ${CMAKE_BINARY_DIR}/lib/libxyz.so You are right. I can reproduce this output. I now understand what led me to the wrong conclusion. I'm still using cmake 2.6.4 and there's a crucial difference between the FindPythonLibs.cmake that ships with cmake 2.6.4 and 2.8.4. The latter does indeed first search the normal path and only then uses the config path suffix. The former, however, immediately starts of using the config path suffix. Problem solved. Regards, Marcel Loose. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Eclipse generator - scanner-discovered include pathsand pre-processor symbols
Hi Alex, - CMakeFindEclipseCDT4.cmake : this is slightly changed version from the one shipped with cmake 2.8.4, it produces debug output. Please replace the CMakeFindEclipseCDT4.cmake in your cmake 2.8.4 installation with this file. Then create a fresh and empty build directory, and let cmake run there, with the same command line as you posted. Capture the output, both stdout and stderr in a log file and post it here. Thanks for sending this, most illuminating :-) I saw that you are using ccache, maybe this behaves slightly different for some things ? I am using Fedora Core 14, with all latest yum updates. I have not done anything knowingly for cmake to prefer ccache over gcc directly, so looks like by default cmake will use ccache over straight GCC if it finds it. Of course, the speedup is most welcome. I have attached two versions of the log output. The first one is with the problem reproduced. I noticed in your debug output that the C compiler was being detected as blank, and no C++ include directories were being found even though the compiler was detected as GNU. I changed the project definition in my CMakeLists.txt from project ( eclipsetest CXX ) to project ( eclipstest C CXX ) and everything worked as expected. Thanks, Shash -- The CXX compiler identification is GNU -- This is CMakeFindEclipse.cmake, compiler id is -- , -GNU- -- Getting include dirs for c++ ... -- stderr: -- -- stdout: -- -- Check for working CXX compiler: /usr/lib/ccache/c++ -- Check for working CXX compiler: /usr/lib/ccache/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: /home/schatterjee/views/eclipsetest/build/eclipse-debug -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- This is CMakeFindEclipse.cmake, compiler id is -GNU- , -GNU- -- Getting include dirs for c ... -- stderr: -Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper Target: i686-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux Thread model: posix gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC) COLLECT_GCC_OPTIONS='-v' '-E' '-dD' '-mtune=generic' '-march=i686' /usr/libexec/gcc/i686-redhat-linux/4.5.1/cc1 -E -quiet -v dummy -mtune=generic -march=i686 -dD ignoring nonexistent directory /usr/lib/gcc/i686-redhat-linux/4.5.1/include-fixed ignoring nonexistent directory /usr/lib/gcc/i686-redhat-linux/4.5.1/../../../../i686-redhat-linux/include #include ... search starts here: #include ... search starts here: /usr/local/include /usr/lib/gcc/i686-redhat-linux/4.5.1/include /usr/include End of search list. COMPILER_PATH=/usr/libexec/gcc/i686-redhat-linux/4.5.1/:/usr/libexec/gcc/i686-redhat-linux/4.5.1/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.5.1/:/usr/lib/gcc/i686-redhat-linux/ LIBRARY_PATH=/usr/lib/gcc/i686-redhat-linux/4.5.1/:/usr/lib/gcc/i686-redhat-linux/4.5.1/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-E' '-dD' '-mtune=generic' '-march=i686' - -- stdout: -# 1 dummy # 1 built-in #define __STDC__ 1 #define __STDC_HOSTED__ 1 #define __GNUC__ 4 #define __GNUC_MINOR__ 5 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_RH_RELEASE__ 4 #define __SIZE_TYPE__ unsigned int #define __PTRDIFF_TYPE__ int #define __WCHAR_TYPE__ long int #define __WINT_TYPE__ unsigned int #define __INTMAX_TYPE__ long long int #define __UINTMAX_TYPE__ long long unsigned int #define __CHAR16_TYPE__ short unsigned int #define __CHAR32_TYPE__ unsigned int #define __SIG_ATOMIC_TYPE__ int #define __INT8_TYPE__ signed char #define __INT16_TYPE__ short int #define __INT32_TYPE__ int #define __INT64_TYPE__ long long int #define __UINT8_TYPE__ unsigned char #define __UINT16_TYPE__ short unsigned int #define __UINT32_TYPE__ unsigned int #define __UINT64_TYPE__ long long unsigned int #define __INT_LEAST8_TYPE__ signed char #define __INT_LEAST16_TYPE__ short int #define __INT_LEAST32_TYPE__ int #define __INT_LEAST64_TYPE__ long long int #define __UINT_LEAST8_TYPE__ unsigned char #define __UINT_LEAST16_TYPE__ short unsigned int #define __UINT_LEAST32_TYPE__ unsigned int #define __UINT_LEAST64_TYPE__ long long unsigned int #define
Re: [CMake] Different CMAKE_CXX_FLAGS for different executables
Could you post the output of make VERBOSE=1? On *nix, the following CMakeLists.txt works as expected: The output of make VERBOSE=1 contains: .../c++ -DUNIX -o .../SetTargetProperties.cxx.o -c .../SetTargetProperties.cxx It is working properly now. I must not have done a 'make clean'. BTW, preprocessor definitions like -DUNIX should be set via the COMPILE_DEFINITIONS properties instead of the COMPILE_FLAGS ones. It seems to generate exactly the same thing if I use set_target_properties(CompilerFlags PROPERTIES COMPILE_FLAGS -DUNIX) and set_target_properties(CompilerFlags PROPERTIES COMPILE_DEFINITIONS UNIX) After reading the documentation you set certainly sounds like I should use the COMPILE_DEFINITIONS version, but is there a difference? Thanks again, David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Generator vor Intel compliler on Windows
Hello, Is there a generator for nmake and icl.exe on Windows. I already tried to use the nmake generator and to set the C and C++ compiler cmake variables, but that didn't work either. Any suggestion or help would be appreciated. andreas -- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: ++33.492.954.912skype: andreas.fabri ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Generator vor Intel compliler on Windows
This should work, from an nmake command prompt: mkdir build cd build set CC=C:/path/to/icl.exe set CXX=C:/path/to/icl.exe cmake -G NMake Makefiles ..\src On Fri, Mar 25, 2011 at 1:02 PM, Andreas Fabri andreas.fa...@geometryfactory.com wrote: Hello, Is there a generator for nmake and icl.exe on Windows. I already tried to use the nmake generator and to set the C and C++ compiler cmake variables, but that didn't work either. Any suggestion or help would be appreciated. andreas -- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: ++33.492.954.912skype: andreas.fabri ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Too many packages being created for my project with CPack
I have a project on OS X that I am using CMake 2.8.3 and generating makefiles. When I do make package I get a .dmg, .sh, .stz and .zip files all created. Here is what I think is the relative portion of my CPack code that gets included in my CMakeLists.txt file: SET(CPACK_BINARY_BUNDLE OFF) SET(CPACK_BINARY_CYGWIN OFF) SET(CPACK_BINARY_DEB OFF) SET(CPACK_BINARY_DRAGNDROP OFF) SET(CPACK_BINARY_NSIS OFF) SET(CPACK_BINARY_OSXX11 OFF) SET(CPACK_BINARY_PACKAGEMAKER OFF) SET(CPACK_BINARY_RPM OFF) SET(CPACK_BINARY_STGZ OFF) SET(CPACK_BINARY_TBZ2 OFF) SET(CPACK_BINARY_TGZ OFF) SET(CPACK_BINARY_TZ OFF) SET(CPACK_BINARY_ZIP ON) I would think that would have shut off everything except a .zip archive? What am I doing wrong. Thanks ___ Mike Jackson www.bluequartz.net Principal Software Engineer mike.jack...@bluequartz.net BlueQuartz Software Dayton, Ohio ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Too many packages being created for my project with CPack
I just use: set (CPACK_GENERATOR ZIP) and that seems to work. I think those CPACK_BINARY_* variables you're setting are only meaningful in CPack's context, not in CMake's (i.e. those vars are what CMake writes out in CPackConfig.cmake for Cpack's later use). hth, tyler On Fri, Mar 25, 2011 at 2:37 PM, Michael Jackson mike.jack...@bluequartz.net wrote: I have a project on OS X that I am using CMake 2.8.3 and generating makefiles. When I do make package I get a .dmg, .sh, .stz and .zip files all created. Here is what I think is the relative portion of my CPack code that gets included in my CMakeLists.txt file: SET(CPACK_BINARY_BUNDLE OFF) SET(CPACK_BINARY_CYGWIN OFF) SET(CPACK_BINARY_DEB OFF) SET(CPACK_BINARY_DRAGNDROP OFF) SET(CPACK_BINARY_NSIS OFF) SET(CPACK_BINARY_OSXX11 OFF) SET(CPACK_BINARY_PACKAGEMAKER OFF) SET(CPACK_BINARY_RPM OFF) SET(CPACK_BINARY_STGZ OFF) SET(CPACK_BINARY_TBZ2 OFF) SET(CPACK_BINARY_TGZ OFF) SET(CPACK_BINARY_TZ OFF) SET(CPACK_BINARY_ZIP ON) I would think that would have shut off everything except a .zip archive? What am I doing wrong. Thanks ___ Mike Jackson www.bluequartz.net Principal Software Engineer mike.jack...@bluequartz.net BlueQuartz Software Dayton, Ohio ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Replacing compiler flags for certain project subdirectories
I'm in the process of adding Cmake-build capability to a Fortran project that currently follows a traditional recursive-make build structure. I've converted all the makefiles to CMakeLists.txt files and can now produce all the target libraries and executables with their dependencies correctly recognized. These dependencies have made a huge difference in allowing us to perform parallel builds and have the project ready to go *much* faster than before. I have a top-level CMakeLists.txt file that contains a few library searches (e.g. LAPACK, BLAS) and then an add_subdirectory call for each subdirectory in the project. Each subdirectory corresponds to a library and/or an executable. Now that the listing files contain all the sources files they need, my current task is to go through and set the proper compiler/preprocessor flags to match the original makefiles. We have several directories in our source tree that are auxiliary libraries that we store in our Subversion repository and build as part of our regular build process. The libraries that are built in these directories are compiled with different compiler flags and different preprocessor definitions than the rest of the project. I've been able to handle the preprocessor definitions by using add_definitions in the CMakeLists.txt files in the lower-level directories. I see based on reading through some past threads (including the recent Different CMAKE_CXX_FLAGS for different executables) on this list and on some StackOverflow questions that the COMPILE_FLAGS target property is very close to what I need (and actually *was* what I needed in several cases) but only appends flags to those currently in use. What I need is to be able to define a new set of compile flags (i.e. forget everything you were using before and use THIS set in this directory). I've started going through the documentation for Building External Projects[*] but the first line states that [a]n external project is one that you can get the source code for, but does not readily build with a simple ADD_SUBDIRECTORY call in your CMakeLists.txt file. This feels like it's designed to solve a slightly different problem than what I'm trying to do - I have an add_subdirectory call in my CMakeLists.txt file - is the proper fix for this issue to make the pieces that require different flags external projects? Will making some of these libraries external projects mess with the dependency calculation? I'm just getting started and trying to wrap my head around the options available. What is the standard way of dealing with this issue? Is there anything I'm missing? Thank you for your assistance! Tim [w] [*] http://www.kitware.com/products/html/BuildingExternalProjectsWithCMake2.8.html ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, next, updated. v2.8.4-1269-g31d7efd
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 31d7efdf377f8b88ef9079e34c747910f5133903 (commit) via 9b6e16f031a8a9fab15bc949785906c4a56dfc6e (commit) from e2aa38f335e2212cf955d7bb9fd1e0ae0da6ec27 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31d7efdf377f8b88ef9079e34c747910f5133903 commit 31d7efdf377f8b88ef9079e34c747910f5133903 Merge: e2aa38f 9b6e16f Author: Brad King brad.k...@kitware.com AuthorDate: Fri Mar 25 08:19:02 2011 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Fri Mar 25 08:19:02 2011 -0400 Merge branch 'master' into next --- Summary of changes: Source/kwsys/kwsysDateStamp.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v2.8.4-251-ga95540d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via a95540df8436fc668f88a582061922c7c21c259b (commit) from 9b6e16f031a8a9fab15bc949785906c4a56dfc6e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a95540df8436fc668f88a582061922c7c21c259b commit a95540df8436fc668f88a582061922c7c21c259b Author: KWSys Robot kwro...@kitware.com AuthorDate: Sat Mar 26 00:01:06 2011 -0400 Commit: KWSys Robot kwro...@kitware.com CommitDate: Sat Mar 26 00:13:02 2011 -0400 KWSys Nightly Date Stamp diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index e24aab9..735cf9d 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011) SET(KWSYS_DATE_STAMP_MONTH 03) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 25) +SET(KWSYS_DATE_STAMP_DAY 26) --- Summary of changes: Source/kwsys/kwsysDateStamp.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits