added target for tomlc99
This commit is contained in:
parent
347a2f0088
commit
e4c36f341b
|
@ -66,6 +66,22 @@ add_custom_command(OUTPUT ${YACC_GENERATED_SOURCE_FILE}
|
||||||
COMMENT "generate C source file for parser"
|
COMMENT "generate C source file for parser"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
||||||
|
# ------------------------------------------------ #
|
||||||
|
# TOML-C99 #
|
||||||
|
# ------------------------------------------------ #
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/dep/tomlc99/toml.c
|
||||||
|
COMMAND git
|
||||||
|
ARGS submodule update --init --recursive --checkout
|
||||||
|
COMMENT "checkout dependency TOML-C99"
|
||||||
|
VERBATIM)
|
||||||
|
|
||||||
|
add_library(tomlc99 ${PROJECT_SOURCE_DIR}/dep/tomlc99/toml.c)
|
||||||
|
set_target_properties(tomlc99
|
||||||
|
PROPERTIES
|
||||||
|
OUTPUT_NAME "toml"
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY ${GEMSTONE_BINARY_DIR}/dep)
|
||||||
|
|
||||||
# ------------------------------------------------ #
|
# ------------------------------------------------ #
|
||||||
# Source #
|
# Source #
|
||||||
# ------------------------------------------------ #
|
# ------------------------------------------------ #
|
||||||
|
@ -93,6 +109,8 @@ set_target_properties(release
|
||||||
OUTPUT_NAME "gsc"
|
OUTPUT_NAME "gsc"
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${GEMSTONE_BINARY_DIR}/release)
|
RUNTIME_OUTPUT_DIRECTORY ${GEMSTONE_BINARY_DIR}/release)
|
||||||
|
|
||||||
|
target_link_libraries(release tomlc99)
|
||||||
|
|
||||||
# FIXME: cannot compile with /O2 because of /RTC1 flag
|
# FIXME: cannot compile with /O2 because of /RTC1 flag
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set(RELEASE_FLAGS)
|
set(RELEASE_FLAGS)
|
||||||
|
@ -125,6 +143,8 @@ set_target_properties(debug
|
||||||
OUTPUT_NAME "gsc"
|
OUTPUT_NAME "gsc"
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${GEMSTONE_BINARY_DIR}/debug)
|
RUNTIME_OUTPUT_DIRECTORY ${GEMSTONE_BINARY_DIR}/debug)
|
||||||
|
|
||||||
|
target_link_libraries(debug tomlc99)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set(DEBUG_FLAGS /DEBUG)
|
set(DEBUG_FLAGS /DEBUG)
|
||||||
else()
|
else()
|
||||||
|
@ -154,6 +174,8 @@ set_target_properties(check
|
||||||
OUTPUT_NAME "gsc"
|
OUTPUT_NAME "gsc"
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${GEMSTONE_BINARY_DIR}/check)
|
RUNTIME_OUTPUT_DIRECTORY ${GEMSTONE_BINARY_DIR}/check)
|
||||||
|
|
||||||
|
target_link_libraries(check tomlc99)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set(CHECK_FLAGS /DEBUG /WX)
|
set(CHECK_FLAGS /DEBUG /WX)
|
||||||
else()
|
else()
|
||||||
|
|
Loading…
Reference in New Issue