You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- # Initialize ######################################################################################
-
- Include ( cotire OPTIONAL RESULT_VARIABLE HAS_COTIRE )
- Include ( pedantic OPTIONAL RESULT_VARIABLE HAS_PEDANTIC )
- Include ( cmake_tests OPTIONAL RESULT_VARIABLE HAS_CMAKE_TESTS )
-
- # Test ############################################################################################
-
- Find_Package ( GTest )
- If ( NOT "${GTest_FOUND}" )
- Return ( )
- EndIf ( )
-
- File ( GLOB_RECURSE CPPAMQP_TEST_HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h )
- File ( GLOB_RECURSE CPPAMQP_TEST_INLINE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.inl )
- File ( GLOB_RECURSE CPPAMQP_TEST_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp )
-
- Add_Executable ( cppamqp-test
- EXCLUDE_FROM_ALL
- ${CPPAMQP_TEST_HEADER_FILES}
- ${CPPAMQP_TEST_INLINE_FILES}
- ${CPPAMQP_TEST_SOURCE_FILES} )
- Target_Link_Libraries ( cppamqp-test
- PUBLIC
- cppamqp-objects
- GMock::Main )
-
- # pedantic
- If ( HAS_PEDANTIC )
- Pedantic_Apply_Flags_Target ( cppamqp-test ALL )
- EndIf ( )
-
- # optimization
- If ( HAS_COTIRE )
- Cotire ( cppamqp-test )
- EndIf ( )
-
- # test
- If ( HAS_CMAKE_TESTS )
- Add_CMake_Test ( NAME cppamqp TARGET cppamqp-test )
- Else ( )
- Add_Test ( NAME cppamqp COMMAND cppamqp-test )
- EndIf ( )
|