├── install └── .gitignore ├── packages └── .gitignore ├── wrappers └── .gitignore ├── environments └── .gitignore ├── cmake ├── patterns │ ├── packages │ │ ├── package │ │ │ ├── README.md │ │ │ ├── license.txt │ │ │ ├── share │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── doxygen │ │ │ │ │ └── img │ │ │ │ │ │ └── .gitignore │ │ │ │ ├── site │ │ │ │ │ └── img │ │ │ │ │ │ └── .gitignore │ │ │ │ ├── cmake │ │ │ │ │ └── .gitignore │ │ │ │ ├── resources │ │ │ │ │ └── .gitignore │ │ │ │ ├── install │ │ │ │ │ └── standalone_install.sh │ │ │ │ └── ci │ │ │ │ │ └── prepare_package_ci.sh │ │ │ ├── include │ │ │ │ └── .gitignore │ │ │ ├── build │ │ │ │ └── .gitignore │ │ │ ├── .gitignore │ │ │ ├── apps │ │ │ │ └── CMakeLists.txt │ │ │ ├── test │ │ │ │ └── CMakeLists.txt │ │ │ └── src │ │ │ │ └── CMakeLists.txt │ │ ├── FindPackage.cmake.in │ │ ├── run.bat │ │ ├── loggable.h.in │ │ ├── APIDOC_welcome.md.in │ │ ├── README.md.in │ │ ├── CMakeLists.txt.in │ │ ├── ci │ │ │ ├── build_package_release.sh │ │ │ ├── publish_package_integration.sh │ │ │ ├── configure_workspace.sh │ │ │ └── build_package_integration.sh │ │ └── .gitlab-ci.yml.in │ ├── wrappers │ │ ├── package │ │ │ ├── README.md │ │ │ ├── license.txt │ │ │ ├── share │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── site │ │ │ │ │ └── img │ │ │ │ │ │ └── .gitignore │ │ │ │ ├── cmake │ │ │ │ │ └── .gitignore │ │ │ │ ├── resources │ │ │ │ │ └── .gitignore │ │ │ │ └── ci │ │ │ │ │ └── prepare_wrapper_ci.sh │ │ │ ├── src │ │ │ │ ├── .gitignore │ │ │ │ ├── CMakeLists.txt.system_example │ │ │ │ ├── CMakeLists.txt.version_example │ │ │ │ └── deploy.cmake.example │ │ │ ├── build │ │ │ │ └── .gitignore │ │ │ └── .gitignore │ │ ├── __init__.py.in │ │ ├── b2_pid_config.jam.in │ │ ├── FindExternalPackage.cmake.in │ │ ├── README.md.in │ │ ├── .gitlab-ci.yml.in │ │ ├── CMakeLists.txt.in │ │ └── ci │ │ │ ├── build_wrapper.sh │ │ │ ├── publish_wrapper.sh │ │ │ └── configure_workspace.sh │ ├── environments │ │ ├── environment │ │ │ ├── src │ │ │ │ └── .gitignore │ │ │ ├── build │ │ │ │ └── .gitignore │ │ │ └── .gitignore │ │ ├── README.md.in │ │ └── CMakeLists.txt.in │ ├── frameworks │ │ ├── framework │ │ │ ├── share │ │ │ │ ├── cmake │ │ │ │ │ └── .gitignore │ │ │ │ └── ci │ │ │ │ │ └── prepare_framework_ci.sh │ │ │ ├── build │ │ │ │ └── .gitignore │ │ │ ├── src │ │ │ │ ├── assets │ │ │ │ │ └── .info.txt │ │ │ │ ├── _packages │ │ │ │ │ └── .info.txt │ │ │ │ ├── pages │ │ │ │ │ ├── install.md │ │ │ │ │ ├── more.md │ │ │ │ │ ├── introduction.md │ │ │ │ │ └── tutorial.md │ │ │ │ ├── _external │ │ │ │ │ └── .info.txt │ │ │ │ └── _posts │ │ │ │ │ └── .info.txt │ │ │ └── .gitignore │ │ ├── static │ │ │ ├── _layouts │ │ │ │ ├── welcome.html │ │ │ │ ├── package.html │ │ │ │ ├── external.html │ │ │ │ ├── default.html │ │ │ │ ├── post.html │ │ │ │ └── page.html │ │ │ ├── assets │ │ │ │ ├── img │ │ │ │ │ └── .info.txt │ │ │ │ └── css │ │ │ │ │ └── mobile.scss │ │ │ ├── _includes │ │ │ │ ├── footer.html │ │ │ │ ├── head.html │ │ │ │ ├── sidebar.html │ │ │ │ ├── external-header.html │ │ │ │ └── header.html │ │ │ ├── pages │ │ │ │ ├── contact.md │ │ │ │ ├── activity.html │ │ │ │ └── help.md │ │ │ ├── feed.xml │ │ │ └── index.html │ │ ├── APIDOC_welcome.md.in │ │ ├── ci │ │ │ ├── publish_framework.sh │ │ │ ├── configure_workspace.sh │ │ │ └── build_framework.sh │ │ ├── framework.yml.in │ │ ├── _config.yml.in │ │ ├── external_index.md.in │ │ ├── README.md.in │ │ ├── .gitlab-ci.yml.in │ │ └── CMakeLists.txt.in │ ├── static_sites │ │ ├── package │ │ │ ├── build │ │ │ │ └── .gitignore │ │ │ ├── src │ │ │ │ ├── api_doc │ │ │ │ │ └── .info.txt │ │ │ │ ├── coverage │ │ │ │ │ └── .info.txt │ │ │ │ ├── pages │ │ │ │ │ └── .info.txt │ │ │ │ ├── static_checks │ │ │ │ │ └── .info.txt │ │ │ │ ├── _binaries │ │ │ │ │ └── .info.txt │ │ │ │ └── _posts │ │ │ │ │ └── .info.txt │ │ │ ├── .gitlab-ci.yml │ │ │ └── share │ │ │ │ └── ci │ │ │ │ └── prepare_static_site_ci.sh │ │ ├── static │ │ │ ├── assets │ │ │ │ ├── img │ │ │ │ │ └── .info.txt │ │ │ │ └── css │ │ │ │ │ └── mobile.scss │ │ │ ├── _layouts │ │ │ │ ├── package.html │ │ │ │ ├── default.html │ │ │ │ └── post.html │ │ │ ├── _includes │ │ │ │ ├── footer.html │ │ │ │ └── head.html │ │ │ ├── pages │ │ │ │ ├── activity.html │ │ │ │ ├── binaries.md │ │ │ │ └── help.md │ │ │ ├── index.html │ │ │ └── feed.xml │ │ ├── license.md.in │ │ ├── license_wrapper.md.in │ │ ├── binary.md.in │ │ ├── post.markdown.in │ │ ├── README.md.in │ │ ├── _config.yml.in │ │ ├── CMakeLists.txt.in │ │ ├── package.yml.in │ │ ├── contact.md.in │ │ ├── contact_wrapper.md.in │ │ ├── use.md.in │ │ ├── use_wrapper.md.in │ │ ├── introduction.md.in │ │ ├── ci │ │ │ ├── publish_site.sh │ │ │ ├── configure_workspace.sh │ │ │ └── build_site.sh │ │ ├── binaries.md.in │ │ ├── binaries_wrapper.md.in │ │ ├── index.md.in │ │ ├── introduction_wrapper.md.in │ │ ├── index_wrapper.html.in │ │ ├── install.md.in │ │ ├── install_wrapper.md.in │ │ └── help.md.in │ └── PID_version.cmake.in ├── .docs │ ├── .gitignore │ ├── static │ │ └── css │ │ │ └── cmake.css │ ├── pages │ │ ├── External_API.rst │ │ ├── Framework_API.rst │ │ ├── Use_PID_From_CMake_API.rst │ │ ├── Package_API.rst │ │ ├── Environment_API.rst │ │ ├── Wrapper_API.rst │ │ ├── developers.rst │ │ └── internal.rst │ └── index.rst ├── platforms │ ├── checks │ │ ├── cpu_sse.cpp │ │ ├── cpu_sse2.cpp │ │ ├── abi_check.cpp │ │ ├── cpu_sse42.cpp │ │ ├── cpu_sse3.cpp │ │ ├── cpu_ssse3.cpp │ │ ├── cpu_sse41.cpp │ │ ├── cpu_avx.cpp │ │ ├── cpu_avx2.cpp │ │ ├── cpu_avx512.cpp │ │ ├── cpu_vsx.cpp │ │ ├── cpu_vsx3.cpp │ │ ├── cpu_avx512skx.cpp │ │ ├── cpu_popcnt.cpp │ │ ├── std_lib_version.cpp │ │ ├── cpu_neon.cpp │ │ ├── DetectCudaArch.cu │ │ └── cpu_fp16.cpp │ ├── eval │ │ ├── params_Fortran.cmake │ │ ├── params_Python.cmake │ │ ├── params_CUDA.cmake │ │ ├── eval_ASM.cmake │ │ ├── params_C.cmake │ │ ├── params_CXX.cmake │ │ ├── eval_Fortran.cmake │ │ ├── eval_Python.cmake │ │ └── eval_CUDA.cmake │ ├── CheckARCH.cmake │ ├── FindBazel.cmake │ ├── CheckTYPE.cmake │ └── CheckOS.cmake ├── commands │ ├── Print_Workspace_Path.cmake │ ├── Synchronize_PID_Package_Version.cmake │ ├── Serve_PID_Framework.cmake │ ├── Serve_PID_Package_Site.cmake │ ├── Check_PID_Package_Branch.cmake │ ├── Format_PID_Package_Sources.cmake │ ├── Build_PID_Package_Dependencies.cmake │ ├── PID_Utility_Concat_Staticchecks_Files_Content.cmake │ ├── Generate_PID_Coverage.cmake │ ├── Install_PID_System_Configuration.cmake │ ├── Install_PID_Python_Script.cmake │ ├── Build_PID_Package_Site.cmake │ └── Check_PID_Package_Official_Repository.cmake └── PID_Set_Modules_Path.cmake ├── contributions └── .gitignore ├── sites ├── packages │ └── .gitignore └── frameworks │ └── .gitignore ├── .gitignore ├── pid ├── pid.bat └── share ├── zsh_completions.sh └── bash_completions.sh /install/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /packages/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /wrappers/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /environments/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/license.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/license.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /contributions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /sites/packages/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/share/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/share/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sites/frameworks/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/src/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | 3 | -------------------------------------------------------------------------------- /cmake/.docs/.gitignore: -------------------------------------------------------------------------------- 1 | cmake.pyc 2 | build/ 3 | __pycache__/ -------------------------------------------------------------------------------- /cmake/patterns/environments/environment/src/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/include/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | 3 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/share/doxygen/img/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/share/site/img/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/share/site/img/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/share/cmake/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | 3 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_layouts/welcome.html: -------------------------------------------------------------------------------- 1 | {{ content }} 2 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/share/cmake/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.save 3 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/__init__.py.in: -------------------------------------------------------------------------------- 1 | from @PYTHON_PACKAGE@ import * 2 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/share/cmake/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.save 3 | -------------------------------------------------------------------------------- /cmake/patterns/environments/environment/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | 4 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/share/resources/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.save 3 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | 4 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/share/resources/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.save 3 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | 4 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/assets/img/.info.txt: -------------------------------------------------------------------------------- 1 | Put your images here. 2 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | 4 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/assets/img/.info.txt: -------------------------------------------------------------------------------- 1 | Put your images here. 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | CMakeCache.txt 3 | *.old 4 | .tags* 5 | share/cmake 6 | cmake/system -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_sse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() { return 0; } 3 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_sse2.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() { return 0; } 3 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/src/assets/.info.txt: -------------------------------------------------------------------------------- 1 | Put your assets, like images, in this folder. 2 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/src/_packages/.info.txt: -------------------------------------------------------------------------------- 1 | This folder contains packages related content. 2 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/src/pages/install.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Install 4 | --- 5 | 6 | -------------------------------------------------------------------------------- /cmake/patterns/PID_version.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | set(PID_WORKSPACE_VERSION @PID_SYSTEM_VERSION@ CACHE INTERNAL "") 3 | 4 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/src/pages/more.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Advanced topics 4 | --- 5 | 6 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/src/pages/introduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Introduction 4 | --- 5 | 6 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/src/api_doc/.info.txt: -------------------------------------------------------------------------------- 1 | This folder contains api documentation generated by docygen 2 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/src/pages/tutorial.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Tutorial 4 | --- 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/src/coverage/.info.txt: -------------------------------------------------------------------------------- 1 | This folder contains the coverage report generated by lcov tool 2 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/src/pages/.info.txt: -------------------------------------------------------------------------------- 1 | This folder contains package specific markdown pages of the project 2 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/b2_pid_config.jam.in: -------------------------------------------------------------------------------- 1 | 2 | using @TOOLSET_NAME@ : : @TOOLSET_COMPILER_PATH@ ; 3 | @PYTHON_TOOLSET@ 4 | -------------------------------------------------------------------------------- /cmake/platforms/checks/abi_check.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | void f(std::string s) {} 3 | int main(){ 4 | f("toto"); 5 | } 6 | -------------------------------------------------------------------------------- /cmake/.docs/static/css/cmake.css: -------------------------------------------------------------------------------- 1 | .rst-content dl.variable dt { 2 | background: #ffe4c4; 3 | border-top-color: #ffa235; 4 | } 5 | -------------------------------------------------------------------------------- /cmake/commands/Print_Workspace_Path.cmake: -------------------------------------------------------------------------------- 1 | message(${WORKSPACE_DIR}) 2 | file(WRITE ${CMAKE_BINARY_DIR}/ws_path.txt ${WORKSPACE_DIR}) -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/src/static_checks/.info.txt: -------------------------------------------------------------------------------- 1 | This folder contains static checks report generated by cppcheck tool 2 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/src/_external/.info.txt: -------------------------------------------------------------------------------- 1 | This folder contains external packages related content (only binaries archives). 2 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/src/_binaries/.info.txt: -------------------------------------------------------------------------------- 1 | This folder contains binairies of the package, organized by platform and version 2 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/src/_posts/.info.txt: -------------------------------------------------------------------------------- 1 | 2 | This is the folder where to put posts anytime an activity is made on the framework. 3 | -------------------------------------------------------------------------------- /cmake/patterns/packages/FindPackage.cmake.in: -------------------------------------------------------------------------------- 1 | set(@PROJECT_NAME@_PID_KNOWN_VERSION @FIND_FILE_KNOWN_VERSIONS@) 2 | finding_Package(@PROJECT_NAME@) 3 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/src/_posts/.info.txt: -------------------------------------------------------------------------------- 1 | 2 | This is the folder where to put posts anytime an activity is made on the framework. 3 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.old 3 | CMakeFiles 4 | cmake_install.cmake 5 | Makefile 6 | CMakeCache.txt 7 | /pid 8 | /pid.bat 9 | -------------------------------------------------------------------------------- /cmake/.docs/pages/External_API.rst: -------------------------------------------------------------------------------- 1 | External API 2 | ************ 3 | 4 | .. setmode:: user 5 | 6 | .. cmake-module:: ../../External_Definition.cmake 7 | -------------------------------------------------------------------------------- /cmake/.docs/pages/Framework_API.rst: -------------------------------------------------------------------------------- 1 | Framework API 2 | ************* 3 | 4 | .. setmode:: user 5 | 6 | .. cmake-module:: ../../Framework_Definition.cmake 7 | -------------------------------------------------------------------------------- /cmake/patterns/environments/environment/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.old 3 | CMakeFiles 4 | cmake_install.cmake 5 | Makefile 6 | CMakeCache.txt 7 | /pid 8 | /pid.bat 9 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_sse42.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | unsigned int res = _mm_crc32_u8(1, 2); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/license.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: License 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | @PACKAGE_LICENSE_TEXT_IN_SITE@ 8 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/license_wrapper.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: external 3 | title: License 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | @PACKAGE_LICENSE_TEXT_IN_SITE@ 8 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.old 3 | CMakeFiles 4 | cmake_install.cmake 5 | Makefile 6 | CMakeCache.txt 7 | binaries/ 8 | /pid 9 | /pid.bat 10 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/binary.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | package: @BINARY_PACKAGE@ 3 | version: @BINARY_VERSION@ 4 | platform: @BINARY_PLATFORM@ 5 | date: @BINARY_DATE@ 6 | --- 7 | 8 | -------------------------------------------------------------------------------- /cmake/.docs/pages/Use_PID_From_CMake_API.rst: -------------------------------------------------------------------------------- 1 | API for using PID from CMake 2 | **************************** 3 | 4 | .. setmode:: user 5 | 6 | .. cmake-module:: ../../../Use_PID.cmake 7 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_sse3.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() { 3 | __m128 u, v; 4 | u = _mm_set1_ps(0.0f); 5 | v = _mm_moveldup_ps(u); // SSE3 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.old 3 | CMakeFiles 4 | cmake_install.cmake 5 | Makefile 6 | CMakeCache.txt 7 | /pid 8 | /pid.bat 9 | !pid/ 10 | binary_references.cmake -------------------------------------------------------------------------------- /cmake/patterns/packages/run.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | set script_dir=%~dp0 4 | set PATH=%PATH%;%script_dir%\..\lib;%script_dir%\..\src;%script_dir%\..\.rpath\%~n1 5 | 6 | cmd /C "cd %script_dir% && %*" -------------------------------------------------------------------------------- /cmake/patterns/wrappers/FindExternalPackage.cmake.in: -------------------------------------------------------------------------------- 1 | set(@PROJECT_NAME@_PID_KNOWN_VERSION @FIND_FILE_KNOWN_VERSIONS@) 2 | @FIND_FILE_VERSIONS_COMPATIBLITY@ 3 | finding_External_Package(@PROJECT_NAME@) 4 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_ssse3.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | const double v = 0; 3 | int main() { 4 | __m128i a = _mm_setzero_si128(); 5 | __m128i b = _mm_abs_epi32(a); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_sse41.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() { 3 | __m128i a = _mm_setzero_si128(), b = _mm_setzero_si128(); 4 | __m128i c = _mm_packus_epi32(a, b); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/post.markdown.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "@POST_TITLE@" 4 | date: @POST_DATE@ @POST_HOUR@ 5 | categories: activities 6 | package: @POST_PACKAGE@ 7 | --- 8 | 9 | @POST_UPDATE_STRING@ 10 | 11 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_layouts/package.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |
7 | {% include package-header.html %} 8 | {{ content }} 9 |
10 | 11 |
12 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_layouts/external.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |
7 | {% include external-header.html %} 8 | {{ content }} 9 |
10 | 11 |
12 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_avx.cpp: -------------------------------------------------------------------------------- 1 | #if !defined __AVX__ // MSVC supports this flag since MSVS 2013 2 | #error "__AVX__ define is missing" 3 | #endif 4 | #include 5 | void test() 6 | { 7 | __m256 a = _mm256_set1_ps(0.0f); 8 | } 9 | int main() { return 0; } 10 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/APIDOC_welcome.md.in: -------------------------------------------------------------------------------- 1 | 2 | Overview of @PROJECT_NAME@ {#mainpage} 3 | ========================== 4 | 5 | @CONTENT_OF_DOXY_WELCOME@ 6 | 7 | 8 | The framework provides the following set of packages that contribute to its global API: 9 | 10 | @DOXY_LIST_OF_PACKAGES@ 11 | -------------------------------------------------------------------------------- /cmake/.docs/pages/Package_API.rst: -------------------------------------------------------------------------------- 1 | Package API 2 | *********** 3 | 4 | .. setmode:: user 5 | 6 | .. cmake-module:: ../../Package_Definition.cmake 7 | 8 | Advanced functions 9 | ------------------ 10 | 11 | .. setmode:: user-advanced 12 | 13 | .. cmake-module:: ../../Package_Definition.cmake 14 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/_layouts/package.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |
7 |

{{ page.title }}

8 |
9 | 10 |
11 | {{ content }} 12 |
13 | 14 |
15 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_avx2.cpp: -------------------------------------------------------------------------------- 1 | #if !defined __AVX2__ // MSVC supports this flag since MSVS 2013 2 | #error "__AVX2__ define is missing" 3 | #endif 4 | #include 5 | void test() 6 | { 7 | int data[8] = {0,0,0,0, 0,0,0,0}; 8 | __m256i a = _mm256_loadu_si256((const __m256i *)data); 9 | } 10 | int main() { return 0; } 11 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/README.md.in: -------------------------------------------------------------------------------- 1 | 2 | This repository is used to generate the documentation site of @PACKAGE_NAME@ package. 3 | 4 | It is completely bound to the use of the PID development methodology toolkit. 5 | 6 | Its content is generated from documentation of the @PACKAGE_NAME@ package, please [visit the repository of this package](@PACKAGE_PROJECT_REPOSITORY@) to get more information. 7 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/_config.yml.in: -------------------------------------------------------------------------------- 1 | 2 | # Site settings 3 | 4 | url: "@PACKAGE_SITE_URL@" # the base hostname & protocol for your site 5 | 6 | # Build settings 7 | markdown: kramdown 8 | highlighter: rouge 9 | excerpt_separator: "" 10 | 11 | port: 4000 12 | host: localhost 13 | baseurl: "@PACKAGE_SITE_BASE_FOLDER@" 14 | 15 | collections: 16 | binaries: 17 | output: false 18 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_avx512.cpp: -------------------------------------------------------------------------------- 1 | #if defined __AVX512__ || defined __AVX512F__ 2 | #include 3 | void test() 4 | { 5 | __m512i zmm = _mm512_setzero_si512(); 6 | #if defined __GNUC__ && defined __x86_64__ 7 | asm volatile ("" : : : "zmm16", "zmm17", "zmm18", "zmm19"); 8 | #endif 9 | } 10 | #else 11 | #error "AVX512 is not supported" 12 | #endif 13 | int main() { return 0; } 14 | -------------------------------------------------------------------------------- /cmake/patterns/packages/loggable.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef @PREPROC_GUARD_NAME@ 4 | 5 | #include 6 | 7 | #undef PID_LOG_FRAMEWORK_NAME 8 | #undef PID_LOG_PACKAGE_NAME 9 | #undef PID_LOG_COMPONENT_NAME 10 | 11 | #define PID_LOG_FRAMEWORK_NAME "@FRAMEWORK_NAME@" 12 | #define PID_LOG_PACKAGE_NAME "@PROJECT_NAME@" 13 | #define PID_LOG_COMPONENT_NAME "@COMPONENT_NAME@" 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/ci/publish_framework.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #getting a clean public folder to put site into 4 | if [ ! -d "./public" ]; then 5 | mkdir public 6 | else 7 | cd public && rm -Rf * && cd .. 8 | fi 9 | 10 | cp -R ./build/generated/* ./public/ 11 | 12 | #specific cleaning action to remove generated /_site, if any 13 | if [ -d "./public/_site" ]; then 14 | rm -Rf ./public/_site 15 | fi 16 | -------------------------------------------------------------------------------- /cmake/.docs/pages/Environment_API.rst: -------------------------------------------------------------------------------- 1 | Environment API 2 | *************** 3 | 4 | .. setmode:: user 5 | 6 | .. cmake-module:: ../../Environment_Definition.cmake 7 | 8 | Script functions 9 | ---------------- 10 | 11 | .. setmode:: script 12 | 13 | .. cmake-module:: ../../Environment_Definition.cmake 14 | 15 | 16 | Plugin functions 17 | ---------------- 18 | 19 | .. setmode:: plugin 20 | 21 | .. cmake-module:: ../../Plugin_Definition.cmake 22 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_vsx.cpp: -------------------------------------------------------------------------------- 1 | #if defined(__VSX__) 2 | #if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) 3 | #include 4 | #else 5 | #error "OpenCV only supports little-endian mode" 6 | #endif 7 | #else 8 | #error "VSX is not supported" 9 | #endif 10 | 11 | int main() 12 | { 13 | __vector float testF = vec_splats(0.f); 14 | testF = vec_madd(testF, testF, testF); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /cmake/.docs/pages/Wrapper_API.rst: -------------------------------------------------------------------------------- 1 | Wrapper API 2 | *********** 3 | 4 | .. setmode:: user 5 | 6 | .. cmake-module:: ../../Wrapper_Definition.cmake 7 | 8 | Script functions 9 | ---------------- 10 | 11 | .. setmode:: script 12 | 13 | .. cmake-module:: ../../Wrapper_Definition.cmake 14 | 15 | 16 | Platform Configuration functions 17 | -------------------------------- 18 | 19 | .. setmode:: system 20 | 21 | .. cmake-module:: ../../Configuration_Definition.cmake 22 | -------------------------------------------------------------------------------- /cmake/patterns/packages/APIDOC_welcome.md.in: -------------------------------------------------------------------------------- 1 | 2 | Overview {#mainpage} 3 | ========= 4 | 5 | @README_OVERVIEW@ 6 | 7 | @CONTENT_OF_DOXY_WELCOME@ 8 | 9 | @PACKAGE_LICENSE_FOR_README@ 10 | 11 | 12 | About authors 13 | ===================== 14 | 15 | @PROJECT_NAME@ has been developed by following authors: @README_AUTHORS_LIST@ 16 | 17 | Please contact @README_CONTACT_AUTHOR@ for more information or questions. 18 | 19 | 20 | @PACKAGE_SITE_REF_IN_README@ 21 | 22 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/CMakeLists.txt.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.19.8) 2 | set(WORKSPACE_DIR ${CMAKE_SOURCE_DIR}/../../.. CACHE PATH "root of the workspace directory") 3 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake ${WORKSPACE_DIR}/cmake/api) # using generic scripts/modules of the workspace 4 | include(PID_Framework_API_Internal_Functions NO_POLICY_SCOPE) 5 | 6 | project(@PACKAGE_NAME@) 7 | declare_PID_Site(SITE_URL @PACKAGE_SITE_URL@ PACKAGE_URL @PACKAGE_PROJECT_URL@ @PACKAGE_REGISTRY@) 8 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package.yml.in: -------------------------------------------------------------------------------- 1 | package_name: "@PACKAGE_NAME@" 2 | package_git_project: "@PACKAGE_PROJECT_REPOSITORY_PAGE@" 3 | package_contact_name: "@PACKAGE_MAINTAINER_NAME@" 4 | package_contact_mail: "@PACKAGE_MAINTAINER_MAIL@" 5 | package_description: "@PACKAGE_DESCRIPTION@" 6 | package_logo: "@PACKAGE_LOGO@" 7 | tutorial: "@PACKAGE_TUTORIAL@" 8 | details: "@PACKAGE_DETAILS@" 9 | has_apidoc: @PACKAGE_HAS_API_DOC@ 10 | has_coverage: @PACKAGE_HAS_COVERAGE@ 11 | has_checks: @PACKAGE_HAS_STATIC_CHECKS@ 12 | 13 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 |
8 | {% include header.html %} 9 |
10 |
11 | {{ content }} 12 |
13 |
14 | {% include footer.html %} 15 |
16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_vsx3.cpp: -------------------------------------------------------------------------------- 1 | #if defined(__VSX__) 2 | #if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) 3 | #include 4 | #else 5 | #error "OpenCV only supports little-endian mode" 6 | #endif 7 | #else 8 | #error "VSX3 is not supported" 9 | #endif 10 | 11 | int main() 12 | { 13 | __vector unsigned char a = vec_splats((unsigned char)1); 14 | __vector unsigned char b = vec_splats((unsigned char)2); 15 | __vector unsigned char r = vec_absd(a, b); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/README.md.in: -------------------------------------------------------------------------------- 1 | 2 | Overview 3 | ========= 4 | 5 | @README_OVERVIEW@ 6 | 7 | @WRAPPER_LICENSE_FOR_README@ 8 | 9 | @README_USER_CONTENT@ 10 | 11 | Installation and Usage 12 | ======================= 13 | 14 | @INSTALL_USE_IN_README@ 15 | 16 | About authors 17 | ===================== 18 | 19 | The PID wrapper for @PROJECT_NAME@ has been developed by following authors: @README_AUTHORS_LIST@ 20 | 21 | Please contact @README_CONTACT_AUTHOR@ for more information or questions. 22 | 23 | 24 | @WRAPPER_SITE_REF_IN_README@ 25 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 |
8 | {% include header.html %} 9 |
10 | {% include sidebar.html %} 11 |
12 | {{ content }} 13 |
14 |
15 | {% include footer.html %} 16 |
17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework.yml.in: -------------------------------------------------------------------------------- 1 | framework_name: "@FRAMEWORK_NAME@" 2 | framework_url: "@FRAMEWORK_SITE_URL@/@FRAMEWORK_SITE_BASE_FOLDER@" 3 | framework_git_project: "@FRAMEWORK_PROJECT_REPOSITORY_PAGE@" 4 | framework_contact_name: "@FRAMEWORK_MAINTAINER_NAME@" 5 | framework_contact_mail: "@FRAMEWORK_MAINTAINER_MAIL@" 6 | framework_authors: "@FRAMEWORK_AUTHORS@" 7 | framework_description: "@FRAMEWORK_DESCRIPTION@" 8 | framework_banner_image: "@FRAMEWORK_BANNER@" 9 | framework_logo: "@FRAMEWORK_LOGO@" 10 | framework_welcome: "@FRAMEWORK_WELCOME@" 11 | framework_apidoc: "@FRAMEWORK_APIDOC@" -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_avx512skx.cpp: -------------------------------------------------------------------------------- 1 | #if defined __AVX512__ || defined __AVX512F__ 2 | #include 3 | void test() 4 | { 5 | __m512i zmm = _mm512_setzero_si512(); 6 | __m256i a = _mm256_setzero_si256(); 7 | __m256i b = _mm256_abs_epi64(a); // VL 8 | __m512i c = _mm512_abs_epi8(zmm); // BW 9 | __m512i d = _mm512_broadcast_i32x8(b); // DQ 10 | #if defined __GNUC__ && defined __x86_64__ 11 | asm volatile ("" : : : "zmm16", "zmm17", "zmm18", "zmm19"); 12 | #endif 13 | } 14 | #else 15 | #error "AVX512-SKX is not supported" 16 | #endif 17 | int main() { return 0; } 18 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/_includes/footer.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_includes/footer.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/contact.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: Contact 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | To get information about this site or the way it is managed, please contact @PACKAGE_MAINTAINER_NAME@ 8 | 9 | If you have adequate access rights you can also visit the package [project repository](@PACKAGE_PROJECT_REPOSITORY_PAGE@) and use issue reporting functionalities to interact with all authors. 10 | 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/contact_wrapper.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: external 3 | title: Contact 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | To get information about this site or the way it is managed, please contact @PACKAGE_MAINTAINER_NAME@ 8 | 9 | If you have adequate access rights you can also visit the PID wrapper repository [project repository](@PACKAGE_PROJECT_REPOSITORY_PAGE@) and use issue reporting functionalities to interact with all authors. 10 | 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_popcnt.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | # include 3 | # if defined(_M_X64) 4 | # define CV_POPCNT_U64 _mm_popcnt_u64 5 | # endif 6 | # define CV_POPCNT_U32 _mm_popcnt_u32 7 | #elif defined(__POPCNT__) 8 | # include 9 | # if defined(__x86_64__) 10 | # define CV_POPCNT_U64 __builtin_popcountll 11 | # endif 12 | # define CV_POPCNT_U32 __builtin_popcount 13 | #else 14 | # error "__POPCNT__ is not defined by compiler" 15 | #endif 16 | 17 | int main() 18 | { 19 | #ifdef CV_POPCNT_U64 20 | int i = CV_POPCNT_U64(1); 21 | #endif 22 | int j = CV_POPCNT_U32(1); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/pages/contact.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Contact 4 | --- 5 | 6 | To get information about this site or the way it is managed, please contact {{site.data.framework.framework_contact_name}} 7 | 8 | If you have adequate access rights you can also visit the framework [project repository]({{site.data.framework.framework_git_project}}) and use issue reporting functionnalities to interact with all authors. 9 | 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /cmake/platforms/checks/std_lib_version.cpp: -------------------------------------------------------------------------------- 1 | // #include 2 | #include 3 | #include 4 | 5 | int main(){ 6 | std::stringstream out; 7 | #if defined _LIBCPP_VERSION 8 | int version=(_LIBCPP_VERSION/1000); 9 | int revision=(_LIBCPP_VERSION%1000); 10 | out<<"c++;"< 2 | 3 | #if defined _WIN32 && defined(_M_ARM) 4 | # include 5 | # include 6 | # define CV_NEON 1 7 | #elif defined(__ARM_NEON__) || (defined (__ARM_NEON) && defined(__aarch64__)) 8 | # include 9 | # define CV_NEON 1 10 | #endif 11 | 12 | #if defined CV_NEON 13 | int test() 14 | { 15 | const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f }; 16 | float32x4_t val = vld1q_f32((const float32_t*)(src)); 17 | return (int)vgetq_lane_f32(val, 0); 18 | } 19 | #else 20 | #error "NEON is not supported" 21 | #endif 22 | 23 | int main() 24 | { 25 | printf("%d\n", test()); 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/pages/activity.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Activity 4 | --- 5 | 6 |
7 | 8 |

Recent activities

9 | 10 |
    11 | {% for post in site.posts %} 12 |
  • 13 | 14 | 15 |

    16 | {{ post.title }} 17 |

    18 |
  • 19 | {% endfor %} 20 |
21 | 22 |

subscribe via RSS

23 | 24 |
25 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/pages/activity.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Activity 4 | --- 5 | 6 |
7 | 8 |

Activities

9 | 10 |
    11 | {% for post in site.posts %} 12 |
  • 13 | 14 | 15 |

    16 | {{ post.title }} 17 |

    18 |
  • 19 | {% endfor %} 20 |
21 | 22 |

subscribe via RSS

23 | 24 |
25 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/_config.yml.in: -------------------------------------------------------------------------------- 1 | 2 | # Site settings 3 | 4 | url: "@FRAMEWORK_SITE_URL@" # the base hostname & protocol for the site 5 | 6 | # Build settings 7 | markdown: kramdown 8 | highlighter: rouge 9 | excerpt_separator: "" 10 | 11 | port: 4000 12 | host: localhost 13 | baseurl: "@FRAMEWORK_SITE_BASE_FOLDER@" # the base folder for the site 14 | 15 | 16 | collections: 17 | packages: 18 | output: true 19 | external: 20 | output: true 21 | 22 | defaults: 23 | - scope: 24 | path: "" 25 | type: packages 26 | values: 27 | layout: package 28 | 29 | defaults: 30 | - scope: 31 | path: "" 32 | type: external 33 | values: 34 | layout: external 35 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |
7 |

{{ page.title }}

8 | 9 |
10 | 11 |
12 | {{ content }} 13 |
14 | 15 |
16 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 | 8 | 9 | 20 | 21 |
22 |

{{ page.title }}

23 |
24 | 25 |
26 | {{ content }} 27 |
28 | 29 |
-------------------------------------------------------------------------------- /cmake/patterns/packages/package/apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Use PID_Component below to declare applications and examples 2 | # The full documentation is available here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Package_API.html#pid-component 3 | # 4 | # Common usages for an application and an example, but tweek them to your needs 5 | # 6 | # PID_Component( 7 | # my-app 8 | # DESCRIPTION ... 9 | # DEPEND 10 | # C_STANDARD 11 11 | # CXX_STANDARD 17 12 | # WARNING_LEVEL MORE 13 | # ) 14 | # 15 | # PID_Component( 16 | # my-example 17 | # EXAMPLE 18 | # DESCRIPTION ... 19 | # DEPEND 20 | # C_STANDARD 11 21 | # CXX_STANDARD 17 22 | # WARNING_LEVEL MORE 23 | # ) 24 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | categories: activities 4 | --- 5 |
6 | 7 |
8 |

{{ page.title }}

9 | 10 |
11 | 12 |
13 | {{ content }} 14 |
15 | 16 |
17 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Use PID_Component below to declare tests and run_PID_Test to define how to run them 2 | # The full documentation is available here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Package_API.html 3 | # 4 | # Common usages, but tweek them to your needs 5 | # 6 | # PID_Component( 7 | # my-test 8 | # DESCRIPTION ... 9 | # DEPEND 10 | # C_STANDARD 11 11 | # CXX_STANDARD 17 12 | # WARNING_LEVEL MORE 13 | # ) 14 | # 15 | # run_PID_Test( 16 | # NAME checking-feature-x 17 | # COMPONENT my-test 18 | # ARGUMENTS "foox" "barx" 19 | # ) 20 | # 21 | # run_PID_Test( 22 | # NAME checking-feature-y 23 | # COMPONENT my-test 24 | # ARGUMENTS "fooy" "bary" 25 | # ) 26 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/use.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: Usage 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | ## Import the package 8 | 9 | You can import @PACKAGE_NAME@ as usual with PID. In the root `CMakelists.txt` file of your package, after the package declaration you have to write something like: 10 | 11 | {% highlight cmake %} 12 | PID_Dependency(@PACKAGE_NAME@) 13 | {% endhighlight %} 14 | 15 | It will try to install last version of the package. 16 | 17 | If you want a specific version (recommended), for instance the currently last released version: 18 | 19 | {% highlight cmake %} 20 | PID_Dependency(@PACKAGE_NAME@ VERSION @PACKAGE_LAST_VERSION_WITHOUT_PATCH@) 21 | {% endhighlight %} 22 | 23 | ## Components 24 | 25 | @PACKAGE_COMPONENTS_DESCRIPTION@ 26 | -------------------------------------------------------------------------------- /cmake/patterns/packages/README.md.in: -------------------------------------------------------------------------------- 1 | 2 | @PROJECT_NAME@ 3 | ============== 4 | 5 | @README_OVERVIEW@ 6 | 7 | @README_TABLE_OF_CONTENTS@ 8 | 9 | @README_USER_CONTENT@ 10 | 11 | Package Overview 12 | ================ 13 | 14 | @README_PACKAGE_CONTENT@ 15 | 16 | Installation and Usage 17 | ====================== 18 | 19 | @INSTALL_USE_IN_README@ 20 | 21 | @ONLINE_DOCUMENTATION_IN_README@ 22 | 23 | Offline API Documentation 24 | ========================= 25 | 26 | @API_DOCUMENTATION_IN_README@ 27 | 28 | License 29 | ======= 30 | 31 | @PACKAGE_LICENSE_FOR_README@ 32 | 33 | Authors 34 | ======= 35 | 36 | **@PROJECT_NAME@** has been developed by the following authors: @README_AUTHORS_LIST@ 37 | 38 | Please contact @README_CONTACT_AUTHOR@ for more information or questions. 39 | -------------------------------------------------------------------------------- /cmake/platforms/checks/DetectCudaArch.cu: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int count = 0; 5 | if (cudaSuccess != cudaGetDeviceCount(&count)){return -1;} 6 | if (count == 0) {return -1;} 7 | 8 | printf("%d",count); 9 | for (int device = 0; device < count; ++device) 10 | { 11 | cudaDeviceProp prop; 12 | if (cudaSuccess != cudaGetDeviceProperties(&prop, device)){ continue;} 13 | printf(";%d.%d", prop.major, prop.minor); 14 | } 15 | int driver_version = 0, runtime_version = 0; 16 | if (cudaSuccess != cudaDriverGetVersion(&driver_version)){return -1;} 17 | if (cudaSuccess != cudaRuntimeGetVersion(&runtime_version)){return -1;} 18 | 19 | printf(";%d;%d", driver_version, runtime_version); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Use PID_Component below to declare library or script components and document their usage 2 | # The full documentation is available here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Package_API.html#pid-component 3 | # 4 | # Common usages for a C or C++ library and a Python script, but tweek them to your needs 5 | # 6 | # PID_Component( 7 | # my-lib 8 | # DESCRIPTION ... 9 | # USAGE 10 | # DOCUMENTATION mylib_usage.md 11 | # DEPEND 12 | # EXPORT 13 | # C_STANDARD 11 14 | # CXX_STANDARD 17 15 | # WARNING_LEVEL MORE 16 | # ) 17 | # 18 | # PID_Component( 19 | # my-script 20 | # DESCRIPTION ... 21 | # ) 22 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |

{{site.data.package.package_name}} package documentation

7 |
8 | 9 |
10 | 11 | {{site.data.package.package_description}} 12 | 13 |



14 | 15 |

First steps

16 | 17 | If your are a new user, you can start reading introduction section and installation instructions. Use the documentation tab to access usefull resources to start working with teh package. 18 |
19 |
20 | 21 | To lean more about this site and how it is managed you can refer to this help page. 22 | 23 |



24 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/use_wrapper.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: external 3 | title: Usage 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | ## Import the external package 8 | 9 | You can import @PACKAGE_NAME@ as usual with PID. In the root CMakelists.txt file of your package, after the package declaration you have to write something like: 10 | 11 | {% highlight cmake %} 12 | PID_Dependency(@PACKAGE_NAME@) 13 | {% endhighlight %} 14 | 15 | It will try to install last version of this external package. 16 | 17 | If you want a specific version (recommended), for instance the currently last released version: 18 | 19 | {% highlight cmake %} 20 | PID_Dependency(@PACKAGE_NAME@ VERSION @PACKAGE_LAST_VERSION_WITHOUT_PATCH@) 21 | {% endhighlight %} 22 | 23 | ## Components 24 | 25 | @PACKAGE_COMPONENTS_DESCRIPTION@ 26 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/pages/binaries.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: Binaries 4 | --- 5 | 6 | {% assign all_versions = "" %} 7 | {% unless site.collections.binaries.docs == nil %} 8 | 9 | There is no binary provided for this package ! 10 | 11 | {% else %} 12 | 13 | Available binaries classified by version: 14 | 15 | {% for binary in site.binaries %} 16 | {% unless all_versions contains binary.version %} 17 | ## {{ binary.version }} 18 | 19 | Available for platforms: 20 | {% for bin in site.binaries %} 21 | {% if bin.version == binary.version %} 22 | + {{ bin.platform }} 23 | {% endif %} 24 | {% endfor %} 25 | 26 | {% assign all_versions = all_versions | append: ";" | append: binary.version %} 27 | {% endunless %} 28 | {% endfor %} 29 | {% endunless %} 30 | 31 | 32 | -------------------------------------------------------------------------------- /cmake/.docs/index.rst: -------------------------------------------------------------------------------- 1 | Packages Integral Development (PID) API documentation 2 | ######################################################### 3 | 4 | This documentation covers the CMake API of PID and internal documentation for PID developers. 5 | 6 | .. setmode:: user 7 | 8 | Contents 9 | ######### 10 | 11 | .. toctree:: 12 | :maxdepth: 3 13 | 14 | /pages/Package_API.rst 15 | /pages/Wrapper_API.rst 16 | /pages/Framework_API.rst 17 | /pages/Environment_API.rst 18 | /pages/Use_PID_From_CMake_API.rst 19 | /pages/Package_Files.rst 20 | /pages/internal.rst 21 | /pages/developers.rst 22 | /pages/External_API.rst 23 | 24 | Indices and tables 25 | ################## 26 | 27 | * :ref:`genindex` 28 | * :ref:`search` 29 | 30 | .. * :ref:`modindex` 31 | .. _repository: https://gite.lirmm.fr/pid/pid-workspace 32 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/introduction.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: Introduction 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | @PACKAGE_DESCRIPTION@ 8 | 9 | # General Information 10 | 11 | ## Authors 12 | 13 | Package manager: @PACKAGE_MAINTAINER_NAME@ 14 | 15 | Authors of this package: 16 | @PACKAGE_ALL_AUTHORS@ 17 | 18 | ## License 19 | 20 | The license of the current release version of @PACKAGE_NAME@ package is : **@PACKAGE_LICENSE_FOR_SITE@**. It applies to the whole package content. 21 | 22 | For more details see [license file](license.html). 23 | 24 | ## Version 25 | 26 | Current version (for which this documentation has been generated) : @PACKAGE_LAST_VERSION_WITH_PATCH@. 27 | 28 | ## Categories 29 | 30 | @PACKAGE_CATEGORIES_LIST@ 31 | 32 | # Dependencies 33 | 34 | @PACKAGE_DEPENDENCIES_DESCRIPTION@ 35 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/external_index.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: external 3 | categories: @EXTERNAL_PACKAGE_CATEGORIES@ 4 | package: @EXTERNAL_PACKAGE_NAME@ 5 | --- 6 | 7 | ## @EXTERNAL_PACKAGE_NAME@ external package 8 | 9 |
10 | 11 | @EXTERNAL_PACKAGE_NAME@ is a third party project that has been wrapped into a PID **external package**. 12 | 13 | ### Purpose 14 | 15 | @EXTERNAL_PACKAGE_DESCRIPTION@ 16 | 17 | ### About @EXTERNAL_PACKAGE_NAME@ 18 | 19 | @EXTERNAL_PACKAGE_NAME@ has been developed by @EXTERNAL_PACKAGE_AUTHORS@. 20 | 21 | @EXTERNAL_PACKAGE_NAME@ has been developed under license: @EXTERNAL_PACKAGE_LICENSE@. 22 | 23 | ## Available binaries 24 | 25 | Here are the PID binary archives provided by the @FRAMEWORK_NAME@ framework for the @EXTERNAL_PACKAGE_NAME@ project: 26 | 27 | @EXTERNAL_PACKAGE_BINARIES@ 28 | 29 |



30 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | 2 | stages: 3 | - build 4 | - deploy 5 | 6 | ### configure (CMake project configuration) and build (generate, install) 7 | build_site: 8 | stage: build 9 | script: 10 | - chmod 700 ./share/ci/prepare_static_site_ci.sh 11 | - ./share/ci/prepare_static_site_ci.sh 12 | - ./configure_workspace.sh 13 | - ./build_site.sh 14 | - ./publish_site.sh 15 | artifacts: 16 | paths: 17 | - public 18 | only: 19 | - master 20 | interruptible: true 21 | tags: 22 | - pid 23 | - site 24 | 25 | 26 | ### upload the static site (using gitlab pages) 27 | pages: 28 | stage: deploy 29 | script: 30 | - echo "[PID] generating static web site" 31 | artifacts: 32 | paths: 33 | - public 34 | only: 35 | - master 36 | interruptible: true 37 | tags: 38 | - pid 39 | - site 40 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/src/CMakeLists.txt.system_example: -------------------------------------------------------------------------------- 1 | # All the functions commented below are documented here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Wrapper_API.html 2 | # Ellipses (...) suggest you to read the documentation to find the appropriate syntax 3 | # Only PID_Wrapper_System_Configuration and PID_Wrapper_System_Configuration_Constraints are mandatory 4 | # 5 | # Common usage but tweek it to your needs 6 | # 7 | # PID_Wrapper_System_Configuration( 8 | # EVAL eval.cmake 9 | # VARIABLES ... 10 | # VALUES ... 11 | # ... 12 | # ) 13 | # 14 | # PID_Wrapper_System_Configuration_Constraints( 15 | # IN_BINARY ... 16 | # VALUE ... 17 | # ) 18 | # 19 | # If dependencies to other system configurations exist, specify them with: 20 | # PID_Wrapper_System_Configuration_Dependencies( 21 | # other_config_1 22 | # other_config_2 23 | # ) 24 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/README.md.in: -------------------------------------------------------------------------------- 1 | 2 | This repository is used to manage the lifecycle of @FRAMEWORK_NAME@ framework. 3 | In the PID methodology a framework is a group of packages used in a given domain that are published (API, release binaries) in a common frame. 4 | To get more info about PID please visit [this site](http://pid.lirmm.net/pid-framework/). 5 | 6 | Purpose 7 | ========= 8 | 9 | @README_OVERVIEW@ 10 | 11 | 12 | This repository has been used to generate the static site of the framework. 13 | 14 | Please visit @FRAMEWORK_SITE@ to view the result and get more information. 15 | 16 | License 17 | ========= 18 | 19 | @LICENSE_FOR_README@ 20 | 21 | 22 | About authors 23 | ===================== 24 | 25 | @FRAMEWORK_NAME@ is maintained by the following contributors: @README_AUTHORS_LIST@ 26 | 27 | Please contact @README_CONTACT_AUTHOR@ for more information or questions. 28 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/.gitlab-ci.yml.in: -------------------------------------------------------------------------------- 1 | variables: 2 | FRAMEWORK_CONTRIBUTION_SPACES: "@FRAMEWORK_CI_CONTRIBUTION_SPACES@" 3 | 4 | stages: 5 | - build 6 | - deploy 7 | 8 | ### build (CMake project configuration) 9 | build_framework: 10 | stage: build 11 | script: 12 | - chmod 700 ./share/ci/prepare_framework_ci.sh 13 | - ./share/ci/prepare_framework_ci.sh 14 | - ./configure_workspace.sh 15 | - ./build_framework.sh 16 | - ./publish_framework.sh 17 | artifacts: 18 | paths: 19 | - public 20 | only: 21 | - master 22 | tags: 23 | - pid 24 | - site 25 | interruptible: true 26 | 27 | ### upload the static site (using gitlab pages) 28 | pages: 29 | stage: deploy 30 | script: 31 | - echo "[PID] generating static web site" 32 | artifacts: 33 | paths: 34 | - public 35 | only: 36 | - master 37 | tags: 38 | - pid 39 | - site 40 | interruptible: true 41 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/ci/publish_site.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "--------------------------------------------------------------" 4 | echo "----[PID] CI : publishing static site ------------------------" 5 | echo "--------------------------------------------------------------" 6 | 7 | #getting a clean public folder to put site into 8 | if [ ! -d "./public" ]; then 9 | mkdir public 10 | else 11 | cd public && rm -Rf * && cd .. 12 | fi 13 | #if something generated then proceed 14 | if [ -d "./build/generated" ]; then 15 | cp -R ./build/generated/* ./public/ 16 | 17 | #specific cleaning action to remove generated /_site, if any 18 | if [ -d "./public/_site" ]; then 19 | rm -Rf ./public/_site 20 | fi 21 | fi 22 | 23 | echo "--------------------------------------------------------------" 24 | echo "----[PID] CI : publishing static site: SUCCESS ---------------" 25 | echo "--------------------------------------------------------------" 26 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/.gitlab-ci.yml.in: -------------------------------------------------------------------------------- 1 | variables: 2 | PACKAGE_HAS_SITE: "@PACKAGE_CI_HAS_SITE@" 3 | PACKAGE_BINARIES_PUBLISHED: "@PACKAGE_CI_PUBLISH_BINARIES@" 4 | PACKAGE_MAIN_PLATFORM: "@PACKAGE_CI_MAIN_PLATFORM@" 5 | PACKAGE_CONTRIBUTION_SPACES: "@PACKAGE_CI_CONTRIBUTION_SPACES@" 6 | 7 | stages: 8 | - build 9 | 10 | ############ generic jobs patterns ############# 11 | 12 | .build_wrapper_: &build_wrapper 13 | stage: build 14 | script: 15 | - chmod 700 ./share/ci/prepare_wrapper_ci.sh 16 | - ./share/ci/prepare_wrapper_ci.sh 17 | - ./configure_workspace.sh "$CI_RUNNER_TAGS" $CI_JOB_NAME 18 | - ./build_wrapper.sh $CI_COMMIT_TAG 19 | - ./publish_wrapper.sh $CI_COMMIT_TAG $CI_JOB_NAME 20 | only: 21 | - /^v.*$/ 22 | interruptible: true 23 | 24 | ############ patterns for platforms selection ############# 25 | # here the project generates patterns for runner selection according to platforms defined in CI for the wrapper 26 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/binaries.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: Binaries 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | {% assign all_versions = "" %} 8 | {% for package in site.packages %} 9 | {% if package.path contains 'binary' and package.package == page.package and package.version %} 10 | {% unless all_versions contains package.version %} 11 | 12 | ## {{ package.version }} 13 | 14 | Available for platforms: 15 | {% for binary in site.packages %} 16 | 17 | {% if binary.path contains 'binary' and package.package == binary.package and package.version == binary.version %} 18 | + {{ binary.platform }} 19 | {% endif %} 20 | {% endfor %} 21 | 22 | {% assign all_versions = all_versions | append: ";" | append: package.version %} 23 | {% endunless %} 24 | {% endif %} 25 | {% endfor %} 26 | 27 | {% if all_versions == "" %} 28 | 29 | There is no binary provided for this package ! 30 | 31 | {% endif %} 32 | 33 |




34 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/binaries_wrapper.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: external 3 | title: Binaries 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | {% assign all_versions = "" %} 8 | {% for package in site.external %} 9 | {% if package.path contains 'binary' and package.package == page.package and package.version %} 10 | {% unless all_versions contains package.version %} 11 | 12 | ## {{ package.version }} 13 | 14 | Available for platforms: 15 | {% for binary in site.external %} 16 | 17 | {% if binary.path contains 'binary' and package.package == binary.package and package.version == binary.version %} 18 | + {{ binary.platform }} 19 | {% endif %} 20 | {% endfor %} 21 | 22 | {% assign all_versions = all_versions | append: ";" | append: package.version %} 23 | {% endunless %} 24 | {% endif %} 25 | {% endfor %} 26 | 27 | {% if all_versions == "" %} 28 | 29 | There is no binary provided for this package ! 30 | 31 | {% endif %} 32 | 33 |




34 | -------------------------------------------------------------------------------- /cmake/platforms/checks/cpu_fp16.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if defined __F16C__ || (defined _MSC_VER && _MSC_VER >= 1700 && defined __AVX__) || (defined __INTEL_COMPILER && defined __AVX__) 4 | #include 5 | int test() 6 | { 7 | const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f }; 8 | short dst[8]; 9 | __m128 v_src = _mm_load_ps(src); 10 | __m128i v_dst = _mm_cvtps_ph(v_src, 0); 11 | _mm_storel_epi64((__m128i*)dst, v_dst); 12 | return (int)dst[0]; 13 | } 14 | #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) 15 | #include "arm_neon.h" 16 | int test() 17 | { 18 | const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f }; 19 | short dst[8]; 20 | float32x4_t v_src = *(float32x4_t*)src; 21 | float16x4_t v_dst = vcvt_f16_f32(v_src); 22 | *(float16x4_t*)dst = v_dst; 23 | return (int)dst[0]; 24 | } 25 | #else 26 | #error "FP16 is not supported" 27 | #endif 28 | 29 | int main() 30 | { 31 | printf("%d\n", test()); 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/ci/configure_workspace.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | #first step is initializing the workspace 5 | echo "--------------------------------------------------------------" 6 | echo "----[PID] CI : configuring workspace ... -----------------" 7 | echo "--------------------------------------------------------------" 8 | 9 | # 1) first time configuration 10 | cd binaries/pid-workspace/build 11 | cmake -DIN_CI_PROCESS=ON .. 12 | CONFIGURE_RES=$? 13 | cd ../../.. 14 | if [ $CONFIGURE_RES != 0 ]; then 15 | echo "--------------------------------------------------------------" 16 | echo "----[PID] CI : configuring workspace: FAIL -------------------" 17 | echo "--------------------------------------------------------------" 18 | exit $CONFIGURE_RES 19 | fi 20 | 21 | echo "--------------------------------------------------------------" 22 | echo "----[PID] CI : configuring workspace: SUCCESS ----------------" 23 | echo "--------------------------------------------------------------" 24 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/ci/configure_workspace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #first step is initializing the workspace 4 | echo "--------------------------------------------------------------" 5 | echo "----[PID] CI : configuring workspace ... -----------------" 6 | echo "--------------------------------------------------------------" 7 | 8 | # 1) first time configuration 9 | cd binaries/pid-workspace/build 10 | cmake -DIN_CI_PROCESS=ON -DFORCE_CONTRIBUTION_SPACES="$FRAMEWORK_CONTRIBUTION_SPACES" .. 11 | CONFIGURE_RES=$? 12 | cd ../../.. 13 | if [ $CONFIGURE_RES != 0 ]; then 14 | echo "--------------------------------------------------------------" 15 | echo "----[PID] CI : configuring workspace: FAIL -------------------" 16 | echo "--------------------------------------------------------------" 17 | exit $CONFIGURE_RES 18 | fi 19 | 20 | echo "--------------------------------------------------------------" 21 | echo "----[PID] CI : configuring workspace: SUCCESS ----------------" 22 | echo "--------------------------------------------------------------" 23 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/index.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | categories: @PACKAGE_CATEGORIES@ 4 | package: @PACKAGE_NAME@ 5 | tutorial: @PACKAGE_TUTORIAL@ 6 | details: @PACKAGE_DETAILS@ 7 | has_apidoc: @PACKAGE_HAS_API_DOC@ 8 | has_checks: @PACKAGE_HAS_STATIC_CHECKS@ 9 | has_coverage: @PACKAGE_HAS_COVERAGE@ 10 | --- 11 | 12 |
13 |

Welcome to {{ page.package }} package !

14 |
15 | 16 |
17 | 18 | @PACKAGE_DESCRIPTION@ 19 | 20 | @PACKAGE_README@ 21 | 22 |



23 | 24 |

First steps

25 | 26 | If your are a new user, you can start reading introduction section and installation instructions. Use the documentation tab to access useful resources to start working with the package. 27 |
28 |
29 | 30 | To lean more about this site and how it is managed you can refer to this help page. 31 | 32 |



33 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/introduction_wrapper.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: external 3 | title: Introduction 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | @PACKAGE_DESCRIPTION@ 8 | 9 | # General Information 10 | 11 | ## Authors 12 | 13 | External package wrapper manager: @PACKAGE_MAINTAINER_NAME@ 14 | 15 | Authors of this package: 16 | @PACKAGE_ALL_AUTHORS@ 17 | 18 | ## License 19 | 20 | The license of @PACKAGE_NAME@ PID wrapper is : **@PACKAGE_LICENSE_FOR_SITE@**. It applies to the whole wrapper content BUT DOES NOT APPLY to the content coming from the @PACKAGE_NAME@ original project. 21 | For more details see [license file](license.html). 22 | 23 | The content of the original project @PACKAGE_NAME@ has its own licenses: @PACKAGE_ORIGINAL_PROJECT_LICENSES@. More information can be found at @PACKAGE_ORIGINAL_PROJECT_SITE@. 24 | 25 | ## Version 26 | 27 | Current version (for which this documentation has been generated) : @PACKAGE_LAST_VERSION_WITH_PATCH@. 28 | 29 | ## Categories 30 | 31 | @PACKAGE_CATEGORIES_LIST@ 32 | 33 | # Dependencies 34 | 35 | @PACKAGE_DEPENDENCIES_DESCRIPTION@ 36 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/src/CMakeLists.txt.version_example: -------------------------------------------------------------------------------- 1 | # All the functions commented below are documented here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Wrapper_API.html 2 | # Ellipses (...) suggest you to read the documentation to find the appropriate syntax 3 | # Only PID_Wrapper_Version and PID_Wrapper_Component are mandatory 4 | # 5 | # Common usage but tweek it to your needs 6 | # 7 | # PID_Wrapper_Version( 8 | # x.y.z 9 | # DEPLOY deploy.cmake 10 | # ... 11 | # ) 12 | # 13 | # If system configurations (e.g system libraries) are required, specify them with: 14 | # PID_Wrapper_Configuration(...) 15 | # 16 | # If checks on the build environment (e.g needed tool, compiler version, etc) are needed, use: 17 | # PID_Wrapper_Environment(...) 18 | # 19 | # PID_Wrapper_Component( 20 | # wrapped-component 21 | # INCLUDES 22 | # SHARED_LINKS 23 | # STATIC_LINKS 24 | # DEPEND 25 | # EXPORT 26 | # C_STANDARD ... 27 | # CXX_STANDARD ... 28 | # ) 29 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/src/deploy.cmake.example: -------------------------------------------------------------------------------- 1 | # All the functions commented below are documented here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Wrapper_API.html#script-functions 2 | # Ellipses (...) suggest you to read the documentation to find the appropriate syntax 3 | # 4 | # Common usage but tweek it to your needs 5 | # 6 | # install_External_Project( 7 | # PROJECT wrapped-project 8 | # VERSION x.y.z 9 | # URL ... 10 | # ARCHIVE ... 11 | # FOLDER ... 12 | # ) 13 | # 14 | # Depending on the wrapped project's build system you may call: 15 | # - build_CMake_External_Project(...) 16 | # - build_Autotools_External_Project(...) 17 | # - build_B2_External_Project(...) 18 | # - build_Waf_External_Project(...) 19 | # - build_Bazel_External_Project(...) 20 | # - execute_process(...) if none of the above applies 21 | # 22 | # Check that the installation was successful: 23 | # if(NOT EXISTS ${TARGET_INSTALL_DIR}/lib OR NOT EXISTS ${TARGET_INSTALL_DIR}/include) 24 | # message("[PID] ERROR : failed to install wrapped-project version x.y.z in the worskpace.") 25 | # return_External_Project_Error() 26 | # endif() 27 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/index_wrapper.html.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: external 3 | categories: @PACKAGE_CATEGORIES@ 4 | package: @PACKAGE_NAME@ 5 | tutorial: false 6 | details: @PACKAGE_DETAILS@ 7 | has_apidoc: false 8 | has_checks: false 9 | has_coverage: false 10 | --- 11 | 12 |
13 |

{{ page.package }} external package wrapper documentation

14 |
15 | 16 |
17 | 18 | @PACKAGE_DESCRIPTION@ 19 | 20 |



21 | 22 |

First steps

23 | 24 | If your are a new user, you can start reading introduction section and installation instructions. Use the documentation tab to access useful resources to start working with the package. 25 |
26 | 27 | To get complete documentation about @PACKAGE_NAME@ please visit the official website of the project 28 | 29 |
30 | 31 | To lean more about this site and how it is managed you can refer to this help page. 32 | 33 |



34 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% if page.title %}{{ page.title | escape }} - {{ site.framework_name | escape }}{% else %}{{ site.framework_name | escape }}{% endif %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% if page.title %}{{ page.title | escape }} - {{ site.framework_name | escape }}{% else %}{{ site.framework_name | escape }}{% endif %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/CMakeLists.txt.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.19.8) 2 | set(WORKSPACE_DIR ${CMAKE_SOURCE_DIR}/../../.. CACHE PATH "root of the PID workspace directory") 3 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) # using generic scripts/modules of the workspace 4 | include(Framework_Definition NO_POLICY_SCOPE) 5 | 6 | project(@FRAMEWORK_NAME@) 7 | 8 | PID_Framework( 9 | AUTHOR @FRAMEWORK_AUTHOR@ 10 | YEAR @FRAMEWORK_YEARS@ 11 | LICENSE @FRAMEWORK_CONTENT_META@ 12 | DESCRIPTION @FRAMEWORK_DESCRIPTION@ 13 | # You should list the categories defined by the framework to allow the resulting static 14 | # site to classify packages and wrappers belonging to this framework 15 | # CATEGORIES category 16 | # category/subcategory 17 | # ... 18 | ) 19 | 20 | # All the functions commented below documented here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Framework_API.html 21 | # Ellipses (...) suggest you to read the documentation to find the appropriate syntax 22 | # 23 | # You can declare additional authors with: 24 | # PID_Framework_Author(AUTHOR John Doe ...) 25 | 26 | build_PID_Framework() 27 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/assets/css/mobile.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | // Navigation Sidebar 5 | #nav-button{ 6 | display: block; 7 | position: fixed; 8 | left: 0; 9 | margin-top: 25px; 10 | border: 1px solid #CCC; 11 | border-radius: 0 6px 6px 0; 12 | background-color: #EEEEEE; 13 | padding: 10px 6px; 14 | width: 1em; 15 | height: 3em; 16 | color: #333333; 17 | font-weight: bold; 18 | font-size: 0.85em; 19 | word-wrap: break-word; 20 | line-height: 1; 21 | text-align: center; 22 | text-decoration: none; 23 | box-sizing: content-box; 24 | transition: left 0.3s ease-in-out; 25 | z-index: 10; 26 | } 27 | #nav-button:visited, 28 | #nav-button:hover, 29 | #nav-button:active{ 30 | text-decoration: none; 31 | } 32 | 33 | #nav-button.open{ 34 | left: 240px; 35 | } 36 | 37 | nav.sidebar{ 38 | position: fixed; 39 | top: 70px; 40 | bottom: 0; 41 | left: -240px; 42 | width: 240px; 43 | color: #000000; 44 | overflow-y: auto; 45 | transition: left 0.3s ease-in-out; 46 | z-index: 10; 47 | } 48 | nav.sidebar.open{ 49 | left: 0; 50 | } 51 | 52 | // Article 53 | div.article-container{ 54 | width: 100%; 55 | 56 | .license-notice{ 57 | width: 100%; 58 | } 59 | } 60 | 61 | // Really small mobile, think iPhone 5 or earlier 62 | @media screen and (max-width: 500px){ 63 | 64 | body.homepage div.category-section{ 65 | width: 100%; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/assets/css/mobile.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | // Navigation Sidebar 5 | #nav-button{ 6 | display: block; 7 | position: fixed; 8 | left: 0; 9 | margin-top: 25px; 10 | border: 1px solid #CCC; 11 | border-radius: 0 6px 6px 0; 12 | background-color: #EEEEEE; 13 | padding: 10px 6px; 14 | width: 1em; 15 | height: 3em; 16 | color: #333333; 17 | font-weight: bold; 18 | font-size: 0.85em; 19 | word-wrap: break-word; 20 | line-height: 1; 21 | text-align: center; 22 | text-decoration: none; 23 | box-sizing: content-box; 24 | transition: left 0.3s ease-in-out; 25 | z-index: 10; 26 | } 27 | #nav-button:visited, 28 | #nav-button:hover, 29 | #nav-button:active{ 30 | text-decoration: none; 31 | } 32 | 33 | #nav-button.open{ 34 | left: 240px; 35 | } 36 | 37 | nav.sidebar{ 38 | position: fixed; 39 | top: 70px; 40 | bottom: 0; 41 | left: -240px; 42 | width: 240px; 43 | color: #000000; 44 | overflow-y: auto; 45 | transition: left 0.3s ease-in-out; 46 | z-index: 10; 47 | } 48 | nav.sidebar.open{ 49 | left: 0; 50 | } 51 | 52 | // Article 53 | div.article-container{ 54 | width: 100%; 55 | 56 | .license-notice{ 57 | width: 100%; 58 | } 59 | } 60 | 61 | // Really small mobile, think iPhone 5 or earlier 62 | @media screen and (max-width: 500px){ 63 | 64 | body.homepage div.category-section{ 65 | width: 100%; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/CMakeLists.txt.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.19.8) 2 | set(WORKSPACE_DIR ${CMAKE_SOURCE_DIR}/../.. CACHE PATH "root of the PID workspace directory") 3 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) # using generic scripts/modules of the workspace 4 | include(Wrapper_Definition NO_POLICY_SCOPE) 5 | 6 | project(@WRAPPER_NAME@) 7 | 8 | PID_Wrapper( 9 | AUTHOR @WRAPPER_AUTHOR@ 10 | YEAR @WRAPPER_YEARS@ 11 | LICENSE @WRAPPER_CONTENT_META@ 12 | DESCRIPTION @WRAPPER_DESCRIPTION@ 13 | ) 14 | 15 | # All the functions commented below are optional and documented here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Wrapper_API.html 16 | # Ellipses (...) suggest you to read the documentation to find the appropriate syntax 17 | # 18 | # Give information on the original project with: 19 | # PID_Original_Project( 20 | # AUTHORS ... 21 | # LICENSES ... 22 | # URL ... 23 | # ) 24 | # 25 | # You can declare additional authors with: 26 | # PID_Wrapper_Author(AUTHOR John Doe ...) 27 | # 28 | # You may define options to configure the build using: 29 | # PID_Wrapper_Option(...) 30 | # 31 | # Declare the wrapper dependencies using: 32 | # PID_Wrapper_Dependency(package-name ...) 33 | # 34 | # Publish the documentation, and optionally binaries, online with: 35 | # PID_Wrapper_Publishing(...) 36 | 37 | build_PID_Wrapper() 38 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/ci/build_site.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "--------------------------------------------------------------" 4 | echo "----[PID] CI : building static site --------------------------" 5 | echo "--------------------------------------------------------------" 6 | 7 | # updating binaries 8 | git lfs pull origin master 9 | 10 | # setting the adequate path to the workspace and configuring 11 | cd build 12 | cmake -DWORKSPACE_DIR="../binaries/pid-workspace" .. 13 | CONFIGURE_RES=$? 14 | if [ $CONFIGURE_RES != 0 ]; then 15 | cd .. 16 | echo "--------------------------------------------------------------" 17 | echo "----[PID] CI : building static site: FAIL (configuration) ----" 18 | echo "--------------------------------------------------------------" 19 | exit $CONFIGURE_RES 20 | fi 21 | 22 | # build the site 23 | cmake --build . --target build 24 | BUILD_RES=$? 25 | cd .. 26 | if [ $BUILD_RES != 0 ]; then 27 | echo "--------------------------------------------------------------" 28 | echo "----[PID] CI : building static site: FAIL --------------------" 29 | echo "--------------------------------------------------------------" 30 | exit $BUILD_RES 31 | fi 32 | 33 | echo "--------------------------------------------------------------" 34 | echo "----[PID] CI : building static site: SUCCESS -----------------" 35 | echo "--------------------------------------------------------------" 36 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | 5 | 6 | 7 | {{ site.title | xml_escape }} 8 | {{ site.description | xml_escape }} 9 | {{ site.url }}{{ site.baseurl }}/ 10 | 11 | {{ site.time | date_to_rfc822 }} 12 | {{ site.time | date_to_rfc822 }} 13 | Jekyll v{{ jekyll.version }} 14 | {% for post in site.posts limit:10 %} 15 | 16 | {{ post.title | xml_escape }} 17 | {{ post.content | xml_escape }} 18 | {{ post.date | date_to_rfc822 }} 19 | {{ post.url | prepend: site.baseurl | prepend: site.url }} 20 | {{ post.url | prepend: site.baseurl | prepend: site.url }} 21 | {% for tag in post.tags %} 22 | {{ tag | xml_escape }} 23 | {% endfor %} 24 | {% for cat in post.categories %} 25 | {{ cat | xml_escape }} 26 | {% endfor %} 27 | 28 | {% endfor %} 29 | 30 | 31 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | 5 | 6 | 7 | {{ site.title | xml_escape }} 8 | {{ site.description | xml_escape }} 9 | {{ site.url }}{{ site.baseurl }}/ 10 | 11 | {{ site.time | date_to_rfc822 }} 12 | {{ site.time | date_to_rfc822 }} 13 | Jekyll v{{ jekyll.version }} 14 | {% for post in site.posts limit:10 %} 15 | 16 | {{ post.title | xml_escape }} 17 | {{ post.content | xml_escape }} 18 | {{ post.date | date_to_rfc822 }} 19 | {{ post.url | prepend: site.baseurl | prepend: site.url }} 20 | {{ post.url | prepend: site.baseurl | prepend: site.url }} 21 | {% for tag in post.tags %} 22 | {{ tag | xml_escape }} 23 | {% endfor %} 24 | {% for cat in post.categories %} 25 | {{ cat | xml_escape }} 26 | {% endfor %} 27 | 28 | {% endfor %} 29 | 30 | 31 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/ci/build_framework.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | echo "--------------------------------------------------------------" 5 | echo "----[PID] CI : building framework site ... -------------------" 6 | echo "--------------------------------------------------------------" 7 | 8 | # setting the adequate path to the workspace and configuring 9 | cd build 10 | cmake -DWORKSPACE_DIR="../binaries/pid-workspace" .. 11 | CONFIGURE_RES=$? 12 | cd .. 13 | 14 | if [ $CONFIGURE_RES != 0 ]; then 15 | echo "--------------------------------------------------------------" 16 | echo "----[PID] CI : building framework: FAIL (configuration) ------" 17 | echo "--------------------------------------------------------------" 18 | exit $CONFIGURE_RES 19 | fi 20 | 21 | # force updating binaries 22 | git lfs pull official master 23 | 24 | # build the site 25 | cd build 26 | cmake --build . --target build 27 | BUILD_RES=$? 28 | cd .. 29 | if [ $BUILD_RES != 0 ]; then 30 | echo "--------------------------------------------------------------" 31 | echo "----[PID] CI : building framework : FAIL (build site) --------" 32 | echo "--------------------------------------------------------------" 33 | exit $BUILD_RES 34 | fi 35 | 36 | echo "--------------------------------------------------------------" 37 | echo "----[PID] CI : building framework : SUCCESS ------------------" 38 | echo "--------------------------------------------------------------" 39 | -------------------------------------------------------------------------------- /cmake/patterns/packages/CMakeLists.txt.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.19.8) 2 | set(WORKSPACE_DIR ${CMAKE_SOURCE_DIR}/../.. CACHE PATH "root of the PID workspace directory") 3 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) # using generic scripts/modules of the workspace 4 | include(Package_Definition NO_POLICY_SCOPE) 5 | 6 | project(@PACKAGE_NAME@) 7 | 8 | PID_Package( 9 | AUTHOR @PACKAGE_AUTHOR@ 10 | YEAR @PACKAGE_YEARS@ 11 | LICENSE @PACKAGE_CONTENT_META@ 12 | DESCRIPTION @PACKAGE_DESCRIPTION@ 13 | VERSION 0.0.0 14 | ) 15 | 16 | # All the functions commented below are optional and documented here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Package_API.html 17 | # Ellipses (...) suggest you to read the documentation to find the appropriate syntax 18 | # 19 | # You can declare additional authors with: 20 | # PID_Author(AUTHOR John Doe ...) 21 | # 22 | # Add necessary checks on your build environment (e.g needed tool, compiler version, etc) using: 23 | # check_PID_Environment(...) 24 | # 25 | # Specify contraints on the target environment (e.g system configuration, OS, CPU architecture, etc) with: 26 | # check_PID_Platform(...) 27 | # 28 | # Declare your package dependencies using: 29 | # PID_Dependency(package-name ...) 30 | # 31 | # Publish your documentation, and optionally binaries, online with: 32 | # PID_Publishing(...) 33 | 34 | build_PID_Package() 35 | -------------------------------------------------------------------------------- /cmake/patterns/environments/CMakeLists.txt.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.19.8) 2 | set(WORKSPACE_DIR ${CMAKE_SOURCE_DIR}/../.. CACHE PATH "root of the PID workspace directory") 3 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) # using generic scripts/modules of the workspace 4 | include(Environment_Definition NO_POLICY_SCOPE) 5 | 6 | project(@ENVIRONMENT_NAME@ C CXX ASM) 7 | 8 | PID_Environment( 9 | AUTHOR @ENVIRONMENT_AUTHOR@ 10 | YEAR @ENVIRONMENT_YEARS@ 11 | LICENSE @ENVIRONMENT_CONTENT_META@ 12 | DESCRIPTION @ENVIRONMENT_DESCRIPTION@ 13 | ) 14 | 15 | # All the functions commented below documented here https://pid.lirmm.net/pid-framework/assets/apidoc/html/pages/Environment_API.html 16 | # Ellipses (...) suggest you to read the documentation to find the appropriate syntax 17 | # 18 | # You can declare additional authors with: 19 | # PID_Environment_Author(AUTHOR John Doe ...) 20 | # 21 | # You can specify on which platform this environment has to be evaluated using: 22 | # PID_Environment_Platform(...) 23 | # 24 | # Specify your environment evaluation script and its options with: 25 | # PID_Environment_Constraints(...) 26 | # 27 | # To specify how to configure the environment for a given platform use: 28 | # PID_Environment_Solution(...) 29 | # 30 | # You may add dependencies to other environments using: 31 | # PID_Environment_Dependencies(other-environment) 32 | 33 | build_PID_Environment() 34 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/ci/build_wrapper.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | echo "--------------------------------------------------------------" 5 | echo "----[PID] CI : building wrapper ------------------------------" 6 | echo "--------------------------------------------------------------" 7 | 8 | # setting the adequate path to the workspace 9 | cd build 10 | cmake -DWORKSPACE_DIR="../binaries/pid-workspace" .. 11 | CONF_RES=$? 12 | if [ $CONF_RES != 0 ]; then 13 | cd .. 14 | echo "--------------------------------------------------------------" 15 | echo "----[PID] CI : building wrapper: FAIL (configuration) --------" 16 | echo "--------------------------------------------------------------" 17 | exit $CONF_RES 18 | fi 19 | 20 | #building the external project code 21 | if [ "$PACKAGE_BINARIES_PUBLISHED" = true ]; then 22 | # if wrapper publishes binaries then we need to specifically configure archives generation during the build 23 | version=$1 archive=true cmake --build . --target build 24 | else 25 | version=$1 cmake --build . --target build 26 | fi 27 | BUILD_RES=$? 28 | cd .. 29 | if [ $BUILD_RES != 0 ]; then 30 | echo "--------------------------------------------------------------" 31 | echo "----[PID] CI : building wrapper: FAIL ------------------------" 32 | echo "--------------------------------------------------------------" 33 | exit $BUILD_RES 34 | fi 35 | 36 | echo "--------------------------------------------------------------" 37 | echo "----[PID] CI : building wrapper: SUCCESS ---------------------" 38 | echo "--------------------------------------------------------------" 39 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/share/install/standalone_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ################################################################################## 4 | # -- get a workspace and defer this call to its standalone install script -- # 5 | ################################################################################## 6 | call_site_path=`pwd` #memorizing the call site 7 | 8 | #going to the root folder of the package (simply finding the build folder) 9 | script_dir_path_rel=`dirname "$0"` 10 | script_dir_path=`(cd $script_dir_path_rel && pwd)` 11 | cd $script_dir_path 12 | while [ ! -d "./build" ] || [ ! -e "./CMakeLists.txt" ] 13 | do 14 | cd .. 15 | done 16 | package_root_path=`pwd` 17 | workspace_root_path=$package_root_path/binaries/pid-workspace 18 | package_name=`basename $package_root_path` 19 | 20 | cd $call_site_path #restore the call site 21 | 22 | #creating the folder for binaries if it does not exist 23 | if [ ! -d "$package_root_path/binaries" ]; then 24 | mkdir $package_root_path/binaries 25 | fi 26 | 27 | #initializing the pid-workspace 28 | if [ ! -d "$package_root_path/binaries/pid-workspace" ]; then 29 | # clone the workspace into the binaries folder 30 | (cd $package_root_path/binaries && git clone https://gite.lirmm.fr/pid/pid-workspace.git --branch master) 31 | # previous to an execution of cmake we need to set a link into the workspace that point to the current package 32 | (cd $workspace_root_path/packages && ln -s $package_root_path $package_name) 33 | fi 34 | 35 | #forward call to the actual install script 36 | . $workspace_root_path/cmake/patterns/packages/run_standalone_install.sh $@ -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {% if site.data.framework.framework_banner_image != "" %} 6 | 7 |
8 | 9 |
10 | 11 | {% endif %} 12 | 13 |
14 |

The {{site.data.framework.framework_name}} framework

15 |
16 | 17 |
18 | 19 | {{site.data.framework.framework_description}} 20 | 21 |

22 | 23 | {% if site.data.framework.framework_welcome != "" %} 24 | 25 | 30 | 31 |
32 | {% endif %} 33 | 34 |

35 | 36 |

First steps

37 | 38 | If your are a new user, you can start reading introduction section and installation instructions. 39 | 40 |
41 |
42 | 43 | If your are more familiar with the workspace you can start navigating to packages pages by using the side bar. 44 | 45 |
46 |
47 | 48 | To lean more about this site and how it is managed you can refer to this help page. 49 | 50 |

51 | 52 |

Authors

53 | 54 | Following authors have contributed to the development of {{site.data.framework.framework_name}}: 55 | 56 |
57 | 58 | {{site.data.framework.framework_authors}} 59 | 60 |



61 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/package/share/ci/prepare_wrapper_ci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ######################### 4 | # -- Git prepare -- # 5 | ######################### 6 | 7 | # Print Git version 8 | git --version 9 | dir_path=`pwd` 10 | dir_name=`basename $dir_path` 11 | 12 | ############################################################################################ 13 | # -- initializing the folder where dependencies and installed artefacts will be put -- # 14 | ############################################################################################ 15 | 16 | #creating the folder for binaries 17 | if [ ! -d "./binaries" ]; then 18 | mkdir binaries 19 | fi 20 | 21 | #initializing the pid-workspace 22 | if [ ! -d "./binaries/pid-workspace" ]; then 23 | cd binaries && git clone git@gite.lirmm.fr:pid/pid-workspace.git && cd .. 24 | else 25 | cd binaries/pid-workspace && git pull -f official master && cd ../.. 26 | fi 27 | 28 | 29 | # symlinking all CI scripts from the workspace 30 | chmod 700 binaries/pid-workspace/cmake/patterns/wrappers/ci/configure_workspace.sh 31 | ln -s binaries/pid-workspace/cmake/patterns/wrappers/ci/configure_workspace.sh ./configure_workspace.sh 32 | chmod 700 binaries/pid-workspace/cmake/patterns/wrappers/ci/build_wrapper.sh 33 | ln -s binaries/pid-workspace/cmake/patterns/wrappers/ci/build_wrapper.sh ./build_wrapper.sh 34 | chmod 700 binaries/pid-workspace/cmake/patterns/wrappers/ci/publish_wrapper.sh 35 | ln -s binaries/pid-workspace/cmake/patterns/wrappers/ci/publish_wrapper.sh ./publish_wrapper.sh 36 | 37 | # previous to an execution we need to set a link into the workspace that point to the current package 38 | cd binaries/pid-workspace/wrappers && ln -s $dir_path $dir_name && cd ../../.. 39 | -------------------------------------------------------------------------------- /cmake/platforms/eval/params_Fortran.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | set(LANG_Fortran_IN_BINARY_CONSTRAINTS soname symbol) 20 | -------------------------------------------------------------------------------- /cmake/platforms/eval/params_Python.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | set(LANG_Python_OPTIONAL_CONSTRAINTS interpreter_min) 20 | set(LANG_Python_IN_BINARY_CONSTRAINTS soname) 21 | -------------------------------------------------------------------------------- /cmake/patterns/packages/ci/build_package_release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "--------------------------------------------------------------" 4 | echo "----[PID] CI : building package ------------------------------" 5 | echo "--------------------------------------------------------------" 6 | 7 | #first time configuring with tests and examples enabled 8 | cd build 9 | cmake -DBUILD_RELEASE_ONLY=OFF -DADDITIONAL_DEBUG_INFO=OFF -DBUILD_AND_RUN_TESTS=ON -DENABLE_SANITIZERS=OFF -DENABLE_PARALLEL_BUILD=ON -DBUILD_EXAMPLES=ON -DBUILD_API_DOC=OFF -DBUILD_STATIC_CODE_CHECKING_REPORT=OFF -DGENERATE_INSTALLER=OFF -DWORKSPACE_DIR="../binaries/pid-workspace" .. 10 | CONF_RES=$? 11 | if [ $CONF_RES != 0 ]; then 12 | cd .. 13 | echo "--------------------------------------------------------------" 14 | echo "----[PID] CI : building package: FAIL (configuration) --------" 15 | echo "--------------------------------------------------------------" 16 | exit $CONF_RES 17 | fi 18 | 19 | # always generating the dependencies file of the package 20 | write_file=true cmake --build . --target list_dependencies 21 | 22 | #put the dependencies description file directly in source folder 23 | mv ./release/share/dependencies.txt .. 24 | #build the code 25 | force=true cmake --build . --target build 26 | BUILD_RES=$? 27 | cd .. 28 | if [ $BUILD_RES != 0 ]; then 29 | echo "--------------------------------------------------------------" 30 | echo "----[PID] CI : building package: FAIL ------------------------" 31 | echo "--------------------------------------------------------------" 32 | exit $BUILD_RES 33 | fi 34 | 35 | echo "--------------------------------------------------------------" 36 | echo "----[PID] CI : building package: SUCCESS ---------------------" 37 | echo "--------------------------------------------------------------" 38 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/package/share/ci/prepare_static_site_ci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ######################### 4 | # -- Git prepare -- # 5 | ######################### 6 | 7 | # Print Git version 8 | git --version 9 | dir_path=`pwd` 10 | dir_name=`basename $dir_path` 11 | 12 | ############################################################################################ 13 | # -- initializing the folder where dependencies and installed artefacts will be put -- # 14 | ############################################################################################ 15 | 16 | #creating the folder for binaries 17 | if [ ! -d "./binaries" ]; then 18 | mkdir binaries 19 | fi 20 | 21 | #initializing the pid-workspace 22 | if [ ! -d "./binaries/pid-workspace" ]; then 23 | cd binaries && git clone git@gite.lirmm.fr:pid/pid-workspace.git && cd .. 24 | else 25 | cd binaries/pid-workspace && git pull -f official master && cd ../.. 26 | fi 27 | 28 | # symlinking all CI scripts from the workspace 29 | chmod 700 binaries/pid-workspace/cmake/patterns/static_sites/ci/configure_workspace.sh 30 | ln -s binaries/pid-workspace/cmake/patterns/static_sites/ci/configure_workspace.sh ./configure_workspace.sh 31 | chmod 700 binaries/pid-workspace/cmake/patterns/static_sites/ci/build_site.sh 32 | ln -s binaries/pid-workspace/cmake/patterns/static_sites/ci/build_site.sh ./build_site.sh 33 | chmod 700 binaries/pid-workspace/cmake/patterns/static_sites/ci/publish_site.sh 34 | ln -s binaries/pid-workspace/cmake/patterns/static_sites/ci/publish_site.sh ./publish_site.sh 35 | 36 | # previous to an execution we need to set a link into the workspace that point to the current package 37 | dir_name=${dir_name/"-site"/""} 38 | dir_name=${dir_name/"-pages"/""} 39 | cd binaries/pid-workspace/sites/packages && ln -s $dir_path $dir_name && cd ../../../.. 40 | -------------------------------------------------------------------------------- /cmake/platforms/eval/params_CUDA.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | set(LANG_CUDA_OPTIONAL_CONSTRAINTS version min_version max_version) 20 | set(LANG_CUDA_IN_BINARY_CONSTRAINTS soname architecture) 21 | -------------------------------------------------------------------------------- /cmake/platforms/eval/eval_ASM.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(LANG_ASM_PLATFORM_CONSTRAINTS) 21 | if(CMAKE_ASM_COMPILER) 22 | set(ASM_EVAL_RESULT TRUE) 23 | else() 24 | set(ASM_EVAL_RESULT FALSE) 25 | endif() 26 | -------------------------------------------------------------------------------- /cmake/platforms/eval/params_C.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | set(LANG_C_OPTIONAL_CONSTRAINTS optimization compiler_min)#optimization used only to configrue CXX flags 20 | set(LANG_C_IN_BINARY_CONSTRAINTS soname symbol proc_optimization) 21 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/framework/share/ci/prepare_framework_ci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ######################### 4 | # -- Git prepare -- # 5 | ######################### 6 | 7 | # Print Git version 8 | git --version 9 | dir_path=`pwd` 10 | dir_name=`basename $dir_path` 11 | 12 | ############################################################################################ 13 | # -- initializing the folder where dependencies and installed artefacts will be put -- # 14 | ############################################################################################ 15 | 16 | #creating the folder for binaries 17 | if [ ! -d "./binaries" ]; then 18 | mkdir binaries 19 | fi 20 | 21 | #initializing the pid-workspace 22 | if [ ! -d "./binaries/pid-workspace" ]; then 23 | cd binaries && git clone git@gite.lirmm.fr:pid/pid-workspace.git && cd .. 24 | else 25 | cd binaries/pid-workspace && git pull -f official master && cd ../.. 26 | fi 27 | 28 | # symlinking all CI scripts from the workspace 29 | chmod 700 binaries/pid-workspace/cmake/patterns/frameworks/ci/configure_workspace.sh 30 | ln -s binaries/pid-workspace/cmake/patterns/frameworks/ci/configure_workspace.sh ./configure_workspace.sh 31 | chmod 700 binaries/pid-workspace/cmake/patterns/frameworks/ci/build_framework.sh 32 | ln -s binaries/pid-workspace/cmake/patterns/frameworks/ci/build_framework.sh ./build_framework.sh 33 | chmod 700 binaries/pid-workspace/cmake/patterns/frameworks/ci/publish_framework.sh 34 | ln -s binaries/pid-workspace/cmake/patterns/frameworks/ci/publish_framework.sh ./publish_framework.sh 35 | 36 | # previous to an execution we need to set a link into the workspace that point to the current package 37 | dir_name=${dir_name/"-site"/""} 38 | dir_name=${dir_name/"-pages"/""} 39 | dir_name=${dir_name/"-framework"/""} 40 | cd binaries/pid-workspace/sites/frameworks && ln -s $dir_path $dir_name && cd ../../../.. 41 | -------------------------------------------------------------------------------- /cmake/.docs/pages/developers.rst: -------------------------------------------------------------------------------- 1 | Contributing 2 | ************ 3 | 4 | Contributions are welcome and should be done using merge-requests on 5 | https://gite.lirmm.fr/pid/pid-workspace. 6 | 7 | Update the doc 8 | ============== 9 | 10 | Generate the documentation locally 11 | ------------------------------------ 12 | 13 | The documentation can be generated using the follwing command, from the ``docs`` directory: 14 | 15 | .. code-block:: bash 16 | 17 | make html 18 | # Open build/html/index.html to see the doc 19 | firefox build/html/index.html 20 | 21 | To have the same look as on readthedocs: 22 | 23 | .. code-block:: bash 24 | 25 | sudo pip install sphinx-theme 26 | 27 | 28 | Comment the CMake files 29 | ----------------------- 30 | 31 | Comment paragraph with ``#.rst:`` as first line will be interpreted as documentation. 32 | To document a macro or a variable in a ``.cmake`` file, use 33 | ``# .. command:: MACRO_NAME`` or ``# .. variable:: VARIABLE_NAME``:: 34 | 35 | #.rst: 36 | # .. variable:: HOW_TO_DOCUMENT_A_VARIABLE 37 | # 38 | # Variable details details (Mind the empty line before). 39 | # Related to :cmake:command:`HOW_TO_DOCUMENT_A_COMMAND`. 40 | # 41 | # .. command:: HOW_TO_DOCUMENT_A_COMMAND(argname) 42 | # 43 | # Macro details (Mind the empty line before). 44 | # 45 | # :param argname: The parameter 46 | # 47 | # .. todo:: 48 | # This is a example *to do* 49 | 50 | gives 51 | 52 | .. variable:: HOW_TO_DOCUMENT_A_VARIABLE 53 | 54 | Variable details (Mind the empty line before). 55 | Related to :cmake:command:`HOW_TO_DOCUMENT_A_COMMAND`. 56 | 57 | .. command:: HOW_TO_DOCUMENT_A_COMMAND(argname) 58 | 59 | Macro details (Mind the empty line before). 60 | 61 | :param argname: The parameter 62 | 63 | .. todo:: 64 | This is a example *to do* 65 | 66 | 67 | To do's list 68 | ============ 69 | 70 | .. todolist:: 71 | -------------------------------------------------------------------------------- /cmake/platforms/eval/params_CXX.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | set(LANG_CXX_OPTIONAL_CONSTRAINTS optimization compiler_min stdlib_min)#optimization used only to configrue CXX flags 20 | set(LANG_CXX_IN_BINARY_CONSTRAINTS soname symbol proc_optimization std)#proc_optimization is just used to check binary compatibility 21 | -------------------------------------------------------------------------------- /cmake/platforms/eval/eval_Fortran.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(LANG_Fortran_PLATFORM_CONSTRAINTS) 21 | if(CMAKE_Fortran_COMPILER) 22 | set(Fortran_soname ${Fortran_STANDARD_LIBRARIES}) 23 | set(Fortran_symbol ${Fortran_STD_SYMBOLS}) 24 | set(Fortran_EVAL_RESULT TRUE) 25 | else() 26 | set(Fortran_EVAL_RESULT FALSE) 27 | endif() 28 | -------------------------------------------------------------------------------- /pid: -------------------------------------------------------------------------------- 1 | # dont use a shebang otherwise the shell detection won't work 2 | 3 | platform="unknown" 4 | unamestr=$(uname) 5 | if [ "$unamestr" = "Linux" ]; then 6 | platform="linux" 7 | elif [ "$unamestr" = "FreeBSD" ]; then 8 | platform="freebsd" 9 | elif [ "$unamestr" = "Darwin" ]; then 10 | platform="macos" 11 | else 12 | platform="linux" 13 | fi 14 | 15 | source_dir=`dirname "$0"` 16 | if [ "$platform" = "macos" ]; then 17 | script_abs_path=$(greadlink -m $source_dir/pid) 18 | ws_dir=$(greadlink -m $script_abs_path/..) 19 | elif [ "$platform" = "freebsd" ]; then 20 | script_abs_path=$(greadlink -m $source_dir/pid) 21 | ws_dir=$(greadlink -m $script_abs_path/..) 22 | else 23 | script_abs_path=$(readlink -m $source_dir/pid) 24 | ws_dir=$(readlink -m $script_abs_path/..) 25 | fi 26 | 27 | # Try to make embedded shell detection (e.g bash in zsh) works in all cases 28 | shell_exe_name=$(ps -o fname --no-headers $$) # should always give bash on bash 29 | shell_base_name=$(basename $SHELL) # should always give zsh if the current or parent shell is zsh 30 | 31 | if [ "$shell_exe_name" = "bash" ]; then 32 | shell="bash" 33 | else 34 | shell="$shell_base_name" 35 | fi 36 | 37 | echo "----------------------------------------------------- WARNING --------------------------------------------------" 38 | echo "Consider sourcing the share/pid.sh script inside your workspace and use the pid command for better shell support" 39 | echo "" 40 | echo "For the current session only run" 41 | echo " source $ws_dir/share/pid.sh" 42 | echo "" 43 | if [ ! -z "$shell" ]; then 44 | echo "Then add the above line to your shell setup script" 45 | echo " echo \"source $ws_dir/share/pid.sh\" >> $HOME/.${shell}rc" 46 | else 47 | echo "Then add this same command to your shell setup script to make it permanent" 48 | fi 49 | echo "----------------------------------------------------------------------------------------------------------------" 50 | 51 | . $ws_dir/share/pid.sh 52 | 53 | pid $@ 54 | -------------------------------------------------------------------------------- /cmake/patterns/packages/.gitlab-ci.yml.in: -------------------------------------------------------------------------------- 1 | variables: 2 | PACKAGE_HAS_LIBRARIES: "@PACKAGE_CI_HAS_LIBRARIES@" 3 | PACKAGE_HAS_TESTS: "@PACKAGE_CI_HAS_TESTS@" 4 | PACKAGE_HAS_EXAMPLES: "@PACKAGE_CI_HAS_EXAMPLES@" 5 | PACKAGE_HAS_SITE: "@PACKAGE_CI_HAS_SITE@" 6 | PACKAGE_BINARIES_PUBLISHED: "@PACKAGE_CI_PUBLISH_BINARIES@" 7 | PACKAGE_DEV_INFO_PUBLISHED: "@PACKAGE_CI_PUBLISH_DEV_INFO@" 8 | PACKAGE_MAIN_PLATFORM: "@PACKAGE_CI_MAIN_PLATFORM@" 9 | PACKAGE_CONTRIBUTION_SPACES: "@PACKAGE_CI_CONTRIBUTION_SPACES@" 10 | 11 | stages: 12 | - build 13 | 14 | ############ generic jobs patterns ############# 15 | 16 | ### configure (cmake configuration), build (compile/test/install), deploy (make interesting part of the result available wiki+doc, binaries) 17 | 18 | .build_integration_: &build_integration 19 | stage: build 20 | script: 21 | - chmod 700 ./share/ci/prepare_package_ci.sh 22 | - ./share/ci/prepare_package_ci.sh 23 | - ./configure_workspace.sh "$CI_RUNNER_TAGS" $CI_JOB_NAME 24 | - ./build_package_integration.sh 25 | - ./publish_package_integration.sh 26 | except: 27 | - master 28 | - /^v.*$/ 29 | interruptible: true 30 | artifacts: 31 | name: "artefacts_integration_${CI_RUNNER_ID}" 32 | paths: 33 | - developper_info.tgz 34 | when: on_success 35 | 36 | .build_release_: &build_release 37 | stage: build 38 | script: 39 | - chmod 700 ./share/ci/prepare_package_ci.sh 40 | - ./share/ci/prepare_package_ci.sh 41 | - ./configure_workspace.sh "$CI_RUNNER_TAGS" $CI_JOB_NAME 42 | - ./build_package_release.sh 43 | - ./publish_package_release.sh $CI_JOB_NAME 44 | only: 45 | - /^v.*$/ 46 | interruptible: true 47 | artifacts: 48 | name: "artefacts_${CI_COMMIT_TAG}_${CI_RUNNER_ID}" 49 | paths: 50 | - dependencies.txt 51 | 52 | ############ patterns for platforms selection ############# 53 | # here the project generates patterns for runner selection according for all platforms defined in the workspace 54 | -------------------------------------------------------------------------------- /cmake/platforms/CheckARCH.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(CURRENT_PLATFORM_ARCH CACHE INTERNAL "") 21 | 22 | #test of processor architecture is based on the compiler used 23 | #So it adapts to the current development environment in use 24 | if(CMAKE_SIZEOF_VOID_P EQUAL 2) 25 | set(CURRENT_PLATFORM_ARCH 16 CACHE INTERNAL "") 26 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) 27 | set(CURRENT_PLATFORM_ARCH 32 CACHE INTERNAL "") 28 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 29 | set(CURRENT_PLATFORM_ARCH 64 CACHE INTERNAL "") 30 | endif() 31 | -------------------------------------------------------------------------------- /cmake/patterns/packages/package/share/ci/prepare_package_ci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ######################### 4 | # -- Git prepare -- # 5 | ######################### 6 | 7 | # Print Git version 8 | git --version 9 | dir_path=`pwd` 10 | dir_name=`basename $dir_path` 11 | 12 | ############################################################################################ 13 | # -- initializing the folder where dependencies and installed artefacts will be put -- # 14 | ############################################################################################ 15 | 16 | #creating the folder for binaries 17 | if [ ! -d "./binaries" ]; then 18 | mkdir binaries 19 | fi 20 | 21 | #initializing the pid-workspace 22 | if [ ! -d "./binaries/pid-workspace" ]; then 23 | cd binaries && git clone git@gite.lirmm.fr:pid/pid-workspace.git && cd .. 24 | else 25 | cd binaries/pid-workspace && git pull -f official master && cd ../.. 26 | fi 27 | 28 | # symlinking all CI scripts from the workspace 29 | chmod 700 binaries/pid-workspace/cmake/patterns/packages/ci/configure_workspace.sh 30 | ln -s binaries/pid-workspace/cmake/patterns/packages/ci/configure_workspace.sh ./configure_workspace.sh 31 | chmod 700 binaries/pid-workspace/cmake/patterns/packages/ci/build_package_release.sh 32 | ln -s binaries/pid-workspace/cmake/patterns/packages/ci/build_package_release.sh ./build_package_release.sh 33 | chmod 700 binaries/pid-workspace/cmake/patterns/packages/ci/build_package_integration.sh 34 | ln -s binaries/pid-workspace/cmake/patterns/packages/ci/build_package_integration.sh ./build_package_integration.sh 35 | chmod 700 binaries/pid-workspace/cmake/patterns/packages/ci/publish_package_release.sh 36 | ln -s binaries/pid-workspace/cmake/patterns/packages/ci/publish_package_release.sh ./publish_package_release.sh 37 | chmod 700 binaries/pid-workspace/cmake/patterns/packages/ci/publish_package_integration.sh 38 | ln -s binaries/pid-workspace/cmake/patterns/packages/ci/publish_package_integration.sh ./publish_package_integration.sh 39 | 40 | # previous to an execution we need to set a link into the workspace that point to the current package 41 | cd binaries/pid-workspace/packages && ln -s $dir_path $dir_name && cd ../../.. 42 | -------------------------------------------------------------------------------- /cmake/commands/Synchronize_PID_Package_Version.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | 21 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) 22 | include(PID_Set_Modules_Path NO_POLICY_SCOPE) 23 | include(PID_Set_Policies NO_POLICY_SCOPE) 24 | include(PID_Platform_Management_Functions NO_POLICY_SCOPE) 25 | include(PID_Version_Management_Functions NO_POLICY_SCOPE) 26 | load_Workspace_Info() #loading the current platform configuration 27 | set(PATH_TO_PACKAGE ${WORKSPACE_DIR}/packages/${TARGET_PACKAGE}) 28 | init_PID_Version_Variable(${TARGET_PACKAGE} ${PATH_TO_PACKAGE}) 29 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/install.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: Install 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | @PACKAGE_NAME@ can be deployed as any other native PID package. To know more about PID methodology simply follow [this link](http://pid.lirmm.net/pid-framework). 8 | 9 | PID provides different alternatives to install a package: 10 | 11 | ## Automatic install by dependencies declaration 12 | 13 | The package @PACKAGE_NAME@ will be installed automatically if it is a direct or undirect dependency of one of the packages you are developing. See [how to import](use.html). 14 | 15 | ## Manual install using PID command 16 | 17 | The package @PACKAGE_NAME@ can be installed manually using commands provided by the PID workspace: 18 | 19 | {% highlight shell %} 20 | cd 21 | ./pid deploy package=@PACKAGE_NAME@ 22 | {% endhighlight %} 23 | 24 | Or if you want to install a specific binary version of this package, for instance for the last version: 25 | 26 | {% highlight shell %} 27 | cd 28 | ./pid deploy package=@PACKAGE_NAME@ version=@PACKAGE_LAST_VERSION_WITH_PATCH@ 29 | {% endhighlight %} 30 | 31 | ## Manual Installation 32 | 33 | The last possible action is to install it by hand without using PID commands. This is **not recommended** but could be **helpfull to install another repository of this package (not the official package repository)**. For instance if you fork the official repository to work isolated from official developers you may need this alternative. 34 | 35 | + Cloning the official repository of @PACKAGE_NAME@ with git 36 | 37 | {% highlight shell %} 38 | cd /packages/ && git clone @OFFICIAL_REPOSITORY_ADDRESS@ 39 | {% endhighlight %} 40 | 41 | 42 | or if your are involved in @PACKAGE_NAME@ development and forked the @PACKAGE_NAME@ official repository (using GitLab), you can prefer doing: 43 | 44 | 45 | {% highlight shell %} 46 | cd /packages/ && git clone @GIT_SERVER@:/@PACKAGE_NAME@.git 47 | {% endhighlight %} 48 | 49 | + Building the repository 50 | 51 | {% highlight shell %} 52 | cd /packages/@PACKAGE_NAME@/build 53 | cmake .. && cd .. 54 | ./pid build 55 | {% endhighlight %} 56 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/ci/publish_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "--------------------------------------------------------------" 4 | echo "----[PID] CI : publishing wrapper ----------------------------" 5 | echo "--------------------------------------------------------------" 6 | 7 | #getting the current platform and instance (if any) of the current runner 8 | reg_expr_job="^build_wrapper_(.+)__(.+)__$" 9 | platform="" 10 | 11 | if [[ $CI_JOB_NAME =~ $reg_expr_job ]]; then 12 | instance_job=${BASH_REMATCH[2]} 13 | platform_job=${BASH_REMATCH[1]} 14 | platform_job=${platform_job/plus/"+"} 15 | platform_job=${platform_job/plus/"+"} 16 | platform=$platform_job"__"$instance_job"__" 17 | else 18 | 19 | reg_expr_job="^build_wrapper_(.+)$" 20 | if [[ $CI_JOB_NAME =~ $reg_expr_job ]]; then 21 | platform=${BASH_REMATCH[1]} 22 | platform=${platform/plus/"+"} 23 | platform=${platform/plus/"+"} 24 | fi 25 | fi 26 | 27 | runner_only_binaries="true" 28 | if [ "$platform" = "$PACKAGE_MAIN_PLATFORM" ]; then 29 | # the current runner is in charge of generating the static site 30 | runner_only_binaries="false" 31 | elif [ "$PACKAGE_BINARIES_PUBLISHED" != true ]; then 32 | # the current runner may be only used to publish binaries but it does not do that 33 | echo "--------------------------------------------------------------" 34 | echo "----[PID] CI : publishing wrapper: SKIPPED -------------------" 35 | echo "--------------------------------------------------------------" 36 | exit 0 37 | fi 38 | 39 | #now generate the site 40 | SITE_RES=0 41 | cd build 42 | if [ "$PACKAGE_HAS_SITE" = true ] ; then 43 | only_binaries=$runner_only_binaries version=$1 cmake --build . --target site 44 | fi 45 | SITE_RES=$? 46 | cd .. 47 | if [ $SITE_RES != 0 ]; then 48 | echo "--------------------------------------------------------------" 49 | echo "----[PID] CI : publishing wrapper: FAIL (static site) --------" 50 | echo "--------------------------------------------------------------" 51 | exit $SITE_RES 52 | fi 53 | 54 | echo "--------------------------------------------------------------" 55 | echo "----[PID] CI : publishing wrapper: SUCCESS -------------------" 56 | echo "--------------------------------------------------------------" 57 | -------------------------------------------------------------------------------- /cmake/platforms/eval/eval_Python.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(LANG_Python_PLATFORM_CONSTRAINTS) 21 | set(Python_EVAL_RESULT FALSE) 22 | 23 | if(CURRENT_PYTHON_EXECUTABLE) 24 | if(Python_interpreter_min) 25 | if(constraint MATCHES "^([0-9]+\\.[0-9]+$") 26 | if(CMAKE_MATCH_1 VERSION_LESS CURRENT_PYTHON) 27 | set(Python_EVAL_RESULT FALSE) 28 | message(FATAL_ERROR "[PID] CRITICAL ERROR: ${CURRENT_PYTHON_EXECUTABLE} Python interpreter version ${CURRENT_PYTHON} < ${CMAKE_MATCH_1}, constraint violated") 29 | endif() 30 | endif() 31 | endif() 32 | set(Python_EVAL_RESULT TRUE) 33 | set(Python_soname ${Python_STANDARD_LIBRARIES}) 34 | endif() 35 | -------------------------------------------------------------------------------- /cmake/PID_Set_Modules_Path.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | ############ Guard for optimization of configuration process ############################ 21 | if(PID_SET_MODULES_PATH_INCLUDED) 22 | return() 23 | endif() 24 | set(PID_SET_MODULES_PATH_INCLUDED TRUE) 25 | ########################################################################################## 26 | 27 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) 28 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake/api) 29 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake/commands) 30 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake/platforms) # using platform check modules 31 | list(REMOVE_DUPLICATES CMAKE_MODULE_PATH) 32 | -------------------------------------------------------------------------------- /cmake/commands/Serve_PID_Framework.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | ### script used to server the framework static site using jekyll 21 | 22 | set(PATH_TO_FRAMEWORK ${FRAMEWORK_PATH}) 23 | set(PATH_TO_FRAMEWORK_RESULT ${PATH_TO_FRAMEWORK}/build/generated) 24 | 25 | if(EXISTS ${PATH_TO_FRAMEWORK_RESULT} AND IS_DIRECTORY ${PATH_TO_FRAMEWORK_RESULT}) 26 | if(FRAMEWORK_BASE_URL) 27 | execute_process(COMMAND ${JEKYLL_EXECUTABLE} serve --baseurl /${FRAMEWORK_BASE_URL} WORKING_DIRECTORY ${PATH_TO_FRAMEWORK_RESULT}) 28 | else() 29 | execute_process(COMMAND ${JEKYLL_EXECUTABLE} serve WORKING_DIRECTORY ${PATH_TO_FRAMEWORK_RESULT}) 30 | endif() 31 | else() 32 | message("[PID] ERROR: nothing to serve, no static site found !") 33 | endif() 34 | -------------------------------------------------------------------------------- /cmake/commands/Serve_PID_Package_Site.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | ### script used to serve the package static site using jekyll 21 | 22 | set(PATH_TO_PACKAGE ${WORKSPACE_DIR}/sites/packages/${TARGET_PACKAGE}) 23 | set(PATH_TO_PACKAGE_RESULT ${PATH_TO_PACKAGE}/build/generated) 24 | 25 | if(EXISTS ${PATH_TO_PACKAGE_RESULT} AND IS_DIRECTORY ${PATH_TO_PACKAGE_RESULT}) 26 | if(SITE_BASE_URL) 27 | execute_process(COMMAND ${JEKYLL_EXECUTABLE} serve --baseurl /${SITE_BASE_URL} WORKING_DIRECTORY ${PATH_TO_PACKAGE_RESULT}) 28 | else() 29 | execute_process(COMMAND ${JEKYLL_EXECUTABLE} serve WORKING_DIRECTORY ${PATH_TO_PACKAGE_RESULT}) 30 | endif() 31 | else() 32 | message("[PID] ERROR: nothing to serve, no static site found !") 33 | endif() 34 | -------------------------------------------------------------------------------- /cmake/platforms/FindBazel.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | #find bazel program 21 | find_program(BAZEL_EXECUTABLE bazel) 22 | 23 | execute_process(COMMAND "${BAZEL_EXECUTABLE}" version 24 | RESULT_VARIABLE RES_VAR 25 | OUTPUT_VARIABLE OUTPUT_VAR 26 | ERROR_QUIET 27 | ) 28 | 29 | #determine bazel version 30 | set(BAZEL_VERSION) 31 | if(RES_VAR EQUAL 0)#OK execution output is OK 32 | if(OUTPUT_VAR MATCHES "Build label: ([0-9a-zA-Z.]+)") 33 | set(BAZEL_VERSION "${CMAKE_MATCH_1}") 34 | endif() 35 | endif() 36 | unset(RES_VAR) 37 | unset(OUTPUT_VAR) 38 | 39 | include(FindPackageHandleStandardArgs) 40 | 41 | find_package_handle_standard_args(Bazel 42 | FOUND_VAR BAZEL_FOUND 43 | REQUIRED_VARS BAZEL_EXECUTABLE 44 | VERSION_VAR BAZEL_VERSION 45 | ) 46 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/install_wrapper.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: external 3 | title: Install 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | @PACKAGE_NAME@ can be deployed as any other external package PID wrapper. To know more about PID methodology simply follow [this link](http://pid.lirmm.net/pid-framework). 8 | 9 | PID provides different alternatives to install a PID wrapper package: 10 | 11 | ## Automatic install by dependencies declaration 12 | 13 | The external package @PACKAGE_NAME@ resulting from the build of its wrapper will be installed automatically if it is a direct or undirect dependency of one of the packages you are developing. See [how to import](use.html). 14 | 15 | ## Manual install using PID commands 16 | 17 | The external package @PACKAGE_NAME@ can be installed manually using commands provided by the PID workspace: 18 | 19 | {% highlight shell %} 20 | cd 21 | ./pid deploy package=@PACKAGE_NAME@ 22 | {% endhighlight %} 23 | 24 | Or if you want to install a specific binary version of this external package, for instance for the last version: 25 | 26 | {% highlight shell %} 27 | cd 28 | ./pid deploy package=@PACKAGE_NAME@ version=@PACKAGE_LAST_VERSION_WITH_PATCH@ 29 | {% endhighlight %} 30 | 31 | ## Manual Installation 32 | 33 | The last possible action is to install it by hand without using PID commands. This is **not recommended** but could be **helpfull to install another repository of this package (not the official package repository)**. For instance if you fork the official repository to work isolated from official developers you may need this alternative. 34 | 35 | + Cloning the official repository of @PACKAGE_NAME@ with git 36 | 37 | {% highlight shell %} 38 | cd /wrappers/ && git clone @OFFICIAL_REPOSITORY_ADDRESS@ 39 | {% endhighlight %} 40 | 41 | 42 | or if your are involved in the development of @PACKAGE_NAME@ wrapper and forked the @PACKAGE_NAME@ wrapper official repository (using GitLab), you may prefer doing: 43 | 44 | {% highlight shell %} 45 | cd /wrappers/ && git clone @GIT_SERVER@:/@PACKAGE_NAME@.git 46 | {% endhighlight %} 47 | 48 | + Building the repository 49 | 50 | Wrappers require the user to define a given version to build, for instance for the last version: 51 | 52 | {% highlight shell %} 53 | cd /wrappers/@PACKAGE_NAME@/build 54 | cmake .. && cd .. 55 | ./pid build version=@PACKAGE_LAST_VERSION_WITH_PATCH@ 56 | {% endhighlight %} 57 | -------------------------------------------------------------------------------- /cmake/platforms/CheckTYPE.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(CURRENT_PLATFORM_TYPE CACHE INTERNAL "") 21 | 22 | #test of processor type is based on system variables affected by cross compilation 23 | #So it adapts to the current development environment in use 24 | if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|x64|i686|i386|i486|x86_32|x86_64|amd64|AMD64") 25 | set(CURRENT_PLATFORM_TYPE x86 CACHE INTERNAL "") 26 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM|aarch64|AARCH64") 27 | set(CURRENT_PLATFORM_TYPE arm CACHE INTERNAL "") 28 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "powerpc64|ppc64|ppc64le|powerpc64le|ppc") 29 | set(CURRENT_PLATFORM_TYPE ppc CACHE INTERNAL "") 30 | else()# Note: add more check to test other processor architectures 31 | message(FATAL_ERROR "[PID] CRITICAL ERROR: unsupported processor architecture") 32 | endif() 33 | -------------------------------------------------------------------------------- /cmake/patterns/packages/ci/publish_package_integration.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "--------------------------------------------------------------" 4 | echo "----[PID] CI : publishing package ----------------------------" 5 | echo "--------------------------------------------------------------" 6 | cd build 7 | if [ -d "./release/share/developper_info" ] ; then 8 | rm -Rf ./release/share/developper_info 9 | fi 10 | 11 | #preparing the final archive to upload as artifact 12 | mkdir ./release/share/developper_info 13 | cp ./release/share/dependencies.txt ./release/share/developper_info 14 | 15 | cmake --build . --target staticchecks 16 | STAT_CHK_RES=$? 17 | if [ $STAT_CHK_RES != 0 ]; then 18 | cd .. 19 | echo "--------------------------------------------------------------" 20 | echo "----[PID] CI : publishing package: FAIL (static checks) ------" 21 | echo "--------------------------------------------------------------" 22 | exit $STAT_CHK_RES 23 | fi 24 | 25 | cd release/share && cmake -E tar cvfz staticchecks.tgz static_checks_report/ && mv staticchecks.tgz developper_info 26 | STAT_CHK_RES=$? 27 | cd ../.. 28 | if [ $STAT_CHK_RES != 0 ]; then 29 | echo "--------------------------------------------------------------" 30 | echo "-- [PID] CI : publishing package: NO STATIC CHECK PUBLISHED --" 31 | echo "--------------------------------------------------------------" 32 | fi 33 | 34 | if [ "$PACKAGE_HAS_LIBRARIES" = true ] && [ "$PACKAGE_HAS_TESTS" = true ] ; then 35 | # generating the coverage report of the package if there are tests on libraries 36 | cd debug/share 37 | cmake -E tar cvfz coverage.tgz coverage_report/ && mv coverage.tgz ../../release/share/developper_info 38 | COV_RES=$? 39 | cd ../.. 40 | if [ $COV_RES != 0 ]; then 41 | cd .. 42 | echo "--------------------------------------------------------------" 43 | echo "----[PID] CI : publishing package: FAIL (coverage) -----------" 44 | echo "--------------------------------------------------------------" 45 | exit $COV_RES 46 | fi 47 | fi 48 | #creating the final archive to upload as artifact and put it in build folder 49 | 50 | cd ./release/share && cmake -E tar cvfz developper_info.tgz developper_info/ && mv developper_info.tgz ../../.. && cd ../.. 51 | echo "--------------------------------------------------------------" 52 | echo "----[PID] CI : publishing package: SUCCESS -------------------" 53 | echo "--------------------------------------------------------------" 54 | cd .. 55 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_includes/sidebar.html: -------------------------------------------------------------------------------- 1 | NAV 2 | 66 | -------------------------------------------------------------------------------- /pid.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | 4 | set source_dir=%~dp0 5 | 6 | rem Set the arguments as environment variables and store CMake options 7 | :loop_start 8 | if [%1] == [] goto after_loop 9 | set command=%1 10 | set value=%2 11 | if "!command:~0,2!"=="-D" ( 12 | set cmake_options=!cmake_options! !command!=!value! 13 | shift 14 | shift 15 | goto loop_start 16 | ) 17 | if [!target!] == [] ( 18 | if [!fake_target!] == [] ( 19 | if "!command!"=="workspace" ( 20 | set fake_target=!command! 21 | shift 22 | goto loop_start 23 | ) 24 | if "!command!"=="configure" ( 25 | set fake_target=!command! 26 | shift 27 | goto loop_start 28 | ) 29 | ) 30 | set target=!command! 31 | shift 32 | goto loop_start 33 | ) else ( 34 | rem Set the command/value pair as an environment variable 35 | set !command!=!value! 36 | shift 37 | shift 38 | goto loop_start 39 | ) 40 | :after_loop 41 | rem Don't ask me why this line is required 42 | 43 | if "!fake_target!"=="workspace" ( 44 | set cmake_options_backup=!cmake_options! 45 | set cmake_options="" 46 | call :run !source_dir! workspace_path 47 | set cmake_options=!cmake_options_backup! 48 | for /f "delims=" %%a in (!source_dir!\build\ws_path.txt) do ( 49 | set ws_dir=%%a 50 | ) 51 | if "!target!"=="configure" ( 52 | call :configure !ws_dir! 53 | ) else ( 54 | call :run !ws_dir! , !target! 55 | ) 56 | goto :eof 57 | ) 58 | 59 | if "!fake_target!"=="configure" ( 60 | call :configure !source_dir! 61 | goto :eof 62 | ) 63 | 64 | call :run !source_dir! , !target! 65 | goto :eof 66 | 67 | 68 | rem %~1: source dir, %~2 cmake options 69 | :configure 70 | cmake -S %~1 -B %~1/build !cmake_options! 71 | exit /B %ERRORLEVEL% 72 | 73 | rem %~1: source_dir, uses !cmake_options! 74 | :apply_options 75 | if not [!cmake_options!] == [] ( 76 | call :configure %~1 77 | ) 78 | exit /B %ERRORLEVEL% 79 | 80 | rem %~1: source_dir, %~2: target 81 | :run 82 | rem Configure the project a first time if necessary 83 | if not exist %~1\build\CMakeCache.txt ( 84 | cmake -S %~1 -B %~1\build 85 | ) 86 | 87 | call :apply_options %~1 88 | 89 | if [%~2] == [] ( 90 | cmake --build %~1\build 91 | ) else ( 92 | cmake --build %~1\build --target %~2 93 | ) 94 | exit /B %ERRORLEVEL% -------------------------------------------------------------------------------- /cmake/commands/Check_PID_Package_Branch.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | 21 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) 22 | include(PID_Set_Modules_Path NO_POLICY_SCOPE) 23 | include(PID_Set_Policies NO_POLICY_SCOPE) 24 | include(PID_Git_Functions NO_POLICY_SCOPE) 25 | include(PID_Platform_Management_Functions NO_POLICY_SCOPE) 26 | 27 | load_Workspace_Info() #loading the current platform configuration 28 | 29 | #manage arguments if they are passed as environmentvariables (for non UNIX makefile generators usage) 30 | if(NOT FORCE_RELEASE_BUILD AND DEFINED ENV{force}) 31 | set(FORCE_RELEASE_BUILD "$ENV{force}" CACHE INTERNAL "" FORCE) 32 | endif() 33 | 34 | if( NOT FORCE_RELEASE_BUILD OR 35 | (NOT FORCE_RELEASE_BUILD STREQUAL "true" AND NOT FORCE_RELEASE_BUILD STREQUAL "TRUE" AND NOT FORCE_RELEASE_BUILD STREQUAL "ON") 36 | ) 37 | get_Repository_Current_Branch(BRANCH_NAME ${GIT_REPOSITORY}) 38 | if(NOT BRANCH_NAME OR BRANCH_NAME STREQUAL "master") 39 | message(FATAL_ERROR "[PID] ERROR : ${TARGET_PACKAGE} must be built on a development branch (integration or feature specific branch).") 40 | endif() 41 | endif() 42 | -------------------------------------------------------------------------------- /cmake/commands/Format_PID_Package_Sources.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) 21 | include(PID_Set_Modules_Path NO_POLICY_SCOPE) 22 | include(PID_Set_Policies NO_POLICY_SCOPE) 23 | include(PID_Utils_Functions NO_POLICY_SCOPE) # to be able to interpret description of external components 24 | 25 | function(format_source_directory dir) 26 | # get C/C++ files based on extension matching 27 | get_All_Cpp_Sources_Absolute(CPP_SOURCES ${dir}) 28 | 29 | foreach(file IN LISTS CPP_SOURCES) 30 | # format the file inplace (-i) using the closest .clang-format file in the hierarchy (-style=file) 31 | execute_process( 32 | COMMAND ${CLANG_FORMAT_EXE} -style=file -i ${file} 33 | RESULT_VARIABLE res 34 | OUTPUT_VARIABLE out) 35 | endforeach() 36 | endfunction(format_source_directory) 37 | 38 | set(PACKAGE_DIR ${WORKSPACE_DIR}/packages/${PACKAGE_NAME}) 39 | 40 | format_source_directory(${PACKAGE_DIR}/apps) 41 | format_source_directory(${PACKAGE_DIR}/include) 42 | format_source_directory(${PACKAGE_DIR}/src) 43 | format_source_directory(${PACKAGE_DIR}/test) 44 | -------------------------------------------------------------------------------- /cmake/commands/Build_PID_Package_Dependencies.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | 21 | 22 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) 23 | include(PID_Set_Modules_Path NO_POLICY_SCOPE) 24 | include(PID_Set_Policies NO_POLICY_SCOPE) 25 | include(PID_Workspace_Internal_Functions NO_POLICY_SCOPE) 26 | include(PID_Utils_Functions NO_POLICY_SCOPE) 27 | load_Workspace_Info() #loading the current platform configuration 28 | if(DEPENDENT_PACKAGES) 29 | set(remaining_packs ${DEPENDENT_PACKAGES}) 30 | while(remaining_packs) 31 | list(GET remaining_packs 0 dep_pack) 32 | list(GET remaining_packs 1 dep_version) 33 | list(REMOVE_AT remaining_packs 0 1) 34 | package_Dependency_Needs_To_Be_Rebuilt(NEEDS_BUILD ${dep_pack} ${dep_version} ${PACKAGE_LAUCHING_BUILD}) 35 | if(NEEDS_BUILD)# if not built modifications 36 | message("[PID] INFO : Building ${dep_pack} ...") 37 | execute_process (COMMAND ${CMAKE_MAKE_PROGRAM} build 38 | WORKING_DIRECTORY ${WORKSPACE_DIR}/packages/${dep_pack}/build) 39 | message("[PID] INFO : ${dep_pack} built.") 40 | endif() 41 | endwhile() 42 | else() 43 | message("[PID] INTERNAL ERROR : no package dependency to build !") 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/static/pages/help.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: Help 4 | --- 5 | 6 | ## What is this site ? 7 | 8 | This is the documentation site of the {{ site.data.package.package_name}} package. A **package** is a git project defining a set of libraries, executables and other software artifacts. 9 | 10 | The site has been automatically generated using jenkins, configured using CMake and updated/published using gitlab, based on a dedicated development environment called **PID**. Technically, this site has been generated from this source repository (you may have no access to the repository project). 11 | 12 | In **PID** environment each **package** contains any kind of software artifacts (libraries, executables, configuration files and more generally any kind of filesystem resources). They allow to put into a common place any information about a given project. 13 | 14 | 15 | ## How to use this site ? 16 | 17 | This site has the same general "look and feel" as any other [package site in PID](#what-is-this-site-?): 18 | 19 | - The header bar provides menus that help you navigate between different global pages of the packages. 20 | - **Documentation** provides submenus to access all kind of documentation of the framework: 21 | + *Introduction* : quick introduction to the package purpose. 22 | + *Install* : to get installation instructions. 23 | + *Use* : to know of to use libraries in your own programs 24 | {% if site.data.package.tutorial != "" %} 25 | + *Tutorial* : to get information about how to usie the package. 26 | {% endif %} 27 | {% if site.data.package.details != "" %} 28 | + *More* : to get more information on advanced topics. 29 | {% endif %} 30 | {% if site.data.package.has_developper_info %} 31 | - **Developers** provides submenus to get info about the development of the package 32 | {% if site.data.package.has_apidoc %} 33 | + *API documentation* lets you consult the **doxygen** generated documentation of the package (last release version only). 34 | {% endif %} 35 | {% if site.data.package.has_checks %} 36 | + *Static Cheks* lets you consult the **cppcheck** generated report of static checks on the package (last release version only). 37 | {% endif %} 38 | {% if site.data.package.has_coverage %} 39 | + *Coverage* lets you consult the **lcov** generated report of tests coverage on the package (last release version only). 40 | {% endif %} 41 | {% if site.data.package.has_binaries %} 42 | + *Binaries* lets you navigate between all available binaries (different versions for different platforms). 43 | {% endif %} 44 | {% endif %} 45 | - **Activity** provides the history of last activities in the package, anytime the package content has significantly evolved. 46 | - **About** provides this help page and a contact page. 47 | 48 | -------------------------------------------------------------------------------- /cmake/patterns/static_sites/help.md.in: -------------------------------------------------------------------------------- 1 | --- 2 | layout: package 3 | title: Help 4 | package: @PACKAGE_NAME@ 5 | --- 6 | 7 | ## What is this site ? 8 | 9 | This is the documentation site of the {{ site.data.package.package_name}} package. A **package** is a git project defining a set of libraries, executables and other software artifacts. 10 | 11 | The site has been automatically generated using Jekyll, configured using CMake and updated/published using GitLab, based on a dedicated development environment called **PID**. Technically, this site has been generated from this source repository (you may have no access to the repository project). 12 | 13 | In **PID** environment each **package** contains any kind of software artifacts (libraries, executables, configuration files and more generally any kind of filesystem resources). They allow to put into a common place any information about a given project. 14 | 15 | 16 | ## How to use this site ? 17 | 18 | This site has the same general "look and feel" as any other [package site in PID](#what-is-this-site-?): 19 | 20 | - The header bar provides menus that help you navigate between different global pages of the packages. 21 | - **Documentation** provides submenus to access all kind of documentation of the framework: 22 | + *Introduction* : quick introduction to the package purpose. 23 | + *Install* : to get installation instructions. 24 | + *Use* : to know how to use libraries in your own programs 25 | {% if site.data.package.tutorial != "" %} 26 | + *Tutorial* : to get information about how to use the package. 27 | {% endif %} 28 | {% if site.data.package.details != "" %} 29 | + *More* : to get more information on advanced topics. 30 | {% endif %} 31 | {% if site.data.package.has_developper_info %} 32 | - **Developers** provides submenus to get info about the development of the package 33 | {% if site.data.package.has_apidoc %} 34 | + *API documentation* lets you consult the **Doxygen** generated documentation of the package (last release version only). 35 | {% endif %} 36 | {% if site.data.package.has_checks %} 37 | + *Static Cheks* lets you consult the **cppcheck** generated report of static checks on the package (last release version only). 38 | {% endif %} 39 | {% if site.data.package.has_coverage %} 40 | + *Coverage* lets you consult the **lcov** generated report of tests coverage on the package (last release version only). 41 | {% endif %} 42 | {% if site.data.package.has_binaries %} 43 | + *Binaries* lets you navigate between all available binaries (different versions for different platforms). 44 | {% endif %} 45 | {% endif %} 46 | - **Activity** provides the history of all activities in the package, anytime the package content has significantly evolved a new entry is added. 47 | - **About** provides this help page and a contact page. 48 | 49 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_includes/external-header.html: -------------------------------------------------------------------------------- 1 | {% assign from_wrapper = false %} 2 | {% for package in site.external %} 3 | {% if package.path contains 'pages/introduction' and package.package == page.package %} 4 | {% assign package_details = package.details %} 5 | {% assign from_wrapper = true %} 6 | {% endif %} 7 | {% endfor %} 8 | 9 | 53 | -------------------------------------------------------------------------------- /cmake/patterns/packages/ci/configure_workspace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #first step is initializing the workspace 4 | echo "--------------------------------------------------------------" 5 | echo "----[PID] CI : configuring workspace -------------------------" 6 | echo "--------------------------------------------------------------" 7 | 8 | # 1) first time configuration 9 | cd binaries/pid-workspace/build 10 | cmake -DIN_CI_PROCESS=ON -DFORCE_CONTRIBUTION_SPACES="$PACKAGE_CONTRIBUTION_SPACES" -DPROFILE_EVALUATION_INFO=ON .. 11 | CONFIGURE_RES=$? 12 | cd ../../.. 13 | if [ $CONFIGURE_RES != 0 ]; then 14 | echo "--------------------------------------------------------------" 15 | echo "----[PID] CI : configuring workspace: FAIL -------------------" 16 | echo "--------------------------------------------------------------" 17 | exit $CONFIGURE_RES 18 | fi 19 | 20 | #getting the current platform and instance (if any) of the current runner 21 | platform=$1 22 | 23 | # 1 extract target platform information from runner tags 24 | platform=${platform//"["/""} 25 | platform=${platform//"]"/""} 26 | platform=${platform//" "/""} 27 | platform=${platform/pid/""} 28 | platform=${platform/site/""} 29 | platform=${platform//","/" "} 30 | platform=${platform//" "/" "} 31 | 32 | # 2 separate platform and environment names 33 | instance="" 34 | 35 | reg_expr_job="^build_(release|integration)_(.+)__(.+)__$" 36 | 37 | if [[ $CI_JOB_NAME =~ $reg_expr_job ]]; then 38 | instance_job=${BASH_REMATCH[3]} 39 | platform_job=${BASH_REMATCH[2]} 40 | platform_job=${platform_job//plusplus/"++"} 41 | 42 | IFS=' ' read -ra my_array <<< $platform 43 | found="" 44 | expr="$platform_job__$instance_job__" 45 | #among all tags of the runner 46 | for i in "${my_array[@]}" 47 | do 48 | if [[ $i =~ "$expr" ]]; then 49 | instance=$instance_job 50 | platform=$platform_job 51 | found="1" 52 | break 53 | fi 54 | done 55 | 56 | if [[ $found == "" ]]; then 57 | echo "runner not capable of running job for platform $platform_job with instance $instance_job" 58 | exit 1 59 | fi 60 | fi 61 | 62 | if [ "$instance" != "" ]; then 63 | using_profile=use_$instance 64 | echo "[PID] CI : configuring environment $instance on platform $platform ..." 65 | cd binaries/pid-workspace/build 66 | cmd=mk profile=$using_profile env=$instance instance=$instance platform=$platform cmake --build . --target profiles 67 | CONFIGURE_RES=$? 68 | cd ../../.. 69 | if [ $CONFIGURE_RES != 0 ]; then 70 | echo "--------------------------------------------------------------" 71 | echo "----[PID] CI : configuring workspace: FAIL (setting profile) -" 72 | echo "--------------------------------------------------------------" 73 | exit $CONFIGURE_RES 74 | fi 75 | fi 76 | 77 | echo "--------------------------------------------------------------" 78 | echo "----[PID] CI : configuring workspace: SUCCESS ----------------" 79 | echo "--------------------------------------------------------------" 80 | -------------------------------------------------------------------------------- /cmake/platforms/CheckOS.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(CURRENT_PACKAGE_STRING CACHE INTERNAL "") 21 | set(CURRENT_PLATFORM_OS CACHE INTERNAL "") 22 | set(CURRENT_PLATFORM_INSTANCE ${PID_USE_INSTANCE_NAME} CACHE INTERNAL "")#reset with current value of instance name 23 | 24 | #test of the os is based on the compiler used (APPLE and UNIX variables) AND on system variables affected by crosscompilation (CMAKE_SYSTEM_NAME) 25 | #So it adapts to the current development environment in use 26 | 27 | #By default package string is the system name in CMake 28 | if(CMAKE_SYSTEM_NAME) 29 | set(CURRENT_PACKAGE_STRING "${CMAKE_SYSTEM_NAME}" CACHE INTERNAL "") 30 | endif() 31 | if(WIN32) 32 | set(CURRENT_PLATFORM_OS "windows" CACHE INTERNAL "") 33 | # set(CURRENT_PACKAGE_STRING "NT" CACHE INTERNAL "") #TODO check if mandatory or not to force this 34 | elseif(UNIX AND APPLE AND CMAKE_SYSTEM_NAME STREQUAL Darwin) #darwin = kernel name for macos systems 35 | set(CURRENT_PLATFORM_OS "macos" CACHE INTERNAL "") 36 | elseif(UNIX) 37 | if(CMAKE_SYSTEM_NAME STREQUAL Linux)# linux kernel = the reference !! 38 | set(CURRENT_PLATFORM_OS "linux" CACHE INTERNAL "") 39 | elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)# free BSD kernel 40 | set(CURRENT_PLATFORM_OS "freebsd" CACHE INTERNAL "") 41 | endif() 42 | endif() 43 | 44 | if(NOT CURRENT_PLATFORM_OS) 45 | message("[PID] WARNING: no OS detected. Maybe targetting bare metal ?") 46 | endif() -------------------------------------------------------------------------------- /cmake/commands/PID_Utility_Concat_Staticchecks_Files_Content.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/share/static_checks_result.xml) 21 | 22 | function(cat in_file out_file) 23 | file(STRINGS ${in_file} ALL_LINES) #getting global info on the package 24 | foreach(line IN LISTS ALL_LINES) 25 | if(NOT line MATCHES "^[ \t]*<(/?results|/?errors|\\?xml|cppcheck).*$")#if not a begin or end tag 26 | file(APPEND ${out_file} "${line}\n") 27 | endif() 28 | endforeach() 29 | endfunction(cat) 30 | 31 | function(extract_Header in_file out_file) 32 | set(to_append) 33 | file(STRINGS ${in_file} ALL_LINES) #getting global info on the package 34 | foreach(line IN LISTS ALL_LINES) 35 | if(NOT line MATCHES "^[ \t]*<(/results|/errors)>.*$")#if it is NOT and end tag 36 | file(APPEND ${out_file} "${line}\n") 37 | endif() 38 | endforeach() 39 | endfunction(extract_Header) 40 | 41 | # Prepare a temporary file to "cat" to: 42 | file(WRITE ${OUTPUT_FILE} "") #reset output 43 | file(GLOB LIST_OF_FILES "${CMAKE_CURRENT_BINARY_DIR}/share/static_checks_result_*.xml") 44 | 45 | # concatenating the content of xml files 46 | set(FIRST_FILE TRUE) 47 | foreach(in_file IN LISTS LIST_OF_FILES) 48 | if(FIRST_FILE) 49 | extract_Header(${in_file} ${OUTPUT_FILE}) 50 | set(FIRST_FILE FALSE) 51 | else() 52 | cat(${in_file} ${OUTPUT_FILE}) 53 | endif() 54 | endforeach() 55 | 56 | file(APPEND ${OUTPUT_FILE} "\n\t\n\n") 57 | -------------------------------------------------------------------------------- /cmake/patterns/wrappers/ci/configure_workspace.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | #first step is initializing the workspace 5 | echo "--------------------------------------------------------------" 6 | echo "----[PID] CI : configuring workspace -------------------------" 7 | echo "--------------------------------------------------------------" 8 | 9 | # 1) first time configuration 10 | cd binaries/pid-workspace/build 11 | cmake -DIN_CI_PROCESS=ON -DFORCE_CONTRIBUTION_SPACES="$PACKAGE_CONTRIBUTION_SPACES" -DPROFILE_EVALUATION_INFO=ON .. 12 | CONFIGURE_RES=$? 13 | cd ../../.. 14 | if [ $CONFIGURE_RES != 0 ]; then 15 | echo "--------------------------------------------------------------" 16 | echo "----[PID] CI : configuring workspace: FAIL -------------------" 17 | echo "--------------------------------------------------------------" 18 | exit $CONFIGURE_RES 19 | fi 20 | 21 | # 2) set the current profile if required 22 | 23 | #getting the current platform and instance (if any) of the current runner 24 | platform=$1 25 | 26 | # 1 extract target platform information from runner tags 27 | platform=${platform//"["/""} 28 | platform=${platform//"]"/""} 29 | platform=${platform//" "/""} 30 | platform=${platform/pid/""} 31 | platform=${platform/site/""} 32 | platform=${platform//","/" "} 33 | platform=${platform//" "/" "} 34 | 35 | # 2 separate platform and environment names 36 | instance="" 37 | 38 | reg_expr_job="^build_wrapper_(.+)__(.+)__$" 39 | 40 | if [[ $CI_JOB_NAME =~ $reg_expr_job ]]; then 41 | instance_job=${BASH_REMATCH[2]} 42 | platform_job=${BASH_REMATCH[1]} 43 | platform_job=${platform_job//plusplus/"++"} 44 | 45 | IFS=' ' read -ra my_array <<< $platform 46 | found="" 47 | expr="$platform_job__$instance_job__" 48 | #among all tags of the runner 49 | for i in "${my_array[@]}" 50 | do 51 | if [[ $i =~ "$expr" ]]; then 52 | instance=$instance_job 53 | platform=$platform_job 54 | found="1" 55 | break 56 | fi 57 | done 58 | 59 | if [[ $found == "" ]]; then 60 | echo "runner not capable of running job for platform $platform_job with instance $instance_job" 61 | exit 1 62 | fi 63 | fi 64 | 65 | if [ "$instance" != "" ]; then 66 | using_profile=use_$instance 67 | echo "[PID] CI : configuring environment $instance on platform $platform ..." 68 | cd binaries/pid-workspace/build 69 | cmd=mk profile=$using_profile env=$instance instance=$instance platform=$platform cmake --build . --target profiles 70 | CONFIGURE_RES=$? 71 | cd ../../.. 72 | if [ $CONFIGURE_RES != 0 ]; then 73 | echo "--------------------------------------------------------------" 74 | echo "----[PID] CI : configuring workspace: FAIL (set profile) -----" 75 | echo "--------------------------------------------------------------" 76 | exit $CONFIGURE_RES 77 | fi 78 | fi 79 | 80 | echo "--------------------------------------------------------------" 81 | echo "----[PID] CI : configuring workspace: SUCCESS ----------------" 82 | echo "--------------------------------------------------------------" 83 | -------------------------------------------------------------------------------- /cmake/.docs/pages/internal.rst: -------------------------------------------------------------------------------- 1 | Internal functions 2 | ****************** 3 | 4 | Package Description 5 | =================== 6 | 7 | .. setmode:: internal 8 | 9 | .. cmake-module:: ../../api/PID_Package_API_Internal_Functions.cmake 10 | .. cmake-module:: ../../api/PID_Package_Build_Targets_Management_Functions.cmake 11 | .. cmake-module:: ../../api/PID_Package_Cache_Management_Functions.cmake 12 | .. cmake-module:: ../../api/PID_Package_Coding_Support.cmake 13 | .. cmake-module:: ../../api/PID_Package_Configuration_Functions.cmake 14 | 15 | 16 | Wrapper Description 17 | =================== 18 | 19 | .. setmode:: internal 20 | 21 | .. cmake-module:: ../../api/PID_Wrapper_API_Internal_Functions.cmake 22 | 23 | 24 | Framework Description 25 | ===================== 26 | 27 | .. setmode:: internal 28 | 29 | .. cmake-module:: ../../api/PID_Framework_API_Internal_Functions.cmake 30 | 31 | 32 | Environment Description 33 | ======================= 34 | 35 | .. setmode:: internal 36 | 37 | .. cmake-module:: ../../api/PID_Environment_API_Internal_Functions.cmake 38 | 39 | 40 | Workspace Utilities 41 | =================== 42 | 43 | .. setmode:: internal 44 | 45 | .. cmake-module:: ../../api/PID_Workspace_Internal_Functions.cmake 46 | 47 | 48 | General Utilities 49 | ================= 50 | 51 | .. setmode:: internal 52 | 53 | .. cmake-module:: ../../api/PID_Utils_Functions.cmake 54 | 55 | .. cmake-module:: ../../api/PID_Git_Functions.cmake 56 | 57 | 58 | Platform Utilities 59 | =================== 60 | 61 | .. setmode:: internal 62 | 63 | .. cmake-module:: ../../api/PID_Platform_Management_Functions.cmake 64 | 65 | .. cmake-module:: ../../api/PID_Plugins_Management.cmake 66 | 67 | Finding Utilities 68 | ================= 69 | 70 | .. setmode:: internal 71 | 72 | .. cmake-module:: ../../api/PID_Finding_Functions.cmake 73 | 74 | Deployment Utilities 75 | ==================== 76 | 77 | .. setmode:: internal 78 | 79 | .. cmake-module:: ../../api/PID_Deployment_Functions.cmake 80 | 81 | Documentation Utilities 82 | ======================= 83 | 84 | .. setmode:: internal 85 | 86 | .. cmake-module:: ../../api/PID_Documentation_Management_Functions.cmake 87 | 88 | .. cmake-module:: ../../api/PID_Meta_Information_Management_Functions.cmake 89 | 90 | 91 | Static site Utilities 92 | ===================== 93 | 94 | .. setmode:: internal 95 | 96 | .. cmake-module:: ../../api/PID_Static_Site_Management_Functions.cmake 97 | 98 | 99 | Continuous integration Utilities 100 | ================================ 101 | 102 | .. setmode:: internal 103 | 104 | .. cmake-module:: ../../api/PID_Continuous_Integration_Functions.cmake 105 | 106 | 107 | Process Progress Utilities 108 | ========================== 109 | 110 | .. setmode:: internal 111 | 112 | .. cmake-module:: ../../api/PID_Progress_Management_Functions.cmake 113 | 114 | 115 | PID Version Compatibility 116 | ========================= 117 | 118 | .. setmode:: internal 119 | 120 | .. cmake-module:: ../../api/PID_Version_Management_Functions.cmake 121 | -------------------------------------------------------------------------------- /cmake/commands/Generate_PID_Coverage.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(coverage_info "${TARGET_BINARY_DIR}/lcovoutput.info") 21 | set(coverage_cleaned "${TARGET_BINARY_DIR}/${PROJECT_NAME}_coverage") 22 | set(coverage_dir "${TARGET_BINARY_DIR}/share/coverage_report") 23 | 24 | execute_process( 25 | COMMAND ${LCOV_EXECUTABLE} --base-directory ${TARGET_SOURCE_DIR} --directory ${TARGET_BINARY_DIR} --zerocounters #prepare coverage generation 26 | WORKING_DIRECTORY ${TARGET_BINARY_DIR} 27 | ) 28 | execute_process( 29 | COMMAND ${CMAKE_COMMAND} -E env CTEST_OUTPUT_ON_FAILURE=1 ${CMAKE_MAKE_PROGRAM} test ${PARALLEL_JOBS_FLAG} # Run tests 30 | WORKING_DIRECTORY ${TARGET_BINARY_DIR} 31 | ) 32 | execute_process( 33 | COMMAND ${LCOV_EXECUTABLE} --base-directory ${TARGET_SOURCE_DIR} --directory ${TARGET_BINARY_DIR} --capture --output-file ${coverage_info} --no-external 34 | WORKING_DIRECTORY ${TARGET_BINARY_DIR} 35 | ) 36 | execute_process( 37 | #configure the filter of output (remove everything that is not related to the libraries) 38 | COMMAND ${LCOV_EXECUTABLE} --remove ${coverage_info} "/usr/*" "${WORKSPACE_DIR}/install/*" "${TARGET_SOURCE_DIR}/test/*" --output-file ${coverage_cleaned} 39 | WORKING_DIRECTORY ${TARGET_BINARY_DIR} 40 | ) 41 | execute_process( 42 | COMMAND ${GENHTML_EXECUTABLE} -o ${coverage_dir} ${coverage_cleaned} #generating output 43 | WORKING_DIRECTORY ${TARGET_BINARY_DIR} 44 | ) 45 | 46 | file(REMOVE ${coverage_info} ${coverage_cleaned}) 47 | -------------------------------------------------------------------------------- /cmake/commands/Install_PID_System_Configuration.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | 21 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) 22 | include(PID_Set_Modules_Path NO_POLICY_SCOPE) 23 | include(PID_Set_Policies NO_POLICY_SCOPE) 24 | include(PID_Wrapper_API_Internal_Functions NO_POLICY_SCOPE) 25 | load_Workspace_Info() #loading the current platform configuration 26 | configure_Contribution_Spaces() 27 | 28 | set(package_dir ${WORKSPACE_DIR}/wrappers/${TARGET_EXTERNAL_PACKAGE}) 29 | set(package_system_src_dir ${package_dir}/src/system) 30 | set(package_system_install_dir ${WORKSPACE_DIR}/install/${CURRENT_PLATFORM}/__system__/${TARGET_EXTERNAL_PACKAGE}) 31 | 32 | if(NOT EXISTS ${package_dir}/build/Build${TARGET_EXTERNAL_PACKAGE}.cmake) 33 | message(FATAL_ERROR "[PID] CRITICAL ERROR : build configuration file has not been generated for ${TARGET_EXTERNAL_PACKAGE}, please rerun wrapper configruation...") 34 | return() 35 | endif() 36 | 37 | include(${package_dir}/build/Build${TARGET_EXTERNAL_PACKAGE}.cmake)#load the content description 38 | 39 | if(NOT ${TARGET_EXTERNAL_PACKAGE}_SYSTEM_CONFIGURATION_DEFINED) #check that the target version exists 40 | message(FATAL_ERROR "[PID] CRITICAL ERROR : wrapper of ${TARGET_EXTERNAL_PACKAGE} does not define any system configuration check !!! Build aborted ...") 41 | return() 42 | endif() 43 | 44 | generate_Wrapper_System_Configuration_Check_Scripts(${TARGET_EXTERNAL_PACKAGE} ${package_system_src_dir} ${package_system_install_dir}) 45 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/_includes/header.html: -------------------------------------------------------------------------------- 1 | 54 | -------------------------------------------------------------------------------- /cmake/patterns/frameworks/static/pages/help.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Help 4 | --- 5 | 6 | # What is this site ? 7 | 8 | This is the documentation site of the {{ site.data.framework.framework_name}} framework. A **framework** is a collection of libraries, executables and other software artifacts. 9 | 10 | The site has been automatically generated using jekyll, configured using CMake and updated/published using gitlab, based on a dedicated development environment called **PID**. Technically, this site has been generated from [this source repository]({{site.data.framework.framework_git_project}}) (you may have no access to the repository project). 11 | 12 | In **PID** environment **frameworks** are agregates of **packages**, each **package** containing any kind of software artifacts (libraries, executables, configuration files and more generally any kind of filesystem resources). They allow to put into a common place any information about these packages (either for developpers or end-users). 13 | 14 | 15 | # How to use this site ? 16 | 17 | This site has the same general "look and feel" as any other framework in PID: 18 | 19 | - The header bar provides menus that help you navigate between different global pages of the framework. 20 | - **Documentation** provides submenus to access all kind of documentation of the framework: 21 | + *Introduction* : quick introduction to the framework purpose. 22 | + *Install* : to get installation instructions. 23 | + *Tutorial* : to get information about how using the framework. 24 | + *Advanced topics* : to get more information on advanced topics. 25 | 26 | - **Activity** provides the history of last activities in the framework. These activities consist in: 27 | + Information about packages update. Any time a new version is released, the activity get a new post. 28 | + Information about global modification of the framework site global content. 29 | 30 | - **About** provides this help page and a contact page. 31 | 32 | - The left sidebar provides an entry for each **package** belonging to the framework. By cliking on it you can simply go to the package page. The package page has a header that allows to navigate between package elements. This header menu is empty for external packages. For native packages it contains following items: 33 | - **Documentation** provides submenus to access all kind of documentation of the framework: 34 | + *Introduction* : quick introduction to the package purpose. 35 | + *Install* : to get installation instructions. 36 | + *Use* : to know of to use libraries in your own programs 37 | + *Tutorial* : to get information about how to use the package. 38 | + *Advanced topics* : to get more information on advanced topics. 39 | 40 | - **Developers** provides submenus to get info about the development of the package (some of these section may be unavailable depending on the package) 41 | + *API documentation* lets you consult the **doxygen** generated documentation of the package (last release version only). 42 | + *Static Checks* lets you consult the **cppcheck** generated report of static checks on the package (last release version only). 43 | + *Coverage* lets you consult the **lcov** generated report of tests coverage on the package (last release version only). 44 | + *Binaries* gives the list of all available binaries (available versions for different platforms). 45 | 46 | - **Contact** tells you who to contact to get help about the package. 47 | 48 | 49 | -------------------------------------------------------------------------------- /share/zsh_completions.sh: -------------------------------------------------------------------------------- 1 | 2 | # ZSH behaves differently if the completion function starts with an underscore so don't use one 3 | pid_ws_zsh_completions() { 4 | _pid_ws_get_project_dir 5 | _pid_ws_get_workspace_dir 6 | 7 | reply=() 8 | 9 | local cmd 10 | cmd=${=${(s: :)words}[2]} 11 | 12 | local opts 13 | opts="cd workspace exec run run_build configure" 14 | 15 | if [ "$cmd" = "cd" ]; then 16 | folders="" 17 | _pid_ws_append_folders $ws_dir/packages 18 | _pid_ws_append_folders $ws_dir/wrappers 19 | _pid_ws_append_folders $ws_dir/sites/frameworks 20 | _pid_ws_append_folders $ws_dir/environments 21 | reply=( "${=folders}" ) 22 | unset folders 23 | elif [ "$cmd" = "workspace" ]; then 24 | _pid_ws_get_targets $ws_dir 25 | opts="$opts $targets" 26 | reply=( "${=opts}" ) 27 | elif [ "$cmd" = "exec" ]; then 28 | if [ $CURRENT -eq 3 ]; then 29 | _pid_ws_get_all_folders 30 | reply=( "${=folders}" ) 31 | unset folders 32 | else 33 | _pid_ws_get_abs_path ${COMP_WORDS[2]} 34 | _pid_ws_get_targets $abs_path 35 | opts="$opts $targets" 36 | reply=( "${=opts}" ) 37 | fi 38 | elif [ "$cmd" = "run" ]; then 39 | local platform 40 | local package 41 | local version 42 | platform=${=${(s: :)words}[3]} 43 | package=${=${(s: :)words}[4]} 44 | version=${=${(s: :)words}[5]} 45 | if [ $CURRENT -eq 3 ]; then 46 | _pid_ws_get_workspace_dir 47 | folders="" 48 | _pid_ws_append_folders $ws_dir/install 49 | reply=( "${=folders}" ) 50 | unset folders 51 | elif [ $CURRENT -eq 4 ]; then 52 | _pid_ws_get_workspace_dir 53 | folders="" 54 | _pid_ws_append_folders $ws_dir/install/$platform 55 | reply=( "${=folders}" ) 56 | unset folders 57 | elif [ $CURRENT -eq 5 ]; then 58 | _pid_ws_get_workspace_dir 59 | folders="" 60 | _pid_ws_append_folders $ws_dir/install/$platform/$package 61 | reply=( "${=folders}" ) 62 | unset folders 63 | elif [ $CURRENT -eq 6 ]; then 64 | _pid_ws_get_workspace_dir 65 | files="" 66 | _pid_ws_append_executables $ws_dir/install/$platform/$package/$version/bin 67 | reply=( "${=files}" ) 68 | unset files 69 | fi 70 | elif [ "$cmd" = "run_build" ]; then 71 | local mode 72 | local executable 73 | mode=${=${(s: :)words}[3]} 74 | executable=${=${(s: :)words}[4]} 75 | if [ $CURRENT -eq 3 ]; then 76 | _pid_ws_get_project_dir 77 | folders="debug release" 78 | reply=( "${=folders}" ) 79 | unset folders 80 | elif [ $CURRENT -eq 4 ]; then 81 | _pid_ws_get_project_dir 82 | files="" 83 | _pid_ws_append_executables $project_dir/build/$mode/apps 84 | _pid_ws_append_executables $project_dir/build/$mode/test 85 | reply=( "${=files}" ) 86 | unset files 87 | fi 88 | else 89 | _pid_ws_get_targets $project_dir 90 | opts="$opts $targets" 91 | reply=( "${=opts}" ) 92 | fi 93 | 94 | unset project_dir 95 | unset ws_dir 96 | unset targets 97 | } 98 | -------------------------------------------------------------------------------- /share/bash_completions.sh: -------------------------------------------------------------------------------- 1 | 2 | pid_ws_bash_completions() { 3 | _pid_ws_get_project_dir 4 | _pid_ws_get_workspace_dir 5 | 6 | local cmd 7 | cmd=${COMP_WORDS[1]} 8 | 9 | local opts 10 | opts="cd workspace exec run run_build configure" 11 | 12 | if [ "$cmd" = "cd" ]; then 13 | _pid_ws_get_all_folders 14 | COMPREPLY=( $(compgen -W "$folders" "${COMP_WORDS[2]}") ) 15 | unset folders 16 | elif [ "$cmd" = "workspace" ]; then 17 | _pid_ws_get_targets $ws_dir 18 | opts="$opts $targets" 19 | COMPREPLY=($(compgen -W "$opts" "${COMP_WORDS[2]}")) 20 | elif [ "$cmd" = "exec" ]; then 21 | if [ $COMP_CWORD -eq 2 ]; then 22 | _pid_ws_get_all_folders 23 | COMPREPLY=($(compgen -W "$folders" "${COMP_WORDS[2]}")) 24 | unset folders 25 | else 26 | _pid_ws_get_abs_path ${COMP_WORDS[2]} 27 | _pid_ws_get_targets $abs_path 28 | opts="$opts $targets" 29 | COMPREPLY=($(compgen -W "$opts" "${COMP_WORDS[3]}")) 30 | fi 31 | elif [ "$cmd" = "run" ]; then 32 | local platform 33 | local package 34 | local version 35 | platform=${COMP_WORDS[2]} 36 | package=${COMP_WORDS[3]} 37 | version=${COMP_WORDS[4]} 38 | if [ $COMP_CWORD -eq 2 ]; then 39 | _pid_ws_get_workspace_dir 40 | folders="" 41 | _pid_ws_append_folders $ws_dir/install 42 | COMPREPLY=($(compgen -W "$folders" "${COMP_WORDS[2]}")) 43 | unset folders 44 | elif [ $COMP_CWORD -eq 3 ]; then 45 | _pid_ws_get_workspace_dir 46 | folders="" 47 | _pid_ws_append_folders $ws_dir/install/$platform 48 | COMPREPLY=($(compgen -W "$folders" "${COMP_WORDS[3]}")) 49 | unset folders 50 | elif [ $COMP_CWORD -eq 4 ]; then 51 | _pid_ws_get_workspace_dir 52 | folders="" 53 | _pid_ws_append_folders $ws_dir/install/$platform/$package 54 | COMPREPLY=($(compgen -W "$folders" "${COMP_WORDS[4]}")) 55 | unset folders 56 | elif [ $COMP_CWORD -eq 5 ]; then 57 | _pid_ws_get_workspace_dir 58 | files="" 59 | _pid_ws_append_executables $ws_dir/install/$platform/$package/$version/bin 60 | COMPREPLY=($(compgen -W "$files" "${COMP_WORDS[5]}")) 61 | unset files 62 | fi 63 | elif [ "$cmd" = "run_build" ]; then 64 | local mode 65 | local executable 66 | mode=${COMP_WORDS[2]} 67 | executable=${COMP_WORDS[3]} 68 | if [ $COMP_CWORD -eq 2 ]; then 69 | _pid_ws_get_project_dir 70 | folders="debug release" 71 | COMPREPLY=($(compgen -W "$folders" "${COMP_WORDS[2]}")) 72 | unset folders 73 | elif [ $COMP_CWORD -eq 3 ]; then 74 | _pid_ws_get_project_dir 75 | files="" 76 | _pid_ws_append_executables $project_dir/build/$mode/apps 77 | _pid_ws_append_executables $project_dir/build/$mode/test 78 | COMPREPLY=($(compgen -W "$files" "${COMP_WORDS[3]}")) 79 | unset files 80 | fi 81 | else 82 | _pid_ws_get_targets $project_dir 83 | opts="$opts $targets" 84 | COMPREPLY=($(compgen -W "$opts" "${COMP_WORDS[1]}")) 85 | fi 86 | 87 | unset project_dir 88 | unset ws_dir 89 | unset targets 90 | } 91 | -------------------------------------------------------------------------------- /cmake/commands/Install_PID_Python_Script.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | # using systems scripts the workspace 21 | 22 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) 23 | include(PID_Set_Modules_Path NO_POLICY_SCOPE) 24 | include(PID_Set_Policies NO_POLICY_SCOPE) 25 | include(PID_Utils_Functions NO_POLICY_SCOPE) 26 | include(PID_Platform_Management_Functions NO_POLICY_SCOPE) 27 | load_Workspace_Info() #loading the current platform configuration 28 | 29 | if(NOT CURRENT_PYTHON) 30 | return()#do nothing if python not configured 31 | endif() 32 | 33 | get_Mode_Variables(TARGET_SUFFIX VAR_SUFFIX ${CMAKE_BUILD_TYPE}) 34 | 35 | if(CURRENT_PLATFORM_OS STREQUAL "macos") 36 | set(module_binary_name ${TARGET_MODULE}${TARGET_SUFFIX}.dylib) 37 | elseif(CURRENT_PLATFORM_OS STREQUAL "windows") 38 | set(module_binary_name ${TARGET_MODULE}${TARGET_SUFFIX}.dll) 39 | else() 40 | set(module_binary_name ${TARGET_MODULE}${TARGET_SUFFIX}.so) 41 | endif() 42 | 43 | # compute the path to the target module install folder 44 | set(path_to_package_install ${WORKSPACE_DIR}/install/${CURRENT_PLATFORM}/${TARGET_PACKAGE}/${TARGET_VERSION}) 45 | set(path_to_python_install ${WORKSPACE_DIR}/install/${CURRENT_PLATFORM}/__python${CURRENT_PYTHON}__) 46 | set(path_to_module_python_wrapper ${path_to_package_install}/share/script/${TARGET_MODULE})#name is unique for DEBUG or RELEASE versions 47 | 48 | # 2) now in python folder creating a symlink pointing to the module script folder 49 | contains_Python_Package_Description(IS_PYTHON_PACK ${path_to_module_python_wrapper}) 50 | if(IS_PYTHON_PACK) 51 | if(NOT EXISTS ${path_to_python_install}) 52 | file(MAKE_DIRECTORY ${path_to_python_install}) 53 | endif() 54 | create_Symlink(${path_to_module_python_wrapper} ${path_to_python_install}/${TARGET_MODULE}${TARGET_SUFFIX})#generate the symlink used 55 | message("-- Installing: ${path_to_python_install}/${TARGET_MODULE}${TARGET_SUFFIX}") 56 | endif() 57 | -------------------------------------------------------------------------------- /cmake/patterns/packages/ci/build_package_integration.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "--------------------------------------------------------------" 4 | echo "----[PID] CI : building package ------------------------------" 5 | echo "--------------------------------------------------------------" 6 | 7 | cd build 8 | #NB: never building API doc nor binaries on integration, but always generating developpers reports 9 | if [ "$PACKAGE_HAS_LIBRARIES" = true ] ; then 10 | if [ "$PACKAGE_HAS_TESTS" = true ] ; then 11 | if [ "$PACKAGE_HAS_EXAMPLES" = true ] ; then 12 | cmake -DBUILD_RELEASE_ONLY=OFF -DADDITIONAL_DEBUG_INFO=ON -DBUILD_AND_RUN_TESTS=ON -DENABLE_SANITIZERS=ON -DRUN_TESTS_IN_DEBUG=ON -DBUILD_COVERAGE_REPORT=ON -DENABLE_PARALLEL_BUILD=ON -DBUILD_EXAMPLES=ON -DBUILD_API_DOC=OFF -DBUILD_STATIC_CODE_CHECKING_REPORT=ON -DWORKSPACE_DIR="../binaries/pid-workspace" .. 13 | else 14 | cmake -DBUILD_RELEASE_ONLY=OFF -DADDITIONAL_DEBUG_INFO=ON -DBUILD_AND_RUN_TESTS=ON -DENABLE_SANITIZERS=ON -DRUN_TESTS_IN_DEBUG=ON -DBUILD_COVERAGE_REPORT=ON -DENABLE_PARALLEL_BUILD=ON -DBUILD_EXAMPLES=OFF -DBUILD_API_DOC=OFF -DBUILD_STATIC_CODE_CHECKING_REPORT=ON -DWORKSPACE_DIR="../binaries/pid-workspace" .. 15 | fi 16 | else 17 | if [ "$PACKAGE_HAS_EXAMPLES" = true ] ; then 18 | cmake -DBUILD_RELEASE_ONLY=OFF -DBUILD_AND_RUN_TESTS=OFF -DENABLE_PARALLEL_BUILD=ON -DBUILD_EXAMPLES=ON -DBUILD_API_DOC=OFF -DBUILD_STATIC_CODE_CHECKING_REPORT=ON -DADDITIONAL_DEBUG_INFO=ON -DWORKSPACE_DIR="../binaries/pid-workspace" .. 19 | else 20 | cmake -DBUILD_RELEASE_ONLY=OFF -DBUILD_AND_RUN_TESTS=OFF -DENABLE_PARALLEL_BUILD=ON -DBUILD_EXAMPLES=OFF -DBUILD_API_DOC=OFF -DBUILD_STATIC_CODE_CHECKING_REPORT=ON -DADDITIONAL_DEBUG_INFO=ON -DWORKSPACE_DIR="../binaries/pid-workspace" .. 21 | fi 22 | fi 23 | else  # no libraries => this is a pure applicative package, no examples since no lib 24 | if [ "$PACKAGE_HAS_TESTS" = true ] ; then 25 | cmake -DBUILD_RELEASE_ONLY=OFF -DBUILD_AND_RUN_TESTS=ON -DENABLE_SANITIZERS=ON -DRUN_TESTS_IN_DEBUG=ON -DBUILD_COVERAGE_REPORT=ON -DENABLE_PARALLEL_BUILD=ON -DBUILD_EXAMPLES=OFF -DBUILD_API_DOC=OFF -DBUILD_STATIC_CODE_CHECKING_REPORT=ON -DADDITIONAL_DEBUG_INFO=OFF -DWORKSPACE_DIR="../binaries/pid-workspace" .. 26 | else 27 | cmake -DBUILD_RELEASE_ONLY=OFF -DBUILD_AND_RUN_TESTS=OFF -DENABLE_PARALLEL_BUILD=ON -DBUILD_EXAMPLES=OFF -DBUILD_API_DOC=OFF -DBUILD_STATIC_CODE_CHECKING_REPORT=ON -DADDITIONAL_DEBUG_INFO=OFF -DWORKSPACE_DIR="../binaries/pid-workspace" .. 28 | fi 29 | fi 30 | CONF_RES=$? 31 | if [ $CONF_RES != 0 ]; then 32 | cd .. 33 | echo "--------------------------------------------------------------" 34 | echo "----[PID] CI : building package: FAIL (configuration) --------" 35 | echo "--------------------------------------------------------------" 36 | exit $CONF_RES 37 | fi 38 | # always generating the dependencies file of the package 39 | write_file=true cmake --build . --target list_dependencies 40 | #build the code 41 | force=true cmake --build . --target build 42 | BUILD_RES=$? 43 | cd .. 44 | if [ $BUILD_RES != 0 ]; then 45 | echo "--------------------------------------------------------------" 46 | echo "----[PID] CI : building package: FAIL --------------------" 47 | echo "--------------------------------------------------------------" 48 | exit $BUILD_RES 49 | fi 50 | 51 | echo "--------------------------------------------------------------" 52 | echo "----[PID] CI : building package: SUCCESS ---------------------" 53 | echo "--------------------------------------------------------------" 54 | -------------------------------------------------------------------------------- /cmake/platforms/eval/eval_CUDA.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | set(CUDA_EVAL_RESULT FALSE) 21 | set(LANG_CUDA_PLATFORM_CONSTRAINTS) 22 | 23 | if(NOT CUDA_Language_AVAILABLE)#if the CUDA version is NOT available => CUDA not defined 24 | return()#if NVCC not found no need to continue 25 | endif() 26 | 27 | if(CUDA_version # a version constraint is defined (if code works only with a given version) 28 | AND NOT CUDA_version VERSION_EQUAL CUDA_VERSION) #required VS provided CUDA versions DOES NOT MATCH ! 29 | return() 30 | endif() 31 | 32 | if(CUDA_min_version) 33 | if(CUDA_VERSION VERSION_LESS CUDA_min_version) 34 | return() 35 | endif() 36 | endif() 37 | 38 | if(CUDA_max_version) 39 | if(CUDA_VERSION VERSION_GREATER_EQUAL CUDA_max_version) 40 | return() 41 | endif() 42 | endif() 43 | 44 | if(CUDA_architecture) 45 | foreach(an_arch IN LISTS CUDA_architecture) 46 | list(FIND AVAILABLE_CUDA_ARCHS ${an_arch} INDEX) 47 | if(INDEX EQUAL -1) 48 | return()#arch cannot ne used !! 49 | endif() 50 | endforeach() 51 | else() 52 | set(CUDA_architecture ${DEFAULT_CUDA_ARCH}) #using the default CUDA arch by default 53 | endif() 54 | set(CUDA_soname ${CUDA_STANDARD_LIBRARIES}) 55 | 56 | # now set the flags according to the selected archs 57 | set(NVCC_FLAGS_EXTRA "")# NVCC flags to be set when using target architectures 58 | foreach(an_arch IN LISTS CUDA_architecture) 59 | string(REGEX REPLACE "\\." "" res_number "${an_arch}") 60 | # Tell NVCC to add binaries for the specified GPUs 61 | set(NVCC_FLAGS_EXTRA "${NVCC_FLAGS_EXTRA} -gencode arch=compute_${res_number},code=sm_${res_number}") 62 | endforeach() 63 | 64 | set(NVCC_FLAGS_EXTRA "${NVCC_FLAGS_EXTRA} -D_FORCE_INLINES") 65 | #set the compile flags to ensure that locally compiled units match requirements in binary 66 | set(CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA} CACHE STRING "" FORCE) 67 | set(CMAKE_CUDA_FLAGS ${NVCC_FLAGS_EXTRA} CACHE STRING "" FORCE) 68 | set(CUDA_EVAL_RESULT TRUE) 69 | -------------------------------------------------------------------------------- /cmake/commands/Build_PID_Package_Site.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | ### script used to build the site using jekyll 21 | 22 | #1) copy files from src to the adequate build folder 23 | 24 | set(PATH_TO_SITE ${WORKSPACE_DIR}/sites/packages/${TARGET_PACKAGE}) 25 | set(PATH_TO_SITE_SRC ${PATH_TO_SITE}/src) 26 | set(PATH_TO_SITE_JEKYLL ${PATH_TO_SITE}/build/to_generate) 27 | set(PATH_TO_SITE_RESULT ${PATH_TO_SITE}/build/generated) 28 | file(REMOVE ${PATH_TO_SITE_RESULT}) 29 | 30 | set(list_of_folders_to_copy) 31 | if(EXISTS ${PATH_TO_SITE_SRC}/api_doc) 32 | list(APPEND list_of_folders_to_copy ${PATH_TO_SITE_SRC}/api_doc) 33 | endif() 34 | if(EXISTS ${PATH_TO_SITE_SRC}/coverage) 35 | list(APPEND list_of_folders_to_copy ${PATH_TO_SITE_SRC}/coverage) 36 | endif() 37 | if(EXISTS ${PATH_TO_SITE_SRC}/pages) 38 | list(APPEND list_of_folders_to_copy ${PATH_TO_SITE_SRC}/pages) 39 | endif() 40 | if(EXISTS ${PATH_TO_SITE_SRC}/static_checks) 41 | list(APPEND list_of_folders_to_copy ${PATH_TO_SITE_SRC}/static_checks) 42 | endif() 43 | if(EXISTS ${PATH_TO_SITE_SRC}/_binaries) 44 | list(APPEND list_of_folders_to_copy ${PATH_TO_SITE_SRC}/_binaries) 45 | endif() 46 | if(EXISTS ${PATH_TO_SITE_SRC}/_data) 47 | list(APPEND list_of_folders_to_copy ${PATH_TO_SITE_SRC}/_data) 48 | endif() 49 | if(EXISTS ${PATH_TO_SITE_SRC}/_posts) 50 | list(APPEND list_of_folders_to_copy ${PATH_TO_SITE_SRC}/_posts) 51 | endif() 52 | if(list_of_folders_to_copy) 53 | file(COPY ${list_of_folders_to_copy} DESTINATION ${PATH_TO_SITE_JEKYLL}) 54 | #2) build site with jekyll 55 | execute_process(COMMAND ${JEKYLL_EXECUTABLE} build -d ${PATH_TO_SITE_RESULT} 56 | OUTPUT_VARIABLE out ERROR_VARIABLE out RESULT_VARIABLE res 57 | WORKING_DIRECTORY ${PATH_TO_SITE_JEKYLL}) 58 | if(NOT res EQUAL 0) 59 | message("[PID] ERROR: Problem during jekyll execution: ${out}") 60 | endif() 61 | else() 62 | message("[PID] WARNING: nothing to publish in static site of package ${TARGET_PACKAGE}") 63 | endif() 64 | -------------------------------------------------------------------------------- /cmake/commands/Check_PID_Package_Official_Repository.cmake: -------------------------------------------------------------------------------- 1 | ######################################################################################### 2 | # This file is part of the program PID # 3 | # Program description : build system supportting the PID methodology # 4 | # Copyright (C) Robin Passama, LIRMM (Laboratoire d'Informatique de Robotique # 5 | # et de Microelectronique de Montpellier). All Right reserved. # 6 | # # 7 | # This software is free software: you can redistribute it and/or modify # 8 | # it under the terms of the CeCILL-C license as published by # 9 | # the CEA CNRS INRIA, either version 1 # 10 | # of the License, or (at your option) any later version. # 11 | # This software is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # CeCILL-C License for more details. # 15 | # # 16 | # You can find the complete license description on the official website # 17 | # of the CeCILL licenses family (http://www.cecill.info/index.en.html) # 18 | ######################################################################################### 19 | 20 | 21 | list(APPEND CMAKE_MODULE_PATH ${WORKSPACE_DIR}/cmake) 22 | include(PID_Set_Modules_Path NO_POLICY_SCOPE) 23 | include(PID_Set_Policies NO_POLICY_SCOPE) 24 | include(PID_Git_Functions NO_POLICY_SCOPE) 25 | include(PID_Utils_Functions NO_POLICY_SCOPE) 26 | include(PID_Platform_Management_Functions NO_POLICY_SCOPE) 27 | load_Workspace_Info() #loading the current platform configuration 28 | 29 | is_Repository_Remote_Defined(CONNECTED ${WORKSPACE_DIR}/packages/${TARGET_PACKAGE} official) 30 | if(CONNECTED) 31 | get_Deployment_Unit_Repository_Address_In_Description(${WORKSPACE_DIR}/packages/${TARGET_PACKAGE} OFFICIAL_URL OFFICIAL_PUBLIC_URL) 32 | get_Remotes_Address(${WORKSPACE_DIR}/packages/${TARGET_PACKAGE} ADDR_OFFICIAL_FETCH ADDR_OFFICIAL_PUSH ADDR_ORIGIN_FETCH ADDR_ORIGIN_PUSH) 33 | if(NOT ADDR_OFFICIAL_PUSH STREQUAL OFFICIAL_URL 34 | AND NOT ADDR_OFFICIAL_FETCH STREQUAL OFFICIAL_PUBLIC_URL)# the remote address does not match address specified in the package 35 | reconnect_Repository_Remote(${WORKSPACE_DIR}/packages/${TARGET_PACKAGE} ${OFFICIAL_URL} "${OFFICIAL_PUBLIC_URL}" official) 36 | if(OFFICIAL_PUBLIC_URL) 37 | message("[PID] INFO : reconfiguing official repository address to fetch=${OFFICIAL_URL} push=${OFFICIAL_PUBLIC_URL}") 38 | else() 39 | message("[PID] INFO : reconfiguing official repository address to ${OFFICIAL_URL}") 40 | endif() 41 | if(ADDR_OFFICIAL STREQUAL ADDR_ORIGIN_FETCH)#origin was also official 42 | reconnect_Repository_Remote(${WORKSPACE_DIR}/packages/${TARGET_PACKAGE} ${OFFICIAL_URL} "${OFFICIAL_PUBLIC_URL}" origin) 43 | if(OFFICIAL_PUBLIC_URL) 44 | message("[PID] INFO : reconfiguing origin repository address to fetch=${OFFICIAL_URL} push=${OFFICIAL_PUBLIC_URL} (keep it same as official)") 45 | else() 46 | message("[PID] INFO : reconfiguing official repository address to ${OFFICIAL_URL} (keep it same as official)") 47 | endif() 48 | endif() 49 | # else nothing to do 50 | endif() 51 | # else nothing to do 52 | endif() 53 | --------------------------------------------------------------------------------