Skip to content

Commit 74746df

Browse files
committed
clang in ubuntuClangpipeline
1 parent 566994c commit 74746df

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

.github/workflows/testUbuntuClang.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ jobs:
2323
wget https://apt.llvm.org/llvm.sh
2424
chmod u+x llvm.sh
2525
sudo ./llvm.sh 17
26+
sudo apt-get install --yes libomp-17-dev
2627
2728
- name: Configure CMake
28-
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DRAYX_ENABLE_CUDA=OFF -DCMAKE_CXX_COMPILER=clang++
29-
29+
run: |
30+
CC="clang-17" CXX="clang++-17 -Werror" cmake -B ${{github.workspace}}/build \
31+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
32+
-DRAYX_ENABLE_CUDA=OFF \
33+
-DCMAKE_CXX_FLAGS="-fopenmp -Werror" \
34+
-DCMAKE_EXE_LINKER_FLAGS="-L/usr/lib/llvm-17/lib -lomp"
35+
3036
- name: Build
31-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
37+
run: CXX="clang++-17 -Werror" cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
3238

3339
- name: Run
3440
working-directory: ${{github.workspace}}

Intern/rayx-core/src/Core.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#else
3434
#define RAYX_API
3535
#endif
36-
#pragma warning Unknown dynamic link import / export semantics.
3736
#endif
3837

3938
// make string comparison available for msvc compiler

Intern/rayx-core/src/Tracer/DeviceConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct RAYX_API DeviceConfig {
4949
std::vector<Device> devices;
5050

5151
private:
52-
const DeviceType m_fetchedDeviceType;
52+
DeviceType m_fetchedDeviceType;
5353
};
5454

5555
} // namespace RAYX

Intern/rayx-ui/src/RayProcessing.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,11 @@ std::vector<Line> getRays(const RAYX::BundleHistory& rayCache, const RAYX::Beaml
7272
amountOfRays = (uint32_t)std::min(amountOfRays, uint32_t(rayCache.size()));
7373
std::vector<size_t> rayIndices = filterFunction(rayCache, amountOfRays);
7474
size_t maxRayIndex = rayCache.size();
75-
int counter = 0;
7675

7776
// compile all elements
7877
std::vector<RAYX::Element> compiledElements;
7978
for (const auto& element : beamline.m_DesignElements) {
8079
compiledElements.push_back(element.compile());
81-
counter++;
8280
}
8381

8482
for (size_t i : rayIndices) {

Intern/rayx-ui/src/UserInterface/BeamlineDesignHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void BeamlineDesignHandler::createInputField(const std::string& key, RAYX::Desig
151151
}
152152

153153
if (ImGui::BeginCombo("##combo", currentItem >= 0 ? RAYX::ElementStringMap[currentEl].c_str() : "")) {
154-
int n = 0;
154+
[[maybe_unused]] int n = 0;
155155
for (const auto& pair : RAYX::ElementStringMap) {
156156
bool isSelected = (currentEl == pair.first);
157157
if (ImGui::Selectable(pair.second.c_str(), isSelected)) {

0 commit comments

Comments
 (0)