diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-12-20 08:35:51 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-12-20 08:35:51 +0100 |
commit | ffa313e80a27005405334db6491075442f6e1abd (patch) | |
tree | 23a48c91cfc0810afe88cc6104d0667516fbd4a9 /test/CMakeLists.txt | |
parent | af416f81b14a3bee682e300b165a6efdb9739d54 (diff) | |
download | ble-toys-master.tar.gz ble-toys-master.tar.bz2 ble-toys-master.tar.xz ble-toys-master.zip |
o Using more natural byte ordering in the code. No external effect.
o Using global ==, != and < operators instead of in-class operators for
better compatibility with STL.
ByteBuffer:
o Renaming setPosition() to setCursor().
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4671329..86f2b1b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,11 @@ find_package(Boost COMPONENTS log regex unit_test_framework REQUIRED QUIET) +find_header_and_lib(LOG4CPLUS log4cplus/logger.h log4cplus REQUIRED QUIET) # If we can change directory here add_definition and test-specific stuff could be moved to the test directory -file(GLOB TEST_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *Test.cpp) +set(TEST_SRCS + ByteBufferTest.cpp + MacTest.cpp + UuidTest.cpp) add_definitions(-DBOOST_TEST_DYN_LINK) foreach(testSrc ${TEST_SRCS}) @@ -11,14 +15,19 @@ foreach(testSrc ${TEST_SRCS}) #Add compile target add_executable(${testName} ${testSrc}) - include_directories("${PROJECT_SOURCE_DIR}/ble") - include_directories("${PROJECT_SOURCE_DIR}/include") + target_include_directories(${testName} PUBLIC "${PROJECT_SOURCE_DIR}/ble") + target_include_directories(${testName} PUBLIC "${PROJECT_SOURCE_DIR}/include") + add_dependencies(${testName} ble) target_link_libraries(${testName} ble) + target_link_libraries(${testName} bluetooth) + + target_include_directories(${testName} PUBLIC "${PROJECT_SOURCE_DIR}/apps") + target_link_libraries(${testName} pthread) target_link_libraries(${testName} ${Boost_LIBRARIES}) - - include_directories("${PROJECT_SOURCE_DIR}/apps") + target_include_directories(${testName} PUBLIC "${LOG4CPLUS_INCLUDE_DIRECTORY}") + target_link_libraries(${testName} "${LOG4CPLUS_LIBRARY}") #I like to move testing binaries into a testBin directory set_target_properties(${testName} PROPERTIES |