-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
43 lines (31 loc) · 1.05 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.10)
project(gsoc2024)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include_directories(numpy/include)
include_directories(pybind11/include)
include_directories(pocketpy/include)
add_subdirectory(pocketpy)
if(MSVC)
add_compile_options(/wd4018 /wd4172 /wd4819)
add_compile_options(/bigobj)
endif()
add_executable(${PROJECT_NAME} test_main.cpp numpy/src/numpy.cpp)
set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY CMAKE_CURRENT_LIST_DIR)
target_link_libraries(${PROJECT_NAME} PRIVATE
pocketpy
)
if(ENABLE_TEST)
if(WIN32)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
endif()
# git clone https://github.com/google/googletest.git
include_directories(googletest/googletest/include)
add_subdirectory(googletest)
file(GLOB_RECURSE PYBIND11_TEST_SOURCES "pybind11/tests/*.cpp")
add_executable(pybind11_test ${PYBIND11_TEST_SOURCES})
target_link_libraries(pybind11_test PRIVATE
pocketpy
GTest::gtest_main
)
endif()