Skip to content

Commit dca095b

Browse files
committed
Update of everything to a working state with directory CMake files
1 parent 137e356 commit dca095b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+118
-43
lines changed

CMakeIndividual.pl

+23-8
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ sub printTarget
9696
{
9797
my $dir=shift;
9898
my $extra=shift;
99-
99+
my @Extra;
100+
101+
@Extra=split ' ',$extra if (defined($extra));
102+
103+
my %lookup = (@Extra) ? map {$_ => 1} @Extra : ();
100104
my $name=$dir;
101105

102106
my $incName=makeInclude($dir);
@@ -106,8 +110,12 @@ sub printTarget
106110
print "target_include_directories (",$name," PUBLIC\n";
107111
print " \${SYSTEM_INCLUDE}\n";
108112
print " \${GENERAL_INCLUDE}\n";
109-
print " \${ESS_INCLUDE}\n" if ($extra eq "ess");
110-
print " \${CMAKE_SOURCE_DIR}/".$incName."\n" if ($extra eq "base");
113+
print " \${ESS_INCLUDE}\n" if (exists($lookup{"ess"}));
114+
print " \${MAXIV_INCLUDE}\n" if (exists($lookup{"maxiv"}));
115+
print " \${CMAKE_SOURCE_DIR}/".$incName."\n" if (exists($lookup{"base"}));
116+
print " \${CMAKE_SOURCE_DIR}/Model/ralBuildInc\n" if (exists($lookup{"ral"}));
117+
print " \${CMAKE_SOURCE_DIR}/Model/photonInc\n" if (exists($lookup{"photon"}));
118+
print " \${CMAKE_SOURCE_DIR}/Model/MaxIV/LinacInc\n" if (exists($lookup{"linac"}));
111119
print ")\n\n";
112120

113121
return;
@@ -117,16 +125,17 @@ sub printFILE
117125
{
118126
my $dir=shift;
119127
my $name=$dir;
120-
$name=$1 if ($dir=~/\/([^\/]+)$/);
121-
128+
129+
my $incName=makeInclude($dir);
130+
$incName=$1 if ($incName=~/\/([^\/]+)$/);
131+
122132
print "file(RELATIVE_PATH tarDIR \n";
123133
print " \"\${CMAKE_BINARY_DIR}\"\n";
124134
print " \"\${CMAKE_CURRENT_SOURCE_DIR}\")\n\n";
125135

126136
print "file(RELATIVE_PATH tarINC \n";
127137
print " \"\${CMAKE_BINARY_DIR}\"\n";
128-
print " \"\${CMAKE_CURRENT_SOURCE_DIR}\/..\/".$name."Inc\")\n\n";
129-
138+
print " \"\${CMAKE_CURRENT_SOURCE_DIR}\/..\/".$incName."\")\n\n";
130139

131140
return;
132141
}
@@ -160,7 +169,13 @@ sub printTAR
160169

161170

162171
my $dir=$ARGV[0];
163-
my $extra=(@ARGV>1) ? $ARGV[1] : "";
172+
173+
my $extra;
174+
for(my $i=1;$i<@ARGV;$i++)
175+
{
176+
$extra.=$ARGV[$i]." ";
177+
}
178+
164179
my $files=getCXXFiles($dir);
165180

166181
my $incDir=makeInclude($dir);

Main/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ file(RELATIVE_PATH tarDIR
1313

1414
set(SRC_LIST
1515
${SRC_LIST}
16-
${tarDIR}/essBeamline.cxx ${tarDIR}/ess.cxx ${tarDIR}/essLinac.cxx
16+
${tarDIR}/essBeamline.cxx ${tarDIR}/ess.cxx ${tarDIR}/essLinacModel.cxx
1717
${tarDIR}/fullBuild.cxx ${tarDIR}/maxiv.cxx ${tarDIR}/pipe.cxx
18-
${tarDIR}/reactor.cxx ${tarDIR}/saxs.cxx ${tarDIR}/singleItem.cxx
18+
${tarDIR}/reactor.cxx ${tarDIR}/saxsSim.cxx ${tarDIR}/singleItem.cxx
1919
${tarDIR}/t1Real.cxx ${tarDIR}/testMain.cxx ${tarDIR}/xrayHut.cxx
2020
PARENT_SCOPE
2121
)

Main/essLinac.cxx Main/essLinacModel.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*********************************************************************
22
CombLayer : MCNP(X) Input builder
33
4-
* File: Main/linac.cxx
4+
* File: Main/essLinacModel.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell/Konstantin Batkov
6+
* Copyright (c) 2004-2023 by Stuart Ansell/Konstantin Batkov
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by

Main/saxs.cxx Main/saxsSim.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*********************************************************************
22
CombLayer : MCNP(X) Input builder
33
4-
* File: Main/saxs.cxx
4+
* File: Main/saxsSim.cxx
55
*
66
* Copyright (c) 2004-2022 by Stuart Ansell
77
*
@@ -73,7 +73,7 @@ main(int argc,char* argv[])
7373
{
7474
int exitFlag(0); // Value on exit
7575
// For output stream
76-
ELog::RegMethod RControl("saxs","main");
76+
ELog::RegMethod RControl("saxsSim","main");
7777
mainSystem::activateLogging(RControl);
7878

7979
// For output stream

Model/filter/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (filter PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
${CMAKE_SOURCE_DIR}/Model/filterInc
12+
${CMAKE_SOURCE_DIR}/Model/photonInc
1213
)
1314

1415
file(RELATIVE_PATH tarDIR

Model/maxivBuild/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ add_library (maxivBuild SHARED
88
target_include_directories (maxivBuild PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
11+
${MAXIV_INCLUDE}
1112
${CMAKE_SOURCE_DIR}/Model/maxivBuildInc
1213
)
1314

Model/singleItemBuild/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ add_library (singleItemBuild SHARED
88
target_include_directories (singleItemBuild PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
11+
${ESS_INCLUDE}
12+
${MAXIV_INCLUDE}
1113
${CMAKE_SOURCE_DIR}/Model/singleItemBuildInc
14+
${CMAKE_SOURCE_DIR}/Model/ralBuildInc
1215
)
1316

1417
file(RELATIVE_PATH tarDIR

Model/snsBuild/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (snsBuild PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
${CMAKE_SOURCE_DIR}/Model/snsBuildInc
13+
${CMAKE_SOURCE_DIR}/Model/ralBuildInc
1314
)
1415

1516
file(RELATIVE_PATH tarDIR

Model/t1Build/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ target_include_directories (t1Build PUBLIC
1717
${SYSTEM_INCLUDE}
1818
${GENERAL_INCLUDE}
1919
${CMAKE_SOURCE_DIR}/Model/t1BuildInc
20+
${CMAKE_SOURCE_DIR}/Model/ralBuildInc
2021
)
2122

2223
file(RELATIVE_PATH tarDIR

Model/t2Build/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ target_include_directories (t2Build PUBLIC
1818
${SYSTEM_INCLUDE}
1919
${GENERAL_INCLUDE}
2020
${CMAKE_SOURCE_DIR}/Model/t2BuildInc
21+
${CMAKE_SOURCE_DIR}/Model/ralBuildInc
2122
)
2223

2324
file(RELATIVE_PATH tarDIR

System/attachComp/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ target_include_directories (attachComp PUBLIC
1717
${SYSTEM_INCLUDE}
1818
${GENERAL_INCLUDE}
1919
)
20+
2021
file(RELATIVE_PATH tarDIR
2122
"${CMAKE_BINARY_DIR}"
2223
"${CMAKE_CURRENT_SOURCE_DIR}")

System/compWeights/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (compWeights PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
)
12+
1213
file(RELATIVE_PATH tarDIR
1314
"${CMAKE_BINARY_DIR}"
1415
"${CMAKE_CURRENT_SOURCE_DIR}")

System/construct/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ target_include_directories (construct PUBLIC
2929
${SYSTEM_INCLUDE}
3030
${GENERAL_INCLUDE}
3131
)
32+
3233
file(RELATIVE_PATH tarDIR
3334
"${CMAKE_BINARY_DIR}"
3435
"${CMAKE_CURRENT_SOURCE_DIR}")

System/constructVar/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ target_include_directories (constructVar PUBLIC
1414
${SYSTEM_INCLUDE}
1515
${GENERAL_INCLUDE}
1616
)
17+
1718
file(RELATIVE_PATH tarDIR
1819
"${CMAKE_BINARY_DIR}"
1920
"${CMAKE_CURRENT_SOURCE_DIR}")

System/crystal/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (crystal PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
)
13+
1314
file(RELATIVE_PATH tarDIR
1415
"${CMAKE_BINARY_DIR}"
1516
"${CMAKE_CURRENT_SOURCE_DIR}")

System/endf/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (endf PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
)
13+
1314
file(RELATIVE_PATH tarDIR
1415
"${CMAKE_BINARY_DIR}"
1516
"${CMAKE_CURRENT_SOURCE_DIR}")

System/flukaPhysics/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (flukaPhysics PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
)
12+
1213
file(RELATIVE_PATH tarDIR
1314
"${CMAKE_BINARY_DIR}"
1415
"${CMAKE_CURRENT_SOURCE_DIR}")

System/flukaProcess/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (flukaProcess PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
)
13+
1314
file(RELATIVE_PATH tarDIR
1415
"${CMAKE_BINARY_DIR}"
1516
"${CMAKE_CURRENT_SOURCE_DIR}")

System/flukaTally/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ target_include_directories (flukaTally PUBLIC
1414
${SYSTEM_INCLUDE}
1515
${GENERAL_INCLUDE}
1616
)
17+
1718
file(RELATIVE_PATH tarDIR
1819
"${CMAKE_BINARY_DIR}"
1920
"${CMAKE_CURRENT_SOURCE_DIR}")

System/funcBase/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ target_include_directories (funcBase PUBLIC
1212
${SYSTEM_INCLUDE}
1313
${GENERAL_INCLUDE}
1414
)
15+
1516
file(RELATIVE_PATH tarDIR
1617
"${CMAKE_BINARY_DIR}"
1718
"${CMAKE_CURRENT_SOURCE_DIR}")

System/generalProcess/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (generalProcess PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
)
13+
1314
file(RELATIVE_PATH tarDIR
1415
"${CMAKE_BINARY_DIR}"
1516
"${CMAKE_CURRENT_SOURCE_DIR}")

System/geometry/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ target_include_directories (geometry PUBLIC
2323
${SYSTEM_INCLUDE}
2424
${GENERAL_INCLUDE}
2525
)
26+
2627
file(RELATIVE_PATH tarDIR
2728
"${CMAKE_BINARY_DIR}"
2829
"${CMAKE_CURRENT_SOURCE_DIR}")
2930

3031
file(RELATIVE_PATH tarINC
3132
"${CMAKE_BINARY_DIR}"
32-
"${CMAKE_CURRENT_SOURCE_DIR}/../geometryInc")
33+
"${CMAKE_CURRENT_SOURCE_DIR}/../geomInc")
3334

3435
set (SRC_LIST ${SRC_LIST}
3536
${tarDIR}/ArbPoly.cxx

System/input/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (input PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
)
13+
1314
file(RELATIVE_PATH tarDIR
1415
"${CMAKE_BINARY_DIR}"
1516
"${CMAKE_CURRENT_SOURCE_DIR}")

System/insertUnit/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ target_include_directories (insertUnit PUBLIC
1111
${SYSTEM_INCLUDE}
1212
${GENERAL_INCLUDE}
1313
)
14+
1415
file(RELATIVE_PATH tarDIR
1516
"${CMAKE_BINARY_DIR}"
1617
"${CMAKE_CURRENT_SOURCE_DIR}")

System/log/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ target_include_directories (log PUBLIC
1111
${SYSTEM_INCLUDE}
1212
${GENERAL_INCLUDE}
1313
)
14+
1415
file(RELATIVE_PATH tarDIR
1516
"${CMAKE_BINARY_DIR}"
1617
"${CMAKE_CURRENT_SOURCE_DIR}")

System/magnetic/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (magnetic PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
)
12+
1213
file(RELATIVE_PATH tarDIR
1314
"${CMAKE_BINARY_DIR}"
1415
"${CMAKE_CURRENT_SOURCE_DIR}")

System/mcnpProcess/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (mcnpProcess PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
)
13+
1314
file(RELATIVE_PATH tarDIR
1415
"${CMAKE_BINARY_DIR}"
1516
"${CMAKE_CURRENT_SOURCE_DIR}")

System/md5/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (md5 PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
)
12+
1213
file(RELATIVE_PATH tarDIR
1314
"${CMAKE_BINARY_DIR}"
1415
"${CMAKE_CURRENT_SOURCE_DIR}")

System/modelSupport/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ target_include_directories (modelSupport PUBLIC
2020
${SYSTEM_INCLUDE}
2121
${GENERAL_INCLUDE}
2222
)
23+
2324
file(RELATIVE_PATH tarDIR
2425
"${CMAKE_BINARY_DIR}"
2526
"${CMAKE_CURRENT_SOURCE_DIR}")

System/monte/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ target_include_directories (monte PUBLIC
2121
${SYSTEM_INCLUDE}
2222
${GENERAL_INCLUDE}
2323
)
24+
2425
file(RELATIVE_PATH tarDIR
2526
"${CMAKE_BINARY_DIR}"
2627
"${CMAKE_CURRENT_SOURCE_DIR}")

System/objectMod/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (objectMod PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
)
12+
1213
file(RELATIVE_PATH tarDIR
1314
"${CMAKE_BINARY_DIR}"
1415
"${CMAKE_CURRENT_SOURCE_DIR}")

System/phitsPhysics/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (phitsPhysics PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
)
12+
1213
file(RELATIVE_PATH tarDIR
1314
"${CMAKE_BINARY_DIR}"
1415
"${CMAKE_CURRENT_SOURCE_DIR}")

System/phitsProcess/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (phitsProcess PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
)
12+
1213
file(RELATIVE_PATH tarDIR
1314
"${CMAKE_BINARY_DIR}"
1415
"${CMAKE_CURRENT_SOURCE_DIR}")

System/phitsSupport/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (phitsSupport PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
)
13+
1314
file(RELATIVE_PATH tarDIR
1415
"${CMAKE_BINARY_DIR}"
1516
"${CMAKE_CURRENT_SOURCE_DIR}")

System/phitsTally/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ target_include_directories (phitsTally PUBLIC
1212
${SYSTEM_INCLUDE}
1313
${GENERAL_INCLUDE}
1414
)
15+
1516
file(RELATIVE_PATH tarDIR
1617
"${CMAKE_BINARY_DIR}"
1718
"${CMAKE_CURRENT_SOURCE_DIR}")

System/physics/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ target_include_directories (physics PUBLIC
1515
${SYSTEM_INCLUDE}
1616
${GENERAL_INCLUDE}
1717
)
18+
1819
file(RELATIVE_PATH tarDIR
1920
"${CMAKE_BINARY_DIR}"
2021
"${CMAKE_CURRENT_SOURCE_DIR}")

System/poly/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_include_directories (poly PUBLIC
1010
${SYSTEM_INCLUDE}
1111
${GENERAL_INCLUDE}
1212
)
13+
1314
file(RELATIVE_PATH tarDIR
1415
"${CMAKE_BINARY_DIR}"
1516
"${CMAKE_CURRENT_SOURCE_DIR}")

System/simMC/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_include_directories (simMC PUBLIC
99
${SYSTEM_INCLUDE}
1010
${GENERAL_INCLUDE}
1111
)
12+
1213
file(RELATIVE_PATH tarDIR
1314
"${CMAKE_BINARY_DIR}"
1415
"${CMAKE_CURRENT_SOURCE_DIR}")

System/source/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ target_include_directories (source PUBLIC
1717
${SYSTEM_INCLUDE}
1818
${GENERAL_INCLUDE}
1919
)
20+
2021
file(RELATIVE_PATH tarDIR
2122
"${CMAKE_BINARY_DIR}"
2223
"${CMAKE_CURRENT_SOURCE_DIR}")

0 commit comments

Comments
 (0)