-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
83 lines (69 loc) · 2.37 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright 2024 Richard Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.14)
## Set Project and Version
project(composichem VERSION "0.0.1" LANGUAGES NONE)
## Get CMaize and Common NWChemEx CMake infrastructure
include(cmake/get_nwx_cmake.cmake)
include(nwx_versions)
include(get_cmaize)
## Paths ##
set(${PROJECT_NAME}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/python")
set(${PROJECT_NAME}_TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/python")
## Options ##
cmaize_option_list(
BUILD_TESTING ON "Should the tests be built?"
INTEGRATION_TESTING ON "Should we build the integration tests?"
)
## Find or build dependencies ##
cmaize_find_or_build_dependency(
simde
URL github.com/NWChemEx/SimDE
VERSION master
BUILD_TARGET simde
FIND_TARGET nwx::simde
CMAKE_ARGS BUILD_TESTING=OFF
)
## Add libraries ##
add_library(${PROJECT_NAME} INTERFACE)
target_link_libraries(${PROJECT_NAME} INTERFACE simde)
## Build tests ##
if("${BUILD_TESTING}")
include(CTest)
include(nwx_pybind11)
nwx_pybind11_tests(
${PROJECT_NAME}_unit_tests
"${${PROJECT_NAME}_TESTS_DIR}/unit_tests/test_composichem.py"
SUBMODULES simde chemist pluginplay parallelzone
)
if("${INTEGRATION_TESTING}")
cmaize_find_or_build_dependency(
nwchemex
URL github.com/NWChemEx/NWChemEx
BUILD_TARGET nwchemex
FIND_TARGET nwx::nwchemex
CMAKE_ARGS BUILD_TESTING=OFF
)
nwx_pybind11_tests(
${PROJECT_NAME}_integration_test
"${${PROJECT_NAME}_TESTS_DIR}/integration_tests/test_composichem.py"
SUBMODULES nwchemex chemcache friendzone simde chemist pluginplay
parallelzone
)
endif()
endif()
install(
DIRECTORY "${${PROJECT_NAME}_SRC_DIR}/composichem"
DESTINATION "${NWX_MODULE_DIRECTORY}"
)