File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -372,8 +372,10 @@ endif()
372
372
373
373
set_target_properties (yang PROPERTIES VERSION ${LIBYANG_SOVERSION_FULL} SOVERSION ${LIBYANG_SOVERSION} )
374
374
375
- # link math
376
- target_link_libraries (yang m)
375
+ if (NOT WIN32 )
376
+ # link math
377
+ target_link_libraries (yang m)
378
+ endif ()
377
379
378
380
# find pthreads
379
381
set (CMAKE_THREAD_PREFER_PTHREAD TRUE )
Original file line number Diff line number Diff line change @@ -17,7 +17,10 @@ function(ly_add_utest)
17
17
18
18
# Set common attributes of all tests
19
19
set_target_properties (${TEST_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /tests" )
20
- target_link_libraries (${TEST_NAME} ${CMOCKA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${PCRE2_LIBRARIES} ${CMAKE_DL_LIBS} m)
20
+ target_link_libraries (${TEST_NAME} ${CMOCKA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${PCRE2_LIBRARIES} ${CMAKE_DL_LIBS} )
21
+ if (NOT WIN32 )
22
+ target_link_libraries (${TEST_NAME} m)
23
+ endif ()
21
24
if (NOT APPLE )
22
25
if (ADDTEST_WRAP)
23
26
set_target_properties (${TEST_NAME} PROPERTIES LINK_FLAGS "${ADDTEST_WRAP} " )
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ set(format_sources
5
5
6
6
add_executable (ly_perf ${CMAKE_CURRENT_SOURCE_DIR} /perf.c $<TARGET_OBJECTS:yangobj>)
7
7
set_target_properties (ly_perf PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /tests" )
8
- target_link_libraries (ly_perf ${CMAKE_THREAD_LIBS_INIT} ${PCRE2_LIBRARIES} ${CMAKE_DL_LIBS} m)
8
+ target_link_libraries (ly_perf ${CMAKE_THREAD_LIBS_INIT} ${PCRE2_LIBRARIES} ${CMAKE_DL_LIBS} )
9
+ if (NOT WIN32 )
10
+ target_link_libraries (ly_perf m)
11
+ endif ()
9
12
10
13
add_test (NAME ly_perf_1000 COMMAND ly_perf 1000 10)
11
14
add_test (NAME ly_perf_100000 COMMAND ly_perf 100000 3)
You can’t perform that action at this time.
0 commit comments