Add config.h.in which produces the config.h on CMake configure.
parent
964d21748a
commit
8c53b24bb7
@ -1,14 +1,12 @@
|
|||||||
# Unit test
|
# Unit test
|
||||||
if(WEBCC_BUILD_UNITTEST)
|
set(UT_SRCS
|
||||||
set(UT_SRCS
|
rest_service_manager_test.cc
|
||||||
rest_service_manager_test.cc
|
)
|
||||||
)
|
|
||||||
|
|
||||||
set(UT_TARGET_NAME webcc_unittest)
|
set(UT_TARGET_NAME webcc_unittest)
|
||||||
|
|
||||||
add_executable(${UT_TARGET_NAME} ${UT_SRCS})
|
add_executable(${UT_TARGET_NAME} ${UT_SRCS})
|
||||||
target_link_libraries(${UT_TARGET_NAME} webcc pugixml gtest ${Boost_LIBRARIES})
|
target_link_libraries(${UT_TARGET_NAME} webcc pugixml gtest ${Boost_LIBRARIES})
|
||||||
target_link_libraries(${UT_TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
target_link_libraries(${UT_TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
||||||
|
|
||||||
add_test(${UT_TARGET_NAME} ${UT_TARGET_NAME})
|
add_test(${UT_TARGET_NAME} ${UT_TARGET_NAME})
|
||||||
endif()
|
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef WEBCC_CONFIG_H_
|
||||||
|
#define WEBCC_CONFIG_H_
|
||||||
|
|
||||||
|
// Compile configurations.
|
||||||
|
|
||||||
|
#define WEBCC_ENABLE_LOG @WEBCC_ENABLE_LOG@
|
||||||
|
|
||||||
|
#if WEBCC_ENABLE_LOG
|
||||||
|
#define WEBCC_LOG_LEVEL @WEBCC_LOG_LEVEL@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // WEBCC_CONFIG_H_
|
Loading…
Reference in New Issue