Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized code structure #680

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Optimized code structure #680

wants to merge 5 commits into from

Conversation

jokervTv
Copy link
Contributor

@jokervTv jokervTv commented Aug 6, 2022

Dear, sir

Fixed linker error by restructuring the code when tried to use cmake to integrate doctest with mpi.

In origin file:

#ifdef DOCTEST_CONFIG_IMPLEMENT
// declarations and definitions, like
int mpi_comm_world_size();
// skip
int mpi_comm_world_size() {
// skip
}
#else
// only declarations
int mpi_comm_world_size(); // no definition
//skip
#define MPI_CHECK // define some macro for mpi test
// ...
#endif

So we have to define DOCTEST_CONFIG_IMPLEMENT to get the function definitions and get macro without DOCTEST_CONFIG_IMPLEMENT defined and then link them.
I don't think this approach is good enough for some tests, for example if there is only one file here.
That's what I think is wrong.

jokervTv and others added 4 commits August 6, 2022 12:25
Optimising macro names

Co-authored-by: Philipp Bucher <philipp.bucher@tum.de>
Optimising macro names

Co-authored-by: Philipp Bucher <philipp.bucher@tum.de>
@codecov
Copy link

codecov bot commented Aug 6, 2022

Codecov Report

Merging #680 (576172c) into dev (ae7a135) will not change coverage.
Report is 2 commits behind head on dev.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #680   +/-   ##
=======================================
  Coverage   92.11%   92.11%           
=======================================
  Files           2        2           
  Lines        2169     2169           
=======================================
  Hits         1998     1998           
  Misses        171      171           

@jokervTv jokervTv changed the title Optimized Optimized code structure Aug 6, 2022
@Saalvage Saalvage changed the base branch from master to dev August 7, 2022 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant