Re: [CMake] Use FIND_LIBRARY to search & link for an executable?
On 18. Sep, 2009, at 8:14, Christian Ehrlicher wrote: Hi, I've an external project which made the decision to create an executable which exports symbols. This means if you want to write a plugin for this project you have to link your plugin against this executable. Now I've the problem that FIND_LIBRARY doesn't find this executable. Does anybody knows a hack to be able to link against an executable which is not built by the project? I'm really lost here but I can't convince them to fix it... :( Managing an own patch to work around this problem isn't a good long- term perspective. Thx, Christian find_program? And that is a REALLY broken design (and AFAIK only works on Windows). Michael ___ 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] Use FIND_LIBRARY to search & link for an executable?
> Von: Michael Wild > > On 18. Sep, 2009, at 8:14, Christian Ehrlicher wrote: > > > Hi, > > > > I've an external project which made the decision to create an > > executable which exports symbols. This means if you want to write a > > plugin for this project you have to link your plugin against this > > executable. > > Now I've the problem that FIND_LIBRARY doesn't find this executable. > > Does anybody knows a hack to be able to link against an executable > > which is not built by the project? > > > > I'm really lost here but I can't convince them to fix it... :( > > Managing an own patch to work around this problem isn't a good long- > > term perspective. > > > > Thx, > > Christian > > find_program? > You're right - I did not know that TARGET_LINK_LIBRARIES accepts this. > And that is a REALLY broken design (and AFAIK only works on Windows). > I'm currently investigating and think it doesn't work on linux at all (which would be very good for me). I'm getting duplicate symbols :) --> FIND_PROGRAM(STAGE_LIB STAGE PATHS /opt/3dviewer/bin) ADD_LIBRARY(dummy SHARED dummy.cpp) TARGET_LINK_LIBRARIES(dummy ${STAGE_LIB}) --> /usr/local/bin/c++ -fPIC -g -shared -Wl,-soname,libdummy.so -o libdummy.so CMakeFiles/dummy.dir/dummy.cpp.o /opt/3dviewer/bin/STAGE /opt/3dviewer/bin/STAGE: In function `_fini': /usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:37: multiple definition of `_fini' /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crti.o:/usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:37: first defined here /opt/3dviewer/bin/STAGE: In function `_init': /usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:25: multiple definition of `_init' /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crti.o:/usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:25: first defined here /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: libdummy.so: version node not found for symbol vtable for __cxxabiv1::__class_type_info@@CXXABI_1.3 /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: failed to set dynamic section sizes: Bad value collect2: ld returned 1 exit status --> I should have tried this earlier :) Thx, Christian -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 ___ 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] Use FIND_LIBRARY to search & link for an executable?
On 18. Sep, 2009, at 9:15, Christian Ehrlicher wrote: Von: Michael Wild On 18. Sep, 2009, at 8:14, Christian Ehrlicher wrote: Hi, I've an external project which made the decision to create an executable which exports symbols. This means if you want to write a plugin for this project you have to link your plugin against this executable. Now I've the problem that FIND_LIBRARY doesn't find this executable. Does anybody knows a hack to be able to link against an executable which is not built by the project? I'm really lost here but I can't convince them to fix it... :( Managing an own patch to work around this problem isn't a good long- term perspective. Thx, Christian find_program? You're right - I did not know that TARGET_LINK_LIBRARIES accepts this. If you pass a full path to TARGET_LINK_LIBRARIES, it doesn't too much checking. I think it will do some basic checks that the file is valid (there was a discussion on that some time ago), but otherwise just passes the file on the link-line. And that is a REALLY broken design (and AFAIK only works on Windows). I'm currently investigating and think it doesn't work on linux at all (which would be very good for me). I'm getting duplicate symbols :) --> FIND_PROGRAM(STAGE_LIB STAGE PATHS /opt/3dviewer/bin) ADD_LIBRARY(dummy SHARED dummy.cpp) TARGET_LINK_LIBRARIES(dummy ${STAGE_LIB}) --> /usr/local/bin/c++ -fPIC -g -shared -Wl,-soname,libdummy.so -o libdummy.so CMakeFiles/dummy.dir/dummy.cpp.o /opt/3dviewer/bin/STAGE /opt/3dviewer/bin/STAGE: In function `_fini': /usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:37: multiple definition of `_fini' /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crti.o:/usr/ src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:37: first defined here /opt/3dviewer/bin/STAGE: In function `_init': /usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:25: multiple definition of `_init' /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crti.o:/usr/ src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:25: first defined here /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/ bin/ld: libdummy.so: version node not found for symbol vtable for __cxxabiv1::__class_type_info@@CXXABI_1.3 /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/ bin/ld: failed to set dynamic section sizes: Bad value collect2: ld returned 1 exit status --> I should have tried this earlier :) Thx, Christian Probably you CAN get around these multiple definitions error by using a linker-script when building this STAGE program. The later errors are more worrying... Michael ___ 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] Use FIND_LIBRARY to search & link for an executable?
Zitat von Christian Ehrlicher : Von: Michael Wild On 18. Sep, 2009, at 8:14, Christian Ehrlicher wrote: > Hi, > > I've an external project which made the decision to create an > executable which exports symbols. This means if you want to write a > plugin for this project you have to link your plugin against this > executable. > Now I've the problem that FIND_LIBRARY doesn't find this executable. > Does anybody knows a hack to be able to link against an executable > which is not built by the project? > > I'm really lost here but I can't convince them to fix it... :( > Managing an own patch to work around this problem isn't a good long- > term perspective. > > Thx, > Christian find_program? You're right - I did not know that TARGET_LINK_LIBRARIES accepts this. And that is a REALLY broken design (and AFAIK only works on Windows). I'm currently investigating and think it doesn't work on linux at all (which would be very good for me). I'm getting duplicate symbols :) --> FIND_PROGRAM(STAGE_LIB STAGE PATHS /opt/3dviewer/bin) ADD_LIBRARY(dummy SHARED dummy.cpp) TARGET_LINK_LIBRARIES(dummy ${STAGE_LIB}) Actually, you are compiling a loadable MODULE, not a library (which happens to be the same on Linux but not on other platforms). --> /usr/local/bin/c++ -fPIC -g -shared -Wl,-soname,libdummy.so -o libdummy.so CMakeFiles/dummy.dir/dummy.cpp.o /opt/3dviewer/bin/STAGE /opt/3dviewer/bin/STAGE: In function `_fini': /usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:37: multiple definition of `_fini' /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crti.o:/usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:37: first defined here /opt/3dviewer/bin/STAGE: In function `_init': /usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:25: multiple definition of `_init' /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crti.o:/usr/src/packages/BUILD/glibc-2.9/cc-nptl/csu/crti.S:25: first defined here Read the section "The obsolete symbols _init and _fini" in the dlopen(3) manpage. /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: libdummy.so: version node not found for symbol vtable for __cxxabiv1::__class_type_info@@CXXABI_1.3 /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: failed to set dynamic section sizes: Bad value collect2: ld returned 1 exit status --> Are you using the same compiler with same version for plugin and executable? HS ___ 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] newcomer question about dependencies
Hello there! I have a simple project with the following structure: root CMakeLists.txt app CMakeLists.txt app.cpp lib CMakeLists.txt lib.cpp The root\CMakeLists.txt contains: cmake_minimum_required(VERSION 2.6) project(ROOT) add_subdirectory(app) add_subdirectory(lib) The root\app\CMakeLists.txt contains: project( APP ) add_executable( app app.cpp ) target_link_libraries( app lib ) add_dependencies( app lib ) The root\app\CMakeLists.txt contains: project( LIB ) add_library( lib STATIC lib.cpp) I try to generate Visual Studio 6 project: cd root mkdir build cd build cmake -G "Visual Studio 6" .. CMake generates the following: ALL_BUILD.dsp ALL_BUILD.dsp.cmake CMakeCache.txt cmake_install.cmake ROOT.dsw app\ALL_BUILD.dsp app\ALL_BUILD.dsp.cmake app\app.dsp app\app.dsp.cmake app\APP.dsw app\CMakeFiles app\cmake_install.cmake app\CMakeFiles\ALL_BUILD.rule CMakeFiles\ALL_BUILD.rule CMakeFiles\cmake.check_cache CMakeFiles\CMakeCCompiler.cmake CMakeFiles\CMakeCPlatform.cmake CMakeFiles\CMakeCXXCompiler.cmake CMakeFiles\CMakeCXXPlatform.cmake CMakeFiles\CMakeDetermineCompilerABI_C.bin CMakeFiles\CMakeDetermineCompilerABI_CXX.bin CMakeFiles\CMakeOutput.log CMakeFiles\CMakeRCCompiler.cmake CMakeFiles\CMakeSystem.cmake CMakeFiles\CMakeTmp CMakeFiles\CMakeTmp\CMakeFiles CMakeFiles\CMakeTmp\Debug lib\ALL_BUILD.dsp lib\ALL_BUILD.dsp.cmake lib\CMakeFiles lib\cmake_install.cmake lib\lib.dsp lib\lib.dsp.cmake lib\LIB.dsw lib\CMakeFiles\ALL_BUILD.rule When I open ROOT.dsw, I can build all targets correctly according to dependencies. Why cannot I do the same when I open nested app\APP.dsw workspace? In other words, why CMake does not include the lib project into the APP.DSW workspace? Is it possible to hint CMake to do it? Thanks in advance for any suggestions, Anatoly Shirokov. ___ 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] newcomer question about dependencies
I have tested the Visual Studio 2005 generator for this project. There are no such problems with one. The app.sln solution includes lib.vcproj as expected. It looks like something is wrong with Visual Studio 6 generator. Thanks in advance, Anatoly Shirokov. Anatoly Shirokov пишет: Hello there! I have a simple project with the following structure: root CMakeLists.txt app CMakeLists.txt app.cpp lib CMakeLists.txt lib.cpp The root\CMakeLists.txt contains: cmake_minimum_required(VERSION 2.6) project(ROOT) add_subdirectory(app) add_subdirectory(lib) The root\app\CMakeLists.txt contains: project( APP ) add_executable( app app.cpp ) target_link_libraries( app lib ) add_dependencies( app lib ) The root\app\CMakeLists.txt contains: project( LIB ) add_library( lib STATIC lib.cpp) I try to generate Visual Studio 6 project: cd root mkdir build cd build cmake -G "Visual Studio 6" .. CMake generates the following: ALL_BUILD.dsp ALL_BUILD.dsp.cmake CMakeCache.txt cmake_install.cmake ROOT.dsw app\ALL_BUILD.dsp app\ALL_BUILD.dsp.cmake app\app.dsp app\app.dsp.cmake app\APP.dsw app\CMakeFiles app\cmake_install.cmake app\CMakeFiles\ALL_BUILD.rule CMakeFiles\ALL_BUILD.rule CMakeFiles\cmake.check_cache CMakeFiles\CMakeCCompiler.cmake CMakeFiles\CMakeCPlatform.cmake CMakeFiles\CMakeCXXCompiler.cmake CMakeFiles\CMakeCXXPlatform.cmake CMakeFiles\CMakeDetermineCompilerABI_C.bin CMakeFiles\CMakeDetermineCompilerABI_CXX.bin CMakeFiles\CMakeOutput.log CMakeFiles\CMakeRCCompiler.cmake CMakeFiles\CMakeSystem.cmake CMakeFiles\CMakeTmp CMakeFiles\CMakeTmp\CMakeFiles CMakeFiles\CMakeTmp\Debug lib\ALL_BUILD.dsp lib\ALL_BUILD.dsp.cmake lib\CMakeFiles lib\cmake_install.cmake lib\lib.dsp lib\lib.dsp.cmake lib\LIB.dsw lib\CMakeFiles\ALL_BUILD.rule When I open ROOT.dsw, I can build all targets correctly according to dependencies. Why cannot I do the same when I open nested app\APP.dsw workspace? In other words, why CMake does not include the lib project into the APP.DSW workspace? Is it possible to hint CMake to do it? Thanks in advance for any suggestions, Anatoly Shirokov. ___ 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] Use FIND_LIBRARY to search & link for an executable?
If the executable exports symbols, it should create an import .lib file, and find_library should be able to find it. You can not link to a .exe file. -Bill ___ 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] Use FIND_LIBRARY to search & link for an executable?
Zitat von Bill Hoffman : If the executable exports symbols, it should create an import .lib file, and find_library should be able to find it. You can not link to a .exe file. He talks about Linux, not Windows, AFAIK. HS ___ 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] Use FIND_LIBRARY to search & link for an executable?
Hendrik Sattler wrote: Zitat von Bill Hoffman : If the executable exports symbols, it should create an import .lib file, and find_library should be able to find it. You can not link to a .exe file. He talks about Linux, not Windows, AFAIK. OK, then he needs to use the correct flags with dlopen so that it will give the module access to symbols in the .exe. You should be able to create a .so that has undefined symbols. Then, if you use dlopen(libname, RTLD_LAZY), it will use the symbols already in the loading exe. -Bill ___ 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] external tools in visual studio
> We use CMake + Flex/Bison for our project > https://savannah.nongnu.org/projects/certi > (install doc is here: http://www.nongnu.org/certi/certi_doc/index.html > but there is not much to discover) > > We did face the same "m4 not found" trouble and it has > been "fixed" by putting > C:/Programme/GnuWin32/bin > in the system PATH and restart (at least) Visual Studio. Does that work for you? Maybe I've done something wrong here. I'll try that again on monday. > > Setting the environment path does not help > > (as visual studio does not care for these settings). > > That's true the culprit here is bison.exe which assume m4.exe is in the > path. > > our (primitive) FindLexYacc.cmake is here: > http://cvs.savannah.gnu.org/viewvc/certi/scripts/FindLexYacc.cmake?root=certi&view=markup > > the CUSTOM command and others concerning Lex/Yacc handling may > be found in the following CMakeLists.txt > http://cvs.savannah.gnu.org/viewvc/certi/libCERTI/CMakeLists.txt?root=certi&view=markup > > those 2 are not what I would call "pure academic" examples but they do > work > for us on several Windows box (200x, XP, Vista, ...) with different IDEs > (Visual, Code::Blocks, ...) > My *.cmake does look very similar to yours, so I believe, it's the PATH, that is not set correctly. Thanks for your answer! Hope I'll get it to work soon. - tom ___ 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] external tools in visual studio
2009/9/18 : >> We use CMake + Flex/Bison for our project >> https://savannah.nongnu.org/projects/certi >> (install doc is here: http://www.nongnu.org/certi/certi_doc/index.html >> but there is not much to discover) >> >> We did face the same "m4 not found" trouble and it has >> been "fixed" by putting >> C:/Programme/GnuWin32/bin >> in the system PATH and restart (at least) Visual Studio. > > Does that work for you? Maybe I've done something wrong here. I'll try that > again on monday. Yes it does. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.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] Problem with ADD_CUSTOM_COMMAND & ARGS
Tyler, Shortly after postiing this followup I was able to resolve my problem via VERBATIM and some 'creative quoting' Thanks for your help, Eric Tyler Roscoe wrote on 09/17/2009 01:11:43 PM: > On Thu, Sep 17, 2009 at 08:24:28AM -0400, Eric Tellefsen wrote: > > On the plus side, the passed arg "#../../XML/Types/##" is now properly > > quoted. On the minus side, the xsd command invocation fails outright, > > because for some reason the directory name being passed in for the > > location of the .xsd files ( ${TYPE_XSD_DIR} ) IS being quoted. Previously > > this was not the case (regarding this directory > > The only thing I can tell you is play with the quoting until it works > correctly. Take some off, put more on, escape things, etc. > > You could also try posting the actual output from your make VERBOSE=1 > (and the relevant part of your CMakeLists) to see if someone else can > see the problem. > > tyler --- This communication may contain confidential and/or privileged information. If you are not the intended recipient (or have received this communication in error) please notify the sender immediately and destroy this communication. Any unauthorized copying, disclosure or distribution of the material in this communication is strictly forbidden. Deutsche Bank does not render legal or tax advice, and the information contained in this communication should not be regarded as such.___ 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] [PATCH] CPack fails because of a sharing violation
Hi. Trying to build & install Boost I ran into the following error when CPack was called: , | CPack: - Install component: fusion_headers | CMake Error at libs/fusion/cmake_install.cmake:31 (FILE): | file Problem setting modification time on file | "C:/build/vc90nmake/boost_1_40_0/_CPack_Packages/win32/NSIS/Boost-1.40.0-vc9/fusion_headers/include/boost-1_40/boost/fusion/include/iterator_facade.hpp" | Call Stack (most recent call first): | libs/cmake_install.cmake:48 (INCLUDE) | cmake_install.cmake:37 (INCLUDE) | | CPack Error: Error when generating package: Boost | NMAKE : fatal error U1077: ""C:\Programme\CMake 2.6\bin\cpack.exe"": Return-Code "0x1" | Stop. ` I debugged cpack.exe and realized that the error occured in Source/cmSystemTools.cxx:CopyFileTime() when trying to open the target file. GetLastError() returned ERROR_SHARING_VIOLATION. According to http://support.microsoft.com/?scid=kb%3Ben-us%3B316609&x=17&y=20 one should retry attempting to open the file until successfull. I implemented this approach (see the following patch) and succeeded in building an installer package for Boost. Of course, there a some other places where CreateFile is called and this problem might happen there also. It might be a good idea to generalize this into an utility function. Btw, do you realize that the cmSystemToolsWindowsHandle class is broken according to its copy/assignment semantics? Index: Source/cmSystemTools.cxx === RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v retrieving revision 1.401 diff -u -r1.401 cmSystemTools.cxx --- Source/cmSystemTools.cxx11 Sep 2009 12:18:13 - 1.401 +++ Source/cmSystemTools.cxx18 Sep 2009 14:43:23 - @@ -2134,11 +2134,26 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) { #if defined(_WIN32) && !defined(__CYGWIN__) + const DWORD retryDelay_millisecs = 250; + const int maxRetries = 15; + int retries = 0; + cmSystemToolsWindowsHandle hFrom = CreateFile(fromFile, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); - cmSystemToolsWindowsHandle hTo = -CreateFile(toFile, GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); + + HANDLE hTry; + + while ((hTry = CreateFile(toFile, GENERIC_WRITE, +FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE + && GetLastError() == ERROR_SHARING_VIOLATION + && ++retries <= maxRetries) +{ +Sleep(retryDelay_millisecs); +} + + cmSystemToolsWindowsHandle hTo(hTry); + if(!hFrom || !hTo) { return false; Regards, Claudio ___ 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] [PATCH] CPack fails because of a sharing violation
Claudio Bley wrote: Hi. Trying to build & install Boost I ran into the following error when CPack was called: , | CPack: - Install component: fusion_headers | CMake Error at libs/fusion/cmake_install.cmake:31 (FILE): | file Problem setting modification time on file | "C:/build/vc90nmake/boost_1_40_0/_CPack_Packages/win32/NSIS/Boost-1.40.0-vc9/fusion_headers/include/boost-1_40/boost/fusion/include/iterator_facade.hpp" | Call Stack (most recent call first): | libs/cmake_install.cmake:48 (INCLUDE) | cmake_install.cmake:37 (INCLUDE) | | CPack Error: Error when generating package: Boost | NMAKE : fatal error U1077: ""C:\Programme\CMake 2.6\bin\cpack.exe"": Return-Code "0x1" | Stop. ` I debugged cpack.exe and realized that the error occured in Source/cmSystemTools.cxx:CopyFileTime() when trying to open the target file. GetLastError() returned ERROR_SHARING_VIOLATION. According to http://support.microsoft.com/?scid=kb%3Ben-us%3B316609&x=17&y=20 one should retry attempting to open the file until successfull. I implemented this approach (see the following patch) and succeeded in building an installer package for Boost. Of course, there a some other places where CreateFile is called and this problem might happen there also. It might be a good idea to generalize this into an utility function. Btw, do you realize that the cmSystemToolsWindowsHandle class is broken according to its copy/assignment semantics? Index: Source/cmSystemTools.cxx === RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v retrieving revision 1.401 diff -u -r1.401 cmSystemTools.cxx --- Source/cmSystemTools.cxx11 Sep 2009 12:18:13 - 1.401 +++ Source/cmSystemTools.cxx18 Sep 2009 14:43:23 - @@ -2134,11 +2134,26 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) { #if defined(_WIN32) && !defined(__CYGWIN__) + const DWORD retryDelay_millisecs = 250; + const int maxRetries = 15; + int retries = 0; + cmSystemToolsWindowsHandle hFrom = CreateFile(fromFile, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); - cmSystemToolsWindowsHandle hTo = -CreateFile(toFile, GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); + + HANDLE hTry; + + while ((hTry = CreateFile(toFile, GENERIC_WRITE, +FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE + && GetLastError() == ERROR_SHARING_VIOLATION + && ++retries <= maxRetries) +{ +Sleep(retryDelay_millisecs); +} + + cmSystemToolsWindowsHandle hTo(hTry); + if(!hFrom || !hTo) { return false; Why is it trying to copy a file that is being used? Seems like there is some other issue here, and this just gets around a different bug... -Bill ___ 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] Xcode paths not turning out right
Robert Dailey wrote: Hello, I'm using the latest (as of now) CMake build from CVS head. I noticed that when I specify a source file like so: /Users/imac/work/redsword/projects/foobar/mysource.mm XCode actually thinks it is here: /Users/imac/work/redsword/projects/foobar/projects/foobar/mysource.mm This bug may be related: http://www.cmake.org/Bug/view.php?id=8481 I just added a link to this thread in that entry. -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] Xcode paths not turning out right
Robert Dailey wrote: The goal here is to try to build Xcode projects for building iPhone apps. My CMake logic for producing projects is rather complex, which is why I am hesitant to post it here. But basically I'm taking the exact path above and passing it into add_executable like so: add_executable( foobar MACOSX_BUNDLE "/Users/imac/work/redsword/projects/foobar/mysource.mm Where is the CMakeLists.txt file containing this line? Perhaps "/Users/imac/work/redsword/CMakeLists.txt"? -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] Xcode paths not turning out right
Brad King wrote: Robert Dailey wrote: The goal here is to try to build Xcode projects for building iPhone apps. My CMake logic for producing projects is rather complex, which is why I am hesitant to post it here. But basically I'm taking the exact path above and passing it into add_executable like so: add_executable( foobar MACOSX_BUNDLE "/Users/imac/work/redsword/projects/foobar/mysource.mm Where is the CMakeLists.txt file containing this line? Perhaps "/Users/imac/work/redsword/CMakeLists.txt"? Oh, and what version of Xcode is this? Thanks, -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] Xcode paths not turning out right
On Fri, Sep 18, 2009 at 12:52 PM, Brad King wrote: > Robert Dailey wrote: > >> The goal here is to try to build Xcode projects for building iPhone apps. >> My CMake logic for producing projects is rather complex, which is why I am >> hesitant to post it here. But basically I'm taking the exact path above and >> passing it into add_executable like so: >> >> add_executable( foobar MACOSX_BUNDLE >> "/Users/imac/work/redsword/projects/foobar/mysource.mm >> > > Where is the CMakeLists.txt file containing this line? > Perhaps "/Users/imac/work/redsword/CMakeLists.txt"? That's where the root one is, and this root script has all of the meat that the subdirectories call. This script is the one that has the functions that call add_executable() with the absolute paths. However, the script *calling* that function is in: /Users/imac/work/redsword/projects/foobar/CMakeLists.txt The version of xcode I'm using is the one that comes with the iPhone 3.1 SDK installer. I don't know how to find out the version number of xcode on the mac. I think it is xcode 3.1 though. ___ 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] Windows XP and Docbook
I've been trying to improve my project documentation and in linux I've used Docbook in the past with limited success. I was curious if there's a good docbook solution in windows. I'd like to add "make docs" as a target, but I couldn't find anything like FindDocbook.cmake in my modules path. Anyone using docbook on Windows XP (or newer) along with cmake? -- Shane ___ 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] Xcode paths not turning out right
Robert Dailey wrote: Where is the CMakeLists.txt file containing this line? Perhaps "/Users/imac/work/redsword/CMakeLists.txt"? That's where the root one is, and this root script has all of the meat that the subdirectories call. This script is the one that has the functions that call add_executable() with the absolute paths. However, the script *calling* that function is in: /Users/imac/work/redsword/projects/foobar/CMakeLists.txt I'm having trouble reproducing this. I have # CMakeLists.txt cmake_minimum_required(VERSION 2.6) # but I'm running 2.7.20090918 project(FOO C) function(my_add) add_executable(${ARGN}) endfunction() add_subdirectory(A) # A/CMakeLists.txt my_add(foo ${FOO_SOURCE_DIR}/A/foo.mm foo.c) In Xcode, the "Get Info" dialog for foo.mm says Name: A/foo.mm Full path: /path/to/source/tree/A/foo.mm What is the symptom you're seeing? Can you please send me a tarball with a minimal project? The version of xcode I'm using is the one that comes with the iPhone 3.1 SDK installer. I don't know how to find out the version number of xcode on the mac. I think it is xcode 3.1 though. Use the Xcode menu: Xcode -> About Xcode to see a version dialog. -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] Xcode paths not turning out right
Sounds like maybe you are using "${CMAKE_CURRENT_SOURCE_DIR}" in a function or macro. (defined at the top level, but called from a lower level)... On Fri, Sep 18, 2009 at 4:12 PM, Brad King wrote: > Robert Dailey wrote: > >>Where is the CMakeLists.txt file containing this line? >>Perhaps "/Users/imac/work/redsword/CMakeLists.txt"? >> >> >> That's where the root one is, and this root script has all of the meat >> that the subdirectories call. This script is the one that has the functions >> that call add_executable() with the absolute paths. However, the script >> *calling* that function is in: >> >> /Users/imac/work/redsword/projects/foobar/CMakeLists.txt >> > > I'm having trouble reproducing this. I have > > # CMakeLists.txt > cmake_minimum_required(VERSION 2.6) # but I'm running 2.7.20090918 > project(FOO C) > function(my_add) >add_executable(${ARGN}) > endfunction() > add_subdirectory(A) > > # A/CMakeLists.txt > my_add(foo ${FOO_SOURCE_DIR}/A/foo.mm foo.c) > > In Xcode, the "Get Info" dialog for foo.mm says > > Name: A/foo.mm > Full path: /path/to/source/tree/A/foo.mm > > What is the symptom you're seeing? > Can you please send me a tarball with a minimal project? > > The version of xcode I'm using is the one that comes with the iPhone 3.1 >> SDK installer. I don't know how to find out the version number of xcode on >> the mac. I think it is xcode 3.1 though. >> > > Use the Xcode menu: > > Xcode -> About Xcode > > to see a version dialog. > > > -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 > ___ 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] Xcode paths not turning out right
David Cole wrote: Sounds like maybe you are using "${CMAKE_CURRENT_SOURCE_DIR}" in a function or macro. (defined at the top level, but called from a lower level)... That works just fine...evaluation of the variable is the location of the current CMakeLists.txt file, not the file containing the reference. Robert already said it works in VS generators. -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
[CMake] Add OSX_ARCHITECTURES and OSX_ARCHITECTURES_ to target properties
I work for a company that is considering porting one of its major software products to CMake. In the course of developing a CMake based build system for the Mac port of the product the following issue came up. What follows is a description of the problem and a proposed solution for the problem. I have submitted this problem as bug (feature) # 8725 to the cmake bug tracker. Thanks, Steve Consider the following source tree on OSX: TopDir/ - CMakeLists.txt - src1.c - src2.c Where src1.c is compiled into a 32-bit(i386) binary that links with libExample1.a a non-Universal i386 architecture library. Where src2.c is compiled into a 64-bit(x86_64) binary that links with libExample2.a a non-Universal x86_64 architecture library. libExample1.a and libExample2.a exist outside of the scope of the source tree and cannot be rebuilt to be Universal libraries. Here are the basic entries in CMakeLists.txt: add_executable(src1 src1.c) target_link_libraries(src1 Example1) set_target_properties(src1 PROPERTIES COMPILE_FLAGS "-arch i386" LINK_FLAGS "-arch i386") add_executable(src2 src2.c) target_link_libraries(src2 Example2) set_target_properties(src2 PROPERTIES COMPILE_FLAGS "-arch x86_64" LINK_FLAGS "-arch x86_64" When generating a build system using the 'Unix Makefiles' generator this CMakeLists.txt will correctly build and link src1 and src2 as i386 and x86_64 binaries respectively. When generating a build system using the Xcode generator this CMakeLists.txt will generate an Xcode project that cannot correctly build src2. CMake provides default values for CMAKE_OSX_ARCHITECTURES. When the Xcode generator runs, it will use the default value for CMAKE_OSX_ARCHITECTURES (i386 in this case (assume a Core 2 Duo processor)) and the Xcode project will not have any explicit reference to i386 architectures when it is generated. Xcode will by default use the 'native' architecture for the given machine and automatically append -arch i386 to the compile/link commands for src1 and src2. Given that src2 must be an x86_64 architecture only binary (see dependency on libExample2.a) then src2 cannot link correctly. Explicitly setting CMAKE_OSX_ARCHITECTURES to x86_64 in the CMakeLists.txt file does not solve the problem but rather switches the case to src1 which must be compiled as an i386 architecture only binary. Explicitly setting CMAKE_OSX_ARCHITECTURES to x86_64;i386 violates the requirement that the binaries only have i386 and x86_64 architectures respectively. This behavior makes it impossible to have working Makefile and Xcode build systems generated for this source tree. To put it another way, you cannot generate an Xcode project that contains targets with strict exclusive architecture requirements where those requirements vary by target. In order to correct this deficiency, we need to have a property for targets that allows a target to override the project level CMAKE_OSX_ARCHITECTURES setting. I propose the use of the following property names: OSX_ARCHITECTURES and OSX_ARCHITECTURES_ The CMAKE_OSX_ARCHITECTURES property sets the target binary architecture for targets on OSX. Use CMAKE_OSX_ARCHITECTURES_ to set the binary architectures on a per-configuration basis. is an upper-case name (ex. CMAKE_OSX_ARCHITECTURES_DEBUG). ___ 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] Add OPTIONAL to install(DIRECTORY ...)
Currently install(FILES ...) and install(PROGRAMS ...) allow the OPTIONAL modifier. Directories can also be optional install items. install(DIRECTORY dirs... DESTINATION [FILE_PERMISSIONS permissions...] [DIRECTORY_PERMISSIONS permissions...] [USE_SOURCE_PERMISSIONS] [CONFIGURATIONS [Debug|Release|...]] [COMPONENT ] [FILES_MATCHING] [[PATTERN | REGEX ] [EXCLUDE] [PERMISSIONS permissions...]] [OPTIONAL] [...]) I have submitted this request as bug # 8743 to the bug tracker and would like to see this issue integrated into the next release of CMake. Thanks, Steve ___ 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] cmake 2.6.4 won't find boost 1.40 on windows
2009/9/18 John Drescher : > You set BOOST_ROOT in your windows environment variables. Sorry, but I'd consider this just a workaround. >From the discussion in this thread, I have the impression that the only purpose of setting the BOOST_ROOT environment variable is to tell FindBoost what the module should be able to do on its own: "find Boost". IOW: If I have to tell cmake which exact version I am looking for and where this version is installed, why would I want to FindBoost at all? Kind regards Ingolf ___ 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] cmake 2.6.4 won't find boost 1.40 on windows
On Fri, Sep 18, 2009 at 5:01 PM, Ingolf Steinbach wrote: > 2009/9/18 John Drescher : >> You set BOOST_ROOT in your windows environment variables. > > Sorry, but I'd consider this just a workaround. > > From the discussion in this thread, I have the impression that the > only purpose of setting the BOOST_ROOT environment variable is to tell > FindBoost what the module should be able to do on its own: "find > Boost". IOW: If I have to tell cmake which exact version I am looking > for and where this version is installed, why would I want to FindBoost > at all? > It's difficult on windows since there is no standard location for stuff like this. A lot of people dump this on C:\ but that is definitely not where I have any source code or libraries. This is not even on C: at all. What is the FindBoost to do search all paths that are valid for the current user? John ___ 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] Xcode paths not turning out right
Yeah, that's what I'm doing... basically: # Root CMakeLists.txt file: function( func1 file ) add_executable( foobar "${CMAKE_CURRENT_SOURCE_DIR}/${file}" ) endfunction() function( define_project file ) func1( ${file} ) endfunction() # CMakeLists.txt in a lower subdirectory (Inside foobar project directory): define_project() The code above isn't exactly what I'm running, but more of a simplified version. The goal here was to turn each source file into an absolute path by prepending the CMAKE_CURRENT_SOURCE_DIR to it. When I print the path out from the cmake script via message() it seems to be OK. - Robert Dailey On Fri, Sep 18, 2009 at 3:15 PM, David Cole wrote: > Sounds like maybe you are using "${CMAKE_CURRENT_SOURCE_DIR}" in a function > or macro. (defined at the top level, but called from a lower level)... > > > On Fri, Sep 18, 2009 at 4:12 PM, Brad King wrote: > >> Robert Dailey wrote: >> >>>Where is the CMakeLists.txt file containing this line? >>>Perhaps "/Users/imac/work/redsword/CMakeLists.txt"? >>> >>> >>> That's where the root one is, and this root script has all of the meat >>> that the subdirectories call. This script is the one that has the functions >>> that call add_executable() with the absolute paths. However, the script >>> *calling* that function is in: >>> >>> /Users/imac/work/redsword/projects/foobar/CMakeLists.txt >>> >> >> I'm having trouble reproducing this. I have >> >> # CMakeLists.txt >> cmake_minimum_required(VERSION 2.6) # but I'm running 2.7.20090918 >> project(FOO C) >> function(my_add) >>add_executable(${ARGN}) >> endfunction() >> add_subdirectory(A) >> >> # A/CMakeLists.txt >> my_add(foo ${FOO_SOURCE_DIR}/A/foo.mm foo.c) >> >> In Xcode, the "Get Info" dialog for foo.mm says >> >> Name: A/foo.mm >> Full path: /path/to/source/tree/A/foo.mm >> >> What is the symptom you're seeing? >> Can you please send me a tarball with a minimal project? >> >> The version of xcode I'm using is the one that comes with the iPhone 3.1 >>> SDK installer. I don't know how to find out the version number of xcode on >>> the mac. I think it is xcode 3.1 though. >>> >> >> Use the Xcode menu: >> >> Xcode -> About Xcode >> >> to see a version dialog. >> >> >> -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 >> > > ___ 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] Xcode paths not turning out right
I'll see if I can get you guys a reproducible project. However, I hope you guys have access to the version of xcode I'm using. I'll also get you the version number next monday when I get back into work. On Fri, Sep 18, 2009 at 4:15 PM, Robert Dailey wrote: > Yeah, that's what I'm doing... basically: > # Root CMakeLists.txt file: > function( func1 file ) > add_executable( foobar "${CMAKE_CURRENT_SOURCE_DIR}/${file}" ) > endfunction() > > function( define_project file ) > func1( ${file} ) > endfunction() > > # CMakeLists.txt in a lower subdirectory (Inside foobar project directory): > define_project() > > The code above isn't exactly what I'm running, but more of a simplified > version. The goal here was to turn each source file into an absolute path by > prepending the CMAKE_CURRENT_SOURCE_DIR to it. When I print the path out > from the cmake script via message() it seems to be OK. > > > - > Robert Dailey > > > > On Fri, Sep 18, 2009 at 3:15 PM, David Cole wrote: > >> Sounds like maybe you are using "${CMAKE_CURRENT_SOURCE_DIR}" in a >> function or macro. (defined at the top level, but called from a lower >> level)... >> >> >> On Fri, Sep 18, 2009 at 4:12 PM, Brad King wrote: >> >>> Robert Dailey wrote: >>> Where is the CMakeLists.txt file containing this line? Perhaps "/Users/imac/work/redsword/CMakeLists.txt"? That's where the root one is, and this root script has all of the meat that the subdirectories call. This script is the one that has the functions that call add_executable() with the absolute paths. However, the script *calling* that function is in: /Users/imac/work/redsword/projects/foobar/CMakeLists.txt >>> >>> I'm having trouble reproducing this. I have >>> >>> # CMakeLists.txt >>> cmake_minimum_required(VERSION 2.6) # but I'm running 2.7.20090918 >>> project(FOO C) >>> function(my_add) >>>add_executable(${ARGN}) >>> endfunction() >>> add_subdirectory(A) >>> >>> # A/CMakeLists.txt >>> my_add(foo ${FOO_SOURCE_DIR}/A/foo.mm foo.c) >>> >>> In Xcode, the "Get Info" dialog for foo.mm says >>> >>> Name: A/foo.mm >>> Full path: /path/to/source/tree/A/foo.mm >>> >>> What is the symptom you're seeing? >>> Can you please send me a tarball with a minimal project? >>> >>> The version of xcode I'm using is the one that comes with the iPhone 3.1 SDK installer. I don't know how to find out the version number of xcode on the mac. I think it is xcode 3.1 though. >>> >>> Use the Xcode menu: >>> >>> Xcode -> About Xcode >>> >>> to see a version dialog. >>> >>> >>> -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 >>> >> >> > ___ 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] cmake 2.6.4 won't find boost 1.40 on windows
2009/9/18 John Drescher : > It's difficult on windows since there is no standard location for > stuff like this. Seconded. > What is the FindBoost to do search all paths that > are valid for the current user? Nevertheless, there *are* some hard-coded paths in FindBoost (C:\boost, %ProgramFiles%\boost being among them). I think those are sufficiently "standard" that FindBoost could try a bit harder in searching them -- especially when one of these folders does exist in the file system. But part of the problem is probably the Boost documentation not recommending some reasonable choices of destinations for the installation, Ingolf ___ 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] cmake 2.6.4 won't find boost 1.40 on windows
Ingolf Steinbach wrote: 2009/9/18 John Drescher : It's difficult on windows since there is no standard location for stuff like this. Seconded. What is the FindBoost to do search all paths that are valid for the current user? Nevertheless, there *are* some hard-coded paths in FindBoost (C:\boost, %ProgramFiles%\boost being among them). I think those are sufficiently "standard" that FindBoost could try a bit harder in searching them -- especially when one of these folders does exist in the file system. But part of the problem is probably the Boost documentation not recommending some reasonable choices of destinations for the installation, If someone has a reasonable set of places to look we can add them. Does the boost installer set any registry values? -Bill ___ 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] cmake 2.6.4 won't find boost 1.40 on windows
2009/9/18 Bill Hoffman : > If someone has a reasonable set of places to look we can add them. Does the > boost installer set any registry values? Not sure about that. Unfortunately, there is no installer for 1.40.0 yet; and 1.40 seems to be somewhat different than previous releases -- at least with respect to library naming. My intention was: there are already some typical paths hard coded in FindBoost. When the module finds that one of those paths does exist in the file system, would it be possible to search that path a bit harder (for instance evaluate subdirectories) for the requested Boost version? Ingolf ___ 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] Lnk 1104 with nmake, and the lib prefix
Hi, I'm having a problem building a dll using CMake with the nmake generator. It may be more of a VC++ question, but I figured someone here might know the answer. I have some C++ file that make calls to the boost libraries. I want to put them in a dll. CMake finds the libraries ok. This is from the generated build.cmake file. -- # External object files for target utility utility_EXTERNAL_OBJECTS = utility.dll: CMakeFiles\utility.dir\Attribute.cc.obj utility.dll: CMakeFiles\utility.dir\AttributeSet.cc.obj utility.dll: CMakeFiles\utility.dir\FileUtility.cc.obj utility.dll: CMakeFiles\utility.dir\MatrixUtil.cc.obj utility.dll: CMakeFiles\utility.dir\StringUtility.cc.obj utility.dll: CMakeFiles\utility.dir\ThreadInterface.cc.obj utility.dll: CMakeFiles\utility.dir\XDEMessage.cc.obj utility.dll: E:\projects\trunk\mathstat\src\mslib\mathstat.lib utility.dll: "C:\Program Files\boost\boost_1_39\lib\boost_regex-vc90-mt-gd-1_39.lib" utility.dll: "C:\Program Files\boost\boost_1_39\lib\boost_system-vc90-mt-gd-1_39.lib" utility.dll: "C:\Program Files\boost\boost_1_39\lib\boost_filesystem-vc90-mt-gd-1_39.lib" utility.dll: "C:\Program Files\boost\boost_1_39\lib\boost_date_time-vc90-mt-gd-1_39.lib" utility.dll: "C:\Program Files\boost\boost_1_39\lib\boost_system-vc90-mt-gd-1_39.lib" utility.dll: "C:\Program Files\xerces-c-3.0.1-x86-windows-vc-9.0\lib\xerces-c_3.lib" utility.dll: "C:\Program Files\boost\boost_1_39\lib\boost_filesystem-vc90-mt-gd-1_39.lib" utility.dll: "C:\Program Files\boost\boost_1_39\lib\boost_date_time-vc90-mt-gd-1_39.lib" utility.dll: "C:\Program Files\xerces-c-3.0.1-x86-windows-vc-9.0\lib\xerces-c_3.lib" utility.dll: CMakeFiles\utility.dir\build.make utility.dll: CMakeFiles\utility.dir\objects1.rsp @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX shared library utility.dll" ... -- When I run nmake all the source files are compiled OK, but then I get Done with cmake. -- Configuring done -- Generating done -- Build files have been written to: E:/projects/trunk/XDE/src/utility Linking CXX shared library utility.dll LINK : warning LNK4044: unrecognized option '/DWINDOWS'; ignored LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc90-mt-gd-1_39.lib' LINK Pass 1 failed. with 1104 NMAKE : fatal error U1077: '"C:\Program Files\CMake 2.6\bin\cmake.exe"' : return code '0x' Stop. Notice than nmake complains about not finding libboost_filesystemXXX, while the build.cmake refers to boost_filesystemXXX, which are the actual names of the boost libraries on my system. My CMake instructions are (cut and paste from different files) # Change the following to look for a particular version of boost # With the current options nmake will look for the mt-gd-1_39, even though # the mt-1_39 is there. Probably due to compiler options. set (BOOST_SUFFIX "-vc90-mt-gd-1_39") find_library(BOOST_REGEX NAMES boost_regex-mt boost_regex${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH}) find_library(BOOST_FILESYSTEM NAMES boost_filesystem-mt boost_filesystem${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH}) find_library(BOOST_SYSTEM NAMES boost_system-mt boost_system${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH}) find_library(BOOST_DATETIME NAMES boost_date_time-mt boost_date_time${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH}) find_library(BOOST_SYSTEM NAMES boost_system-mt boost_system${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH}) ... add_library(utility SHARED ${SRC_FILES}) target_link_libraries(utility ${MATHSTAT} ${BOOST_LIBRARIES}) where ${BOOST_LIBRARIES} is a list of all the BOOST_REGEX, etc Am I missing something obvious here? Thanks, Alain ___ 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] Build cmake as a static executable
I need to deploy cmake in an environment in which the old shared libraries need to be used, so I would like to build cmake as a statically executable without linked any shared libraries. Do anyone try to build cmake that way ? Thanks for sharing any experience. Xiangyun ___ 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] Windows XP and Docbook
Am Freitag 18 September 2009 22:06:11 schrieb Dixon, Shane: > I've been trying to improve my project documentation and in linux I've used > Docbook in the past with limited success. I was curious if there's a good > docbook solution in windows. I'd like to add "make docs" as a target, but > I couldn't find anything like FindDocbook.cmake in my modules path. > Anyone using docbook on Windows XP (or newer) along with cmake? I wrote a cmake docbook4 integration (for docbook5, you need xslt2 which is a bit different). On Windows, you need to either install xsltproc, saxon-6.5.x or xalan-2.x and have that in the path. You can find them under CmakeModules in the bluetooth/openobex.git at http://git.kernel.org. You need the FindDocbook.cmake, UseDocbook.cmake, FindXslt.cmake and UseXslt.cmake (under CmakeModules). How to use it is shown in doc/CmakeLists.txt. For HTML output, your entry element in the docbook file must be refentry with one or more refentry elements. All of them should have a unique id attribute. For manpage output, you need manvolnum elements. PDF output is not possible as that is more complicated and has many options. Have fun. HS ___ 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