File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,16 @@ cmake_minimum_required(VERSION 3.18)
33project (meshAPItest LANGUAGES CXX)
44
55set (CMAKE_CXX_STANDARD 17)
6- set (CMAKE_BUILD_TYPE RelWithDebInfo)
6+ if (NOT CMAKE_BUILD_TYPE )
7+ set (CMAKE_BUILD_TYPE RelWithDebInfo)
8+ endif ()
79set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
810
11+ set (TEST_EXTRA_CFLAGS "" CACHE STRING "Extra compiler flags for WPC library and test code. For example '--coverage'." )
12+ set (TEST_EXTRA_LDFLAGS "" CACHE STRING "Extra linker flags for the test executable. For example '--coverage'." )
13+ separate_arguments (TEST_EXTRA_CFLAGS)
14+ separate_arguments (TEST_EXTRA_LDFLAGS)
15+
916add_compile_options (-Wall -Werror -Wextra)
1017
1118set (WPC_LIB_DIR "${CMAKE_CURRENT_LIST_DIR} /../lib/" )
@@ -42,3 +49,8 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
4249include (GoogleTest)
4350gtest_discover_tests(${CMAKE_PROJECT_NAME} )
4451
52+ target_compile_options (wpc PRIVATE ${TEST_EXTRA_CFLAGS} )
53+ target_compile_options (wpc_platform PRIVATE ${TEST_EXTRA_CFLAGS} )
54+ target_compile_options (${CMAKE_PROJECT_NAME} PRIVATE ${TEST_EXTRA_CFLAGS} )
55+ target_link_options (${CMAKE_PROJECT_NAME} PRIVATE ${TEST_EXTRA_LDFLAGS} )
56+
You can’t perform that action at this time.
0 commit comments