From f04d035ef4597ba8a33e3ff318e03b09a8863e5b Mon Sep 17 00:00:00 2001 From: Stephanie Kemna <6518317+StephanieKemna@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:00:14 +0200 Subject: [PATCH] Change CMakeLists: Do not upgrade warnings to errors --- src/mlfmu/fmu_build/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mlfmu/fmu_build/CMakeLists.txt b/src/mlfmu/fmu_build/CMakeLists.txt index d4cc00e..a52ce30 100644 --- a/src/mlfmu/fmu_build/CMakeLists.txt +++ b/src/mlfmu/fmu_build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.9) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") project(cpp-fmus) @@ -28,13 +28,13 @@ set(FMU_NAMES) # ============================================================================== if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - add_compile_options("-Wall" "-Wextra" "-Wpedantic" "-Werror") + add_compile_options("-Wall" "-Wextra" "-Wpedantic") add_compile_options("-Wno-parentheses") if(FMU_USE_STATIC_RUNTIME) add_compile_options("-static") endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - add_compile_options("/W4" "/WX") + add_compile_options("/W3") add_compile_options("/wd4996") add_definitions("-D_SCL_SECURE_NO_WARNINGS" "-D_CRT_SECURE_NO_WARNINGS") if(FMU_USE_STATIC_RUNTIME) @@ -147,7 +147,7 @@ foreach(fmuName IN LISTS FMU_NAMES) "${fmuSourceDir}/sources" "${fmuGuidDir}" ) - + # Target to generate FMU contents add_custom_command(OUTPUT "${fmuOutputFile}" COMMAND "${CMAKE_COMMAND}" "-E" "copy_directory" "${fmuSourceDir}" "${fmuStagingDir}"