Skip to content

Commit decd4cf

Browse files
committed
Merge remote-tracking branch 'dept/cpplib'
2 parents 0e85434 + c23b327 commit decd4cf

File tree

3 files changed

+301
-182
lines changed

3 files changed

+301
-182
lines changed

CMakeLists.txt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ project(Cadabra)
1010
# Preamble
1111
#---------------------------------------------------------------------------
1212

13+
# Aliases for directories
14+
set(CADABRA_ROOT_DIR ${CMAKE_SOURCE_DIR})
15+
set(CADABRA_CLIENT_SERVER_DIR ${CADABRA_ROOT_DIR}/client_server)
16+
set(CADABRA_CORE_DIR ${CADABRA_ROOT_DIR}/core)
17+
set(CADABRA_FRONTEND_DIR ${CADABRA_ROOT_DIR}/frontend)
18+
set(CADABRA_IMAGES_DIR ${CADABRA_ROOT_DIR}/images)
19+
set(CADABRA_LIBS_DIR ${CADABRA_ROOT_DIR}/libs)
20+
1321
include(cmake/functions.cmake)
1422

1523
# Include Visual Studio specific build commands
@@ -59,19 +67,19 @@ install(
5967
endif()
6068
"
6169
)
70+
71+
# Are we trying to build cadabra as a c++ library?
72+
option(BUILD_AS_CPP_LIBRARY "Build cadabra as a C++ library" OFF)
73+
if (BUILD_AS_CPP_LIBRARY)
74+
enable_testing()
75+
add_subdirectory(c++lib)
76+
return()
77+
endif()
6278

6379

6480
# Include packaging logic.
6581
include(cmake/packaging.cmake)
6682

67-
# Aliases for directories
68-
set(CADABRA_ROOT_DIR ${CMAKE_SOURCE_DIR})
69-
set(CADABRA_CLIENT_SERVER_DIR ${CADABRA_ROOT_DIR}/client_server)
70-
set(CADABRA_CORE_DIR ${CADABRA_ROOT_DIR}/core)
71-
set(CADABRA_FRONTEND_DIR ${CADABRA_ROOT_DIR}/frontend)
72-
set(CADABRA_IMAGES_DIR ${CADABRA_ROOT_DIR}/images)
73-
set(CADABRA_LIBS_DIR ${CADABRA_ROOT_DIR}/libs)
74-
7583

7684
#---------------------------------------------------------------------------
7785
# User options and other notifications

0 commit comments

Comments
 (0)