xcoll 0.6.0__tar.gz → 0.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xcoll might be problematic. Click here for more details.

Files changed (133) hide show
  1. {xcoll-0.6.0 → xcoll-0.6.2}/PKG-INFO +5 -4
  2. {xcoll-0.6.0 → xcoll-0.6.2}/pyproject.toml +3 -3
  3. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/general.py +1 -1
  4. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/plot.py +1 -1
  5. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/.git +0 -1
  6. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/.gitignore +0 -2
  7. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/CMakeLists.txt +0 -18
  8. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/ComponentMakefile +0 -192
  9. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/Makefile +0 -144
  10. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/README +0 -26
  11. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/Doxyfile +0 -1551
  12. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO.asciidoc +0 -1054
  13. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO.epub +0 -0
  14. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO.html +0 -1607
  15. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO.pdf +0 -0
  16. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__1.png +0 -0
  17. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__2.png +0 -0
  18. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__3.png +0 -0
  19. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__4.png +0 -0
  20. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__5.png +0 -0
  21. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__6.png +0 -0
  22. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/FlukaIO__7.png +0 -0
  23. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/Makefile +0 -8
  24. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/doc/docbook.xsl +0 -1690
  25. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/include/Connection.h +0 -79
  26. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/include/FlukaIO.h +0 -58
  27. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/include/FlukaIOServer.h +0 -33
  28. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/include/FortranFlukaIO.h +0 -277
  29. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/include/Message.h +0 -89
  30. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/include/ParticleInfo.h +0 -76
  31. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/lib/libFlukaIO64.a +0 -0
  32. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/lib/libFlukaIO64.so +0 -0
  33. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/samples/ClientTest.c +0 -156
  34. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/samples/ServerTest.c +0 -123
  35. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/samples/fclient.f +0 -149
  36. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/samples/fserver.f +0 -118
  37. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/Connection.c +0 -264
  38. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/Connection.d +0 -69
  39. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/Connection.o +0 -0
  40. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.c +0 -211
  41. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.d +0 -46
  42. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.o +0 -0
  43. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.c +0 -45
  44. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.d +0 -29
  45. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.h +0 -17
  46. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.o +0 -0
  47. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.c +0 -84
  48. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.d +0 -70
  49. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.o +0 -0
  50. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer_private.h +0 -22
  51. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FlukaIO_private.h +0 -16
  52. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.c +0 -533
  53. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.d +0 -40
  54. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.o +0 -0
  55. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/NetIO.c +0 -304
  56. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/NetIO.d +0 -66
  57. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/NetIO.h +0 -30
  58. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/NetIO.o +0 -0
  59. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/src/tags +0 -167
  60. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/AllTests.cpp +0 -8
  61. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/CommonTest.h +0 -10
  62. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/ConnectionTest.cpp +0 -99
  63. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/FlukaIOServerTest.cpp +0 -104
  64. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/FlukaIOTest.cpp +0 -439
  65. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/FortranFlukaIOTest.cpp +0 -682
  66. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeConnection.c +0 -19
  67. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeConnection.h +0 -16
  68. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIO.c +0 -74
  69. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIO.h +0 -50
  70. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIOHandshake.c +0 -16
  71. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIOHandshake.h +0 -20
  72. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIOServer.c +0 -12
  73. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFlukaIOServer.h +0 -18
  74. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeFortranFlukaIO.h +0 -19
  75. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeNetIO.c +0 -80
  76. xcoll-0.6.0/xcoll/scattering_routines/fluka/flukaio/tests/fakes/FakeNetIO.h +0 -35
  77. {xcoll-0.6.0 → xcoll-0.6.2}/LICENSE +0 -0
  78. {xcoll-0.6.0 → xcoll-0.6.2}/NOTICE +0 -0
  79. {xcoll-0.6.0 → xcoll-0.6.2}/README.md +0 -0
  80. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/__init__.py +0 -0
  81. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/__init__.py +0 -0
  82. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/absorber.py +0 -0
  83. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/base.py +0 -0
  84. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/blowup.py +0 -0
  85. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/black_absorber.h +0 -0
  86. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/black_crystal.h +0 -0
  87. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/blowup.h +0 -0
  88. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/emittance_monitor.h +0 -0
  89. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/everest_block.h +0 -0
  90. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/everest_collimator.h +0 -0
  91. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/everest_crystal.h +0 -0
  92. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/transparent_collimator.h +0 -0
  93. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/elements_src/transparent_crystal.h +0 -0
  94. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/everest.py +0 -0
  95. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/monitor.py +0 -0
  96. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/beam_elements/transparent.py +0 -0
  97. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/colldb.py +0 -0
  98. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/headers/checks.h +0 -0
  99. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/headers/particle_states.py +0 -0
  100. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/initial_distribution.py +0 -0
  101. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/interaction_record/__init__.py +0 -0
  102. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/interaction_record/interaction_record.py +0 -0
  103. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/interaction_record/interaction_record_src/interaction_record.h +0 -0
  104. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/interaction_record/interaction_types.py +0 -0
  105. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/line_tools.py +0 -0
  106. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/lossmap.py +0 -0
  107. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/rf_sweep.py +0 -0
  108. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/engine.py +0 -0
  109. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/environment.py +0 -0
  110. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/__init__.py +0 -0
  111. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/amorphous.h +0 -0
  112. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/channelling.h +0 -0
  113. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/constants.h +0 -0
  114. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/crystal_parameters.h +0 -0
  115. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/everest.h +0 -0
  116. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/everest.py +0 -0
  117. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/ionisation_loss.h +0 -0
  118. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/jaw.h +0 -0
  119. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/materials.py +0 -0
  120. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/multiple_coulomb_scattering.h +0 -0
  121. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/nuclear_interaction.h +0 -0
  122. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/everest/properties.h +0 -0
  123. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/__init__.py +0 -0
  124. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/collimator_geometry.h +0 -0
  125. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/crystal_geometry.h +0 -0
  126. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/geometry.py +0 -0
  127. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/get_s.h +0 -0
  128. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/methods.h +0 -0
  129. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/objects.h +0 -0
  130. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/rotation.h +0 -0
  131. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/segments.h +0 -0
  132. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/scattering_routines/geometry/sort.h +0 -0
  133. {xcoll-0.6.0 → xcoll-0.6.2}/xcoll/xaux.py +0 -0
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: xcoll
3
- Version: 0.6.0
3
+ Version: 0.6.2
4
4
  Summary: Xsuite collimation package
5
- Home-page: https://github.com/xsuite/xcoll
6
5
  License: Apache 2.0
7
6
  Author: Frederik F. Van der Veken
8
7
  Author-email: frederik@cern.ch
@@ -14,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
14
13
  Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
17
  Provides-Extra: tests
18
18
  Requires-Dist: numpy (>=1.0)
19
19
  Requires-Dist: pandas (>=1.4)
@@ -21,7 +21,8 @@ Requires-Dist: ruamel-yaml (>=0.17.31,<0.18.0) ; extra == "tests"
21
21
  Requires-Dist: xdeps (>=0.10.5)
22
22
  Requires-Dist: xobjects (>=0.5.0)
23
23
  Requires-Dist: xpart (>=0.23.0)
24
- Requires-Dist: xtrack (>=0.84.5)
24
+ Requires-Dist: xtrack (>=0.84.8)
25
+ Project-URL: Homepage, https://github.com/xsuite/xcoll
25
26
  Project-URL: Repository, https://github.com/xsuite/xcoll
26
27
  Description-Content-Type: text/markdown
27
28
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "xcoll"
3
- version = "0.6.0"
3
+ version = "0.6.2"
4
4
  description = "Xsuite collimation package"
5
5
  homepage = "https://github.com/xsuite/xcoll"
6
6
  repository = "https://github.com/xsuite/xcoll"
@@ -17,7 +17,7 @@ authors = [
17
17
  ]
18
18
  readme = "README.md"
19
19
  license = "Apache 2.0"
20
- include = ["LICENSE", "NOTICE"]
20
+ exclude = ["xcoll/lib", "xcoll/config"]
21
21
 
22
22
 
23
23
  [tool.poetry.dependencies]
@@ -28,7 +28,7 @@ pandas = ">=1.4"
28
28
  xobjects = ">=0.5.0"
29
29
  xdeps = ">=0.10.5"
30
30
  xpart = ">=0.23.0"
31
- xtrack = ">=0.84.5"
31
+ xtrack = ">=0.84.8"
32
32
 
33
33
  [poetry.group.dev.dependencies]
34
34
  pytest = ">=7.3"
@@ -12,5 +12,5 @@ citation = "F.F. Van der Veken, et al.: Recent Developments with the New Tools f
12
12
  # ======================
13
13
  # Do not change
14
14
  # ======================
15
- __version__ = '0.6.0'
15
+ __version__ = '0.6.2'
16
16
  # ======================
@@ -5,7 +5,6 @@
5
5
 
6
6
  import numpy as np
7
7
  from numbers import Number
8
- import matplotlib.pyplot as plt
9
8
 
10
9
 
11
10
  _NORMS = ["total", "coll_max", "max", "none", "raw"]
@@ -13,6 +12,7 @@ _NORMS = ["total", "coll_max", "max", "none", "raw"]
13
12
 
14
13
  def _plot_lossmap_base(lossmap: dict, *, norm="total", ax=None, xlim=None, ylim=None,
15
14
  legend=True, grid=True, energy=False, show=True, savefig=None):
15
+ import matplotlib.pyplot as plt
16
16
  if norm in _NORMS:
17
17
  norm = norm.lower()
18
18
  elif not isinstance(norm, Number):
@@ -1 +0,0 @@
1
- gitdir: ../../../../.git/modules/xcoll/scattering_routines/fluka/flukaio
@@ -1,2 +0,0 @@
1
- lib
2
- src/*.d
@@ -1,18 +0,0 @@
1
- PROJECT(FLUKA_IO)
2
- cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
3
-
4
- SET(LIBFLUKAIO_SOURCES src/Connection.c src/FlukaIO.c src/FlukaIOHandshake.c src/FlukaIOServer.c src/FortranFlukaIO.c src/NetIO.c)
5
-
6
- include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
7
-
8
- add_library(flukaIO STATIC ${LIBFLUKAIO_SOURCES})
9
-
10
- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES AMD64 OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64 OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES i686)
11
- if(32BIT)
12
- target_compile_options(flukaIO PRIVATE -m32)
13
- endif(32BIT)
14
-
15
- if(64BIT)
16
- target_compile_options(flukaIO PRIVATE -m64)
17
- endif(64BIT)
18
- endif()
@@ -1,192 +0,0 @@
1
- #---------
2
- #
3
- # ComponentMakefile
4
- #
5
- # Include this file in your makefile
6
- # It makes
7
- # A static library
8
- # A test executable
9
- #
10
- # The necessary parameters are shown in
11
- # ComponentMakefileExampleParameters
12
- #
13
- # Inputs
14
- # SRC_FILES - Specific source files to build into library
15
- # SRC_DIRS - Directories od source file to built into the library
16
- # TEST_SRC - unit test code build into the unit test runner
17
- # MOCKS_SRC - mock objects build into the test runner
18
- # INCLUDES - List of -I files
19
- # CPPUTEST_CXXFLAGS - flags for the C++ compiler
20
- # CPPUTEST_CPPFLAGS - flags for the C++ AND C compiler
21
- # CPPUTEST_CFLAGS - C complier
22
- # CPPUTEST_LDFLAGS - Linker flags
23
- # TARGET_LIB - the created library
24
- # TEST_TARGET - the created test executable
25
- # OTHER_MAKEFILE_TO_INCLUDE - a hook to use this makefile to make
26
- # other targets. Like CSlim, which is part of fitnesse
27
- #----------
28
-
29
- #Helper Functions
30
- get_src_from_dir = $(wildcard $1/*.cpp) $(wildcard $1/*.c)
31
- get_dirs_from_dirspec = $(wildcard $1)
32
- get_src_from_dir_list = $(foreach dir, $1, $(call get_src_from_dir,$(dir)))
33
- src_to_o = $(subst .c,.o, $(subst .cpp,.o,$1))
34
- src_to_d = $(subst .c,.d, $(subst .cpp,.d,$1))
35
- #move_file_location = $(patsubst %.d,build/%.d, $1)
36
- src_to = $(subst .c,$1, $(subst .cpp,$1,$2))
37
-
38
- #Derived
39
- STUFF_TO_CLEAN += $(TEST_TARGET) $(TEST_TARGET).exe $(TARGET_LIB)
40
-
41
- SRC += $(call get_src_from_dir_list, $(SRC_DIRS)) $(SRC_FILES)
42
- OBJ = $(call src_to_o,$(SRC))
43
- STUFF_TO_CLEAN += $(OBJ)
44
-
45
- TEST_SRC = $(call get_src_from_dir_list, $(TEST_SRC_DIRS))
46
- TEST_OBJS = $(call src_to_o,$(TEST_SRC))
47
- STUFF_TO_CLEAN += $(TEST_OBJS)
48
-
49
- MOCKS_SRC = $(call get_src_from_dir_list, $(MOCKS_SRC_DIRS))
50
- MOCKS_OBJS = $(call src_to_o,$(MOCKS_SRC))
51
- STUFF_TO_CLEAN += $(MOCKS_OBJS)
52
-
53
- ALL_SRC = $(SRC) $(TEST_SRC) $(MOCKS_SRC)
54
-
55
- #Test coverage with gcov
56
- GCOV_OUTPUT = gcov_output.txt
57
- GCOV_REPORT = gcov_report.txt
58
- GCOV_ERROR = gcov_error.txt
59
- GCOV_GCDA_FILES = $(call src_to,.gcda, $(ALL_SRC))
60
- GCOV_GCNO_FILES = $(call src_to,.gcno, $(ALL_SRC))
61
- TEST_OUTPUT = $(TEST_TARGET).txt
62
- STUFF_TO_CLEAN += \
63
- $(GCOV_OUTPUT)\
64
- $(GCOV_REPORT)\
65
- $(GCOV_ERROR)\
66
- $(GCOV_GCDA_FILES)\
67
- $(GCOV_GCNO_FILES)\
68
- $(TEST_OUTPUT)
69
-
70
-
71
- #Other stuff needed
72
- CPPUTEST_LIB = $(CPPUTEST_HOME)/lib/libCppUTest.a
73
-
74
- CPPUTEST_CPPFLAGS += $(INCLUDES) $(GCOVFLAGS)
75
-
76
- #The gcda files for gcov need to be deleted before each run
77
- #To avoid annoying messages.
78
- GCOV_CLEAN = $(SILENCE)rm -f $(GCOV_GCDA_FILES) $(GCOV_OUTPUT) $(GCOV_REPORT) $(GCOV_ERROR)
79
- RUN_TEST_TARGET = $(SILENCE) $(GCOV_CLEAN) ; echo "Running $(TEST_TARGET)"; ./$(TEST_TARGET)
80
-
81
- ifneq "$(OTHER_MAKEFILE_TO_INCLUDE)" ""
82
- -include $(OTHER_MAKEFILE_TO_INCLUDE)
83
- endif
84
-
85
- ifneq "$(MAP_FILE)" ""
86
- CPPUTEST_LDFLAGS += -Wl,-map,$(MAP_FILE)
87
- endif
88
-
89
- INCLUDES_DIRS_EXPANDED = $(call get_dirs_from_dirspec, $(INCLUDE_DIRS))
90
- INCLUDES += $(foreach dir, $(INCLUDES_DIRS_EXPANDED), -I$(dir))
91
- MOCK_DIRS_EXPANDED = $(call get_dirs_from_dirspec, $(MOCKS_SRC_DIRS))
92
- INCLUDES += $(foreach dir, $(MOCK_DIRS_EXPANDED), -I$(dir))
93
-
94
-
95
- DEP_FILES = $(call src_to_d, $(ALL_SRC))
96
- STUFF_TO_CLEAN += $(DEP_FILES) + $(PRODUCTION_CODE_START) + $(PRODUCTION_CODE_END)
97
- STUFF_TO_CLEAN += $(STDLIB_CODE_START) + $(MAP_FILE) + cpputest_*.xml junit_run_output
98
-
99
- # We'll use the CPPUTEST_CFLAGS etc so that you can override AND add to the CppUTest flags
100
- CFLAGS = $(CPPUTEST_CFLAGS) $(CPPUTEST_ADDITIONAL_CFLAGS)
101
- CPPFLAGS = $(CPPUTEST_CPPFLAGS) $(CPPUTEST_ADDITIONAL_CPPFLAGS)
102
- CXXFLAGS = $(CPPUTEST_CXXFLAGS) $(CPPUTEST_ADDITIONAL_CXXFLAGS)
103
- LDFLAGS = $(CPPUTEST_LDFLAGS) $(CPPUTEST_ADDITIONAL_LDFLAGS)
104
-
105
- # Targets
106
- .PHONY: all
107
- all: $(TEST_TARGET)
108
- $(RUN_TEST_TARGET)
109
-
110
- .PHONY: all_no_tests
111
- all_no_tests: $(TEST_TARGET)
112
-
113
- .PHONY: flags
114
- flags:
115
- $(SILENCE)echo Compile with these flags:
116
- $(SILENCE)for f in $(CPPFLAGS) ; do \
117
- echo " C++ $$f" ; \
118
- done
119
- $(SILENCE)for f in $(CFLAGS) ; do \
120
- echo " C $$f" ; \
121
- done
122
- $(SILENCE)for f in $(LDFLAGS) ; do \
123
- echo " LD $$f" ; \
124
- done
125
- $(SILENCE)for f in $(ARFLAGS) ; do \
126
- echo " AR $$f" ; \
127
- done
128
-
129
-
130
- $(TEST_TARGET): $(TEST_OBJS) $(MOCKS_OBJS) $(PRODUCTION_CODE_START) $(TARGET_LIB) $(USER_LIBS) $(PRODUCTION_CODE_END) $(CPPUTEST_LIB) $(STDLIB_CODE_START)
131
- $(SILENCE)echo Linking $@
132
- $(SILENCE)echo command $(LINK.o) -o $@ $^ $(LD_LIBRARIES)
133
- $(SILENCE)$(LINK.o) -o $@ $^ $(LD_LIBRARIES)
134
-
135
- $(TARGET_LIB): $(OBJ)
136
- $(SILENCE)echo Building archive $@
137
- $(SILENCE)mkdir -p lib
138
- $(SILENCE)echo command $(AR) $(ARFLAGS) $@ $^
139
- $(SILENCE)$(AR) $(ARFLAGS) $@ $^
140
- $(SILENCE)ranlib $@
141
-
142
- test: $(TEST_TARGET)
143
- $(RUN_TEST_TARGET) | tee $(TEST_OUTPUT)
144
-
145
- vtest: $(TEST_TARGET)
146
- $(RUN_TEST_TARGET) -v | tee $(TEST_OUTPUT)
147
-
148
- %.o: %.cpp
149
- @echo compiling $(notdir $<)
150
- $(SILENCE)echo command $(COMPILE.cpp) -M -MF $(subst .o,.d,$@) -MT "$@ $(subst .o,.d,$@)" $<
151
- $(SILENCE)$(COMPILE.cpp) -M -MF $(subst .o,.d,$@) -MT "$@ $(subst .o,.d,$@)" $<
152
- $(SILENCE)echo command $(COMPILE.cpp) $(OUTPUT_OPTION) $<
153
- $(SILENCE)$(COMPILE.cpp) $(OUTPUT_OPTION) $<
154
-
155
- %.o: %.c
156
- @echo compiling $(notdir $<)
157
- $(SILENCE)echo command $(COMPILE.c) -M -MF $(subst .o,.d,$@) -MT "$@ $(subst .o,.d,$@)" $<
158
- $(SILENCE)$(COMPILE.c) -M -MF $(subst .o,.d,$@) -MT "$@ $(subst .o,.d,$@)" $<
159
- $(SILENCE)echo command $(COMPILE.c) $(OUTPUT_OPTION) $<
160
- $(SILENCE)$(COMPILE.c) $(OUTPUT_OPTION) $<
161
-
162
- ifneq "$(MAKECMDGOALS)" "clean"
163
- -include $(DEP_FILES)
164
- endif
165
-
166
- .PHONY: clean
167
- clean:
168
- $(SILENCE)echo Making clean
169
- $(SILENCE)$(RM) -rf $(STUFF_TO_CLEAN)
170
- $(SILENCE)find . -name \*.gcov | xargs rm -f
171
-
172
- gcov: test
173
- $(SILENCE)for d in $(SRC_DIRS) ; do \
174
- gcov -o $$d $$d/*.c $$d/*.cpp >> $(GCOV_OUTPUT) 2>>$(GCOV_ERROR) ; \
175
- done
176
- $(CPPUTEST_HOME)/scripts/filterGcov.sh $(GCOV_OUTPUT) $(GCOV_ERROR) $(GCOV_REPORT) $(TEST_OUTPUT)
177
- cat $(GCOV_REPORT)
178
-
179
- .PHONEY: format
180
- format:
181
- $(CPPUTEST_HOME)/scripts/reformat.sh $(PROJECT_HOME_DIR)
182
-
183
- debug:
184
- echo Stuff to clean
185
- $(SILENCE)for f in $(STUFF_TO_CLEAN) ; do \
186
- echo "$$f" ; \
187
- done
188
- echo Includes
189
- $(SILENCE)for i in $(INCLUDES) ; do \
190
- echo "$$i" ; \
191
- done
192
-
@@ -1,144 +0,0 @@
1
- #Set this to @ to keep the makefile quiet
2
- SILENCE = @
3
-
4
- #---- Outputs ----#
5
- COMPONENT_NAME = FlukaIO
6
- TARGET_LIB = \
7
- lib/lib$(COMPONENT_NAME).a
8
- TARGET_SHARED_LIB = \
9
- lib/lib$(COMPONENT_NAME).so
10
-
11
- TEST_TARGET = \
12
- $(COMPONENT_NAME)_tests
13
-
14
- ifeq ($(BUILD64), Y)
15
- TARGET_SUFFIX = 64
16
- CPPUTEST_CPPFLAGS += -m64
17
- G77FLAGS += -m64
18
- endif
19
- ifeq ($(BUILD32), Y)
20
- TARGET_SUFFIX = 32
21
- CPPUTEST_CPPFLAGS += -m32
22
- CPPUTEST_LDFLAGS += -m32
23
- G77FLAGS += -m32
24
- endif
25
-
26
- COMPONENT_NAME = FlukaIO
27
- TARGET_LIB = \
28
- lib/lib$(COMPONENT_NAME)$(TARGET_SUFFIX).a
29
- TARGET_SHARED_LIB = \
30
- lib/lib$(COMPONENT_NAME)$(TARGET_SUFFIX).so
31
-
32
- TEST_TARGET = \
33
- $(COMPONENT_NAME)$(TARGET_SUFFIX)_tests
34
-
35
- #--- Inputs ----#
36
- PROJECT_HOME_DIR = .
37
- #CPPUTEST_HOME = /home/dsinuela/src/cpputest
38
- CPP_PLATFORM = Gcc
39
-
40
- # in case of Ubuntu 16.04, comment out -Werror
41
- WARNINGFLAGS = -Wall -Wswitch-default -Wswitch-enum -Werror
42
- #CPPUTEST_CFLAGS are set to override malloc and free to get memory leak detection in C programs
43
- #CPPUTEST_CFLAGS = -Dmalloc=cpputest_malloc -Dfree=cpputest_free
44
- #GCOVFLAGS = -fprofile-arcs -ftest-coverage
45
-
46
- CPPUTEST_CPPFLAGS += $(WARNINGFLAGS)
47
- CPPUTEST_CPPFLAGS += -g
48
- CPPUTEST_CPPFLAGS += -fpic
49
- #CPPUTEST_CPPFLAGS += -DFLUKAIO_NODELAY
50
-
51
- G77 = gfortran
52
- G77FLAGS += $(WARNINGFLAGS)
53
- G77FLAGS += -g
54
-
55
- #SRC_DIRS is a list of source directories that make up the target library
56
- #If test files are in these directories, their IMPORT_TEST_GROUPs need
57
- #to be included in main to force them to be linked in. By convention
58
- #put them into an AllTests.h file in each directory
59
- SRC_DIRS = \
60
- src
61
-
62
- #TEST_SRC_DIRS is a list of directories including
63
- # - A test main (AllTests.cpp by conventin)
64
- # - OBJ files in these directories are included in the TEST_TARGET
65
- # - Consequently - AllTests.h containing the IMPORT_TEST_GROUPS is not needed
66
- # -
67
- TEST_SRC_DIRS = \
68
- tests \
69
- tests/fakes
70
-
71
- #includes for all compiles
72
- INCLUDES =\
73
- -I.\
74
- -Iinclude
75
- # -I$(CPPUTEST_HOME)/include\
76
-
77
- #Flags to pass to ld
78
- USER_LIBS =
79
- LD_LIBRARIES += -lstdc++
80
-
81
- include ComponentMakefile
82
-
83
- all: $(TARGET_LIB) $(TARGET_SHARED_LIB)
84
-
85
- libs: $(TARGET_LIB) $(TARGET_SHARED_LIB)
86
-
87
- $(TARGET_SHARED_LIB): $(OBJ)
88
- $(SILENCE)echo Building archive $@
89
- $(SILENCE)$(CC) --version
90
- $(SILENCE)echo command $(CC) $(LDFLAGS) -shared -o $@ $^
91
- $(SILENCE)mkdir -p lib
92
- $(SILENCE)$(CC) $(LDFLAGS) -shared -o $@ $^
93
-
94
- STUFF_TO_CLEAN += $(TARGET_SHARED_LIB)
95
-
96
- # Samples
97
-
98
- .PHONY: clean_samples
99
-
100
- clean_samples:
101
- rm -rf samples/{ServerTest,ClientTest,fserver,fclient}
102
-
103
- samples: ServerTest ClientTest fserver fclient
104
-
105
- ServerTest: samples/ServerTest.c $(TARGET_LIB)
106
- $(CC) $^ $(CPPFLAGS) -I./include -o samples/$@
107
-
108
- ClientTest: samples/ClientTest.c $(TARGET_LIB)
109
- $(CC) $^ $(CPPFLAGS) -I./include -o samples/$@
110
-
111
- fserver: samples/fserver.f $(TARGET_LIB)
112
- $(G77) $^ $(G77FLAGS) -o samples/$@
113
-
114
- fclient: samples/fclient.f $(TARGET_LIB)
115
- $(G77) $^ $(G77FLAGS) -o samples/$@
116
-
117
- STUFF_TO_CLEAN += samples/ServerTest
118
- STUFF_TO_CLEAN += samples/ClientTest
119
- STUFF_TO_CLEAN += samples/fserver
120
- STUFF_TO_CLEAN += samples/fclient
121
-
122
- # Documentation
123
-
124
- .PHONY: doc
125
-
126
- doc:
127
- @echo Making documentation
128
- $(SILENCE)doxygen doc/Doxyfile 1> doxygen.log
129
- #@$(RM) doxygen.log
130
- cd doc; make
131
-
132
- STUFF_TO_CLEAN += doc/html doxygen.log
133
-
134
- show:
135
- @echo "CPPFLAGS=$(CPPFLAGS)"
136
- @echo "LDFLAGS=$(LDFLAGS)"
137
-
138
- .PHONY: clean_all
139
-
140
- clean_all:
141
- $(SILENCE)echo "Making clean_all"
142
- $(SILENCE)make clean BUILD32=Y > /dev/null
143
- $(SILENCE)make clean BUILD64=Y > /dev/null
144
-
@@ -1,26 +0,0 @@
1
- FlukaIO
2
- =======
3
-
4
- How to compile
5
- ==============
6
-
7
- In a machine with CppUTest correctly configured, it can be compiled and tested running "make".
8
-
9
- In a machine without CppUTest both 32 and 64 bit versions of the libraries can be compiled issuing the following commands:
10
-
11
- make libs BUILD32=Y
12
- make clean
13
- make libs BUILD64=Y
14
-
15
- The resulting libraries will be compiled under the directory "lib".
16
-
17
- Documentation
18
- =============
19
-
20
- The doxygen documentation can be generated with the command "make doc"
21
-
22
- Compiling samples
23
- =================
24
-
25
- Run "make samples" to compile sample clients and servers under samples directory.
26
-