CMake: used link_libraries() instead of target_link_libraries()

This commit is contained in:
Benoit Blanchon
2020-05-03 10:25:38 +02:00
parent 3b923b6e4e
commit dcf7eeef28
17 changed files with 4 additions and 84 deletions

View File

@ -4,6 +4,8 @@
add_subdirectory(catch)
link_libraries(ArduinoJson catch)
include_directories(Helpers)
add_subdirectory(ElementProxy)
add_subdirectory(IntegrationTests)

View File

@ -11,9 +11,4 @@ add_executable(ElementProxyTests
size.cpp
)
target_link_libraries(ElementProxyTests
ArduinoJson
catch
)
add_test(ElementProxy ElementProxyTests)

View File

@ -16,9 +16,4 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
)
endif()
target_link_libraries(IntegrationTests
ArduinoJson
catch
)
add_test(IntegrationTests IntegrationTests)

View File

@ -19,9 +19,4 @@ add_executable(JsonArrayTests
undefined.cpp
)
target_link_libraries(JsonArrayTests
ArduinoJson
catch
)
add_test(JsonArray JsonArrayTests)

View File

@ -18,11 +18,6 @@ add_executable(JsonDeserializerTests
string.cpp
)
target_link_libraries(JsonDeserializerTests
ArduinoJson
catch
)
set_target_properties(JsonDeserializerTests PROPERTIES UNITY_BUILD OFF)
add_test(JsonDeserializer JsonDeserializerTests)

View File

@ -18,9 +18,4 @@ add_executable(JsonDocumentTests
subscript.cpp
)
target_link_libraries(JsonDocumentTests
ArduinoJson
catch
)
add_test(JsonDocument JsonDocumentTests)

View File

@ -19,9 +19,4 @@ add_executable(JsonObjectTests
subscript.cpp
)
target_link_libraries(JsonObjectTests
ArduinoJson
catch
)
add_test(JsonObject JsonObjectTests)

View File

@ -14,9 +14,4 @@ add_executable(JsonSerializerTests
std_string.cpp
)
target_link_libraries(JsonSerializerTests
ArduinoJson
catch
)
add_test(JsonSerializer JsonSerializerTests)

View File

@ -24,9 +24,4 @@ add_executable(JsonVariantTests
undefined.cpp
)
target_link_libraries(JsonVariantTests
ArduinoJson
catch
)
add_test(JsonVariant JsonVariantTests)

View File

@ -13,9 +13,4 @@ add_executable(MemberProxyTests
subscript.cpp
)
target_link_libraries(MemberProxyTests
ArduinoJson
catch
)
add_test(MemberProxy MemberProxyTests)

View File

@ -10,9 +10,4 @@ add_executable(MemoryPoolTests
StringBuilder.cpp
)
target_link_libraries(MemoryPoolTests
ArduinoJson
catch
)
add_test(MemoryPool MemoryPoolTests)

View File

@ -15,11 +15,6 @@ add_executable(MiscTests
version.cpp
)
target_link_libraries(MiscTests
ArduinoJson
catch
)
set_target_properties(MiscTests PROPERTIES UNITY_BUILD OFF)
add_test(Misc MiscTests)
@ -39,11 +34,9 @@ macro(build_should_fail target)
${CMAKE_BINARY_DIR}
)
set_tests_properties(${target}
PROPERTIES
WILL_FAIL TRUE)
WILL_FAIL TRUE
)
endmacro()

View File

@ -24,11 +24,6 @@ add_executable(MixedConfigurationTests
use_long_long_1.cpp
)
target_link_libraries(MixedConfigurationTests
ArduinoJson
catch
)
set_target_properties(MixedConfigurationTests PROPERTIES UNITY_BUILD OFF)
add_test(MixedConfiguration MixedConfigurationTests)

View File

@ -14,9 +14,4 @@ add_executable(MsgPackDeserializerTests
notSupported.cpp
)
target_link_libraries(MsgPackDeserializerTests
ArduinoJson
catch
)
add_test(MsgPackDeserializer MsgPackDeserializerTests)

View File

@ -11,9 +11,4 @@ add_executable(MsgPackSerializerTests
serializeVariant.cpp
)
target_link_libraries(MsgPackSerializerTests
ArduinoJson
catch
)
add_test(MsgPackSerializer MsgPackSerializerTests)

View File

@ -8,10 +8,5 @@ add_executable(NumbersTests
parseNumber.cpp
)
target_link_libraries(NumbersTests
ArduinoJson
catch
)
add_test(Numbers NumbersTests)

View File

@ -7,11 +7,6 @@ add_executable(TextFormatterTests
writeString.cpp
)
target_link_libraries(TextFormatterTests
ArduinoJson
catch
)
set_target_properties(TextFormatterTests PROPERTIES UNITY_BUILD OFF)
add_test(TextFormatter TextFormatterTests)