Skip to content

Commit

Permalink
build: remove unnecessary variables
Browse files Browse the repository at this point in the history
Variables should be avoided. Repetition is not bad in this case. Inline
the single use variables.
  • Loading branch information
compnerd committed Jan 5, 2024
1 parent 403f409 commit 56fd134
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ set(LIBRARY_SOURCES
)

set(PROGRAM "cmark-gfm")
set(PROGRAM_SOURCES "${PROJECT_SOURCE_DIR}/bin/main.c")

include_directories(include ${CMAKE_CURRENT_BINARY_DIR})
include_directories(
Expand All @@ -45,7 +44,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmark-gfm_version.h.in

check_file_offset_bits()

add_executable(${PROGRAM} ${PROGRAM_SOURCES})
add_executable(${PROGRAM}
${PROJECT_SOURCE_DIR}/bin/main.c)

if(CMARK_SHARED)
target_link_libraries(${PROGRAM} libcmark-gfm-extensions libcmark-gfm)
Expand Down Expand Up @@ -147,8 +147,8 @@ if(CMARK_SHARED OR CMARK_STATIC)
install(EXPORT cmark-gfm
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)

set(CMARK_TARGETS_FILE ${CMAKE_CURRENT_BINARY_DIR}/cmarkTargets.cmake)
export(TARGETS ${CMARK_INSTALL} FILE ${CMARK_TARGETS_FILE})
export(TARGETS ${CMARK_INSTALL}
FILE ${CMAKE_CURRENT_BINARY_DIR}/cmarkTargets.cmake)
endif()

CONFIGURE_FILE(
Expand Down

0 comments on commit 56fd134

Please sign in to comment.