Skip to content

Commit

Permalink
Use project-local CMake variables instead of top-level CMake variables (
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesathey authored and kuba-- committed Jul 24, 2018
1 parent db1221d commit 9611ec3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@
# Temporary
*.swp
.DS_Store

# CMake
CMakeScripts
*.cmake

# Xcode
*.build
*.xcodeproj
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ endif (MSVC)

# zip
set(SRC src/miniz.h src/zip.h src/zip.c)
add_library(${CMAKE_PROJECT_NAME} ${SRC})
add_library(${PROJECT_NAME} ${SRC})

# test
enable_testing()
add_subdirectory(test)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
find_package(Sanitizers)
add_sanitizers(${CMAKE_PROJECT_NAME} test.exe)
add_sanitizers(${PROJECT_NAME} test.exe)

0 comments on commit 9611ec3

Please sign in to comment.