Re: [CMake] using external library
Steph, what you want to achieve is better known as a *Superbuild* in the CMake world. You have several options here, but the most basic one is probably the following: You setup another repository which only builds all the external dependencies (such as Qt) and put them in a predefined place. In your actual project you could refer to those prebuilt libraries using the CMAKE_PREFIX_PATH variable, which should point to the install directory from your external build. This way all the external stuff will only be build once (probably via CI) and all your developers don't need to build all the dependencies themselves. Regarding the external package introspection. You could use find_package() to check, if the correct version of your external library has been found on the system and just use it. In any other case you check for the _NOTFOUND variable and set it up locally, with the installation target pointing to the CMAKE_PREFIX_PATH as mentioned above. On a personal note, I would not use such a build system layout myself, as it quickly becomes unclear from where a dependency is coming from and if the dependency has all the required flags and settings as needed for the software project. So you might want to reconsider a more cleaner layout. For inspiration you may have a look at the CMake configuration of the OpenChemistry project [1]. Greetings [1] https://github.com/OpenChemistry/openchemistry Kai Wolf http://kai-wolf.me/ kai.w...@gmail.com 2018-03-05 11:59 GMT+01:00 Stéphane Ancelot: > Hi, > > I need some external libraries in my project (eg a particular version of > qt..) > > These external projects have been cloned locally , I could use > ExternalProject_Add to clone it in my project. > > My major problem is that I will compile it each time and this is time and > disk usage consuming, for each users . > > I sounds to me better to have the compiled version available in my > development system and use only header+binaries of this particular release. > > So, the scenario I would like to obtain : > > check if My Qt5 binaries are setted up in my system in a predefined > directory (to not overlap with possible system one), if not setted up, then > > clone qt needed release and install it in my predefined system directory > once (like /usr/local or a directory shared between users) . > > I hope you understood and it is enough clear > > Thanks > > Steph > > > > > > > -- > > 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/opensou > rce/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/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: https://cmake.org/mailman/listinfo/cmake
[CMake] using external library
Hi, I need some external libraries in my project (eg a particular version of qt..) These external projects have been cloned locally , I could use ExternalProject_Add to clone it in my project. My major problem is that I will compile it each time and this is time and disk usage consuming, for each users . I sounds to me better to have the compiled version available in my development system and use only header+binaries of this particular release. So, the scenario I would like to obtain : check if My Qt5 binaries are setted up in my system in a predefined directory (to not overlap with possible system one), if not setted up, then clone qt needed release and install it in my predefined system directory once (like /usr/local or a directory shared between users) . I hope you understood and it is enough clear Thanks Steph -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] Compiling cmake-3.10.2 against ncursesw
Hi, I've been trying to compile cmake-3.10.2 on a system that has only ncursesw using the ./bootstrap script. I could not find a way to tell ./bootstrap to use ncursesw, so I added the following to Modules/FindCurses.cmake set(CURSES_NEED_WIDE TRUE) ..this enables ./bootstrap to find libncursesw, but not libformw, so I also added: set(CURSES_FORM_LIBRARY "/usr/local/lib/libformw.so") ..and ./bootstrap completes successfully. However "make" fails when it cannot find form.h (even though it found /usr/local/include/ncursesw/ncurses.h). After symlinking /usr/local/include/ncursesw/form.h -> ../form.h, "make" completes successfully. Is there any easy way to use ./bootstrap on an ncursesw system? If Modules/FindCurses.cmake has the problems above when compiling cmake itself, won't it also have problems when compiling other stuff against ncursesw? Regards John -- 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: https://cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, master, updated. v3.11.0-rc2-136-g49e777a
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 49e777aeb1dbb141383faf1e5cb20c7443952302 (commit) via dc38970f8388e21227c8cdc50df93431c3719030 (commit) via b39a9dd897f3062273acb4d2ea3dbf4d9c7343c3 (commit) via 7776ce98c3fc1fc656c646ea783c23aee27261a2 (commit) via bafe655b11c876b45a5ce1fbaf4643593bdd22a3 (commit) via 57538224d06225ce039f9c883465c6743186c2f4 (commit) via 9a7f039ee7d3f40d6d041fd0d1ef43f92faf8996 (commit) via dfb6e84082884f908ffad4594d2712d9edfd2cc0 (commit) via 51249e69eaab33fe43805b9fe2262b4ddab01b56 (commit) via e22c45d4c97c713734b8349132fa881f602f7ae3 (commit) via 0a21d820d3533309daff2f7fbf3389cd900cf9b8 (commit) via f93cc4158e0df5f7cc39c97e275bdc58c54698bd (commit) via 915b71010c1c48ccd8e84df825579dd5595afc9a (commit) via fcaa134c6c36e2de8d454a3d5132dee19f9f7b95 (commit) via cf5d0b49e8505ca9e17c5c5a44bbdce933f3cb63 (commit) via 1ac042aa67c0e0ab531cd38977cb2f65fd96ed4b (commit) from 2fbd77124e4990a381143f0351b1caed12db5107 (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 - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49e777aeb1dbb141383faf1e5cb20c7443952302 commit 49e777aeb1dbb141383faf1e5cb20c7443952302 Merge: dc38970 0a21d82 Author: Brad KingAuthorDate: Mon Mar 5 14:02:07 2018 + Commit: Kitware Robot CommitDate: Mon Mar 5 09:02:14 2018 -0500 Merge topic 'general_cleanup_enhance' 0a21d820d3 Remove c_str() from calls to converttorelativeformake in XCode Generator f93cc4158e Refactor cmCacheManager::LoadCache to use ostringstream 915b71010c Enhance RunCMake test coverage for file(GLOB) fcaa134c6c Refactor HandleGlobCommand cf5d0b49e8 Adjust class description in cmFileTimeComparison.h Acked-by: Kitware Robot Merge-request: !1810 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc38970f8388e21227c8cdc50df93431c3719030 commit dc38970f8388e21227c8cdc50df93431c3719030 Merge: b39a9dd 7776ce9 Author: Brad King AuthorDate: Mon Mar 5 14:01:24 2018 + Commit: Kitware Robot CommitDate: Mon Mar 5 09:01:42 2018 -0500 Merge topic 'object-library-linking' 7776ce98c3 Tests: Add cases for usage requirements of linked object libs bafe655b11 Help: Document linking behavior of OBJECT libraries 57538224d0 objlib: Link object-files from `OBJECT` libraries. 9a7f039ee7 objlib: Allow `OBJECT` libraries to link to `OBJECT` libraries. dfb6e84082 objlib: Allow other libraries to link to `OBJECT` libraries. 51249e69ea objlib: Allow `OBJECT` libraries to link to other libraries. e22c45d4c9 Tests: Teach RunCMake to ignore AIX ld warnings about GNU atexit Acked-by: Kitware Robot Acked-by: Pavel Solodovnikov Acked-by: John Drouhard Merge-request: !1524 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b39a9dd897f3062273acb4d2ea3dbf4d9c7343c3 commit b39a9dd897f3062273acb4d2ea3dbf4d9c7343c3 Merge: 2fbd771 1ac042a Author: Brad King AuthorDate: Mon Mar 5 14:00:18 2018 + Commit: Kitware Robot CommitDate: Mon Mar 5 09:00:30 2018 -0500 Merge topic 'def-generate-windows-only' 1ac042aa67 Do not generate rules for .def generation where not supported Acked-by: Kitware Robot Merge-request: !1809 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7776ce98c3fc1fc656c646ea783c23aee27261a2 commit 7776ce98c3fc1fc656c646ea783c23aee27261a2 Author: Brad King AuthorDate: Thu Mar 1 09:25:50 2018 -0500 Commit: Brad King CommitDate: Thu Mar 1 09:28:00 2018 -0500 Tests: Add cases for usage requirements of linked object libs Add tests to cover transitive usage requirements on installation and export of targets that link to object libraries. Issue: #14778 diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 4f663f6..cbc8c6b 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -88,7 +88,17 @@ else() set(maybe_OBJECTS_DESTINATION "") endif() -add_library(testLib9Obj OBJECT testLib9Obj.c) +cmake_policy(PUSH) +cmake_policy(SET CMP0022 NEW) +add_library(testLib9ObjPub OBJECT testLib9ObjPub.c) +target_compile_definitions(testLib9ObjPub INTERFACE testLib9ObjPub_USED)
Re: [cmake-developers] Platform/MINGW64_NT-6.1: can't bootstrap cmake
On 03/05/2018 02:32 PM, Claus Klein wrote: > I have problems to build cmake an msys2. > It can be found at http://www.msys2.org. We have nightly testing for MSYS2's MinGW toolchain that compiles to a native Windows binary, including the bootstrap script: https://open.cdash.org/testDetails.php?test=631628857=5278231 I think MSYS2 provides a package for a CMake that uses the MSYS2 runtime library, but there is no upstream support for that currently. -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: https://cmake.org/mailman/listinfo/cmake-developers
[cmake-developers] Platform/MINGW64_NT-6.1: can't bootstrap cmake
Hi, I have problems to build cmake an msys2. It can be found at http://www.msys2.org. With regards Claus Avoid ctest truncation of output: CTEST_FULL_OUTPUT === MAIN VARIABLES CMAKE_STATIC_LIBRARY_PREFIX == "lib" CMAKE_STATIC_LIBRARY_SUFFIX == ".a" CMAKE_SHARED_LIBRARY_PREFIX == "lib" CMAKE_SHARED_LIBRARY_SUFFIX == ".so" CMAKE_SHARED_MODULE_PREFIX == "lib" CMAKE_SHARED_MODULE_SUFFIX == ".so" CMAKE_DL_LIBS == "dl" CMAKE_LIBRARY_PATH_FLAG == "-L" CMAKE_LINK_LIBRARY_FLAG == "-l" CMAKE_SKIP_RPATH == "NO" CMAKE_SYSTEM_INFO_FILE == "Platform/MINGW64_NT-6.1" CMAKE_SYSTEM_NAME == "MINGW64_NT-6.1" CMAKE_SYSTEM == "MINGW64_NT-6.1-2.9.0(0.318/5/3)" CMAKE_CXX_COMPILER == "/usr/bin/CC.exe" CMAKE_C_COMPILER == "/usr/bin/cc.exe" CMAKE_COMPILER_IS_GNUCC == "1" CMAKE_COMPILER_IS_GNUCXX == "1" // C shared library flag CMAKE_SHARED_LIBRARY_C_FLAGS == "-fPIC" CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS == "-shared" CMAKE_SHARED_LIBRARY_LINK_FLAGS == "" CMAKE_SHARED_LIBRARY_RUNTIME_FLAG == "" CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP == "" CMAKE_SHARED_LIBRARY_LINK_STATIC_C_FLAGS == "" CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_C_FLAGS == "" // C shared module flags CMAKE_SHARED_MODULE_C_FLAGS == "-fPIC" CMAKE_SHARED_MODULE_CREATE_C_FLAGS == "-shared" CMAKE_SHARED_MODULE_LINK_STATIC_C_FLAGS == "" CMAKE_SHARED_MODULE_LINK_DYNAMIC_C_FLAGS == "" // C exe flags CMAKE_EXE_LINK_STATIC_C_FLAGS == "" CMAKE_EXE_LINK_DYNAMIC_C_FLAGS == "" // CXX shared library flags CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS == "-shared" CMAKE_SHARED_LIBRARY_CXX_FLAGS == "-fPIC" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS == "" CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG == "" CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP == "" CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS == "" CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS == "" // CXX shared module flags CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS == "-shared" CMAKE_SHARED_MODULE_CXX_FLAGS == "-fPIC" CMAKE_SHARED_MODULE_LINK_STATIC_CXX_FLAGS == "" CMAKE_SHARED_MODULE_LINK_DYNAMIC_CXX_FLAGS == "" // CXX exe flags CMAKE_EXE_LINK_STATIC_CXX_FLAGS == "" CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS == "" CMAKE_USER_MAKE_RULES_OVERRIDE == "" CMAKE_VERBOSE_MAKEFILE == "FALSE" CMAKE_BUILD_TYPE == "" CMAKE_CXX_FLAGS == "" CMAKE_CXX_FLAGS_DEBUG == "-g" CMAKE_CXX_FLAGS_MINSIZEREL == "-Os -DNDEBUG" CMAKE_CXX_FLAGS_RELEASE == "-O3 -DNDEBUG" CMAKE_CXX_FLAGS_RELWITHDEBINFO == "-O2 -g -DNDEBUG" CMAKE_C_FLAGS == "" CMAKE_C_FLAGS_DEBUG == "-g" CMAKE_C_FLAGS_MINSIZEREL == "-Os -DNDEBUG" CMAKE_C_FLAGS_RELEASE == "-O3 -DNDEBUG" CMAKE_C_FLAGS_RELWITHDEBINFO == "-O2 -g -DNDEBUG" // build rules CMAKE_CXX_CREATE_SHARED_LIBRARY == " -o " CMAKE_CXX_CREATE_SHARED_MODULE == " -o " CMAKE_C_CREATE_SHARED_LIBRARY == " -o " CMAKE_C_CREATE_SHARED_MODULE == " -o " CMAKE_CXX_CREATE_STATIC_LIBRARY == "" CMAKE_C_CREATE_STATIC_LIBRARY == "" CMAKE_CXX_COMPILE_OBJECT == " -o -c " CMAKE_C_COMPILE_OBJECT == "-o -c " CMAKE_C_LINK_EXECUTABLE == " -o " CMAKE_CXX_LINK_EXECUTABLE == " -o " = === VARIABLES = CMAKE_AR "/usr/bin/ar.exe" CMAKE_AR "/usr/bin/ar.exe" CMAKE_BASE_NAME "g++" CMAKE_BINARY_DIR "/e/workspace/tps/__cmake_systeminformation" CMAKE_BUILD_TOOL "/usr/bin/make.exe" CMAKE_BUILD_TYPE "" CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert" CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11" CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11" CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes" CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90" CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90" CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros" CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99" CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99" CMAKE_CFG_INTDIR "." CMAKE_COLOR_MAKEFILE "ON" CMAKE_COMMAND "/usr/bin/cmake.exe" CMAKE_COMPILER_IS_GNUCC "1" CMAKE_COMPILER_IS_GNUCXX "1" CMAKE_COMPILER_IS_MSYS "1" CMAKE_CPACK_COMMAND "/usr/bin/cpack.exe" CMAKE_CROSSCOMPILING "FALSE" CMAKE_CTEST_COMMAND "/usr/bin/ctest.exe" CMAKE_CURRENT_BINARY_DIR "/e/workspace/tps/__cmake_systeminformation" CMAKE_CURRENT_LIST_DIR "/e/workspace/tps/__cmake_systeminformation" CMAKE_CURRENT_LIST_FILE "/e/workspace/tps/__cmake_systeminformation/CMakeLists.txt" CMAKE_CURRENT_SOURCE_DIR "/e/workspace/tps/__cmake_systeminformation" CMAKE_CXX11_COMPILE_FEATURES
[Cmake-commits] CMake branch, master, updated. v3.11.0-rc2-137-g674c5b3
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 674c5b306671129bc4a854137c304f19e2c3bf65 (commit) from 49e777aeb1dbb141383faf1e5cb20c7443952302 (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 - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=674c5b306671129bc4a854137c304f19e2c3bf65 commit 674c5b306671129bc4a854137c304f19e2c3bf65 Author: Kitware Robot <kwro...@kitware.com> AuthorDate: Tue Mar 6 00:01:23 2018 -0500 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Mar 6 00:01:23 2018 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7ec49e8..c4acb16 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 11) -set(CMake_VERSION_PATCH 20180305) +set(CMake_VERSION_PATCH 20180306) #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 https://cmake.org/mailman/listinfo/cmake-commits