diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 394e7382..505e2fc0 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -52,9 +52,6 @@ jobs: # TODO: Switch back to macos-latest once https://github.com/actions/python-versions/pull/114 is fixed os: - 'ubuntu-latest' - # TODO: Fix failing CMake build on windows: - # Error: `cl : command line error D8016: '/O2' and '/RTC1' command-line options are incompatible [D:\a\voyager\voyager\cpp\test\test.vcxproj]` - # I've tried passing CXX flags, but windows doesn't seem to respect disabling runtime checks with /RTC1 or disabling optimizations with /O2 - windows-latest - macos-12 name: Test C++ on ${{ matrix.os }} @@ -66,7 +63,6 @@ jobs: if: matrix.os == 'windows-latest' run: | choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' - choco install ninja - name: Install CMake (MacOS) if: matrix.os == 'macos-12' run: brew install cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 4208d3eb..7eccd0bc 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -6,14 +6,14 @@ set(LLVM_CXX_STD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) if (MSVC) - # Set /RTC1 only for Debug builds - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /RTC1") + # # Set /RTC1 only for Debug builds + # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /RTC1") - # Ensure /RTC1 is not used in Release builds - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2") + # # Ensure /RTC1 is not used in Release builds + # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2") - # Optionally, remove /RTC1 from the global CXX flags to avoid conflicts - string(REGEX REPLACE "/RTC1" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + # # Optionally, remove /RTC1 from the global CXX flags to avoid conflicts + # string(REGEX REPLACE "/RTC1" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") endif() enable_testing() diff --git a/cpp/Makefile b/cpp/Makefile index 02c3ab16..62b1dc73 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -9,7 +9,7 @@ build: cmake cmake --build ${BUILD_DIR} test: build - cmake --build ${BUILD_DIR} --target test + ctest --test-dir ${BUILD_DIR} clean: rm -rf ${BUILD_DIR}/* \ No newline at end of file diff --git a/cpp/src/E4M3.h b/cpp/src/E4M3.h index 37f6b523..ed241efd 100644 --- a/cpp/src/E4M3.h +++ b/cpp/src/E4M3.h @@ -21,6 +21,7 @@ #pragma once #include +#include static constexpr float ALL_E4M3_VALUES[256] = { 0, diff --git a/cpp/src/Enums.h b/cpp/src/Enums.h index 885dada4..b0f3377c 100644 --- a/cpp/src/Enums.h +++ b/cpp/src/Enums.h @@ -1,5 +1,7 @@ #pragma once +#include + /** * The space (i.e. distance metric) to use for searching. */ diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt index adde8751..a46805c1 100644 --- a/cpp/test/CMakeLists.txt +++ b/cpp/test/CMakeLists.txt @@ -13,9 +13,6 @@ target_link_libraries(VoyagerTests doctest ) -# Add the tests -add_test(NAME VoyagerTests COMMAND VoyagerTests) - # Discover tests using Doctest include(${CMAKE_SOURCE_DIR}/include/doctest/scripts/cmake/doctest.cmake) doctest_discover_tests(VoyagerTests)