Skip to content

Commit

Permalink
Merge pull request #3333 from sanssecours/🏗
Browse files Browse the repository at this point in the history
CMake: Require CMake 3.4
  • Loading branch information
mpranj committed Dec 13, 2019
2 parents 8648340 + 5c68b43 commit fb3413e
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 348 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.4)

# allows us to override platform specific variables
set (CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_SOURCE_DIR}/scripts/cmake/Platform.cmake")
Expand Down
2 changes: 1 addition & 1 deletion doc/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ and `make run_all` (test cases executed from the build directory).
For `make run_all` following development tools enable even more tests:

- The script `checkbashisms` is needed to check for bashism (`tests/shell/check_bashisms.sh`),
it is part of [`devscripts`](https://packages.debian.org/jessie/devscripts).
it is part of [`devscripts`](https://packages.debian.org/devscripts).
- The [POSIX compatibility test for shell scripts](../tests/shell/check_posix.sh) requires the tool [`shfmt`](https://github.com/mvdan/sh).
- `git`, `clang-format` (version 6 up to version 7), and [cmake-format](https://github.com/cheshirekow/cmake_format) to check formatting.
- `pkg-config` must be available (`check_external.sh` and `check_gen.sh`).
Expand Down
6 changes: 5 additions & 1 deletion doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,16 @@ you up to date with the multi-language support provided by Elektra.

plugin any more. After this update, the code compiles without any warnings, even though we now use the compiler switch `-Wconversion`. _(René Schwaiger)_

### Support

- Debian 9 “stretch” (oldstable) is now the oldest supported platform. _(René Schwaiger)_

### CMake

- We fixed warnings about CMake policy [CMP0078](https://cmake.org/cmake/help/latest/policy/CMP0078.html) and [CMP0086](https://cmake.org/cmake/help/latest/policy/CMP0086.html). _(René Schwaiger)_
- The CMake functions `add_msr_test` and `add_msr_test_plugin` do not export the list of required plugins as environment variable any more. _(René Schwaiger)_
- The CMake code of the code generation does not print warnings about unknown regex operators any more. _(René Schwaiger)_
- <<TODO>>
- Generating the build system now requires CMake `3.4` (released in November 2015). _(René Schwaiger)_

### Docker

Expand Down
6 changes: 1 addition & 5 deletions examples/codegen/econf/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ if (ELEKTRA_FOUND)
add_executable (application ../src/application.c ${CMAKE_CURRENT_BINARY_DIR}/genelektra.c)
target_link_libraries (application ${ElektraCodegen_LIBRARIES})

if (CMAKE_VERSION VERSION_LESS "3.1")
target_compile_options (application PRIVATE "-std=c99")
else ()
set_property (TARGET application PROPERTY C_STANDARD 99)
endif ()
set_property (TARGET application PROPERTY C_STANDARD 99)
else (ELEKTRA_FOUND)
message (FATAL_ERROR "Elektra not found")
endif (ELEKTRA_FOUND)
6 changes: 1 addition & 5 deletions examples/codegen/menu/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ if (ELEKTRA_FOUND)
add_executable (application ../src/application.c ${CMAKE_CURRENT_BINARY_DIR}/genelektra.c)
target_link_libraries (application ${ElektraCodegen_LIBRARIES})

if (CMAKE_VERSION VERSION_LESS "3.1")
target_compile_options (application PRIVATE "-std=c99")
else ()
set_property (TARGET application PROPERTY C_STANDARD 99)
endif ()
set_property (TARGET application PROPERTY C_STANDARD 99)
else (ELEKTRA_FOUND)
message (FATAL_ERROR "Elektra not found")
endif (ELEKTRA_FOUND)
6 changes: 1 addition & 5 deletions examples/codegen/tree/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ if (ELEKTRA_FOUND)
add_executable (application ../src/application.c ${CMAKE_CURRENT_BINARY_DIR}/genelektra.c)
target_link_libraries (application ${ElektraCodegen_LIBRARIES})

if (CMAKE_VERSION VERSION_LESS "3.1")
target_compile_options (application PRIVATE "-std=c99")
else ()
set_property (TARGET application PROPERTY C_STANDARD 99)
endif ()
set_property (TARGET application PROPERTY C_STANDARD 99)
else (ELEKTRA_FOUND)
message (FATAL_ERROR "Elektra not found")
endif (ELEKTRA_FOUND)
2 changes: 0 additions & 2 deletions scripts/cmake/Modules/FindAugeas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
# Distributed under the BSD license. See COPYING-CMAKE-SCRIPTS for details.
# ~~~

include (LibFindMacros)

if (LIBAUGEAS_INCLUDE_DIR
AND LIBAUGEAS_LIBRARIES
AND LIBAUGEAS_PREFIX) # in cache already
Expand Down
12 changes: 0 additions & 12 deletions scripts/cmake/Modules/LibFindMacros.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/completion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ if (INSTALL_SYSTEM_FILES)
if (PKG_CONFIG_FOUND)
pkg_check_modules (BASH_COMPLETION bash-completion QUIET)
if (BASH_COMPLETION_FOUND)
include (LibFindMacros)
pkg_get_variable (BASH_COMPLETION_COMPLETIONSDIR bash-completion completionsdir)
endif ()
endif ()
Expand All @@ -40,7 +39,6 @@ if (INSTALL_SYSTEM_FILES)
if (PKG_CONFIG_FOUND)
pkg_check_modules (FISH_FOUND fish QUIET)
if (FISH_FOUND)
include (LibFindMacros)
pkg_get_variable (FISH_COMPLETION_COMPLETIONSDIR fish completionsdir)
endif ()
endif ()
Expand Down
77 changes: 0 additions & 77 deletions scripts/docker/debian/jessie/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions scripts/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,6 @@ def dockerInit() {
"./scripts/docker/debian/stretch/doc.Dockerfile"
)

/* A Debian oldoldstable image used for testing backwards compatibility.
(will be removed on problems)
*/
DOCKER_IMAGES.jessie = createDockerImageDesc(
"debian-jessie", this.&idTesting,
"./scripts/docker/debian/jessie",
"./scripts/docker/debian/jessie/Dockerfile"
)

/* Ubuntu xenial image used to test compatibility with Ubuntu.
*/
DOCKER_IMAGES.xenial = createDockerImageDesc(
Expand Down Expand Up @@ -540,18 +531,6 @@ def generateFullBuildStages() {
CMAKE_FLAGS_CLANG
)

// Build Elektra on jessie to see if we are backwards compatible
// Can be removed if it fails
tasks << buildAndTest(
"debian-jessie-full",
DOCKER_IMAGES.jessie,
CMAKE_FLAGS_BUILD_ALL +
CMAKE_FLAGS_DEBUG +
['COMMON_FLAGS': ''] // The build system can not compile Elektra on Debian Jessie, if we specify the compiler switch `-Werror`.
,
[TEST.ALL, TEST.MEM, TEST.INSTALL]
)

// Build Elektra on debian-unstable for compatibility tests
tasks << buildAndTest(
"debian-unstable-full",
Expand Down
2 changes: 0 additions & 2 deletions scripts/vagrant/debian/jessie64/.gitignore

This file was deleted.

47 changes: 0 additions & 47 deletions scripts/vagrant/debian/jessie64/README.md

This file was deleted.

33 changes: 0 additions & 33 deletions scripts/vagrant/debian/jessie64/Vagrantfile

This file was deleted.

79 changes: 0 additions & 79 deletions scripts/vagrant/debian/jessie64/buildelektra.sh

This file was deleted.

0 comments on commit fb3413e

Please sign in to comment.