Skip to content

Commit

Permalink
Fix CMake configuration files to support compiling with older CMake v…
Browse files Browse the repository at this point in the history
…ersions
  • Loading branch information
althonos committed Jan 12, 2025
1 parent 889d2d3 commit ee25b37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.20)
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES C CXX)

cmake_policy(SET CMP0167 NEW)

set(CMAKE_CXX_STANDARD 11)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
8 changes: 4 additions & 4 deletions src/pyfastani/_sequtils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(HAVE_NEON)
add_library(sequtils_neon neon.c)
string(STRIP "${NEON_C_FLAGS}" IMPL_FLAGS)
if(IMPL_FLAGS)
target_compile_options(sequtils_neon ${IMPL_FLAGS})
target_compile_options(sequtils_neon PRIVATE ${IMPL_FLAGS})
endif()
set(PLATFORM_LIBS ${PLATFORM_LIBS} sequtils_neon)
target_compile_definitions(sequtils PUBLIC NEON_BUILD_SUPPORT)
Expand All @@ -14,7 +14,7 @@ if(HAVE_SSE2)
add_library(sequtils_sse2 sse2.c)
string(STRIP "${SSE2_C_FLAGS}" IMPL_FLAGS)
if(IMPL_FLAGS)
target_compile_options(sequtils_sse2 ${IMPL_FLAGS})
target_compile_options(sequtils_sse2 PRIVATE ${IMPL_FLAGS})
endif()
set(PLATFORM_LIBS ${PLATFORM_LIBS} sequtils_sse2)
target_compile_definitions(sequtils PUBLIC SSE2_BUILD_SUPPORT)
Expand All @@ -23,7 +23,7 @@ if(HAVE_SSSE3)
add_library(sequtils_ssse3 ssse3.c)
string(STRIP "${SSSE3_C_FLAGS}" IMPL_FLAGS)
if(IMPL_FLAGS)
target_compile_options(sequtils_ssse3 ${IMPL_FLAGS})
target_compile_options(sequtils_ssse3 PRIVATE ${IMPL_FLAGS})
endif()
set(PLATFORM_LIBS ${PLATFORM_LIBS} sequtils_ssse3)
target_compile_definitions(sequtils PUBLIC SSSE3_BUILD_SUPPORT)
Expand All @@ -34,4 +34,4 @@ endif()
target_link_libraries(sequtils PUBLIC cpu_features ${PLATFORM_LIBS})

cmake_path(GET CMAKE_CURRENT_LIST_DIR PARENT_PATH PARENT_DIR)
target_include_directories(sequtils PUBLIC ${PARENT_DIR} ${CMAKE_CURRENT_LIST_DIR})
target_include_directories(sequtils PUBLIC ${PARENT_DIR} ${CMAKE_CURRENT_LIST_DIR})

0 comments on commit ee25b37

Please sign in to comment.