Skip to content

Commit db12459

Browse files
authored
Update CMakeLists.txt
1 parent f9d8659 commit db12459

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

unittests/CppInterOp/CMakeLists.txt

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@ set(LLVM_LINK_COMPONENTS
33
)
44

55
if(EMSCRIPTEN)
6-
set(INCLUDE_CUDA_TEST "")
7-
set(INCLUDE_MAIN_CCP "main.cpp")
8-
else()
9-
set(INCLUDE_CUDA_TEST "CUDATest.cpp")
10-
set(INCLUDE_MAIN_CPP "")
11-
endif()
12-
136
add_cppinterop_unittest(CppInterOpTests
14-
${INCLUDE_CUDA_TEST}
157
EnumReflectionTest.cpp
168
FunctionReflectionTest.cpp
179
InterpreterTest.cpp
@@ -20,8 +12,23 @@ add_cppinterop_unittest(CppInterOpTests
2012
TypeReflectionTest.cpp
2113
Utils.cpp
2214
VariableReflectionTest.cpp
23-
${INCLUDE_MAIN_CPP}
15+
main.cpp
16+
)
17+
else()
18+
add_cppinterop_unittest(CppInterOpTests
19+
CUDATest.cpp
20+
EnumReflectionTest.cpp
21+
FunctionReflectionTest.cpp
22+
InterpreterTest.cpp
23+
JitTest.cpp
24+
ScopeReflectionTest.cpp
25+
TypeReflectionTest.cpp
26+
Utils.cpp
27+
VariableReflectionTest.cpp
2428
)
29+
endif()
30+
31+
2532

2633
if(EMSCRIPTEN)
2734
set_target_properties(CppInterOpTests PROPERTIES
@@ -59,7 +66,12 @@ export_executable_symbols(CppInterOpTests)
5966

6067
unset(LLVM_LINK_COMPONENTS)
6168

62-
add_cppinterop_unittest(DynamicLibraryManagerTests DynamicLibraryManagerTest.cpp ${INCLUDE_MAIN_CPP})
69+
if(EMSCRIPTEN)
70+
add_cppinterop_unittest(DynamicLibraryManagerTests DynamicLibraryManagerTest.cpp main.cpp)
71+
else()
72+
add_cppinterop_unittest(DynamicLibraryManagerTests DynamicLibraryManagerTest.cpp)
73+
endif()
74+
6375
target_link_libraries(DynamicLibraryManagerTests
6476
PRIVATE
6577
clangCppInterOp

0 commit comments

Comments
 (0)