Skip to content

Commit 00b463c

Browse files
committed
⬆️ Use CMake 3.21+
1 parent 09ff1c5 commit 00b463c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15)
1+
cmake_minimum_required(VERSION 3.21)
22
project(sfmt
33
VERSION 0.7.6
44
LANGUAGES C CXX)
@@ -57,7 +57,7 @@ add_library(wtl::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
5757
target_compile_options(${PROJECT_NAME} PRIVATE
5858
-Wall -Wextra -pedantic
5959
$<$<STREQUAL:${CMAKE_SYSTEM_PROCESSOR},x86_64>:-march=native>
60-
$<$<STREQUAL:${CMAKE_SYSTEM_PROCESSOR},arm64>:-march=armv8.3-a+sha3>
60+
$<$<STREQUAL:${CMAKE_SYSTEM_PROCESSOR},arm64>:-march=armv8.4-a+sha3>
6161
)
6262
target_compile_definitions(${PROJECT_NAME} PUBLIC
6363
-DSFMT_MEXP=${MEXP}
@@ -98,6 +98,6 @@ install(FILES ${version_file}
9898
)
9999

100100
include(CTest)
101-
if(BUILD_TESTING AND ${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
101+
if(BUILD_TESTING AND PROJECT_IS_TOP_LEVEL)
102102
add_subdirectory(test)
103103
endif()

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ configure_file(
99

1010
file(GLOB srcfiles *.cpp)
1111
foreach(src IN LISTS srcfiles)
12-
get_filename_component(name_we ${src} NAME_WE)
12+
cmake_path(GET src STEM name_we)
1313
add_executable(test-${name_we} ${src})
1414
target_link_libraries(test-${name_we} wtl::${PROJECT_NAME})
1515
add_test(NAME ${name_we}

0 commit comments

Comments
 (0)