[cmake-developers] [CMake 0011991]: stack smash with (assumed) case-sensitive file names
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=11991 == Reported By:Daniel Franke Assigned To: == Project:CMake Issue ID: 11991 Category: CMake Reproducibility:always Severity: crash Priority: normal Status: new == Date Submitted: 2011-03-21 10:55 EDT Last Modified: 2011-03-21 10:55 EDT == Summary:stack smash with (assumed) case-sensitive file names Description: FindFLEX.cmake was not available in cmake-2.6 but was added in cmake.2.8. In order to allow find_package() for either version, I created FindFlex.cmake (note the lowercase part of FLEX) in my CMAKE_MODULE_PATH. This file contains: if (${CMAKE_VERSION} VERSION_LESS 2.8) set (FLEX_FOUND false) else () find_package (FLEX) endif () This works for Linux, but on windows, cmake dies with ERRORLEVEL=-1073741819, i.e. 0xC005 which indicates a crash. Taking into account that the file system is not case sensitive, I assume that find_package(Flex) and find_package(FLEX) are not distinguished and thus result in a infinite loop of above script. The problem was seen with cmake 2.8.2. == Issue History Date ModifiedUsername FieldChange == 2011-03-21 10:55 Daniel Franke New Issue == ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] The configuration-specific version COMPILE_FLAGS
On 3/20/2011 2:37 PM, Alexey Ozeritsky wrote: I want to decrease optimization level from /O2 to /O1 for specific files in my project, but I do not find any way to do that. COMPILE_DEFINITIONS_CONFIG does not work for me. So, I've written a patch that adds support of configuration-specific version of COMPILE_FLAGS file property. Patch tested with the following generators: Unix Makefiles, Visual Studio 9 2008 [Win64], Visual Studio 10 [Win64]. Please see here: http://www.cmake.org/Bug/view.php?id=6493 http://www.cmake.org/Bug/view.php?id=6493#c13821 http://www.cmake.org/Bug/view.php?id=6493#c21590 -Brad ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [CMake] Documentation for CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT missing?
On 03/07/2011 at 23:47, Gabriel Petrovay gabipetro...@gmail.com wrote: On Mon, Mar 7, 2011 at 7:03 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: It's an internal variable. May we use it? Or is it not intended for users to use it? Just bumping this thread up, but I think this is a valid question. CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT is not only widely used in projects, but also used in the semi(?)-officially solution to setting an install prefix without overwriting user-choices. If it's internal and we should not use it, quite a number of projects will have to be changed... Cheers, Johannes -- Johannes Zarl Virtual Reality Services Johannes Kepler University Informationsmanagement Altenbergerstrasze 69 4040 Linz, Austria Phone: +43 732 2468-8321 johannes.z...@jku.at http://vrc.zid.jku.at ___ 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] To avoid target_link_libraries magic
Hello. I'm trying to link with static library which I've found using FIND_LIBRARY: MESSAGE (${LPTHREAD}) prints /home/vbykov/svn/builddeps/glibc/lib/libpthread.a Further I do the next: ADD_EXECUTABLE (test_atomic_lock test_atomic_lock.c) TARGET_LINK_LIBRARIES (test_atomic_lock ${LPTHREAD}) But full path to the library turns into -Bstatic -lpthread -Bdynamic magically, and in the line of collect2 options appears: -static -o test_atomic_lock -Bstatic -lpthread -Bdynamic --start-group -lgcc -lgcc_eh -lc --end-group (I've omitted a lot of other libraries and object files). Therefore -Bdynamic applies to -lgcc and other libraries, which I want to link statically. So can I adjust this target_link_libraries behaviour and pass plainly what I want? -- Best regards, Valeriy Bykov ___ 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] To avoid target_link_libraries magic
On 3/21/2011 9:42 AM, Valeriy Bykov wrote: I'm trying to link with static library which I've found using FIND_LIBRARY: MESSAGE (${LPTHREAD}) prints /home/vbykov/svn/builddeps/glibc/lib/libpthread.a Further I do the next: ADD_EXECUTABLE (test_atomic_lock test_atomic_lock.c) TARGET_LINK_LIBRARIES (test_atomic_lock ${LPTHREAD}) But full path to the library turns into -Bstatic -lpthread -Bdynamic magically What version of CMake are you using? Since 2.6 the above example should link using the full path to the library. -Brad ___ 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] To avoid target_link_libraries magic
I'm using CMake version 2.8.4. Furthermore I use custom ToolChain but I don't think it is important. On Mon, Mar 21, 2011 at 10:05:08AM -0400, Brad King wrote: On 3/21/2011 9:42 AM, Valeriy Bykov wrote: I'm trying to link with static library which I've found using FIND_LIBRARY: MESSAGE (${LPTHREAD}) prints /home/vbykov/svn/builddeps/glibc/lib/libpthread.a Further I do the next: ADD_EXECUTABLE (test_atomic_lock test_atomic_lock.c) TARGET_LINK_LIBRARIES (test_atomic_lock ${LPTHREAD}) But full path to the library turns into -Bstatic -lpthread -Bdynamic magically What version of CMake are you using? Since 2.6 the above example should link using the full path to the library. -Brad -- С уважением, Быков Валерий ___ 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] To avoid target_link_libraries magic
Ough, behaviour of target_link_libraries depends on -B flags I pass to compiler. I pass it for proper compiler test made by CMake at initial stage. Without it gcc can't link simple test program because can't find standart libraries (-lc). On Mon, Mar 21, 2011 at 05:12:56PM +0300, Valeriy Bykov wrote: I'm using CMake version 2.8.4. Furthermore I use custom ToolChain but I don't think it is important. On Mon, Mar 21, 2011 at 10:05:08AM -0400, Brad King wrote: On 3/21/2011 9:42 AM, Valeriy Bykov wrote: I'm trying to link with static library which I've found using FIND_LIBRARY: MESSAGE (${LPTHREAD}) prints /home/vbykov/svn/builddeps/glibc/lib/libpthread.a Further I do the next: ADD_EXECUTABLE (test_atomic_lock test_atomic_lock.c) TARGET_LINK_LIBRARIES (test_atomic_lock ${LPTHREAD}) But full path to the library turns into -Bstatic -lpthread -Bdynamic magically What version of CMake are you using? Since 2.6 the above example should link using the full path to the library. -Brad -- С уважением, Быков Валерий -- С уважением, Быков Валерий ___ 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] To avoid target_link_libraries magic
On 3/21/2011 10:12 AM, Valeriy Bykov wrote: I'm using CMake version 2.8.4. Furthermore I use custom ToolChain but I don't think it is important. ... /home/vbykov/svn/builddeps/glibc/lib/libpthread.a It may be important actually. Is this path to libpthread.a in the implicit library search path for the toolchain? What is the full link line produced? CMake behaves a bit differently for targets in implicit link directories. Instead of using the full path it converts the library to '-lpthread' knowing that the linker will find it. This is because some toolchains substitute architecture-specific implicit link directories at the last moment. One may always use IMPORTED targets to tell CMake _exactly_ what path to use for a library: http://www.cmake.org/Wiki/CMake/Tutorials/Exporting_and_Importing_Targets#Importing_Targets See also the documentation here for why -B(static|dynamic) appear: http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:LINK_SEARCH_END_STATIC and a recent change I made to help folks that want static linking: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5abfb571 A version of CMake with this change is available as a nightly binary: http://www.cmake.org/files/dev/?C=M;O=D -Brad ___ 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] Documentation for CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT missing?
On Mon, Mar 21, 2011 at 6:16 AM, Johannes Zarl johannes.z...@jku.at wrote: On 03/07/2011 at 23:47, Gabriel Petrovay gabipetro...@gmail.com wrote: On Mon, Mar 7, 2011 at 7:03 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: It's an internal variable. May we use it? Or is it not intended for users to use it? Just bumping this thread up, but I think this is a valid question. CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT is not only widely used in projects, but also used in the semi(?)-officially solution to setting an install prefix without overwriting user-choices. If it's internal and we should not use it, quite a number of projects will have to be changed... It is internal. But we are aware that many projects are using it. It is unlikely to change. It would probably be a good idea to document it officially, even though it's internal... David Cheers, Johannes -- Johannes Zarl Virtual Reality Services Johannes Kepler University Informationsmanagement Altenbergerstrasze 69 4040 Linz, Austria Phone: +43 732 2468-8321 johannes.z...@jku.at http://vrc.zid.jku.at ___ 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
Re: [CMake] CPack and fixup_bundle
Makes sense once you know. Thanks a lot, I would have searched a long time for that. s. On Fri, Mar 18, 2011 at 2:44 AM, Tyler ty...@cryptio.net wrote: It's a little obtuse but you need to use \${CMAKE_INSTALL_PREFIX} in that first argument to fixup_bundle(). If you don't, ${CMAKE_INSTALL_PREFIX} will be evaluated at CMake-time and therefore point to your build-time install directory. You want to delay evaluation of that variable until CPack time, when it will evaluate to the install directory that CPack uses. If it makes you feel any better, it took me and another developer quite a while to figure this out in our own project :). Take a look at the ${CMAKE_BINARY_DIR}/cmake_install.cmake generated for your project to see what I mean. hth, tyler On Thu, Mar 17, 2011 at 2:14 PM, Simon Drouin drouin.si...@gmail.comwrote: I'm trying to use CPack to create a .tar.gz package on linux. I use fixup_bundle from the bundle utility to copy and fix Qt libraries to the bundle. When I use simple 'make install', everything is installed properly in directory specified by CMAKE_INSTALL_PREFIX. When I use CPack, the Qt libraries are still copied to the CMAKE_INSTALL_PREFIX directory and not the package's directory. Here's the code: # install executable(s) install( TARGETS ${exec_name} DESTINATION . ) # fixup the bundle set( APPS ${CMAKE_INSTALL_PREFIX}/${exec_name} ) list( APPEND libSearchDirs ${QT_LIBRARY_DIR}) set( additionalLib ${qtsvgiconplugin} ) INSTALL(CODE include(BundleUtilities) fixup_bundle(\${APPS}\ \${additionalLib}\ \${libSearchDirs}\) COMPONENT Runtime) # # Packaging # set( CPACK_PACKAGE_DESCRIPTION_SUMMARY My test package) set( CPACK_PACKAGE_NAME ${exec_name} ) set( CPACK_PACKAGE_CONTACT John Smith) set( CPACK_PACKAGE_VENDOR Company inc.) set( CPACK_PACKAGE_VERSION_MAJOR ${PROG_MAJOR_VERSION}) set( CPACK_PACKAGE_VERSION_MINOR ${PROG_MINOR_VERSION}) set( CPACK_PACKAGE_VERSION_PATCH ${PROG_PATCH_VERSION}) set( CPACK_GENERATOR TGZ) set( CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CMAKE_SYSTEM_PROCESSOR}) include(CPack) Am I missing something? s. ___ 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] Platform tests counts as errors.
Consider this custom_command: add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${FOO_SOURCE_DIR} WORKING_DIRECTORY ${CX_NATIVE_TG_DIR}) When it is executed from a Makefile-based generator, no problem. However, when it is executed from the VS 2008 IDE, failed platform tests are signaled as errors: 2-- Looking for sys/dir.h 2CheckIncludeFile.c 2CheckIncludeFile.c(1) : fatal error C1083: Cannot open include file: 'sys/dir.h': No such file or directory 2-- Looking for sys/dir.h - not found At the end, the custom_command is signaled as failed by the IDE because of those errors. First of all, why 2CheckIncludeFile.c 2CheckIncludeFile.c(1) : fatal error C1083: Cannot open include file: 'sys/dir.h': No such file or directory is shown in the middle of the usual 2-- Looking for sys/dir.h 2-- Looking for sys/dir.h - not found ? Second, what can I do so the IDE does not interpret failed platform tests as errors? ___ 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-1232-g5761729
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 57617290cc6be4c30fd38b75323a3879f9baef5b (commit) via d726a3610f6c47037515c3aac375cbee4cfaae57 (commit) via e1eed2594917a440903af9dcb11671197066406a (commit) via a885fa23a42086c822a8166be97a906a2fe7dfb1 (commit) from 74e410dfe42fa0c59efaff3c180cc4413c0ccf46 (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=57617290cc6be4c30fd38b75323a3879f9baef5b commit 57617290cc6be4c30fd38b75323a3879f9baef5b Merge: 74e410d d726a36 Author: Brad King brad.k...@kitware.com AuthorDate: Mon Mar 21 10:20:47 2011 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Mon Mar 21 10:20:47 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-219-g935662a
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 935662a5eb0ff9eb680dac25bddbbdc7f4f82268 (commit) from d726a3610f6c47037515c3aac375cbee4cfaae57 (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=935662a5eb0ff9eb680dac25bddbbdc7f4f82268 commit 935662a5eb0ff9eb680dac25bddbbdc7f4f82268 Author: KWSys Robot kwro...@kitware.com AuthorDate: Tue Mar 22 00:01:07 2011 -0400 Commit: KWSys Robot kwro...@kitware.com CommitDate: Tue Mar 22 00:13:04 2011 -0400 KWSys Nightly Date Stamp diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index fa1203d..3ec53f7 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 21) +SET(KWSYS_DATE_STAMP_DAY 22) --- 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