From 6e9039e104411c55fc9582b502b53384d29d652b Mon Sep 17 00:00:00 2001 From: River <26424577+wusatosi@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:34:55 -0500 Subject: [PATCH] make project header only --- CMakeLists.txt | 9 ++------- {src => include}/beman/exemplar/CMakeLists.txt | 4 +--- src/beman/exemplar/identity.cpp | 3 --- 3 files changed, 3 insertions(+), 13 deletions(-) rename {src => include}/beman/exemplar/CMakeLists.txt (88%) delete mode 100644 src/beman/exemplar/identity.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cfbb65..89c586b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,12 +2,7 @@ cmake_minimum_required(VERSION 3.25) -project( - beman.exemplar # CMake Project Name, which is also the name of the top-level - # targets (e.g., library, executable, etc.). - DESCRIPTION "A Beman library exemplar" - LANGUAGES CXX -) +project(beman.exemplar DESCRIPTION "A Beman library exemplar" LANGUAGES CXX) enable_testing() @@ -41,7 +36,7 @@ if(BEMAN_EXEMPLAR_BUILD_TESTS) FetchContent_MakeAvailable(googletest) endif() -add_subdirectory(src/beman/exemplar) +add_subdirectory(include/beman/exemplar) if(BEMAN_EXEMPLAR_BUILD_TESTS) add_subdirectory(tests/beman/exemplar) diff --git a/src/beman/exemplar/CMakeLists.txt b/include/beman/exemplar/CMakeLists.txt similarity index 88% rename from src/beman/exemplar/CMakeLists.txt rename to include/beman/exemplar/CMakeLists.txt index 0a40521..4747b3c 100644 --- a/src/beman/exemplar/CMakeLists.txt +++ b/include/beman/exemplar/CMakeLists.txt @@ -1,10 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -add_library(beman.exemplar) +add_library(beman.exemplar INTERFACE) add_library(beman::exemplar ALIAS beman.exemplar) -target_sources(beman.exemplar PRIVATE identity.cpp) - target_sources( beman.exemplar PUBLIC diff --git a/src/beman/exemplar/identity.cpp b/src/beman/exemplar/identity.cpp deleted file mode 100644 index 21ef59d..0000000 --- a/src/beman/exemplar/identity.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -#include