From cea035285a63698f8468f22c040466d334c775a2 Mon Sep 17 00:00:00 2001 From: seleznevae Date: Fri, 9 Mar 2018 15:21:18 +0300 Subject: [PATCH] [F] Fixed building --- .travis.yml | 1 + CMakeLists.txt | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e408508..3b65ab8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,7 @@ script: - cmake .. -DFORT_TEST_BUILD=ON -DFORT_GCC_BUILD=${GCC_BUILD} - cmake --build . --target all - ls + - LSAN_OPTIONS=verbosity=1:log_threads=1 ./libfort_example - LSAN_OPTIONS=verbosity=1:log_threads=1 ./libfort_test diff --git a/CMakeLists.txt b/CMakeLists.txt index b9a2429..6c3fb8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(FORT_SOURCES src/fort_impl.c) -add_executable(${PROJECT_NAME} +add_executable(${PROJECT_NAME}_example example/main.c ${FORT_SOURCES}) @@ -38,7 +38,7 @@ 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(libfort_test +add_executable(${PROJECT_NAME}_test ${FORT_SOURCES} tests/test.c tests/test_vector.c @@ -55,8 +55,8 @@ target_link_libraries(libfort_test 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(libfort_test asan) + target_link_libraries(${PROJECT_NAME}_example asan) + target_link_libraries(${PROJECT_NAME}_test asan) endif(FORT_GCC_BUILD) endif(FORT_TEST_BUILD)