diff --git a/.gitignore b/.gitignore index eccc0a4..46759a4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,10 @@ build*/* *.so public/ +<<<<<<< HEAD *.exe +======= +>>>>>>> master # Eclispe setting --- do not ignore *.cproject and *.project */**/.settings @@ -92,7 +95,11 @@ DocProject/Help/Html2 DocProject/Help/html # Cmake, make and compiled objects on unix +<<<<<<< HEAD #*.cmake +======= +*.cmake +>>>>>>> master *.c.o */CMakeFiles/* */Makefile @@ -142,6 +149,20 @@ Assets/AssetStoreTools* # Visual Studio cache directory .vs/ +<<<<<<< HEAD +======= +# Visual Studio Code cache directory +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +>>>>>>> master # Autogenerated VS/MD/Consulo solution and project files ExportedObj/ .consulo/ @@ -175,6 +196,7 @@ sysinfo.txt # Office ~*.pptx +<<<<<<< HEAD #Cython https://github.com/cython/cython/blob/master/.gitignore *.pyc @@ -215,3 +237,8 @@ callgrind.out.* .cache .pytest_cache .mypy_cache +<<<<<<< HEAD +======= +======= +>>>>>>> master +>>>>>>> cmakeWin diff --git a/CMakeLists.txt b/CMakeLists.txt index e28ac70..e025eef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,9 +62,12 @@ ENDIF(BUILD_STATIC_LIB) set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER ${SOURCE_HEADS}) -# ADD DEFAULT COMPILER FLAGS +# Add compiler flags include(CompilerFlags) +# Install setup +install(TARGETS ${PROJECT_NAME} PERMISSIONS WORLD_WRITE ) + find_package(OpenMP REQUIRED) if (OPENMP_FOUND) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt index 253854c..01be2ad 100644 --- a/examples/c/CMakeLists.txt +++ b/examples/c/CMakeLists.txt @@ -42,12 +42,17 @@ set(SOURCE_FILES main.c ) # Create the executable add_executable(demo ${SOURCE_FILES}) -# Copy input files after build +# Copy input files for this example after build add_custom_command( TARGET demo POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/*.dat - ${CMAKE_CURRENT_BINARY_DIR}/ ) + ${CMAKE_CURRENT_SOURCE_DIR}/userP.dat + ${CMAKE_CURRENT_BINARY_DIR}/userP.dat ) +add_custom_command( + TARGET demo POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/userQ.dat + ${CMAKE_CURRENT_BINARY_DIR}/userQ.dat ) # PLATFORM-SPECIFIC SETTING if (UNIX) diff --git a/examples/c/main.c b/examples/c/main.c index 7258e87..7606bd1 100644 --- a/examples/c/main.c +++ b/examples/c/main.c @@ -77,7 +77,7 @@ int readinput(const char *inputfile, double ***pts, int * out) { } /* Read number of input vertices. */ - if (fscanf_s(fp, "%d", &npoints) != 1) + if (fscanf(fp, "%d", &npoints) != 1) return 1; /* Allocate memory. */ @@ -88,7 +88,7 @@ int readinput(const char *inputfile, double ***pts, int * out) { /* Read and store vertices' coordinates. */ for (idx = 0; idx < npoints; idx++) { - if (fscanf_s(fp, "%lf %lf %lf\n", &arr[idx][0], &arr[idx][1], &arr[idx][2]) != 3) + if (fscanf(fp, "%lf %lf %lf\n", &arr[idx][0], &arr[idx][1], &arr[idx][2]) != 3) return 1; }