CMakeLists.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ################################################################################
  2. # Copyright (C) 2012 HPCC Systems®.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ################################################################################
  16. # Component: unittests
  17. #####################################################
  18. # Description:
  19. # ------------
  20. # Cmake Input File for unittests
  21. #####################################################
  22. if (USE_CPPUNIT)
  23. if (NOT CONTAINERIZED)
  24. ADD_SUBDIRECTORY(configmgr)
  25. endif()
  26. project( unittests )
  27. set ( SRCS
  28. unittests.cpp
  29. remotetests.cpp
  30. dalitests.cpp
  31. jlibtests.cpp
  32. cryptotests.cpp
  33. hqltests.cpp
  34. esdltests.cpp
  35. )
  36. if (NOT CONTAINERIZED)
  37. set ( SRCS
  38. ${SRCS}
  39. configmgr/ConfigMgrUnitTests.cpp
  40. configmgr/ConfigMgrTemplateTests.cpp
  41. configmgr/ConfigMgrHPCCTests.cpp
  42. )
  43. endif ()
  44. include_directories (
  45. .
  46. ./../../system/include
  47. ./../../system/jlib
  48. ./../../system/mp
  49. ./../../system/libbase58
  50. ./../../fs/dafsclient
  51. ./../../common/thorhelper
  52. ./../../dali/base
  53. ./../../system/security/shared
  54. ./../../common/deftype
  55. ./../../system/security/cryptohelper
  56. ./../../configuration/configmgr/configmgrlib
  57. ${HPCC_SOURCE_DIR}/system/xmllib
  58. ${HPCC_SOURCE_DIR}/ecl/hql
  59. ${HPCC_SOURCE_DIR}/configuration/configmgr/RapidJSON/include
  60. ${HPCC_SOURCE_DIR}/esp/bindings
  61. ${HPCC_SOURCE_DIR}/esp/esdllib
  62. ${HPCC_SOURCE_DIR}/esp/platform
  63. ${HPCC_SOURCE_DIR}/esp/services/common
  64. ${CMAKE_BINARY_DIR}/generated
  65. ${CMAKE_BINARY_DIR}
  66. ${CMAKE_BINARY_DIR}/oss
  67. )
  68. ADD_DEFINITIONS( -D_CONSOLE )
  69. HPCC_ADD_EXECUTABLE ( unittests ${SRCS} )
  70. install ( TARGETS unittests RUNTIME DESTINATION ${EXEC_DIR} )
  71. target_link_libraries ( unittests
  72. jlib
  73. dafsclient
  74. dalibase
  75. deftype
  76. libbase58
  77. thorhelper
  78. esphttp
  79. esdllib
  80. ${CPPUNIT_LIBRARIES}
  81. )
  82. if (NOT CONTAINERIZED)
  83. target_link_libraries ( unittests configmgr )
  84. endif ()
  85. endif ()