From 54c5249d8d267ae0894a1558c4fae34ab03be1f4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sep 29 2018 07:15:56 +0000 Subject: Use correct case for CMake. --- diff --git a/guidelines/modules/ROOT/nav.adoc b/guidelines/modules/ROOT/nav.adoc index 781abf6..32fe1b4 100644 --- a/guidelines/modules/ROOT/nav.adoc +++ b/guidelines/modules/ROOT/nav.adoc @@ -3,7 +3,7 @@ * xref:AppData.adoc[AppData] * xref:AutoProvidesAndRequiresFiltering.adoc[AutoProvidesAndRequiresFiltering] * xref:C_and_C++.adoc[C and {cpp}] -* xref:Cmake.adoc[Cmake] +* xref:CMake.adoc[CMake] * xref:Conflicts.adoc[Conflicts] * xref:CronFiles.adoc[CronFiles] * xref:CryptoPolicies.adoc[CryptoPolicies] diff --git a/guidelines/modules/ROOT/pages/CMake.adoc b/guidelines/modules/ROOT/pages/CMake.adoc new file mode 100644 index 0000000..275186a --- /dev/null +++ b/guidelines/modules/ROOT/pages/CMake.adoc @@ -0,0 +1,41 @@ += Guidelines for CMake + +This document provides CMake best-practices for generating Fedora RPMS using CMake + +== RPM Macros + +If CMake is installed, see /usr/lib/rpm/macros.d/cmake or /etc/rpm/macros.cmake on EL6. + +If kde-filesystem is installed, see /usr/lib/rpm/macros.d/macros.kde4 + +== Specfile Usage + +.... +%build +%cmake . +%make_build + + +%install +%make_install + +%check +ctest -V %{?_smp_mflags} +.... + +== Notes + +*NOTE*: `+-DCMAKE_SKIP_RPATH:BOOL=ON+`. +With recent cmake-2.4, it should not be used. +This CMake version should handle RPATHs issues correctly (set them in build-dir, remove them during installation). +Setting `+CMAKE_SKIP_RPATH+` for this version would avoid RPATHs in build-dir too. +This might link binaries against system-libraries (e.g. when a previous version of the package was installed) instead of the libraries which were created by the build. + +Nevertheless, RPATH issues might arise when CMake was used improperly. +For example, installing a target with `+INSTALL(FILES ... RENAME ...)+` will *not* strip rpaths; +in this case `+INSTALL(TARGETS ...)+` must be used in combination with changing the `+OUTPUT_NAME+` property. + +*NOTE*: CMake has good documentation in two places: + +* http://www.cmake.org/documentation/ +* http://www.cmake.org/Wiki/CMake diff --git a/guidelines/modules/ROOT/pages/Cmake.adoc b/guidelines/modules/ROOT/pages/Cmake.adoc deleted file mode 100644 index f2488cd..0000000 --- a/guidelines/modules/ROOT/pages/Cmake.adoc +++ /dev/null @@ -1,35 +0,0 @@ -= Guidelines for cmake - -This document provides cmake best-practices for generating Fedora RPMS using cmake - -== RPM Macros - -If cmake is installed, see /usr/lib/rpm/macros.d/cmake or /etc/rpm/macros.cmake on EL6. - -If kde-filesystem is installed, see /usr/lib/rpm/macros.d/macros.kde4 - -== Specfile Usage - -.... -%build -%cmake . -%make_build - - -%install -%make_install - -%check -ctest -V %{?_smp_mflags} -.... - -== Notes - -*NOTE*: `+-DCMAKE_SKIP_RPATH:BOOL=ON+`. With recent cmake-2.4, it should not be used. This cmake version should handle RPATHs issues correctly (set them in build-dir, remove them during installation). Setting `+CMAKE_SKIP_RPATH+` for this version would avoid RPATHs in build-dir too. This might link binaries against system-libraries (e.g. when a previous version of the package was installed) instead of the libraries which were created by the build. - -Nevertheless, RPATH issues might arise when cmake was used improperly. E.g. installing a target with `+INSTALL(FILES ... RENAME ...)+` will *not* strip rpaths; in this case `+INSTALL(TARGETS ...)+` must be used in combination with changing the `+OUTPUT_NAME+` property. - -*NOTE*: cmake has good documentation in two places: - -* http://www.cmake.org/documentation/ -* http://www.cmake.org/Wiki/CMake diff --git a/guidelines/modules/ROOT/pages/MinGW.adoc b/guidelines/modules/ROOT/pages/MinGW.adoc index 1c635a1..efe8f82 100644 --- a/guidelines/modules/ROOT/pages/MinGW.adoc +++ b/guidelines/modules/ROOT/pages/MinGW.adoc @@ -206,8 +206,8 @@ Generic macros: |================================================================================================================================================== |Macro |Available in + mingw-filesystem |Explanation -|mingw_cmake |>= 95 |Call the cmake binary for all the configured targets -|mingw_cmake_kde4 |>= 95 |Call the cmake binary for all the configured targets with KDE4 specific parameters set +|mingw_cmake |>= 95 |Call the 'cmake' binary for all the configured targets +|mingw_cmake_kde4 |>= 95 |Call the 'cmake' binary for all the configured targets with KDE4 specific parameters set |mingw_configure |>= 95 |Call the configure command for all the configured targets |mingw_make |>= 95 |Call the 'make' command for all the configured targets |mingw_meson |>= 104 |Call the meson binary for all the configured targets @@ -228,7 +228,7 @@ mingw32-filesystem | Value |Explanation |mingw32_ar |>= 95 |i686-w64-mingw32-ar |cross compiler 'ar' binary |mingw32_cc |>= 95 |i686-w64-mingw32-gcc |cross compiler 'gcc' binary |mingw32_cflags |>= 95 |-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 |Default compiler flags for C/C++ binaries -|mingw32_cmake |>= 95 | |Call the cmake binary for the Win32 target +|mingw32_cmake |>= 95 | |Call the 'cmake' binary for the Win32 target |mingw32_configure |>= 95 | |standard invocation for autotools 'configure' scripts |mingw32_cpp |>= 95 |i686-w64-mingw32-gcc -E |cross compiler 'cpp' binary |mingw32_env |>= 95 | |Set the correct environment variables for the Win32 target @@ -254,7 +254,7 @@ mingw64-filesystem | Value |Explanation |mingw64_ar |>= 95 |x86_64-w64-mingw32-ar |cross compiler 'ar' binary |mingw64_cc |>= 95 |x86_64-w64-mingw32-gcc |cross compiler 'gcc' binary |mingw64_cflags |>= 95 |-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 |Default compiler flags for C/C++ binaries -|mingw64_cmake |>= 95 | |Call the cmake binary for the Win64 target +|mingw64_cmake |>= 95 | |Call the 'cmake' binary for the Win64 target |mingw64_configure |>= 95 | |standard invocation for autotools 'configure' scripts |mingw64_cpp |>= 95 |x86_64-w64-mingw32-gcc -E |cross compiler 'cpp' binary |mingw64_env |>= 95 | |Set the correct environment variables for the Win64 target diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index 134bd3f..4ec659c 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -1550,7 +1550,7 @@ Some applications, languages and build systems have specific guidelines written * xref:Ada.adoc[Ada] * xref:C_and_C++.adoc[C and {cpp}] -* xref:Cmake.adoc[Cmake] +* xref:CMake.adoc[CMake] * xref:D.adoc[D] * xref:DevAssistant.adoc[DevAssistant] * xref:Drupal7.adoc[Drupal7]