Skip to content
Snippets Groups Projects
Commit d6391b75 authored by Mathieu Westphal's avatar Mathieu Westphal
Browse files

CMake: Add option to control building the app and the tests

parent 36f9e72b
No related branches found
No related tags found
2 merge requests!137CMake: Fix cdi-config.cmake for CMake compatibility,!134CMake: Improvements from kitware
......@@ -7,7 +7,6 @@ set(CMAKE_C_STANDARD 11)
include(CTest)
include(CheckIncludeFile)
# Finding libraries
### -------------- Pthread ---------------------------
......@@ -46,7 +45,6 @@ if(${CDI_SERVICE})
list(APPEND cdi_compile_defs HAVE_LIBSERVICE=1)
endif()
# ecCodes
option(CDI_ECCODES "Use the eccodes library [default=ON]" ON)
if(${CDI_ECCODES} OR eccodes_ROOT)
......@@ -85,8 +83,13 @@ message(VERBOSE "looking for config.h in: ${PROJECT_BINARY_DIR}/src")
list(APPEND cdi_compile_defs CDI=1 CDI_SIZE_TYPE=size_t PACKAGE_NAME="${PROJECT_NAME}" VERSION="${CMAKE_PROJECT_VERSION}")
add_subdirectory(src)
#tests
add_subdirectory(app)
add_subdirectory(tests)
#app
option(CDI_BUILD_APP "Build the app" ON)
if (CDI_BUILD_APP)
add_subdirectory(app)
endif ()
#tests
if (BUILD_TESTING)
add_subdirectory(tests)
endif ()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment