Skip to content

Commit

Permalink
Merge pull request #80 from ESTOS/feature/BUILDSYS-416
Browse files Browse the repository at this point in the history
Fix copying of files while filtering
  • Loading branch information
JanFellner authored Sep 16, 2024
2 parents 11622a5 + 80e317b commit 91beac1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions c-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ if(C_LIBRARY_OUTPUT_PATH)
set(OUTPUT_PATH ${C_LIBRARY_OUTPUT_PATH})
else()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/libx64)
set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/libx64/)
else()
set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/lib)
set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/lib/)
endif()
endif()
set_target_properties(c-lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${OUTPUT_PATH})
Expand Down
2 changes: 1 addition & 1 deletion compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ file(GLOB header_files *.h core/*.h back-ends/*.h back-ends/**/*.h)
if(COMPILER_OUTPUT_PATH)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${COMPILER_OUTPUT_PATH})
else()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/output/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/output/bin/)
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
Expand Down
5 changes: 3 additions & 2 deletions compiler/core/snacc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2116,15 +2116,16 @@ int copy_file(const char* source, const char* destination)
{
// Open the source file in binary read mode
FILE* src = 0;
if (!fopen_s(&src, source, "rb") || !src)
if (fopen_s(&src, source, "rb") != 0 || !src)
{
perror("Error opening source file");
perror(source);
return 1;
}

// Open the destination file in binary write mode
FILE* dest = 0;
if (!fopen_s(&dest, destination, "rb") || !dest)
if (fopen_s(&dest, destination, "wb") != 0 || !dest)
{
perror("Error opening destination file");
fclose(src);
Expand Down
5 changes: 2 additions & 3 deletions cpp-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ if(CPP_LIBRARY_OUTPUT_PATH)
set(OUTPUT_PATH ${CPP_LIBRARY_OUTPUT_PATH})
else()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/libx64)
set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/libx64/)
else()
set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/lib)
set(OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/lib/)
endif()
endif()
set_target_properties(cpp-lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${OUTPUT_PATH})
set_target_properties(cpp-lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${OUTPUT_PATH})
set_target_properties(cpp-lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${OUTPUT_PATH})

# configure compiler specific options
# - warning levels
Expand Down
6 changes: 3 additions & 3 deletions version.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef VERSION_H
#define VERSION_H

#define VERSION "6.0.15"
#define VERSION_RC 6, 0, 15
#define RELDATE "14.09.2024"
#define VERSION "6.0.16"
#define VERSION_RC 6, 0, 16
#define RELDATE "16.09.2024"

#endif // VERSION_H

0 comments on commit 91beac1

Please sign in to comment.