Browse Source

Added missing CMake files, fixed a linker issue

master
Jessica James 6 years ago
parent
commit
708e33817d
  1. 1
      .gitignore
  2. 6
      build/CMakeLists.txt
  3. 13
      build/GNU/CMakeLists.txt
  4. 2
      src/common/CMakeLists.txt

1
.gitignore

@ -34,7 +34,6 @@
# Build directories
.idea
.vs/
build/
cmake-build-*
[Dd]ebug/

6
build/CMakeLists.txt

@ -0,0 +1,6 @@
# Include any compiler-specifc settings
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_CXX_COMPILER_ID}")
include("${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_CXX_COMPILER_ID}/CMakeLists.txt")
else()
message(STATUS "No compiler-specific settings set; CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
endif()

13
build/GNU/CMakeLists.txt

@ -0,0 +1,13 @@
# GCC-specific compiler settings
# Enable all/extra warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
# Treat all warnings as errors
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
# Enable address sanitizer on debug
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
# Enable std::filesystem
set(JESSILIB_ADDITOINAL_LIBS "stdc++fs")

2
src/common/CMakeLists.txt

@ -6,3 +6,5 @@ set(SOURCE_FILES
timer/timer.cpp timer/timer_manager.cpp thread_pool.cpp timer/timer_context.cpp timer/cancel_token.cpp timer/synchronized_timer.cpp object.cpp parser/parser.cpp parser/parser_manager.cpp config.cpp serialize.cpp)
add_library(jessilib ${SOURCE_FILES})
target_link_libraries(jessilib ${JESSILIB_ADDITOINAL_LIBS})

Loading…
Cancel
Save