CMakeLists.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. ##########################################################
  2. # Basic
  3. ##########################################################
  4. cmake_minimum_required(VERSION 3.17)
  5. project(ls_std VERSION 2022.1.0)
  6. set(MODULE_NAME_BOXING ls_std_boxing)
  7. set(MODULE_NAME_CORE ls_std_core)
  8. set(MODULE_NAME_EVENT ls_std_event)
  9. set(MODULE_NAME_IO ls_std_io)
  10. set(MODULE_NAME_LOGIC ls_std_logic)
  11. set(MODULE_NAME_TIME ls_std_time)
  12. ##########################################################
  13. # Options
  14. ##########################################################
  15. option(LS_STD_BUILD_WITH_TESTS "Build project with tests..." OFF)
  16. option(LS_STD_BUILD_STATIC "Build ls_std static library..." ON)
  17. option(LS_STD_BUILD_SHARED "Build ls_std shared library..." OFF)
  18. option(LS_STD_BUILD_MODULE "Build ls_std module library..." OFF)
  19. ##########################################################
  20. # Compiler Settings
  21. ##########################################################
  22. message("${PROJECT_NAME}: Setting compiler flags...")
  23. set(CMAKE_CXX_STANDARD 11)
  24. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  25. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
  26. ######################################################
  27. # Include Directories
  28. ######################################################
  29. message("${PROJECT_NAME}: Adding include directories...")
  30. if (${LS_STD_BUILD_WITH_TESTS})
  31. include_directories(${CMAKE_CURRENT_SOURCE_DIR}/test)
  32. include_directories(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1/googletest/include)
  33. include_directories(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1/googlemock/include)
  34. endif ()
  35. include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
  36. ######################################################
  37. # Add Other CMake Dependencies
  38. ######################################################
  39. message("${PROJECT_NAME}: Adding additional cmake dependencies...")
  40. if (${LS_STD_BUILD_WITH_TESTS})
  41. add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1)
  42. endif ()
  43. ##########################################################
  44. # Source Files
  45. ##########################################################
  46. set(SOURCE_FILES_BOXING
  47. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Boolean.cpp
  48. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Double.cpp
  49. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Float.cpp
  50. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Integer.cpp
  51. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Long.cpp
  52. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/String.cpp)
  53. set(SOURCE_FILES_CORE
  54. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/core/Class.cpp
  55. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/core/Version.cpp)
  56. set(SOURCE_FILES_EVENT
  57. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/serialization/SerializableJsonEvent.cpp
  58. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/Event.cpp
  59. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/EventHandler.cpp
  60. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/EventManager.cpp
  61. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/Narrator.cpp)
  62. set(SOURCE_FILES_IO
  63. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KvDocument.cpp
  64. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KvFileReader.cpp
  65. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KvPair.cpp
  66. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KvParser.cpp
  67. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/logging/Logger.cpp
  68. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/logging/LogLevel.cpp
  69. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlAttribute.cpp
  70. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlDeclaration.cpp
  71. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlDocument.cpp
  72. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlNode.cpp
  73. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlParser.cpp
  74. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlReader.cpp
  75. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/File.cpp
  76. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileOutputStream.cpp
  77. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileReader.cpp
  78. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileWriter.cpp
  79. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/StandardOutputWriter.cpp
  80. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/StorableFile.cpp)
  81. set(SOURCE_FILES_LOGIC
  82. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/serialization/SerializableJsonState.cpp
  83. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/serialization/SerializableJsonStateConnection.cpp
  84. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/serialization/SerializableJsonStateMachine.cpp
  85. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/State.cpp
  86. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/StateConnection.cpp
  87. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/StateMachine.cpp)
  88. set(SOURCE_FILES_TIME
  89. ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/time/Date.cpp)
  90. if (${LS_STD_BUILD_WITH_TESTS})
  91. set(TEST_FILES_BOXING
  92. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/boxing/BooleanTest.cpp
  93. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/boxing/DoubleTest.cpp
  94. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/boxing/FloatTest.cpp
  95. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/boxing/IntegerTest.cpp
  96. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/boxing/LongTest.cpp
  97. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/boxing/StringTest.cpp)
  98. set(TEST_FILES_CORE
  99. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/EventNotHandledExceptionTest.cpp
  100. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/EventNotSubscribedExceptionTest.cpp
  101. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/FileNotFoundExceptionTest.cpp
  102. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/FileOperationExceptionTest.cpp
  103. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/IllegalArgumentExceptionTest.cpp
  104. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/IllegalArithmeticOperationExceptionTest.cpp
  105. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/IncompleteJsonExceptionTest.cpp
  106. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/NullPointerExceptionTest.cpp
  107. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/utils/RegexUtilsTest.cpp
  108. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/utils/STLUtilsTest.cpp
  109. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/ClassTest.cpp
  110. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/LibraryVersionTest.cpp
  111. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/VersionTest.cpp)
  112. set(TEST_FILES_EVENT
  113. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/serialization/SerializableJsonEventTest.cpp
  114. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/EventHandlerTest.cpp
  115. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/EventManagerTest.cpp
  116. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/EventTest.cpp
  117. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/NarratorTest.cpp
  118. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/Colour.cpp
  119. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/DailyNewsAgency.cpp
  120. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/GossipNewsAgency.cpp
  121. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/GossipNewsEvent.cpp
  122. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/NewsAgency.cpp
  123. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/SeriousNewsEvent.cpp
  124. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/TestDataCar.cpp
  125. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/TestDataMercedesCar.cpp)
  126. set(TEST_FILES_IO
  127. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KvDocumentTest.cpp
  128. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KvFileReaderTest.cpp
  129. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KvPairTest.cpp
  130. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KvParserTest.cpp
  131. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/logging/LoggerTest.cpp
  132. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/logging/LogLevelTest.cpp
  133. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlAttributeTest.cpp
  134. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlDeclarationTest.cpp
  135. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlDocumentTest.cpp
  136. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlNodeTest.cpp
  137. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlParserTest.cpp
  138. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlParserTestWrapperTest.cpp
  139. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlReaderTest.cpp
  140. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/FileOutputStreamTest.cpp
  141. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/FileReaderTest.cpp
  142. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/FileTest.cpp
  143. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/FileWriterTest.cpp
  144. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/StandardOutputWriterTest.cpp
  145. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/StorableFileTest.cpp
  146. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/io/xml/TestDataFactory.cpp
  147. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/io/xml/XmlParserTestWrapper.cpp)
  148. set(TEST_FILES_LOGIC
  149. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/logic/serialization/SerializableJsonStateConnectionTest.cpp
  150. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/logic/serialization/SerializableJsonStateMachineTest.cpp
  151. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/logic/serialization/SerializableJsonStateTest.cpp
  152. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/logic/StateConnectionTest.cpp
  153. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/logic/StateMachineTest.cpp
  154. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/logic/StateTest.cpp
  155. ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/logic/TestDataFactory.cpp)
  156. set(TEST_FILES_SERIALIZATION
  157. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/serialization/JsonTest.cpp)
  158. set(TEST_FILES_TIME
  159. ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/time/DateTest.cpp)
  160. endif ()
  161. ##########################################################
  162. # Build Tests (boxing)
  163. ##########################################################
  164. if (${LS_STD_BUILD_WITH_TESTS})
  165. message("${MODULE_NAME_BOXING}: Building tests...")
  166. add_executable(${MODULE_NAME_BOXING}_test ${TEST_FILES_BOXING})
  167. endif ()
  168. ##########################################################
  169. # Build Tests (core)
  170. ##########################################################
  171. if (${LS_STD_BUILD_WITH_TESTS})
  172. message("${MODULE_NAME_CORE}: Building tests...")
  173. add_executable(${MODULE_NAME_CORE}_test ${TEST_FILES_CORE})
  174. endif ()
  175. ##########################################################
  176. # Build Tests (event)
  177. ##########################################################
  178. if (${LS_STD_BUILD_WITH_TESTS})
  179. message("${MODULE_NAME_EVENT}: Building tests...")
  180. add_executable(${MODULE_NAME_EVENT}_test ${TEST_FILES_EVENT})
  181. endif ()
  182. ##########################################################
  183. # Build Tests (io)
  184. ##########################################################
  185. if (${LS_STD_BUILD_WITH_TESTS})
  186. message("${MODULE_NAME_IO}: Building tests...")
  187. add_executable(${MODULE_NAME_IO}_test ${TEST_FILES_IO})
  188. endif ()
  189. ##########################################################
  190. # Build Tests (logic)
  191. ##########################################################
  192. if (${LS_STD_BUILD_WITH_TESTS})
  193. message("${MODULE_NAME_LOGIC}: Building tests...")
  194. add_executable(${MODULE_NAME_LOGIC}_test ${TEST_FILES_LOGIC})
  195. endif ()
  196. ##########################################################
  197. # Build Tests (time)
  198. ##########################################################
  199. if (${LS_STD_BUILD_WITH_TESTS})
  200. message("${MODULE_NAME_TIME}: Building tests...")
  201. add_executable(${MODULE_NAME_TIME}_test ${TEST_FILES_TIME})
  202. endif ()
  203. ##########################################################
  204. # Build Tests
  205. ##########################################################
  206. if (${LS_STD_BUILD_WITH_TESTS})
  207. message("${PROJECT_NAME}: Building tests...")
  208. add_executable(${PROJECT_NAME}_test
  209. ${TEST_FILES_BOXING}
  210. ${TEST_FILES_CORE}
  211. ${TEST_FILES_EVENT}
  212. ${TEST_FILES_IO}
  213. ${TEST_FILES_LOGIC}
  214. ${TEST_FILES_SERIALIZATION}
  215. ${TEST_FILES_TIME})
  216. endif ()
  217. ##########################################################
  218. # Build Library (boxing)
  219. ##########################################################
  220. message("${PROJECT_NAME}: Building ${MODULE_NAME_BOXING} library version ${PROJECT_VERSION}...")
  221. if (${LS_STD_BUILD_STATIC})
  222. add_library("${MODULE_NAME_BOXING}" STATIC ${SOURCE_FILES_BOXING})
  223. set_target_properties("${MODULE_NAME_BOXING}" PROPERTIES DEBUG_POSTFIX "_d")
  224. endif ()
  225. if (${LS_STD_BUILD_SHARED})
  226. add_library("${MODULE_NAME_BOXING}" SHARED ${SOURCE_FILES_BOXING})
  227. set_target_properties("${MODULE_NAME_BOXING}" PROPERTIES DEBUG_POSTFIX "_d")
  228. endif ()
  229. if (${LS_STD_BUILD_MODULE})
  230. add_library("${MODULE_NAME_BOXING}" MODULE ${SOURCE_FILES_BOXING})
  231. set_target_properties("${MODULE_NAME_BOXING}" PROPERTIES DEBUG_POSTFIX "_d")
  232. endif ()
  233. ##########################################################
  234. # Build Library (core)
  235. ##########################################################
  236. message("${PROJECT_NAME}: Building ${MODULE_NAME_CORE} library version ${PROJECT_VERSION}...")
  237. if (${LS_STD_BUILD_STATIC})
  238. add_library("${MODULE_NAME_CORE}" STATIC ${SOURCE_FILES_CORE})
  239. set_target_properties("${MODULE_NAME_CORE}" PROPERTIES DEBUG_POSTFIX "_d")
  240. endif ()
  241. ##########################################################
  242. # Build Library (event)
  243. ##########################################################
  244. message("${PROJECT_NAME}: Building ${MODULE_NAME_EVENT} library version ${PROJECT_VERSION}...")
  245. if (${LS_STD_BUILD_STATIC})
  246. add_library("${MODULE_NAME_EVENT}" STATIC ${SOURCE_FILES_EVENT})
  247. set_target_properties("${MODULE_NAME_EVENT}" PROPERTIES DEBUG_POSTFIX "_d")
  248. endif ()
  249. ##########################################################
  250. # Build Library (io)
  251. ##########################################################
  252. message("${PROJECT_NAME}: Building ${MODULE_NAME_IO} library version ${PROJECT_VERSION}...")
  253. if (${LS_STD_BUILD_STATIC})
  254. add_library("${MODULE_NAME_IO}" STATIC ${SOURCE_FILES_IO})
  255. set_target_properties("${MODULE_NAME_IO}" PROPERTIES DEBUG_POSTFIX "_d")
  256. endif ()
  257. ##########################################################
  258. # Build Library (logic)
  259. ##########################################################
  260. message("${PROJECT_NAME}: Building ${MODULE_NAME_LOGIC} library version ${PROJECT_VERSION}...")
  261. if (${LS_STD_BUILD_STATIC})
  262. add_library("${MODULE_NAME_LOGIC}" STATIC ${SOURCE_FILES_LOGIC})
  263. set_target_properties("${MODULE_NAME_LOGIC}" PROPERTIES DEBUG_POSTFIX "_d")
  264. endif ()
  265. ##########################################################
  266. # Build Library (time)
  267. ##########################################################
  268. message("${PROJECT_NAME}: Building ${MODULE_NAME_TIME} library version ${PROJECT_VERSION}...")
  269. if (${LS_STD_BUILD_STATIC})
  270. add_library("${MODULE_NAME_TIME}" STATIC ${SOURCE_FILES_TIME})
  271. set_target_properties("${MODULE_NAME_TIME}" PROPERTIES DEBUG_POSTFIX "_d")
  272. endif ()
  273. ##########################################################
  274. # Linking (boxing)
  275. ##########################################################
  276. if (${LS_STD_BUILD_WITH_TESTS})
  277. message("${MODULE_NAME_BOXING}: Linking libraries for test application...")
  278. target_link_libraries(${MODULE_NAME_BOXING}_test
  279. gtest
  280. gmock
  281. gtest_main
  282. "${MODULE_NAME_BOXING}"
  283. "${MODULE_NAME_CORE}")
  284. endif ()
  285. ##########################################################
  286. # Linking (core)
  287. ##########################################################
  288. if (${LS_STD_BUILD_WITH_TESTS})
  289. message("${MODULE_NAME_CORE}: Linking libraries for test application...")
  290. target_link_libraries(${MODULE_NAME_CORE}_test
  291. gtest
  292. gmock
  293. gtest_main
  294. "${MODULE_NAME_CORE}")
  295. endif ()
  296. ##########################################################
  297. # Linking (event)
  298. ##########################################################
  299. if (${LS_STD_BUILD_WITH_TESTS})
  300. message("${MODULE_NAME_EVENT}: Linking libraries for test application...")
  301. target_link_libraries(${MODULE_NAME_EVENT}_test
  302. gtest
  303. gmock
  304. gtest_main
  305. "${MODULE_NAME_EVENT}"
  306. "${MODULE_NAME_CORE}")
  307. endif ()
  308. ##########################################################
  309. # Linking (io)
  310. ##########################################################
  311. if (${LS_STD_BUILD_WITH_TESTS})
  312. message("${MODULE_NAME_IO}: Linking libraries for test application...")
  313. target_link_libraries(${MODULE_NAME_IO}_test
  314. gtest
  315. gmock
  316. gtest_main
  317. "${MODULE_NAME_IO}"
  318. "${MODULE_NAME_CORE}")
  319. endif ()
  320. ##########################################################
  321. # Linking (logic)
  322. ##########################################################
  323. if (${LS_STD_BUILD_WITH_TESTS})
  324. message("${MODULE_NAME_LOGIC}: Linking libraries for test application...")
  325. target_link_libraries(${MODULE_NAME_LOGIC}_test
  326. gtest
  327. gmock
  328. gtest_main
  329. "${MODULE_NAME_LOGIC}"
  330. "${MODULE_NAME_CORE}")
  331. endif ()
  332. ##########################################################
  333. # Linking (time)
  334. ##########################################################
  335. if (${LS_STD_BUILD_WITH_TESTS})
  336. message("${MODULE_NAME_TIME}: Linking libraries for test application...")
  337. target_link_libraries(${MODULE_NAME_TIME}_test
  338. gtest
  339. gmock
  340. gtest_main
  341. "${MODULE_NAME_TIME}"
  342. "${MODULE_NAME_CORE}")
  343. endif ()
  344. ##########################################################
  345. # Linking
  346. ##########################################################
  347. if (${LS_STD_BUILD_WITH_TESTS})
  348. message("${PROJECT_NAME}: Linking libraries for test application...")
  349. target_link_libraries(${PROJECT_NAME}_test
  350. gtest
  351. gmock
  352. gtest_main
  353. "${MODULE_NAME_CORE}"
  354. "${MODULE_NAME_BOXING}"
  355. "${MODULE_NAME_EVENT}"
  356. "${MODULE_NAME_IO}"
  357. "${MODULE_NAME_LOGIC}"
  358. "${MODULE_NAME_TIME}")
  359. endif ()