Skip to content

Commit

Permalink
move evolve code to core lib (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Aug 31, 2022
1 parent 62afadb commit 5751b61
Show file tree
Hide file tree
Showing 25 changed files with 19 additions and 26 deletions.
12 changes: 1 addition & 11 deletions cpp_neutral_benchmark/CMakeLists.txt
@@ -1,15 +1,5 @@
SET(CPP_NEUTRAL_BENCHMARK_SOURCES
cpp_neutral_benchmark.cc
../fwdpy11/src/evolve_population/remove_extinct_genomes.cc
../fwdpy11/src/evolve_population/remove_extinct_mutations.cc
../fwdpy11/src/evolve_population/diploid_pop_fitness.cc
../fwdpy11/src/evolve_population/runtime_checks.cc
../fwdpy11/src/evolve_population/track_mutation_counts.cc
../fwdpy11/src/evolve_population/track_ancestral_counts.cc
../fwdpy11/src/evolve_population/index_and_count_mutations.cc
../fwdpy11/src/evolve_population/util.cc
../fwdpy11/src/evolve_population/evolvets.cc
../fwdpy11/src/evolve_population/cleanup_metadata.cc)
cpp_neutral_benchmark.cc)

add_executable(cpp_neutral_benchmark ${CPP_NEUTRAL_BENCHMARK_SOURCES})
add_dependencies(cpp_neutral_benchmark fwdpy11core header)
Expand Down
2 changes: 1 addition & 1 deletion cpp_neutral_benchmark/cpp_neutral_benchmark.cc
Expand Up @@ -12,7 +12,7 @@
#include <fwdpy11/evolvets/SampleRecorder.hpp>
#include <fwdpy11/evolvets/recorders.hpp>
#include <fwdpy11/rng.hpp>
#include "../fwdpy11/src/evolve_population/evolvets.hpp"
#include <core/evolve_discrete_demes/evolvets.hpp>
#include <boost/program_options.hpp>

namespace po = boost::program_options;
Expand Down
12 changes: 1 addition & 11 deletions fwdpy11/CMakeLists.txt
Expand Up @@ -74,17 +74,7 @@ set(TS_SOURCES src/ts/init.cc src/ts/TreeIterator.cc src/ts/VariantIterator.cc

set(EVOLVE_POPULATION_SOURCES src/evolve_population/init.cc
src/evolve_population/_evolvets.cc
src/evolve_population/evolvets.cc
src/evolve_population/util.cc
src/evolve_population/cleanup_metadata.cc
src/evolve_population/diploid_pop_fitness.cc
src/evolve_population/index_and_count_mutations.cc
src/evolve_population/track_mutation_counts.cc
src/evolve_population/no_stopping.cc
src/evolve_population/remove_extinct_mutations.cc
src/evolve_population/track_ancestral_counts.cc
src/evolve_population/remove_extinct_genomes.cc
src/evolve_population/runtime_checks.cc)
src/evolve_population/no_stopping.cc)

set(DISCRETE_DEMOGRAPHY_SOURCES src/discrete_demography/init.cc
src/discrete_demography/MigrationMatrix.cc
Expand Down
2 changes: 1 addition & 1 deletion fwdpy11/src/evolve_population/_evolvets.cc
Expand Up @@ -21,7 +21,7 @@

#include <pybind11/pybind11.h>
#include <pybind11/functional.h>
#include "evolvets.hpp"
#include <core/evolve_discrete_demes/evolvets.hpp>
//#include <fwdpy11/discrete_demography/simulation/demographic_model_state.hpp>

namespace py = pybind11;
Expand Down
15 changes: 14 additions & 1 deletion lib/CMakeLists.txt
Expand Up @@ -6,9 +6,22 @@ set(MUTATION_DOMINANCE_SOURCES mutation_dominance/dependency_injection.cc)
set(DEMES_SOURCES
demes/forward_graph.cc)

set(EVOLVE_DISCRETE_DEMES_SOURCES
evolve_discrete_demes/cleanup_metadata.cc
evolve_discrete_demes/diploid_pop_fitness.cc
evolve_discrete_demes/evolvets.cc
evolve_discrete_demes/index_and_count_mutations.cc
evolve_discrete_demes/remove_extinct_genomes.cc
evolve_discrete_demes/remove_extinct_mutations.cc
evolve_discrete_demes/track_ancestral_counts.cc
evolve_discrete_demes/track_mutation_counts.cc
evolve_discrete_demes/runtime_checks.cc
evolve_discrete_demes/util.cc)

set(ALL_SOURCES ${DISCRETE_DEMOGRAPHY_SOURCES}
${MUTATION_DOMINANCE_SOURCES}
${DEMES_SOURCES})
${DEMES_SOURCES}
${EVOLVE_DISCRETE_DEMES_SOURCES})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
add_library(fwdpy11core SHARED ${ALL_SOURCES})
Expand Down
File renamed without changes.
Expand Up @@ -18,7 +18,7 @@
#include "remove_extinct_genomes.hpp"
#include "runtime_checks.hpp"

#include "evolvets.hpp"
#include <core/evolve_discrete_demes/evolvets.hpp>

namespace ddemog = fwdpy11::discrete_demography;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5751b61

Please sign in to comment.