Skip to content

Commit 9dcd245

Browse files
committed
cmakelist needed patch so it could build on mac and windows for mips
1 parent 26d561f commit 9dcd245

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

arch/mips/CMakeLists.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,21 @@ if(BN_INTERNAL_BUILD)
4747
RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR})
4848
endif()
4949

50-
add_executable(mipstest mips/mips.c mips/test.c)
51-
target_link_libraries(mipstest PRIVATE arch_mips)
50+
if (DEFINED FORCE_TEST)
51+
52+
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
53+
add_executable(mipstest mips/mips.c mips/test.c)
54+
55+
target_compile_definitions(mipstest PRIVATE FORCE_TEST=1)
56+
57+
set_target_properties(mipstest PROPERTIES
58+
CXX_STANDARD 17
59+
CXX_VISIBILITY_PRESET hidden
60+
CXX_STANDARD_REQUIRED ON
61+
VISIBILITY_INLINES_HIDDEN ON
62+
POSITION_INDEPENDENT_CODE ON)
63+
64+
target_link_libraries(mipstest PRIVATE arch_mips)
65+
endif()
66+
endif()
67+

0 commit comments

Comments
 (0)