[cmake-developers] [CMake 0015158]: MemCheck: Valgrind with multiple supressions files
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=15158 == Reported By:trsystran Assigned To: == Project:CMake Issue ID: 15158 Category: CTest Reproducibility:N/A Severity: feature Priority: normal Status: new == Date Submitted: 2014-09-16 09:52 EDT Last Modified: 2014-09-16 09:52 EDT == Summary:MemCheck: Valgrind with multiple supressions files Description: Currently CMake only accepts one valgrind suppressions file using the CTEST_MEMORYCHECK_SUPPRESSIONS_FILE variable. From Valgrind man You may use up to 100 extra suppression files.. It would be useful to be able to set a list of suppression files instead of just one. Currently I have to generate a new suppressions files by concatenating multiple files into one, and feed this to ctest. == Issue History Date ModifiedUsername FieldChange == 2014-09-16 09:52 trsystran New Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] vs-nsight-tegra-generator topic
Hi Folks, This topic introduces support for generating VS project files for the NVIDIA Nsight Tegra Visual Studio Edition, which then builds for Android. I've merged it to 'next' for testing: Merge topic 'vs-nsight-tegra-generator' into next http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24035687 Please take a look if you are interested in Android development. Although this topic is for Nsight Tegra builds, it does add some infrastructure that could be re-used later for more Android support in other generators. Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] vs-nsight-tegra-generator topic
On 09/16/2014 10:05 AM, Brad King wrote: Please take a look if you are interested in Android development. [snip] On 09/15/2014 07:04 PM, Stephen Kelly wrote: Brad King wrote: On 09/10/2014 11:49 AM, Stephen Kelly wrote: target_link_libraries(mylib cmake::android-16) Interesting idea. These could be predefined in the Platform/Android.cmake module. However, I do not think the current ANDROID_API property will be outdated by such a design Indeed. However, validation of allowed values might be worthwhile even now. Steve, what validation should be done for ANDROID_API? Just that it is a decimal integer value? I think we will also need an ANDROID_ARCH and ANDROID_STL property. How should these be validated? Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] vs-nsight-tegra-generator topic
Brad King wrote: On 09/16/2014 10:05 AM, Brad King wrote: Please take a look if you are interested in Android development. [snip] On 09/15/2014 07:04 PM, Stephen Kelly wrote: Brad King wrote: On 09/10/2014 11:49 AM, Stephen Kelly wrote: target_link_libraries(mylib cmake::android-16) Interesting idea. These could be predefined in the Platform/Android.cmake module. However, I do not think the current ANDROID_API property will be outdated by such a design Indeed. However, validation of allowed values might be worthwhile even now. Steve, what validation should be done for ANDROID_API? Just that it is a decimal integer value? Apparently, yes: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels Are there any restrictions on how old an android API the tegra system works with? I think the SDK has changes significantly at least once during the android lifetime. Setting an upper limit on the allowed value might also make sense, may not be necessary? I think we will also need an ANDROID_ARCH and ANDROID_STL property. How should these be validated? I don't know much about the _ARCH variable. That effectively determines the particular sysroot in the NDK to use, right? If you require that the path to the NDK be known, then you can validate that the directory exists to validate it. The _STL one I would like to see be generic at least. On any machine I don't want to compile my library with libc++ and link it with my executable compiled with libstdc++. I'd also want an abstraction for specifying the - stdlib= option for clang and the 'expanded' -I and -L/-l for GCC. I think this came up several times during the compile-features http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5813 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/9729 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6726/focus=7671 but it was an orthogonal feature. I guess an interface of CMAKE_{,CXX_STDLIB} variable/property could pass standard values (libc++ and libstdc++) to the -stdlib option of clang and the user could define variables like CMAKE_CXX_STDLIB_COMPILE|LINK_OPTIONS_foo such as CMAKE_CXX_STDLIB_COMPILE_OPTIONS_stlport CMAKE_CXX_STDLIB_LINK_OPTIONS_stlport in a toolchain file to make it possible to use another stl, or for use with GNU. However, I suspect with your Tegra system one only has to specify the stl and you're going to want to solve only that problem with a ANDROID_STL property, right :)? Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0015159]: MemCheck CDash: timeout reported as failed instead of timeout
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=15159 == Reported By:trsystran Assigned To: == Project:CMake Issue ID: 15159 Category: CTest Reproducibility:always Severity: feature Priority: normal Status: new == Date Submitted: 2014-09-16 10:47 EDT Last Modified: 2014-09-16 10:47 EDT == Summary:MemCheck CDash: timeout reported as failed instead of timeout Description: When running a MemCheck in CTest, some tests fail because of timeout limits. In such case the information is available in the ctest stdout/err: 240/1445 MemCheck http://www.cmake.org/Bug/view.php?id=146: some_test ***Timeout 65.92 sec But it is not reported in the DynamicAnalysis.xml sent to CDash: Test Status=failed Namesome_test/Name Pathxxx/Path FullNamesome_test/FullName FullCommandLine/usr/bin/valgrind xxx/FullCommandLine Results /Results Logblah/Log /Test This information would be useful in CDash, like it's already done for normal tests. In CDash we only get failed status and we don't know why it has failed. == Issue History Date ModifiedUsername FieldChange == 2014-09-16 10:47 trsystran New Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Exporting a library shared and static
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I have a project that consists of a library and an application that are developed as two separated projects (different repos, separate cmake setups, etc.). Let's call them lib and app. The app exports itself to ~/.cmake/ and creates a appTargets.cmake, the app simply does find_package(lib). For several reasons, we must be able to build the app dynamically and statically. Our current approach is based on a flag STATICLIB_SWITCH that exists in the lib and in the app. Based on it's value, we build the library as .a or .so and link the app statically or dynamically. However, there are a few drawbacks: The value of the switch has to be consistent for the lib and the app and we didn't quite manage to correctly search for all libs: The linker command line is cluttered with lots of -rdynamic etc, which also occasionally breaks down and is very hard to debug when it does. So I spent some time on this and it seems that this is meant to be done differently. My new setup looks like this: The lib has two targets, for a shared object and for a static object, that are always built and exported. The app includes whatever it needs. This would remove the switch from the lib, which would be very nice. However, it seems that the app always includes the shared target, no matter what I do. Also, I have not been able to provide the target with the list of libraries necessary: I simply collect all libraries in a variable that are found by other find_package calls, but find_package will only find either the shared or the static versions... So basically my question is: How is this supposed to be done? (I somehow get the feeling, that both attempts are wrong :-) ) How can I use a library in another application and switch (fairly) easily between static and dynamic linking? Thanks for any hints on this! Gereon -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBAgAGBQJUGE65AAoJEIQ2nMX673HfLL0H/RcCrNRKdLVQaaIfJnICKCiw 5RaE6t8PXxCjD+XPBgQOmdDVOKXAy/f/t7gV1T6yRDvvbgbUyQnTpRoWUL0Qjlos J+qob54Lcm90DTglNkpnImbfdBRv3XPDS34AGA20kgkmSDVsTdhg1fjDf5Cb10f7 UlGySIQqiIWSuygiq5uawswxqQuh6VuL98/vY+vxCkjNbLnWzuvCAT5x692qaFH3 M7JI4P/SWii637z/7sMh9e+mHue6MBynrcff2PUhDNCyIiG9MiQbZfzsvcQoKYSO jDZLTvSvmy8FUPXPH+15Z8MyfjqjksErLX4UbOBFeEQ5FJwtA+G9TRYHzlDS9vc= =AfDK -END PGP SIGNATURE- -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0015160]: Different timeout for test and memcheck
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=15160 == Reported By:trsystran Assigned To: == Project:CMake Issue ID: 15160 Category: CTest Reproducibility:N/A Severity: feature Priority: normal Status: new == Date Submitted: 2014-09-16 12:03 EDT Last Modified: 2014-09-16 12:03 EDT == Summary:Different timeout for test and memcheck Description: Currently memcheck uses the same timeout (global or test-local) as for normal ctest_test() run. This is an issue since valgrind has a slowdown factor between 5 to 100 (according to them): the normal timeouts are not relevant for memcheck runs. Possible solutions with existing code: 1/ always calibrate the test timeout for valgrind. Drawback: this value is too large for normal test runs. 2/ never use test-local timeout and only rely on global timeout: then change the CTEST_TEST_TIMEOUT before calling ctest_memcheck(). Drawback: test-local timeout are really useful so stopping using them is an issue. Possible solutions with patches: Create a new test property MEMCHECK_TIMEOUT, a new global default memcheck timeout, that only apply for memcheck runs. Default value: either their non memcheck counterpart; or use a global slowdown factor and apply it from non memcheck timeout values. == Issue History Date ModifiedUsername FieldChange == 2014-09-16 12:03 trsystran New Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
This is done by gathering LC_RPATH commands for main bundle executable and using it for @rpath lookup in dependent frameworks. To achieve this all utility functions now take path to executable rather than path to its directory. This enabled apps using @rpath to be bundled correctly, which will be necessary for upcoming Qt 5.4 that will use @rpath for all frameworks. --- Modules/BundleUtilities.cmake | 171 + Modules/GetPrerequisites.cmake | 51 ++-- 2 files changed, 131 insertions(+), 91 deletions(-) diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 7e2b173..817ac78 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -19,6 +19,7 @@ #get_bundle_and_executable #get_bundle_all_executables #get_item_key +#get_item_rpaths #clear_bundle_keys #set_bundle_key_values #get_bundle_keys @@ -75,7 +76,7 @@ # # :: # -# GET_DOTAPP_DIR(exe dotapp_dir_var) +# GET_DOTAPP_DIR(executable dotapp_dir_var) # # Returns the nearest parent dir whose name ends with .app given the # full path to an executable. If there is no such parent dir, then @@ -123,7 +124,7 @@ # # :: # -# SET_BUNDLE_KEY_VALUES(keys_var context item exepath dirs +# SET_BUNDLE_KEY_VALUES(keys_var context item executable dirs # copyflag) # # Add a key to the list (if necessary) for the given item. If added, @@ -163,7 +164,7 @@ # # :: # -# FIXUP_BUNDLE_ITEM(resolved_embedded_item exepath dirs) +# FIXUP_BUNDLE_ITEM(resolved_embedded_item executable dirs) # # Get the direct/non-system prerequisites of the resolved embedded item. # For each prerequisite, change the way it is referenced to the value of @@ -189,11 +190,11 @@ # # :: # -# VERIFY_BUNDLE_PREREQUISITES(bundle result_var info_var) +# VERIFY_BUNDLE_PREREQUISITES(bundle result_var info_var [executable]) # # Verifies that the sum of all prerequisites of all files inside the -# bundle are contained within the bundle or are system libraries, -# presumed to exist everywhere. +# bundle with given optional main executable location are contained within the +# bundle or are system libraries, presumed to exist everywhere. # # :: # @@ -285,8 +286,8 @@ function(get_bundle_main_executable bundle result_var) endfunction() -function(get_dotapp_dir exe dotapp_dir_var) - set(s ${exe}) +function(get_dotapp_dir executable dotapp_dir_var) + set(s ${executable}) if(s MATCHES /.*\\.app/) # If there is a .app parent directory, @@ -407,6 +408,29 @@ function(get_bundle_all_executables bundle exes_var) endfunction() +function(get_item_rpaths item rpaths_var) + if(APPLE) +find_program(otool_cmd otool) +mark_as_advanced(otool_cmd) + endif() + + if(otool_cmd) +execute_process( + COMMAND ${otool_cmd} -l ${item} + OUTPUT_VARIABLE load_cmds_ov + ) +string(REGEX REPLACE [^\n]+cmd LC_RPATH\n[^\n]+\n[^\n]+path ([^\n]+) \\(offset[^\n]+\n rpath \\1\n load_cmds_ov ${load_cmds_ov}) +string(REGEX MATCHALL rpath [^\n]+ load_cmds_ov ${load_cmds_ov}) +string(REGEX REPLACE rpath load_cmds_ov ${load_cmds_ov}) +if(load_cmds_ov) + gp_append_unique(${rpaths_var} ${load_cmds_ov}) +endif() + endif() + + set(${rpaths_var} ${${rpaths_var}} PARENT_SCOPE) +endfunction() + + function(get_item_key item key_var) get_filename_component(item_name ${item} NAME) if(WIN32) @@ -425,12 +449,13 @@ function(clear_bundle_keys keys_var) set(${key}_EMBEDDED_ITEM PARENT_SCOPE) set(${key}_RESOLVED_EMBEDDED_ITEM PARENT_SCOPE) set(${key}_COPYFLAG PARENT_SCOPE) +set(${key}_RPATHS PARENT_SCOPE) endforeach() set(${keys_var} PARENT_SCOPE) endfunction() -function(set_bundle_key_values keys_var context item exepath dirs copyflag) +function(set_bundle_key_values keys_var context item executable dirs copyflag) get_filename_component(item_name ${item} NAME) get_item_key(${item} key) @@ -440,10 +465,17 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag) list(LENGTH ${keys_var} length_after) if(NOT length_before EQUAL length_after) -gp_resolve_item(${context} ${item} ${exepath} ${dirs} resolved_item) +# Always use the exepath of the main bundle executable for @executable_path +# replacements: +# +get_filename_component(exepath ${executable} PATH) + +gp_resolve_item(${context} ${item} ${executable} ${dirs} resolved_item) gp_item_default_embedded_path(${item} default_embedded_path) +get_item_rpaths(${resolved_item} rpaths) + if(item MATCHES [^/]+\\.framework/) # For frameworks, construct the name under the embedded path from the # opening ${item_name}.framework/ to the closing /${item_name}: @@ -479,6 +511,7 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag) set(${key}_EMBEDDED_ITEM ${embedded_item} PARENT_SCOPE)
Re: [cmake-developers] OS X packaging updates
I had to revert again because it causes the Qt4Deploy to fail. The topic changes the signature of gp_file_type. User projects could be calling that, so we can't change it. In this case it is the Modules/DeployQt4.cmake file that was calling it. Thanks for spotting that. I've send updated 3/6 patch that now takes executable as an optional argument so we don't change any existing function signatures. --Adam -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
This patch has problems. You are calling BundleUtilities::get_item_key() from GetPrerequisites::gp_resolve_item(). There are users, including myself, which sometimes use GetPrerequisites.cmake but don't use BundleUtilities.cmake. So you cannot call BundleUtilities functions from GetPrerequisites. You also modified the signature of the gp_resolve_item_override() function which is defined by some users. There are a few others which were modified as well. Instead of taking an exepath, your patch changes them to take a executable. Instead, can you extract rpaths for a binary in BundleUtilities and pass that into gp_resolve_item via the existing dirs argument? Clint On Tuesday, September 16, 2014 06:32:20 PM Adam Strzelecki wrote: This is done by gathering LC_RPATH commands for main bundle executable and using it for @rpath lookup in dependent frameworks. To achieve this all utility functions now take path to executable rather than path to its directory. This enabled apps using @rpath to be bundled correctly, which will be necessary for upcoming Qt 5.4 that will use @rpath for all frameworks. --- Modules/BundleUtilities.cmake | 171 + Modules/GetPrerequisites.cmake | 51 ++-- 2 files changed, 131 insertions(+), 91 deletions(-) diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 7e2b173..817ac78 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -19,6 +19,7 @@ #get_bundle_and_executable #get_bundle_all_executables #get_item_key +#get_item_rpaths #clear_bundle_keys #set_bundle_key_values #get_bundle_keys @@ -75,7 +76,7 @@ # # :: # -# GET_DOTAPP_DIR(exe dotapp_dir_var) +# GET_DOTAPP_DIR(executable dotapp_dir_var) # # Returns the nearest parent dir whose name ends with .app given the # full path to an executable. If there is no such parent dir, then @@ -123,7 +124,7 @@ # # :: # -# SET_BUNDLE_KEY_VALUES(keys_var context item exepath dirs +# SET_BUNDLE_KEY_VALUES(keys_var context item executable dirs # copyflag) # # Add a key to the list (if necessary) for the given item. If added, @@ -163,7 +164,7 @@ # # :: # -# FIXUP_BUNDLE_ITEM(resolved_embedded_item exepath dirs) +# FIXUP_BUNDLE_ITEM(resolved_embedded_item executable dirs) # # Get the direct/non-system prerequisites of the resolved embedded item. # For each prerequisite, change the way it is referenced to the value of @@ -189,11 +190,11 @@ # # :: # -# VERIFY_BUNDLE_PREREQUISITES(bundle result_var info_var) +# VERIFY_BUNDLE_PREREQUISITES(bundle result_var info_var [executable]) # # Verifies that the sum of all prerequisites of all files inside the -# bundle are contained within the bundle or are system libraries, -# presumed to exist everywhere. +# bundle with given optional main executable location are contained within the +# bundle or are system libraries, presumed to exist everywhere. # # :: # @@ -285,8 +286,8 @@ function(get_bundle_main_executable bundle result_var) endfunction() -function(get_dotapp_dir exe dotapp_dir_var) - set(s ${exe}) +function(get_dotapp_dir executable dotapp_dir_var) + set(s ${executable}) if(s MATCHES /.*\\.app/) # If there is a .app parent directory, @@ -407,6 +408,29 @@ function(get_bundle_all_executables bundle exes_var) endfunction() +function(get_item_rpaths item rpaths_var) + if(APPLE) +find_program(otool_cmd otool) +mark_as_advanced(otool_cmd) + endif() + + if(otool_cmd) +execute_process( + COMMAND ${otool_cmd} -l ${item} + OUTPUT_VARIABLE load_cmds_ov + ) +string(REGEX REPLACE [^\n]+cmd LC_RPATH\n[^\n]+\n[^\n]+path ([^\n]+) \\(offset[^\n]+\n rpath \\1\n load_cmds_ov ${load_cmds_ov}) + string(REGEX MATCHALL rpath [^\n]+ load_cmds_ov ${load_cmds_ov}) + string(REGEX REPLACE rpath load_cmds_ov ${load_cmds_ov}) + if(load_cmds_ov) + gp_append_unique(${rpaths_var} ${load_cmds_ov}) +endif() + endif() + + set(${rpaths_var} ${${rpaths_var}} PARENT_SCOPE) +endfunction() + + function(get_item_key item key_var) get_filename_component(item_name ${item} NAME) if(WIN32) @@ -425,12 +449,13 @@ function(clear_bundle_keys keys_var) set(${key}_EMBEDDED_ITEM PARENT_SCOPE) set(${key}_RESOLVED_EMBEDDED_ITEM PARENT_SCOPE) set(${key}_COPYFLAG PARENT_SCOPE) +set(${key}_RPATHS PARENT_SCOPE) endforeach() set(${keys_var} PARENT_SCOPE) endfunction() -function(set_bundle_key_values keys_var context item exepath dirs copyflag) +function(set_bundle_key_values keys_var context item executable dirs copyflag) get_filename_component(item_name ${item} NAME) get_item_key(${item} key) @@ -440,10 +465,17 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag) list(LENGTH ${keys_var}
[cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
This is done by gathering LC_RPATH commands for main bundle executable and using it for @rpath lookup in dependent frameworks. To achieve this all utility functions now take path to executable rather than path to its directory. This enabled apps using @rpath to be bundled correctly, which will be necessary for upcoming Qt 5.4 that will use @rpath for all frameworks. --- Modules/BundleUtilities.cmake | 174 + Modules/GetPrerequisites.cmake | 55 +++-- 2 files changed, 137 insertions(+), 92 deletions(-) diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 7e2b173..ab26157 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -19,6 +19,7 @@ #get_bundle_and_executable #get_bundle_all_executables #get_item_key +#get_item_rpaths #clear_bundle_keys #set_bundle_key_values #get_bundle_keys @@ -75,7 +76,7 @@ # # :: # -# GET_DOTAPP_DIR(exe dotapp_dir_var) +# GET_DOTAPP_DIR(executable dotapp_dir_var) # # Returns the nearest parent dir whose name ends with .app given the # full path to an executable. If there is no such parent dir, then @@ -123,7 +124,7 @@ # # :: # -# SET_BUNDLE_KEY_VALUES(keys_var context item exepath dirs +# SET_BUNDLE_KEY_VALUES(keys_var context item executable dirs # copyflag) # # Add a key to the list (if necessary) for the given item. If added, @@ -163,7 +164,7 @@ # # :: # -# FIXUP_BUNDLE_ITEM(resolved_embedded_item exepath dirs) +# FIXUP_BUNDLE_ITEM(resolved_embedded_item executable dirs) # # Get the direct/non-system prerequisites of the resolved embedded item. # For each prerequisite, change the way it is referenced to the value of @@ -189,11 +190,11 @@ # # :: # -# VERIFY_BUNDLE_PREREQUISITES(bundle result_var info_var) +# VERIFY_BUNDLE_PREREQUISITES(bundle result_var info_var [executable]) # # Verifies that the sum of all prerequisites of all files inside the -# bundle are contained within the bundle or are system libraries, -# presumed to exist everywhere. +# bundle with given optional main executable location are contained within the +# bundle or are system libraries, presumed to exist everywhere. # # :: # @@ -285,8 +286,8 @@ function(get_bundle_main_executable bundle result_var) endfunction() -function(get_dotapp_dir exe dotapp_dir_var) - set(s ${exe}) +function(get_dotapp_dir executable dotapp_dir_var) + set(s ${executable}) if(s MATCHES /.*\\.app/) # If there is a .app parent directory, @@ -407,6 +408,29 @@ function(get_bundle_all_executables bundle exes_var) endfunction() +function(get_item_rpaths item rpaths_var) + if(APPLE) +find_program(otool_cmd otool) +mark_as_advanced(otool_cmd) + endif() + + if(otool_cmd) +execute_process( + COMMAND ${otool_cmd} -l ${item} + OUTPUT_VARIABLE load_cmds_ov + ) +string(REGEX REPLACE [^\n]+cmd LC_RPATH\n[^\n]+\n[^\n]+path ([^\n]+) \\(offset[^\n]+\n rpath \\1\n load_cmds_ov ${load_cmds_ov}) +string(REGEX MATCHALL rpath [^\n]+ load_cmds_ov ${load_cmds_ov}) +string(REGEX REPLACE rpath load_cmds_ov ${load_cmds_ov}) +if(load_cmds_ov) + gp_append_unique(${rpaths_var} ${load_cmds_ov}) +endif() + endif() + + set(${rpaths_var} ${${rpaths_var}} PARENT_SCOPE) +endfunction() + + function(get_item_key item key_var) get_filename_component(item_name ${item} NAME) if(WIN32) @@ -425,12 +449,13 @@ function(clear_bundle_keys keys_var) set(${key}_EMBEDDED_ITEM PARENT_SCOPE) set(${key}_RESOLVED_EMBEDDED_ITEM PARENT_SCOPE) set(${key}_COPYFLAG PARENT_SCOPE) +set(${key}_RPATHS PARENT_SCOPE) endforeach() set(${keys_var} PARENT_SCOPE) endfunction() -function(set_bundle_key_values keys_var context item exepath dirs copyflag) +function(set_bundle_key_values keys_var context item executable dirs copyflag) get_filename_component(item_name ${item} NAME) get_item_key(${item} key) @@ -440,10 +465,19 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag) list(LENGTH ${keys_var} length_after) if(NOT length_before EQUAL length_after) -gp_resolve_item(${context} ${item} ${exepath} ${dirs} resolved_item) +# Always use the exepath of the main bundle executable for @executable_path +# replacements: +# +get_filename_component(exepath ${executable} PATH) + +get_item_key(${executable} executable_key) + +gp_resolve_item(${context} ${item} ${executable} ${dirs} resolved_item ${${executable_key}_RPATHS}) gp_item_default_embedded_path(${item} default_embedded_path) +get_item_rpaths(${resolved_item} rpaths) + if(item MATCHES [^/]+\\.framework/) # For frameworks, construct the name under the embedded path from the # opening ${item_name}.framework/ to the closing /${item_name}: @@ -479,6 +513,7 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
[cmake-developers] [PATCH 4/6] Process executables first when scanning bundle
This makes rpaths populated (if any), so libraries containing @rpath will be resolved properly. --- Modules/BundleUtilities.cmake | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index ab26157..ea2d924 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -529,21 +529,6 @@ function(get_bundle_keys app libs dirs keys_var) # get_bundle_all_executables(${bundle} file_list) -# For each extra lib, accumulate a key as well and then also accumulate -# any of its prerequisites. (Extra libs are typically dynamically loaded -# plugins: libraries that are prerequisites for full runtime functionality -# but that do not show up in otool -L output...) -# -foreach(lib ${libs}) - set_bundle_key_values(${keys_var} ${lib} ${lib} ${executable} ${dirs} 0) - - set(prereqs ) - get_prerequisites(${lib} prereqs 1 1 ${executable} ${dirs}) - foreach(pr ${prereqs}) -set_bundle_key_values(${keys_var} ${lib} ${pr} ${executable} ${dirs} 1) - endforeach() -endforeach() - # For each executable found in the bundle, accumulate keys as we go. # The list of keys should be complete when all prerequisites of all # binaries in the bundle have been analyzed. @@ -564,6 +549,21 @@ function(get_bundle_keys app libs dirs keys_var) endforeach() endforeach() +# For each extra lib, accumulate a key as well and then also accumulate +# any of its prerequisites. (Extra libs are typically dynamically loaded +# plugins: libraries that are prerequisites for full runtime functionality +# but that do not show up in otool -L output...) +# +foreach(lib ${libs}) + set_bundle_key_values(${keys_var} ${lib} ${lib} ${executable} ${dirs} 0) + + set(prereqs ) + get_prerequisites(${lib} prereqs 1 1 ${executable} ${dirs} ${${executable_key}_RPATHS}) + foreach(pr ${prereqs}) +set_bundle_key_values(${keys_var} ${lib} ${pr} ${executable} ${dirs} 1) + endforeach() +endforeach() + # Propagate values to caller's scope: # set(${keys_var} ${${keys_var}} PARENT_SCOPE) -- 1.9.3 (Apple Git-50) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
Instead, can you extract rpaths for a binary in BundleUtilities and pass that into gp_resolve_item via the existing dirs argument? Okay, fixed this in the new 3/6 + 4/6 patches, attached to previous patch post. FYI I cannot use existing dirs arguments because other replacements search paths shouldn't look into rpath, only @rpath replacements. So instead I added extra optional rpaths argument to all GetPrerequisites functions that somewhere call gp_resolve_item so need to carry rpaths. WDYT? --Adam -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
On Tuesday, September 16, 2014 08:48:31 PM Adam Strzelecki wrote: Instead, can you extract rpaths for a binary in BundleUtilities and pass that into gp_resolve_item via the existing dirs argument? Okay, fixed this in the new 3/6 + 4/6 patches, attached to previous patch post. FYI I cannot use existing dirs arguments because other replacements search paths shouldn't look into rpath, only @rpath replacements. Sure, but the caller can also check for @rpath and in that case add the rpaths to the existing dirs argument. Yes, there are other find_file() searches in there, that could potentially mess up if the actual filename had @rpath in it. But I would also argue that the general fallback find_file(ri ${item} ${exepath} ${dirs} /usr/lib) can undesirably be affected by other variables such as CMAKE_INCLUDE_PATH. So instead I added extra optional rpaths argument to all GetPrerequisites functions that somewhere call gp_resolve_item so need to carry rpaths. WDYT? --Adam Can you explain the exepath to executable change in the function signatures? I have the impression you changed the signature of several functions to accept /path/to/executable instead of /path/to/ No? These functions are called by other codes and we can't just change the meaning of the arguments. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
No? These functions are called by other codes and we can't just change the meaning of the arguments. You are completely right. I am changing all stuff back, once I pass rpath as optional argument we can have exepath everywhere. Thanks for your feedback. Regards, -- Adam -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
I have sent [PATCH 3/5] Resolve replace @rpath placeholders which replaces previous 3/6 and obsoletes 4/6. Since it is getting messy like checking fixing maybe stage account and topic branch would be more accurate. --Adam -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
On Tuesday, September 16, 2014 10:53:14 PM Adam Strzelecki wrote: I have sent [PATCH 3/5] Resolve replace @rpath placeholders which replaces previous 3/6 and obsoletes 4/6. Since it is getting messy like checking fixing maybe stage account and topic branch would be more accurate. --Adam Yes, it would be easier to review on stage or on github. Thanks. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
Yes, it would be easier to review on stage or on github. Thanks. Here it is: https://github.com/nanoant/CMake/commits/fix-bundle-rpaths I would love to get stage access though ;) Cheers, -- Adam -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] vs-nsight-tegra-generator topic
On Tue, Sep 16, 2014 at 4:05 PM, Brad King brad.k...@kitware.com wrote: Hi Folks, This topic introduces support for generating VS project files for the NVIDIA Nsight Tegra Visual Studio Edition, which then builds for Android. I've merged it to 'next' for testing: Hi Brad, I am really excited to see Nsight Tegra VS support being added to CMake, it will certainly help me (and others for sure) save so much some configuring manually my Android projects. Actually, few days ago I gave the patches you sent to the developer list back in July [1] a try. I had to make some dirty tweaks into the CMake code to make it build an Android application (java + native). So, today I tried the next branch with the new NSight stuff. It seems more accomplished than [1], but still doesn't work for me out of the box: I get an error when trying to link to an android system library (like GLESv1_CM , android, etc..). To reproduce the problem : target_link_libraries(myAndroidProject GLESv1_CM) I get this error when trying to build my Android application : 1 (...)/arm-linux-androideabi/bin/ld.bfd.exe: cannot find -l-lGLESv1_CM Please note the double -l in front of the library name. I took a look to the VS project properties, and found that in LinkerInput tab, in the Additional Dependencies the library name is prefixed by '-l' : -lGLESv1_CM Obviously, removing the leading '-l' in the VS project property window solves the problem (until the project gets generated again by CMake). Minor considerations: By comparing the generated vcxproj files with the manually configured ones I noticed these minor differences (I can't tell whether these have any consequences on the build) * Java files are declared using JCompile xml tags instead of None tags (using cmake) * some special files are declared using AndroidBuild xml tags (AndroidManifest.xml, build.xml, project.properties, proguard.cfg, res\values\strings.xml ...) My 2 cents, keep up the good work. Mourad [1] http://public.kitware.com/pipermail/cmake-developers/2014-July/010811.html -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 3/6] Resolve replace @rpath placeholders
On Tuesday, September 16, 2014 11:01:33 PM Adam Strzelecki wrote: Yes, it would be easier to review on stage or on github. Thanks. Here it is: https://github.com/nanoant/CMake/commits/fix-bundle-rpaths I would love to get stage access though ;) Cheers, What is the new optional parameter to gp_file_type() used for? I don't see any code in your branch calling that function with the new parameter. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0015161]: FindProtobuf: Generated source not regenerated on library update
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=15161 == Reported By:hansmi Assigned To: == Project:CMake Issue ID: 15161 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2014-09-17 00:20 EDT Last Modified: 2014-09-17 00:20 EDT == Summary:FindProtobuf: Generated source not regenerated on library update Description: After updating from Protocol Buffers 2.5.0 to 2.6.0 compilation of the generated source failed: “This file was generated by an older version of protoc which is incompatible with your Protocol Buffer headers. Please regenerate this file with a newer version of protoc.”. Turns out the source and headers generated by way of FindProtobuf.cmake:PROTOBUF_GENERATE_CPP aren't updated. Adding a dependency on the compiler executable fixes this issue. Proposed patch: $ diff -u FindProtobuf.cmake.orig FindProtobuf.cmake --- FindProtobuf.cmake.orig 2014-09-17 06:11:10.282377650 +0200 +++ FindProtobuf.cmake 2014-09-17 06:11:10.282377650 +0200 @@ -118,7 +118,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} - DEPENDS ${ABS_FIL} + DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE} COMMENT Running C++ protocol buffer compiler on ${FIL} VERBATIM ) endforeach() Steps to Reproduce: 1. Install Protocol Buffers 2.5.0 2. Generate source and header using 2.5.0's protoc binary 3. Install Protocol Buffers 2.6.0 4. Re-build source Additional Information: Workaround in case someone's affected by this and can't modify FindProtobuf.cmake in their environment: foreach(i ${PROTO_SRCS} ${PROTO_HDRS}) add_custom_command(OUTPUT ${i} DEPENDS ${PROTOBUF_PROTOC_EXECUTABLE} APPEND) endforeach() == Issue History Date ModifiedUsername FieldChange == 2014-09-17 00:20 hansmi New Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [CMake] how to force assign sequence in multi-thread in cmake
Hi. I've never worked with ExternalProject myself, so I can't comment with certainty, but from what I understand, the correct way of using ExternalProject is to add your own project as an ExternalProject as well. Basically, the toplevel CMakeList becomes a superbuild which *only* does ExternalProject_Add() calls and does not add any libraries/executables directly. After you build the superbuild once to get all the dependencies correct, you switch to the external project of your own code and work with that normally. Petr On Mon, Sep 15, 2014 at 4:13 PM, Yu Jing yujing5...@gmail.com wrote: I had asked in http://stackoverflow.com/questions/25841602 , someone told me maybe here is a better place to ask. I am writing a project base on crfpp , a external project. I use cmake to integerate this project as follow . firstly , I add a extenal project like this: EXTERNALPROJECT_ADD( CRFPP_EX_PROJ GIT_REPOSITORY g...@github.com:yujing5b5d/crfpp.git PREFIX ${CMAKE_CURRENT_BINARY_DIR} CONFIGURE_COMMAND ./configure BUILD_COMMAND make -j8 BUILD_IN_SOURCE 1 INSTALL_COMMAND cp .libs/libcrfpp.a ${PROJECT_BINARY_DIR}/lib cp crfpp.h ${PROJECT_BINARY_DIR}/include ) this will generate some .a file and copy a header file crfpp.h to folder ${PROJECT_BINARY_DIR}/include , which is included in my project. and then , use the ${PROJECT_BINARY_DIR}/include as include path as follow . INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include) finally , when I compile the main project , code like this : ADD_EXECUTABLE(cmake_sample main.cc) ADD_DEPENDENCIES(cmake_sample CRFPP_EX_PROJ) TARGET_LINK_LIBRARIES(cmake_sample crfpp) In general , if I just build a build folder, compile like this : cmake .. make It may works fine, compile the external project first , and copy the header file to desired place , and then continue compile main.cc in my project . But if I use compile command as multi-thread like this : cmake .. make -j8 It will not works because my main.cc and the external project are processed at same time, so it report a error like this : /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found#include crfpp.h // crfpp ^1 error generated. This crfpp.h will generated after CRFPP_EX_PROJ , but in multi-thread environment , the sequence is quite different . My Question is : Is it possible that force let my project compile after these external projects all finished . BE CAREFUL , I'm not sure is this the problem of my use of ADD_DEPENDENCIES , I also wrote ADD_DEPENDENCIES(cmake_sample CRFPP_EX_PROJ) but it seems not works ? Thanks for any help. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Code Coverage Bullseye
Hi, I am trying to configure the code coverage using the ctest script. I took help from : http://www.cmake.org/Wiki/CTest/Coverage My script looks like this: *cmake_minimum_required(VERSION 3.0)set(CTEST_SOURCE_DIRECTORY /Users/rajekumar/work/test-codes/Test)set(CTEST_BINARY_DIRECTORY /Users/rajekumar/work/test-codes/Test/out/)#set(CTEST_SITE http://oak-vcs187.lab.nbttech.com http://oak-vcs187.lab.nbttech.com)set(CTEST_BUILD_NAME MacOSX)set(CTEST_CMAKE_GENERATOR Xcode)set(CTEST_BUILD_COMMAND xcodebuild)set(CTEST_COVERAGE_COMMAND /usr/bin/gcov)set(ENV{COVFILE} ${CTEST_BINARY_DIRECTORY}/CMake.cov)ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})ctest_start(Experimental)#ctest_update()set(CTEST_PROJECT_SUBPROJECTS SportTest SampleTest InterceptTest)foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})set_property(GLOBAL PROPERTY SubProject ${subproject})set_property(GLOBAL PROPERTY Label ${subproject}) ctest_configure()set(CTEST_BUILD_TARGET ${subproject}) ctest_build(APPEND)ctest_test(INCLUDE_LABEL ${subproject}) ctest_coverage()ctest_submit()endforeach()* *But after running I am getting following error:Performing coverage run covsrc with COVFILE=[/Users/rajekumar/work/test-codes/Test/out//CMake.cov]Cannot find :covsrcerror running covsrc:Error running bullseye summary. globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/CMakeFiles/ALL_BUILD.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/CMakeFiles/Continuous.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/CMakeFiles/Experimental.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/CMakeFiles/Nightly.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/CMakeFiles/NightlyMemoryCheck.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/CMakeFiles/ZERO_CHECK.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/intercepttest1/CMakeFiles/intercepttest1.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/intercepttest2/CMakeFiles/intercepttest2.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/sporttest1/CMakeFiles/sporttest1.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/sporttest2/CMakeFiles/sporttest2.dir globbing for coverage in: /Users/rajekumar/work/test-codes/Test/out/test/CMakeFiles/Sample.dir Cannot find any GCov coverage files. Cannot find any Python Trace.py coverage files.Cannot find coverage.py XML file: /Users/rajekumar/work/test-codes/Test/out/coverage.xml Cannot find foobar GTM coverage file: /Users/rajekumar/work/test-codes/Test/out/gtm_coverage.mcov Cannot find Cache coverage file: /Users/rajekumar/work/test-codes/Test/out/cache_coverage.cmcov Cannot find any coverage files. Ignoring Coverage request.* I was under the impression that I only need gcov lcov for code coverage. Is Bullseye is mandatory for code coverage using ctest ??? Is there any way to perform code coverage through ctest without using bullseye ?? Thanks. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] how to force assign sequence in multi-thread in cmake
Hello all, I do use the ExternalProject to prebuild some binaries, without the 'superproject' setup, and it does seem to work. Using the add_dependencies, I can make sure some third party libs are prebuild before I start to build my project. I have seen some issues with ExternalProject (failing to extract, or build), but they are too rare to pinpoint and create a bugreport. What exactly does not work? Is the external project not build at all, or just not in time? Regards, Micha On 09/16/2014 08:30 AM, Petr Kmoch wrote: Hi. I've never worked with ExternalProject myself, so I can't comment with certainty, but from what I understand, the correct way of using ExternalProject is to add your own project as an ExternalProject as well. Basically, the toplevel CMakeList becomes a superbuild which *only* does ExternalProject_Add() calls and does not add any libraries/executables directly. After you build the superbuild once to get all the dependencies correct, you switch to the external project of your own code and work with that normally. Petr On Mon, Sep 15, 2014 at 4:13 PM, Yu Jing yujing5...@gmail.com mailto:yujing5...@gmail.com wrote: I had asked in http://stackoverflow.com/questions/25841602 , someone told me maybe here is a better place to ask. I am writing a project base on crfpp , a external project. I use cmake to integerate this project as follow . firstly , I add a extenal project like this: |EXTERNALPROJECT_ADD( CRFPP_EX_PROJ GIT_REPOSITORY g...@github.com:yujing5b5d/crfpp.git PREFIX ${CMAKE_CURRENT_BINARY_DIR} CONFIGURE_COMMAND ./configure BUILD_COMMAND make -j8 BUILD_IN_SOURCE 1 INSTALL_COMMAND cp .libs/libcrfpp.a ${PROJECT_BINARY_DIR}/lib cp crfpp.h ${PROJECT_BINARY_DIR}/include )| this will generate some .a file and copy a header file |crfpp.h| to folder |${PROJECT_BINARY_DIR}/include| , which is included in my project. and then , use the |${PROJECT_BINARY_DIR}/include| as include path as follow . |INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include )| finally , when I compile the main project , code like this : |ADD_EXECUTABLE(cmake_sample main.cc) ADD_DEPENDENCIES(cmake_sample CRFPP_EX_PROJ) TARGET_LINK_LIBRARIES(cmake_sample crfpp)| In general , if I just build a build folder, compile like this : |cmake .. make| It may works fine, compile the external project first , and copy the header file to desired place , and then continue compile main.cc http://main.cc in my project . But if I use compile command as multi-thread like this : |cmake .. make -j8| It will not works because my main.cc http://main.cc and the external project are processed at same time, so it report a error like this : |/Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated.| This |crfpp.h| will generated after |CRFPP_EX_PROJ| , but in multi-thread environment , the sequence is quite different . My Question is : Is it possible that force let my project compile after these external projects all finished . BE CAREFUL , I'm not sure is this the problem of my use of |ADD_DEPENDENCIES| , I also wrote |ADD_DEPENDENCIES(cmake_sample CRFPP_EX_PROJ)| but it seems not works ? Thanks for any help. -- Powered by www.kitware.com http://www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake signature.asc Description: OpenPGP digital signature -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe:
Re: [CMake] how to force assign sequence in multi-thread in cmake
I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : yu:cmake_sample yu$ mkdir build yu:cmake_sample yu$ cd build/ yu:build yu$ cmake .. …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build yu:build yu$ make -j8 ### Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated. 1 error generated. make[2]: *** [src/CMakeFiles/relfiles.dir/main.cc.o] Error 1 make[2]: *** [src/CMakeFiles/cmake_sample.dir/main.cc.o] Error 1 make[1]: *** [src/CMakeFiles/relfiles.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs make[1]: *** [src/CMakeFiles/cmake_sample.dir/all] Error 2 …. BE CAREFUL OF THIS LINE : yu:build yu$ make -j8 the ExternalProject CRFPP_EX_PROJ’s result contains copy a crfpp.h header to a special path, after this process , we can use #include “crfpp.h ,and If I use make -j8 this means 8 jobs can be running at the same time, I can not constraints and let my compiler compile my main.cc after CRFPP_EX_PROJ finished. Of course , I’m not sure is this my misuse this project . On Sep 16, 2014, at 14:55, Micha Hergarden micha.hergar...@gmail.com wrote: Hello all, I do use the ExternalProject to prebuild some binaries, without the 'superproject' setup, and it does seem to work. Using the add_dependencies, I can make sure some third party libs are prebuild before I start to build my project. I have seen some issues with ExternalProject (failing to extract, or build), but they are too rare to pinpoint and create a bugreport. What exactly does not work? Is the external project not build at all, or just not in time? Regards, Micha On 09/16/2014 08:30 AM, Petr Kmoch wrote: Hi. I've never worked with ExternalProject myself, so I can't comment with certainty, but from what I understand, the correct way of using ExternalProject is to add your own project as an ExternalProject as well. Basically, the toplevel CMakeList becomes a superbuild which *only* does ExternalProject_Add() calls and does not add any libraries/executables directly. After you build the superbuild once to get all the dependencies correct, you switch to the external project of your own code and work with that normally. Petr On Mon, Sep 15, 2014 at 4:13 PM, Yu Jing yujing5...@gmail.com wrote: I had asked in http://stackoverflow.com/questions/25841602 , someone told me maybe here is a better place to ask. I am writing a project base on crfpp , a external project. I use cmake to integerate this project as follow . firstly , I add a extenal project like this: EXTERNALPROJECT_ADD( CRFPP_EX_PROJ GIT_REPOSITORY g...@github.com:yujing5b5d/crfpp.git PREFIX ${CMAKE_CURRENT_BINARY_DIR} CONFIGURE_COMMAND ./configure BUILD_COMMAND make -j8 BUILD_IN_SOURCE 1 INSTALL_COMMAND cp .libs/libcrfpp.a ${PROJECT_BINARY_DIR}/lib cp crfpp.h ${PROJECT_BINARY_DIR}/include ) this will generate some .a file and copy a header file crfpp.h to folder ${PROJECT_BINARY_DIR}/include , which is included in my project. and then , use the ${PROJECT_BINARY_DIR}/include as include path as follow . INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include ) finally , when I compile the main project , code like this : ADD_EXECUTABLE(cmake_sample main.cc)
Re: [CMake] how to force assign sequence in multi-thread in cmake
It may be that you have line 63 and 64 the wrong way around: ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(lib) The externalproject is added in lib, but you add a dependency on it in src. CMake will descend in the subdirectories in the order you supply them. Does reversing the directories help? Regards, Micha On 09/16/2014 09:17 AM, Yu Jing wrote: I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : *yu:cmake_sample yu$ mkdir build* *yu:cmake_sample yu$ cd build/* *yu:build yu$ cmake ..* …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build *yu:build yu$ make -j8 ### * Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc http://main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc http://main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated. 1 error generated. make[2]: *** [src/CMakeFiles/relfiles.dir/main.cc.o] Error 1 make[2]: *** [src/CMakeFiles/cmake_sample.dir/main.cc.o] Error 1 make[1]: *** [src/CMakeFiles/relfiles.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs make[1]: *** [src/CMakeFiles/cmake_sample.dir/all] Error 2 …. BE CAREFUL OF THIS LINE : * yu:build yu$ make -j8* * * the ExternalProject CRFPP_EX_PROJ’s result contains copy a crfpp.h header to a special path, after this process , we can use #include “crfpp.h ,and If I use make -j8 this means 8 jobs can be running at the same time, I can not constraints and let my compiler compile my main.cc http://main.cc after CRFPP_EX_PROJ finished. Of course , I’m not sure is this my misuse this project . On Sep 16, 2014, at 14:55, Micha Hergarden micha.hergar...@gmail.com mailto:micha.hergar...@gmail.com wrote: Hello all, I do use the ExternalProject to prebuild some binaries, without the 'superproject' setup, and it does seem to work. Using the add_dependencies, I can make sure some third party libs are prebuild before I start to build my project. I have seen some issues with ExternalProject (failing to extract, or build), but they are too rare to pinpoint and create a bugreport. What exactly does not work? Is the external project not build at all, or just not in time? Regards, Micha On 09/16/2014 08:30 AM, Petr Kmoch wrote: Hi. I've never worked with ExternalProject myself, so I can't comment with certainty, but from what I understand, the correct way of using ExternalProject is to add your own project as an ExternalProject as well. Basically, the toplevel CMakeList becomes a superbuild which *only* does ExternalProject_Add() calls and does not add any libraries/executables directly. After you build the superbuild once to get all the dependencies correct, you switch to the external project of your own code and work with that normally. Petr On Mon, Sep 15, 2014 at 4:13 PM, Yu Jing yujing5...@gmail.com mailto:yujing5...@gmail.com wrote: I had asked in http://stackoverflow.com/questions/25841602 , someone told me maybe here is a better place to ask. I am writing a project base on crfpp , a external project. I use cmake to integerate this project as follow . firstly , I add a extenal project like this: |EXTERNALPROJECT_ADD( CRFPP_EX_PROJ GIT_REPOSITORY g...@github.com:yujing5b5d/crfpp.git PREFIX ${CMAKE_CURRENT_BINARY_DIR} CONFIGURE_COMMAND ./configure BUILD_COMMAND make -j8 BUILD_IN_SOURCE 1
Re: [CMake] how to force assign sequence in multi-thread in cmake
Hello Micha , It seems doesn’t work. I updated code , and move the external project to src , and it still not work. what should be noticed is : 1. If I just use $ make as make command ,all styles are work 2. If I use in multi jobs $ make -j8 It will run abnormal (not desired sequence) . On Sep 16, 2014, at 15:27, Micha Hergarden micha.hergar...@gmail.com wrote: It may be that you have line 63 and 64 the wrong way around: ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(lib) The externalproject is added in lib, but you add a dependency on it in src. CMake will descend in the subdirectories in the order you supply them. Does reversing the directories help? Regards, Micha On 09/16/2014 09:17 AM, Yu Jing wrote: I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : yu:cmake_sample yu$ mkdir build yu:cmake_sample yu$ cd build/ yu:build yu$ cmake .. …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build yu:build yu$ make -j8 ### Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated. 1 error generated. make[2]: *** [src/CMakeFiles/relfiles.dir/main.cc.o] Error 1 make[2]: *** [src/CMakeFiles/cmake_sample.dir/main.cc.o] Error 1 make[1]: *** [src/CMakeFiles/relfiles.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs make[1]: *** [src/CMakeFiles/cmake_sample.dir/all] Error 2 …. BE CAREFUL OF THIS LINE : yu:build yu$ make -j8 the ExternalProject CRFPP_EX_PROJ’s result contains copy a crfpp.h header to a special path, after this process , we can use #include “crfpp.h ,and If I use make -j8 this means 8 jobs can be running at the same time, I can not constraints and let my compiler compile my main.cc after CRFPP_EX_PROJ finished. Of course , I’m not sure is this my misuse this project . On Sep 16, 2014, at 14:55, Micha Hergarden micha.hergar...@gmail.com wrote: Hello all, I do use the ExternalProject to prebuild some binaries, without the 'superproject' setup, and it does seem to work. Using the add_dependencies, I can make sure some third party libs are prebuild before I start to build my project. I have seen some issues with ExternalProject (failing to extract, or build), but they are too rare to pinpoint and create a bugreport. What exactly does not work? Is the external project not build at all, or just not in time? Regards, Micha On 09/16/2014 08:30 AM, Petr Kmoch wrote: Hi. I've never worked with ExternalProject myself, so I can't comment with certainty, but from what I understand, the correct way of using ExternalProject is to add your own project as an ExternalProject as well. Basically, the toplevel CMakeList becomes a superbuild which *only* does ExternalProject_Add() calls and does not add any libraries/executables directly. After you build the superbuild once to get all the dependencies correct, you switch to the external project of your own code and work with that normally. Petr On Mon, Sep 15, 2014 at 4:13 PM, Yu Jing yujing5...@gmail.com wrote: I had asked in http://stackoverflow.com/questions/25841602 , someone told me maybe here is a better place to ask. I am writing a project base on crfpp , a external project. I use cmake to integerate this project as follow . firstly , I add a extenal project like this: EXTERNALPROJECT_ADD(
Re: [CMake] how to force assign sequence in multi-thread in cmake
Hi Yu, I think you need to add an explicit dependency of main.cc on the generated (well, not really generated, but installed) header file crfpp.h. CMake has no clue as to what files are being compiled/installed by your external project, so you have to make this explicit. HTH, Marcel Loose. On 16/09/14 10:41, Yu Jing wrote: Hello Micha , It seems doesn’t work. I updated code , and move the external project to src , and it still not work. what should be noticed is : 1. If I just use $ make as make command ,all styles are work 2. If I use in multi jobs $ make -j8 It will run abnormal (not desired sequence) . On Sep 16, 2014, at 15:27, Micha Hergarden micha.hergar...@gmail.com mailto:micha.hergar...@gmail.com wrote: It may be that you have line 63 and 64 the wrong way around: ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(lib) The externalproject is added in lib, but you add a dependency on it in src. CMake will descend in the subdirectories in the order you supply them. Does reversing the directories help? Regards, Micha On 09/16/2014 09:17 AM, Yu Jing wrote: I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : *yu:cmake_sample yu$ mkdir build* *yu:cmake_sample yu$ cd build/* *yu:build yu$ cmake ..* …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build *yu:build yu$ make -j8 ### * Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc http://main.cc/:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc http://main.cc/:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated. 1 error generated. make[2]: *** [src/CMakeFiles/relfiles.dir/main.cc.o] Error 1 make[2]: *** [src/CMakeFiles/cmake_sample.dir/main.cc.o] Error 1 make[1]: *** [src/CMakeFiles/relfiles.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs make[1]: *** [src/CMakeFiles/cmake_sample.dir/all] Error 2 …. BE CAREFUL OF THIS LINE : * yu:build yu$ make -j8* * * the ExternalProject CRFPP_EX_PROJ’s result contains copy a crfpp.h header to a special path, after this process , we can use #include “crfpp.h ,and If I use make -j8 this means 8 jobs can be running at the same time, I can not constraints and let my compiler compile my main.cc http://main.cc/ after CRFPP_EX_PROJ finished. Of course , I’m not sure is this my misuse this project . On Sep 16, 2014, at 14:55, Micha Hergarden micha.hergar...@gmail.com mailto:micha.hergar...@gmail.com wrote: Hello all, I do use the ExternalProject to prebuild some binaries, without the 'superproject' setup, and it does seem to work. Using the add_dependencies, I can make sure some third party libs are prebuild before I start to build my project. I have seen some issues with ExternalProject (failing to extract, or build), but they are too rare to pinpoint and create a bugreport. What exactly does not work? Is the external project not build at all, or just not in time? Regards, Micha On 09/16/2014 08:30 AM, Petr Kmoch wrote: Hi. I've never worked with ExternalProject myself, so I can't comment with certainty, but from what I understand, the correct way of using ExternalProject is to add your own project as an ExternalProject as well. Basically, the toplevel CMakeList becomes a superbuild which *only* does ExternalProject_Add() calls and does not add any libraries/executables directly. After you build the superbuild once to get all the dependencies correct, you switch to the external
Re: [CMake] how to force assign sequence in multi-thread in cmake
Hello Yu, It seems I too needed another trick to make it work: set_property(TARGET CRFPP_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) set_property(TARGET LEVELDB_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) ADD_DEPENDENCIES(cmake_sample iniparser_static CRFPP_EX_PROJ LEVELDB_EX_PROJ) By default the ExternalProject_Add will add that target to the ALL target, and that confuses the Make dependency checker. I have removed those dependencies in my project. On the whole I agree with Marcel Loose and Petr Kmoch however. Combining their solution makes for a 'cleaner' project. To be honest, I am halfway of migrating my project to a superbuild as well. Take a look at the openchemistry project if you would like to see an example of that: https://github.com/OpenChemistry/openchemistry Regards, Micha Hergarden On 09/16/2014 11:04 AM, Marcel Loose wrote: Hi Yu, I think you need to add an explicit dependency of main.cc on the generated (well, not really generated, but installed) header file crfpp.h. CMake has no clue as to what files are being compiled/installed by your external project, so you have to make this explicit. HTH, Marcel Loose. On 16/09/14 10:41, Yu Jing wrote: Hello Micha , It seems doesn’t work. I updated code , and move the external project to src , and it still not work. what should be noticed is : 1. If I just use $ make as make command ,all styles are work 2. If I use in multi jobs $ make -j8 It will run abnormal (not desired sequence) . On Sep 16, 2014, at 15:27, Micha Hergarden micha.hergar...@gmail.com mailto:micha.hergar...@gmail.com wrote: It may be that you have line 63 and 64 the wrong way around: ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(lib) The externalproject is added in lib, but you add a dependency on it in src. CMake will descend in the subdirectories in the order you supply them. Does reversing the directories help? Regards, Micha On 09/16/2014 09:17 AM, Yu Jing wrote: I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : *yu:cmake_sample yu$ mkdir build* *yu:cmake_sample yu$ cd build/* *yu:build yu$ cmake ..* …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build *yu:build yu$ make -j8 ### * Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc http://main.cc/:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc http://main.cc/:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated. 1 error generated. make[2]: *** [src/CMakeFiles/relfiles.dir/main.cc.o] Error 1 make[2]: *** [src/CMakeFiles/cmake_sample.dir/main.cc.o] Error 1 make[1]: *** [src/CMakeFiles/relfiles.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs make[1]: *** [src/CMakeFiles/cmake_sample.dir/all] Error 2 …. BE CAREFUL OF THIS LINE : * yu:build yu$ make -j8* * * the ExternalProject CRFPP_EX_PROJ’s result contains copy a crfpp.h header to a special path, after this process , we can use #include “crfpp.h ,and If I use make -j8 this means 8 jobs can be running at the same time, I can not constraints and let my compiler compile my main.cc http://main.cc/ after CRFPP_EX_PROJ finished. Of course , I’m not sure is this my misuse this project . On Sep 16, 2014, at 14:55, Micha Hergarden micha.hergar...@gmail.com mailto:micha.hergar...@gmail.com wrote: Hello all, I do use the ExternalProject to prebuild some binaries, without the 'superproject' setup, and it does seem to work. Using the add_dependencies, I
Re: [CMake] Get Visual Studio target Arch
I still cant really make some arch specific ifdefs in my cmake scripts using this approach. That's the point of a multi-configuration, multi-architecture Visual Studio solution: you defer choosing the configuration *and* the architecture until build time. No CMake time decisions are possible based on the configuration or the architecture with this approach because neither is known until compile time. It is inappropriate to choose the configuration or architecture in CMake code with this approach, and you should re-think about it and see if you can make compile time decisions instead, possibly with #ifdef sections in your C/C++ code... Rather than re-organize your libraries, you could easily just use win32/libs/$(Platform) as your value when using the VS generators, and this should work. By the way, Gilles, I echo the sentiment: nice work! I wish MS had gotten involved in CMake even earlier... but welcome! HTH, David C. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] how to force assign sequence in multi-thread in cmake
Hello Micha, It seems still not work…. On Sep 16, 2014, at 17:36, Micha Hergarden micha.hergar...@gmail.com wrote: Hello Yu, It seems I too needed another trick to make it work: set_property(TARGET CRFPP_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) set_property(TARGET LEVELDB_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) ADD_DEPENDENCIES(cmake_sample iniparser_static CRFPP_EX_PROJ LEVELDB_EX_PROJ) By default the ExternalProject_Add will add that target to the ALL target, and that confuses the Make dependency checker. I have removed those dependencies in my project. On the whole I agree with Marcel Loose and Petr Kmoch however. Combining their solution makes for a 'cleaner' project. To be honest, I am halfway of migrating my project to a superbuild as well. Take a look at the openchemistry project if you would like to see an example of that: https://github.com/OpenChemistry/openchemistry Regards, Micha Hergarden On 09/16/2014 11:04 AM, Marcel Loose wrote: Hi Yu, I think you need to add an explicit dependency of main.cc on the generated (well, not really generated, but installed) header file crfpp.h. CMake has no clue as to what files are being compiled/installed by your external project, so you have to make this explicit. HTH, Marcel Loose. On 16/09/14 10:41, Yu Jing wrote: Hello Micha , It seems doesn’t work. I updated code , and move the external project to src , and it still not work. what should be noticed is : 1. If I just use $ make as make command ,all styles are work 2. If I use in multi jobs $ make -j8 It will run abnormal (not desired sequence) . On Sep 16, 2014, at 15:27, Micha Hergarden micha.hergar...@gmail.com wrote: It may be that you have line 63 and 64 the wrong way around: ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(lib) The externalproject is added in lib, but you add a dependency on it in src. CMake will descend in the subdirectories in the order you supply them. Does reversing the directories help? Regards, Micha On 09/16/2014 09:17 AM, Yu Jing wrote: I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : yu:cmake_sample yu$ mkdir build yu:cmake_sample yu$ cd build/ yu:build yu$ cmake .. …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build yu:build yu$ make -j8 ### Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated. 1 error generated. make[2]: *** [src/CMakeFiles/relfiles.dir/main.cc.o] Error 1 make[2]: *** [src/CMakeFiles/cmake_sample.dir/main.cc.o] Error 1 make[1]: *** [src/CMakeFiles/relfiles.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs make[1]: *** [src/CMakeFiles/cmake_sample.dir/all] Error 2 …. BE CAREFUL OF THIS LINE : yu:build yu$ make -j8 the ExternalProject CRFPP_EX_PROJ’s result contains copy a crfpp.h header to a special path, after this process , we can use #include “crfpp.h ,and If I use make -j8 this means 8 jobs can be running at the same time, I can not constraints and let my compiler compile my main.cc after CRFPP_EX_PROJ finished. Of course , I’m not sure is this my misuse this project . On Sep 16, 2014, at 14:55, Micha Hergarden micha.hergar...@gmail.com wrote: Hello all, I do use the ExternalProject to prebuild some binaries, without the 'superproject' setup, and it
Re: [CMake] how to force assign sequence in multi-thread in cmake
Hello Yu, That is because of the following lines: AUX_SOURCE_DIRECTORY(. DIR_TARGET) ADD_LIBRARY (relfiles ${DIR_TARGET}) I think you may be misusing the aux_source_directory command. I have tested your setup on a linux machine with -j8 and it still builds. Did you take a look at the openchemistry setup? Regards, Micha On 09/16/2014 01:42 PM, Yu Jing wrote: Hello Micha, It seems still not work…. On Sep 16, 2014, at 17:36, Micha Hergarden micha.hergar...@gmail.com mailto:micha.hergar...@gmail.com wrote: Hello Yu, It seems I too needed another trick to make it work: set_property(TARGET CRFPP_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) set_property(TARGET LEVELDB_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) ADD_DEPENDENCIES(cmake_sample iniparser_static CRFPP_EX_PROJ LEVELDB_EX_PROJ) By default the ExternalProject_Add will add that target to the ALL target, and that confuses the Make dependency checker. I have removed those dependencies in my project. On the whole I agree with Marcel Loose and Petr Kmoch however. Combining their solution makes for a 'cleaner' project. To be honest, I am halfway of migrating my project to a superbuild as well. Take a look at the openchemistry project if you would like to see an example of that: https://github.com/OpenChemistry/openchemistry Regards, Micha Hergarden On 09/16/2014 11:04 AM, Marcel Loose wrote: Hi Yu, I think you need to add an explicit dependency of main.cc http://main.cc on the generated (well, not really generated, but installed) header file crfpp.h. CMake has no clue as to what files are being compiled/installed by your external project, so you have to make this explicit. HTH, Marcel Loose. On 16/09/14 10:41, Yu Jing wrote: Hello Micha , It seems doesn’t work. I updated code , and move the external project to src , and it still not work. what should be noticed is : 1. If I just use $ make as make command ,all styles are work 2. If I use in multi jobs $ make -j8 It will run abnormal (not desired sequence) . On Sep 16, 2014, at 15:27, Micha Hergarden micha.hergar...@gmail.com mailto:micha.hergar...@gmail.com wrote: It may be that you have line 63 and 64 the wrong way around: ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(lib) The externalproject is added in lib, but you add a dependency on it in src. CMake will descend in the subdirectories in the order you supply them. Does reversing the directories help? Regards, Micha On 09/16/2014 09:17 AM, Yu Jing wrote: I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : *yu:cmake_sample yu$ mkdir build* *yu:cmake_sample yu$ cd build/* *yu:build yu$ cmake ..* …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build *yu:build yu$ make -j8 ### * Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc http://main.cc/:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc http://main.cc/:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated. 1 error generated. make[2]: *** [src/CMakeFiles/relfiles.dir/main.cc.o] Error 1 make[2]: *** [src/CMakeFiles/cmake_sample.dir/main.cc.o] Error 1 make[1]: *** [src/CMakeFiles/relfiles.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs make[1]: *** [src/CMakeFiles/cmake_sample.dir/all] Error 2 …. BE CAREFUL OF THIS LINE : * yu:build yu$ make -j8* * * the ExternalProject CRFPP_EX_PROJ’s result contains copy a crfpp.h header to a special path, after this process , we
Re: [CMake] how to force assign sequence in multi-thread in cmake
I am trying … That’s a very clear organization On Sep 16, 2014, at 19:57, Micha Hergarden micha.hergar...@gmail.com wrote: Hello Yu, That is because of the following lines: AUX_SOURCE_DIRECTORY(. DIR_TARGET) ADD_LIBRARY (relfiles ${DIR_TARGET}) I think you may be misusing the aux_source_directory command. I have tested your setup on a linux machine with -j8 and it still builds. Did you take a look at the openchemistry setup? Regards, Micha On 09/16/2014 01:42 PM, Yu Jing wrote: Hello Micha, It seems still not work…. On Sep 16, 2014, at 17:36, Micha Hergarden micha.hergar...@gmail.com wrote: Hello Yu, It seems I too needed another trick to make it work: set_property(TARGET CRFPP_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) set_property(TARGET LEVELDB_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) ADD_DEPENDENCIES(cmake_sample iniparser_static CRFPP_EX_PROJ LEVELDB_EX_PROJ) By default the ExternalProject_Add will add that target to the ALL target, and that confuses the Make dependency checker. I have removed those dependencies in my project. On the whole I agree with Marcel Loose and Petr Kmoch however. Combining their solution makes for a 'cleaner' project. To be honest, I am halfway of migrating my project to a superbuild as well. Take a look at the openchemistry project if you would like to see an example of that: https://github.com/OpenChemistry/openchemistry Regards, Micha Hergarden On 09/16/2014 11:04 AM, Marcel Loose wrote: Hi Yu, I think you need to add an explicit dependency of main.cc on the generated (well, not really generated, but installed) header file crfpp.h. CMake has no clue as to what files are being compiled/installed by your external project, so you have to make this explicit. HTH, Marcel Loose. On 16/09/14 10:41, Yu Jing wrote: Hello Micha , It seems doesn’t work. I updated code , and move the external project to src , and it still not work. what should be noticed is : 1. If I just use $ make as make command ,all styles are work 2. If I use in multi jobs $ make -j8 It will run abnormal (not desired sequence) . On Sep 16, 2014, at 15:27, Micha Hergarden micha.hergar...@gmail.com wrote: It may be that you have line 63 and 64 the wrong way around: ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(lib) The externalproject is added in lib, but you add a dependency on it in src. CMake will descend in the subdirectories in the order you supply them. Does reversing the directories help? Regards, Micha On 09/16/2014 09:17 AM, Yu Jing wrote: I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : yu:cmake_sample yu$ mkdir build yu:cmake_sample yu$ cd build/ yu:build yu$ cmake .. …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build yu:build yu$ make -j8 ### Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error generated. 1 error generated. make[2]: *** [src/CMakeFiles/relfiles.dir/main.cc.o] Error 1 make[2]: *** [src/CMakeFiles/cmake_sample.dir/main.cc.o] Error 1 make[1]: *** [src/CMakeFiles/relfiles.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs make[1]: *** [src/CMakeFiles/cmake_sample.dir/all] Error 2 …. BE CAREFUL OF THIS LINE : yu:build yu$ make -j8 the ExternalProject CRFPP_EX_PROJ’s result contains copy a
Re: [CMake] how to force assign sequence in multi-thread in cmake
Hello All, It is is because of # AUX_SOURCE_DIRECTORY(. DIR_TARGET) # ADD_LIBRARY (relfiles ${DIR_TARGET}) That’s really a stupid fault ,and thanks for your debug …TAT I adjust the usage of External project , and it seems much better . Thanks for your help . Thanks for Micha Hergarden’s patience … By the way , set_property(TARGET leveldb_proj PROPERTY EXCLUDE_FROM_ALL TRUE) I removed this property and it seems still works. On Sep 16, 2014, at 19:58, Yu Jing yujing5...@gmail.com wrote: I am trying … That’s a very clear organization On Sep 16, 2014, at 19:57, Micha Hergarden micha.hergar...@gmail.com wrote: Hello Yu, That is because of the following lines: AUX_SOURCE_DIRECTORY(. DIR_TARGET) ADD_LIBRARY (relfiles ${DIR_TARGET}) I think you may be misusing the aux_source_directory command. I have tested your setup on a linux machine with -j8 and it still builds. Did you take a look at the openchemistry setup? Regards, Micha On 09/16/2014 01:42 PM, Yu Jing wrote: Hello Micha, It seems still not work…. On Sep 16, 2014, at 17:36, Micha Hergarden micha.hergar...@gmail.com wrote: Hello Yu, It seems I too needed another trick to make it work: set_property(TARGET CRFPP_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) set_property(TARGET LEVELDB_EX_PROJ PROPERTY EXCLUDE_FROM_ALL TRUE) ADD_DEPENDENCIES(cmake_sample iniparser_static CRFPP_EX_PROJ LEVELDB_EX_PROJ) By default the ExternalProject_Add will add that target to the ALL target, and that confuses the Make dependency checker. I have removed those dependencies in my project. On the whole I agree with Marcel Loose and Petr Kmoch however. Combining their solution makes for a 'cleaner' project. To be honest, I am halfway of migrating my project to a superbuild as well. Take a look at the openchemistry project if you would like to see an example of that: https://github.com/OpenChemistry/openchemistry Regards, Micha Hergarden On 09/16/2014 11:04 AM, Marcel Loose wrote: Hi Yu, I think you need to add an explicit dependency of main.cc on the generated (well, not really generated, but installed) header file crfpp.h. CMake has no clue as to what files are being compiled/installed by your external project, so you have to make this explicit. HTH, Marcel Loose. On 16/09/14 10:41, Yu Jing wrote: Hello Micha , It seems doesn’t work. I updated code , and move the external project to src , and it still not work. what should be noticed is : 1. If I just use $ make as make command ,all styles are work 2. If I use in multi jobs $ make -j8 It will run abnormal (not desired sequence) . On Sep 16, 2014, at 15:27, Micha Hergarden micha.hergar...@gmail.com wrote: It may be that you have line 63 and 64 the wrong way around: ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(lib) The externalproject is added in lib, but you add a dependency on it in src. CMake will descend in the subdirectories in the order you supply them. Does reversing the directories help? Regards, Micha On 09/16/2014 09:17 AM, Yu Jing wrote: I am in OSX 10.9.4 , a sample in github is : https://github.com/yujing5b5d/cmake_sample after git clone this project , a operation like this : yu:cmake_sample yu$ mkdir build yu:cmake_sample yu$ cd build/ yu:build yu$ cmake .. …. # skip some useless output -- Configuring done -- Generating done -- Build files have been written to: /Users/yu/Workspace/res/cmake_sample/build yu:build yu$ make -j8 ### Scanning dependencies of target LEVELDB_EX_PROJ Scanning dependencies of target iniparser Scanning dependencies of target relfiles Scanning dependencies of target CRFPP_EX_PROJ Scanning dependencies of target iniparser_static [ 15%] [ 15%] [ 20%] [ 20%] [ 25%] Building C object lib/iniparser/CMakeFiles/iniparser_static.dir/ini.c.o Creating directories for 'CRFPP_EX_PROJ' Creating directories for 'LEVELDB_EX_PROJ' Building C object lib/iniparser/CMakeFiles/iniparser.dir/ini.c.o Building CXX object src/CMakeFiles/relfiles.dir/main.cc.o [ 30%] [ 35%] Performing download step (git clone) for 'LEVELDB_EX_PROJ' Performing download step (git clone) for 'CRFPP_EX_PROJ' /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ Cloning into 'CRFPP_EX_PROJ'... Cloning into 'LEVELDB_EX_PROJ'... Linking C static library ../libiniparser.a Linking C shared library ../libiniparser.dylib [ 35%] [ 35%] Built target iniparser_static Built target iniparser Scanning dependencies of target cmake_sample [ 40%] Building CXX object src/CMakeFiles/cmake_sample.dir/main.cc.o /Users/yu/Workspace/res/cmake_sample/src/main.cc:3:10: fatal error: 'crfpp.h' file not found #include crfpp.h // crfpp ^ 1 error
[CMake] project not found despite being found
I have a project which generates a project-config.cmake file and a project-config-version.cmake file in the relevant place, When another project tries to find_package it, I receive this message from cmake Found package configuration file: /Users/biddisco/build/cmakesuper/xxx/xxx-config.cmake but it set xxx_FOUND to FALSE so package “xxx is considered to be NOT FOUND. “ Which is not expected. If I set xxx_FOUND in the config, it goes away, but I was under the impression that the cmake find_package command itself should set the xxx_FOUND internally and not be done by the user. Is the find_package command trying to tell me something by showing this message? Thanks JB -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] project not found despite being found
On 16.09.2014 17:38, Biddiscombe, John A. wrote: Found package configuration file: /Users/biddisco/build/cmakesuper/xxx/xxx-config.cmake but it set xxx_FOUND to FALSE so package “xxx is considered to be NOT FOUND. “ Which is not expected. If I set xxx_FOUND in the config, it goes away, but I was under the impression that the cmake find_package command itself should set the xxx_FOUND internally and not be done by the user. Is the find_package command trying to tell me something by showing this message? It think the message indicates that the config file was setting xxx_FOUND explicitly to FALSE itself. Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] QUIET option removes all output of find_package
According to the Cmake documentation for find_package: http://www.cmake.org/cmake/help/v3.0/command/find_package.html the QUIET option should suppress the output only when a package cannot be found: The QUIET option disables messages if the package cannot be found. From my experience, QUIET removes all the output, even when the package has been found. For example in my custom module I print the result of find using this: include(FindPackageHandleStandardArgs) find_package_handle_standard_args(ROOT FOUND_VAR ROOT_FOUND REQUIRED_VARS ROOT_CONFIG_EXECUTABLE ROOTSYS ROOT_VERSION ROOT_INCLUDE_DIR ROOT_LIBRARIES ROOT_LIBRARY_DIR VERSION_VAR ROOT_VERSION) Without the QUIET option, on a successful search I get: -- Found ROOT: /home/mori/software/install/ROOT_5.34.20/bin/root-config (found version 5.34.20) while with QUIET I don't get any output, even when the package has been found. Is this the intended behaviour? Maybe I misinterpreted the documentation or maybe I'm doping something wrong with find_package_handle_standard_args? Thanks. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] FW: Parallel GNU make issue
Bill and David, Thanks for the replies. I had to shift to something else for a bit but I'm back to looking at this... Bill, I'm not sure what you mean by external projects? My software is built as part of a large suite of open-source software collectively named Trilinos that is owned, or at least managed, by my company. My own code project isn't directly part of the Trilinos project but they have a mechanism that allows for the build of my code to be incorporated into their build process. All of the software being built is either part of Trilinos or my own code. Nothing from outside is included in the build. All of it relies on cmake. David, memory usage was certainly a good thought, but from what I can tell there's no memory issue. While the build is huge it's on a system with 128GB of RAM and while it's a bit tricky getting memory usage of a process on Linux, use of ps, free, and vmstat didn't seem to indicate that memory usage was an issue. I did notice, by using ps -ef during the ctest build, there are lots of zombie cmake processes. I suspect these zombies are eating up the GNU-make parallel slots that are available. I have no idea why these are being created and why they're not being killed. Anyway, I believe we have a support contract with Kitware so I'm going to track down the proper local contacts to use that official channel. Thanks again, Gary -Original Message- Date: Thu, 11 Sep 2014 17:28:31 -0400 From: Bill Hoffman bill.hoff...@kitware.com To: cmake@cmake.org Subject: Re: [CMake] FW: Parallel GNU make issue Message-ID: 541213ff.3020...@kitware.com Content-Type: text/plain; charset=windows-1252; format=flowed On 9/11/2014 4:09 PM, Hennigan, Gary L wrote: Thanks for the reply Chuck. Do you have an external projects in this build? -Bill -- Date: Thu, 11 Sep 2014 21:15:42 -0400 From: David Cole dlrd...@aol.com To: glhe...@sandia.gov, chuck.atk...@kitware.com Cc: cmake@cmake.org Subject: Re: [CMake] FW: Parallel GNU make issue Message-ID: 8d19c3e352a769f-2b64-43...@webmail-m253.sysops.aol.com Content-Type: text/plain; charset=us-ascii; format=flowed Is there a significant amount of output from make? What does make do if it's running low on RAM? ctest may be holding onto too much memory trying to process the output if it's very large... Just a thought -- worth a look, though. D -- Subject: Digest Footer -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- End of CMake Digest, Vol 125, Issue 23 ** -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Get Visual Studio target Arch
Hi David, Alexey I'm glad to hear your enthusiasm about our involvement with CMake. We're still trying to understand the issues that people are facing and how we can help improve those. The multi-platform support is something somewhat experimental that will have issues, but getting feedback will help address the issues that you might run into. Alexey, the issue with CMAKE_SYSTEM_PROCESSOR seems to come from the CMakeDetermineSystem.cmake (lines 110 and below) file which only sets it for WINCE based on the MSVC_C_ARCHITECTURE_ID and uses the HOST processor otherwise. That's probably why you're seeing AMD64 all the time. My initial thought is that using MSVC_C_ARCHITECTURE_ID should give you at least the right processor for the compile. BTW, I've only enabled the multiplatform support for cross-compiling for Windows Phone and Windows Store apps (to reduce the potential regressions) but if you would like to have it for native Windows apps, I should be able to easily enable it. Looking forward to being able to help more. Gilles Khouzam Senior Development Lead Microsoft OSG -Original Message- From: David Cole [mailto:dlrd...@aol.com] Sent: Tuesday, September 16, 2014 03:37 To: alexey.petruc...@gmail.com; Gilles Khouzam Cc: cmake@cmake.org Subject: Re: [CMake] Get Visual Studio target Arch I still cant really make some arch specific ifdefs in my cmake scripts using this approach. That's the point of a multi-configuration, multi-architecture Visual Studio solution: you defer choosing the configuration *and* the architecture until build time. No CMake time decisions are possible based on the configuration or the architecture with this approach because neither is known until compile time. It is inappropriate to choose the configuration or architecture in CMake code with this approach, and you should re-think about it and see if you can make compile time decisions instead, possibly with #ifdef sections in your C/C++ code... Rather than re-organize your libraries, you could easily just use win32/libs/$(Platform) as your value when using the VS generators, and this should work. By the way, Gilles, I echo the sentiment: nice work! I wish MS had gotten involved in CMake even earlier... but welcome! HTH, David C. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[Cmake-commits] CMake branch, next, updated. v3.0.2-5342-g5acb1b2
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 5acb1b2c0191df17c7f2e8fdc96c2e6956d81a71 (commit) via fa7d47ac5ce8a2c1006fa73f518a33bab9d83174 (commit) via 3b5ea54a27bc69cf64c87dd5dc2bdc227dc4e776 (commit) from 8b75f1e2b5b7419d6e1b830a87ef336adb755091 (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=5acb1b2c0191df17c7f2e8fdc96c2e6956d81a71 commit 5acb1b2c0191df17c7f2e8fdc96c2e6956d81a71 Merge: 8b75f1e fa7d47a Author: Brad King brad.k...@kitware.com AuthorDate: Tue Sep 16 09:13:33 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Tue Sep 16 09:13:33 2014 -0400 Merge topic 'self-CMP0054-cleanup' into next fa7d47ac Tests: Fix CMP0054 warnings 3b5ea54a CheckPrototypeDefinition: Avoid if() auto-dereference http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa7d47ac5ce8a2c1006fa73f518a33bab9d83174 commit fa7d47ac5ce8a2c1006fa73f518a33bab9d83174 Author: Brad King brad.k...@kitware.com AuthorDate: Tue Sep 16 09:05:22 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Tue Sep 16 09:06:29 2014 -0400 Tests: Fix CMP0054 warnings Hack the CMP0054 warning locally to be an error and run the test suite. Resolve CMP0054 in Tests/* code as appropriate for each case. diff --git a/Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt b/Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt index 74f5451..2511064 100644 --- a/Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt +++ b/Tests/CMakeOnly/MajorVersionSelection/CMakeLists.txt @@ -20,13 +20,13 @@ endif () string(TOUPPER ${MAJOR_TEST_MODULE} MODULE_UPPER) -if ( ( ${MAJOR_TEST_MODULE}_FOUND OR ${MODULE_UPPER}_FOUND ) AND ${VERSION_VAR}) +if ( ( ${MAJOR_TEST_MODULE}_FOUND OR ${MODULE_UPPER}_FOUND ) AND ${VERSION_VAR}) message(STATUS ${VERSION_VAR} is '${${VERSION_VAR}}') - if (${VERSION_VAR} VERSION_LESS MAJOR_TEST_VERSION) + if (${VERSION_VAR} VERSION_LESS MAJOR_TEST_VERSION) message(SEND_ERROR Found version ${${VERSION_VAR}} is less than requested major version ${MAJOR_TEST_VERSION}) endif () math(EXPR V_PLUS_ONE ${MAJOR_TEST_VERSION} + 1) - if (${VERSION_VAR} VERSION_GREATER V_PLUS_ONE) + if (${VERSION_VAR} VERSION_GREATER V_PLUS_ONE) message(SEND_ERROR Found version ${${VERSION_VAR}} is greater than requested major version ${MAJOR_TEST_VERSION}) endif () endif () diff --git a/Tests/FunctionTest/CMakeLists.txt b/Tests/FunctionTest/CMakeLists.txt index d1fada4..68da972 100644 --- a/Tests/FunctionTest/CMakeLists.txt +++ b/Tests/FunctionTest/CMakeLists.txt @@ -92,7 +92,7 @@ endfunction() STRANGE_FUNCTION(var) set(second_var second_var) -if(${var} STREQUAL strange_function AND ${second_var} STREQUAL second_var) +if(x${var} STREQUAL xstrange_function AND x${second_var} STREQUAL xsecond_var) PASS(Case Test (${var} ${second_var})) else() FAILED(Case test (${var} ${second_var})) diff --git a/Tests/MacroTest/CMakeLists.txt b/Tests/MacroTest/CMakeLists.txt index 02bb31f..6c6dfb6 100644 --- a/Tests/MacroTest/CMakeLists.txt +++ b/Tests/MacroTest/CMakeLists.txt @@ -36,7 +36,7 @@ macro(strange_macro m) endmacro() STRANGE_MACRO(var) set(second_var second_var) -if(${var} STREQUAL strange_macro AND ${second_var} STREQUAL second_var) +if(x${var} STREQUAL xstrange_macro AND x${second_var} STREQUAL xsecond_var) PASS(Case Test (${var} ${second_var})) else() FAILED(Case test (${var} ${second_var})) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake index 924976e..89ce4c6 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake @@ -26,7 +26,7 @@ endif() pkg_check_modules(FOO ${expected_path}) -if(NOT FOO_FOUND) +if(NOT FOO_FOUND) message(FATAL_ERROR Expected PKG_CONFIG_PATH: \${expected_path}\.) endif() @@ -36,6 +36,6 @@ set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) pkg_check_modules(BAR ${expected_path} NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH) -if(NOT BAR_FOUND) +if(NOT BAR_FOUND) message(FATAL_ERROR Expected PKG_CONFIG_PATH: \${expected_path}\.) endif() diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake index 4a66e85..c903279 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake @@ -46,6 +46,6 @@ endif() pkg_check_modules(FOO
[Cmake-commits] CMake branch, master, updated. v3.0.2-1872-g56af886
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 56af8866038de20eb837d882aa9879c17e146ef7 (commit) via a3298f7790316322c60b7f2e618fb2ae01819a17 (commit) from b5ac023ba28468562fb49629553798e56b236e4c (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=56af8866038de20eb837d882aa9879c17e146ef7 commit 56af8866038de20eb837d882aa9879c17e146ef7 Merge: b5ac023 a3298f7 Author: Brad King brad.k...@kitware.com AuthorDate: Tue Sep 16 09:16:40 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Tue Sep 16 09:16:40 2014 -0400 Merge topic 'vs10-wince' a3298f77 VS: Teach VS = 10 generator about Windows CE --- Summary of changes: Source/cmGlobalVisualStudio10Generator.cxx | 48 +++- Source/cmGlobalVisualStudio10Generator.h |7 Source/cmVisualStudio10TargetGenerator.cxx | 20 ++-- 3 files changed, 72 insertions(+), 3 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.2-5345-g38a4c3e
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 38a4c3e7376e207f09c559a7a14590d6060ae9e5 (commit) via 56af8866038de20eb837d882aa9879c17e146ef7 (commit) via b5ac023ba28468562fb49629553798e56b236e4c (commit) from 5acb1b2c0191df17c7f2e8fdc96c2e6956d81a71 (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=38a4c3e7376e207f09c559a7a14590d6060ae9e5 commit 38a4c3e7376e207f09c559a7a14590d6060ae9e5 Merge: 5acb1b2 56af886 Author: Brad King brad.k...@kitware.com AuthorDate: Tue Sep 16 09:16:47 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Tue Sep 16 09:16:47 2014 -0400 Merge branch 'master' into next --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.0.2-5355-g2403568
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 240356877edd2ec55024b51bd0b862fcef002ee1 (commit) via c6a636b2b6ef74102c4d4ecc83f4d9180fc957a0 (commit) via 112ea4f784f68851eb1eea0a241cc4b9f7203faf (commit) via 984ff1fcd8f6818895837e6f36d065aca76653e7 (commit) via 1215dc6c9e69d90b166ff214e5f21e0e0e02ac24 (commit) via 1fe64b70ba9f1f31746a8ed1fc6474a369cbb732 (commit) via cc66e15fc744eba27f4bc8b2fd41372fe1defd35 (commit) via 530fb6be34176cfb90363a3e3811904614256579 (commit) via 8280502531995332ca612d2eda2b1939f10265ed (commit) via 30ca6cfb246a09dbdec03731ede7dabb38ca53b1 (commit) from 38a4c3e7376e207f09c559a7a14590d6060ae9e5 (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=240356877edd2ec55024b51bd0b862fcef002ee1 commit 240356877edd2ec55024b51bd0b862fcef002ee1 Merge: 38a4c3e c6a636b Author: Brad King brad.k...@kitware.com AuthorDate: Tue Sep 16 09:56:34 2014 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Tue Sep 16 09:56:34 2014 -0400 Merge topic 'vs-nsight-tegra-generator' into next c6a636b2 Tests: Add test for VS Nsight Tegra generator support 112ea4f7 Tests: Always detect VS and SDK availability on Windows 984ff1fc VS: Generate ANDROID_GUI executables as app packages 1215dc6c Add 'ANDROID_API' target property to set Android Target API 1fe64b70 Add 'ANDROID_GUI' target property to mark Android applications cc66e15f cmTarget: Track internally whether platform is Android 530fb6be VS: Teach vcxproj generation about the Tegra-Android platform 82805025 VS: Detect compiler id of Nsight Tegra-Android toolchains 30ca6cfb VS: Teach VS = 10 to recognize CMAKE_SYSTEM_NAME 'Android' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6a636b2b6ef74102c4d4ecc83f4d9180fc957a0 commit c6a636b2b6ef74102c4d4ecc83f4d9180fc957a0 Author: Brad King brad.k...@kitware.com AuthorDate: Tue Sep 16 09:48:38 2014 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Tue Sep 16 09:48:38 2014 -0400 Tests: Add test for VS Nsight Tegra generator support Create a VSNsightTegra test based on the two-libs example from the Android NDK. Add it whenever testing on a machine with VS 11 or 12 and the NVIDIA Nsight Tegra Visual Studio Edition installed. Exclude it when there is a space in the path to the source or build tree because the tools do not seem to support it. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 2b70f56..f80446d 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1787,7 +1787,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set(reg_ws81 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]) set(reg_wp80 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.0;InstallationFolder]) set(reg_wp81 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.1;InstallationFolder]) -foreach(reg vs11 vs12 ws80 ws81 wp80 wp81) +set(reg_tegra [HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Nsight Tegra;sdkRoot]) +foreach(reg vs11 vs12 ws80 ws81 wp80 wp81 tegra) get_filename_component(r ${reg_${reg}} ABSOLUTE) if(IS_DIRECTORY ${r}) set(${reg} 1) @@ -1833,6 +1834,27 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() endif() + if(tegra AND NOT ${CMake_SOURCE_DIR};${CMake_BINARY_DIR} MATCHES ) +macro(add_test_VSNsightTegra name generator) + add_test(NAME VSNsightTegra.${name} COMMAND ${CMAKE_CTEST_COMMAND} +--build-and-test +${CMake_SOURCE_DIR}/Tests/VSNsightTegra +${CMake_BINARY_DIR}/Tests/VSNsightTegra/${name} +--build-generator ${generator} +--build-project VSNsightTegra +--build-config $CONFIGURATION +--build-options -DCMAKE_SYSTEM_NAME=Android +) + list(APPEND TEST_BUILD_DIRS ${CMake_BINARY_DIR}/Tests/VSNsightTegra/${name}) +endmacro() +if(vs11) + add_test_VSNsightTegra(vs11 Visual Studio 11 2012) +endif() +if(vs12) + add_test_VSNsightTegra(vs12 Visual Studio 12 2013) +endif() + endif() + if (APPLE) if (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES Clang) set(BundleTestInstallDir diff --git a/Tests/VSNsightTegra/AndroidManifest.xml b/Tests/VSNsightTegra/AndroidManifest.xml new file mode 100644 index 000..951e8f3 --- /dev/null +++
[Cmake-commits] CMake branch, master, updated. v3.0.2-1873-g7b11f87
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 7b11f87100f07d0c504da0720387f0c7f818fb3e (commit) from 56af8866038de20eb837d882aa9879c17e146ef7 (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=7b11f87100f07d0c504da0720387f0c7f818fb3e commit 7b11f87100f07d0c504da0720387f0c7f818fb3e Author: Kitware Robot kwro...@kitware.com AuthorDate: Wed Sep 17 00:01:07 2014 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Wed Sep 17 00:01:07 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index f323444..489f6d8 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 0) -set(CMake_VERSION_PATCH 20140916) +set(CMake_VERSION_PATCH 20140917) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits