-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add cmake support and .gitignore file
- Loading branch information
1 parent
1677374
commit 6d0a6e4
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.cache | ||
build | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(pico) | ||
|
||
option(PICO_TEST "build test" OFF) | ||
option(PICO_EXAMPLE "build example" OFF) | ||
|
||
if(PICO_TEST) | ||
add_subdirectory(test) | ||
endif() | ||
|
||
if(PICO_EXAMPLE) | ||
add_subdirectory(example) | ||
endif() | ||
|
||
add_library(${PROJECT_NAME} INTERFACE) | ||
target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_SOURCE_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
add_executable(hasher hasher.cpp) | ||
target_include_directories(hasher | ||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>) | ||
add_executable(interactive_hasher interactive_hasher.cpp) | ||
target_include_directories(interactive_hasher | ||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
include(CTest) | ||
|
||
add_executable(unittest) | ||
|
||
target_sources(unittest PRIVATE test.cpp) | ||
|
||
target_include_directories(unittest | ||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>) | ||
|
||
add_test(NAME unittest COMMAND unittest) |