Skip to content

Commit 5d23bc2

Browse files
committed
Test (hardcoded path to library for Linux)
1 parent 672aa7b commit 5d23bc2

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ macro(xeus_cpp_create_target target_name linkage output_name)
314314
set(XEUS_CPP_XEUS_TARGET xeus-static)
315315
endif ()
316316

317-
target_link_libraries(${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse xtl OpenMP::OpenMP_CXX)
317+
target_link_libraries(${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse xtl)
318318

319319
if (WIN32 OR CYGWIN)
320320
#

test/test_xcpp_kernel.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,22 @@ class XCppTests(jupyter_kernel_test.KernelTests):
135135
#include <omp.h>
136136
#include <iostream>
137137
#include <clang/Interpreter/CppInterOp.h>
138-
Cpp::LoadLibrary("libomp");
138+
bool library_loaded=Cpp::LoadLibrary("/home/runner/micromamba/envs/xeus-cpp/libomp.so");
139+
if(library_loaded) {
139140
int max_threads = omp_get_max_threads();
140141
omp_set_thread_num(max_threads);
141142
#pragma omp parallel
142143
{
143144
if(omp_get_thread_num()==2) {
144145
std::cerr<<omp_get_thread_num()<<std::endl;
145146
}
146-
}"""
147+
}
148+
}
149+
else
150+
{
151+
std::cerr<<"OpenMP library not loaded"<<std::endl;
152+
}
153+
"""
147154
def test_xcpp_omp(self):
148155
self.flush_channels()
149156
reply, output_msgs = self.execute_helper(code=self.code_omp,timeout=1)

0 commit comments

Comments
 (0)