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

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

parent ed1c5550
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !134. Comments created here will be created in the context of that merge request.
......@@ -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