[CMake] Checkout specific revision from svn with ExternalProject_Add
Hi, I am trying to checkout a specific revision of external dependencies from our repositoty using the SVN_REPOSITOTY parameter of ExternalProject_Add, but always get the following error: 2> Creating directories for 'Hippomocks' 2> Performing download step (SVN checkout) for 'Hippomocks' 2> AHippomocks\hippomocks\include 2> AHippomocks\hippomocks\include\hippomocks 2> AHippomocks\hippomocks\include\hippomocks\hippomocks.h 2> AHippomocks\hippomocks\CMakeLists.txt 2> Checked out revision . 2> svn: E125002: '8887' does not appear to be a URL When I looked into the source code, I see that the command line for svn is created as set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision} --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name}) According to the svn documentation page, I would have to give the revision with a special option -revision. Is this a bug or am I misinterpreting the ExternalProject_Add command parameters? Is SVN_REVISION the path in the repository I specify with SVN_REPOSITORY? -- 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 stripping "/SUBSYSTEM" out of LINK_FLAGS
Hi, > > it reaches the linker. I can't simply add WIN32 to > add_executable() > > because I want debug builds to use the console sub-system > and release > > builds to use the windows subsystem. I have three questions: I don't have a solution in cmake, but I worked around this using code from here: http://www.halcyon.com/~ast/dload/guicon.htm. It shows how to open a console window and redirect the output. It also has the benefit that the debug build is closer to release builds and that the entry point definition is more in line with the windows documentation (SUBSYSTEM:WINDOWS -> WinMain, SUBSYSTEM:CONSOLE -> main). Best regards, Jens -- 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] VS2005: CMAKE_CXX_FLAGS not used when project() is placed after definition
> The PROJECT() command has significant side effects, e.g. for > C++ projects, it loads Modules/CMakeCXXInformation.cmake containing: > > SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING > "Flags used by the compiler during all build types.") > > If CMAKE_CXX_FLAGS has no value in the cache before, this > command will write to the cache *and* to the current scope, > see [1]. Thus, it will overwrite the value provided in the > CMakeLists.txt in the first case. > In the second case, the CMakeLists.txt file provides the > definitive value in the current scope which will be in effect > afterwards. > > IMO, it's best to have PROJECT() as one of the very first > commands in CMakeLists.txt files, and to only put other > commands before it if one really knows about the consequences. This behvaior seems to be a little inconsistent. When I remember correctly, the optimization switch gets set correctly in both cases, but the /EHa is lost. I also think that overwriting the variable in the current scope is unobivious and should at least be documented in the manual, but I would prefer to not touch the variable or even use the current value. Best regards, Jens ___ 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] VS2005: CMAKE_CXX_FLAGS not used when project() is placed after definition
Hi, I encountered a problem with CMAKE_CXX_FLAGS and the place in the CMakeLists.txt where the project() command is placed. Consider two CMakeLists.txt files, the first containing SET(CMAKE_CXX_FLAGS "/EHa /O2") project(CMAKE_BUG) add_executable(testEHa "c:/work/tmp/cmake_eha/test.cpp") And the second containing project(CMAKE_BUG) SET(CMAKE_CXX_FLAGS "/EHa /O2") add_executable(testEHa "c:/work/tmp/cmake_eha/test.cpp") When I run cmake 2.8.5 on both files, the exception handling option differs. For the first file, it is set to 1 in the generated VS project file, which means /Ehsc, the default. The second file generates the intended project file with windows structured exceptions enabled. I only checked the generated VS2005 files, so I don't know if this is an issue of this specific generator or a more global one. Best regards, Jens ___ 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] Solution folder property does not work for external projects in cmake 2.8.3
Hi, I just downloaded the new cmake 2.8.3 release and found a bug. We include several external VC++ projects in our solution and group them into folders using the old SOLUTION_FOLDER patch. When I checked the new property FOLDER in cmake 2.8.3, it turns out that it works for all projects except those included by include_external_msproject. When you modify the following example to point to an existing .vcproj-file and open the generated solution in visual studio 2005, only the custom target will be found in folder1/folder2: set_property(GLOBAL PROPERTY USE_FOLDERS On) cmake_minimum_required(VERSION 2.8.3) project(project) include_external_msproject(externalProject ) set_target_properties(externalProject PROPERTIES FOLDER folder1/folder2) add_custom_target(infolder) set_target_properties(infolder PROPERTIES FOLDER folder1/folder2) I also had to put the set_property in the first line of the file to activate solution folders support, setting it after the cmake_minimum_required did not turn the support on. I don't know if this is intended or not. Best regards, Jens ___ 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] Dependencies to generated file across libraries
Hi, I am trying to port a project from VC++ to a cmake build-system. Unfortunately, the project has a little problem: There are several libraries and some of them generate files using uic (Qt3). Cmake can handle this pretty well, but in one case, there are two libraries which include generated headers from each other: / Project(projectName) /lib1 File1.ui (GeneratedHeader1.h) Header2.h add_library(...) /lib2 File2.ui (GeneratedHeader3.h) Header4.h add_library(...) The GeneratedHeader1.h and GeneratedHeader3.h are created by QT_WRAP_UI. Header2.h includes lib2/GeneratedHeader3.h and Header4.h includes lib1/GeneratedHeader1.h. This creates a circular dependency between the projects, but it would be possible to just generate the headers before processing one project, but cmake seems to not detect such file-based dependencies between sub-directories. When I try to build the project, the compiler fails to find the missing library. Is there a way to have specify the dependency manually? I tried the OBJECT_DEPENDS source file property, but this has not changed the build process. ___ 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] Output directory of QT_WRAP_UI
Hi, Is there a way to specify the output directory of QT_WRAP_UI where the generated header files will be put? I am porting a VC++-based project and files are included with the relative paths, so if the ui file is placed in Lib1/dir1/file1.ui I want the output generated in CMAKE_BINARY_DIR/lib1/dir1/file1Base.h It seems that there is no such option, so I wrote my own macro using add_custom_command, but it would be nice to just rely on the build-in command. ___ 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