Skip to content

Commit

Permalink
update code.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhancn committed Feb 8, 2024
1 parent 68fae97 commit 6f9cf1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 2 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,9 @@ separate build directory. Note: Please remove autogenerated file \
`CMakeCache.txt` and directory `CMakeFiles` in the current directory.")
endif()

# Config sleef static lib
if (NOT SLEEF_BUILD_SHARED_LIBS)
set(COMMON_TARGET_DEFINITIONS SLEEF_STATIC_LIBS=1)
set(SLEEF_STATIC_LIBS 1)
endif()

if(SLEEF_ENABLE_LTO AND SLEEF_STATIC_LIBS)
if(SLEEF_ENABLE_LTO AND SLEEF_SLEEF_BUILD_SHARED_LIBS)
message(FATAL_ERROR "SLEEF_ENABLE_LTO and SLEEF_STATIC_LIBS cannot be specified at the same time")
endif(SLEEF_ENABLE_LTO AND SLEEF_STATIC_LIBS)
endif(SLEEF_ENABLE_LTO AND SLEEF_SLEEF_BUILD_SHARED_LIBS)

if(SLEEF_ENABLE_LTO)
cmake_policy(SET CMP0069 NEW)
Expand Down
5 changes: 5 additions & 0 deletions Configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,11 @@ endif()

# Set common definitions

if (NOT SLEEF_SLEEF_BUILD_SHARED_LIBS)
set(COMMON_TARGET_DEFINITIONS SLEEF_STATIC_LIBS=1)
set(SLEEF_STATIC_LIBS 1)
endif()

if (COMPILER_SUPPORTS_WEAK_ALIASES)
set(COMMON_TARGET_DEFINITIONS ${COMMON_TARGET_DEFINITIONS} ENABLE_ALIAS=1)
endif()
Expand Down

0 comments on commit 6f9cf1e

Please sign in to comment.