Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release candidate #484

Merged
merged 85 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
575da21
Update section "References" of `configure/README.md`
yamacir-kit Aug 31, 2024
5cbcb36
Cleanup `er-macro-transformer`
yamacir-kit Aug 31, 2024
6fa8038
Update `execute_process` to avoid non-portable command usage
yamacir-kit Aug 31, 2024
8cbfba6
Delete branch using predefined macro `__unix__`
yamacir-kit Aug 31, 2024
0065de0
Update to not use unsigned long to obtain 64-bit integer
yamacir-kit Aug 31, 2024
6179fbb
Simplify struct `exact_integer` definition
yamacir-kit Sep 1, 2024
0264b68
Fix some Linux-dependent code
yamacir-kit Sep 1, 2024
7986c52
Update library serach path to include `/opt/homebrew` if on MacOS
yamacir-kit Sep 4, 2024
5b97677
Update the test definition not to use Valgrind if on MacOS
yamacir-kit Sep 4, 2024
a43d713
Rename `setup.sh` to `setup-ubuntu.sh`
yamacir-kit Sep 7, 2024
7530c81
Add new script `setup-macos.sh`
yamacir-kit Sep 7, 2024
d03e487
Add new OS `macos-14` to matrix `system` of workflow `build.yaml`
yamacir-kit Sep 7, 2024
c7cfed0
Add `.DS_Store` to `.gitignore`
yamacir-kit Sep 9, 2024
9b66afe
Remove the code that directly uses `dpkg` from `update.sh`
yamacir-kit Sep 12, 2024
bc719e7
Add support for numerical constants with exponent marker `f`
yamacir-kit Sep 17, 2024
999e288
Fix `@vector-copy!` to not cause undefined behavior for `slice_array`
yamacir-kit Sep 19, 2024
0ba0da9
Update `default_collector` to be declared as an extern template
yamacir-kit Sep 21, 2024
382d1e6
Update to not define make target `package` for MacOS
yamacir-kit Oct 9, 2024
72c2106
Add the definition of `CMAKE_INSTALL_NAME_DIR` to `CMakeLists.txt`
yamacir-kit Oct 21, 2024
25b1b64
Replace `CMAKE_INSTALL_NAME_DIR` with `CMAKE_INSTALL_RPATH`
yamacir-kit Oct 21, 2024
b95f964
Update to set `CMAKE_INSTALL_RPATH` for MacOS only
yamacir-kit Oct 21, 2024
b33a3d1
Merge pull request #485 from yamacir-kit/macos
yamacir-kit Oct 22, 2024
2e976bf
Cleanup struct `homogeneous_vector`
yamacir-kit Oct 23, 2024
ab71190
Update `memory::allocator::chunk` to union from struct
yamacir-kit Oct 23, 2024
351c250
Lipsticks
yamacir-kit Oct 27, 2024
53b9446
Rename make target `develop` to `continuous-integration`
yamacir-kit Oct 27, 2024
21aabdb
Update `environment::load` to receive `std::filesystem::path`
yamacir-kit Oct 27, 2024
763221e
Update `string::operator std::filesystem::path` to be explicit
yamacir-kit Oct 27, 2024
611d5a0
Unify two `collector::mark` overloads
yamacir-kit Oct 29, 2024
c89869b
Rename argument `exrepssion` in `syntactic_environment` to `form`
yamacir-kit Oct 29, 2024
3f62670
Add new member function `nan_boxing_pointer::unsafe_get`
yamacir-kit Oct 29, 2024
1a2a51b
Update `integer_set::split` to be called only once on the outermost set
yamacir-kit Oct 31, 2024
40c2fbe
Move struct `mutators_view` into member function `collector::mark`
yamacir-kit Oct 31, 2024
f8c3eb4
Add requirement to `erase` to have the target already inserted
yamacir-kit Nov 2, 2024
37d80e2
Rename `intN_t` and `uintN_t` to `int8n_t` and `uint8n_t`
yamacir-kit Nov 2, 2024
c53aceb
Cleanup struct `integer_set`
yamacir-kit Nov 3, 2024
256b79a
Rename `marked_objects` to `reachables`
yamacir-kit Nov 3, 2024
54b5ac6
Lipsticks
yamacir-kit Nov 3, 2024
85bd7e8
Merge pull request #486 from yamacir-kit/memory
yamacir-kit Nov 11, 2024
0acdfe5
Add `ubuntu-24.04` to `matrix.system`
yamacir-kit Nov 11, 2024
1df8013
Add missing header `algorithm` include
yamacir-kit Nov 13, 2024
d8bf58c
Update `CMAKE_CXX_STANDARD` to 20 from 17
yamacir-kit Nov 13, 2024
7084981
Remove header `bit/bit_cast.hpp`
yamacir-kit Nov 13, 2024
0a919fd
Remove `ubuntu-20.04` from `matrix.system`
yamacir-kit Nov 13, 2024
78c94ac
Update to use C++20 `std::endian` instead of CMake `TestBigEndian`
yamacir-kit Nov 13, 2024
554c5a1
Replace `memory::log2` with `std::bit_width`
yamacir-kit Nov 13, 2024
2a2f5fe
Replace some GCC's builtin functions with standard functions
yamacir-kit Nov 13, 2024
6221714
Replace some comparison operators with three-way comparison operators
yamacir-kit Nov 14, 2024
7121733
Cleanup namespace definitions
yamacir-kit Nov 14, 2024
7a8fa9b
Cleanup namespace definitions
yamacir-kit Nov 14, 2024
fe5ec77
Merge pull request #487 from yamacir-kit/cxx20
yamacir-kit Nov 14, 2024
3f448fe
Cleanup struct template `integer_set`
yamacir-kit Nov 18, 2024
b190b2a
Remove optimization flag `-flto`
yamacir-kit Nov 20, 2024
79a229f
Cleanup `CMakeLists.txt`
yamacir-kit Nov 24, 2024
321dc62
Remove modulus and comparison operators related to `complex`
yamacir-kit Nov 25, 2024
afcc1f7
Remove alias `memory::view`
yamacir-kit Dec 1, 2024
7f7b53a
Add new library `(srfi 144)`
yamacir-kit Dec 7, 2024
e99ca9d
Add new procedure `copy-sign`
yamacir-kit Dec 7, 2024
3cf7805
Add new function template `cmath_cast`
yamacir-kit Dec 7, 2024
0182164
Add new procedure `load-exponent`
yamacir-kit Dec 7, 2024
dbbd079
Remove function template `cmath_cast` and `inexact_cast`
yamacir-kit Dec 7, 2024
2eb1bff
Cleanup some macro definitions
yamacir-kit Dec 8, 2024
cfa6b02
Add new procedures `binary64-(integral|fractional)-part`
yamacir-kit Dec 8, 2024
745e647
Add new procedures `binary64-exponent` and `binary64-integer-exponent`
yamacir-kit Dec 8, 2024
38847b7
Add procedures `binary64-normalized-fraction` and `binary64-exponent`
yamacir-kit Dec 8, 2024
4cd524e
Add procedure `flsign-bit`
yamacir-kit Dec 8, 2024
b02e966
Add procedures `binary64-normalized?` and `binary64-denormalized?`
yamacir-kit Dec 8, 2024
c854f59
Move `binary64-` prefixed procedures into library `(meevax binary64)`
yamacir-kit Dec 9, 2024
0208039
Add procedures `binary64-max` and `binary64-min`
yamacir-kit Dec 11, 2024
917e3c5
Add new procedure `binary64-fused-multiply-add`
yamacir-kit Dec 11, 2024
6e82c4d
Add procedure `binary64-abs`
yamacir-kit Dec 11, 2024
9aad201
Add procedure `binary64-expm1`
yamacir-kit Dec 11, 2024
13c3ca1
Add procedure `binary64-log1p`
yamacir-kit Dec 15, 2024
71e2bbe
Add procedure `binary64-remquo`
yamacir-kit Dec 15, 2024
7fe4bf0
Add procedure `log-gamma`
yamacir-kit Dec 15, 2024
dd78f5b
Add procedures `first-kind-bessel` and `second-kind-bessel`
yamacir-kit Dec 15, 2024
fe5843e
Add feature identifier `__cpp_lib_math_special_functions`
yamacir-kit Dec 18, 2024
fe95ba7
Fix test `srfi-144`
yamacir-kit Dec 18, 2024
aa926e2
Add procedure `erf` and `erfc`
yamacir-kit Dec 21, 2024
c863c21
Cleanup
yamacir-kit Dec 21, 2024
78285d3
Support R7RS large library `(scheme flonum)`
yamacir-kit Dec 21, 2024
c3f3dc6
Merge pull request #488 from yamacir-kit/number
yamacir-kit Dec 21, 2024
ee6d1ef
Cleanup
yamacir-kit Dec 21, 2024
15042e2
Add feature identifier `FP_FAST_FMA`
yamacir-kit Dec 21, 2024
a1ad2dc
Update `README.md`
yamacir-kit Dec 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
matrix:
compiler: [ g++, clang++ ]
configuration: [ Debug, Release ]
system: [ ubuntu-20.04, ubuntu-22.04 ]
system: [ ubuntu-22.04, ubuntu-24.04, macos-14 ]
steps:
- uses: actions/checkout@v3
- run: ./script/setup.sh --all
- run: ./script/setup-${{ matrix.system }}.sh --all
- run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
- run: cmake --build build --target develop
- run: cmake --build build --target continuous-integration
- run: cmake -B example/build -S example -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
- run: cmake --build example/build --target develop
- run: cmake --build example/build --target continuous-integration
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
- run: ./script/setup.sh
- run: ./script/setup-ubuntu.sh
- run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- run: cmake --build build --target package
- run: gh release create v${{ env.VERSION }} build/meevax_${{ env.VERSION }}_amd64.deb --title "Version ${{ env.VERSION }}"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
basis/src
build
document
Expand Down
144 changes: 72 additions & 72 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.16.3) # Ubuntu 20.04 LTS default
cmake_minimum_required(VERSION 3.22.1) # Ubuntu 22.04 LTS default

execute_process(
COMMAND head -c -1 ${CMAKE_CURRENT_SOURCE_DIR}/VERSION
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/VERSION
COMMAND tr -d \n
OUTPUT_VARIABLE CURRENT_VERSION)

project(meevax
Expand All @@ -12,44 +13,42 @@ project(meevax

include(GNUInstallDirs)

string(JOIN " " ${PROJECT_NAME}_RELEASE_PLUS
string(JOIN " " ${PROJECT_NAME}_UNSTABLE_OPTIONS
# "-flto" # This optimization causes a problem in Apple Clang 15.0.0 where some static inline data members are no longer unique. It is unclear whether this is a code issue or a compiler issue.
# "-fmerge-all-constants" # This optimization is very effective in reducing binary size, but non-standard to the C++ standard.
# "-march=native" # This optimization causes "Illegal instruction" error (is Valgrind's bug) on CI.
# "-mtune=native"
)

set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -pipe")
set(CMAKE_CXX_FLAGS_DEBUG "-Og -gdwarf-4") # NOTE: The `-gdwarf-4` option is set due to the following issues with Clang 14 and Valgrind versions below 3.20: https://bugzilla.mozilla.org/show_bug.cgi?id=1758782
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -flto -DNDEBUG ${${PROJECT_NAME}_RELEASE_PLUS}")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG ${${PROJECT_NAME}_UNSTABLE_OPTIONS}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -gdwarf-4")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -pipe")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
set(CMAKE_VERBOSE_MAKEFILE OFF)

# ---- Configure ---------------------------------------------------------------

include(TestBigEndian)

TEST_BIG_ENDIAN(IS_BIG_ENDIAN) # Use CMAKE_CXX_BYTE_ORDER if CMake >= 3.20

if(${IS_BIG_ENDIAN})
set(${PROJECT_NAME}_BYTE_ORDER "big-endian")
else()
set(${PROJECT_NAME}_BYTE_ORDER "little-endian")
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(CMAKE_INSTALL_RPATH "@executable_path/../${CMAKE_INSTALL_LIBDIR}")
endif()

# ---- CONFIGURE ---------------------------------------------------------------

execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --digit-value OUTPUT_VARIABLE ${PROJECT_NAME}_UNICODE_DIGIT_VALUE)
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --downcase OUTPUT_VARIABLE ${PROJECT_NAME}_UNICODE_DOWNCASE)
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --property OUTPUT_VARIABLE ${PROJECT_NAME}_UNICODE_PROPERTY)
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --upcase OUTPUT_VARIABLE ${PROJECT_NAME}_UNICODE_UPCASE)

execute_process(
COMMAND head -c -1 ${CMAKE_CURRENT_SOURCE_DIR}/configure/help.txt
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/configure/help.txt
COMMAND tr \n \r
COMMAND sed s/\r$//
COMMAND tr \r \n
OUTPUT_VARIABLE ${PROJECT_NAME}_HELP)

file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}/unicode/digit_value.hpp "${${PROJECT_NAME}_UNICODE_DIGIT_VALUE}")
Expand All @@ -63,7 +62,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/Doxyfile ${CMAKE_CURRENT
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/README.md ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/version.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/kernel/version.cpp)

# ---- Target basis ------------------------------------------------------------
# ---- TARGET basis ------------------------------------------------------------

file(GLOB ${PROJECT_NAME}_BASIS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/basis/*.ss)

Expand All @@ -90,7 +89,7 @@ set_target_properties(basis PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
LINK_FLAGS_RELEASE -s)

# ---- Target kernel -----------------------------------------------------------
# ---- TARGET kernel -----------------------------------------------------------

add_library(kernel SHARED)

Expand All @@ -100,7 +99,11 @@ target_sources(kernel PRIVATE ${${PROJECT_NAME}_KERNEL_SOURCES})

target_include_directories(kernel
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PUBLIC $<$<PLATFORM_ID:Darwin>:/opt/homebrew/include>)

target_link_directories(kernel
PUBLIC $<$<PLATFORM_ID:Darwin>:/opt/homebrew/lib>)

target_link_libraries(kernel
PRIVATE ${CMAKE_DL_LIBS}
Expand All @@ -112,7 +115,7 @@ set_target_properties(kernel PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
LINK_FLAGS_RELEASE -s)

# ---- Target shell ------------------------------------------------------------
# ---- TARGET shell ------------------------------------------------------------

add_executable(shell)

Expand All @@ -124,16 +127,14 @@ set_target_properties(shell PROPERTIES
OUTPUT_NAME ${PROJECT_NAME} # Rename shell => meevax
LINK_FLAGS_RELEASE -s)

# ---- CMake Package -----------------------------------------------------------
# ---- TARGET install ----------------------------------------------------------

include(CMakePackageConfigHelpers)

write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
COMPATIBILITY SameMajorVersion)

# ---- Target install ----------------------------------------------------------

install( # /usr/lib/libmeevax
TARGETS basis kernel
EXPORT ${PROJECT_NAME}-config
Expand All @@ -159,74 +160,73 @@ install( # /usr/share/meevax/meevax-config-version.cmake
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})

# ---- Target package ----------------------------------------------------------
# ---- TARGET uninstall --------------------------------------------------------

set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tatsuya Yamasaki")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_GENERATOR DEB)
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
set(CPACK_THREADS 0)
add_custom_target(uninstall
COMMAND sudo rm -rf ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME}
COMMAND sudo rm -rf ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
COMMAND sudo rm -rf ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME}*
COMMAND sudo rm -rf ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})

include(CPack)
# ---- TARGET package ----------------------------------------------------------

# ---- Target test -------------------------------------------------------------

enable_testing()
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tatsuya Yamasaki")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_GENERATOR DEB)
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
include(CPack)
endif()

find_program(${PROJECT_NAME}_MEMORY_CHECK_COMMAND valgrind)
# ---- TARGET test -------------------------------------------------------------

set(${PROJECT_NAME}_MEMORY_CHECK_OPTIONS
--error-exitcode=1 # = EXIT_FAILURE)
--leak-check=full
--quiet
--show-leak-kinds=all)
enable_testing()

file(GLOB ${PROJECT_NAME}_TEST_SS ${CMAKE_CURRENT_SOURCE_DIR}/test/*.ss)
find_program(${PROJECT_NAME}_VALGRIND valgrind)

foreach(EACH IN LISTS ${PROJECT_NAME}_TEST_SS)
get_filename_component(FILENAME ${EACH} NAME_WE)
add_test(
NAME ${FILENAME}
COMMAND ${${PROJECT_NAME}_MEMORY_CHECK_COMMAND}
${${PROJECT_NAME}_MEMORY_CHECK_OPTIONS}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/meevax
${EACH})
endforeach()
if(${PROJECT_NAME}_VALGRIND STREQUAL ${PROJECT_NAME}_VALGRIND-NOTFOUND)
set(${PROJECT_NAME}_TEST "")
else()
set(${PROJECT_NAME}_TEST ${${PROJECT_NAME}_VALGRIND} --error-exitcode=1 --leak-check=full --quiet --show-leak-kinds=all)
endif()

file(GLOB ${PROJECT_NAME}_TEST_CPP ${CMAKE_CURRENT_SOURCE_DIR}/test/*.cpp)
file(GLOB ${PROJECT_NAME}_TEST_SH ${CMAKE_CURRENT_SOURCE_DIR}/test/*.sh)
file(GLOB ${PROJECT_NAME}_TEST_SS ${CMAKE_CURRENT_SOURCE_DIR}/test/*.ss)

foreach(EACH IN LISTS ${PROJECT_NAME}_TEST_CPP)
get_filename_component(FILENAME ${EACH} NAME_WE)
add_executable(test_${FILENAME} ${EACH})
target_link_libraries(test_${FILENAME} PRIVATE basis kernel)
target_compile_options(test_${FILENAME} PUBLIC -Wno-deprecated-declarations)
add_test(
NAME test/${FILENAME}
COMMAND ${${PROJECT_NAME}_MEMORY_CHECK_COMMAND}
${${PROJECT_NAME}_MEMORY_CHECK_OPTIONS}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_${FILENAME})
add_test(NAME test/${FILENAME} COMMAND ${${PROJECT_NAME}_TEST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_${FILENAME})
endforeach()

file(GLOB ${PROJECT_NAME}_TEST_SH ${CMAKE_CURRENT_SOURCE_DIR}/test/*.sh)

foreach(EACH IN LISTS ${PROJECT_NAME}_TEST_SH)
get_filename_component(FILENAME ${EACH} NAME_WE)
add_test(
NAME ${FILENAME}
COMMAND ${${PROJECT_NAME}_MEMORY_CHECK_COMMAND}
${${PROJECT_NAME}_MEMORY_CHECK_OPTIONS}
${EACH}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/meevax)
add_test(NAME ${FILENAME} COMMAND ${${PROJECT_NAME}_TEST} ${EACH} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/meevax)
endforeach()

# ---- Additional Targets ------------------------------------------------------
foreach(EACH IN LISTS ${PROJECT_NAME}_TEST_SS)
get_filename_component(FILENAME ${EACH} NAME_WE)
add_test(NAME ${FILENAME} COMMAND ${${PROJECT_NAME}_TEST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/meevax ${EACH})
endforeach()

execute_process(COMMAND nproc OUTPUT_VARIABLE ${PROJECT_NAME}_NPROC)
# ---- TARGET continuous-integration -------------------------------------------

add_custom_target(develop
COMMAND ${CMAKE_MAKE_PROGRAM} -j${${PROJECT_NAME}_NPROC}
COMMAND ${CMAKE_MAKE_PROGRAM} test ARGS=-j${${PROJECT_NAME}_NPROC}
COMMAND ${CMAKE_MAKE_PROGRAM} package
COMMAND sudo dpkg -i ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_${PROJECT_VERSION}_amd64.deb)
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
execute_process(COMMAND nproc OUTPUT_VARIABLE ${PROJECT_NAME}_NPROC)
add_custom_target(continuous-integration
COMMAND ${CMAKE_MAKE_PROGRAM} -j${${PROJECT_NAME}_NPROC}
COMMAND ${CMAKE_MAKE_PROGRAM} test ARGS=-j${${PROJECT_NAME}_NPROC}
COMMAND ${CMAKE_MAKE_PROGRAM} package
COMMAND sudo dpkg -i ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_${PROJECT_VERSION}_amd64.deb)
else()
execute_process(COMMAND sysctl -n hw.ncpu OUTPUT_VARIABLE ${PROJECT_NAME}_NCPU)
add_custom_target(continuous-integration
COMMAND ${CMAKE_MAKE_PROGRAM} -j${${PROJECT_NAME}_NCPU}
COMMAND ${CMAKE_MAKE_PROGRAM} test ARGS=-j${${PROJECT_NAME}_NCPU}
COMMAND sudo ${CMAKE_MAKE_PROGRAM} install)
endif()
Loading
Loading