File tree Expand file tree Collapse file tree 2 files changed +32
-5
lines changed
Expand file tree Collapse file tree 2 files changed +32
-5
lines changed Original file line number Diff line number Diff line change 6565 BREW_PREFIX="$(brew --prefix)"
6666 export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:"/opt/homebrew/opt/openblas"
6767 if [ $CC = "gcc" ]; then
68- cmake -DCMAKE_C_COMPILER=${BREW_PREFIX}/bin/gcc-13 -DBLA_VENDOR=$BLAS_VENDOR -DBUILD_TESTING=ON -DBUILD_OPENMP_TESTS=ON -S . -B /tmp/build
68+ cmake \
69+ -DCMAKE_C_COMPILER=${BREW_PREFIX}/bin/gcc-13 \
70+ -DBLA_VENDOR=$BLAS_VENDOR \
71+ -DBUILD_TESTING=ON \
72+ -DBUILD_DOCS=OFF \
73+ -DBUILD_OPENMP_TESTS=ON \
74+ -DBUILD_REAL_DATA_TESTS=OFF \
75+ -DDISABLE_LIBRARY_BUILD \
76+ -S . -B /tmp/build
6977 else
70- cmake -DBLA_VENDOR=$BLAS_VENDOR -DBUILD_TESTING=ON -DBUILD_OPENMP_TESTS=ON -S . -B /tmp/build
78+ cmake \
79+ -DBLA_VENDOR=$BLAS_VENDOR \
80+ -DBUILD_TESTING=ON \
81+ -DBUILD_DOCS=OFF \
82+ -DBUILD_OPENMP_TESTS=ON \
83+ -DBUILD_REAL_DATA_TESTS=OFF \
84+ -DDISABLE_LIBRARY_BUILD \
85+ -S . -B /tmp/build
7186 fi
7287 cmake --build /tmp/build
7388
Original file line number Diff line number Diff line change @@ -17,6 +17,14 @@ option(BUILD_DOCS "Build documentation" ON)
1717include (CMakeDependentOption)
1818include (CTest)
1919
20+ cmake_dependent_option(
21+ DISABLE_LIBRARY_BUILD
22+ "Disables building of the main library - only builds the tests"
23+ OFF
24+ BUILD_TESTING
25+ OFF
26+ )
27+
2028cmake_dependent_option(
2129 BUILD_OPENMP_TESTS
2230 "In addition to normal tests, also builds and runs tests with OpenMP"
@@ -70,7 +78,7 @@ if(BUILD_TESTING)
7078 add_subdirectory (tests)
7179endif ()
7280
73- message (STATUS "building ${PROJECT_NAME} , version ${PROJECT_VERSION} " )
81+ message (STATUS "Building ${PROJECT_NAME} , version ${PROJECT_VERSION} " )
7482
7583include (GNUInstallDirs)
7684
@@ -79,8 +87,12 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
7987set (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR} /${CMAKE_INSTALL_BINDIR} )
8088
8189##### MAIN #####
82- add_subdirectory (src)
83- add_subdirectory (dev)
90+ if (DISABLE_LIBRARY_BUILD)
91+ message (STATUS "Library build disabled - only building tests" )
92+ else ()
93+ add_subdirectory (src)
94+ add_subdirectory (dev)
95+ endif ()
8496
8597if (BUILD_DOCS)
8698 add_subdirectory (docs)
You can’t perform that action at this time.
0 commit comments