Set separate directory to place binaries
This commit is contained in:
parent
5cceb9e37a
commit
d69991fa11
@ -11,6 +11,9 @@ set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VE
|
||||
# compile in release with debug info mode by default
|
||||
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build Type")
|
||||
|
||||
# Build all binaries in a separate directory
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." ON)
|
||||
option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." ON)
|
||||
option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." ON)
|
||||
|
@ -15,5 +15,5 @@ set(EXAMPLES
|
||||
tutorial)
|
||||
|
||||
foreach (example ${EXAMPLES})
|
||||
add_executable(${example}_ ${example}/${example}.cpp)
|
||||
add_executable(${example} ${example}/${example}.cpp)
|
||||
endforeach()
|
||||
|
@ -7,5 +7,5 @@ set(PERFTEST_SOURCES
|
||||
add_executable(perftest ${PERFTEST_SOURCES})
|
||||
target_link_libraries(perftest ${TEST_LIBRARIES})
|
||||
add_test(NAME perftest
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/perftest
|
||||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/perftest
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||
|
@ -13,5 +13,5 @@ set(UNITTEST_SOURCES
|
||||
add_executable(unittest ${UNITTEST_SOURCES})
|
||||
target_link_libraries(unittest ${TEST_LIBRARIES})
|
||||
add_test(NAME unittest
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/unittest
|
||||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||
|
Loading…
x
Reference in New Issue
Block a user