Skip to content

Commit

Permalink
[CMake] mini_required 2.6->3.5 and fix CXX_VERSION variable passed fr…
Browse files Browse the repository at this point in the history
…om cmd
  • Loading branch information
yanyiwu committed Jul 27, 2024
1 parent 732fec4 commit f8d0631
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
CMAKE_MINIMUM_REQUIRED (VERSION 3.5)
PROJECT(CPPJIEBA)

CMAKE_MINIMUM_REQUIRED (VERSION 2.6)

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/deps/limonp/include
${PROJECT_SOURCE_DIR}/include)

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX "/usr/local/cppjieba" CACHE PATH "default install path" FORCE )
endif()

ADD_DEFINITIONS(-O3 -Wall -g)
IF(APPLE) # mac os
ADD_DEFINITIONS(-std=c++0x)
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

ADD_DEFINITIONS(-O3 -Wall -g)

ADD_SUBDIRECTORY(deps)
ADD_SUBDIRECTORY(test)

ENABLE_TESTING()
Expand Down

0 comments on commit f8d0631

Please sign in to comment.