diff options
author | CoprDistGit <infra@openeuler.org> | 2024-11-16 12:16:53 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-11-16 12:16:53 +0000 |
commit | 344abe762077378e879dec21fa831e2925b8ef29 (patch) | |
tree | 1c9d9d6c02bb20ffa20978e40d4a83f0ff5873b8 /macros.cmake.in | |
parent | 76029bd3a3fb084bfd62ceb241d9c5a32578dea6 (diff) |
automatic import of cmake
Diffstat (limited to 'macros.cmake.in')
-rw-r--r-- | macros.cmake.in | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/macros.cmake.in b/macros.cmake.in index accad53..9e5dec1 100644 --- a/macros.cmake.in +++ b/macros.cmake.in @@ -9,7 +9,17 @@ %_cmake_version @@CMAKE_VERSION@@ %__cmake /usr/bin/cmake %__ctest /usr/bin/ctest -%__cmake_builddir %{!?__cmake_in_source_build:%{_vpath_builddir}}%{?__cmake_in_source_build:.} +%__cmake_builddir %{lua: + if rpm.expand('%{__cmake_in_source_build}') == '%{__cmake_in_source_build}' then + print(rpm.expand('%{_vpath_builddir}')) + else + if rpm.expand('%{__cmake_in_source_build}') == '0' then + print(rpm.expand('%{_vpath_builddir}')) + else + print(".") + end + end +} %_cmake_module_linker_flags %(echo %build_ldflags|sed -e 's#-Wl,--no-undefined##') # - Set default compile flags |