#1205 CMake: Remove mentions of end of life releases
Merged 2 years ago by tibbs. Opened 2 years ago by oturpe.
oturpe/packaging-committee cmake-fixes  into  master

@@ -41,6 +41,7 @@ 

  that defines multiple KDE-related variables (shipped in `+kf5+` package).

  

  It is rarely necessary (but permissible) to use or alter these:

+ 

  NOTE: All macros starting with double underscore is meant to be private,

  NOT stable and likely to be removed in the future.

  
@@ -51,37 +52,23 @@ 

  The path to the ctest executable.

  

  `+%__cmake_in_source_build+`::

- Controls whether builds are done in-source (when defined)

- or out-of-source (when undefined).

- See the xref:vpath.adoc[Defining source and build directories]

- for more information.

- 

- `+%__cmake_builddir+`::

- Holds the location of the actual directory where the build was made.

- When making

- https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds[out-of-source builds],

- this macro is the same as `+%_vpath_builddir+`,

- which should be used preferably in such cases.

- See the xref:vpath.adoc[Defining source and build directories]

- for more information.

- When doing in-source builds (that means before Fedora 33

- https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds[out-of-source builds]

- change),

- this macro would differ from `+%_vpath_builddir+`

- and it will hold the actual location that was used for the build.

- This is useful in cases,

- when you want to use the same specfile for different Fedora releases

- where on some the build is in-source and on some out-of-source

- AND you need to know the builddir location -

- e.g. when using `+cmake -B %__cmake_builddir -LH+`

- between `+%cmake+` and `+%cmake_build+`.

+ Controls whether builds are done

+ https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds[out-of-source]

+ (when undefined, the default)

+ or in-source (when defined).

  Whenever possible, using out-of-source builds is advised,

  as this is the direction both Fedora and CMake upstream are moving.

  

+ `+%__cmake_builddir+`::

+ Holds the location of the actual directory where the build was made.

+ When making out-of-source builds,

+ this macro is the same as xref:vpath.adoc[%_vpath_builddir].

+ When doing in-source builds,

+ this macro will hold the actual location that was used for the build.

+ +

  WARNING: This macro is suitable only for rare compatibility reasons.

- Once all active Fedora releases will use

- https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds[out-of-source builds],

- this macro will be redundant (same as `+%_vpath_builddir+`) and may be removed.

+ For normal out-of-source builds, this macro is the same as `+%_vpath_builddir+`.

+ It may be removed in the future.

  

  == Example Usage

  
@@ -99,10 +86,6 @@ 

  

  == Notes

  

- Since Fedora 33, `+%__cmake_in_source_build+` is not defined

- so if you want to have consistent behavior across different releases,

- make sure to `+%define+` or `+%undefine+` it accordingly.

- 

  `+-DCMAKE_SKIP_RPATH:BOOL=ON+`.

  With recent cmake-2.4, it should not be used.

  This CMake version should handle RPATHs issues correctly
@@ -120,5 +103,6 @@ 

  in combination with changing the `+OUTPUT_NAME+` property.

  

  CMake has good documentation in two places:

+ 

  * https://cmake.org/documentation/

  * https://gitlab.kitware.com/cmake/community/wikis/Home

CMake: Remove mentions of end of life releases

Sizeable portion of CMake guidelines consisted of discussing
the difference between before and after Fedora 33.
Fedora 33 has reached its end of life,
so such split is not needed anymore.
Only content referring to current situation is retained.

Since out-of-source builds are now the default,
relevant content is reordered so that out-of-source is always discussed
before in-source, which is its opt-in alternative.

Also, the link to out-of-source Fedora Change is moved so that it
anchors to the first appearance of the term.

Also some formatting fixes.

Is there any EPEL impact to this? I don't know what is done there, but usually when we retire entire sections because they are out of date, we give a bit of consideration to whether those need to be moved into the EPEL guidelines.

That is a good question, which I am unfortunately well equipped to answer.
i am not involved with EPEL, apart from where it surfaces when contributing to Fedora.
However, the CMake macros come from package cmake-rpm-macros,
which is a subpackage cmake.
So I went to https://git.centos.org/rpms/cmake
and checked what each branch has in SOURCES/macros.cmake.
The macros are similar there, probably imported from Fedora at various of points of time.

  • c7 does not have out-of-source macros at all
  • c8s defaults to in-source
  • c9 defaults to out-of-source

So perhaps an addition to EPEL Packaging,
saying that out-of-source macros are not available for EPEL 7 at all,
and that in-source is the default for EPEL 8?

rebased onto c753a43

2 years ago

I'm going to go ahead and merge this since there's really no point in talking about Fedora 33 now. The removed content is still in git and if it does still have EPEL relevance then it should be easy to pull into the EPEL-specific guidelines. It appears to me that EPEL could use some discussion or documentation of the cmake macros regardless of what happens with the Fedora guidelines.

Pull-Request has been merged by tibbs

2 years ago
Metadata