Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisCarouge committed Oct 5, 2024
1 parent 256e1bb commit a7068c6
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 204 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
matrix:
include:
- { os: 'ubuntu-latest', cxx: 'clang++-18', cc: 'clang-18', generator: 'Ninja', packages: 'clang-18' }
- { os: 'ubuntu-latest', cxx: 'clang++-19', cc: 'clang-19', generator: 'Ninja', packages: 'clang-19' }
- { os: 'ubuntu-latest', cxx: 'g++-13', cc: 'gcc-13', generator: 'Ninja', packages: 'g++-13' }
- { os: 'ubuntu-latest', cxx: 'g++-14', cc: 'gcc-14', generator: 'Ninja', packages: 'g++-14' }
- { os: 'windows-latest', cxx: 'cl', cc: 'cl', generator: 'Ninja', config: 'Debug' }
- { os: 'windows-latest', cxx: 'cl', cc: 'cl', generator: 'Ninja', config: 'Release' }
name: '${{ matrix.os }} / ${{ matrix.cxx }} / ${{ matrix.generator }} / ${{ matrix.config }}'
Expand All @@ -32,23 +34,40 @@ jobs:
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: 'Install: MSVC'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: 'Install: GCC'
- name: 'Install: GCC 13'
if: ${{ matrix.cxx == 'g++-13' }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt upgrade
sudo apt install '${{ matrix.packages }}'
- name: 'Install: Clang'
sudo apt install '${{ matrix.packages }}' ninja-build
- name: 'Install: GCC 14'
if: ${{ matrix.cxx == 'g++-14' }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt upgrade
sudo apt install '${{ matrix.packages }}' ninja-build
- name: 'Install: Clang 18'
if: ${{ matrix.cxx == 'clang++-18' }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt upgrade
sudo apt install g++-13 ninja
sudo apt install g++-13 ninja-build
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18 all
- name: 'Install: Clang 19'
if: ${{ matrix.cxx == 'clang++-19' }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt upgrade
sudo apt install g++-13 ninja-build
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19 all
- name: 'Configure'
env:
CXX: '${{ matrix.cxx }}'
Expand Down
20 changes: 2 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,15 @@ project(
VERSION "0.4.0")

set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_MODULE_STD ON)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
set(CPACK_PACKAGE_CHECKSUM "SHA512")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
set(CPACK_SOURCE_GENERATOR "TBZ2")
# set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD 20)

# if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") include("cmake/gcc_modules.cmake")
# endif() set(CMAKE_CXX_STANDARD 23) set(CXX_SCAN_FOR_MODULES TRUE)

# message(STATUS "CMAKE VERSION: " ${CMAKE_VERSION})

# if(${CMAKE_VERSION} VERSION_EQUAL "3.25")
# set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
# "3c375311-a3c9-4396-a187-3227ef642046") elseif(${CMAKE_VERSION} VERSION_EQUAL
# "3.26") set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
# "2182bf5c-ef0d-489a-91da-49dbc3090d2a") elseif(${CMAKE_VERSION} VERSION_EQUAL
# "3.27") set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
# "aa1f7df0-828a-4fcd-9afc-2dc80491aca7") endif()

# set(CMAKE_CXX_STANDARD 20) set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
# "aa1f7df0-828a-4fcd-9afc-2dc80491aca7")
# set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)

include(CMakePackageConfigHelpers)
include(CPack)
Expand Down
6 changes: 3 additions & 3 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ foreach(BENCHMARK "baseline.cpp" "predict_1x1x0.cpp" "predict_1x1x1.cpp"
target_link_libraries(
kalman_benchmark_${NAME}_driver
PRIVATE benchmark::benchmark benchmark::benchmark_main kalman
kalman_options kalman_std)
kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(
NAME kalman_benchmark_${NAME}
Expand All @@ -84,7 +84,7 @@ foreach(BACKEND IN ITEMS "eigen" "naive")
target_link_libraries(
kalman_benchmark_predict_${BACKEND}_${STATE_SIZE}x1x${INPUT_SIZE}_driver
PRIVATE benchmark::benchmark benchmark::benchmark_main kalman
kalman_linalg_${BACKEND} kalman_options kalman_std)
kalman_linalg_${BACKEND} kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(
NAME kalman_benchmark_predict_${BACKEND}_${STATE_SIZE}x1x${INPUT_SIZE}
Expand All @@ -111,7 +111,7 @@ foreach(BACKEND IN ITEMS "eigen")
target_link_libraries(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PRIVATE benchmark::benchmark benchmark::benchmark_main kalman
kalman_linalg_${BACKEND} kalman_options kalman_std)
kalman_linalg_${BACKEND} kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(
NAME kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0
Expand Down
7 changes: 3 additions & 4 deletions sample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ foreach(SAMPLE "kf_1x1x0_building_height.cpp" "kf_1x1x0_liquid_temperature.cpp"
get_filename_component(NAME ${SAMPLE} NAME_WE)
add_executable(kalman_sample_${NAME}_driver ${SAMPLE})
target_link_libraries(kalman_sample_${NAME}_driver PRIVATE kalman kalman_main
kalman_options kalman_std)
kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(NAME kalman_sample_${NAME}
COMMAND ${TEST_COMMAND} $<TARGET_FILE:kalman_sample_${NAME}_driver>)
Expand All @@ -53,7 +53,7 @@ foreach(BACKEND IN ITEMS "eigen" "naive")
add_executable(kalman_sample_${BACKEND}_${NAME}_driver ${SAMPLE})
target_link_libraries(
kalman_sample_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options kalman_std)
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(NAME kalman_sample_${BACKEND}_${NAME}
COMMAND ${TEST_COMMAND}
Expand All @@ -68,8 +68,7 @@ foreach(BACKEND IN ITEMS "eigen")
add_executable(kalman_sample_${BACKEND}_${NAME}_driver ${SAMPLE})
target_link_libraries(
kalman_sample_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options
kalman_std)
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(NAME kalman_sample_${BACKEND}_${NAME}
COMMAND ${TEST_COMMAND}
Expand Down
6 changes: 0 additions & 6 deletions support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,3 @@ if(NOT CPP_LIB_GENERATOR)
FILE_SET "kalman_generator_headers"
DESTINATION "include/fcarouge")
endif()

add_library(kalman_std)
target_compile_features(kalman_std PUBLIC cxx_std_23)
# target_link_libraries(kalman_std PRIVATE kalman_options)
target_sources(kalman_std PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES
"std.ixx")
162 changes: 0 additions & 162 deletions support/std.ixx

This file was deleted.

11 changes: 4 additions & 7 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ foreach(
get_filename_component(NAME ${TEST} NAME_WE)
add_executable(kalman_test_${NAME}_driver ${TEST})
target_link_libraries(kalman_test_${NAME}_driver
PRIVATE kalman kalman_main kalman_options kalman_print kalman_std)
PRIVATE kalman kalman_main kalman_options kalman_print)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(NAME kalman_test_${NAME}
COMMAND ${TEST_COMMAND} $<TARGET_FILE:kalman_test_${NAME}_driver>)
Expand Down Expand Up @@ -80,8 +80,7 @@ foreach(BACKEND IN ITEMS "eigen" "lazy" "naive")
add_executable(kalman_test_${BACKEND}_${NAME}_driver ${TEST})
target_link_libraries(
kalman_test_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options
kalman_std)
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(NAME kalman_test_${BACKEND}_${NAME}
COMMAND ${TEST_COMMAND}
Expand All @@ -108,8 +107,7 @@ foreach(BACKEND IN ITEMS "eigen")
add_executable(kalman_test_${BACKEND}_${NAME}_driver ${TEST})
target_link_libraries(
kalman_test_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options
kalman_std)
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(NAME kalman_test_${BACKEND}_${NAME}
COMMAND ${TEST_COMMAND}
Expand All @@ -123,8 +121,7 @@ foreach(BACKEND IN ITEMS "lazy")
add_executable(kalman_test_${BACKEND}_${NAME}_driver ${TEST})
target_link_libraries(
kalman_test_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options
kalman_std)
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
add_test(NAME kalman_test_${BACKEND}_${NAME}
COMMAND ${TEST_COMMAND}
Expand Down

0 comments on commit a7068c6

Please sign in to comment.