Sha256: e66df87138a333275d53177ae8822b448df1853896b84ed2562266dbead6a809

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

if (CXXOPTS_BUILD_TESTS)
    add_executable(options_test main.cpp options.cpp)
    target_link_libraries(options_test cxxopts)
    add_test(options options_test)

    # test if the targets are findable from the build directory
    add_test(find-package-test ${CMAKE_CTEST_COMMAND}
        -C ${CMAKE_BUILD_TYPE}
        --build-and-test
        "${CMAKE_CURRENT_SOURCE_DIR}/find-package-test"
        "${CMAKE_CURRENT_BINARY_DIR}/find-package-test"
        --build-generator ${CMAKE_GENERATOR}
        --build-makeprogram ${CMAKE_MAKE_PROGRAM}
        --build-options
        "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
        "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
        "-Dcxxopts_DIR=${PROJECT_BINARY_DIR}"
    )

    # test if the targets are findable when add_subdirectory is used
    add_test(add-subdirectory-test ${CMAKE_CTEST_COMMAND}
        -C ${CMAKE_BUILD_TYPE}
        --build-and-test
        "${CMAKE_CURRENT_SOURCE_DIR}/add-subdirectory-test"
        "${CMAKE_CURRENT_BINARY_DIR}/add-subdirectory-test"
        --build-generator ${CMAKE_GENERATOR}
        --build-makeprogram ${CMAKE_MAKE_PROGRAM}
        --build-options
        "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
        "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
    )

    add_executable(link_test link_a.cpp link_b.cpp)
    target_link_libraries(link_test cxxopts)
endif()

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simdjson-0.3.0 vendor/simdjson/dependencies/cxxopts/test/CMakeLists.txt