From 2f390853963e500bcdec70e07bda82457300c495 Mon Sep 17 00:00:00 2001 From: seleznevae Date: Fri, 26 Apr 2019 23:20:43 +0300 Subject: [PATCH] [F] Fixed cmake files styles --- CMakeLists.txt | 12 ++++++------ tests/CMakeLists.txt | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fc2827..e538d78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,7 @@ if("${FORT_COMPILER}" STREQUAL "GNU" OR "${FORT_COMPILER}" STREQUAL "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") if("${FORT_COMPILER}" STREQUAL "GNU") - set(FORT_EXTRA_LINK_LIBRARIES asan) + set(FORT_LINK_LIBRARIES asan) endif() endif() @@ -82,7 +82,7 @@ if("${FORT_COMPILER}" STREQUAL "GNU" OR "${FORT_COMPILER}" STREQUAL "Clang") if("${FORT_COMPILER}" STREQUAL "GNU") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-sanitize-recover") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-sanitize-recover") - set(FORT_EXTRA_LINK_LIBRARIES ubsan) + set(FORT_LINK_LIBRARIES ubsan) elseif("${FORT_COMPILER}" STREQUAL "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-sanitize-recover=all") @@ -149,7 +149,7 @@ add_custom_target(headers SOURCES ${FortHeaders}) add_executable(${PROJECT_NAME}_example - example/main.c) + example/main.c) target_link_libraries(${PROJECT_NAME}_example fort) @@ -159,9 +159,9 @@ add_executable(${PROJECT_NAME}_example_cpp target_link_libraries(${PROJECT_NAME}_example_cpp fort) -if(DEFINED FORT_EXTRA_LINK_LIBRARIES) - target_link_libraries(${PROJECT_NAME}_example_cpp "${FORT_EXTRA_LINK_LIBRARIES}") - target_link_libraries(${PROJECT_NAME}_example "${FORT_EXTRA_LINK_LIBRARIES}") +if(DEFINED FORT_LINK_LIBRARIES) + target_link_libraries(${PROJECT_NAME}_example_cpp "${FORT_LINK_LIBRARIES}") + target_link_libraries(${PROJECT_NAME}_example "${FORT_LINK_LIBRARIES}") endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 56a8415..288da72 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -53,8 +53,8 @@ target_include_directories(${PROJECT_NAME}_test_cpp ${CMAKE_CURRENT_SOURCE_DIR} ) -if(DEFINED FORT_EXTRA_LINK_LIBRARIES) - target_link_libraries(${PROJECT_NAME}_test_dev "${FORT_EXTRA_LINK_LIBRARIES}") - target_link_libraries(${PROJECT_NAME}_test_cpp "${FORT_EXTRA_LINK_LIBRARIES}") - target_link_libraries(${PROJECT_NAME}_test "${FORT_EXTRA_LINK_LIBRARIES}") +if(DEFINED FORT_LINK_LIBRARIES) + target_link_libraries(${PROJECT_NAME}_test_dev "${FORT_LINK_LIBRARIES}") + target_link_libraries(${PROJECT_NAME}_test_cpp "${FORT_LINK_LIBRARIES}") + target_link_libraries(${PROJECT_NAME}_test "${FORT_LINK_LIBRARIES}") endif()