build tests by default; install doc & examples
parent
31929368a6
commit
08c1701405
|
@ -34,7 +34,7 @@ if (NOT CMAKE_BUILD_TYPE)
|
|||
set (CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
endif ()
|
||||
|
||||
option (BUILD_TESTS "Build sanity-tests." OFF)
|
||||
option (BUILD_TESTS "Build sanity-tests." ON)
|
||||
option (BUILD_SHARED_LIBS "Build shared libraries." ON)
|
||||
option (BUILD_EXAMPLES "Build examples." OFF)
|
||||
option (WITH_OPENMP "Include OpenMP threading." ON)
|
||||
|
@ -189,6 +189,13 @@ endif ()
|
|||
if (NOT DEFINED INCLUDE_INSTALL_DIR)
|
||||
set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
|
||||
endif ()
|
||||
if (NOT DEFINED DOC_INSTALL_DIR)
|
||||
if (UNIX)
|
||||
set (DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/lib${PROJECT_NAME}")
|
||||
else ()
|
||||
set (DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/doc")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
option (BUILD_FRAMEWORK "Build an OS X framework." OFF)
|
||||
|
@ -214,6 +221,8 @@ if (BUILD_TESTS OR BUILD_LSR_TESTS)
|
|||
enable_testing ()
|
||||
endif ()
|
||||
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_SOURCE_DIR}/LICENCE DESTINATION ${DOC_INSTALL_DIR})
|
||||
|
||||
|
||||
|
||||
# Subdirectories:
|
||||
|
|
|
@ -32,3 +32,6 @@ endforeach ()
|
|||
if (${BUILD_TESTS} AND ${WITH_LSR_BINDINGS})
|
||||
add_test (lsr-bindings 1a-lsr)
|
||||
endif ()
|
||||
|
||||
file (GLOB INSTALL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.[cCh])
|
||||
install (FILES ${INSTALL_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/README DESTINATION ${DOC_INSTALL_DIR}/examples)
|
||||
|
|
2
go
2
go
|
@ -10,6 +10,6 @@ rm -f CMakeCache.txt # Prevent interference from any in-tree build
|
|||
mkdir -p $build
|
||||
cd $build
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=$build -DBUILD_TESTS=ON .. &&
|
||||
cmake -DCMAKE_BUILD_TYPE=$build .. &&
|
||||
make &&
|
||||
(make test || echo "FAILURE details in $build/Testing/Temporary/LastTest.log")
|
||||
|
|
Loading…
Reference in New Issue