Skip to content

Commit 958fea3

Browse files
committed
CMake changes to allow integrating the library as a CMake subproject.
1 parent 41d488f commit 958fea3

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
cmake_minimum_required(VERSION 3.20)
22

3-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
4-
53
set(LANGUAGES C)
64
if(BUILD_TESTING)
75
set(CMAKE_CXX_STANDARD 14)
@@ -26,6 +24,8 @@ project(projectm-eval
2624
LANGUAGES ${LANGUAGES} # Using "enable_language(CXX)" in the test dir will NOT work properly!
2725
)
2826

27+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
28+
2929
include(GNUInstallDirs)
3030
include(FastMathOptimizations)
3131
include(CheckCSourceCompiles)

benchmarks/Stubs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
extern "C"
22
{
3-
#include <MemoryBuffer.h>
3+
#include <projectm-eval/MemoryBuffer.h>
44
}
55

66
void projectm_eval_memory_host_lock_mutex(){}

projectm-eval/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ add_library(projectM_eval STATIC
6969

7070
target_include_directories(projectM_eval
7171
PUBLIC
72-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
73-
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
72+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
73+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/api>
7474
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/projectm-eval>
7575
)
7676

tests/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ find_package(GTest 1.10 REQUIRED NO_MODULE)
44
add_executable(projectM_EvalLib_Test
55
InstructionListTest.cpp
66
InstructionListTest.hpp
7+
PrecedenceTest.cpp
8+
PrecedenceTest.hpp
79
Stubs.cpp
810
TreeFunctionsTest.cpp
911
)

tests/Stubs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
extern "C"
22
{
3-
#include <MemoryBuffer.h>
3+
#include <projectm-eval/MemoryBuffer.h>
44
}
55

66
void projectm_eval_memory_host_lock_mutex(){}

0 commit comments

Comments
 (0)