Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
wusatosi committed Oct 2, 2024
1 parent 5287115 commit f3557fc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
28 changes: 16 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ include(FetchContent)
if(BUILD_TESTING)
enable_testing()

block()
# Disable installing google test dependency on cmake --install
set(INSTALL_GTEST OFF)

# Fetch GoogleTest
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # release-1.14.0
EXCLUDE_FROM_ALL CMAKE_ARGS -DBUILD_TESTING=OFF)
FetchContent_MakeAvailable(googletest)
endblock()
block()
# Disable installing google test dependency on cmake --install
set(INSTALL_GTEST OFF)

# Fetch GoogleTest
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG
f8d7d77c06936315286eb55f8de22cd23c188571 # release-1.14.0
EXCLUDE_FROM_ALL
CMAKE_ARGS
-DBUILD_TESTING=OFF
)
FetchContent_MakeAvailable(googletest)
endblock()
endif()

add_subdirectory(src/beman/exemplar)
Expand Down
22 changes: 12 additions & 10 deletions src/beman/exemplar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ target_sources(beman.exemplar PRIVATE identity.cpp)
set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/)

target_sources(
beman.exemplar PUBLIC
FILE_SET HEADERS
BASE_DIRS ${INCLUDE_DIR}
FILES ${INCLUDE_DIR}/beman/exemplar/identity.hpp)
beman.exemplar
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${INCLUDE_DIR}
FILES ${INCLUDE_DIR}/beman/exemplar/identity.hpp
)

set_target_properties(beman.exemplar PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON)

install(
TARGETS beman.exemplar
EXPORT beman.exemplar
DESTINATION $<$<CONFIG:Debug>:debug/>${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION $<$<CONFIG:Debug>:debug/>${CMAKE_INSTALL_BINDIR}
FILE_SET HEADERS
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
TARGETS beman.exemplar
EXPORT beman.exemplar
DESTINATION
$<$<CONFIG:Debug>:debug/>${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION $<$<CONFIG:Debug>:debug/>${CMAKE_INSTALL_BINDIR}
FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

if(BUILD_TESTING)
Expand Down

0 comments on commit f3557fc

Please sign in to comment.