diff --git a/cmake/BuildJSONCONS.cmake b/cmake/BuildJSONCONS.cmake index 1f78c5b..1eebbf5 100644 --- a/cmake/BuildJSONCONS.cmake +++ b/cmake/BuildJSONCONS.cmake @@ -1,4 +1,4 @@ set(JSONCONS_BUILD_TESTS OFF) -add_subdirectory(vendor/jsoncons EXCLUDE_FROM_ALL) +add_subdirectory(${CMAKE_SOURCE_DIR}/vendor/jsoncons ${CMAKE_BINARY_DIR}/jsoncons EXCLUDE_FROM_ALL) diff --git a/cmake/BuildMyCurl.cmake b/cmake/BuildMyCurl.cmake index a1dd9ef..4c13e5f 100644 --- a/cmake/BuildMyCurl.cmake +++ b/cmake/BuildMyCurl.cmake @@ -15,7 +15,7 @@ set(CURL_USE_LIBSSH2 OFF) set(BUILD_TESTING OFF) set(PICKY_COMPILER OFF) -add_subdirectory(vendor/curl EXCLUDE_FROM_ALL) +add_subdirectory(${CMAKE_SOURCE_DIR}/vendor/curl EXCLUDE_FROM_ALL) if(OS_MACOS) target_compile_options( libcurl PRIVATE -Wno-error=ambiguous-macro -Wno-error=deprecated-declarations -Wno-error=unreachable-code diff --git a/cmake/BuildPugiXML.cmake b/cmake/BuildPugiXML.cmake index 0d936b5..56d98c9 100644 --- a/cmake/BuildPugiXML.cmake +++ b/cmake/BuildPugiXML.cmake @@ -10,8 +10,8 @@ ExternalProject_Add( pugixml_build URL https://github.com/zeux/pugixml/releases/download/v1.13/pugixml-1.13.tar.gz URL_MD5 3e4c588e03bdca140844f3c47c1a995e - INSTALL_BYPRODUCTS /lib/${CMAKE_STATIC_LIBRARY_PREFIX}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX} CMAKE_GENERATOR ${CMAKE_GENERATOR} + INSTALL_BYPRODUCTS /lib/${CMAKE_STATIC_LIBRARY_PREFIX}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= -DBUILD_SHARED_LIBS=OFF -DPUGIXML_BUILD_TESTS=OFF ${PUGIXML_CMAKE_PLATFORM_OPTIONS}) diff --git a/src/parsers/CMakeLists.txt b/src/parsers/CMakeLists.txt index c92a961..a10d559 100644 --- a/src/parsers/CMakeLists.txt +++ b/src/parsers/CMakeLists.txt @@ -1 +1,6 @@ target_sources(${CMAKE_PROJECT_NAME} PRIVATE jsonpointer.cpp jsonpath.cpp regex.cpp xml.cpp errors.cpp) + +# on linux, disable conversion errors +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wno-error -Wno-conversion -Wno-shadow -Wno-unused-parameter) +endif()