Skip to content

Commit 256f3cd

Browse files
committed
vir-simd 0.3.200 (beta 1)
ChangeLog: * .github/workflows/CI.yml: Test installation. On MSVC builds compile the check target. * CMakeLists.txt: Require cmake 3.5. Set CMAKE_CXX_VISIBILITY_PRESET and CMAKE_VISIBILITY_INLINES_HIDDEN. Build test.cpp only for the check target, not all. * Makefile: Interpret patchlevel as release, development, alpha, or beta and print on 'debug' and 'install'. * vir/simd_version.h: Bump patchlevel to 200. * vir/test.cpp: Remove tests for exact version number.
1 parent a73dda5 commit 256f3cd

File tree

5 files changed

+33
-10
lines changed

5 files changed

+33
-10
lines changed

.github/workflows/CI.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ jobs:
4040
sudo apt-get update
4141
sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }}
4242
43+
- name: Test installation
44+
env:
45+
CXX: g++-${{ matrix.version }}
46+
run: |
47+
cmake -S vir-simd -B cmake-build -DCMAKE_INSTALL_PREFIX:STRING=$HOME/vir-simd-cmake
48+
cmake --build cmake-build --target install
49+
cd vir-simd && make prefix=$HOME/vir-simd-make install
50+
diff -r $HOME/vir-simd-cmake/include $HOME/vir-simd-make/include && echo "cmake and make installations match ✅"
51+
4352
- name: Run test suite
4453
env:
4554
CXX: g++-${{ matrix.version }}
@@ -188,4 +197,4 @@ jobs:
188197
run: cmake -S vir-simd -B build -DCMAKE_BUILD_TYPE:STRING=Release
189198

190199
- name: Compile test
191-
run: cmake --build build --config Release
200+
run: cmake --build build --config Release --target check

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.5)
22
project(vir-simd CXX)
33

44
# Define main library
@@ -37,10 +37,15 @@ install(
3737
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
3838
PATTERN "*.cpp" EXCLUDE)
3939

40+
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
41+
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
42+
4043
# Define test targets
41-
add_library(vir-simd-test-stdlib vir/test.cpp)
44+
add_library(vir-simd-test-stdlib EXCLUDE_FROM_ALL vir/test.cpp)
4245
target_link_libraries(vir-simd-test-stdlib PRIVATE vir-simd)
4346

44-
add_library(vir-simd-test-fallback vir/test.cpp)
47+
add_library(vir-simd-test-fallback EXCLUDE_FROM_ALL vir/test.cpp)
4548
target_link_libraries(vir-simd-test-fallback PRIVATE vir-simd)
4649
target_compile_definitions(vir-simd-test-fallback PRIVATE VIR_DISABLE_STDX_SIMD)
50+
51+
add_custom_target(check DEPENDS vir-simd-test-stdlib vir-simd-test-fallback)

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,21 @@ endif
3333

3434
std=$(shell env CXX=$(CXX) ./latest_std_flag.sh)
3535

36-
version=$(shell grep '\<VIR_SIMD_VERSION\>' vir/simd_version.h | \
36+
version:=$(shell grep '\<VIR_SIMD_VERSION\>' vir/simd_version.h | \
3737
sed -e 's/.*0x/0x/' -e 's/'\''//g' | \
3838
(read v; echo $$((v/0x10000)).$$((v%0x10000/0x100)).$$((v%0x100));))
3939

40+
version_patchlevel:=$(lastword $(subst ., ,$(version)))
41+
42+
version_info=$(shell test $(version_patchlevel) -lt 100 && echo release || \
43+
(test $(version_patchlevel) -lt 190 && echo development || \
44+
(test $(version_patchlevel) -lt 200 && echo alpha $$(($(version_patchlevel)-189)) || \
45+
echo beta $$(($(version_patchlevel)-199)))))
46+
4047
check: check-extensions check-constexpr_wrapper testsuite-O2 testsuite-Os
4148

4249
debug:
43-
@echo "vir::simd_version: $(version)"
50+
@echo "vir::simd_version: $(version) ($(version_info))"
4451
@echo "build_dir: $(build_dir)"
4552
@echo "triplet: $(triplet)"
4653
@echo "testflags: $(testflags)"
@@ -80,7 +87,7 @@ testsuite-%: testsuite/$(build_dir)-%/Makefile
8087
@cat testsuite/$(build_dir)-$*/.simd.summary && rm testsuite/$(build_dir)-$*/.simd.summary
8188

8289
install:
83-
@echo "Installing vir::stdx::simd $(version) to $(includedir)/vir"
90+
@echo "Installing vir::stdx::simd $(version) ($(version_info)) to $(includedir)/vir"
8491
install -d $(includedir)/vir
8592
install -m 644 -t $(includedir)/vir vir/*.h
8693

vir/simd_version.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
#define VIR_HAVE_SPACESHIP 0
1414
#endif
1515

16-
#define VIR_SIMD_VERSION 0x0'03'64
16+
// release >= 0x00
17+
// development >= 0x64
18+
// alpha >= 0xbe
19+
// beta >= 0xc8
20+
#define VIR_SIMD_VERSION 0x0'03'c8
1721

1822
#define VIR_SIMD_VERSION_MAJOR (VIR_SIMD_VERSION / 0x10000)
1923

vir/test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#define SIMD_IS_CONSTEXPR_ENOUGH 0
2121
#endif
2222

23-
static_assert(vir::simd_version == vir::simd_version_t{0,3,100});
24-
static_assert(vir::simd_version <= vir::simd_version_t{0,3,100});
2523
static_assert(vir::simd_version >= vir::simd_version_t{0,3,100});
2624
static_assert(vir::simd_version != vir::simd_version_t{0,3,0});
2725
static_assert(vir::simd_version >= vir::simd_version_t{0,3,0});

0 commit comments

Comments
 (0)