| |
@@ -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.