- Fixed out of source build for tests with CMake

This commit is contained in:
Paul Bakker 2010-06-18 22:54:05 +00:00
parent 3ac1b2d952
commit 4c14a258fe
2 changed files with 10 additions and 4 deletions

View file

@ -4,10 +4,15 @@ PolarSSL ChangeLog
Features Features
* Added support for SSL_EDH_RSA_AES_128_SHA and * Added support for SSL_EDH_RSA_AES_128_SHA and
SSL_EDH_RSA_CAMELLIA_128_SHA ciphersuites SSL_EDH_RSA_CAMELLIA_128_SHA ciphersuites
* Added compile-time and run-time version information
Changes Changes
* Made Makefile cleaner * Made Makefile cleaner
Bug fixes
* Fixed CMake out of source build for tests (found by
kkert)
= Version 0.13.1 released on 2010-03-24 = Version 0.13.1 released on 2010-03-24
Bug fixes Bug fixes
* Fixed Makefile in library that was mistakenly merged * Fixed Makefile in library that was mistakenly merged

View file

@ -1,10 +1,11 @@
function(add_test_suite suite_name) function(add_test_suite suite_name)
add_custom_command( add_custom_command(
OUTPUT test_suite_${suite_name}.c OUTPUT test_suite_${suite_name}.c
COMMAND scripts/generate_code.pl suites test_suite_${suite_name} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_code.pl ${CMAKE_CURRENT_SOURCE_DIR}/suites test_suite_${suite_name}
DEPENDS scripts/generate_code.pl polarssl fct.h suites/helpers.function suites/test_suite_${suite_name}.function suites/test_suite_${suite_name}.data DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_code.pl polarssl fct.h suites/helpers.function suites/test_suite_${suite_name}.function suites/test_suite_${suite_name}.data
) )
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(test_suite_${suite_name} test_suite_${suite_name}.c) add_executable(test_suite_${suite_name} test_suite_${suite_name}.c)
target_link_libraries(test_suite_${suite_name} polarssl) target_link_libraries(test_suite_${suite_name} polarssl)
add_test(${suite_name}-suite test_suite_${suite_name}) add_test(${suite_name}-suite test_suite_${suite_name})