From f7e4078e6a19c41ffd3498a3675cf35e5055c676 Mon Sep 17 00:00:00 2001 From: Remy Chibois Date: Sun, 21 Jan 2024 18:11:45 +0100 Subject: [PATCH] chore: vastly improved config/reconfig detection and workflow --- cpp/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 6b07b3b2a..c73eeca6d 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -9,6 +9,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_POSITION_INDEPENDENT_CODE ON) +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + add_compile_definitions(_CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS) +endif() + find_package(nlohmann_json CONFIG REQUIRED) find_package(cucumber_messages CONFIG REQUIRED) @@ -18,9 +22,9 @@ add_subdirectory(src/bin/gherkin-generate-tokens) install( TARGETS - cucumber_gherkin_lib cucumber_gherkin_bin cucumber_gherkin_generate_tokens_bin + cucumber_gherkin_lib EXPORT cucumber_gherkin-config RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}