[cmake-developers] [CMake 0013047]: Visual Studio 2010 Generator and PROPERTIES GENERATED 1 adds .obj as not part of this build to projects
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13047 == Reported By:Petr Pospíšil Assigned To: == Project:CMake Issue ID: 13047 Category: CMake Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 2012-03-17 08:11 EDT Last Modified: 2012-03-17 08:11 EDT == Summary:Visual Studio 2010 Generator and PROPERTIES GENERATED 1 adds .obj as not part of this build to projects Description: When you add .obj files that already exist and want to add them to the executable or library sources, the Visual Studio 2010 Generator add the file to the Project but it is marked as not part of this build and not linked with the executable or library. If you look in the .vxproj file is says..: ... ItemGroup None Include=C:/Users/PETR2/Desktop/bug/build/.obj / /ItemGroup ... Instead it should read: ItemGroup Object Include=C:/Users/PETR2/Desktop/bug/build/.obj / /ItemGroup Steps to Reproduce: 1) Use the following CMakeLists.txt: cmake_minimum_required(VERSION 2.8) project(bug CXX) set( obj_file .obj ) set_source_files_properties( ${obj_file} PROPERTIES GENERATED 1) add_executable(main main.cpp ${obj_file}) - with simple main.cpp and any .obj file, 2) run cmake with Visual Studio 2010 Generator 3) Open solution - stack.obj is added as Not part of this build and the object file is not linked with the executable or library == Issue History Date ModifiedUsername FieldChange == 2012-03-17 08:11 Petr Pospíšil 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-developers] How to handle package Config.cmake files with dependencies ?
On Tuesday 13 March 2012, Brad King wrote: On 3/13/2012 4:23 PM, Alexander Neundorf wrote: Then force-push back to the stage for another review. Done. Thanks. I rewrote and force-pushed the topic to make a few changes: (1) Tweaked the commit message of the main commit (2) Tweaked the failure message formatting (3) Added a -stderr.txt to the message test to actually verify it Please reset your local branch to the one on the stage and take a look. Looks good. Do you merge this into next or should I ? Alex -- 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
[cmake-developers] [CMake 0013049]: unset does not function for cached variables
The following issue has been SUBMITTED. == http://cmake.org/Bug/view.php?id=13049 == Reported By:kiri Assigned To: == Project:CMake Issue ID: 13049 Category: CMake Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 2012-03-17 12:43 EDT Last Modified: 2012-03-17 12:43 EDT == Summary:unset does not function for cached variables Description: Contrary to the documentation, using Set() or Unset() to unset a cached variable does not function. Steps to Reproduce: Executing the test case below with cmake -P yields: ShouldNotBeSet = 1 Test: Set ( ShouldNotBeSet 1 CACHE INTERNAL Test ) Set ( ShouldNotBeSet ) Unset ( ShouldNotBeSet ) Message (ShouldNotBeSet = ${ShouldNotBeSet}) == Issue History Date ModifiedUsername FieldChange == 2012-03-17 12:43 kiri 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-developers] depend problem on windows
On Thu, Mar 15, 2012 at 10:24:49AM -0400, Bill Hoffman wrote: So, I did a git branch switch to next and ran ninja on my build tree. It correctly re-ran cmake. But I found a link error building cmake-gui: CMakeLib.lib(cmLocalVisualStudio10Generator.cxx.obj) : error LNK2001: unresolved external symbol public: virtual void __thiscall cmLocalVisualStudio7Generator::GetTargetObjectFileDirectories(class cmTarget *,class std::vectorclass std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar ,class std::allocatorclass std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar) (?GetTargetObjectFileDirectories@cmLocalVisualStudio7Generator@@UAEXPAVcmTarget@@AAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) bin\cmake-gui.exe : fatal error LNK1120: 1 unresolved externals LINK Pass 1 failed. with 2 I did a ninja -t clean, and then ninja and everything worked. So, it looks like some of the object files did not rebuild correctly after the branch switch. Same source tree worked with a gmake build tree, so there were no odd file time things going on. Most likely some object files were not rebuilt as a result of header file changes. This will happen if the compiler does not support emitting dependency files, such as cl.exe. I think there are a couple of ways we could consider supporting cl.exe here: 1) Integrate CMake's built in dependency scanner. This will require some thought because the dependency scanner works on a per-target basis and Ninja reads dependency files on a per-file basis. 2) Come up with a way to use cl.exe's /showIncludes option to build a dependency list. There has been some discussion of this topic on the Ninja mailing list: https://groups.google.com/group/ninja-build/search?group=ninja-buildq=showincludesqt_g=Search+this+group Thanks, -- Peter -- 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
[CMake] ExternalProject_Add examples
Folks, I've recently created a number of super builds using CMake's External Project mechanism. Each external project requires some sort of download, configuration, build and possibly install. The CMake defines needed to correctly access the results of the external project vary significantly. The trickiest part is find the proper download, configuration and CMake defines. For example, for the Point Cloud Library (http://pointclouds.org/) I created these external projects: VTK - git, cmake, make; VTK_DIR FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR Slicer4 has many more. Should we start collecting sample ExternalProject_Add files for external projects? Bill -- Unpaid intern in BillsBasement at noware dot com -- 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] ExternalProject_Add examples
Hi, OpenSSL is very tricky on Windows. You'll find my solution (it requires a two-stage process) at http://gitorious.org/winstng On Sat, Mar 17, 2012 at 10:03 PM, Bill Lorensen bill.loren...@gmail.comwrote: Folks, I've recently created a number of super builds using CMake's External Project mechanism. Each external project requires some sort of download, configuration, build and possibly install. The CMake defines needed to correctly access the results of the external project vary significantly. The trickiest part is find the proper download, configuration and CMake defines. For example, for the Point Cloud Library (http://pointclouds.org/) I created these external projects: VTK - git, cmake, make; VTK_DIR FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR Slicer4 has many more. Should we start collecting sample ExternalProject_Add files for external projects? Bill -- Unpaid intern in BillsBasement at noware dot com -- 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 -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) -- 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] ExternalProject_Add examples
On Sat, Mar 17, 2012 at 5:03 PM, Bill Lorensen bill.loren...@gmail.com wrote: Folks, I've recently created a number of super builds using CMake's External Project mechanism. Each external project requires some sort of download, configuration, build and possibly install. The CMake defines needed to correctly access the results of the external project vary significantly. The trickiest part is find the proper download, configuration and CMake defines. For example, for the Point Cloud Library (http://pointclouds.org/) I created these external projects: VTK - git, cmake, make; VTK_DIR FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR Slicer4 has many more. Should we start collecting sample ExternalProject_Add files for external projects? We have talked about doing this too (I have Eigen, Boost, GTest and others for example). The standard CMake based projects hardly seem worth it, but it depends on what you want to do with them I suppose. For the work we are doing in chemistry we have been working on an experimental superbuild that uses a common prefix in the build tree to install to, and then all we need pass in is CMAKE_PREFIX_PATH - this can make the logic significantly easier for dependent CMake projects as it will always search within the prefix first. The Qt external project was pretty tricky too, and we are using that in several places along with smaller libraries like libxml2. Marcus -- 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] ExternalProject_Add examples
I agree, most all super builds are tricky. Is it practical to collect examples are are they so Project specific they won't be useful. For example, the Slicer4 external;s have a bunch of Slicer-specific stuff in them. However, it is still frustrating to star a superbuild from scratch. Maybe we can collect a skeleton for each external package. Bill On Sat, Mar 17, 2012 at 2:11 PM, Marcus D. Hanwell marcus.hanw...@kitware.com wrote: On Sat, Mar 17, 2012 at 5:03 PM, Bill Lorensen bill.loren...@gmail.com wrote: Folks, I've recently created a number of super builds using CMake's External Project mechanism. Each external project requires some sort of download, configuration, build and possibly install. The CMake defines needed to correctly access the results of the external project vary significantly. The trickiest part is find the proper download, configuration and CMake defines. For example, for the Point Cloud Library (http://pointclouds.org/) I created these external projects: VTK - git, cmake, make; VTK_DIR FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR Slicer4 has many more. Should we start collecting sample ExternalProject_Add files for external projects? We have talked about doing this too (I have Eigen, Boost, GTest and others for example). The standard CMake based projects hardly seem worth it, but it depends on what you want to do with them I suppose. For the work we are doing in chemistry we have been working on an experimental superbuild that uses a common prefix in the build tree to install to, and then all we need pass in is CMAKE_PREFIX_PATH - this can make the logic significantly easier for dependent CMake projects as it will always search within the prefix first. The Qt external project was pretty tricky too, and we are using that in several places along with smaller libraries like libxml2. Marcus -- Unpaid intern in BillsBasement at noware dot com -- 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] ExternalProject_Add examples
On 17/03/2012 22.11, Marcus D. Hanwell wrote: On Sat, Mar 17, 2012 at 5:03 PM, Bill Lorensenbill.loren...@gmail.com wrote: Folks, I've recently created a number of super builds using CMake's External Project mechanism. Each external project requires some sort of download, configuration, build and possibly install. The CMake defines needed to correctly access the results of the external project vary significantly. The trickiest part is find the proper download, configuration and CMake defines. For example, for the Point Cloud Library (http://pointclouds.org/) I created these external projects: VTK - git, cmake, make; VTK_DIR FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR Slicer4 has many more. Should we start collecting sample ExternalProject_Add files for external projects? We have talked about doing this too (I have Eigen, Boost, GTest and others for example). The standard CMake based projects hardly seem worth it, but it depends on what you want to do with them I suppose. For the work we are doing in chemistry we have been working on an experimental superbuild that uses a common prefix in the build tree to install to, and then all we need pass in is CMAKE_PREFIX_PATH - this can make the logic significantly easier for dependent CMake projects as it will always search within the prefix first. I did something similar, trying to collet all the build of stuff that I had to do in a single place powered by cmake Used CMAKE_PREFIX_PATH and a single source place where all the builds download and expand you can have a look at https://hpc-forge.cineca.it/svn/CmakeBuilds/lib/ It's just for my use only, so really dirty and not properly checked, I' m also looking for good starting point for common stuff like Qt, boost and others (I' tried to collect in the folder Packages the tricky part of building the components,) I' ve tried to define a dependency graph but it' still messy anyway I would really appreciate a place where to share good recipies for CMake building packeges Thanks Luigi The Qt external project was pretty tricky too, and we are using that in several places along with smaller libraries like libxml2. Marcus -- 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 -- Luigi Calori SuperComputing Applications and Innovation Department CINECA - via Magnanelli, 6/3, 40033 Casalecchio di Reno (Bologna) - ITALY Tel: +39 051 6171509 Fax: +39 051 6132198 hpc.cineca.it -- 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.7-3188-g61e7161
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 61e71612d6e39d3366a0a08ae0fd0da82a000339 (commit) via 60bec54ef644e5c85578ec4a9b24dd2b2cb11e2b (commit) via 9077adfc528957a929b19f0375752a46ec74ceb9 (commit) from 5a3413f8c7ad7995e44b8c306c00cba57902d62c (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=61e71612d6e39d3366a0a08ae0fd0da82a000339 commit 61e71612d6e39d3366a0a08ae0fd0da82a000339 Merge: 5a3413f 60bec54 Author: Peter Collingbourne pe...@pcc.me.uk AuthorDate: Sat Mar 17 19:24:46 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Sat Mar 17 19:24:46 2012 -0400 Merge topic 'ninja-generator' into next 60bec54 Ninja: shell escape $(CMAKE_SOURCE_DIR) and $(CMAKE_BINARY_DIR) 9077adf Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60bec54ef644e5c85578ec4a9b24dd2b2cb11e2b commit 60bec54ef644e5c85578ec4a9b24dd2b2cb11e2b Author: Peter Collingbourne pe...@pcc.me.uk AuthorDate: Sat Mar 17 20:55:09 2012 + Commit: Peter Collingbourne pe...@pcc.me.uk CommitDate: Sat Mar 17 23:16:40 2012 + Ninja: shell escape $(CMAKE_SOURCE_DIR) and $(CMAKE_BINARY_DIR) diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index 8eeca77..9c2fd13 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -78,10 +78,18 @@ void cmNinjaUtilityTargetGenerator::Generate() // TODO: fix problematic global targets. For now, search and replace the // makefile vars. -cmSystemTools::ReplaceString(command, $(CMAKE_SOURCE_DIR), - this-GetTarget()-GetMakefile()-GetHomeDirectory()); -cmSystemTools::ReplaceString(command, $(CMAKE_BINARY_DIR), - this-GetTarget()-GetMakefile()-GetHomeOutputDirectory()); +cmSystemTools::ReplaceString( + command, + $(CMAKE_SOURCE_DIR), + this-GetLocalGenerator()-ConvertToOutputFormat( +this-GetTarget()-GetMakefile()-GetHomeDirectory(), +cmLocalGenerator::SHELL).c_str()); +cmSystemTools::ReplaceString( + command, + $(CMAKE_BINARY_DIR), + this-GetLocalGenerator()-ConvertToOutputFormat( +this-GetTarget()-GetMakefile()-GetHomeOutputDirectory(), +cmLocalGenerator::SHELL).c_str()); cmSystemTools::ReplaceString(command, $(ARGS), ); if (command.find('$') != std::string::npos) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9077adfc528957a929b19f0375752a46ec74ceb9 commit 9077adfc528957a929b19f0375752a46ec74ceb9 Author: Peter Collingbourne pe...@pcc.me.uk AuthorDate: Sat Mar 17 20:49:36 2012 + Commit: Peter Collingbourne pe...@pcc.me.uk CommitDate: Sat Mar 17 23:16:40 2012 + Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index b9f997d..9acbc67 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -475,6 +475,17 @@ cmNinjaTargetGenerator emptyDeps, orderOnlyDeps, vars); + + if(const char* objectOutputs = source-GetProperty(OBJECT_OUTPUTS)) { +std::vectorstd::string outputList; +cmSystemTools::ExpandListArgument(objectOutputs, outputList); +std::transform(outputList.begin(), outputList.end(), outputList.begin(), + MapToNinjaPath()); +cmGlobalNinjaGenerator::WritePhonyBuild(this-GetBuildFileStream(), +Additional output files., +outputList, +outputs); + } } // diff --git a/Tests/PrecompiledHeader/CMakeLists.txt b/Tests/PrecompiledHeader/CMakeLists.txt index d423cae..3374e32 100644 --- a/Tests/PrecompiledHeader/CMakeLists.txt +++ b/Tests/PrecompiledHeader/CMakeLists.txt @@ -47,7 +47,8 @@ SET_SOURCE_FILES_PROPERTIES(foo_precompile.c PROPERTIES # Setup dependencies for precompiled header creation and use. The VS # IDE takes care of this automatically. -IF(${CMAKE_GENERATOR} MATCHES Makefile) +IF(${CMAKE_GENERATOR} MATCHES Makefile OR + ${CMAKE_GENERATOR} MATCHES Ninja) # This source file creates the precompiled header as a side-effect. SET_SOURCE_FILES_PROPERTIES(foo_precompile.c PROPERTIES OBJECT_OUTPUTS