Skip to content
Merged
10 changes: 7 additions & 3 deletions .github/workflows/macOS_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ jobs:
with:
submodules: true

- name: Install OpenMP
run: |
brew install libomp
OPENMP_PREFIX=$(brew --prefix)/opt/libomp
echo "OpenMP_ROOT=$OPENMP_PREFIX" >> $GITHUB_ENV
echo "LDFLAGS=$LDFLAGS -L$OPENMP_PREFIX/lib" >> $GITHUB_ENV

- name: Configure
env:
CC: gcc-12
CXX: g++-12
working-directory: build
run: cmake ..
-DCMAKE_BUILD_TYPE=Release
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changes:
* Fix Python `json_read` crashing when the new population is empty ([#205](https://github.com/xcsf-dev/xcsf/pull/205))
* Reduce `max_trials` in Python tests for speed ([#206](https://github.com/xcsf-dev/xcsf/pull/206))
* Update Python packaging: move `setup.cfg` metadata to `pyproject.toml` ([#207](https://github.com/xcsf-dev/xcsf/pull/207))
* Fix macOS building with AppleClang ([#210](https://github.com/xcsf-dev/xcsf/pull/210))

## Version 1.4.7 (Aug 19, 2024)

Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wlogical-op")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wnested-externs")
Expand All @@ -76,9 +75,11 @@ if(NOT MSVC)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wuninitialized")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wuninitialized")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wlong-long")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmaybe-uninitialized")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmaybe-uninitialized")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wlogical-op")
endif()
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
Expand Down
7 changes: 1 addition & 6 deletions test/cl_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @file cl_test.cpp
* @author Richard Preen <rpreen@gmail.com>
* @copyright The Authors.
* @date 2023--2024.
* @date 2023--2025.
* @brief Classifier tests.
*/

Expand All @@ -36,11 +36,6 @@ extern "C" {
#include <string.h>
}

const double x[5] = { 0.8455260670, 0.7566081103, 0.3125093674, 0.3449376898,
0.3677518467 };

const double y[1] = { 0.9 };

TEST_CASE("CL")
{
/* Test initialisation */
Expand Down
2 changes: 1 addition & 1 deletion xcsf/pybind_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ class XCS
// map None types
if (params.contains("random_state")) {
py::object rs = params["random_state"];
if (py::isinstance<py::int_>(rs) && py::int_(rs) < 0) {
if (py::isinstance<py::int_>(rs) && rs.cast<long long>() < 0) {
params["random_state"] = py::none();
}
}
Expand Down
Loading