diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b302fe373681cdc862851e871c53d3842d0d842..bb3681f42076dec0c6b13ae7594854eb26eedeb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.16) # CMake utils list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -90,8 +90,8 @@ endif() #------------------------------------------------------ # Checks if compiler version is compatible with Pugs sources -set(GNU_CXX_MIN_VERSION "8.0.0") -set(CLANG_CXX_MIN_VERSION "8.0.0") +set(GNU_CXX_MIN_VERSION "9.0.0") +set(CLANG_CXX_MIN_VERSION "10.0.0") # Pugs default compiler flags set(PUGS_CXX_FLAGS "${PUGS_CXX_FLAGS} -Wall -Wextra -pedantic") @@ -107,11 +107,11 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(PUGS_CXX_FLAGS "${PUGS_CXX_FLAGS} -Wsign-compare -Wunused -Wunused-member-function -Wunused-private-field") endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0") - set(PUGS_STD_LINK_FLAGS "-lstdc++fs") - endif() -endif() +# if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +# if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0") +# set(PUGS_STD_LINK_FLAGS "-lstdc++fs") +# endif() +# endif() #------------------------------------------------------ @@ -600,20 +600,29 @@ target_link_libraries( include(PugsDoxygen) # ------------------- Installation -------------------- -# temporary version workaround -if(${CMAKE_VERSION} VERSION_LESS "3.13.0") - install(TARGETS pugs - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -else() - install(TARGETS pugs PugsAlgebra PugsAnalysis PugsUtils PugsLanguage PugsLanguageAST PugsLanguageModules PugsLanguageAlgorithms PugsLanguageUtils PugsMesh PugsScheme PugsOutput +install(TARGETS + pugs + PugsMesh + PugsAlgebra + PugsAnalysis + PugsUtils + PugsLanguage + PugsLanguageAST + PugsLanguageModules + PugsLanguageAlgorithms + PugsMesh + PugsAlgebra + PugsScheme + PugsUtils + PugsOutput + PugsLanguageUtils + kokkos - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -endif() + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +# ------------------- Build options ------------------- message("") message("====== pugs build options ======") message(" version: ${PUGS_VERSION}") diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 156e50f3483dc49a054fd667b8b6819e5d3184c9..d13088e4f441d0601c425f5876b24f8976a8fa53 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,10 +3,16 @@ ---- ## Branches -`develop` and `master` branches are protected. This means that one cannot `push` on them, so **before** to do any code change one has to create a working branch. The following conventions are greatly encouraged: +`develop` and `master` branches are protected. This means that one +cannot `push` on them, so **before** to do any code change one has to +create a working branch. The following conventions are greatly +encouraged: * `feature/my_outstanding_feature` -* `issue/issue-number` (if no number is related to the issue please consider [opening an issue](https://gitlab.delpinux.fr/code/pugs/issues) and assign it to yourself) +* `issue/issue-number` (if no number is related to the issue please + consider [opening an + issue](https://gitlab.delpinux.fr/code/pugs/issues) and assign it to + yourself) ---- ## Tests and coverage @@ -18,21 +24,24 @@ Tests are built automatically and are run typing **all tests should be running correctly before any merge request** ### Unit tests -Unit tests are defined in the `tests` directory. New unit tests should be written or updated when needed. +Unit tests are defined in the `tests` directory. New unit tests should +be written or updated when needed. ### Coverage -Preferably, one should install [gcovr](http://www.gcovr.com) and build `pugs` specifying the `Coverage` build type -> `cmake -DCMAKE_BUILD_TYPE=Coverage [...]` +Preferably, one should install [gcovr](http://www.gcovr.com) and build +`pugs` specifying the `Coverage` build type > `cmake +-DCMAKE_BUILD_TYPE=Coverage [...]` However coverage is computed at each `push` by the `gitlab-ci`. ---- -## Update build environment using [Docker](http://www.docker.com) -This is the easiest way to keep your environment update to build `pugs`. +## Up to date build environment using [Docker](http://www.docker.com) +This is the easiest way to keep your environment up to date in order +to build `pugs`. -Running the [docker-pugs.sh](tools/docker-pugs.sh) script creates the image and -runs it in interactive mode. The image will runs the user's permissions and his -home directory is mounted. +Running the [docker-pugs.sh](tools/docker-pugs.sh) script creates the +image and runs it in interactive mode. The image will runs the user's +permissions and his home directory is mounted. **keep in mind that the produced executable will only run inside docker** @@ -40,21 +49,26 @@ home directory is mounted. ## Coding ### `packages` directory -Do not make **any** change in the `packages` directory. This directory contains *third party libraries* that are are mandatory to minimal builds or `pugs`. +Do not make **any** change in the `packages` directory. This directory +contains *third party libraries* that are are mandatory to minimal +builds or `pugs`. -For any changes in this directory -(bug report, suggestion of new library, library upgrades or downgrades) **open an issue**. +For any changes in this directory (bug report, suggestion of new +library, library upgrades or downgrades) **open an issue**. ### Warnings Try to avoid publishing sources that generates compilation warnings. -Also, avoid the use of `#warning` directives and prefer opening an issue. +Also, avoid the use of `#warning` directives and prefer opening an +issue. -`C++` `[[deprecated]]` directive should also be avoid as much as possible. +`C++` `[[deprecated]]` directive should also be avoid as much as +possible. ### Comments -**Do not** comment deprecated code. It is `git`'s job to keep track of old versions. +**Do not** comment deprecated code. It is `git`'s job to keep track of +old versions. Avoid commenting functions bodies: @@ -68,7 +82,10 @@ Avoid commenting functions bodies: `clang-format` is used in `pugs`, so install it and run > `make clang-format` before any commit -A better solution is to configure your favored editor to perform formatting automatically. For instance `emacs` users should copy-past the following code to their `.emacs.el` init file. +A better solution is to configure your favored editor to perform +formatting automatically. For instance `emacs` users should copy-past +the following code to their `.emacs.el` init file. + ```lisp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Clang-format diff --git a/src/language/CMakeLists.txt b/src/language/CMakeLists.txt index 3565082161700da019088f7bfca70b0d9dfe6fd8..2403c045d9e5d26a30f763cc1814ef9f550a4d35 100644 --- a/src/language/CMakeLists.txt +++ b/src/language/CMakeLists.txt @@ -18,12 +18,3 @@ add_dependencies(PugsLanguage PugsLanguageModules PugsLanguageUtils PugsUtils) - -# ------------------- Installation -------------------- -# temporary version workaround -if(${CMAKE_VERSION} VERSION_LESS "3.13.0") - install(TARGETS PugsLanguage - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -endif() diff --git a/src/mesh/CMakeLists.txt b/src/mesh/CMakeLists.txt index 7634b113494dc081bed63091e722dc8ea4b757fa..787113bea8e88b175af3436a3770f7d79d051174 100644 --- a/src/mesh/CMakeLists.txt +++ b/src/mesh/CMakeLists.txt @@ -30,15 +30,3 @@ add_library( MeshRandomizer.cpp MeshTransformer.cpp SynchronizerManager.cpp) - -# Additional dependencies -#add_dependencies(PugsMesh) - -# ------------------- Installation -------------------- -# temporary version workaround -if(${CMAKE_VERSION} VERSION_LESS "3.13.0") - install(TARGETS PugsMesh - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -endif() diff --git a/src/output/CMakeLists.txt b/src/output/CMakeLists.txt index 1f33809033731ac4500ee64a046ba11f55e15802..f3173dd2613ff281671c1dadb9e60d9e6b95bc64 100644 --- a/src/output/CMakeLists.txt +++ b/src/output/CMakeLists.txt @@ -6,12 +6,3 @@ add_library( GnuplotWriter1D.cpp VTKWriter.cpp WriterBase.cpp) - -# ------------------- Installation -------------------- -# temporary version workaround -if(${CMAKE_VERSION} VERSION_LESS "3.13.0") - install(TARGETS PugsMesh - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -endif() diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 741b0d5104cef791cf045fd8cc76cd8b16db30a2..2289a91d5f74c566a18af0f9fbcc8bf85ed844bb 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -112,12 +112,3 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pugs_config.hpp.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pugs_build_info.hpp.in" "${CMAKE_CURRENT_BINARY_DIR}/pugs_build_info.hpp" @ONLY) - -# ------------------- Installation -------------------- -# temporary version workaround -if(${CMAKE_VERSION} VERSION_LESS "3.13.0") - install(TARGETS PugsUtils - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -endif()