File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.15 )
1+ cmake_minimum_required (VERSION 3.21 )
22project (sfmt
33 VERSION 0.7.6
44 LANGUAGES C CXX )
@@ -57,7 +57,7 @@ add_library(wtl::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
5757target_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)
6262target_compile_definitions (${PROJECT_NAME } PUBLIC
6363 -DSFMT_MEXP=${MEXP}
@@ -98,6 +98,6 @@ install(FILES ${version_file}
9898)
9999
100100include (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 )
103103endif ()
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ configure_file(
99
1010file (GLOB srcfiles *.cpp )
1111foreach (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}
You can’t perform that action at this time.
0 commit comments