Skip to content

Commit

Permalink
Merge pull request #564 from jschueller/unity
Browse files Browse the repository at this point in the history
CMake: Support UNITY_BUILD
  • Loading branch information
bluescarni authored Feb 14, 2024
2 parents f59e2c0 + 2343f03 commit 9fe81f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches:
- master
jobs:
osx_10_15:
runs-on: macos-10.15
osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ set(PAGMO_SRC_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/src/detail/type_name.cpp"
)

set_property(SOURCE src/problems/cec2013.cpp
PROPERTY SKIP_UNITY_BUILD_INCLUSION ON)

# Optional and platform-dependent bits.
if(PAGMO_WITH_FORK_ISLAND)
set(PAGMO_SRC_FILES
Expand Down
2 changes: 0 additions & 2 deletions src/problems/wfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,10 +916,8 @@ vector_double wfg::wfg8_fitness(const vector_double &x) const
for (decltype(m_dim_k) i = m_dim_k; i < m_dim_dvs; ++i) {
vector_double first_input(i);
vector_double weights(i, 1.0);
decltype(m_dim_obj) index = 0u;
for (decltype(i) j = 0u; j < i; ++j) {
first_input[j] = y[j];
++index;
}
t_1[i] = b_param(x_norm[i], r_sum(first_input, weights), 0.98 / 49.98, 0.02, 50);
y[i] = t_1[i];
Expand Down

0 comments on commit 9fe81f5

Please sign in to comment.