cxxopts/test/CMakeLists.txt
Mario Badr b1795c27e4 Use INTERFACE to pass on unicode dependency
Linking the cxxopts library with the unicode libraries and specifying
INTERFACE should ensure executables that link with cxxopts will also
link with the unicode libraries.
2016-11-30 18:01:13 -05:00

14 lines
407 B
CMake

if (CXXOPTS_BUILD_TESTS)
add_executable(options_test options.cpp)
target_link_libraries(options_test cxxopts)
if (MSVC)
target_compile_options(options_test PUBLIC /W2)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(options_test PUBLIC -std=c++11 -Wall)
endif()
add_test(options options_test)
endif()