diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2013-08-23 01:21:24 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2013-08-23 01:21:24 +0000 |
commit | 1e771ddf22737484f2c68afe60d7a5158fe0152f (patch) | |
tree | 14634f227f51809309b09b761f3e6d41e45907ea /CMakeLists.txt | |
parent | 89183ca2d28c899f7ee83bfae0d57f8d36f02c26 (diff) | |
download | libapr-1e771ddf22737484f2c68afe60d7a5158fe0152f.tar.gz |
Run gen_test_char during the build, as with autoconf-based build
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1516674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 844c56fca..98a0c5aad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ PROJECT(APR C) # . Fix problem where srcdir/include/apr.h (if it exists) is found before builddir/apr.h # (and similar for apu_want.h) # . Document example 32-bit and 64-bit Windows builds using NMake -# . Build and optionally run gen_test_char # . Build apr_app.c into libapr-2 properly (what about apr-2.lib?) # . Options for remaining features, along with finding any necessary libraries # + APR_POOL_DEBUG @@ -81,6 +80,19 @@ CONFIGURE_FILE(include/apu_want.hw ${PROJECT_BINARY_DIR}/apu_want.h COPYONLY) +ADD_EXECUTABLE(gen_test_char tools/gen_test_char.c) +GET_TARGET_PROPERTY(GEN_TEST_CHAR_EXE gen_test_char LOCATION) +ADD_CUSTOM_COMMAND( + COMMENT "Generating character tables, apr_escape_test_char.h, for current locale" + DEPENDS gen_test_char + COMMAND ${GEN_TEST_CHAR_EXE} > ${PROJECT_BINARY_DIR}/apr_escape_test_char.h + OUTPUT ${PROJECT_BINARY_DIR}/apr_escape_test_char.h +) +ADD_CUSTOM_TARGET( + test_char_header ALL + DEPENDS ${PROJECT_BINARY_DIR}/apr_escape_test_char.h +) + IF(APU_USE_EXPAT) SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) @@ -382,11 +394,13 @@ ADD_LIBRARY(libapr-2 SHARED ${APR_HEADERS} ${APR_SOURCES} ${PROJECT_BINARY_DIR}/ SET(install_targets ${install_targets} libapr-2) TARGET_LINK_LIBRARIES(libapr-2 ${XMLLIB_LIBRARIES} ${APR_SYSTEM_LIBS}) SET_TARGET_PROPERTIES(libapr-2 PROPERTIES COMPILE_FLAGS -DAPR_DECLARE_EXPORT) +ADD_DEPENDENCIES(libapr-2 test_char_header) ADD_LIBRARY(apr-2 STATIC ${APR_HEADERS} ${APR_SOURCES} ${PROJECT_BINARY_DIR}/apr.h) SET(install_targets ${install_targets} apr-2) TARGET_LINK_LIBRARIES(apr-2 ${XMLLIB_LIBRARIES} ${APR_SYSTEM_LIBS}) SET_TARGET_PROPERTIES(apr-2 PROPERTIES COMPILE_FLAGS -DAPR_DECLARE_STATIC) +ADD_DEPENDENCIES(apr-2 test_char_header) IF(APR_BUILD_TESTAPR) EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/data) |