-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Meta]: Modernize setting the C++ version in CMake
Replaced setting CMAKE_CXX_STANDARD and CMAKE_CXX_STANDARD_REQUIRED with set_target_properties to avoid unintentionally affecting top level consuming projects.
- Loading branch information
Showing
13 changed files
with
83 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(guidance_example) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
if(NOT BUILD_EXAMPLES) | ||
find_package(isobus REQUIRED) | ||
endif() | ||
find_package(Threads REQUIRED) | ||
|
||
add_executable(GuidanceExampleTarget main.cpp console_logger.cpp) | ||
|
||
set_target_properties( | ||
GuidanceExampleTarget | ||
PROPERTIES CXX_STANDARD 14 | ||
CXX_EXTENSIONS OFF | ||
CXX_STANDARD_REQUIRED ON) | ||
|
||
target_link_libraries( | ||
GuidanceExampleTarget PRIVATE isobus::Isobus isobus::HardwareIntegration | ||
isobus::Utility Threads::Threads) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(nmea2000_example) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
if(NOT BUILD_EXAMPLES) | ||
find_package(isobus REQUIRED) | ||
endif() | ||
find_package(Threads REQUIRED) | ||
|
||
add_executable(NMEA2KExampleTarget main.cpp) | ||
|
||
set_target_properties( | ||
NMEA2KExampleTarget | ||
PROPERTIES CXX_STANDARD 14 | ||
CXX_EXTENSIONS OFF | ||
CXX_STANDARD_REQUIRED ON) | ||
|
||
target_link_libraries( | ||
NMEA2KExampleTarget PRIVATE isobus::Isobus isobus::HardwareIntegration | ||
Threads::Threads isobus::Utility) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(pgn_requests_example) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
if(NOT BUILD_EXAMPLES) | ||
find_package(isobus REQUIRED) | ||
endif() | ||
find_package(Threads REQUIRED) | ||
|
||
add_executable(PGNRequestExampleTarget main.cpp) | ||
|
||
set_target_properties( | ||
PGNRequestExampleTarget | ||
PROPERTIES CXX_STANDARD 14 | ||
CXX_EXTENSIONS OFF | ||
CXX_STANDARD_REQUIRED ON) | ||
|
||
target_link_libraries( | ||
PGNRequestExampleTarget PRIVATE isobus::Isobus isobus::HardwareIntegration | ||
Threads::Threads isobus::Utility) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
examples/virtual_terminal/version3_object_pool/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters