CMakeLists.txt 604 Bytes
Newer Older
1
2
3
4
5
6
7
8
cmake_minimum_required(VERSION 3.10)
project(TestFindIconv CXX)
include(CTest)

find_package(Iconv REQUIRED)

add_executable(test_iconv_tgt main.cxx)
target_link_libraries(test_iconv_tgt Iconv::Iconv)
Rolf Eike Beer's avatar
Rolf Eike Beer committed
9
target_compile_features(test_iconv_tgt PRIVATE cxx_std_11)
10
11
12
13
14
add_test(NAME test_iconv_tgt COMMAND test_iconv_tgt)

add_executable(test_iconv_var main.cxx)
target_include_directories(test_iconv_var PRIVATE ${Iconv_INCLUDE_DIRS})
target_link_libraries(test_iconv_var PRIVATE ${Iconv_LIBRARIES})
Rolf Eike Beer's avatar
Rolf Eike Beer committed
15
target_compile_features(test_iconv_var PRIVATE cxx_std_11)
16
add_test(NAME test_iconv_var COMMAND test_iconv_var)