diff --git a/CMakeLists.txt b/CMakeLists.txt index 0842ab7..7f110dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # # CMake version -cmake_minimum_required(VERSION 3.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13 FATAL_ERROR) # # Configure CMake environment diff --git a/README.md b/README.md index cc99eea..e901257 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The main target platforms are typical desktop, laptop, and server platforms. Cur However, other UNIX versions may work as well if they are supported by CMake. The cmake-init template assumes you want to setup a project using -* CMake (3.0 or above) +* CMake (3.13 or above) * C/C++ compiler @@ -99,7 +99,7 @@ As with most CMake projects, cmake-init initializes the CMake environment. This ```cmake # CMake version -cmake_minimum_required(VERSION 3.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13 FATAL_ERROR) ``` required policies, @@ -155,12 +155,12 @@ if (WriterCompilerDetectionHeaderFound) endif () ``` -Another issue with older CMake versions is the unavailability of then-unpublished language standards (e.g., C++11 and CMake 3.0). For those versions, the compile options has to be extended manually. +Another issue with older CMake versions is the unavailability of then-unpublished language standards (e.g., C++11 and CMake 3.13). For those versions, the compile options has to be extended manually. For new projects, we suggest to require at least CMake 3.2 and to therefore adjust the minimum required version: ```cmake -cmake_minimum_required(VERSION 3.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13 FATAL_ERROR) ``` diff --git a/appveyor.yml b/appveyor.yml index 7218492..84114ff 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,9 +4,9 @@ branches: - master clone_folder: c:\projects\cmake-init image: -- Visual Studio 2013 - Visual Studio 2015 - Visual Studio 2017 +- Visual Studio 2019 configuration: - Release - Debug @@ -22,12 +22,12 @@ matrix: # skip unsupported combinations init: - set arch= -- if "%arch%"=="Win64" ( set arch= Win64) +- if "%arch%"=="Win64" ( set arch= x64) - echo %arch% - echo %APPVEYOR_BUILD_WORKER_IMAGE% -- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set generator="Visual Studio 15 2017%arch%" ) -- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" ( set generator="Visual Studio 14 2015%arch%" ) -- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" ( set generator="Visual Studio 12 2013%arch%" ) +- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set generator="Visual Studio 15 2017" ) +- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" ( set generator="Visual Studio 14 2015" ) +- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( set generator="Visual Studio 16 2019" ) - echo %generator% before_build: @@ -35,7 +35,7 @@ before_build: mkdir build cd build cmake --version - cmake .. -G %generator% + cmake .. -G %generator% -A %arch% build: project: c:\projects\cmake-init\build\template.sln diff --git a/source/baselib/CMakeLists.txt b/source/baselib/CMakeLists.txt index 806eac2..1d96b9f 100644 --- a/source/baselib/CMakeLists.txt +++ b/source/baselib/CMakeLists.txt @@ -177,7 +177,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/examples/fibcmd/CMakeLists.txt b/source/examples/fibcmd/CMakeLists.txt index 4689fe1..55fd890 100644 --- a/source/examples/fibcmd/CMakeLists.txt +++ b/source/examples/fibcmd/CMakeLists.txt @@ -98,7 +98,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/examples/fibgui/CMakeLists.txt b/source/examples/fibgui/CMakeLists.txt index 50dd4e6..06016c3 100644 --- a/source/examples/fibgui/CMakeLists.txt +++ b/source/examples/fibgui/CMakeLists.txt @@ -121,7 +121,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/fiblib/CMakeLists.txt b/source/fiblib/CMakeLists.txt index 87ca876..7d16a1e 100644 --- a/source/fiblib/CMakeLists.txt +++ b/source/fiblib/CMakeLists.txt @@ -180,7 +180,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt index a458b51..13bdb43 100644 --- a/source/tests/CMakeLists.txt +++ b/source/tests/CMakeLists.txt @@ -4,7 +4,7 @@ # # CMake version -cmake_minimum_required(VERSION 3.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13 FATAL_ERROR) # Meta information about the project set(META_PROJECT_NAME "template") diff --git a/source/tests/fiblib-test/CMakeLists.txt b/source/tests/fiblib-test/CMakeLists.txt index 9eeb4e9..8091419 100644 --- a/source/tests/fiblib-test/CMakeLists.txt +++ b/source/tests/fiblib-test/CMakeLists.txt @@ -95,7 +95,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} )