core: Add conditional compilation guards to int64x64*.cc files
ns-3 has multiple int64x64*.cc
source code files with different implementations of the int64x64_t
class. Currently, the selection of which source code file to use is handled by CMake, which adds only one of these files to the build project. Additionally, the header file int64x64.h
has multiple compilation guards to include the correct source code file. However, the source code files themselves do not have any compilation guard.
This methodology works with CMake-based tools, since it ensures that only one source code implementation is included in the build. However, it presents problems with other tools that do not read the CMake configurations, such as clang-tidy-diff. When those tools scan the codebase, they check that there are multiple implementations of the same class, thus generating clashes.
This MR intends to solve this issue by adding compilation guards to each int64x64_t
source code file, to ensure that only one file is active. I tried adding the same guards that are present in the header file, but it is not working. Suggestions are very welcome.
To Do
-
Change license of int64x64*
files to SPDX (after !2030 (merged) is merged)