added cmake
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
cmake_minimum_required (VERSION 3.6)
|
||||||
|
|
||||||
|
project(leetcode)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
|
add_subdirectory(maxprofit)
|
||||||
|
add_subdirectory(rotate)
|
||||||
|
add_subdirectory(majorityelement)
|
||||||
|
add_subdirectory(twopointers)
|
||||||
|
add_subdirectory(rmdupfromsortedarray)
|
||||||
|
add_subdirectory(rmdupfromsortedarray2)
|
||||||
|
add_subdirectory(maxprofit2)
|
||||||
|
add_subdirectory(canJump)
|
||||||
|
add_subdirectory(jump)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
canJump
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
jump
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
majorityelement
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
maxprofit
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
maxprofit2
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
rmdupfromsortedarray
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
rmdupfromsortedarray2
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
rotate
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
FILE(GLOB_RECURSE SOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
twopointers
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user