From ccb4c46e3d7d463d6696b9209d2319e3985982ef Mon Sep 17 00:00:00 2001 From: seleznevae Date: Fri, 9 Mar 2018 11:03:03 +0300 Subject: [PATCH] [C] Changed travis --- .travis.yml | 16 +++++++++++++--- CMakeLists.txt | 6 +++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c7c5bd6..6f44bb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,9 @@ matrix: - pip install --user cpp-coveralls after_success: - coveralls --build-root build --include src --include tests --gcov-options '\-lp' - # - os: linux - # compiler: clang - # env: GCC_BUILD=OFF + - os: linux + compiler: clang + env: GCC_BUILD=OFF @@ -30,6 +30,16 @@ script: - cd ../../.. - ls + # Perform out-of-source build(CMake backend generation, build, and test) + # Test build without optimizations + - mkdir -p build + - cd build + - cmake .. -DFORT_TEST_BUILD=ON -DFORT_GCC_BUILD=${GCC_BUILD} + - cmake --build . --target all + - ls + - ./libfort_test + + # # Perform out-of-source build(CMake backend generation, build, and test) # # Test build without optimizations # - cd build diff --git a/CMakeLists.txt b/CMakeLists.txt index 155ac86..bfcdf67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,14 +38,14 @@ add_executable(${PROJECT_NAME} include_directories(tests/cmocka-1.1.0/include) link_directories(${CMAKE_SOURCE_DIR}/tests/cmocka-1.1.0/build/src) -add_executable(TEST +add_executable(libfort_test ${FORT_SOURCES} tests/test.c tests/test_vector.c tests/test_table.c tests/test_string_buffer.c) -target_link_libraries(TEST +target_link_libraries(libfort_test cmocka) @@ -56,7 +56,7 @@ if(FORT_TEST_BUILD) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") if(FORT_GCC_BUILD) target_link_libraries(${PROJECT_NAME} asan) - target_link_libraries(TEST asan) + target_link_libraries(libfort_test asan) endif(FORT_GCC_BUILD) endif(FORT_TEST_BUILD)