Skip to content

Commit

Permalink
Merge remote-tracking branch 'proplib-template/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanielloNTIA committed Jan 16, 2025
2 parents 5d10a5c + 7d932a5 commit 1e0775d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ function(configure_proplib_target proplib_target)
# For GCC-like compilers in 32-bit configurations
"$<${gcc_like_cxx}:$<BUILD_INTERFACE:$<$<BOOL:${BUILD_32BIT}>:-m32>>>"
# For MSVC compiler in any configuration
"$<${msvc_cxx}:$<BUILD_INTERFACE:/W3;/Gd>>"
"$<${msvc_cxx}:$<BUILD_INTERFACE:/Gd>>"
# For MSVC compiler in Release configurations
"$<${msvc_cxx}:$<BUILD_INTERFACE:$<$<CONFIG:Release>:/O2;/DNDEBUG;/MT>>>"
"$<${msvc_cxx}:$<BUILD_INTERFACE:$<$<CONFIG:Release>:/W3;/O2;/DNDEBUG>>>"
# For MSVC compiler in Debug configurations
"$<${msvc_cxx}:$<BUILD_INTERFACE:$<$<CONFIG:Debug>:/Od;/Zi;/MTd>>>"
"$<${msvc_cxx}:$<BUILD_INTERFACE:$<$<CONFIG:Debug>:/W4;/Od;/Zi>>>"
)
endfunction()

Expand Down
20 changes: 10 additions & 10 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{
"name": "debug64",
"displayName": "Debug, 64-Bit",
"description": "Build library and tests with debug options. Skip building driver, driver tests, and docs.",
"description": "Build library, driver and tests with debug options. Skip building docs.",
"inherits": "proplib-config-debug-base"
},
{
Expand All @@ -66,7 +66,7 @@
{
"name": "debug32",
"displayName": "Debug, 32-bit",
"description": "Build 32-bit library and tests with debug options. Skip building driver, driver tests, and docs.",
"description": "Build 32-bit library, driver and tests with debug options. Skip building docs.",
"inherits": "proplib-config-debug-base",
"cacheVariables": {
"BUILD_32BIT": "ON"
Expand Down Expand Up @@ -121,28 +121,28 @@
"name": "debug64",
"inherits": "proplib-build-debug-base",
"displayName": "Build Debug, 64-Bit",
"description": "Build library and tests with debug options, skip building docs",
"description": "Build library, driver and tests with debug options, skip building docs",
"configurePreset": "debug64"
},
{
"name": "release64",
"inherits": "proplib-build-release-base",
"displayName": "Build Release, 64-Bit",
"description": "Build library and tests with release options, and build docs",
"description": "Build library, driver, docs and tests with release options",
"configurePreset": "release64"
},
{
"name": "debug32",
"inherits": "proplib-build-debug-base",
"displayName": "Build Debug, 32-Bit",
"description": "Build library and tests with debug options, skip building docs",
"description": "Build library, driver and tests with debug options, skip building docs",
"configurePreset": "debug32"
},
{
"name": "release32",
"inherits": "proplib-build-release-base",
"displayName": "Build Release, 32-Bit",
"description": "Build library and tests with release options, and build docs",
"description": "Build library, driver, docs and tests with release options",
"configurePreset": "release32"
},
{
Expand Down Expand Up @@ -179,28 +179,28 @@
"name": "debug64",
"inherits": "proplib-test-debug-base",
"displayName": "Test Debug, 64-bit",
"description": "Build library and tests with debug options, skip building docs",
"description": "Build library, driver and tests with debug options, skip building docs",
"configurePreset": "debug64"
},
{
"name": "release64",
"inherits": "proplib-test-release-base",
"displayName": "Test Release, 64-Bit",
"description": "Build library and tests with release options, and build docs",
"description": "Build library, driver and tests with release options, and build docs",
"configurePreset": "release64"
},
{
"name": "debug32",
"inherits": "proplib-test-debug-base",
"displayName": "Test Debug, 32-Bit",
"description": "Build library and tests with debug options, skip building docs",
"description": "Build library, driver and tests with debug options, skip building docs",
"configurePreset": "debug32"
},
{
"name": "release32",
"inherits": "proplib-test-release-base",
"displayName": "Test Release, 32-Bit",
"description": "Build library and tests with release options, and build docs",
"description": "Build library, driver and tests with release options, and build docs",
"configurePreset": "release32"
}
]
Expand Down
1 change: 1 addition & 0 deletions app/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ target_include_directories(${DRIVER_NAME} PUBLIC "${DRIVER_HEADERS}")
# Link the library to the executable
target_link_libraries(${DRIVER_NAME} ${LIB_NAME})

# Set PropLib compiler option defaults
configure_proplib_target(${DRIVER_NAME})

# Add definitions to enable version identification inside the driver
Expand Down
3 changes: 3 additions & 0 deletions app/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ target_include_directories(
# Link the library to the executable
target_link_libraries(${DRIVER_TEST_NAME} ${LIB_NAME})

# Set PropLib compiler option defaults
configure_proplib_target(${DRIVER_TEST_NAME})

# Make driver executable location available to source
add_compile_definitions(DRIVER_LOCATION="$<TARGET_FILE:${DRIVER_NAME}>")

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif ()
# Add the include directory
target_include_directories(${LIB_NAME} PUBLIC "${LIB_HEADERS}")

# Configure compiler options
# Set PropLib compiler option defaults
configure_proplib_target(${LIB_NAME})

# Add definition to get the library name and version inside the library
Expand Down
3 changes: 3 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ add_executable(
"TestUtils.h"
)

# Set PropLib compiler option defaults
configure_proplib_target(${TEST_NAME})

###########################################
## SET UP AND DISCOVER TESTS
###########################################
Expand Down

0 comments on commit 1e0775d

Please sign in to comment.