[cmake-developers] [CMake 0013173]: Swig module can't handle absolute path
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13173 == Reported By:Galeazzi Assigned To: == Project:CMake Issue ID: 13173 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2012-04-27 04:33 EDT Last Modified: 2012-04-27 04:33 EDT == Summary:Swig module can't handle absolute path Description: When you have an out-of-source project like the following structure: C:\MyFolder\CMakeList.txt D:\SourceFolder\wrapper.i it generates this error: CMake Error in CMakeLists.txt: Cannot find source file: C:/MyFolder/D:/SourceFolder/wrapper.i == Issue History Date ModifiedUsername FieldChange == 2012-04-27 04:33 Galeazzi New Issue == -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [CMake] Headers don't install on Mac OS X (mysql-connector-c)
2012/4/26 Braden McDaniel bra...@endoframe.com: On 4/26/12 2:45 PM, Eric Noulard wrote: 2012/4/26 Braden McDanielbra...@endoframe.com: I'm building mysql-connector-c-6.0.2, which uses cmake, on Mac OS X 10.7.3 using MacPorts cmake 2.8.7. I have found that make install does not actually install the project's header files. When I tried to reproduce this on Linux (Fedora 16), it worked just fine; so it looks like this is a Mac-specific (or perhaps even more specific) problem. I'm a total novice at CMake; but I see this in the top-level CMakeLists.txt: INSTALL(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN *.h) Looking at http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:install ... I don't see anything obviously wrong with that usage. The package in question can be found here: http://mysql.mirrors.pair.com/Downloads/Connector-C/mysql-connector-c-6.0.2.tar.gz This package is dirty because it contains many files coming from some Sparc configuration, the following files are coming from a previous in-source leftover: Makefile CMakeFiles cmake_install.cmake CPackConfig.cmake CPackSourceConfig.cmake CTestTestfile.cmake Remove those files from the source and try a clean out-of-source build install: http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees I've seen some traffic that led me to question whether this distribution works with out-of-source builds; so I did find . \( -name Makefile -o -name CMakeFiles -type d -prune -o -name cmake_install.cmake -o -name CPackConfig.cmake -o -name CPackSourceConfig.cmake -o -name CTestTestfile.cmake \) -exec rm -rf {} ';' and proceeded with an in-source-tree build. Header files were still not installed. So, I got the latest sources from launchpad: bzr branch lp:libmysql This version has something slightly different in CMakeLists.txt to install the headers: INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/mysql FILES_MATCHING PATTERN *.h) INSTALL(DIRECTORY ${CMAKE_BINARY_DIR}/include/ DESTINATION include/mysql FILES_MATCHING PATTERN *.h) This may be done to get a better out-of-source support. So, from there, I proceeded with an out-of-source-tree build. Once again, the headers were not installed. I began to be suspicious of the possibility of a platform-specific CMake bug affecting the file selector (possibly in the pattern matching). So I tried eliminating the pattern selectors from the install directives: INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/mysql) INSTALL(DIRECTORY ${CMAKE_BINARY_DIR}/include/ DESTINATION include/mysql) This successfully installs the headers (and possibly a bit more). Very nice bug hunt, well done. May be you can create a strip down project which exhibit the possibly MacOS specific issue? Then open a bug report: http://cmake.org/Bug/ with the example project attached. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- 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] Setting Header Search Path in Xcode project
Hi All! I have problem with CMake 2.8.8 in OS X Lion. CMake include_directories() doen't add Header Search Path to CMake-generated Xcode project. WBR, Vyacheslav. -- 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] Setting Header Search Path in Xcode project
Problem solved by removing Fink version and installing CMake from cmake.org 27.04.2012 18:56, Vyacheslav Karamov написал: Hi All! I have problem with CMake 2.8.8 in OS X Lion. CMake include_directories() doen't add Header Search Path to CMake-generated Xcode project. WBR, Vyacheslav. -- 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] Setting Header Search Path in Xcode project
On 4/27/2012 12:19 PM, Vyacheslav Karamov wrote: Problem solved by removing Fink version and installing CMake from cmake.org Yikes... I wonder what they did to it... -Bill 27.04.2012 18:56, Vyacheslav Karamov написал: Hi All! I have problem with CMake 2.8.8 in OS X Lion. CMake include_directories() doen't add Header Search Path to CMake-generated Xcode project. -- 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] Eclipse project and MKL libraries
Hello, I generate an Eclipse project from cmake using the command (I made the build directory sibling of my code directory): cmake -G Eclipse CDT4 - Unix Makefiles ../code I'm unable to run or debug the different targets from Eclipse. I get the following linking error, even though it compiles and executes just fine from command line: Linking CXX executable benchmark /usr/bin/cmake -E cmake_link_script CMakeFiles/benchmark.dir/link.txt --verbose=1 /usr/bin/c++-Wall -Wextra -Wshadow -Woverloaded-virtual -g3 -ggdb3 CMakeFiles/benchmark.dir/test/benchmark.cc.o -o benchmark -rdynamic libx.a libxxx_func_fw.a libqr_updates.a -lrt -lmkl_rt -liomp5 -limf -lgfortran -lquadmath /usr/bin/ld: cannot find -lmkl_rt /usr/bin/ld: cannot find -liomp5 /usr/bin/ld: cannot find -limf collect2: ld returned 1 exit status make[2]: Leaving directory `/home/bravegag/code/fastcode_project/build' make[1]: Leaving directory `/home/bravegag/code/fastcode_project/build' make[2]: *** [benchmark] Error 1 make[1]: *** [CMakeFiles/benchmark.dir/all] Error 2 make: *** [all] Error 2 I'm using the latest Eclipse C++ Indigo from the download page and working on Ubuntu 12.04 though I have the same problem in Mac OS X. TIA, Best regards, Giovanni -- 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 project and MKL libraries
2012/4/27 Giovanni Azua brave...@gmail.com: Hello, I generate an Eclipse project from cmake using the command (I made the build directory sibling of my code directory): cmake -G Eclipse CDT4 - Unix Makefiles ../code I'm unable to run or debug the different targets from Eclipse. I get the following linking error, even though it compiles and executes just fine from command line: What do you mean executes just fine from the command line? Linking CXX executable benchmark /usr/bin/cmake -E cmake_link_script CMakeFiles/benchmark.dir/link.txt --verbose=1 /usr/bin/c++ -Wall -Wextra -Wshadow -Woverloaded-virtual -g3 -ggdb3 CMakeFiles/benchmark.dir/test/benchmark.cc.o -o benchmark -rdynamic libx.a libxxx_func_fw.a libqr_updates.a -lrt -lmkl_rt -liomp5 -limf -lgfortran -lquadmath /usr/bin/ld: cannot find -lmkl_rt /usr/bin/ld: cannot find -liomp5 /usr/bin/ld: cannot find -limf collect2: ld returned 1 exit status make[2]: Leaving directory `/home/bravegag/code/fastcode_project/build' make[1]: Leaving directory `/home/bravegag/code/fastcode_project/build' make[2]: *** [benchmark] Error 1 make[1]: *** [CMakeFiles/benchmark.dir/all] Error 2 make: *** [all] Error 2 I'm using the latest Eclipse C++ Indigo from the download page and working on Ubuntu 12.04 though I have the same problem in Mac OS X. Looks like you are using target_link_library in your CMakeLists.txt without using corresponding find module Could you give us an excerpt of your CMakeLists.txt? Ij particular the CMake script corresponding to your benchmark executable. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- 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 project and MKL libraries
Hello Eric, Thanks for your answer. On Apr 27, 2012, at 10:44 PM, Eric Noulard wrote: What do you mean executes just fine from the command line? I mean that I can build all the targets in command line without problem and execute them without any problems. Linking CXX executable benchmark /usr/bin/cmake -E cmake_link_script CMakeFiles/benchmark.dir/link.txt --verbose=1 /usr/bin/c++-Wall -Wextra -Wshadow -Woverloaded-virtual -g3 -ggdb3 CMakeFiles/benchmark.dir/test/benchmark.cc.o -o benchmark -rdynamic libx.a libxxx_func_fw.a libqr_updates.a -lrt -lmkl_rt -liomp5 -limf -lgfortran -lquadmath /usr/bin/ld: cannot find -lmkl_rt /usr/bin/ld: cannot find -liomp5 /usr/bin/ld: cannot find -limf collect2: ld returned 1 exit status make[2]: Leaving directory `/home/bravegag/code/fastcode_project/build' make[1]: Leaving directory `/home/bravegag/code/fastcode_project/build' make[2]: *** [benchmark] Error 1 make[1]: *** [CMakeFiles/benchmark.dir/all] Error 2 make: *** [all] Error 2 Looks like you are using target_link_library in your CMakeLists.txt without using corresponding find module Could you give us an excerpt of your CMakeLists.txt? Ij particular the CMake script corresponding to your benchmark executable. Here it is: #* find_package(MKL) set(HAVE_INTEL_MKL ${MKL_FOUND}) if (MKL_FOUND) include_directories(${MKL_INCLUDE_DIRS}) link_directories(${MKL_LIBRARY_DIRS}) endif() # [snip] sfo_executable(benchmark test/benchmark.cc) target_link_libraries(benchmark submodularity xxx_func_fw qr_updates) if (UNIX) find_library(RT_LIBRARY rt) if(RT_LIBRARY) target_link_libraries(benchmark ${RT_LIBRARY}) endif() endif() #* Thank you. Best regards, Giovanni-- 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] Is there a setting for Windows DLL file targets that's similar to CMAKE_EXE_LINKER_FLAGS ?
We here are trying to setup VS2010 for generating code coverage dataand for that I need to add a linker flag /PROFILE . For adding that to exe we have a cmake variable CMAKE_EXE_LINKER_FLAGS . But that works only for exe and you add a similar varibale for adding linker flags for DLLs. In other words is there a setting for Windows DLL file targets that's similar to CMAKE_EXE_LINKER_FLAGS ? ++David-Bjornbak; -- 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.8-2735-g47a6819
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 47a68194525d19e8ad014364d03f0a8c862996fd (commit) via db1bfee3c320b1efe1208d1ee8ffaf90c272d1a8 (commit) from 1464e43554b942ecacaff46b48712854d95c5d7a (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=47a68194525d19e8ad014364d03f0a8c862996fd commit 47a68194525d19e8ad014364d03f0a8c862996fd Merge: 1464e43 db1bfee Author: Brad King brad.k...@kitware.com AuthorDate: Fri Apr 27 08:11:44 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Apr 27 08:11:44 2012 -0400 Merge topic 'kwsys-environ-cleanup' into next db1bfee KWSys: Make set ordering functor const http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db1bfee3c320b1efe1208d1ee8ffaf90c272d1a8 commit db1bfee3c320b1efe1208d1ee8ffaf90c272d1a8 Author: Brad King brad.k...@kitware.com AuthorDate: Fri Apr 27 08:09:45 2012 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Fri Apr 27 08:10:24 2012 -0400 KWSys: Make set ordering functor const Address compilation error error C3848: expression having type 'const cmsys::kwsysEnvCompare' would lose some const-volatile qualifiers in order to call 'bool cmsys::kwsysEnvCompare::operator ()(const char *,const char *)' diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 7c85fd4..8ab580f 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -520,7 +520,7 @@ bool SystemTools::UnPutEnv(const char* env) /* Order by environment key only (VAR from VAR=VALUE). */ struct kwsysEnvCompare { - bool operator() (const char* l, const char* r) + bool operator() (const char* l, const char* r) const { const char* leq = strchr(l, '='); const char* req = strchr(r, '='); --- Summary of changes: Source/kwsys/SystemTools.cxx |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, next, updated. v2.8.8-2737-g2721f55
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 2721f5536e283995f55d0fe354967aabf69eb5b2 (commit) via e48796b26b5b2b75401b48d21927b1d2912d4dca (commit) from 47a68194525d19e8ad014364d03f0a8c862996fd (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=2721f5536e283995f55d0fe354967aabf69eb5b2 commit 2721f5536e283995f55d0fe354967aabf69eb5b2 Merge: 47a6819 e48796b Author: Brad King brad.k...@kitware.com AuthorDate: Fri Apr 27 08:14:27 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Apr 27 08:14:27 2012 -0400 Merge topic 'kwsys-environ-cleanup' into next e48796b KWSys: Fix SystemTools environment memory handling (#13156) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e48796b26b5b2b75401b48d21927b1d2912d4dca commit e48796b26b5b2b75401b48d21927b1d2912d4dca Author: Brad King brad.k...@kitware.com AuthorDate: Thu Apr 26 10:36:53 2012 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Fri Apr 27 08:13:52 2012 -0400 KWSys: Fix SystemTools environment memory handling (#13156) The SystemTools::PutEnv function tries to provide the putenv API without leaking memory. However, the kwsysDeletingCharVector singleton frees memory that may still be referenced by the environment table, having been placed there by putenv. If any static destruction or processing by an external tool happens after the singleton is destroyed and accesses the environment it will read invalid memory. Replace use of putenv with setenv/unsetenv when available. The latter manage internal copies of the values passed instead of referencing the original memory. When setenv/unsetenv are not available use putenv with a singleton that removes its values from the environment before freeing their memory. This requires an unputenv implementation. On at least some platforms it must be written in terms of putenv because other APIs are not available and direct modification of the environ global is not safe (e.g. on Windows there is interaction with wenviron). Fortunately either putenv(A=) or putenv(A) will remove A from the environment on these platforms. On other platforms fall back to direct manipulation of environ. Also add UnPutEnv to the API and add a test for the behavior of both. diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 0ef4e28..f51712c 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -553,11 +553,16 @@ SET_SOURCE_FILES_PROPERTIES(ProcessUNIX.c System.c PROPERTIES COMPILE_FLAGS -DKWSYS_C_HAS_PTRDIFF_T=${KWSYS_C_HAS_PTRDIFF_T} -DKWSYS_C_HAS_SSIZE_T=${KWSYS_C_HAS_SSIZE_T} ) -IF(KWSYS_DO_NOT_CLEAN_PUTENV) - # Disable cleanup of putenv memory for issues with GCOV. +IF(KWSYS_USE_SystemTools) + KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_SETENV +Checking whether CXX compiler has setenv DIRECT) + KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UNSETENV +Checking whether CXX compiler has unsetenv DIRECT) + KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H +Checking whether CXX compiler has environ in stdlib.h DIRECT) SET_SOURCE_FILES_PROPERTIES(SystemTools.cxx PROPERTIES -COMPILE_FLAGS -DKWSYS_DO_NOT_CLEAN_PUTENV=1) -ENDIF(KWSYS_DO_NOT_CLEAN_PUTENV) +COMPILE_FLAGS -DKWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV} -DKWSYS_CXX_HAS_UNSETENV=${KWSYS_CXX_HAS_UNSETENV} -DKWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=${KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H}) +ENDIF() #- # Choose a directory for the generated headers. diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 4d83293..8ab580f 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -25,6 +25,8 @@ #include KWSYS_HEADER(ios/fstream) #include KWSYS_HEADER(ios/sstream) +#include KWSYS_HEADER(stl/set) + // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. #if 0 @@ -78,6 +80,14 @@ # undef _WIN32 #endif +#if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H +# if defined(_WIN32) +extern __declspec(dllimport) char **environ; +# else +extern char **environ; +# endif +#endif + #ifdef __CYGWIN__ extern C void cygwin_conv_to_win32_path(const char *path, char *win32_path); #endif @@ -371,38 +381,224 @@ bool SystemTools::GetEnv(const char* key, kwsys_stl::string result) } } -#ifdef __INTEL_COMPILER -#pragma warning disable 444
[Cmake-commits] CMake branch, master, updated. v2.8.8-86-g262a259
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 262a259e77177b964518a6195b8a2451fc99f0f1 (commit) from e6d28c7e6f2b73b441b19829fdda67d1b84b9acc (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=262a259e77177b964518a6195b8a2451fc99f0f1 commit 262a259e77177b964518a6195b8a2451fc99f0f1 Author: Kitware Robot kwro...@kitware.com AuthorDate: Sat Apr 28 00:01:03 2012 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Sat Apr 28 00:01:03 2012 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 761e278..53635f4 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_PATCH 8) -SET(CMake_VERSION_TWEAK 20120427) +SET(CMake_VERSION_TWEAK 20120428) #SET(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.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