ngompa / rpms / cmake

Forked from rpms/cmake 4 years ago
Clone
145919
#
145919
# Macros for cmake
145919
#
145919
%_cmake_lib_suffix64 -DLIB_SUFFIX=64
145919
%_cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=ON
145919
%_cmake_version @@CMAKE_VERSION@@
145919
%__cmake /usr/bin/cmake
145919
145919
# - Set default compile flags
145919
# - CMAKE_*_FLAGS_RELEASE are added *after* the *FLAGS environment variables
145919
# and default to -O3 -DNDEBUG.  Strip the -O3 so we can override with *FLAGS
145919
# - Turn on verbose makefiles so we can see and verify compile flags
145919
# - Set default install prefixes and library install directories
145919
# - Turn on shared libraries by default
145919
%cmake \
145919
  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
145919
  CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
145919
  FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ; \
145919
  FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS ; \
145919
  %{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \
145919
  %__cmake \\\
145919
        -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
145919
        -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
145919
        -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
145919
        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
145919
        -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
145919
        -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
145919
        -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
145919
        -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
145919
        -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
145919
%if "%{?_lib}" == "lib64" \
145919
        %{?_cmake_lib_suffix64} \\\
145919
%endif \
145919
        -DBUILD_SHARED_LIBS:BOOL=ON