@@ -513,45 +513,45 @@ function(cc_test TARGET_NAME)
513
513
set (multiValueArgs SRCS DEPS ARGS)
514
514
cmake_parse_arguments (cc_test "${options} " "${oneValueArgs} "
515
515
"${multiValueArgs} " ${ARGN} )
516
- if (WIN32 )
517
- # NOTE(zhiqiu): on windows platform, the symbols should be exported
518
- # explicitly by __declspec(dllexport), however, there are several
519
- # symbols not exported, and link error occurs.
520
- # so, the tests are not built against dynamic libraries now.
521
- cc_test_old(
522
- ${TARGET_NAME}
523
- SRCS
524
- ${cc_test_SRCS}
525
- DEPS
526
- ${cc_test_DEPS}
527
- ARGS
528
- ${cc_test_ARGS} )
529
- else ()
530
- list (LENGTH cc_test_SRCS len)
531
- # message("cc_test_SRCS ${cc_test_SRCS}")
532
- # message("cc_test_ARGS ${cc_test_ARGS}")
533
-
534
- if (${len} GREATER 1)
535
- message (
536
- SEND_ERROR
537
- "The number source file of cc_test should be 1, but got ${len} , the source files are: ${cc_test_SRCS} "
538
- )
539
- endif ()
516
+ # if(WIN32)
517
+ # # NOTE(zhiqiu): on windows platform, the symbols should be exported
518
+ # # explicitly by __declspec(dllexport), however, there are several
519
+ # # symbols not exported, and link error occurs.
520
+ # # so, the tests are not built against dynamic libraries now.
521
+ # cc_test_old(
522
+ # ${TARGET_NAME}
523
+ # SRCS
524
+ # ${cc_test_SRCS}
525
+ # DEPS
526
+ # ${cc_test_DEPS}
527
+ # ARGS
528
+ # ${cc_test_ARGS})
529
+ # else()
530
+ list (LENGTH cc_test_SRCS len)
531
+ # message("cc_test_SRCS ${cc_test_SRCS}")
532
+ # message("cc_test_ARGS ${cc_test_ARGS}")
533
+
534
+ if (${len} GREATER 1)
535
+ message (
536
+ SEND_ERROR
537
+ "The number source file of cc_test should be 1, but got ${len} , the source files are: ${cc_test_SRCS} "
538
+ )
539
+ endif ()
540
540
541
- list (LENGTH cc_test_ARGS len_arg)
542
- if (len_arg GREATER_EQUAL 1)
543
- set_property (GLOBAL PROPERTY "${TARGET_NAME} _ARGS" "${cc_test_ARGS} " )
544
- #message("${TARGET_NAME}_ARGS arg ${arg}")
545
- endif ()
541
+ list (LENGTH cc_test_ARGS len_arg)
542
+ if (len_arg GREATER_EQUAL 1)
543
+ set_property (GLOBAL PROPERTY "${TARGET_NAME} _ARGS" "${cc_test_ARGS} " )
544
+ #message("${TARGET_NAME}_ARGS arg ${arg}")
545
+ endif ()
546
546
547
- get_property (test_srcs GLOBAL PROPERTY TEST_SRCS)
548
- set (test_srcs ${test_srcs} "${CMAKE_CURRENT_SOURCE_DIR} /${cc_test_SRCS} " )
549
- set_property (GLOBAL PROPERTY TEST_SRCS "${test_srcs} " )
547
+ get_property (test_srcs GLOBAL PROPERTY TEST_SRCS)
548
+ set (test_srcs ${test_srcs} "${CMAKE_CURRENT_SOURCE_DIR} /${cc_test_SRCS} " )
549
+ set_property (GLOBAL PROPERTY TEST_SRCS "${test_srcs} " )
550
550
551
- get_property (test_names GLOBAL PROPERTY TEST_NAMES)
552
- set (test_names ${test_names} ${TARGET_NAME} )
553
- set_property (GLOBAL PROPERTY TEST_NAMES "${test_names} " )
554
- endif ()
551
+ get_property (test_names GLOBAL PROPERTY TEST_NAMES)
552
+ set (test_names ${test_names} ${TARGET_NAME} )
553
+ set_property (GLOBAL PROPERTY TEST_NAMES "${test_names} " )
554
+ # endif()
555
555
endif ()
556
556
endfunction ()
557
557
0 commit comments