Permalink
Browse files

Apply cmake-init 754eda5fe2956294e1c7af6b30c10cb766ce2099

  • Loading branch information...
scheibel committed Mar 27, 2017
1 parent 101bfe3 commit 249474cc42de27416d1c65d7391ea630f96448d2
View
@@ -26,8 +26,8 @@ matrix:
before_install:
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-add-repository ppa:cginternals/backports-ppa -y; fi
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update -qq; fi
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -qq cmake libgl1-mesa-dev mesa-common-dev libglew-dev libglfw3-dev qt5-default libcpplocate-dev; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install qt5; fi
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -qq cmake libgl1-mesa-dev mesa-common-dev libglew-dev libglfw3-dev qt5-default libcpplocate-dev cppcheck clang-tidy-3.8; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install qt5 cppcheck; fi
before_script:
- ./configure
@@ -37,3 +37,4 @@ before_script:
script:
- cmake --build $BUILD_DIR
- cmake --build $BUILD_DIR --target test
- cmake --build $BUILD_DIR --target check-all
View
@@ -21,6 +21,7 @@ endif()
include(cmake/GetGitRevisionDescription.cmake)
include(cmake/Custom.cmake)
include(cmake/HealthCheck.cmake)
# Set policies
set_policy(CMP0028 NEW) # ENABLE CMP0028: Double colon in target name means ALIAS or IMPORTED target.
@@ -52,7 +53,7 @@ set(META_VERSION_PATCH "1")
set(META_VERSION_REVISION "${GIT_REV}")
set(META_VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}")
set(META_NAME_VERSION "${META_PROJECT_NAME} v${META_VERSION} (${META_VERSION_REVISION})")
set(META_CMAKE_INIT_SHA "70a376bc91291a73a976f96871a657d54a158dd5")
set(META_CMAKE_INIT_SHA "754eda5fe2956294e1c7af6b30c10cb766ce2099")
string(MAKE_C_IDENTIFIER ${META_PROJECT_NAME} META_PROJECT_ID)
string(TOUPPER ${META_PROJECT_ID} META_PROJECT_ID)
@@ -98,6 +99,14 @@ file(WRITE "${PROJECT_BINARY_DIR}/VERSION" "${META_NAME_VERSION}")
include(cmake/CompileOptions.cmake)
#
# Project Health Check Setup
#
enable_cppcheck(On)
enable_clang_tidy(On)
#
# Deployment/installation setup
#
View
@@ -0,0 +1,18 @@
# Function to register a target for clang-tidy
function(perform_clang_tidy check_target target)
set(includes "$<TARGET_PROPERTY:${target},INCLUDE_DIRECTORIES>")
add_custom_target(
${check_target}
COMMAND
${clang_tidy_EXECUTABLE}
-p\t${PROJECT_BINARY_DIR}
${ARGN}
-checks=*
"$<$<NOT:$<BOOL:${CMAKE_EXPORT_COMPILE_COMMANDS}>>:--\t$<$<BOOL:${includes}>:-I$<JOIN:${includes},\t-I>>>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_dependencies(${check_target} ${target})
endfunction()
@@ -128,8 +128,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH
$<$<CXX_COMPILER_ID:Clang>:
-Wpedantic
-Wreturn-stack-address
# -Wreturn-stack-address # gives false positives
>
PUBLIC
$<$<PLATFORM_ID:Darwin>:
View
@@ -0,0 +1,22 @@
# Function to register a target for cppcheck
function(perform_cppcheck check_target target)
set(includes "$<TARGET_PROPERTY:${target},INCLUDE_DIRECTORIES>")
add_custom_target(
${check_target}
COMMAND
${cppcheck_EXECUTABLE}
"$<$<BOOL:${includes}>:-I$<JOIN:${includes},\t-I>>"
--check-config
--enable=warning,performance,portability,information,missingInclude
--quiet
--std=c++11
--verbose
--suppress=missingIncludeSystem
${ARGN}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_dependencies(${check_target} ${target})
endfunction()
View
@@ -26,7 +26,35 @@ find_path(GLFW_INCLUDE_DIR GLFW/glfw3.h
DOC "The directory where GLFW/glfw.h resides")
find_library(GLFW_LIBRARY_RELEASE NAMES glfw3 glfw glfw3dll glfwdll
set(GLFW_LIB_SUFFIX "")
if(MSVC14)
set(GLFW_LIB_SUFFIX "vc2015")
elseif(MSVS12)
set(GLFW_LIB_SUFFIX "vc2013")
elseif(MSVC11)
set(GLFW_LIB_SUFFIX "vc2012")
elseif(MSVC10)
set(GLFW_LIB_SUFFIX "vc2010")
elseif(MINGW)
if(X64)
set(GLFW_LIB_SUFFIX "mingw-w64")
else()
set(GLFW_LIB_SUFFIX "mingw")
endif()
endif()
set(GLFW_NAMES glfw3 glfw)
set(GLFW_DEBUG_NAMES glfw3d glfwd)
if(WIN32)
option(GLFW_SHARED "Use shared GLFW library (DLL)" ON)
if(GLFW_SHARED)
set(GLFW_NAMES glfw3dll glfwdll)
set(GLFW_DEBUG_NAMES glfw3ddll glfwddll)
endif()
endif()
find_library(GLFW_LIBRARY_RELEASE NAMES ${GLFW_NAMES}
HINTS
${GLFW_INCLUDE_DIR}/..
@@ -49,11 +77,12 @@ find_library(GLFW_LIBRARY_RELEASE NAMES glfw3 glfw glfw3dll glfwdll
PATH_SUFFIXES
/lib
/lib64
/lib-${GLFW_LIB_SUFFIX}
/src # for from-source builds
DOC "The GLFW library")
find_library(GLFW_LIBRARY_DEBUG NAMES glfw3d glfwd glfw3ddll glfwddll
find_library(GLFW_LIBRARY_DEBUG NAMES ${GLFW_DEBUG_NAMES}
HINTS
${GLFW_INCLUDE_DIR}/..
@@ -91,7 +120,7 @@ elseif(GLFW_LIBRARY_DEBUG)
set(GLFW_LIBRARIES ${GLFW_LIBRARY_DEBUG})
endif()
if(WIN32)
if(WIN32 AND GLFW_SHARED)
find_file(GLFW_BINARY glfw3.dll
@@ -106,6 +135,7 @@ if(WIN32)
PATH_SUFFIXES
/lib
/bin
/lib-${GLFW_LIB_SUFFIX}
DOC "The GLFW binary")
View
@@ -0,0 +1,27 @@
# Findclang_tidy results:
# clang_tidy_FOUND
# clang_tidy_EXECUTABLE
include(FindPackageHandleStandardArgs)
find_program(clang_tidy_EXECUTABLE
NAMES
clang-tidy-3.5
clang-tidy-3.6
clang-tidy-3.7
clang-tidy-3.8
clang-tidy-3.9
clang-tidy-4.0
PATHS
"${CLANG_TIDY_DIR}"
)
find_package_handle_standard_args(clang_tidy
FOUND_VAR
clang_tidy_FOUND
REQUIRED_VARS
clang_tidy_EXECUTABLE
)
mark_as_advanced(clang_tidy_EXECUTABLE)
View
@@ -0,0 +1,22 @@
# Findcppcheck results:
# cppcheck_FOUND
# cppcheck_EXECUTABLE
include(FindPackageHandleStandardArgs)
find_program(cppcheck_EXECUTABLE
NAMES
cppcheck
PATHS
"${CPPCHECK_DIR}"
)
find_package_handle_standard_args(cppcheck
FOUND_VAR
cppcheck_FOUND
REQUIRED_VARS
cppcheck_EXECUTABLE
)
mark_as_advanced(cppcheck_EXECUTABLE)
View
@@ -0,0 +1,73 @@
include(${CMAKE_CURRENT_LIST_DIR}/Cppcheck.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/ClangTidy.cmake)
set(OPTION_CPPCHECK_ENABLED Off)
set(OPTION_CLANG_TIDY_ENABLED Off)
# Function to register a target for enabled health checks
function(perform_health_checks target)
if(NOT TARGET check-all)
add_custom_target(check-all)
endif()
add_custom_target(check-${target})
if (OPTION_CPPCHECK_ENABLED)
perform_cppcheck(cppcheck-${target} ${target} ${ARGN})
add_dependencies(check-${target} cppcheck-${target})
endif()
if (OPTION_CLANG_TIDY_ENABLED)
perform_clang_tidy(clang-tidy-${target} ${target} ${ARGN})
add_dependencies(check-${target} clang-tidy-${target})
endif()
add_dependencies(check-all check-${target})
endfunction()
# Enable or disable cppcheck for health checks
function(enable_cppcheck status)
if(NOT ${status})
set(OPTION_CPPCHECK_ENABLED ${status} PARENT_SCOPE)
message(STATUS "Check cppcheck skipped: Manually disabled")
return()
endif()
find_package(cppcheck)
if(NOT cppcheck_FOUND)
set(OPTION_CPPCHECK_ENABLED Off PARENT_SCOPE)
message(STATUS "Check cppcheck skipped: cppcheck not found")
return()
endif()
set(OPTION_CPPCHECK_ENABLED ${status} PARENT_SCOPE)
message(STATUS "Check cppcheck")
endfunction()
# Enable or disable clang-tidy for health checks
function(enable_clang_tidy status)
if(NOT ${status})
set(OPTION_CLANG_TIDY_ENABLED ${status} PARENT_SCOPE)
message(STATUS "Check clang-tidy skipped: Manually disabled")
return()
endif()
find_package(clang_tidy)
if(NOT clang_tidy_FOUND)
set(OPTION_CLANG_TIDY_ENABLED Off PARENT_SCOPE)
message(STATUS "Check clang-tidy skipped: clang-tidy not found")
return()
endif()
set(OPTION_CLANG_TIDY_ENABLED ${status} PARENT_SCOPE)
message(STATUS "Check clang-tidy")
set(CMAKE_EXPORT_COMPILE_COMMANDS On PARENT_SCOPE)
endfunction()
@@ -0,0 +1,23 @@
libglbinding (2.1.1-0) UNRELEASED; urgency=medium
* Minor release 2.1.1
-- Willy Scheibel <willy.scheibel@cginternals.com> Mon, 01 Jul 2016 09:27:00 +0200
libglbinding (2.1.0-0) UNRELEASED; urgency=medium
* Minor release 2.1
-- Willy Scheibel <willy.scheibel@cginternals.com> Mon, 27 Jun 2016 17:33:00 +0200
libglbinding (2.0.0-0) UNRELEASED; urgency=medium
* Major release 2.0
-- Willy Scheibel <willy.scheibel@cginternals.com> Wed, 23 Mar 2016 21:27:51 +0100
libglbinding (1.1.0-0) UNRELEASED; urgency=low
* Initial release.
-- Willy Scheibel <willy.scheibel@cginternals.com> Tue, 26 Jan 2016 12:50:03 +0100
@@ -0,0 +1 @@
9
@@ -0,0 +1,58 @@
Source: libglbinding
Section: misc
Priority: optional
Maintainer: Willy Scheibel <willy.scheibel@cginternals.com>
Build-Depends: build-essential, cmake, libgl1-mesa-dev, libglfw3-dev, libcpplocate-dev, libcpplocate-dbg, qtbase5-dev, doxygen, graphviz
Standards-Version: 3.8.0
Package: libglbinding
Architecture: any
Depends: libgl1-mesa-glx
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Package: libglbinding-dev
Architecture: any
Depends: libglbinding
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Package: libglbinding-examples-data
Architecture: any
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Package: libglbinding-examples-glfw
Architecture: any
Depends: libglbinding, libglbinding-examples-data, libglfw3
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Package: libglbinding-examples-qt
Architecture: any
Depends: libglbinding, libglbinding-examples-data, libqt5core5a
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Package: libglbinding-tools
Architecture: any
Depends: libglbinding, libglfw3
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Package: libglbinding-docs
Architecture: any
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Package: libglbinding-dbg
Architecture: any
Depends: libglbinding, libglbinding-dev
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Package: libglbinding-all
Architecture: any
Depends: libglbinding, libglbinding-dev, libglbinding-docs, libglbinding-tools, libglbinding-examples-glfw, libglbinding-examples-qt
Homepage: https://glbinding.org
Description: A C++ binding for the OpenGL API, generated using the gl.xml specification.
Oops, something went wrong.

0 comments on commit 249474c

Please sign in to comment.