ngompa / rpms / cmake

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