Skip to content

Commit

Permalink
Add option to disable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
worktycho committed Apr 27, 2014
1 parent 784b04f commit 1ed8275
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
cmake_minimum_required(VERSION 2.6)
project(POLARSSL C)

enable_testing()
option(ENABLE_TESTING "Build PolarSSL tests." ON)

if(ENABLE_TESTING)
enable_testing()
endif()

string(REGEX MATCH "clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER}")

Expand Down Expand Up @@ -42,6 +46,7 @@ option(USE_PKCS11_HELPER_LIBRARY "Build PolarSSL with the pkcs11-helper library.
option(ENABLE_ZLIB_SUPPORT "Build PolarSSL with zlib library." OFF)
option(ENABLE_PROGRAMS "Build PolarSSL programs." ON)


if(LIB_INSTALL_DIR)
else()
set(LIB_INSTALL_DIR lib)
Expand All @@ -60,12 +65,14 @@ endif(ENABLE_ZLIB_SUPPORT)
add_subdirectory(library)
add_subdirectory(include)

if(CMAKE_COMPILER_IS_GNUCC)
add_subdirectory(tests)
endif(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_COMPILER_IS_CLANG)
add_subdirectory(tests)
endif(CMAKE_COMPILER_IS_CLANG)
if(ENABLE_TESTING)
if(CMAKE_COMPILER_IS_GNUCC)
add_subdirectory(tests)
endif(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_COMPILER_IS_CLANG)
add_subdirectory(tests)
endif(CMAKE_COMPILER_IS_CLANG)
endif()

if(ENABLE_PROGRAMS)
add_subdirectory(programs)
Expand Down

0 comments on commit 1ed8275

Please sign in to comment.