Add option to enable all-in-one build mode

Related issue: #626

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
Zsolt Borbély
2015-11-20 16:22:43 +01:00
parent aa74c3e2e0
commit fe157301a2
4 changed files with 46 additions and 18 deletions
+16 -2
View File
@@ -135,8 +135,7 @@ project (JerryCore CXX C ASM)
file(GLOB SOURCE_CORE_PARSER_REGEXP parser/regexp/*.cpp)
file(GLOB SOURCE_CORE_JRT jrt/*.cpp)
set(SOURCE_CORE
jerry.cpp
set(SOURCE_CORE_FILES
${SOURCE_CORE_API}
${SOURCE_CORE_LIT}
${SOURCE_CORE_RCS}
@@ -150,6 +149,21 @@ project (JerryCore CXX C ASM)
${SOURCE_CORE_PARSER_REGEXP}
${SOURCE_CORE_JRT})
# All-in-one build
if("${ENABLE_ALL_IN_ONE}" STREQUAL "ON")
set(ALL_IN_FILE "${CMAKE_BINARY_DIR}/jerry-all-in.cpp")
list(SORT SOURCE_CORE_FILES)
file(REMOVE ${ALL_IN_FILE})
foreach(FILE ${SOURCE_CORE_FILES})
file(APPEND ${ALL_IN_FILE} "#include \"${FILE}\"\n")
endforeach()
set(SOURCE_CORE ${ALL_IN_FILE})
else()
set(SOURCE_CORE ${SOURCE_CORE_FILES})
endif()
# Per-option configuration
# Valgrind
if("${ENABLE_VALGRIND}" STREQUAL "ON")