diff --git a/CMakeLists.txt b/CMakeLists.txt index 719a7b2475..d388f30fac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,9 @@ endif() option(WITH_NO_DEPRECATED_CODE "Do not include deprecated code" OFF) -set(WITH_STL "OFF" CACHE STRING "Which version of the Standard Library for C++ to use") +set(WITH_STL + "OFF" + CACHE STRING "Which version of the Standard Library for C++ to use") option(WITH_GSL "Whether to use Guidelines Support Library for C++ latest features" OFF) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index de5fd09110..9e50bc51f0 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -53,23 +53,29 @@ endif() if(WITH_STL STREQUAL "OFF") message(STATUS "Building WITH_STL=OFF") - target_compile_definitions(opentelemetry_api INTERFACE OPENTELEMETRY_STL_VERSION=0) + target_compile_definitions(opentelemetry_api + INTERFACE OPENTELEMETRY_STL_VERSION=0) elseif(WITH_STL STREQUAL "CXX11") message(STATUS "Building WITH_STL=CXX1") - target_compile_definitions(opentelemetry_api INTERFACE OPENTELEMETRY_STL_VERSION=2011) + target_compile_definitions(opentelemetry_api + INTERFACE OPENTELEMETRY_STL_VERSION=2011) elseif(WITH_STL STREQUAL "CXX14") message(STATUS "Building WITH_STL=CXX14") - target_compile_definitions(opentelemetry_api INTERFACE OPENTELEMETRY_STL_VERSION=2014) + target_compile_definitions(opentelemetry_api + INTERFACE OPENTELEMETRY_STL_VERSION=2014) elseif(WITH_STL STREQUAL "CXX17") message(STATUS "Building WITH_STL=CXX17") - target_compile_definitions(opentelemetry_api INTERFACE OPENTELEMETRY_STL_VERSION=2017) + target_compile_definitions(opentelemetry_api + INTERFACE OPENTELEMETRY_STL_VERSION=2017) elseif(WITH_STL STREQUAL "CXX20") message(STATUS "Building WITH_STL=CXX20") - target_compile_definitions(opentelemetry_api INTERFACE OPENTELEMETRY_STL_VERSION=2020) + target_compile_definitions(opentelemetry_api + INTERFACE OPENTELEMETRY_STL_VERSION=2020) elseif(WITH_STL STREQUAL "ON") message(STATUS "Building WITH_STL=ON") # "ON" corresponds to "CXX20" at this time. - target_compile_definitions(opentelemetry_api INTERFACE OPENTELEMETRY_STL_VERSION=2020) + target_compile_definitions(opentelemetry_api + INTERFACE OPENTELEMETRY_STL_VERSION=2020) else() message(FATAL_ERROR "WITH_STL must be ON, OFF, CXX11, CXX14, CXX17 or CXX20") endif() diff --git a/ext/test/http/CMakeLists.txt b/ext/test/http/CMakeLists.txt index 3ce72b3b83..328f78638b 100644 --- a/ext/test/http/CMakeLists.txt +++ b/ext/test/http/CMakeLists.txt @@ -25,7 +25,7 @@ endif() set(URL_PARSER_FILENAME url_parser_test) add_executable(${URL_PARSER_FILENAME} ${URL_PARSER_FILENAME}.cc) target_link_libraries(${URL_PARSER_FILENAME} ${GTEST_BOTH_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT}) + ${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) gtest_add_tests( TARGET ${URL_PARSER_FILENAME} TEST_PREFIX ext.http.urlparser.