Re: [CMake] emulating cmake-gui behaviour with cmake commandline on windows
It's in the bug database here: http://www.cmake.org/Bug/view.php?id=15134 Not sure how easy it would be to fix... Also, this CLOSED bug is in there (and some related issues): http://www.cmake.org/Bug/view.php?id=10072 D On Fri, Aug 7, 2015 at 12:37 PM, Johannes Schauer wrote: > Hi, > > Quoting David Cole (2015-08-07 18:27:40) >> Put your source in a sub-directory. CMake simply does not work at the >> root of a drive letter on Windows. CMakeLists.txt MUST be in at least >> one sub-directory underneath a root drive letter path. > > oh wow that was a simple fix. Thanks for the quick reply! > > Is this documented anywhere? > > Maybe there could be a warning somewhere if one attempts to have the source > directory directly at the root of a drive letter on windows? > > But then why does it work with cmake-gui on windows? > > Is this a bug that can be fixed? > > Thanks! > > cheers, josch -- 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] emulating cmake-gui behaviour with cmake commandline on windows
Hi, Quoting David Cole (2015-08-07 18:27:40) > Put your source in a sub-directory. CMake simply does not work at the > root of a drive letter on Windows. CMakeLists.txt MUST be in at least > one sub-directory underneath a root drive letter path. oh wow that was a simple fix. Thanks for the quick reply! Is this documented anywhere? Maybe there could be a warning somewhere if one attempts to have the source directory directly at the root of a drive letter on windows? But then why does it work with cmake-gui on windows? Is this a bug that can be fixed? Thanks! cheers, josch signature.asc Description: 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
Re: [CMake] emulating cmake-gui behaviour with cmake commandline on windows
Put your source in a sub-directory. CMake simply does not work at the root of a drive letter on Windows. CMakeLists.txt MUST be in at least one sub-directory underneath a root drive letter path. HTH, David C. On Fri, Aug 7, 2015 at 5:08 AM, Johannes Schauer wrote: > Hi, > > I am trying to build the CMake project 3dtk with the following CMakeLists.txt: > https://sourceforge.net/p/slam6d/code/HEAD/tree/trunk/CMakeLists.txt > > This works well on linux with ccmake and also on windows with cmake-gui. > > Now I'm trying to let it work on windows with the cmake command line program > to > automate the configuration. Unfortunately I'm running into a problem with > cmake > on windows that I did not encounter with cmake-gui. > > The CMakeLists.txt file at several occasions uses the add_subdirectory > directive but always without the second argument (the build_dir). This seems > to > work fine for cmake-gui on windows and ccmake on linux. But with cmake on > windows I now get the following message for every add_subdirectory directive: > > CMake Error at Z:/CMakeLists.txt:471 (add_subdirectory): > add_subdirectory not given a binary directory but the given source > directory "Z:/src/slam6d" is not a subdirectory of "Z:/". When specifying > an out-of-tree source a binary directory must be explicitly specified. > > This error message is also strange because clearly, "Z:/src/slam6d" is a > subdirectory of "Z:/". > > I would like to know the command line option that I have to supply to cmake on > windows to get the same behaviour as with cmake-gui on windows. > > In my case, the source is in Z:/ and in cmake-gui I specify > "Z:/lib64-msvc-12.0" as the value of "Where to build the binaries" and as > explained above this works completely well. > > But after successfully configuring and generating the project in > "Z:/lib64-msvc-12.0" using the cmake-gui method, when I cd into > "Z:/lib64-msvc-12.0" and just run "cmake .." I get the error messages above. > > Same happens when I create a new directory "Z:/cmaketest", cd into it and then > run "cmake ..", I again get the errors above. > > So in summary, with or without an existing CMakeCache.txt, I'm running into > the > error messages above on windows when using cmake (and not cmake-gui). So I > suspect that I'm missing an option to cmake to make it behave like cmake-gui. > > I don't think my CMakeLists.txt is the culprit because that one works totally > fine on linux and also works well with cmake-gui. > > What could the problem be? > > Thanks! > > cheers, josch > > -- > > 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] emulating cmake-gui behaviour with cmake commandline on windows
Hi, I am trying to build the CMake project 3dtk with the following CMakeLists.txt: https://sourceforge.net/p/slam6d/code/HEAD/tree/trunk/CMakeLists.txt This works well on linux with ccmake and also on windows with cmake-gui. Now I'm trying to let it work on windows with the cmake command line program to automate the configuration. Unfortunately I'm running into a problem with cmake on windows that I did not encounter with cmake-gui. The CMakeLists.txt file at several occasions uses the add_subdirectory directive but always without the second argument (the build_dir). This seems to work fine for cmake-gui on windows and ccmake on linux. But with cmake on windows I now get the following message for every add_subdirectory directive: CMake Error at Z:/CMakeLists.txt:471 (add_subdirectory): add_subdirectory not given a binary directory but the given source directory "Z:/src/slam6d" is not a subdirectory of "Z:/". When specifying an out-of-tree source a binary directory must be explicitly specified. This error message is also strange because clearly, "Z:/src/slam6d" is a subdirectory of "Z:/". I would like to know the command line option that I have to supply to cmake on windows to get the same behaviour as with cmake-gui on windows. In my case, the source is in Z:/ and in cmake-gui I specify "Z:/lib64-msvc-12.0" as the value of "Where to build the binaries" and as explained above this works completely well. But after successfully configuring and generating the project in "Z:/lib64-msvc-12.0" using the cmake-gui method, when I cd into "Z:/lib64-msvc-12.0" and just run "cmake .." I get the error messages above. Same happens when I create a new directory "Z:/cmaketest", cd into it and then run "cmake ..", I again get the errors above. So in summary, with or without an existing CMakeCache.txt, I'm running into the error messages above on windows when using cmake (and not cmake-gui). So I suspect that I'm missing an option to cmake to make it behave like cmake-gui. I don't think my CMakeLists.txt is the culprit because that one works totally fine on linux and also works well with cmake-gui. What could the problem be? Thanks! cheers, josch signature.asc Description: 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
Re: [CMake] target_include_directories(): SYSTEM option does not seem to work on recent versions of CMake, when targeting Xcode.
Opened issue 15687 for this problem: http://www.cmake.org/Bug/view.php?id=15687 Thank again for your help Nils. (ps: sorry, just realize now that I forgot to forward other answers to the list... Pasting the content below) 2015-08-07 9:27 GMT+02:00 A D : > 2015-08-06 10:57 GMT+02:00 Nils Gladitz : > >> suggesting that even though the compiler might support -isystem, Xcode >> itself does (or did) not. I can't tell if that is something that may or may >> not have changed with current Xcode releases. >> > > Xcode has been calling Clang behind the scene (I think it was a custom > Apple GCC before). There is an Xcode setting for "header search path", > which is a list of 'non-system' headers. Even if there is not a separate > Xcode settings for "system headers", there is a setting for the cpp flags > that are directly forwarded to the compiler: in practice, this allows to > achieve everything that would be possible by invoking Clang directly. In > particular, if I take the path from "header search path" setting, and put > it as "-isystem ${path_value}" in the "Other C++ flags" setting, I obtain > the expected result. > > If you have reason to believe it is supported now (e.g. because you are >> able to create and Xcode project without cmake that has explicit system >> includes) you may want to open an issue. >> > > Thank you for this suggestion, I will report the issue referring to this > exchange. > > Best regards, > 2015-08-07 9:55 GMT+02:00 A D : > > 2015-08-07 9:31 GMT+02:00 Nils Gladitz : > >> One issue you might want to look for when passing the flag directly to >> the compiler without allowing IDE interpretation might be that the internal >> code model used by Xcode for e.g. auto-completion might then not know about >> it. > > > That is a good point indeed. So I just tried, and both the linter and > auto-completion seem to make no difference with regard to how the header > path is provided to the project (they kept working in the same way): > * The linter stopped 'underlining' the boost include as soon as I gave the > '-isystem ' to the C++ flags > * Adding a new library to this '-isystem' flag, auto-completion was aware > of its symbols as soon as I included its headers in a compilation units. > -- 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