[cmake-developers] [CMake 0013800]: Only one directory taken into account (CMAKE_FIND_ROOT_PATH)
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13800 == Reported By:Jonathan De Wachter Assigned To: == Project:CMake Issue ID: 13800 Category: CMake Reproducibility:always Severity: major Priority: high Status: new == Date Submitted: 2012-12-17 06:28 EST Last Modified: 2012-12-17 06:28 EST == Summary:Only one directory taken into account (CMAKE_FIND_ROOT_PATH) Description: CMake doesn't search at *all* path defined by CMAKE_FIND_ROOT_PATH (at least for headers include). I can get my headers found for the first path defined but the second, the third... it doesn't work. My scenario is a compiler split and located at different location (you'll find some headers and libraries located in several external directories). This is the case for Android compilers provided by the NDK which include the STL library version according: - the Android API you are targeting - the compiler brand/version. This is the main compiler directory: $NDK/toolchains/arm-compiler/bin/compilers here $NDK/toolchains/arm-compiler/include/several files but no stl headers This is an external directory including some headers and libraries: $NDK/platforms/android-9/includeagain some several files but no stl headers $NDK/platforms/android-14/includeagain some several files but no stl headers This is another external directory including several STL versions: $NDK/sources/cxx-stl/gnu-libstdc++/4.6/stl headers $NDK/sources/cxx-stl/gnu-libstdc++/4.4.3/stl headers $NDK/sources/cxx-stl/stlport/stlport/stl headers The goal is pick up the right headers/libraries and so make a customized compiler suitable for the targeted mobile and the targeted os. Additional Information: I know I actually should use a script which generates a standalone compiler with all headers/libraries at a same location. But I don't want that. == Issue History Date ModifiedUsername FieldChange == 2012-12-17 06:28 Jonathan De WachterNew Issue == -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Global flags for creating static libraries
On 12/17/2012 02:01 AM, Evan Pipho wrote: Cleaned up the commits See the new branch here: https://github.com/hiwrac/CMake/commits/static_linker_flags_clean CMAKE_STATIC_LINKER_FLAGS is now optional on all generators. XCode is supported properly. 1. I still see some GetRequiredDefinition used. 2. Please format C++ code in less than 80 columns. Run this check on your topic and ensure it is empty: $ git log origin/master.. --pickaxe-regex -S'.{80}' -- Source 3. The addition of /MACHINE:xxx to librarian calls is a change in behavior. According to the documentation of lib.exe: http://msdn.microsoft.com/en-us/library/h34w59b3.aspx The flag is usually not needed. In what cases do you need it? 4. Please construct a test case that covers these flags. It is okay if it runs only with MS tools because that is the motivating case anyway. In Tests/CMakeLists.txt there is a CMAKE_TEST_MSVC condition that adds some MS-specific tests. Thanks, -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [CMake] How to use CMAKE_POLICY?
Hi David, See my remarks inline. On 15/12/12 16:47, David Cole wrote: On Sat, Dec 15, 2012 at 10:33 AM, Marcel Loose marcel.lo...@zonnet.nl mailto:marcel.lo...@zonnet.nl wrote: Thanks, that seems to work. Is the idiom if(POLICY CMP) cmake_policy(PUSH) cmake_policy(SET CMP OLD) cmake_policy(POP) endif() one that you also need to use with newer CMakes? Or does it then suffice to do cmake_policy(SET CMP OLD) I assume you really mean: if(POLICY CMP) cmake_policy(PUSH) cmake_policy(SET CMP OLD) endif() ... other code where the policy is set to OLD ... if(POLICY CMP) cmake_policy(POP) endif() Yes, you're right. I was oversimplifying. The policies are tightly tied to the minimum required version of CMake. So if you use cmake_minimum_required with a certain version number, you can write code without if(POLICY assuming that all the policies you need to set are known as of that minimum version. If they are not (and they must not be in this particular case), then you'll need the if(POLICY construct. So, that basically means that you need to use if(POLICY...) for all policies that are not part of the minimum required version? Is there a way to find out which policies exist for which version of CMake? I was hoping for a more forward compatible solution. In other words, I was hoping that I could always use CMAKE_POLICY(SET...) unconditionally. It's a bit of a shame that I have to clutter my CMakeLists.txt and *.cmake files with these extra conditionals; and have to remove them (or should I say: clean up) whenever I bump the minimum required version. What's the reason that cmake doesn't silently ignore a CMAKE_POLICY(SET...) for a policy it doesn't know about? The other option is to bump up your minimum required version. Sure, but that defeats the whole purpose of setting a minimum required version. I need to be compatible with version 2.6.2. Best regards, Marcel Loose. attachment: loose.vcf-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Xcode Archiving on iOS and OSX
I've got a little further with this over the weekend. By doing a Product-Build For-Archiving before Product-Archive seems to build the xcode archives into the correct location, I'm not sure why this is the case. Regardless, that allows it to link correctly. The problem then is it by default creates a 0 byte xcarchive file. This is apparently because the default install path is empty, which Xcode doesn't like. Skip install is also set on the project target by default, which is incorrect. You can solve this by setting the following properties on the application target. set_target_properties(${projectname} PROPERTIES XCODE_ATTRIBUTE_INSTALL_PATH $(LOCAL_APPS_DIR) XCODE_ATTRIBUTE_SKIP_INSTALL No ) This seemingly allows the creation of a valid archive, so it's usable, there's just the extra step of having to build before archiving. If anyone has any suggestions on how to solve that final hurdle it would be greatly appreciated! Kind Regards, Jamie Hales +44 7775 647071 On Friday, 14 December 2012 at 12:22, Jamie Hales wrote: Apologies, I hit send before I was ready - I tried setting various attributes - set(CMAKE_XCODE_ATTRIBUTE_INSTALL_PATH test) set(LIB_INSTALL_DIR, ${CMAKE_INSTALL_PREFIX}) set(LIBRARY_OUTPUT_DIRECTORY, ${CMAKE_INSTALL_PREFIX}) But this doesn't seem to make any difference. Is anyone aware of a proper solution to this issue, or a temporary workaround? I'm willing to try anything, as this is the only bottleneck I've found so far, but it's basically a showstopper if I can't get it to work. Any suggestions, questions or solutions are highly welcome! Many thanks. Kind Regards, Jamie Hales On Friday, 14 December 2012 at 12:20, Jamie Hales wrote: Hi, I'm currently trying to change my existing multiple project setup (manually maintaining makefiles, vsproj and xcodeproj) for a single cmake solution. So far it's going well, I have the OSX and iOS targets up and running correctly when running directly on the device, but I'm having issues when archiving. Basically whenever I try to archive I get linker errors for every separate static library I'm using (also compiled with cmake) clang: error: no such file or directory: '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/engine/Release-iphoneos/libpixelboost_engine.a' clang: error: no such file or directory: '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/box2d/Box2D/Release-iphoneos/libBox2D.a' clang: error: no such file or directory: '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/freetype2/Release-iphoneos/libfreetype2.a' clang: error: no such file or directory: '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/librocket/Release-iphoneos/liblibrocket.a' clang: error: no such file or directory: '/Users/aeonflame/Dropbox/Development/pixelballoon/astraeus/build/ios/pixelboost/libs/lua/Release-iphoneos/liblua.a' These are included in the main project in the standard way - target_link_libraries (pixelboost_engine Box2D freetype2 librocket lua) target_link_libraries (astraeus pixelboost_engine) There's no issue when running directly, it's only when archiving. I've been searching for about 2 days for a solution to this but can't find a solution yet. I've come across some vague references to setting the library install path, so I have tried setting various attributes - Kind Regards, Jamie Hales -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to use CMAKE_POLICY?
If you need to set a policy to OLD, then we have failed... Why do you need to set a policy to OLD? How can we make it work so that you don't need to do that? On Mon, Dec 17, 2012 at 3:58 AM, Marcel Loose lo...@astron.nl wrote: Hi David, See my remarks inline. On 15/12/12 16:47, David Cole wrote: On Sat, Dec 15, 2012 at 10:33 AM, Marcel Loose marcel.lo...@zonnet.nlwrote: Thanks, that seems to work. Is the idiom if(POLICY CMP) cmake_policy(PUSH) cmake_policy(SET CMP OLD) cmake_policy(POP) endif() one that you also need to use with newer CMakes? Or does it then suffice to do cmake_policy(SET CMP OLD) I assume you really mean: if(POLICY CMP) cmake_policy(PUSH) cmake_policy(SET CMP OLD) endif() ... other code where the policy is set to OLD ... if(POLICY CMP) cmake_policy(POP) endif() Yes, you're right. I was oversimplifying. The policies are tightly tied to the minimum required version of CMake. So if you use cmake_minimum_required with a certain version number, you can write code without if(POLICY assuming that all the policies you need to set are known as of that minimum version. If they are not (and they must not be in this particular case), then you'll need the if(POLICY construct. So, that basically means that you need to use if(POLICY...) for all policies that are not part of the minimum required version? Is there a way to find out which policies exist for which version of CMake? I was hoping for a more forward compatible solution. In other words, I was hoping that I could always use CMAKE_POLICY(SET...) unconditionally. It's a bit of a shame that I have to clutter my CMakeLists.txt and *.cmake files with these extra conditionals; and have to remove them (or should I say: clean up) whenever I bump the minimum required version. What's the reason that cmake doesn't silently ignore a CMAKE_POLICY(SET...) for a policy it doesn't know about? The other option is to bump up your minimum required version. Sure, but that defeats the whole purpose of setting a minimum required version. I need to be compatible with version 2.6.2. Best regards, Marcel Loose. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to use CMAKE_POLICY?
On Monday 17 December 2012, David Cole wrote: If you need to set a policy to OLD, then we have failed... Why do you need to set a policy to OLD? To get the old behaviour, and to silence warnings, which could lead developers to change the cmake code and switch to the NEW behaviour, I think. Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to use CMAKE_POLICY?
I thought we wanted them to switch to the new behavior... Isn't that the goal of emitting warnings from policy implementations...? On Mon, Dec 17, 2012 at 11:45 AM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Monday 17 December 2012, David Cole wrote: If you need to set a policy to OLD, then we have failed... Why do you need to set a policy to OLD? To get the old behaviour, and to silence warnings, which could lead developers to change the cmake code and switch to the NEW behaviour, I think. Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to use CMAKE_POLICY?
On Monday 17 December 2012, David Cole wrote: I thought we wanted them to switch to the new behavior... Isn't that the goal of emitting warnings from policy implementations...? ...but not as long as the project still wants to keep the old minimum required cmake version (or am I mixing things up) ? Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Using gnu flux with cmake
I am trying to figure out what I am doing wrong when trying to use just flex in a Cmake file to build a shared lib. i basically have the following find_package(FLEX) FLEX_TARGET(Test ../src/test.l ../src/test.c)set(SRC_FILES mysource.c ${FLEX_Test_OUTPUTS}) add_libary(testlib ${SRC_FILES}) target_link_libraries(testlib crypto c ${FLEX_LIBRARIES}) this is giving me a problem saying it cant find ../src/test.c any ideas how I can make sure Lex ran first? secondly,how can i pass my -L and -d options to lex (like I am doing in my normal, pre-cmake version of this makefile) -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using gnu flex with cmake
Replying to fix the subject On Mon, Dec 17, 2012 at 1:45 PM, Derek Cole derek.c...@gmail.com wrote: I am trying to figure out what I am doing wrong when trying to use just flex in a Cmake file to build a shared lib. i basically have the following find_package(FLEX) FLEX_TARGET(Test ../src/test.l ../src/test.c)set(SRC_FILES mysource.c ${FLEX_Test_OUTPUTS}) add_libary(testlib ${SRC_FILES}) target_link_libraries(testlib crypto c ${FLEX_LIBRARIES}) this is giving me a problem saying it cant find ../src/test.c any ideas how I can make sure Lex ran first? secondly,how can i pass my -L and -d options to lex (like I am doing in my normal, pre-cmake version of this makefile) -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using gnu flex with cmake
2012/12/17 Derek Cole derek.c...@gmail.com Replying to fix the subject On Mon, Dec 17, 2012 at 1:45 PM, Derek Cole derek.c...@gmail.com wrote: I am trying to figure out what I am doing wrong when trying to use just flex in a Cmake file to build a shared lib. i basically have the following find_package(FLEX) FLEX_TARGET(Test ../src/test.l ../src/test.c)set(SRC_FILES mysource.c ${FLEX_Test_OUTPUTS}) add_libary(testlib ${SRC_FILES}) target_link_libraries(testlib crypto c ${FLEX_LIBRARIES}) this is giving me a problem saying it cant find ../src/test.c Could you try using absolute path for FLEX output: FLEX_TARGET(Test ../src/test.l ${CMAKE_CURRENT_BINARY_DIR}/test.c) any ideas how I can make sure Lex ran first? secondly,how can i pass my -L and -d options to lex (like I am doing in my normal, pre-cmake version of this makefile) the FLEX_TARGET macro should be printing something out when running. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Using gnu flex with cmake
Thanks - that seemed to work. I was under the impression I could specify where I wanted the .c file to go with the 2nd argument. I had tried this way before, but i didnt notice I think I had a syntax error in my .l file causing the compile to not complete. Thanks -Derek On Mon, Dec 17, 2012 at 2:09 PM, Eric Noulard eric.noul...@gmail.comwrote: 2012/12/17 Derek Cole derek.c...@gmail.com Replying to fix the subject On Mon, Dec 17, 2012 at 1:45 PM, Derek Cole derek.c...@gmail.com wrote: I am trying to figure out what I am doing wrong when trying to use just flex in a Cmake file to build a shared lib. i basically have the following find_package(FLEX) FLEX_TARGET(Test ../src/test.l ../src/test.c)set(SRC_FILES mysource.c ${FLEX_Test_OUTPUTS}) add_libary(testlib ${SRC_FILES}) target_link_libraries(testlib crypto c ${FLEX_LIBRARIES}) this is giving me a problem saying it cant find ../src/test.c Could you try using absolute path for FLEX output: FLEX_TARGET(Test ../src/test.l ${CMAKE_CURRENT_BINARY_DIR}/test.c) any ideas how I can make sure Lex ran first? secondly,how can i pass my -L and -d options to lex (like I am doing in my normal, pre-cmake version of this makefile) the FLEX_TARGET macro should be printing something out when running. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] FindPostgreSQL.cmake won't work on ubuntu
* Ubuntu 12.04 * CMake 2.8.9 * Postgresql 9.2.2 I'm trying to get the `FindPostgreSQL` module to find `/usr/include/postgresql/libpq-fe.h`. Here's what I have in my `CMakeLists.txt`: find_package(PostgreSQL REQUIRED) This is the error I get: CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE): Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found version 9.2.2) Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-2.8/Modules/FindPostgreSQL.cmake:155 (find_package_handle_standard_args) CMakeLists.txt:7 (find_package) I added the following lines before calling `find_package` but it didn't seem to have any effect. set(PostgreSQL_ADDITIONAL_VERSIONS 9.2.2) set(PostgreSQL_ADDITIONAL_SEARCH_PATHS ${PostgreSQL_ADDITIONAL_SEARCH_PATHS} /usr/include/postgresql) I also tried googling for `PostgreSQL_TYPE_INCLUDE_DIR` but didn't find anything. I'm very new to cmake, what else can I try? - icholy -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindPostgreSQL.cmake won't work on ubuntu
On 2012-12-17 14:55, Ilia Choly wrote: I'm trying to get the `FindPostgreSQL` module to find `/usr/include/postgresql/libpq-fe.h`. This is the error I get: CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE): Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found version 9.2.2) Is pg_config in your PATH? (Do you have the necessary -dev package(s) installed?) From a cursory look at the find module, it looks like having pg_config in your path should be all that is needed. -- Matthew -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindPostgreSQL.cmake won't work on ubuntu
Ilia Choly wrote: * Ubuntu 12.04 * CMake 2.8.9 * Postgresql 9.2.2 Maybe the usual multiarch breakage? http://cmake.org/Bug/view.php?id=13378 Eike -- signature.asc Description: This is a digitally signed message part. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, master, updated. v2.8.10.2-319-g8931dd6
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 8931dd6e74bce78737baaf78c9867c992829c60b (commit) from a3f63661e67c928c465562f988e4ab103b0ec865 (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=8931dd6e74bce78737baaf78c9867c992829c60b commit 8931dd6e74bce78737baaf78c9867c992829c60b Author: Kitware Robot kwro...@kitware.com AuthorDate: Tue Dec 18 00:01:03 2012 -0500 Commit: Kitware Robot kwro...@kitware.com CommitDate: Tue Dec 18 00:01:03 2012 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index aced2e7..81d74c8 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 10) -set(CMake_VERSION_TWEAK 20121217) +set(CMake_VERSION_TWEAK 20121218) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits