mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Bump CMake requirement to 3.1 and fix code which requires 3.2+
CMake supports CXX_STANDARD target property (and therefore automatic -std=c++11) since 3.1 Thanks to noteness for the report
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(ZNC VERSION 1.7.0)
|
||||
set(ZNC_VERSION 1.7.x)
|
||||
set(append_git_version true)
|
||||
@@ -332,6 +332,4 @@ message("")
|
||||
# TODO
|
||||
# ====
|
||||
#
|
||||
# readme: advice about cmake --system-information
|
||||
# remove old configure.ac and Makefile.in
|
||||
# consider mininum cmake version
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
# Since 3.2 it does this automatically from BYPRODUCTS
|
||||
set_source_files_properties("versionc.cpp" PROPERTIES GENERATED true)
|
||||
endif()
|
||||
|
||||
znc_add_library(znclib ${lib_type} "ZNCString.cpp" "znc.cpp" "IRCNetwork.cpp"
|
||||
"IRCSock.cpp" "Client.cpp" "Chan.cpp" "Nick.cpp" "Server.cpp"
|
||||
"Modules.cpp" "MD5.cpp" "Buffer.cpp" "Utils.cpp" "FileUtils.cpp"
|
||||
|
||||
@@ -56,7 +56,7 @@ args = parser.parse_args()
|
||||
|
||||
with tempfile.TemporaryDirectory() as cmdir:
|
||||
with open(os.path.join(cmdir, 'CMakeLists.txt'), 'w') as cm:
|
||||
print('cmake_minimum_required(VERSION 3.0)', file=cm)
|
||||
print('cmake_minimum_required(VERSION 3.1)', file=cm)
|
||||
print('project(ExternalModules)', file=cm)
|
||||
print('find_package(ZNC @ZNC_VERSION_MAJOR@.@ZNC_VERSION_MINOR@ PATHS '
|
||||
'@CMAKE_INSTALL_FULL_DATADIR@/znc)', file=cm)
|
||||
|
||||
Reference in New Issue
Block a user