diff --git a/src/ansi-c/CMakeLists.txt b/src/ansi-c/CMakeLists.txt index edf755fdf2f..72c431f2fe7 100644 --- a/src/ansi-c/CMakeLists.txt +++ b/src/ansi-c/CMakeLists.txt @@ -5,9 +5,17 @@ add_executable(converter library/converter.cpp) file(GLOB ansi_c_library_sources "library/*.c") -add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc" - COMMAND cat ${ansi_c_library_sources} | $ > "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc" - DEPENDS converter ${ansi_c_library_sources}) +# Convert cmake paths to native paths for Windows builds +file(TO_NATIVE_PATH "${ansi_c_library_sources}" + ansi_c_library_sources_paths) +file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc" + cprover_library_path) +file(TO_NATIVE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/converter" + converter_path) + +add_custom_command(OUTPUT "${cprover_library_path}" + COMMAND cat ${ansi_c_library_sources_paths} | ${converter_path} > ${cprover_library_path} + DEPENDS converter ${ansi_c_library_sources_paths}) add_executable(file_converter file_converter.cpp) diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index a10fa393116..2a9b15df0dc 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -1,8 +1,16 @@ file(GLOB cpp_library_sources "library/*.c") -add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc" - COMMAND cat ${cpp_library_sources} | $ > "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc" - DEPENDS converter ${cpp_library_sources}) +# Convert cmake paths to native paths for Windows builds +file(TO_NATIVE_PATH "${cpp_library_sources}" + cpp_library_sources_paths) +file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc" + cprover_library_path) +file(TO_NATIVE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/converter" + converter_path) + +add_custom_command(OUTPUT "${cprover_library_path}" + COMMAND cat ${cpp_library_sources_paths} | "${converter_path}" > "${cprover_library_path}" + DEPENDS converter ${cpp_library_sources_paths}) ################################################################################ diff --git a/src/util/expr_iterator.h b/src/util/expr_iterator.h index 6a2a86ab259..90fb5516652 100644 --- a/src/util/expr_iterator.h +++ b/src/util/expr_iterator.h @@ -164,7 +164,10 @@ class depth_iterator_baset { m_stack=std::move(other.m_stack); } depth_iterator_baset &operator=(const depth_iterator_baset&)=default; depth_iterator_baset &operator=(depth_iterator_baset &&other) - { m_stack=std::move(other.m_stack); } + { + m_stack = std::move(other.m_stack); + return *this; + } const exprt &get_root() {