Skip to content

Commit

Permalink
make project compilable
Browse files Browse the repository at this point in the history
  • Loading branch information
wusatosi committed Feb 3, 2025
1 parent 0aea22d commit 1c666fa
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif()
message("Examples to be built: ${ALL_EXAMPLES}")

foreach(example ${ALL_EXAMPLES})
add_executable(beman.exemplar.examples.${example})
target_sources(beman.exemplar.examples.${example} PRIVATE ${example}.cpp)
target_link_libraries(beman.exemplar.examples.${example} beman::exemplar)
add_executable(beman.scope.examples.${example})
target_sources(beman.scope.examples.${example} PRIVATE ${example}.cpp)
target_link_libraries(beman.scope.examples.${example} beman::scope)
endforeach()
2 changes: 1 addition & 1 deletion examples/identity_as_default_projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// TODO Darius: Do we need to selectively compile this example?
// Or should we assume that this project is compiled with C++20 support only?

#include <beman/exemplar/identity.hpp>
#include <beman/scope/identity.hpp>

#include <algorithm>
#include <functional> // std::identity
Expand Down
2 changes: 1 addition & 1 deletion examples/identity_direct_usage.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/exemplar/identity.hpp>
#include <beman/scope/identity.hpp>

#include <iostream>

Expand Down
16 changes: 8 additions & 8 deletions src/beman/scope/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

add_library(beman.exemplar)
add_library(beman::exemplar ALIAS beman.exemplar)
add_library(beman.scope)
add_library(beman::scope ALIAS beman.scope)

target_sources(beman.exemplar PRIVATE identity.cpp)
target_sources(beman.scope PRIVATE identity.cpp)

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

set_target_properties(beman.exemplar PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON)
set_target_properties(beman.scope PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON)

install(
TARGETS beman.exemplar
EXPORT beman.exemplar
TARGETS beman.scope
EXPORT beman.scope
DESTINATION
$<$<CONFIG:Debug>:debug/>${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION $<$<CONFIG:Debug>:debug/>${CMAKE_INSTALL_BINDIR}
Expand Down
2 changes: 1 addition & 1 deletion src/beman/scope/identity.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/exemplar/identity.hpp>
#include <beman/scope/identity.hpp>
12 changes: 0 additions & 12 deletions tests/beman/exemplar/CMakeLists.txt

This file was deleted.

12 changes: 12 additions & 0 deletions tests/beman/scope/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

include(GoogleTest)

add_executable(beman.scope.tests.identity)
target_sources(beman.scope.tests.identity PRIVATE identity.test.cpp)
target_link_libraries(
beman.scope.tests.identity
PRIVATE beman::scope GTest::gtest GTest::gtest_main
)

gtest_add_tests(beman.scope.tests.identity "" AUTO)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/exemplar/identity.hpp>
#include <beman/scope/identity.hpp>

#include <gtest/gtest.h>

Expand Down

0 comments on commit 1c666fa

Please sign in to comment.