Skip to content

Commit

Permalink
Merge pull request #3 from IgorKilipenko/dev/v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKilipenko committed May 14, 2024
2 parents 39e767f + b394710 commit 3302c8c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cmake.configureSettings": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_BUILD_TYPE": "Debug"
},
"[cpp]": {
"editor.suggestSelection": "recentlyUsedByPrefix",
Expand All @@ -13,5 +13,6 @@
"cSpell.words": [
"antlr",
"apostroph"
]
],
"cmake.options.statusBarVisibility": "compact"
}
21 changes: 16 additions & 5 deletions spreadsheet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(spreadsheet)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 17)
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(
CMAKE_CXX_FLAGS_DEBUG
Expand Down Expand Up @@ -38,21 +38,32 @@ file(GLOB sources
*.h
)

set(sources_lib ${sources})

list(FILTER sources_lib EXCLUDE REGEX ".*main\\.cpp$")

add_library(
libspreadsheet
${ANTLR_FormulaParser_CXX_OUTPUTS}
${sources_lib}
)

add_executable(
spreadsheet
${ANTLR_FormulaParser_CXX_OUTPUTS}
${sources}
main.cpp
)

target_link_libraries(spreadsheet antlr4_static)
target_link_libraries(libspreadsheet antlr4_static)
if(MSVC)
target_compile_options(antlr4_static PRIVATE /W0)
endif()

target_link_libraries(spreadsheet PRIVATE libspreadsheet)

install(
TARGETS spreadsheet
DESTINATION bin
EXPORT spreadsheet
EXPORT libspreadsheet
)

set_directory_properties(PROPERTIES VS_STARTUP_PROJECT spreadsheet)

0 comments on commit 3302c8c

Please sign in to comment.