]> granicus.if.org Git - gc/commitdiff
Add cordtest to CMake script and rename cord/cord executable to cord/de
authorIvan Maidanski <ivmai@mail.ru>
Thu, 6 Jun 2019 06:40:06 +0000 (09:40 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 6 Jun 2019 06:40:06 +0000 (09:40 +0300)
Issue #281 (bdwgc).

* cord/CMakeLists.txt (cordtest): Specify add_executable,
set_target_properties, target_link_libraries and add_test.
* cord/CMakeLists.txt [WIN32] (cord): Rename executable to de.

cord/CMakeLists.txt

index 17077370dbaaaa0160185c4b2b21041a5ef2227d..1fb27e969e1a7533d14d5249662aae105e0bf172 100644 (file)
 # modified is included with the above copyright notice.
 ##
 
+# TODO add_library(cord ...)
+
+add_executable(cordtest cordbscs.c cordprnt.c cordxtra.c
+               tests/cordtest.c)
+set_target_properties(cordtest PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL)
+target_link_libraries(cordtest gc-lib)
+add_test(NAME cordtest COMMAND cordtest)
+
 if (WIN32)
-  add_executable(cord cordbscs.c cordxtra.c
+  add_executable(de cordbscs.c cordxtra.c
                  tests/de.c tests/de_win.c)
-  set_target_properties(cord PROPERTIES WIN32_EXECUTABLE TRUE)
-  set_target_properties(cord PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL)
-  target_link_libraries(cord gc-lib)
-  target_link_libraries(cord gdi32)
+  set_target_properties(de PROPERTIES WIN32_EXECUTABLE TRUE)
+  set_target_properties(de PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL)
+  target_link_libraries(de gc-lib)
+  target_link_libraries(de gdi32)
 endif()